@lntvow/dev 5.0.11 → 5.0.12

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/cli.mjs CHANGED
@@ -1,46 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as createRequire99999 } from 'module';const require = createRequire99999(import.meta.url);
3
- var Dc=Object.create;var Xi=Object.defineProperty;var $c=Object.getOwnPropertyDescriptor;var Fc=Object.getOwnPropertyNames;var Mc=Object.getPrototypeOf,Vc=Object.prototype.hasOwnProperty;var ze=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var jc=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bc=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fc(t))!Vc.call(e,i)&&i!==r&&Xi(e,i,{get:()=>t[i],enumerable:!(s=$c(t,i))||s.enumerable});return e};var st=(e,t,r)=>(r=e!=null?Dc(Mc(e)):{},Bc(t||!e||!e.__esModule?Xi(r,"default",{value:e,enumerable:!0}):r,e));import cg from"path";import{fileURLToPath as hg}from"url";var y=jc(()=>{"use strict"});var $t=se(es=>{"use strict";y();var ir=class extends Error{constructor(t,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Jr=class extends ir{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};es.CommanderError=ir;es.InvalidArgumentError=Jr});var nr=se(rs=>{"use strict";y();var{InvalidArgumentError:Uc}=$t(),ts=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new Uc(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Gc(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}rs.Argument=ts;rs.humanReadableArgName=Gc});var ns=se(is=>{"use strict";y();var{humanReadableArgName:Wc}=nr(),ss=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(i=>!i._hidden),s=t._getHelpCommand();return s&&!s._hidden&&r.push(s),this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}compareOptions(t,r){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(t).localeCompare(s(r))}visibleOptions(t){let r=t.options.filter(i=>!i.hidden),s=t._getHelpOption();if(s&&!s.hidden){let i=s.short&&t._findOption(s.short),n=s.long&&t._findOption(s.long);!i&&!n?r.push(s):s.long&&!n?r.push(t.createOption(s.long,s.description)):s.short&&!i&&r.push(t.createOption(s.short,s.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let s=t.parent;s;s=s.parent){let i=s.options.filter(n=>!n.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(s=>Wc(s)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let s="";for(let i=t.parent;i;i=i.parent)s=i.name()+" "+s;return s+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let s=`(${r.join(", ")})`;return t.description?`${t.description} ${s}`:s}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return t.description?`${t.description} ${s}`:s}return t.description}formatItemList(t,r,s){return r.length===0?[]:[s.styleTitle(t),...r,""]}groupItems(t,r,s){let i=new Map;return t.forEach(n=>{let a=s(n);i.has(a)||i.set(a,[])}),r.forEach(n=>{let a=s(n);i.has(a)||i.set(a,[]),i.get(a).push(n)}),i}formatHelp(t,r){let s=r.padWidth(t,r),i=r.helpWidth??80;function n(h,p){return r.formatItem(h,s,p,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],u=r.commandDescription(t);u.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let c=r.visibleArguments(t).map(h=>n(r.styleArgumentTerm(r.argumentTerm(h)),r.styleArgumentDescription(r.argumentDescription(h))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),h=>h.helpGroupHeading??"Options:").forEach((h,p)=>{let d=h.map(B=>n(r.styleOptionTerm(r.optionTerm(B)),r.styleOptionDescription(r.optionDescription(B))));a=a.concat(this.formatItemList(p,d,r))}),r.showGlobalOptions){let h=r.visibleGlobalOptions(t).map(p=>n(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));a=a.concat(this.formatItemList("Global Options:",h,r))}return this.groupItems(t.commands,r.visibleCommands(t),h=>h.helpGroup()||"Commands:").forEach((h,p)=>{let d=h.map(B=>n(r.styleSubcommandTerm(r.subcommandTerm(B)),r.styleSubcommandDescription(r.subcommandDescription(B))));a=a.concat(this.formatItemList(p,d,r))}),a.join(`
4
- `)}displayWidth(t){return Zi(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,s,i){let a=" ".repeat(2);if(!s)return a+t;let u=t.padEnd(r+t.length-i.displayWidth(t)),c=2,l=(this.helpWidth??80)-r-c-2,h;return l<this.minWidthToWrap||i.preformatted(s)?h=s:h=i.boxWrap(s,l).replace(/\n/g,`
5
- `+" ".repeat(r+c)),a+u+" ".repeat(c)+h.replace(/\n/g,`
6
- ${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let s=t.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,n=[];return s.forEach(a=>{let u=a.match(i);if(u===null){n.push("");return}let c=[u.shift()],f=this.displayWidth(c[0]);u.forEach(l=>{let h=this.displayWidth(l);if(f+h<=r){c.push(l),f+=h;return}n.push(c.join(""));let p=l.trimStart();c=[p],f=this.displayWidth(p)}),n.push(c.join(""))}),n.join(`
7
- `)}};function Zi(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}is.Help=ss;is.stripColor=Zi});var cs=se(us=>{"use strict";y();var{InvalidArgumentError:Hc}=$t(),as=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let s=qc(t);this.short=s.shortFlag,this.long=s.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,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new Hc(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ji(this.name().replace(/^no-/,"")):Ji(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},os=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s)})}valueFromOption(t,r){let s=r.attributeName();if(!this.dualOptions.has(s))return!0;let i=this.negativeOptions.get(s).presetArg,n=i!==void 0?i:!1;return r.negate===(n===t)}};function Ji(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function qc(e){let t,r,s=/^-[^-]$/,i=/^--[^-]/,n=e.split(/[ |,]+/).concat("guard");if(s.test(n[0])&&(t=n.shift()),i.test(n[0])&&(r=n.shift()),!t&&s.test(n[0])&&(t=n.shift()),!t&&i.test(n[0])&&(t=r,r=n.shift()),n[0].startsWith("-")){let a=n[0],u=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${u}
8
- - a short flag is a single dash and a single character
9
- - either use a single dash and a single character (for a short flag)
10
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):s.test(a)?new Error(`${u}
11
- - too many short flags`):i.test(a)?new Error(`${u}
12
- - too many long flags`):new Error(`${u}
13
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}us.Option=as;us.DualOptions=os});var tn=se(en=>{"use strict";y();function zc(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let s=0;s<=e.length;s++)r[s]=[s];for(let s=0;s<=t.length;s++)r[0][s]=s;for(let s=1;s<=t.length;s++)for(let i=1;i<=e.length;i++){let n=1;e[i-1]===t[s-1]?n=0:n=1,r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+n),i>1&&s>1&&e[i-1]===t[s-2]&&e[i-2]===t[s-1]&&(r[i][s]=Math.min(r[i][s],r[i-2][s-2]+1))}return r[e.length][t.length]}function Kc(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(a=>a.slice(2)));let s=[],i=3,n=.4;return t.forEach(a=>{if(a.length<=1)return;let u=zc(e,a),c=Math.max(e.length,a.length);(c-u)/c>n&&(u<i?(i=u,s=[a]):u===i&&s.push(a))}),s.sort((a,u)=>a.localeCompare(u)),r&&(s=s.map(a=>`--${a}`)),s.length>1?`
14
- (Did you mean one of ${s.join(", ")}?)`:s.length===1?`
15
- (Did you mean ${s[0]}?)`:""}en.suggestSimilar=Kc});var an=se(ds=>{"use strict";y();var Yc=ze("events").EventEmitter,ls=ze("child_process"),Ke=ze("path"),ar=ze("fs"),j=ze("process"),{Argument:Qc,humanReadableArgName:Xc}=nr(),{CommanderError:hs}=$t(),{Help:Zc,stripColor:Jc}=ns(),{Option:rn,DualOptions:el}=cs(),{suggestSimilar:sn}=tn(),fs=class e extends Yc{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",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._savedState=null,this._outputConfiguration={writeOut:r=>j.stdout.write(r),writeErr:r=>j.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>j.stdout.isTTY?j.stdout.columns:void 0,getErrHelpWidth:()=>j.stderr.isTTY?j.stderr.columns:void 0,getOutHasColors:()=>ps()??(j.stdout.isTTY&&j.stdout.hasColors?.()),getErrHasColors:()=>ps()??(j.stderr.isTTY&&j.stderr.hasColors?.()),stripColor:r=>Jc(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,s){let i=r,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let[,a,u]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return i&&(c.description(i),c._executableHandler=!0),n.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(n.noHelp||n.hidden),c._executableFile=n.executableFile||null,u&&c.arguments(u),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Zc,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration=Object.assign({},this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
16
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Qc(t,r)}argument(t,r,s,i){let n=this.createArgument(t,r);return typeof s=="function"?n.default(i).argParser(s):n.default(s),this.addArgument(n),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let s=t??"help [command]",[,i,n]=s.match(/([^ ]+) *(.*)/),a=r??"display help for command",u=this.createCommand(i);return u.helpOption(!1),n&&u.arguments(n),a&&u.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=u,(t||r)&&this._initCommandGroup(u),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),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(t,r){let s=["preSubcommand","preAction","postAction"];if(!s.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
- Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,s){this._exitCallback&&this._exitCallback(new hs(t,r,s)),j.exit(t)}action(t){let r=s=>{let i=this.registeredArguments.length,n=s.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),t.apply(this,n)};return this._actionHandler=r,this}createOption(t,r){return new rn(t,r)}_callParseArg(t,r,s,i){try{return t.parseArg(r,s)}catch(n){if(n.code==="commander.invalidArgument"){let a=`${i} ${n.message}`;this.error(a,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let s=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'
18
- - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=i=>[i.name()].concat(i.aliases()),s=r(t).find(i=>this._findCommand(i));if(s){let i=r(this._findCommand(s)).join("|"),n=r(t).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),s=t.attributeName();if(t.negate){let n=t.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(s,t.defaultValue,"default");let i=(n,a,u)=>{n==null&&t.presetArg!==void 0&&(n=t.presetArg);let c=this.getOptionValue(s);n!==null&&t.parseArg?n=this._callParseArg(t,n,c,a):n!==null&&t.variadic&&(n=t._concatValue(n,c)),n==null&&(t.negate?n=!1:t.isBoolean()||t.optional?n=!0:n=""),this.setOptionValueWithSource(s,n,u)};return this.on("option:"+r,n=>{let a=`error: option '${t.flags}' argument '${n}' is invalid.`;i(n,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,n=>{let a=`error: option '${t.flags}' value '${n}' from env '${t.envVar}' is invalid.`;i(n,a,"env")}),this}_optionEx(t,r,s,i,n){if(typeof r=="object"&&r instanceof rn)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,s);if(a.makeOptionMandatory(!!t.mandatory),typeof i=="function")a.default(n).argParser(i);else if(i instanceof RegExp){let u=i;i=(c,f)=>{let l=u.exec(c);return l?l[0]:f},a.default(n).argParser(i)}else a.default(i);return this.addOption(a)}option(t,r,s,i){return this._optionEx({},t,r,s,i)}requiredOption(t,r,s,i){return this._optionEx({mandatory:!0},t,r,s,i)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,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(t=!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=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,s){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=s,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(t)!==void 0&&(r=s.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){j.versions?.electron&&(r.from="electron");let i=j.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}t===void 0&&(t=j.argv),this.rawArgs=t.slice();let s;switch(r.from){case void 0:case"node":this._scriptPath=t[1],s=t.slice(2);break;case"electron":j.defaultApp?(this._scriptPath=t[1],s=t.slice(2)):s=t.slice(1);break;case"user":s=t.slice(0);break;case"eval":s=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",s}parse(t,r){this._prepareForParse();let s=this._prepareUserArgs(t,r);return this._parseCommand([],s),this}async parseAsync(t,r){this._prepareForParse();let s=this._prepareUserArgs(t,r);return await this._parseCommand([],s),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,s){if(ar.existsSync(t))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${t}' does not exist
20
- - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
- - ${i}`;throw new Error(n)}_executeSubCommand(t,r){r=r.slice();let s=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,h){let p=Ke.resolve(l,h);if(ar.existsSync(p))return p;if(i.includes(Ke.extname(h)))return;let d=i.find(B=>ar.existsSync(`${p}${B}`));if(d)return`${p}${d}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=t._executableFile||`${this._name}-${t._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=ar.realpathSync(this._scriptPath)}catch{l=this._scriptPath}u=Ke.resolve(Ke.dirname(l),u)}if(u){let l=n(u,a);if(!l&&!t._executableFile&&this._scriptPath){let h=Ke.basename(this._scriptPath,Ke.extname(this._scriptPath));h!==this._name&&(l=n(u,`${h}-${t._name}`))}a=l||a}s=i.includes(Ke.extname(a));let c;j.platform!=="win32"?s?(r.unshift(a),r=nn(j.execArgv).concat(r),c=ls.spawn(j.argv[0],r,{stdio:"inherit"})):c=ls.spawn(a,r,{stdio:"inherit"}):(this._checkForMissingExecutable(a,u,t._name),r.unshift(a),r=nn(j.execArgv).concat(r),c=ls.spawn(j.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{j.on(h,()=>{c.killed===!1&&c.exitCode===null&&c.kill(h)})});let f=this._exitCallback;c.on("close",l=>{l=l??1,f?f(new hs(l,"commander.executeSubCommandAsync","(close)")):j.exit(l)}),c.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(a,u,t._name);else if(l.code==="EACCES")throw new Error(`'${a}' not executable`);if(!f)j.exit(1);else{let h=new hs(1,"commander.executeSubCommandAsync","(error)");h.nestedError=l,f(h)}}),this.runningCommand=c}_dispatchSubcommand(t,r,s){let i=this._findCommand(t);i||this.help({error:!0}),i._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,i,"preSubcommand"),n=this._chainOrCall(n,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(s));else return i._parseCommand(r,s)}),n}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(s,i,n)=>{let a=i;if(i!==null&&s.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;a=this._callParseArg(s,i,n,u)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((s,i)=>{let n=s.defaultValue;s.variadic?i<this.args.length?(n=this.args.slice(i),s.parseArg&&(n=n.reduce((a,u)=>t(s,u,a),s.defaultValue))):n===void 0&&(n=[]):i<this.args.length&&(n=this.args[i],s.parseArg&&(n=t(s,n,s.defaultValue))),r[i]=n}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let s=t,i=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[r]!==void 0).forEach(n=>{n._lifeCycleHooks[r].forEach(a=>{i.push({hookedCommand:n,callback:a})})}),r==="postAction"&&i.reverse(),i.forEach(n=>{s=this._chainOrCall(s,()=>n.callback(n.hookedCommand,this))}),s}_chainOrCallSubCommandHook(t,r,s){let i=t;return this._lifeCycleHooks[s]!==void 0&&this._lifeCycleHooks[s].forEach(n=>{i=this._chainOrCall(i,()=>n(this,r))}),i}_parseCommand(t,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(s.operands),r=s.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){i(),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(n,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(n))i(),this._processArguments(),this.parent.emit(n,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(s=>{let i=s.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});t.filter(s=>s.conflictsWith.length>0).forEach(s=>{let i=t.find(n=>s.conflictsWith.includes(n.attributeName()));i&&this._conflictingOption(s,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],s=[],i=r,n=t.slice();function a(f){return f.length>1&&f[0]==="-"}let u=f=>/^-\d*\.?\d+(e[+-]?\d+)?$/.test(f)?!this._getCommandAndAncestors().some(l=>l.options.map(h=>h.short).some(h=>/^-\d$/.test(h))):!1,c=null;for(;n.length;){let f=n.shift();if(f==="--"){i===s&&i.push(f),i.push(...n);break}if(c&&(!a(f)||u(f))){this.emit(`option:${c.name()}`,f);continue}if(c=null,a(f)){let l=this._findOption(f);if(l){if(l.required){let h=n.shift();h===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,h)}else if(l.optional){let h=null;n.length>0&&(!a(n[0])||u(n[0]))&&(h=n.shift()),this.emit(`option:${l.name()}`,h)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(f.length>2&&f[0]==="-"&&f[1]!=="-"){let l=this._findOption(`-${f[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,f.slice(2)):(this.emit(`option:${l.name()}`),n.unshift(`-${f.slice(2)}`));continue}}if(/^--[^=]+=/.test(f)){let l=f.indexOf("="),h=this._findOption(f.slice(0,l));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,f.slice(l+1));continue}}if(i===r&&a(f)&&!(this.commands.length===0&&u(f))&&(i=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(f)){r.push(f),n.length>0&&s.push(...n);break}else if(this._getHelpCommand()&&f===this._getHelpCommand().name()){r.push(f),n.length>0&&r.push(...n);break}else if(this._defaultCommandName){s.push(f),n.length>0&&s.push(...n);break}}if(this._passThroughOptions){i.push(f),n.length>0&&i.push(...n);break}i.push(f)}return{operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let s=0;s<r;s++){let i=this.options[s].attributeName();t[i]=i===this._versionOptionName?this._version:this[i]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
23
- `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
- `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
25
- `),this.outputHelp({error:!0}));let s=r||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in j.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,j.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new el(this.options),r=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&r(s.attributeName())&&t.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,s.implied[i],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let s=a=>{let u=a.attributeName(),c=this.getOptionValue(u),f=this.options.find(h=>h.negate&&u===h.attributeName()),l=this.options.find(h=>!h.negate&&u===h.attributeName());return f&&(f.presetArg===void 0&&c===!1||f.presetArg!==void 0&&c===f.presetArg)?f:l||a},i=a=>{let u=s(a),c=u.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},n=`error: ${i(t)} cannot be used with ${i(r)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{let a=n.createHelp().visibleOptions(n).filter(u=>u.long).map(u=>u.long);i=i.concat(a),n=n.parent}while(n&&!n._enablePositionalOptions);r=sn(t,i)}let s=`error: unknown option '${t}'${r}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,s=r===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(n=>{i.push(n.name()),n.alias()&&i.push(n.alias())}),r=sn(t,i)}let s=`error: unknown command '${t}'${r}`;this.error(s,{code:"commander.unknownCommand"})}version(t,r,s){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",s=s||"output the version number";let i=this.createOption(r,s);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(t);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(s=>Xc(s));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Ke.basename(t,Ke.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),s=this._getOutputContext(t);r.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});let i=r.formatHelp(this,r);return s.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(t){t=t||{};let r=!!t.error,s,i,n;return r?(s=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),s(u)),hasColors:i,helpWidth:n}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let s=this._getOutputContext(t),i={error:s.error,write:s.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation({error:s.error});if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",i))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(j.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(t))throw new Error(`Unexpected value for position to addHelpText.
27
- Expecting one of '${s.join("', '")}'`);let i=`${t}Help`;return this.on(i,n=>{let a;typeof r=="function"?a=r({error:n.error,command:n.command}):a=r,a&&n.write(`${a}
28
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function nn(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,s="127.0.0.1",i="9229",n;return(n=t.match(/^(--inspect(-brk)?)$/))!==null?r=n[1]:(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=n[1],s=n[3],i=n[4]),r&&i!=="0"?`${r}=${s}:${parseInt(i)+1}`:t})}function ps(){if(j.env.NO_COLOR||j.env.FORCE_COLOR==="0"||j.env.FORCE_COLOR==="false")return!1;if(j.env.FORCE_COLOR||j.env.CLICOLOR_FORCE!==void 0)return!0}ds.Command=fs;ds.useColor=ps});var ln=se(Ae=>{"use strict";y();var{Argument:on}=nr(),{Command:ms}=an(),{CommanderError:tl,InvalidArgumentError:un}=$t(),{Help:rl}=ns(),{Option:cn}=cs();Ae.program=new ms;Ae.createCommand=e=>new ms(e);Ae.createOption=(e,t)=>new cn(e,t);Ae.createArgument=(e,t)=>new on(e,t);Ae.Command=ms;Ae.Option=cn;Ae.Argument=on;Ae.Help=rl;Ae.CommanderError=tl;Ae.InvalidArgumentError=un;Ae.InvalidOptionArgumentError=un});var xs=se((Vg,gs)=>{"use strict";y();var ur=process||{},fn=ur.argv||[],or=ur.env||{},sl=!(or.NO_COLOR||fn.includes("--no-color"))&&(!!or.FORCE_COLOR||fn.includes("--color")||ur.platform==="win32"||(ur.stdout||{}).isTTY&&or.TERM!=="dumb"||!!or.CI),il=(e,t,r=e)=>s=>{let i=""+s,n=i.indexOf(t,e.length);return~n?e+nl(i,t,r,n)+t:e+i+t},nl=(e,t,r,s)=>{let i="",n=0;do i+=e.substring(n,s)+r,n=s+t.length,s=e.indexOf(t,n);while(~s);return i+e.substring(n)},pn=(e=sl)=>{let t=e?il:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};gs.exports=pn();gs.exports.createColors=pn});var dn=se((_s,ys)=>{"use strict";y();(function(e,t){typeof _s=="object"&&typeof ys<"u"?ys.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(_s,function(){"use strict";var e=1e3,t=6e4,r=36e5,s="millisecond",i="second",n="minute",a="hour",u="day",c="week",f="month",l="quarter",h="year",p="date",d="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,W=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,z={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var v=["th","st","nd","rd"],x=S%100;return"["+S+(v[(x-20)%10]||v[x]||v[0])+"]"}},te=function(S,v,x){var k=String(S);return!k||k.length>=v?S:""+Array(v+1-k.length).join(x)+S},et={s:te,z:function(S){var v=-S.utcOffset(),x=Math.abs(v),k=Math.floor(x/60),_=x%60;return(v<=0?"+":"-")+te(k,2,"0")+":"+te(_,2,"0")},m:function S(v,x){if(v.date()<x.date())return-S(x,v);var k=12*(x.year()-v.year())+(x.month()-v.month()),_=v.clone().add(k,f),O=x-_<0,R=v.clone().add(k+(O?-1:1),f);return+(-(k+(x-_)/(O?_-R:R-_))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:f,y:h,w:c,d:u,D:p,h:a,m:n,s:i,ms:s,Q:l}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},Ge="en",xe={};xe[Ge]=z;var Dt="$isDayjsObject",We=function(S){return S instanceof yt||!(!S||!S[Dt])},tt=function S(v,x,k){var _;if(!v)return Ge;if(typeof v=="string"){var O=v.toLowerCase();xe[O]&&(_=O),x&&(xe[O]=x,_=O);var R=v.split("-");if(!_&&R.length>1)return S(R[0])}else{var U=v.name;xe[U]=v,_=U}return!k&&_&&(Ge=_),_||!k&&Ge},K=function(S,v){if(We(S))return S.clone();var x=typeof v=="object"?v:{};return x.date=S,x.args=arguments,new yt(x)},$=et;$.l=tt,$.i=We,$.w=function(S,v){return K(S,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var yt=function(){function S(x){this.$L=tt(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[Dt]=!0}var v=S.prototype;return v.parse=function(x){this.$d=function(k){var _=k.date,O=k.utc;if(_===null)return new Date(NaN);if($.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(B);if(R){var U=R[2]-1||0,Y=(R[7]||"0").substring(0,3);return O?new Date(Date.UTC(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Y)):new Date(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Y)}}return new Date(_)}(x),this.init()},v.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},v.$utils=function(){return $},v.isValid=function(){return this.$d.toString()!==d},v.isSame=function(x,k){var _=K(x);return this.startOf(k)<=_&&_<=this.endOf(k)},v.isAfter=function(x,k){return K(x)<this.startOf(k)},v.isBefore=function(x,k){return this.endOf(k)<K(x)},v.$g=function(x,k,_){return $.u(x)?this[k]:this.set(_,x)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(x,k){var _=this,O=!!$.u(k)||k,R=$.p(x),U=function(qe,ue){var Fe=$.w(_.$u?Date.UTC(_.$y,ue,qe):new Date(_.$y,ue,qe),_);return O?Fe:Fe.endOf(u)},Y=function(qe,ue){return $.w(_.toDate()[qe].apply(_.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(ue)),_)},re=this.$W,ne=this.$M,_e=this.$D,rt="set"+(this.$u?"UTC":"");switch(R){case h:return O?U(1,0):U(31,11);case f:return O?U(1,ne):U(0,ne+1);case c:var He=this.$locale().weekStart||0,lt=(re<He?re+7:re)-He;return U(O?_e-lt:_e+(6-lt),ne);case u:case p:return Y(rt+"Hours",0);case a:return Y(rt+"Minutes",1);case n:return Y(rt+"Seconds",2);case i:return Y(rt+"Milliseconds",3);default:return this.clone()}},v.endOf=function(x){return this.startOf(x,!1)},v.$set=function(x,k){var _,O=$.p(x),R="set"+(this.$u?"UTC":""),U=(_={},_[u]=R+"Date",_[p]=R+"Date",_[f]=R+"Month",_[h]=R+"FullYear",_[a]=R+"Hours",_[n]=R+"Minutes",_[i]=R+"Seconds",_[s]=R+"Milliseconds",_)[O],Y=O===u?this.$D+(k-this.$W):k;if(O===f||O===h){var re=this.clone().set(p,1);re.$d[U](Y),re.init(),this.$d=re.set(p,Math.min(this.$D,re.daysInMonth())).$d}else U&&this.$d[U](Y);return this.init(),this},v.set=function(x,k){return this.clone().$set(x,k)},v.get=function(x){return this[$.p(x)]()},v.add=function(x,k){var _,O=this;x=Number(x);var R=$.p(k),U=function(ne){var _e=K(O);return $.w(_e.date(_e.date()+Math.round(ne*x)),O)};if(R===f)return this.set(f,this.$M+x);if(R===h)return this.set(h,this.$y+x);if(R===u)return U(1);if(R===c)return U(7);var Y=(_={},_[n]=t,_[a]=r,_[i]=e,_)[R]||1,re=this.$d.getTime()+x*Y;return $.w(re,this)},v.subtract=function(x,k){return this.add(-1*x,k)},v.format=function(x){var k=this,_=this.$locale();if(!this.isValid())return _.invalidDate||d;var O=x||"YYYY-MM-DDTHH:mm:ssZ",R=$.z(this),U=this.$H,Y=this.$m,re=this.$M,ne=_.weekdays,_e=_.months,rt=_.meridiem,He=function(ue,Fe,ht,fe){return ue&&(ue[Fe]||ue(k,O))||ht[Fe].slice(0,fe)},lt=function(ue){return $.s(U%12||12,ue,"0")},qe=rt||function(ue,Fe,ht){var fe=ue<12?"AM":"PM";return ht?fe.toLowerCase():fe};return O.replace(W,function(ue,Fe){return Fe||function(ht){switch(ht){case"YY":return String(k.$y).slice(-2);case"YYYY":return $.s(k.$y,4,"0");case"M":return re+1;case"MM":return $.s(re+1,2,"0");case"MMM":return He(_.monthsShort,re,_e,3);case"MMMM":return He(_e,re);case"D":return k.$D;case"DD":return $.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return He(_.weekdaysMin,k.$W,ne,2);case"ddd":return He(_.weekdaysShort,k.$W,ne,3);case"dddd":return ne[k.$W];case"H":return String(U);case"HH":return $.s(U,2,"0");case"h":return lt(1);case"hh":return lt(2);case"a":return qe(U,Y,!0);case"A":return qe(U,Y,!1);case"m":return String(Y);case"mm":return $.s(Y,2,"0");case"s":return String(k.$s);case"ss":return $.s(k.$s,2,"0");case"SSS":return $.s(k.$ms,3,"0");case"Z":return R}return null}(ue)||R.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(x,k,_){var O,R=this,U=$.p(k),Y=K(x),re=(Y.utcOffset()-this.utcOffset())*t,ne=this-Y,_e=function(){return $.m(R,Y)};switch(U){case h:O=_e()/12;break;case f:O=_e();break;case l:O=_e()/3;break;case c:O=(ne-re)/6048e5;break;case u:O=(ne-re)/864e5;break;case a:O=ne/r;break;case n:O=ne/t;break;case i:O=ne/e;break;default:O=ne}return _?O:$.a(O)},v.daysInMonth=function(){return this.endOf(f).$D},v.$locale=function(){return xe[this.$L]},v.locale=function(x,k){if(!x)return this.$L;var _=this.clone(),O=tt(x,k,!0);return O&&(_.$L=O),_},v.clone=function(){return $.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},S}(),sr=yt.prototype;return K.prototype=sr,[["$ms",s],["$s",i],["$m",n],["$H",a],["$W",u],["$M",f],["$y",h],["$D",p]].forEach(function(S){sr[S[1]]=function(v){return this.$g(v,S[0],S[1])}}),K.extend=function(S,v){return S.$i||(S(v,yt,K),S.$i=!0),K},K.locale=tt,K.isDayjs=We,K.unix=function(S){return K(1e3*S)},K.en=xe[Ge],K.Ls=xe,K.p={},K})});var gn=se((Ug,mn)=>{"use strict";y();var vt=1e3,bt=vt*60,wt=bt*60,ft=wt*24,al=ft*7,ol=ft*365.25;mn.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ul(e);if(r==="number"&&isFinite(e))return t.long?ll(e):cl(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ul(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),s=(t[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return r*ol;case"weeks":case"week":case"w":return r*al;case"days":case"day":case"d":return r*ft;case"hours":case"hour":case"hrs":case"hr":case"h":return r*wt;case"minutes":case"minute":case"mins":case"min":case"m":return r*bt;case"seconds":case"second":case"secs":case"sec":case"s":return r*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function cl(e){var t=Math.abs(e);return t>=ft?Math.round(e/ft)+"d":t>=wt?Math.round(e/wt)+"h":t>=bt?Math.round(e/bt)+"m":t>=vt?Math.round(e/vt)+"s":e+"ms"}function ll(e){var t=Math.abs(e);return t>=ft?cr(e,t,ft,"day"):t>=wt?cr(e,t,wt,"hour"):t>=bt?cr(e,t,bt,"minute"):t>=vt?cr(e,t,vt,"second"):e+" ms"}function cr(e,t,r,s){var i=t>=r*1.5;return Math.round(e/r)+" "+s+(i?"s":"")}});var vs=se((Wg,xn)=>{"use strict";y();function hl(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=u,r.humanize=gn(),r.destroy=f,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let h=0;for(let p=0;p<l.length;p++)h=(h<<5)-h+l.charCodeAt(p),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=t;function r(l){let h,p=null,d,B;function W(...z){if(!W.enabled)return;let te=W,et=Number(new Date),Ge=et-(h||et);te.diff=Ge,te.prev=h,te.curr=et,h=et,z[0]=r.coerce(z[0]),typeof z[0]!="string"&&z.unshift("%O");let xe=0;z[0]=z[0].replace(/%([a-zA-Z%])/g,(We,tt)=>{if(We==="%%")return"%";xe++;let K=r.formatters[tt];if(typeof K=="function"){let $=z[xe];We=K.call(te,$),z.splice(xe,1),xe--}return We}),r.formatArgs.call(te,z),(te.log||r.log).apply(te,z)}return W.namespace=l,W.useColors=r.useColors(),W.color=r.selectColor(l),W.extend=s,W.destroy=r.destroy,Object.defineProperty(W,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,B=r.enabled(l)),B),set:z=>{p=z}}),typeof r.init=="function"&&r.init(W),W}function s(l,h){let p=r(this.namespace+(typeof h>"u"?":":h)+l);return p.log=this.log,p}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let h=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of h)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function n(l,h){let p=0,d=0,B=-1,W=0;for(;p<l.length;)if(d<h.length&&(h[d]===l[p]||h[d]==="*"))h[d]==="*"?(B=d,W=p,d++):(p++,d++);else if(B!==-1)d=B+1,W++,p=W;else return!1;for(;d<h.length&&h[d]==="*";)d++;return d===h.length}function a(){let l=[...r.names,...r.skips.map(h=>"-"+h)].join(",");return r.enable(""),l}function u(l){for(let h of r.skips)if(n(l,h))return!1;for(let h of r.names)if(n(l,h))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}xn.exports=hl});var _n=se((ye,lr)=>{"use strict";y();ye.formatArgs=pl;ye.save=dl;ye.load=ml;ye.useColors=fl;ye.storage=gl();ye.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ye.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function fl(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function pl(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+lr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,s=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(s=r))}),e.splice(s,0,t)}ye.log=console.debug||console.log||(()=>{});function dl(e){try{e?ye.storage.setItem("debug",e):ye.storage.removeItem("debug")}catch{}}function ml(){let e;try{e=ye.storage.getItem("debug")||ye.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function gl(){try{return localStorage}catch{}}lr.exports=vs()(ye);var{formatters:xl}=lr.exports;xl.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var vn=se((zg,yn)=>{"use strict";y();yn.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),i=t.indexOf("--");return s!==-1&&(i===-1?!0:s<i)}});var wn=se((Yg,bn)=>{"use strict";y();var _l=ze("os"),De=vn(),ce=process.env,Ct;De("no-color")||De("no-colors")||De("color=false")?Ct=!1:(De("color")||De("colors")||De("color=true")||De("color=always"))&&(Ct=!0);"FORCE_COLOR"in ce&&(Ct=ce.FORCE_COLOR.length===0||parseInt(ce.FORCE_COLOR,10)!==0);function yl(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function vl(e){if(Ct===!1)return 0;if(De("color=16m")||De("color=full")||De("color=truecolor"))return 3;if(De("color=256"))return 2;if(e&&!e.isTTY&&Ct!==!0)return 0;let t=Ct?1:0;if(process.platform==="win32"){let r=_l.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ce)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in ce)||ce.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in ce)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ce.TEAMCITY_VERSION)?1:0;if(ce.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ce){let r=parseInt((ce.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ce.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ce.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ce.TERM)||"COLORTERM"in ce?1:(ce.TERM==="dumb",t)}function bs(e){let t=vl(e);return yl(t)}bn.exports={supportsColor:bs,stdout:bs(process.stdout),stderr:bs(process.stderr)}});var kn=se((ae,fr)=>{"use strict";y();var bl=ze("tty"),hr=ze("util");ae.init=Tl;ae.log=El;ae.formatArgs=Cl;ae.save=Sl;ae.load=Al;ae.useColors=wl;ae.destroy=hr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let e=wn();e&&(e.stderr||e).level>=2&&(ae.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ae.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,n)=>n.toUpperCase()),s=process.env[t];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),e[r]=s,e},{});function wl(){return"colors"in ae.inspectOpts?!!ae.inspectOpts.colors:bl.isatty(process.stderr.fd)}function Cl(e){let{namespace:t,useColors:r}=this;if(r){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${t} \x1B[0m`;e[0]=n+e[0].split(`
29
- `).join(`
30
- `+n),e.push(i+"m+"+fr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=kl()+t+" "+e[0]}function kl(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}function El(...e){return process.stderr.write(hr.formatWithOptions(ae.inspectOpts,...e)+`
31
- `)}function Sl(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Al(){return process.env.DEBUG}function Tl(e){e.inspectOpts={};let t=Object.keys(ae.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ae.inspectOpts[t[r]]}fr.exports=vs()(ae);var{formatters:Cn}=fr.exports;Cn.o=function(e){return this.inspectOpts.colors=this.useColors,hr.inspect(e,this.inspectOpts).split(`
32
- `).map(t=>t.trim()).join(" ")};Cn.O=function(e){return this.inspectOpts.colors=this.useColors,hr.inspect(e,this.inspectOpts)}});var Cs=se((Zg,ws)=>{"use strict";y();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ws.exports=_n():ws.exports=kn()});var En=se(Ee=>{"use strict";y();var Ol=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ee,"__esModule",{value:!0});var Rl=ze("fs"),Pl=Ol(Cs()),kt=Pl.default("@kwsites/file-exists");function Il(e,t,r){kt("checking %s",e);try{let s=Rl.statSync(e);return s.isFile()&&t?(kt("[OK] path represents a file"),!0):s.isDirectory()&&r?(kt("[OK] path represents a directory"),!0):(kt("[FAIL] path represents something other than a file or directory"),!1)}catch(s){if(s.code==="ENOENT")return kt("[FAIL] path is not accessible: %o",s),!1;throw kt("[FATAL] %o",s),s}}function Nl(e,t=Ee.READABLE){return Il(e,(t&Ee.FILE)>0,(t&Ee.FOLDER)>0)}Ee.exists=Nl;Ee.FILE=1;Ee.FOLDER=2;Ee.READABLE=Ee.FILE+Ee.FOLDER});var Sn=se(pr=>{"use strict";y();function Ll(e){for(var t in e)pr.hasOwnProperty(t)||(pr[t]=e[t])}Object.defineProperty(pr,"__esModule",{value:!0});Ll(En())});var Es=se(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.createDeferred=pt.deferred=void 0;function ks(){let e,t,r="pending";return{promise:new Promise((i,n)=>{e=i,t=n}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}pt.deferred=ks;pt.createDeferred=ks;pt.default=ks});y();import{readFileSync as Xm,writeFileSync as Pc}from"fs";import{dirname as Zm,resolve as Ic}from"path";import{fileURLToPath as Jm}from"url";y();var hn=st(ln(),1),{program:Ft,createCommand:Ag,createArgument:Tg,createOption:Og,CommanderError:Rg,InvalidArgumentError:Pg,InvalidOptionArgumentError:Ig,Command:Ng,Argument:Lg,Option:Dg,Help:$g}=hn.default;var Nc=st(xs(),1),Lc=st(dn(),1);y();var Er=st(Sn(),1),wr=st(Cs(),1),Lo=st(Es(),1),Et=st(Es(),1);import{Buffer as jl}from"buffer";import{spawn as bh}from"child_process";import{EventEmitter as Mp}from"events";var qs=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,zs=Object.getOwnPropertyNames,$l=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[zs(e)[0]])(e=0)),t},Fl=(e,t)=>function(){return t||(0,e[zs(e)[0]])((t={exports:{}}).exports,t),t.exports},ee=(e,t)=>{for(var r in t)qs(e,r,{get:t[r],enumerable:!0})},Ml=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zs(t))!$l.call(e,i)&&i!==r&&qs(e,i,{get:()=>t[i],enumerable:!(s=Dl(t,i))||s.enumerable});return e},Q=e=>Ml(qs({},"__esModule",{value:!0}),e);function Vl(...e){let t=new String(e);return kr.set(t,e),t}function yr(e){return e instanceof String&&kr.has(e)}function An(e){return kr.get(e)||[]}var kr,Bt=g({"src/lib/args/pathspec.ts"(){"use strict";kr=new WeakMap}}),Qe,nt=g({"src/lib/errors/git-error.ts"(){"use strict";Qe=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Ut,At=g({"src/lib/errors/git-response-error.ts"(){"use strict";nt(),Ut=class extends Qe{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),ia,na=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";nt(),ia=class extends Qe{constructor(e){super(void 0,e)}}}});function aa(e){return typeof e!="function"?gt:e}function oa(e){return typeof e=="function"&&e!==gt}function ua(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function ca(e,t=0){return la(e)&&e.length>t?e[t]:void 0}function mt(e,t=0){if(la(e)&&e.length>t)return e[e.length-1-t]}function la(e){return!!(e&&typeof e.length=="number")}function Gt(e="",t=!0,r=`
33
- `){return e.split(r).reduce((s,i)=>{let n=t?i.trim():i;return n&&s.push(n),s},[])}function Ks(e,t){return Gt(e,!0).map(r=>t(r))}function Ys(e){return(0,Er.exists)(e,Er.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function ha(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Sr(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Me(e){return Array.isArray(e)?e:[e]}function fa(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function pa(e){return Me(e).map(String)}function H(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Vt(e,t){let r=[];for(let s=0,i=e.length;s<i;s++)r.push(t,e[s]);return r}function jt(e){return(Array.isArray(e)?jl.concat(e):e).toString("utf-8")}function da(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Is(e=0){return new Promise(t=>setTimeout(t,e))}function Ns(e){if(e!==!1)return e}var St,gt,Wt,Ar=g({"src/lib/utils/util.ts"(){"use strict";St="\0",gt=()=>{},Wt=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ve(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function Ls(e,t){let r=yr(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Tr(e){return!!e&&Wt(e)==="[object Object]"}function ma(e){return typeof e=="function"}var Ht,le,ga,vr,Qs,xa=g({"src/lib/utils/argument-filters.ts"(){"use strict";Ar(),Bt(),Ht=e=>Array.isArray(e),le=e=>typeof e=="string",ga=e=>Array.isArray(e)&&e.every(le),vr=e=>le(e)||Array.isArray(e)&&e.every(le),Qs=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),Ds,Bl=g({"src/lib/utils/exit-codes.ts"(){"use strict";Ds=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Ds||{})}}),br,Ul=g({"src/lib/utils/git-output-streams.ts"(){"use strict";br=class _a{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new _a(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),P,it,Gl=g({"src/lib/utils/line-parser.ts"(){"use strict";P=class{constructor(e,t){this.matches=[],this.parse=(r,s)=>(this.resetMatches(),this._regExp.every((i,n)=>this.addMatch(i,n,r(n)))?this.useMatches(s,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let s=r&&e.exec(r);return s&&this.pushMatch(t,s),!!s}pushMatch(e,t){this.matches.push(...t.slice(1))}},it=class extends P{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function ya(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...va},...e.filter(s=>typeof s=="object"&&s));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var va,Wl=g({"src/lib/utils/simple-git-options.ts"(){"use strict";va={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Xs(e,t=[]){return Tr(e)?Object.keys(e).reduce((r,s)=>{let i=e[s];if(yr(i))r.push(i);else if(Ls(i,["boolean"]))r.push(s+"="+i);else if(Array.isArray(i))for(let n of i)Ls(n,["string","number"])||r.push(s+"="+n);else r.push(s);return r},t):t}function ve(e,t=0,r=!1){let s=[];for(let i=0,n=t<0?e.length:t;i<n;i++)"string|number".includes(typeof e[i])&&s.push(String(e[i]));return Xs(Zs(e),s),r||s.push(...Hl(e)),s}function Hl(e){let t=typeof mt(e)=="function";return Ve(mt(e,t?1:0),Ht,[])}function Zs(e){let t=ma(mt(e));return Ve(mt(e,t?1:0),Tr)}function X(e,t=!0){let r=aa(mt(e));return t||oa(r)?r:void 0}var ql=g({"src/lib/utils/task-options.ts"(){"use strict";xa(),Ar(),Bt()}});function $s(e,t){return e(t.stdOut,t.stdErr)}function we(e,t,r,s=!0){return Me(r).forEach(i=>{for(let n=Gt(i,s),a=0,u=n.length;a<u;a++){let c=(f=0)=>{if(!(a+f>=u))return n[a+f]};t.some(({parse:f})=>f(c,e))}}),e}var zl=g({"src/lib/utils/task-parser.ts"(){"use strict";Ar()}}),ba={};ee(ba,{ExitCodes:()=>Ds,GitOutputStreams:()=>br,LineParser:()=>P,NOOP:()=>gt,NULL:()=>St,RemoteLineParser:()=>it,append:()=>F,appendTaskOptions:()=>Xs,asArray:()=>Me,asCamelCase:()=>fa,asFunction:()=>aa,asNumber:()=>H,asStringArray:()=>pa,bufferToString:()=>jt,callTaskParser:()=>$s,createInstanceConfig:()=>ya,delay:()=>Is,filterArray:()=>Ht,filterFunction:()=>ma,filterHasLength:()=>Qs,filterPlainObject:()=>Tr,filterPrimitives:()=>Ls,filterString:()=>le,filterStringArray:()=>ga,filterStringOrStringArray:()=>vr,filterType:()=>Ve,first:()=>ca,folderExists:()=>Ys,forEachLineWithContent:()=>Ks,getTrailingOptions:()=>ve,including:()=>ha,isUserFunction:()=>oa,last:()=>mt,objectToString:()=>Wt,orVoid:()=>Ns,parseStringResponse:()=>we,pick:()=>da,prefixedArray:()=>Vt,remove:()=>Sr,splitOn:()=>ua,toLinesWithContent:()=>Gt,trailingFunctionArgument:()=>X,trailingOptionsArgument:()=>Zs});var A=g({"src/lib/utils/index.ts"(){"use strict";xa(),Bl(),Ul(),Gl(),Wl(),ql(),zl(),Ar()}}),wa={};ee(wa,{CheckRepoActions:()=>Fs,checkIsBareRepoTask:()=>ka,checkIsRepoRootTask:()=>Ca,checkIsRepoTask:()=>Kl});function Kl(e){switch(e){case"bare":return ka();case"root":return Ca()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Or,parser:Js}}function Ca(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Or,parser(t){return/^\.(git)?$/.test(t.trim())}}}function ka(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Or,parser:Js}}function Yl(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Fs,Or,Js,Ea=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";A(),Fs=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Fs||{}),Or=({exitCode:e},t,r,s)=>{if(e===128&&Yl(t))return r(Buffer.from("false"));s(t)},Js=e=>e.trim()==="true"}});function Ql(e,t){let r=new Sa(e),s=e?Ta:Aa;return Gt(t).forEach(i=>{let n=i.replace(s,"");r.paths.push(n),(Oa.test(n)?r.folders:r.files).push(n)}),r}var Sa,Aa,Ta,Oa,Xl=g({"src/lib/responses/CleanSummary.ts"(){"use strict";A(),Sa=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Aa=/^[a-z]+\s*/i,Ta=/^[a-z]+\s+[a-z]+\s*/i,Oa=/\/$/}}),Ms={};ee(Ms,{EMPTY_COMMANDS:()=>Rr,adhocExecTask:()=>Ra,configurationErrorTask:()=>be,isBufferTask:()=>Ia,isEmptyTask:()=>Na,straightThroughBufferTask:()=>Pa,straightThroughStringTask:()=>de});function Ra(e){return{commands:Rr,format:"empty",parser:e}}function be(e){return{commands:Rr,format:"empty",parser(){throw typeof e=="string"?new ia(e):e}}}function de(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function Pa(e){return{commands:e,format:"buffer",parser(t){return t}}}function Ia(e){return e.format==="buffer"}function Na(e){return e.format==="empty"||!e.commands.length}var Rr,J=g({"src/lib/tasks/task.ts"(){"use strict";na(),Rr=[]}}),La={};ee(La,{CONFIG_ERROR_INTERACTIVE_MODE:()=>ei,CONFIG_ERROR_MODE_REQUIRED:()=>ti,CONFIG_ERROR_UNKNOWN_OPTION:()=>ri,CleanOptions:()=>mr,cleanTask:()=>Da,cleanWithOptionsTask:()=>Zl,isCleanOptionsArray:()=>Jl});function Zl(e,t){let{cleanMode:r,options:s,valid:i}=eh(e);return r?i.options?(s.push(...t),s.some(sh)?be(ei):Da(r,s)):be(ri+JSON.stringify(e)):be(ti)}function Da(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(s){return Ql(e==="n",s)}}}function Jl(e){return Array.isArray(e)&&e.every(t=>si.has(t))}function eh(e){let t,r=[],s={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{th(i)?(t=i,s.cleanMode=!0):s.options=s.options&&rh(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:s}}function th(e){return e==="f"||e==="n"}function rh(e){return/^-[a-z]$/i.test(e)&&si.has(e.charAt(1))}function sh(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var ei,ti,ri,mr,si,$a=g({"src/lib/tasks/clean.ts"(){"use strict";Xl(),A(),J(),ei="Git clean interactive mode is not supported",ti='Git clean mode parameter ("n" or "f") is required',ri="Git clean unknown option found in: ",mr=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(mr||{}),si=new Set(["i",...pa(Object.values(mr))])}});function ih(e){let t=new Ma;for(let r of Fa(e))t.addValue(r.file,String(r.key),r.value);return t}function nh(e,t){let r=null,s=[],i=new Map;for(let n of Fa(e,t))n.key===t&&(s.push(r=n.value),i.has(n.file)||i.set(n.file,[]),i.get(n.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:s}}function ah(e){return e.replace(/^(file):/,"")}function*Fa(e,t=null){let r=e.split("\0");for(let s=0,i=r.length-1;s<i;){let n=ah(r[s++]),a=r[s++],u=t;if(a.includes(`
34
- `)){let c=ua(a,`
35
- `);u=c[0],a=c[1]}yield{file:n,key:u,value:a}}}var Ma,oh=g({"src/lib/responses/ConfigList.ts"(){"use strict";A(),Ma=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=mt(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let s=this.addFile(e);s.hasOwnProperty(t)?Array.isArray(s[t])?s[t].push(r):s[t]=[s[t],r]:s[t]=r,this._all=void 0}}}});function Ss(e,t){return typeof e=="string"&&Vs.hasOwnProperty(e)?e:t}function uh(e,t,r,s){let i=["config",`--${s}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(n){return n}}}function ch(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(s){return nh(s,e)}}}function lh(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return ih(r)}}}function hh(){return{addConfig(e,t,...r){return this._runTask(uh(e,t,r[0]===!0,Ss(r[1],"local")),X(arguments))},getConfig(e,t){return this._runTask(ch(e,Ss(t,void 0)),X(arguments))},listConfig(...e){return this._runTask(lh(Ss(e[0],void 0)),X(arguments))}}}var Vs,Va=g({"src/lib/tasks/config.ts"(){"use strict";oh(),A(),Vs=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Vs||{})}});function fh(e){return ja.has(e)}var As,ja,Ba=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";As=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(As||{}),ja=new Set(Object.values(As))}});function ph(...e){return new Ga().param(...e)}function dh(e){let t=new Set,r={};return Ks(e,s=>{let[i,n,a]=s.split(St);t.add(i),(r[i]=r[i]||[]).push({line:H(n),path:i,preview:a})}),{paths:t,results:r}}function mh(){return{grep(e){let t=X(arguments),r=ve(arguments);for(let i of Ua)if(r.includes(i))return this._runTask(be(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=ph().param(e));let s=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:s,format:"utf-8",parser(i){return dh(i)}},t)}}}var Ua,Mt,Tn,Ga,Wa=g({"src/lib/tasks/grep.ts"(){"use strict";A(),J(),Ua=["-h"],Mt=Symbol("grepQuery"),Ga=class{constructor(){this[Tn]=[]}*[(Tn=Mt,Symbol.iterator)](){for(let e of this[Mt])yield e}and(...e){return e.length&&this[Mt].push("--and","(",...Vt(e,"-e"),")"),this}param(...e){return this[Mt].push(...Vt(e,"-e")),this}}}}),Ha={};ee(Ha,{ResetMode:()=>gr,getResetMode:()=>xh,resetTask:()=>gh});function gh(e,t){let r=["reset"];return qa(e)&&r.push(`--${e}`),r.push(...t),de(r)}function xh(e){if(qa(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function qa(e){return za.includes(e)}var gr,za,Ka=g({"src/lib/tasks/reset.ts"(){"use strict";J(),gr=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(gr||{}),za=Array.from(Object.values(gr))}});function _h(){return(0,wr.default)("simple-git")}function On(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(s,...i)=>{e(s,...i),r(s,...i)}:e:(s,...i)=>{e(`%s ${s}`,t,...i),r&&r(s,...i)}}function yh(e,t,{namespace:r}){if(typeof e=="string")return e;let s=t&&t.namespace||"";return s.startsWith(r)?s.substr(r.length+1):s||r}function ii(e,t,r,s=_h()){let i=e&&`[${e}]`||"",n=[],a=typeof t=="string"?s.extend(t):t,u=yh(Ve(t,le),a,s);return f(r);function c(l,h){return F(n,ii(e,u.replace(/^[^:]+/,l),h,s))}function f(l){let h=l&&`[${l}]`||"",p=a&&On(a,h)||gt,d=On(s,`${i} ${h}`,p);return Object.assign(a?p:d,{label:e,sibling:c,info:d,step:f})}}var Ya=g({"src/lib/git-logger.ts"(){"use strict";A(),wr.default.formatters.L=e=>String(Qs(e)?e.length:"-"),wr.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Wt(e)}}),Qa,vh=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";nt(),Ya(),Qa=class js{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let r=js.getName(t.commands[0]),s=ii(this.logLabel,r);return{task:t,logger:s,name:r}}push(t){let r=this.createProgress(t);return r.logger("Adding task to the queue, commands = %o",t.commands),this._queue.set(t,r),r}fatal(t){for(let[r,{logger:s}]of Array.from(this._queue.entries()))r===t.task?(s.info("Failed %o",t),s("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):s.info("A fatal exception occurred in a previous task, the queue has been purged: %o",t.message),this.complete(r);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(t){this.withProgress(t)&&this._queue.delete(t)}attempt(t){let r=this.withProgress(t);if(!r)throw new Qe(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(t="empty"){return`task:${t}:${++js.counter}`}static{this.counter=0}}}});function dt(e,t){return{method:ca(e.commands)||"",commands:t}}function wh(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function Rn(e,t,r,s){return i=>{r("%s received %L bytes",t,i),s("%B",i),e.push(i)}}var Bs,Ch=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";nt(),J(),A(),vh(),Bs=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Qa}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:s}=this._queue.attempt(e);return await(Na(e)?this.attemptEmptyTask(e,s):this.attemptRemoteTask(e,s))}catch(s){throw this.onFatalException(e,s)}finally{r(),t()}}onFatalException(e,t){let r=t instanceof Qe?Object.assign(t,{task:e}):new Qe(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",dt(e,e.commands)),s=this._plugins.exec("spawn.args",[...e.commands],dt(e,e.commands)),i=await this.gitResponse(e,r,s,this.outputHandler,t.step("SPAWN")),n=await this.handleTaskData(e,s,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Ia(e)?$s(e.parser,n):$s(e.parser,n.asStrings())}async attemptEmptyTask(e,t){return t("empty task bypassing child process to call to task's parser"),e.parser(this)}handleTaskData(e,t,r,s){let{exitCode:i,rejection:n,stdOut:a,stdErr:u}=r;return new Promise((c,f)=>{s("Preparing to handle process response exitCode=%d stdOut=",i);let{error:l}=this._plugins.exec("task.error",{error:n},{...dt(e,t),...r});if(l&&e.onError)return s.info("exitCode=%s handling with custom error handler"),e.onError(r,l,h=>{s.info("custom error handler treated as success"),s("custom error returned a %s",Wt(h)),c(new br(Array.isArray(h)?Buffer.concat(h):h,Buffer.concat(u)))},f);if(l)return s.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,u.length,n),f(l);s.info("retrieving task output complete"),c(new br(Buffer.concat(a),Buffer.concat(u)))})}async gitResponse(e,t,r,s,i){let n=i.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},dt(e,e.commands));return new Promise(u=>{let c=[],f=[];i.info("%s %o",t,r),i("%O",a);let l=this._beforeSpawn(e,r);if(l)return u({stdOut:c,stdErr:f,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,{...dt(e,r),kill(p){l=p||l}});let h=bh(t,r,a);h.stdout.on("data",Rn(c,"stdOut",i,n.step("stdOut"))),h.stderr.on("data",Rn(f,"stdErr",i,n.step("stdErr"))),h.on("error",wh(f,i)),s&&(i("Passing child process stdOut/stdErr to custom outputHandler"),s(t,h.stdout,h.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...dt(e,r),spawned:h,close(p,d){u({stdOut:c,stdErr:f,exitCode:p,rejection:l||d})},kill(p){h.killed||(l=p,h.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...dt(e,t),kill(s){r=s||r}}),r}}}}),Xa={};ee(Xa,{GitExecutor:()=>Za});var Za,kh=g({"src/lib/runners/git-executor.ts"(){"use strict";Ch(),Za=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Bs(this,this._scheduler,this._plugins)}chain(){return new Bs(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Eh(e,t,r=gt){let s=n=>{r(null,n)},i=n=>{n?.task===e&&r(n instanceof Ut?Sh(n):n,void 0)};t.then(s,i)}function Sh(e){let t=s=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${s} should be GitResponseError.git.${s}, this will no longer be available in version 3`),t=gt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(s,i){return i in e||(s[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),s}}var Ah=g({"src/lib/task-callback.ts"(){"use strict";At(),A()}});function Pn(e,t){return Ra(r=>{if(!Ys(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var Th=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";A(),J()}});function Ts(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Sr(t,"-B")),de(t)}function Oh(){return{checkout(){return this._runTask(Ts(ve(arguments,1)),X(arguments))},checkoutBranch(e,t){return this._runTask(Ts(["-b",e,t,...ve(arguments)]),X(arguments))},checkoutLocalBranch(e){return this._runTask(Ts(["-b",e,...ve(arguments)]),X(arguments))}}}var Rh=g({"src/lib/tasks/checkout.ts"(){"use strict";A(),J()}});function Ph(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Ih(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return we(Ph(),[Ja],e)}})}}}var Ja,Nh=g({"src/lib/tasks/count-objects.ts"(){"use strict";A(),Ja=new P(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let s=fa(t);e.hasOwnProperty(s)&&(e[s]=H(r))})}});function Lh(e){return we({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},eo,e)}var eo,Dh=g({"src/lib/parsers/parse-commit.ts"(){"use strict";A(),eo=[new P(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,s])=>{e.branch=t,e.commit=s,e.root=!!r}),new P(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),s=r.pop();!s||!s.includes("@")||(e.author={email:s.substr(0,s.length-1),name:r.join("<").trim()})}),new P(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(s,10)||0}),new P(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;s==="-"?e.summary.deletions=i:s==="+"&&(e.summary.insertions=i)})]}});function $h(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Vt(e,"-m"),...t,...r],format:"utf-8",parser:Lh}}function Fh(){return{commit(t,...r){let s=X(arguments),i=e(t)||$h(Me(t),Me(Ve(r[0],vr,[])),[...Ve(r[1],Ht,[]),...ve(arguments,0,!0)]);return this._runTask(i,s)}};function e(t){return!vr(t)&&be("git.commit: requires the commit message to be supplied as a string/string[]")}}var Mh=g({"src/lib/tasks/commit.ts"(){"use strict";Dh(),A(),J()}});function Vh(){return{firstCommit(){return this._runTask(de(["rev-list","--max-parents=0","HEAD"],!0),X(arguments))}}}var jh=g({"src/lib/tasks/first-commit.ts"(){"use strict";A(),J()}});function Bh(e,t){let r=["hash-object",e];return t&&r.push("-w"),de(r,!0)}var Uh=g({"src/lib/tasks/hash-object.ts"(){"use strict";J()}});function Gh(e,t,r){let s=String(r).trim(),i;if(i=to.exec(s))return new xr(e,t,!1,i[1]);if(i=ro.exec(s))return new xr(e,t,!0,i[1]);let n="",a=s.split(" ");for(;a.length;)if(a.shift()==="in"){n=a.join(" ");break}return new xr(e,t,/^re/i.test(s),n)}var xr,to,ro,Wh=g({"src/lib/responses/InitSummary.ts"(){"use strict";xr=class{constructor(e,t,r,s){this.bare=e,this.path=t,this.existing=r,this.gitDir=s}},to=/^Init.+ repository in (.+)$/,ro=/^Rein.+ in (.+)$/}});function Hh(e){return e.includes(ni)}function qh(e=!1,t,r){let s=["init",...r];return e&&!Hh(s)&&s.splice(1,0,ni),{commands:s,format:"utf-8",parser(i){return Gh(s.includes("--bare"),t,i)}}}var ni,zh=g({"src/lib/tasks/init.ts"(){"use strict";Wh(),ni="--bare"}});function ai(e){for(let t=0;t<e.length;t++){let r=oi.exec(e[t]);if(r)return`--${r[1]}`}return""}function Kh(e){return oi.test(e)}var oi,qt=g({"src/lib/args/log-format.ts"(){"use strict";oi=/^--(stat|numstat|name-only|name-status)(=|$)/}}),so,Yh=g({"src/lib/responses/DiffSummary.ts"(){"use strict";so=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function io(e=""){let t=no[e];return r=>we(new so,t,r,!1)}var Os,In,Nn,Ln,no,ao=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";qt(),Yh(),Ba(),A(),Os=[new P(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,s=""])=>{e.files.push({file:t.trim(),changes:H(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:!1})}),new P(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,s])=>{e.files.push({file:t.trim(),before:H(r),after:H(s),binary:!0})}),new P(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let s=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=H(t),e.insertions=H(s?.[1]),e.deletions=H(i?.[1])})],In=[new P(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,s])=>{let i=H(t),n=H(r);e.changed++,e.insertions+=i,e.deletions+=n,e.files.push({file:s,changes:i+n,insertions:i,deletions:n,binary:!1})}),new P(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Nn=[new P(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Ln=[new P(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,s,i,n])=>{e.changed++,e.files.push({file:n??s,changes:0,insertions:0,deletions:0,binary:!1,status:Ns(fh(t)&&t),from:Ns(!!n&&s!==n&&s),similarity:H(r)})})],no={"":Os,"--stat":Os,"--numstat":In,"--name-status":Ln,"--name-only":Nn}}});function Qh(e,t){return t.reduce((r,s,i)=>(r[s]=e[i]||"",r),Object.create({diff:null}))}function oo(e=li,t=uo,r=""){let s=io(r);return function(i){let n=Gt(i.trim(),!1,ui).map(function(a){let u=a.split(ci),c=Qh(u[0].split(e),t);return u.length>1&&u[1].trim()&&(c.diff=s(u[1])),c});return{all:n,latest:n.length&&n[0]||null,total:n.length}}}var ui,ci,li,uo,co=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";A(),ao(),qt(),ui="\xF2\xF2\xF2\xF2\xF2\xF2 ",ci=" \xF2\xF2",li=" \xF2 ",uo=["hash","date","message","refs","author_name","author_email"]}}),lo={};ee(lo,{diffSummaryTask:()=>Xh,validateLogFormatConfig:()=>Pr});function Xh(e){let t=ai(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Pr(r)||{commands:r,format:"utf-8",parser:io(t)}}function Pr(e){let t=e.filter(Kh);if(t.length>1)return be(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return be(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var hi=g({"src/lib/tasks/diff.ts"(){"use strict";qt(),ao(),J()}});function Zh(e,t){let r=[],s=[];return Object.keys(e).forEach(i=>{r.push(i),s.push(String(e[i]))}),[r,s.join(t)]}function Jh(e){return Object.keys(e).reduce((t,r)=>(r in Us||(t[r]=e[r]),t),{})}function ho(e={},t=[]){let r=Ve(e.splitter,le,li),s=Tr(e.format)?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,n]=Zh(s,r),a=[],u=[`--pretty=format:${ui}${n}${ci}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&u.push(`--max-count=${c}`),e.from||e.to){let f=e.symmetric!==!1?"...":"..";a.push(`${e.from||""}${f}${e.to||""}`)}return le(e.file)&&u.push("--follow",Vl(e.file)),Xs(Jh(e),u),{fields:i,splitter:r,commands:[...u,...a]}}function ef(e,t,r){let s=oo(e,t,ai(r));return{commands:["log",...r],format:"utf-8",parser:s}}function tf(){return{log(...r){let s=X(arguments),i=ho(Zs(arguments),Ve(arguments[0],Ht)),n=t(...r)||Pr(i.commands)||e(i);return this._runTask(n,s)}};function e(r){return ef(r.splitter,r.fields,r.commands)}function t(r,s){return le(r)&&le(s)&&be("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Us,fo=g({"src/lib/tasks/log.ts"(){"use strict";qt(),Bt(),co(),A(),J(),hi(),Us=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(Us||{})}}),_r,po,rf=g({"src/lib/responses/MergeSummary.ts"(){"use strict";_r=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},po=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Gs,mo,sf=g({"src/lib/responses/PullSummary.ts"(){"use strict";Gs=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},mo=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Rs(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Dn(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:H(t&&t[1]||"0"),delta:H(r&&r[1]||"0")}}var go,nf=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";A(),go=[new it(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=Rs(e.remoteMessages);Object.assign(i,{[s]:H(r)})}),new it(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=Rs(e.remoteMessages);Object.assign(i,{[s]:H(r)})}),new it(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,s])=>{let i=Rs(e.remoteMessages);i.total=Dn(t),i.reused=Dn(r),i.packReused=H(s)})]}});function xo(e,t){return we({remoteMessages:new yo},_o,t)}var _o,yo,vo=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";A(),nf(),_o=[new it(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...go,new it([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new it([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,s])=>{e.remoteMessages.vulnerabilities={count:H(t),summary:r,url:s}})],yo=class{constructor(){this.all=[]}}}});function af(e,t){let r=we(new mo,bo,[e,t]);return r.message&&r}var $n,Fn,Mn,Vn,bo,jn,fi,wo=g({"src/lib/parsers/parse-pull.ts"(){"use strict";sf(),A(),vo(),$n=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Fn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Mn=/^(create|delete) mode \d+ (.+)/,Vn=[new P($n,(e,[t,r,s])=>{e.files.push(t),r&&(e.insertions[t]=r.length),s&&(e.deletions[t]=s.length)}),new P(Fn,(e,[t,,r,,s])=>r!==void 0||s!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+s||0,!0):!1),new P(Mn,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],bo=[new P(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new P(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new P(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,s,i])=>{e.branch.local=s,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],jn=(e,t)=>we(new Gs,Vn,[e,t]),fi=(e,t)=>Object.assign(new Gs,jn(e,t),xo(e,t))}}),Bn,Co,Un,of=g({"src/lib/parsers/parse-merge.ts"(){"use strict";rf(),A(),wo(),Bn=[new P(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new P(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new _r(t,r))}),new P(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,s])=>{e.conflicts.push(new _r(t,r,{deleteRef:s}))}),new P(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new _r(t,null))}),new P(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Co=(e,t)=>Object.assign(Un(e,t),fi(e,t)),Un=e=>we(new po,Bn,e)}});function Gn(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let s=Co(t,r);if(s.failed)throw new Ut(s);return s}}:be("Git.merge requires at least one option")}var uf=g({"src/lib/tasks/merge.ts"(){"use strict";At(),of(),J()}});function cf(e,t,r){let s=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),n=!r.includes("new");return{deleted:s,tag:i,branch:!i,new:!n,alreadyUpdated:n,local:e,remote:t}}var Wn,ko,Hn,lf=g({"src/lib/parsers/parse-push.ts"(){"use strict";A(),vo(),Wn=[new P(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new P(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new P(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,s])=>{e.pushed.push(cf(t,r,s))}),new P(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,s])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:s}}),new P(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,s,i])=>{e.update={head:{local:t,remote:r},hash:{from:s,to:i}}})],ko=(e,t)=>{let r=Hn(e,t),s=xo(e,t);return{...r,...s}},Hn=(e,t)=>we({pushed:[]},Wn,[e,t])}}),Eo={};ee(Eo,{pushTagsTask:()=>hf,pushTask:()=>pi});function hf(e={},t){return F(t,"--tags"),pi(e,t)}function pi(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Sr(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:ko}}var So=g({"src/lib/tasks/push.ts"(){"use strict";lf(),A()}});function ff(){return{showBuffer(){let e=["show",...ve(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(Pa(e),X(arguments))},show(){let e=["show",...ve(arguments,1)];return this._runTask(de(e),X(arguments))}}}var pf=g({"src/lib/tasks/show.ts"(){"use strict";A(),J()}}),qn,Ao,df=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";qn=/^(.+)\0(.+)$/,Ao=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let s=qn.exec(e)||[null,e,e];this.from=s[2]||"",this.path=s[1]||""}}}}});function zn(e){let[t,r]=e.split(St);return{from:r||t,to:t}}function Se(e,t,r){return[`${e}${t}`,r]}function Ps(e,...t){return t.map(r=>Se(e,r,(s,i)=>F(s.conflicted,i)))}function mf(e,t){let r=t.trim();switch(" "){case r.charAt(2):return s(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return s(" ",r.charAt(0),r.substr(2));default:return}function s(i,n,a){let u=`${i}${n}`,c=To.get(u);c&&c(e,a),u!=="##"&&u!=="!!"&&e.files.push(new Ao(a,i,n))}}var Kn,To,Oo,gf=g({"src/lib/responses/StatusSummary.ts"(){"use strict";A(),df(),Kn=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},To=new Map([Se(" ","A",(e,t)=>F(e.created,t)),Se(" ","D",(e,t)=>F(e.deleted,t)),Se(" ","M",(e,t)=>F(e.modified,t)),Se("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),Se("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),Se("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),Se("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),Se("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),Se("R"," ",(e,t)=>{F(e.renamed,zn(t))}),Se("R","M",(e,t)=>{let r=zn(t);F(e.renamed,r),F(e.modified,r.to)}),Se("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),Se("?","?",(e,t)=>F(e.not_added,t)),...Ps("A","A","U"),...Ps("D","D","U"),...Ps("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,s=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,n=/\.{3}(\S*)/,a=/\son\s([\S]+)$/,u;u=r.exec(t),e.ahead=u&&+u[1]||0,u=s.exec(t),e.behind=u&&+u[1]||0,u=i.exec(t),e.current=u&&u[1],u=n.exec(t),e.tracking=u&&u[1],u=a.exec(t),e.current=u&&u[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),Oo=function(e){let t=e.split(St),r=new Kn;for(let s=0,i=t.length;s<i;){let n=t[s++].trim();n&&(n.charAt(0)==="R"&&(n+=St+(t[s++]||"")),mf(r,n))}return r}}});function xf(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!Ro.includes(r))],parser(r){return Oo(r)}}}var Ro,_f=g({"src/lib/tasks/status.ts"(){"use strict";gf(),Ro=["--null","-z"]}});function Cr(e=0,t=0,r=0,s="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:s,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function yf(){return Cr(0,0,0,"",!1)}function vf(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:bf,onError(e,t,r,s){if(e.exitCode===-2)return r(Buffer.from(di));s(t)}})}}}function bf(e){return e===di?yf():we(Cr(0,0,0,e),Po,e)}var di,Po,wf=g({"src/lib/tasks/version.ts"(){"use strict";A(),di="installed=false",Po=[new P(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,s,i=""])=>{Object.assign(e,Cr(H(t),H(r),H(s),i))}),new P(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,s,i=""])=>{Object.assign(e,Cr(H(t),H(r),s,i))})]}}),Io={};ee(Io,{SimpleGitApi:()=>Ws});var Ws,Cf=g({"src/lib/simple-git-api.ts"(){"use strict";Ah(),Th(),Rh(),Nh(),Mh(),Va(),jh(),Wa(),Uh(),zh(),fo(),uf(),So(),pf(),_f(),J(),wf(),A(),Ws=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),s=r.push(e);return t&&Eh(e,s,t),Object.create(this,{then:{value:s.then.bind(s)},catch:{value:s.catch.bind(s)},_executor:{value:r}})}add(e){return this._runTask(de(["add",...Me(e)]),X(arguments))}cwd(e){let t=X(arguments);return typeof e=="string"?this._runTask(Pn(e,this._executor),t):typeof e?.path=="string"?this._runTask(Pn(e.path,e.root&&this._executor||void 0),t):this._runTask(be("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Bh(e,t===!0),X(arguments))}init(e){return this._runTask(qh(e===!0,this._executor.cwd,ve(arguments)),X(arguments))}merge(){return this._runTask(Gn(ve(arguments)),X(arguments))}mergeFromTo(e,t){return le(e)&&le(t)?this._runTask(Gn([e,t,...ve(arguments)]),X(arguments,!1)):this._runTask(be("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=pi({remote:Ve(arguments[0],le),branch:Ve(arguments[1],le)},ve(arguments));return this._runTask(e,X(arguments))}stash(){return this._runTask(de(["stash",...ve(arguments)]),X(arguments))}status(){return this._runTask(xf(ve(arguments)),X(arguments))}},Object.assign(Ws.prototype,Oh(),Fh(),hh(),Ih(),Vh(),mh(),tf(),ff(),vf())}}),No={};ee(No,{Scheduler:()=>Do});var Yn,Do,kf=g({"src/lib/runners/scheduler.ts"(){"use strict";A(),Ya(),Yn=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,Lo.createDeferred)();return{promise:t,done:r,id:e}}})(),Do=class{constructor(e=2){this.concurrency=e,this.logger=ii("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Sr(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Yn());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),$o={};ee($o,{applyPatchTask:()=>Ef});function Ef(e,t){return de(["apply",...t,...e])}var Sf=g({"src/lib/tasks/apply-patch.ts"(){"use strict";J()}});function Af(e,t){return{branch:e,hash:t,success:!0}}function Tf(e){return{branch:e,hash:null,success:!1}}var Fo,Of=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Fo=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Mo(e,t){return t===1&&Hs.test(e)}var Qn,Hs,Xn,Ir,Rf=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";Of(),A(),Qn=/(\S+)\s+\(\S+\s([^)]+)\)/,Hs=/^error[^']+'([^']+)'/m,Xn=[new P(Qn,(e,[t,r])=>{let s=Af(t,r);e.all.push(s),e.branches[t]=s}),new P(Hs,(e,[t])=>{let r=Tf(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Ir=(e,t)=>we(new Fo,Xn,[e,t])}}),Vo,Pf=g({"src/lib/responses/BranchSummary.ts"(){"use strict";Vo=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,s,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:s,label:i}}}}});function Zn(e){return e?e.charAt(0):""}function jo(e){return we(new Vo,Bo,e)}var Bo,If=g({"src/lib/parsers/parse-branch.ts"(){"use strict";Pf(),A(),Bo=[new P(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,s,i])=>{e.push(Zn(t),!0,r,s,i)}),new P(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,s,i])=>{e.push(Zn(t),!1,r,s,i)})]}}),Uo={};ee(Uo,{branchLocalTask:()=>Lf,branchTask:()=>Nf,containsDeleteBranchCommand:()=>Go,deleteBranchTask:()=>$f,deleteBranchesTask:()=>Df});function Go(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function Nf(e){let t=Go(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(s,i){return t?Ir(s,i).all[0]:jo(s)}}}function Lf(){return{format:"utf-8",commands:["branch","-v"],parser:jo}}function Df(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,s){return Ir(r,s)},onError({exitCode:r,stdOut:s},i,n,a){if(!Mo(String(i),r))return a(i);n(s)}}}function $f(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(s,i){return Ir(s,i).branches[e]},onError({exitCode:s,stdErr:i,stdOut:n},a,u,c){if(!Mo(String(a),s))return c(a);throw new Ut(r.parser(jt(n),jt(i)),String(a))}};return r}var Ff=g({"src/lib/tasks/branch.ts"(){"use strict";At(),Rf(),If(),A()}}),Wo,Mf=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";Wo=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Ho={};ee(Ho,{checkIgnoreTask:()=>Vf});function Vf(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Wo}}var jf=g({"src/lib/tasks/check-ignore.ts"(){"use strict";Mf()}}),qo={};ee(qo,{cloneMirrorTask:()=>Uf,cloneTask:()=>zo});function Bf(e){return/^--upload-pack(=|$)/.test(e)}function zo(e,t,r){let s=["clone",...r];return le(e)&&s.push(e),le(t)&&s.push(t),s.find(Bf)?be("git.fetch: potential exploit argument blocked."):de(s)}function Uf(e,t,r){return F(r,"--mirror"),zo(e,t,r)}var Gf=g({"src/lib/tasks/clone.ts"(){"use strict";J(),A()}});function Wf(e,t){return we({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Ko,[e,t])}var Ko,Hf=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";A(),Ko=[new P(/From (.+)$/,(e,[t])=>{e.remote=t}),new P(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new P(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new P(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new P(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,s,i])=>{e.updated.push({name:s,tracking:i,to:r,from:t})})]}}),Yo={};ee(Yo,{fetchTask:()=>zf});function qf(e){return/^--upload-pack(=|$)/.test(e)}function zf(e,t,r){let s=["fetch",...r];return e&&t&&s.push(e,t),s.find(qf)?be("git.fetch: potential exploit argument blocked."):{commands:s,format:"utf-8",parser:Wf}}var Kf=g({"src/lib/tasks/fetch.ts"(){"use strict";Hf(),J()}});function Yf(e){return we({moves:[]},Qo,e)}var Qo,Qf=g({"src/lib/parsers/parse-move.ts"(){"use strict";A(),Qo=[new P(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Xo={};ee(Xo,{moveTask:()=>Xf});function Xf(e,t){return{commands:["mv","-v",...Me(e),t],format:"utf-8",parser:Yf}}var Zf=g({"src/lib/tasks/move.ts"(){"use strict";Qf(),A()}}),Zo={};ee(Zo,{pullTask:()=>Jf});function Jf(e,t,r){let s=["pull",...r];return e&&t&&s.splice(1,0,e,t),{commands:s,format:"utf-8",parser(i,n){return fi(i,n)},onError(i,n,a,u){let c=af(jt(i.stdOut),jt(i.stdErr));if(c)return u(new Ut(c));u(n)}}}var ep=g({"src/lib/tasks/pull.ts"(){"use strict";At(),wo(),A()}});function tp(e){let t={};return Jo(e,([r])=>t[r]={name:r}),Object.values(t)}function rp(e){let t={};return Jo(e,([r,s,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&s&&(t[r].refs[i.replace(/[^a-z]/g,"")]=s)}),Object.values(t)}function Jo(e,t){Ks(e,r=>t(r.split(/\s+/)))}var sp=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";A()}}),eu={};ee(eu,{addRemoteTask:()=>ip,getRemotesTask:()=>np,listRemotesTask:()=>ap,remoteTask:()=>op,removeRemoteTask:()=>up});function ip(e,t,r){return de(["remote","add",...r,e,t])}function np(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?rp:tp}}function ap(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),de(t)}function op(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),de(t)}function up(e){return de(["remote","remove",e])}var cp=g({"src/lib/tasks/remote.ts"(){"use strict";sp(),J()}}),tu={};ee(tu,{stashListTask:()=>lp});function lp(e={},t){let r=ho(e),s=["stash","list",...r.commands,...t],i=oo(r.splitter,r.fields,ai(s));return Pr(s)||{commands:s,format:"utf-8",parser:i}}var hp=g({"src/lib/tasks/stash-list.ts"(){"use strict";qt(),co(),hi(),fo()}}),ru={};ee(ru,{addSubModuleTask:()=>fp,initSubModuleTask:()=>pp,subModuleTask:()=>Nr,updateSubModuleTask:()=>dp});function fp(e,t){return Nr(["add",e,t])}function pp(e){return Nr(["init",...e])}function Nr(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),de(t)}function dp(e){return Nr(["update",...e])}var mp=g({"src/lib/tasks/sub-module.ts"(){"use strict";J()}});function gp(e,t){let r=isNaN(e),s=isNaN(t);return r!==s?r?1:-1:r?su(e,t):0}function su(e,t){return e===t?0:e>t?1:-1}function xp(e){return e.trim()}function dr(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var Jn,iu,_p=g({"src/lib/responses/TagList.ts"(){"use strict";Jn=class{constructor(e,t){this.all=e,this.latest=t}},iu=function(e,t=!1){let r=e.split(`
36
- `).map(xp).filter(Boolean);t||r.sort(function(i,n){let a=i.split("."),u=n.split(".");if(a.length===1||u.length===1)return gp(dr(a[0]),dr(u[0]));for(let c=0,f=Math.max(a.length,u.length);c<f;c++){let l=su(dr(a[c]),dr(u[c]));if(l)return l}return 0});let s=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new Jn(r,s)}}}),nu={};ee(nu,{addAnnotatedTagTask:()=>bp,addTagTask:()=>vp,tagListTask:()=>yp});function yp(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return iu(r,t)}}}function vp(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function bp(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var wp=g({"src/lib/tasks/tag.ts"(){"use strict";_p()}}),Cp=Fl({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(kh(),Q(Xa)),{SimpleGitApi:s}=(Cf(),Q(Io)),{Scheduler:i}=(kf(),Q(No)),{configurationErrorTask:n}=(J(),Q(Ms)),{asArray:a,filterArray:u,filterPrimitives:c,filterString:f,filterStringOrStringArray:l,filterType:h,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:B}=(A(),Q(ba)),{applyPatchTask:W}=(Sf(),Q($o)),{branchTask:z,branchLocalTask:te,deleteBranchesTask:et,deleteBranchTask:Ge}=(Ff(),Q(Uo)),{checkIgnoreTask:xe}=(jf(),Q(Ho)),{checkIsRepoTask:Dt}=(Ea(),Q(wa)),{cloneTask:We,cloneMirrorTask:tt}=(Gf(),Q(qo)),{cleanWithOptionsTask:K,isCleanOptionsArray:$}=($a(),Q(La)),{diffSummaryTask:yt}=(hi(),Q(lo)),{fetchTask:sr}=(Kf(),Q(Yo)),{moveTask:S}=(Zf(),Q(Xo)),{pullTask:v}=(ep(),Q(Zo)),{pushTagsTask:x}=(So(),Q(Eo)),{addRemoteTask:k,getRemotesTask:_,listRemotesTask:O,remoteTask:R,removeRemoteTask:U}=(cp(),Q(eu)),{getResetMode:Y,resetTask:re}=(Ka(),Q(Ha)),{stashListTask:ne}=(hp(),Q(tu)),{addSubModuleTask:_e,initSubModuleTask:rt,subModuleTask:He,updateSubModuleTask:lt}=(mp(),Q(ru)),{addAnnotatedTagTask:qe,addTagTask:ue,tagListTask:Fe}=(wp(),Q(nu)),{straightThroughBufferTask:ht,straightThroughStringTask:fe}=(J(),Q(Ms));function E(m,C){this._plugins=C,this._executor=new r(m.baseDir,new i(m.maxConcurrentProcesses),C),this._trimmed=m.trimmed}(E.prototype=Object.create(s.prototype)).constructor=E,E.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},E.prototype.env=function(m,C){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=C,this},E.prototype.stashList=function(m){return this._runTask(ne(B(arguments)||{},u(m)&&m||[]),d(arguments))};function Qi(m,C,G,pe){return typeof G!="string"?n(`git.${m}() requires a string 'repoPath'`):C(G,h(pe,f),p(arguments))}E.prototype.clone=function(){return this._runTask(Qi("clone",We,...arguments),d(arguments))},E.prototype.mirror=function(){return this._runTask(Qi("mirror",tt,...arguments),d(arguments))},E.prototype.mv=function(m,C){return this._runTask(S(m,C),d(arguments))},E.prototype.checkoutLatestTag=function(m){var C=this;return this.pull(function(){C.tags(function(G,pe){C.checkout(pe.latest,m)})})},E.prototype.pull=function(m,C,G,pe){return this._runTask(v(h(m,f),h(C,f),p(arguments)),d(arguments))},E.prototype.fetch=function(m,C){return this._runTask(sr(h(m,f),h(C,f),p(arguments)),d(arguments))},E.prototype.silent=function(m){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},E.prototype.tags=function(m,C){return this._runTask(Fe(p(arguments)),d(arguments))},E.prototype.rebase=function(){return this._runTask(fe(["rebase",...p(arguments)]),d(arguments))},E.prototype.reset=function(m){return this._runTask(re(Y(m),p(arguments)),d(arguments))},E.prototype.revert=function(m){let C=d(arguments);return typeof m!="string"?this._runTask(n("Commit must be a string"),C):this._runTask(fe(["revert",...p(arguments,0,!0),m]),C)},E.prototype.addTag=function(m){let C=typeof m=="string"?ue(m):n("Git.addTag requires a tag name");return this._runTask(C,d(arguments))},E.prototype.addAnnotatedTag=function(m,C){return this._runTask(qe(m,C),d(arguments))},E.prototype.deleteLocalBranch=function(m,C,G){return this._runTask(Ge(m,typeof C=="boolean"?C:!1),d(arguments))},E.prototype.deleteLocalBranches=function(m,C,G){return this._runTask(et(m,typeof C=="boolean"?C:!1),d(arguments))},E.prototype.branch=function(m,C){return this._runTask(z(p(arguments)),d(arguments))},E.prototype.branchLocal=function(m){return this._runTask(te(),d(arguments))},E.prototype.raw=function(m){let C=!Array.isArray(m),G=[].slice.call(C?arguments:m,0);for(let Le=0;Le<G.length&&C;Le++)if(!c(G[Le])){G.splice(Le,G.length-Le);break}G.push(...p(arguments,0,!0));var pe=d(arguments);return G.length?this._runTask(fe(G,this._trimmed),pe):this._runTask(n("Raw: must supply one or more command to execute"),pe)},E.prototype.submoduleAdd=function(m,C,G){return this._runTask(_e(m,C),d(arguments))},E.prototype.submoduleUpdate=function(m,C){return this._runTask(lt(p(arguments,!0)),d(arguments))},E.prototype.submoduleInit=function(m,C){return this._runTask(rt(p(arguments,!0)),d(arguments))},E.prototype.subModule=function(m,C){return this._runTask(He(p(arguments)),d(arguments))},E.prototype.listRemote=function(){return this._runTask(O(p(arguments)),d(arguments))},E.prototype.addRemote=function(m,C,G){return this._runTask(k(m,C,p(arguments)),d(arguments))},E.prototype.removeRemote=function(m,C){return this._runTask(U(m),d(arguments))},E.prototype.getRemotes=function(m,C){return this._runTask(_(m===!0),d(arguments))},E.prototype.remote=function(m,C){return this._runTask(R(p(arguments)),d(arguments))},E.prototype.tag=function(m,C){let G=p(arguments);return G[0]!=="tag"&&G.unshift("tag"),this._runTask(fe(G),d(arguments))},E.prototype.updateServerInfo=function(m){return this._runTask(fe(["update-server-info"]),d(arguments))},E.prototype.pushTags=function(m,C){let G=x({remote:h(m,f)},p(arguments));return this._runTask(G,d(arguments))},E.prototype.rm=function(m){return this._runTask(fe(["rm","-f",...a(m)]),d(arguments))},E.prototype.rmKeepLocal=function(m){return this._runTask(fe(["rm","--cached",...a(m)]),d(arguments))},E.prototype.catFile=function(m,C){return this._catFile("utf-8",arguments)},E.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},E.prototype._catFile=function(m,C){var G=d(C),pe=["cat-file"],Le=C[0];if(typeof Le=="string")return this._runTask(n("Git.catFile: options must be supplied as an array of strings"),G);Array.isArray(Le)&&pe.push.apply(pe,Le);let Zr=m==="buffer"?ht(pe):fe(pe);return this._runTask(Zr,G)},E.prototype.diff=function(m,C){let G=f(m)?n("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):fe(["diff",...p(arguments)]);return this._runTask(G,d(arguments))},E.prototype.diffSummary=function(){return this._runTask(yt(p(arguments,1)),d(arguments))},E.prototype.applyPatch=function(m){let C=l(m)?W(a(m),p([].slice.call(arguments,1))):n("git.applyPatch requires one or more string patches as the first argument");return this._runTask(C,d(arguments))},E.prototype.revparse=function(){let m=["rev-parse",...p(arguments,!0)];return this._runTask(fe(m,!0),d(arguments))},E.prototype.clean=function(m,C,G){let pe=$(m),Le=pe&&m.join("")||h(m,f)||"",Zr=p([].slice.call(arguments,pe?1:0));return this._runTask(K(Le,Zr),d(arguments))},E.prototype.exec=function(m){let C={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(C)},E.prototype.clearQueue=function(){return this},E.prototype.checkIgnore=function(m,C){return this._runTask(xe(a(h(m,l,[]))),d(arguments))},E.prototype.checkIsRepo=function(m,C){return this._runTask(Dt(h(m,f)),d(arguments))},t.exports=E}});Bt();nt();var kp=class extends Qe{constructor(e,t){super(void 0,t),this.config=e}};nt();nt();var Ye=class extends Qe{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};At();na();Ea();$a();Va();Ba();Wa();Ka();function Ep(e){return e?[{type:"spawn.before",action(s,i){e.aborted&&i.kill(new Ye(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,i){function n(){i.kill(new Ye(void 0,"abort","Abort signal received"))}e.addEventListener("abort",n),i.spawned.on("close",()=>e.removeEventListener("abort",n))}}]:void 0}function Sp(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function Ap(e,t){if(Sp(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Ye(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Tp(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Ye(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Ye(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Ye(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function Op({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,s){return r.forEach((i,n)=>{let a=n<r.length?r[n+1]:"";e||Ap(i,a),t||Tp(i,s.method)}),r}}}A();function Rp(e){let t=Vt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}A();var ea=(0,Et.deferred)().promise;function Pp({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,n={close:(0,Et.deferred)(),closeTimeout:(0,Et.deferred)(),exit:(0,Et.deferred)(),exitTimeout:(0,Et.deferred)()},a=Promise.race([e===!1?ea:n.closeTimeout.promise,t===!1?ea:n.exitTimeout.promise]);return s(e,n.close,n.closeTimeout),s(t,n.exit,n.exitTimeout),{close(u){i=u,n.close.done()},exit(u){i=u,n.exit.done()},get exitCode(){return i},result:a}}function s(i,n,a){i!==!1&&(i===!0?n.promise:n.promise.then(()=>Is(i))).then(a.done)}return{type:"spawn.after",async action(i,{spawned:n,close:a}){let u=r(),c=!0,f=()=>void(c=!1);n.stdout?.on("data",f),n.stderr?.on("data",f),n.on("error",f),n.on("close",l=>u.close(l)),n.on("exit",l=>u.exit(l));try{await u.result,c&&await Is(50),a(u.exitCode)}catch(l){a(u.exitCode,l)}}}}A();var Ip="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",ta="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function Np(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function ra(e,t){if(e.length<1||e.length>2)throw new Ye(void 0,"binary",Ip);if(e.some(Np))if(t)console.warn(ta);else throw new Ye(void 0,"binary",ta);let[s,i]=e;return{binary:s,prefix:i}}function Lp(e,t=["git"],r=!1){let s=ra(Me(t),r);e.on("binary",i=>{s=ra(Me(i),r)}),e.append("spawn.binary",()=>s.binary),e.append("spawn.args",i=>s.prefix?[s.prefix,...i]:i)}nt();function Dp(e){return!!(e.exitCode&&e.stdErr.length)}function $p(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Fp(e=!1,t=Dp,r=$p){return(s,i)=>!e&&s||!t(i)?s:r(i)}function sa(e){return{type:"task.error",action(t,r){let s=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(s)?{error:new Qe(void 0,s.toString("utf-8"))}:{error:s}}}}A();var Vp=class{constructor(){this.plugins=new Set,this.events=new Mp}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Me(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let s=t,i=Object.freeze(Object.create(r));for(let n of this.plugins)n.type===e&&(s=n.action(s,i));return s}};A();function jp(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(n,a){return r.includes(a.method)?ha(n,t):n}},{type:"spawn.after",action(n,a){a.commands.includes(t)&&a.spawned.stderr?.on("data",u=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(u.toString("utf8"));c&&e({method:a.method,stage:Bp(c[1]),progress:H(c[2]),processed:H(c[3]),total:H(c[4])})})}}]}function Bp(e){return String(e.toLowerCase().split(" ",1))||"unknown"}A();function Up(e){let t=da(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function Gp({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(s,i){let n;function a(){n&&clearTimeout(n),n=setTimeout(c,e)}function u(){i.spawned.stdout?.off("data",a),i.spawned.stderr?.off("data",a),i.spawned.off("exit",u),i.spawned.off("close",u),n&&clearTimeout(n)}function c(){u(),i.kill(new Ye(void 0,"timeout","block timeout reached"))}r&&i.spawned.stdout?.on("data",a),t&&i.spawned.stderr?.on("data",a),i.spawned.on("exit",u),i.spawned.on("close",u),a()}}}Bt();function Wp(){return{type:"spawn.args",action(e){let t=[],r;function s(i){(r=r||[]).push(...i)}for(let i=0;i<e.length;i++){let n=e[i];if(yr(n)){s(An(n));continue}if(n==="--"){s(e.slice(i+1).flatMap(a=>yr(a)&&An(a)||a));break}t.push(n)}return r?[...t,"--",...r.map(String)]:t}}}A();var Hp=Cp();function qp(e,t){let r=new Vp,s=ya(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Ys(s.baseDir))throw new kp(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&r.add(Rp(s.config)),r.add(Op(s.unsafe)),r.add(Wp()),r.add(Pp(s.completion)),s.abort&&r.add(Ep(s.abort)),s.progress&&r.add(jp(s.progress)),s.timeout&&r.add(Gp(s.timeout)),s.spawnOptions&&r.add(Up(s.spawnOptions)),r.add(sa(Fp(!0))),s.errors&&r.add(sa(s.errors)),Lp(r,s.binary,s.unsafe?.allowUnsafeCustomBinary),new Hp(s,r)}At();var au=qp;y();import er from"fs";import{createRequire as $m}from"module";import Ne,{dirname as vc,join as Fm,win32 as Mm}from"path";import Lt from"process";import Vm from"fs/promises";import{fileURLToPath as jm}from"url";y();y();var zp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],fu=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Kp="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",pu="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",mi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},gi="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Yp={5:gi,"5module":gi+" export import",6:gi+" const class extends export import super"},Qp=/^in(stanceof)?$/,Xp=new RegExp("["+pu+"]"),Zp=new RegExp("["+pu+Kp+"]");function _i(e,t){for(var r=65536,s=0;s<t.length;s+=2){if(r+=t[s],r>e)return!1;if(r+=t[s+1],r>=e)return!0}return!1}function je(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Xp.test(String.fromCharCode(e)):t===!1?!1:_i(e,fu)}function ot(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Zp.test(String.fromCharCode(e)):t===!1?!1:_i(e,fu)||_i(e,zp)}var L=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Te(e,t){return new L(e,{beforeExpr:!0,binop:t})}var Oe={beforeExpr:!0},Ce={startsExpr:!0},wi={};function N(e,t){return t===void 0&&(t={}),t.keyword=e,wi[e]=new L(e,t)}var o={num:new L("num",Ce),regexp:new L("regexp",Ce),string:new L("string",Ce),name:new L("name",Ce),privateId:new L("privateId",Ce),eof:new L("eof"),bracketL:new L("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new L("]"),braceL:new L("{",{beforeExpr:!0,startsExpr:!0}),braceR:new L("}"),parenL:new L("(",{beforeExpr:!0,startsExpr:!0}),parenR:new L(")"),comma:new L(",",Oe),semi:new L(";",Oe),colon:new L(":",Oe),dot:new L("."),question:new L("?",Oe),questionDot:new L("?."),arrow:new L("=>",Oe),template:new L("template"),invalidTemplate:new L("invalidTemplate"),ellipsis:new L("...",Oe),backQuote:new L("`",Ce),dollarBraceL:new L("${",{beforeExpr:!0,startsExpr:!0}),eq:new L("=",{beforeExpr:!0,isAssign:!0}),assign:new L("_=",{beforeExpr:!0,isAssign:!0}),incDec:new L("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new L("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Te("||",1),logicalAND:Te("&&",2),bitwiseOR:Te("|",3),bitwiseXOR:Te("^",4),bitwiseAND:Te("&",5),equality:Te("==/!=/===/!==",6),relational:Te("</>/<=/>=",7),bitShift:Te("<</>>/>>>",8),plusMin:new L("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Te("%",10),star:Te("*",10),slash:Te("/",10),starstar:new L("**",{beforeExpr:!0}),coalesce:Te("??",1),_break:N("break"),_case:N("case",Oe),_catch:N("catch"),_continue:N("continue"),_debugger:N("debugger"),_default:N("default",Oe),_do:N("do",{isLoop:!0,beforeExpr:!0}),_else:N("else",Oe),_finally:N("finally"),_for:N("for",{isLoop:!0}),_function:N("function",Ce),_if:N("if"),_return:N("return",Oe),_switch:N("switch"),_throw:N("throw",Oe),_try:N("try"),_var:N("var"),_const:N("const"),_while:N("while",{isLoop:!0}),_with:N("with"),_new:N("new",{beforeExpr:!0,startsExpr:!0}),_this:N("this",Ce),_super:N("super",Ce),_class:N("class",Ce),_extends:N("extends",Oe),_export:N("export"),_import:N("import",Ce),_null:N("null",Ce),_true:N("true",Ce),_false:N("false",Ce),_in:N("in",{beforeExpr:!0,binop:7}),_instanceof:N("instanceof",{beforeExpr:!0,binop:7}),_typeof:N("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:N("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:N("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},ke=/\r\n?|\n|\u2028|\u2029/,Jp=new RegExp(ke.source,"g");function Tt(e){return e===10||e===13||e===8232||e===8233}function du(e,t,r){r===void 0&&(r=e.length);for(var s=t;s<r;s++){var i=e.charCodeAt(s);if(Tt(i))return s<r-1&&i===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var mu=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,he=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,gu=Object.prototype,ed=gu.hasOwnProperty,td=gu.toString,Ot=Object.hasOwn||function(e,t){return ed.call(e,t)},ou=Array.isArray||function(e){return td.call(e)==="[object Array]"},uu=Object.create(null);function at(e){return uu[e]||(uu[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Xe(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var rd=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Kt=function(t,r){this.line=t,this.column=r};Kt.prototype.offset=function(t){return new Kt(this.line,this.column+t)};var Vr=function(t,r,s){this.start=r,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function xu(e,t){for(var r=1,s=0;;){var i=du(e,s,t);if(i<0)return new Kt(r,t-s);++r,s=i}}var yi={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},cu=!1;function sd(e){var t={};for(var r in yi)t[r]=e&&Ot(e,r)?e[r]:yi[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!cu&&typeof console=="object"&&console.warn&&(cu=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
37
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ou(t.onToken)){var s=t.onToken;t.onToken=function(i){return s.push(i)}}return ou(t.onComment)&&(t.onComment=id(t,t.onComment)),t}function id(e,t){return function(r,s,i,n,a,u){var c={type:r?"Block":"Line",value:s,start:i,end:n};e.locations&&(c.loc=new Vr(this,a,u)),e.ranges&&(c.range=[i,n]),t.push(c)}}var Yt=1,Rt=2,Ci=4,_u=8,ki=16,yu=32,jr=64,vu=128,xt=256,Qt=512,Br=Yt|Rt|xt;function Ei(e,t){return Rt|(e?Ci:0)|(t?_u:0)}var Dr=0,Si=1,Je=2,bu=3,wu=4,Cu=5,oe=function(t,r,s){this.options=t=sd(t),this.sourceFile=t.sourceFile,this.keywords=at(Yp[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=mi[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=at(i);var n=(i?i+" ":"")+mi.strict;this.reservedWordsStrict=at(n),this.reservedWordsStrictBind=at(n+" "+mi.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
38
- `,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(ke).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Yt),this.regexpState=null,this.privateNameStack=[]},Be={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};oe.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Be.inFunction.get=function(){return(this.currentVarScope().flags&Rt)>0};Be.inGenerator.get=function(){return(this.currentVarScope().flags&_u)>0};Be.inAsync.get=function(){return(this.currentVarScope().flags&Ci)>0};Be.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Qt))return!1;if(r&Rt)return(r&Ci)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Be.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&jr)>0||this.options.allowSuperOutsideMethod};Be.allowDirectSuper.get=function(){return(this.currentThisScope().flags&vu)>0};Be.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Be.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Qt)||r&Rt&&!(r&ki))return!0}return!1};Be.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xt)>0};oe.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,i=0;i<t.length;i++)s=t[i](s);return s};oe.parse=function(t,r){return new this(r,t).parse()};oe.parseExpressionAt=function(t,r,s){var i=new this(s,t,r);return i.nextToken(),i.parseExpression()};oe.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(oe.prototype,Be);var me=oe.prototype,nd=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;me.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){he.lastIndex=e,e+=he.exec(this.input)[0].length;var t=nd.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){he.lastIndex=e+t[0].length;var r=he.exec(this.input),s=r.index+r[0].length,i=this.input.charAt(s);return i===";"||i==="}"||ke.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,he.lastIndex=e,e+=he.exec(this.input)[0].length,this.input[e]===";"&&e++}};me.eat=function(e){return this.type===e?(this.next(),!0):!1};me.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};me.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};me.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};me.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||ke.test(this.input.slice(this.lastTokEnd,this.start))};me.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};me.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};me.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};me.expect=function(e){this.eat(e)||this.unexpected()};me.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Ur=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};me.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};me.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,s=e.doubleProto;if(!t)return r>=0||s>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};me.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};me.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var w=oe.prototype;w.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var s=0,i=Object.keys(this.undefinedExports);s<i.length;s+=1){var n=i[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ai={kind:"loop"},ad={kind:"switch"};w.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;he.lastIndex=this.pos;var t=he.exec(this.input),r=this.pos+t[0].length,s=this.input.charCodeAt(r);if(s===91||s===92)return!0;if(e)return!1;if(s===123||s>55295&&s<56320)return!0;if(je(s,!0)){for(var i=r+1;ot(s=this.input.charCodeAt(i),!0);)++i;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(r,i);if(!Qp.test(n))return!0}return!1};w.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;he.lastIndex=this.pos;var e=he.exec(this.input),t=this.pos+e[0].length,r;return!ke.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ot(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};w.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;he.lastIndex=this.pos;var r=he.exec(this.input),s=this.pos+r[0].length;if(ke.test(this.input.slice(this.pos,s)))return!1;if(e){var i=s+5,n;if(this.input.slice(s,i)!=="using"||i===this.input.length||ot(n=this.input.charCodeAt(i))||n>55295&&n<56320)return!1;he.lastIndex=i;var a=he.exec(this.input);if(a&&ke.test(this.input.slice(i,i+a[0].length)))return!1}if(t){var u=s+2,c;if(this.input.slice(s,u)==="of"&&(u===this.input.length||!ot(c=this.input.charCodeAt(u))&&!(c>55295&&c<56320)))return!1}var f=this.input.charCodeAt(s);return je(f,!0)||f===92};w.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};w.isUsing=function(e){return this.isUsingKeyword(!1,e)};w.parseStatement=function(e,t,r){var s=this.type,i=this.startNode(),n;switch(this.isLet(e)&&(s=o._var,n="let"),s){case o._break:case o._continue:return this.parseBreakContinueStatement(i,s.keyword);case o._debugger:return this.parseDebuggerStatement(i);case o._do:return this.parseDoStatement(i);case o._for:return this.parseForStatement(i);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(i,!0);case o._if:return this.parseIfStatement(i);case o._return:return this.parseReturnStatement(i);case o._switch:return this.parseSwitchStatement(i);case o._throw:return this.parseThrowStatement(i);case o._try:return this.parseTryStatement(i);case o._const:case o._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(i,n);case o._while:return this.parseWhileStatement(i);case o._with:return this.parseWithStatement(i);case o.braceL:return this.parseBlock(!0,i);case o.semi:return this.parseEmptyStatement(i);case o._export:case o._import:if(this.options.ecmaVersion>10&&s===o._import){he.lastIndex=this.pos;var a=he.exec(this.input),u=this.pos+a[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===o._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var f=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(f)return t&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),f==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,f),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,h=this.parseExpression();return s===o.name&&h.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(i,l,h,e):this.parseExpressionStatement(i,h)}};w.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var i=this.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||e.label&&r))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};w.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};w.parseDoStatement=function(e){return this.next(),this.labels.push(Ai),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};w.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ai),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===o._var||this.type===o._const||r){var s=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(e,s,t)}var n=this.isContextual("let"),a=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var c=this.startNode();return this.next(),u==="await using"&&this.next(),this.parseVar(c,!0,u),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var f=this.containsEsc,l=new Ur,h=this.start,p=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(p.start===h&&!f&&p.type==="Identifier"&&p.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),n&&a&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,l),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))};w.parseForAfterInit=function(e,t,r){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};w.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,zt|(r?0:vi),!1,t)};w.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};w.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};w.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(ad),this.enterScope(0);for(var t,r=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var s=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};w.parseThrowStatement=function(e){return this.next(),ke.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var od=[];w.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?yu:0),this.checkLValPattern(e,t?wu:Je),this.expect(o.parenR),e};w.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};w.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};w.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ai),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};w.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};w.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};w.parseLabeledStatement=function(e,t,r,s){for(var i=0,n=this.labels;i<n.length;i+=1){var a=n[i];a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var f=this.labels[c];if(f.statementStart===e.start)f.statementStart=this.start,f.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};w.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};w.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var s=this.parseStatement(null);t.body.push(s)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};w.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};w.parseForIn=function(e,t){var r=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};w.parseVar=function(e,t,r,s){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(o.eq)?i.init=this.parseMaybeAssign(t):!s&&r==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==o._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!s&&i.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(o.comma))break}return e};w.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Si:Je,!1)};var zt=1,vi=2,ku=4;w.parseFunction=function(e,t,r,s,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===o.star&&t&vi&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&zt&&(e.id=t&ku&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&vi)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Si:Je:bu));var n=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ei(e.async,e.generator)),t&zt||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=u,this.finishNode(e,t&zt?"FunctionDeclaration":"FunctionExpression")};w.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};w.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),i=this.startNode(),n=!1;for(i.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(n&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&a.key.type==="PrivateIdentifier"&&ud(s,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};w.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),s="",i=!1,n=!1,a="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===o.star?u=!0:s="static"}if(r.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(o.star)&&(i=!0),!s&&!n&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:s=c)}if(s?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=s,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===o.parenL||a!=="method"||i||n){var f=!r.static&&$r(r,"constructor"),l=f&&e;f&&a!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=f?"constructor":a,this.parseClassMethod(r,i,n,l)}else this.parseClassField(r);return r};w.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};w.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};w.parseClassMethod=function(e,t,r,s){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&$r(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,r,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};w.parseClassField=function(e){return $r(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&$r(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope(Qt|jr),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};w.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(xt|jr);this.type!==o.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};w.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Je,!1)):(t===!0&&this.unexpected(),e.id=null)};w.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};w.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};w.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,i=s===0?null:this.privateNameStack[s-1],n=0;n<r.length;++n){var a=r[n];Ot(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}};function ud(e,t){var r=t.key.name,s=e[r],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),s==="iget"&&i==="iset"||s==="iset"&&i==="iget"||s==="sget"&&i==="sset"||s==="sset"&&i==="sget"?(e[r]="true",!1):s?!0:(e[r]=i,!1)}function $r(e,t){var r=e.computed,s=e.key;return!r&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}w.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};w.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,s=e.specifiers;r<s.length;r+=1){var i=s[r];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};w.parseExportDeclaration=function(e){return this.parseStatement(null)};w.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,zt|ku,!1,e)}else if(this.type===o._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};w.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Ot(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};w.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var s=0,i=t.properties;s<i.length;s+=1){var n=i[s];this.checkPatternExport(e,n)}else if(r==="ArrayPattern")for(var a=0,u=t.elements;a<u.length;a+=1){var c=u[a];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};w.checkVariableExport=function(e,t){if(e)for(var r=0,s=t;r<s.length;r+=1){var i=s[r];this.checkPatternExport(e,i.id)}};w.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};w.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};w.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};w.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=od,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};w.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Je),this.finishNode(e,"ImportSpecifier")};w.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Je),this.finishNode(e,"ImportDefaultSpecifier")};w.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Je),this.finishNode(e,"ImportNamespaceSpecifier")};w.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};w.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},r=!0;!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var s=this.parseImportAttribute(),i=s.key.type==="Identifier"?s.key.name:s.key.value;Ot(t,i)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(s)}return e};w.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};w.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return rd.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};w.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};w.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Pe=oe.prototype;Pe.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var s=0,i=e.properties;s<i.length;s+=1){var n=i[s];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};Pe.toAssignableList=function(e,t){for(var r=e.length,s=0;s<r;s++){var i=e[s];i&&this.toAssignable(i,t)}if(r){var n=e[r-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return e};Pe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Pe.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Pe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};Pe.parseBindingList=function(e,t,r,s){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(o.comma),t&&this.type===o.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(s))}return i};Pe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Pe.parseBindingListItem=function(e){return e};Pe.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return r;var s=this.startNodeAt(e,t);return s.left=r,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};Pe.checkLValSimple=function(e,t,r){t===void 0&&(t=Dr);var s=t!==Dr;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===Je&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(Ot(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==Cu&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};Pe.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Dr),e.type){case"ObjectPattern":for(var s=0,i=e.properties;s<i.length;s+=1){var n=i[s];this.checkLValInnerPattern(n,t,r)}break;case"ArrayPattern":for(var a=0,u=e.elements;a<u.length;a+=1){var c=u[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};Pe.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Dr),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var $e=function(t,r,s,i,n){this.token=t,this.isExpr=!!r,this.preserveSpace=!!s,this.override=i,this.generator=!!n},q={b_stat:new $e("{",!1),b_expr:new $e("{",!0),b_tmpl:new $e("${",!1),p_stat:new $e("(",!1),p_expr:new $e("(",!0),q_tmpl:new $e("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new $e("function",!1),f_expr:new $e("function",!0),f_expr_gen:new $e("function",!0,!1,null,!0),f_gen:new $e("function",!1,!1,null,!0)},Pt=oe.prototype;Pt.initialContext=function(){return[q.b_stat]};Pt.curContext=function(){return this.context[this.context.length-1]};Pt.braceIsBlock=function(e){var t=this.curContext();return t===q.f_expr||t===q.f_stat?!0:e===o.colon&&(t===q.b_stat||t===q.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?ke.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===q.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};Pt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Pt.updateContext=function(e){var t,r=this.type;r.keyword&&e===o.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};Pt.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===q.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?q.b_stat:q.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(q.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?q.p_stat:q.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==q.p_stat)&&!(e===o._return&&ke.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===q.b_stat)?this.context.push(q.f_expr):this.context.push(q.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===q.q_tmpl?this.context.pop():this.context.push(q.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===q.f_expr?this.context[t]=q.f_expr_gen:this.context[t]=q.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var T=oe.prototype;T.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s=e.key,i;switch(s.type){case"Identifier":i=s.name;break;case"Literal":i=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&n==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var a=t[i];if(a){var u;n==="init"?u=this.strict&&a.init||a.get||a.set:u=a.init||a[n],u&&this.raiseRecoverable(s.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[n]=!0}};T.parseExpression=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===o.comma){var n=this.startNodeAt(r,s);for(n.expressions=[i];this.eat(o.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return i};T.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,i=-1,n=-1,a=-1;t?(i=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ur,s=!0);var u=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var f=this.parseMaybeConditional(e,t);if(r&&(f=r.call(this,f,u,c)),this.type.isAssign){var l=this.startNodeAt(u,c);return l.operator=this.value,this.type===o.eq&&(f=this.toAssignable(f,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=f.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(f):this.checkLValSimple(f),l.left=f,this.next(),l.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(l,"AssignmentExpression")}else s&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),n>-1&&(t.trailingComma=n),f};T.parseMaybeConditional=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(o.question)){var n=this.startNodeAt(r,s);return n.test=i,n.consequent=this.parseMaybeAssign(),this.expect(o.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return i};T.parseExprOps=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,s,-1,e)};T.parseExprOp=function(e,t,r,s,i){var n=this.type.binop;if(n!=null&&(!i||this.type!==o._in)&&n>s){var a=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(n=o.logicalAND.binop);var c=this.value;this.next();var f=this.start,l=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),f,l,n,i),p=this.buildBinary(t,r,e,h,c,a||u);return(a&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,r,s,i)}return e};T.buildBinary=function(e,t,r,s,i,n){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=i,a.right=s,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")};T.parseMaybeUnary=function(e,t,r,s){var i=this.start,n=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(s),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,s),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Eu(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&bi(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(a=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var f=this.startNodeAt(i,n);f.operator=this.value,f.prefix=!1,f.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(f,"UpdateExpression")}}if(!r&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,n,a,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return a};function Eu(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Eu(e.expression)}function bi(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&bi(e.expression)||e.type==="ParenthesizedExpression"&&bi(e.expression)}T.parseExprSubscripts=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var n=this.parseSubscripts(i,r,s,!1,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n};T.parseSubscripts=function(e,t,r,s,i){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var u=this.parseSubscript(e,t,r,s,n,a,i);if(u.optional&&(a=!0),u===e||u.type==="ArrowFunctionExpression"){if(a){var c=this.startNodeAt(t,r);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};T.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};T.parseSubscriptAsyncArrow=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,s)};T.parseSubscript=function(e,t,r,s,i,n,a){var u=this.options.ecmaVersion>=11,c=u&&this.eat(o.questionDot);s&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var f=this.eat(o.bracketL);if(f||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var l=this.startNodeAt(t,r);l.object=e,f?(l.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!f,u&&(l.optional=c),e=this.finishNode(l,"MemberExpression")}else if(!s&&this.eat(o.parenL)){var h=new Ur,p=this.yieldPos,d=this.awaitPos,B=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var W=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,h);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=B,this.parseSubscriptAsyncArrow(t,r,W,a);this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=B||this.awaitIdentPos;var z=this.startNodeAt(t,r);z.callee=e,z.arguments=W,u&&(z.optional=c),e=this.finishNode(z,"CallExpression")}else if(this.type===o.backQuote){(c||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var te=this.startNodeAt(t,r);te.tag=e,te.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(te,"TaggedTemplateExpression")}return e};T.parseExprAtom=function(e,t,r){this.type===o.slash&&this.readRegexp();var s,i=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(s,"Super");case o._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case o.name:var n=this.start,a=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(q.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[c],!0,t)}return c;case o.regexp:var f=this.value;return s=this.parseLiteral(f.value),s.regex={pattern:f.pattern,flags:f.flags},s;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return s=this.startNode(),s.value=this.type===o._null?null:this.type===o._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case o.parenL:var l=this.start,h=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),h;case o.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case o.braceL:return this.overrideContext(q.b_expr),this.parseObj(!1,e);case o._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};T.parseExprAtomDefault=function(){this.unexpected()};T.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};T.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};T.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};T.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};T.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};T.shouldParseArrow=function(e){return!this.canInsertSemicolon()};T.parseParenAndDistinguishExpression=function(e,t){var r=this.start,s=this.startLoc,i,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,u=this.startLoc,c=[],f=!0,l=!1,h=new Ur,p=this.yieldPos,d=this.awaitPos,B;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(f?f=!1:this.expect(o.comma),n&&this.afterTrailingComma(o.parenR,!0)){l=!0;break}else if(this.type===o.ellipsis){B=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var W=this.lastTokEnd,z=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(c)&&this.eat(o.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(r,s,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),B&&this.unexpected(B),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,c.length>1?(i=this.startNodeAt(a,u),i.expressions=c,this.finishNodeAt(i,"SequenceExpression",W,z)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var te=this.startNodeAt(r,s);return te.expression=i,this.finishNode(te,"ParenthesizedExpression")}else return i};T.parseParenItem=function(e){return e};T.parseParenArrowList=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,s)};var cd=[];T.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,i,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=cd,this.finishNode(e,"NewExpression")};T.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
39
- `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
40
- `),cooked:this.value},this.next(),r.tail=this.type===o.backQuote,this.finishNode(r,"TemplateElement")};T.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(r.quasis=[s];!s.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(o.braceR),r.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};T.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!ke.test(this.input.slice(this.lastTokEnd,this.start))};T.parseObj=function(e,t){var r=this.startNode(),s=!0,i={};for(r.properties=[],this.next();!this.eat(o.braceR);){if(s)s=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,i,t),r.properties.push(n)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};T.parseProperty=function(e,t){var r=this.startNode(),s,i,n,a;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(n=this.start,a=this.startLoc),e||(s=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(r),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(r)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,s,i,n,a,t,u),this.finishNode(r,"Property")};T.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};T.parsePropertyValue=function(e,t,r,s,i,n,a,u){(r||s)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,s),e.kind="init"):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((r||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,n,this.copyNode(e.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};T.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};T.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};T.parseMethod=function(e,t,r){var s=this.startNode(),i=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ei(t,s.generator)|jr|(r?vu:0)),this.expect(o.parenL),s.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=i,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(s,"FunctionExpression")};T.parseArrowExpression=function(e,t,r,s){var i=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(Ei(r,!1)|ki),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=i,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};T.parseFunctionBody=function(e,t,r,s){var i=t&&this.type!==o.braceL,n=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(a=this.strictDirective(this.end),a&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!n&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Cu),e.body=this.parseBlock(!1,void 0,a&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};T.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var s=r[t];if(s.type!=="Identifier")return!1}return!0};T.checkParams=function(e,t){for(var r=Object.create(null),s=0,i=e.params;s<i.length;s+=1){var n=i[s];this.checkLValInnerPattern(n,Si,t?null:r)}};T.parseExprList=function(e,t,r,s){for(var i=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var a=void 0;r&&this.type===o.comma?a=null:this.type===o.ellipsis?(a=this.parseSpread(s),s&&this.type===o.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):a=this.parseMaybeAssign(!1,s),i.push(a)}return i};T.checkUnreserved=function(e){var t=e.start,r=e.end,s=e.name;if(this.inGenerator&&s==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Br)&&s==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(s==="arguments"||s==="await")&&this.raise(t,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(t,"Unexpected keyword '"+s+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(s)&&(!this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+s+"' is reserved"))}};T.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};T.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};T.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};T.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};T.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Fr=oe.prototype;Fr.raise=function(e,t){var r=xu(this.input,e);t+=" ("+r.line+":"+r.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var s=new SyntaxError(t);throw s.pos=e,s.loc=r,s.raisedAt=this.pos,s};Fr.raiseRecoverable=Fr.raise;Fr.curPosition=function(){if(this.options.locations)return new Kt(this.curLine,this.pos-this.lineStart)};var ut=oe.prototype,ld=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ut.enterScope=function(e){this.scopeStack.push(new ld(e))};ut.exitScope=function(){this.scopeStack.pop()};ut.treatFunctionsAsVarInScope=function(e){return e.flags&Rt||!this.inModule&&e.flags&Yt};ut.declareName=function(e,t,r){var s=!1;if(t===Je){var i=this.currentScope();s=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Yt&&delete this.undefinedExports[e]}else if(t===wu){var n=this.currentScope();n.lexical.push(e)}else if(t===bu){var a=this.currentScope();this.treatFunctionsAsVar?s=a.lexical.indexOf(e)>-1:s=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var c=this.scopeStack[u];if(c.lexical.indexOf(e)>-1&&!(c.flags&yu&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=!0;break}if(c.var.push(e),this.inModule&&c.flags&Yt&&delete this.undefinedExports[e],c.flags&Br)break}s&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};ut.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};ut.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ut.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Br|Qt|xt))return t}};ut.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Br|Qt|xt)&&!(t.flags&ki))return t}};var Gr=function(t,r,s){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new Vr(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},Xt=oe.prototype;Xt.startNode=function(){return new Gr(this,this.start,this.startLoc)};Xt.startNodeAt=function(e,t){return new Gr(this,e,t)};function Su(e,t,r,s){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=r),e}Xt.finishNode=function(e,t){return Su.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Xt.finishNodeAt=function(e,t,r,s){return Su.call(this,e,t,r,s)};Xt.copyNode=function(e){var t=new Gr(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var hd="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",Au="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Tu=Au+" Extended_Pictographic",Ou=Tu,Ru=Ou+" EBase EComp EMod EPres ExtPict",Pu=Ru,fd=Pu,pd={9:Au,10:Tu,11:Ou,12:Ru,13:Pu,14:fd},dd="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",md={9:"",10:"",11:"",12:"",13:"",14:dd},lu="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Iu="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Nu=Iu+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Lu=Nu+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Du=Lu+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",$u=Du+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",gd=$u+" "+hd,xd={9:Iu,10:Nu,11:Lu,12:Du,13:$u,14:gd},Fu={};function _d(e){var t=Fu[e]={binary:at(pd[e]+" "+lu),binaryOfStrings:at(md[e]),nonBinary:{General_Category:at(lu),Script:at(xd[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(Lr=0,xi=[9,10,11,12,13,14];Lr<xi.length;Lr+=1)hu=xi[Lr],_d(hu);var hu,Lr,xi,b=oe.prototype,Mr=function(t,r){this.parent=t,this.base=r||this};Mr.prototype.separatedFrom=function(t){for(var r=this;r;r=r.parent)for(var s=t;s;s=s.parent)if(r.base===s.base&&r!==s)return!0;return!1};Mr.prototype.sibling=function(){return new Mr(this.parent,this.base)};var Ue=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Fu[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ue.prototype.reset=function(t,r,s){var i=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};Ue.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Ue.prototype.at=function(t,r){r===void 0&&(r=!1);var s=this.source,i=s.length;if(t>=i)return-1;var n=s.charCodeAt(t);if(!(r||this.switchU)||n<=55295||n>=57344||t+1>=i)return n;var a=s.charCodeAt(t+1);return a>=56320&&a<=57343?(n<<10)+a-56613888:n};Ue.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var s=this.source,i=s.length;if(t>=i)return i;var n=s.charCodeAt(t),a;return!(r||this.switchU)||n<=55295||n>=57344||t+1>=i||(a=s.charCodeAt(t+1))<56320||a>57343?t+1:t+2};Ue.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Ue.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Ue.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Ue.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};Ue.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var s=this.pos,i=0,n=t;i<n.length;i+=1){var a=n[i],u=this.at(s,r);if(u===-1||u!==a)return!1;s=this.nextIndex(s,r)}return this.pos=s,!0};b.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,s=!1,i=!1,n=0;n<r.length;n++){var a=r.charAt(n);t.indexOf(a)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(a,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(s=!0),a==="v"&&(i=!0)}this.options.ecmaVersion>=15&&s&&i&&this.raise(e.start,"Invalid regular expression flag")};function yd(e){for(var t in e)return!0;return!1}b.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&yd(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};b.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var s=r[t];e.groupNames[s]||e.raise("Invalid named capture referenced")}};b.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Mr(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};b.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};b.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};b.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};b.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};b.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};b.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var s=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<s&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};b.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};b.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};b.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),s=e.eat(45);if(r||s){for(var i=0;i<r.length;i++){var n=r.charAt(i);r.indexOf(n,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(s){var a=this.regexp_eatModifiers(e);!r&&!a&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<a.length;u++){var c=a.charAt(u);(a.indexOf(c,u+1)>-1||r.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};b.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};b.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&vd(r);)t+=Xe(r),e.advance();return t};function vd(e){return e===105||e===109||e===115}b.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};b.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};b.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Mu(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Mu(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}b.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!Mu(r);)e.advance();return e.pos!==t};b.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};b.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var s=0,i=r;s<i.length;s+=1){var n=i[s];n.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};b.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};b.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Xe(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Xe(e.lastIntValue);return!0}return!1};b.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,s=e.current(r);return e.advance(r),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(s=e.lastIntValue),bd(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function bd(e){return je(e,!0)||e===36||e===95}b.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,s=e.current(r);return e.advance(r),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(s=e.lastIntValue),wd(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function wd(e){return ot(e,!0)||e===36||e===95||e===8204||e===8205}b.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};b.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};b.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};b.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};b.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};b.regexp_eatZero=function(e){return e.current()===48&&!Wr(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};b.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};b.regexp_eatControlLetter=function(e){var t=e.current();return Vu(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Vu(e){return e>=65&&e<=90||e>=97&&e<=122}b.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(s&&i>=55296&&i<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}e.pos=n,e.lastIntValue=i}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Cd(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Cd(e){return e>=0&&e<=1114111}b.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};b.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var ju=0,Ze=1,Re=2;b.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(kd(t))return e.lastIntValue=-1,e.advance(),Ze;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&s===Re&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return ju};function kd(e){return e===100||e===68||e===115||e===83||e===119||e===87}b.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,s),Ze}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return ju};b.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){Ot(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};b.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Ze;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Re;e.raise("Invalid property name")};b.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Bu(t=e.current());)e.lastStringValue+=Xe(t),e.advance();return e.lastStringValue!==""};function Bu(e){return Vu(e)||e===95}b.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ed(t=e.current());)e.lastStringValue+=Xe(t),e.advance();return e.lastStringValue!==""};function Ed(e){return Bu(e)||Wr(e)}b.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};b.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===Re&&e.raise("Negated character class may contain strings"),!0}return!1};b.regexp_classContents=function(e){return e.current()===93?Ze:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Ze)};b.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};b.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||Wu(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};b.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};b.regexp_classSetExpression=function(e){var t=Ze,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===Re&&(t=Re);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==Re&&(t=Ze);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===Re&&(t=Re)}};b.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return r!==-1&&s!==-1&&r>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};b.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Ze:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};b.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return r&&s===Re&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};b.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};b.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Re&&(t=Re);return t};b.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Ze:Re};b.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Sd(r)||Ad(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Sd(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Ad(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}b.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Td(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Td(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}b.regexp_eatClassControlLetter=function(e){var t=e.current();return Wr(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};b.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};b.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Wr(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function Wr(e){return e>=48&&e<=57}b.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Uu(r=e.current());)e.lastIntValue=16*e.lastIntValue+Gu(r),e.advance();return e.pos!==t};function Uu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Gu(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}b.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};b.regexp_eatOctalDigit=function(e){var t=e.current();return Wu(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Wu(e){return e>=48&&e<=55}b.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var i=e.current();if(!Uu(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+Gu(i),e.advance()}return!0};var Ti=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Vr(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},I=oe.prototype;I.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ti(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};I.getToken=function(){return this.next(),new Ti(this)};typeof Symbol<"u"&&(I[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});I.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};I.readToken=function(e){return je(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};I.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};I.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var s=void 0,i=t;(s=du(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};I.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Tt(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};I.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&mu.test(String.fromCharCode(e)))++this.pos;else break e}}};I.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};I.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};I.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};I.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,s=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,s=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,r+1):this.finishOp(s,r)};I.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};I.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};I.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||ke.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};I.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(o.assign,r+1):this.finishOp(o.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(o.relational,r))};I.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};I.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};I.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),je(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Xe(t)+"'")};I.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Xe(e)+"'")};I.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};I.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(ke.test(s)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var n=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new Ue(this));u.reset(r,i,a),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var c=null;try{c=new RegExp(i,a)}catch{}return this.finishToken(o.regexp,{pattern:i,flags:a,value:c})};I.readInt=function(e,t,r){for(var s=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,n=this.pos,a=0,u=0,c=0,f=t??1/0;c<f;++c,++this.pos){var l=this.input.charCodeAt(this.pos),h=void 0;if(s&&l===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=l;continue}if(l>=97?h=l-97+10:l>=65?h=l-65+10:l>=48&&l<=57?h=l-48:h=1/0,h>=e)break;u=l,a=a*e+h}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:a};function Od(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Hu(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}I.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=Hu(this.input.slice(t,this.pos)),++this.pos):je(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,r)};I.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&s===110){var i=Hu(this.input.slice(t,this.pos));return++this.pos,je(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),s===46&&!r&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!r&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),je(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=Od(this.input.slice(t,this.pos),r);return this.finishToken(o.num,n)};I.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};I.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Tt(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(o.string,t)};var qu={};I.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===qu)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};I.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qu;this.raise(e,t)};I.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===o.template||this.type===o.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Tt(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
41
- `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};I.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
42
- `&&++this.pos;case`
43
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};I.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
44
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Xe(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);return i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Tt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};I.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};I.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(ot(i,s))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?je:ot)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Xe(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};I.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=wi[e]),this.finishToken(t,e)};var Rd="8.15.0";oe.acorn={Parser:oe,version:Rd,defaultOptions:yi,Position:Kt,SourceLocation:Vr,getLineInfo:xu,Node:Gr,TokenType:L,tokTypes:o,keywordTypes:wi,TokContext:$e,tokContexts:q,isIdentifierChar:ot,isIdentifierStart:je,Token:Ti,isNewLine:Tt,lineBreak:ke,lineBreakG:Jp,nonASCIIwhitespace:mu};import{builtinModules as Mi,createRequire as cx}from"module";import Vd,{realpathSync as jd,statSync as Vi,promises as hx}from"fs";y();var j0=String.fromCharCode;var Pd=/\/$|\/\?|\/#/,Id=/^\.?\//;function Nd(e="",t){return t?Pd.test(e):e.endsWith("/")}function Ld(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Nd(e,!0))return e||"/";let r=e,s="",i=e.indexOf("#");if(i!==-1&&(r=e.slice(0,i),s=e.slice(i),!r))return s;let[n,...a]=r.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+s}function Dd(e){return e&&e!=="/"}function Oi(e,...t){let r=e||"";for(let s of t.filter(i=>Dd(i)))if(r){let i=s.replace(Id,"");r=Ld(r)+i}else r=s;return r}var B0=Symbol.for("ufo:protocolRelative");y();y();var $d=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var Ri=function(e){return $d.test(e)};import{fileURLToPath as D,URL as ie,pathToFileURL as Kr}from"url";import ct from"assert";import _t from"process";import ji,{dirname as _x}from"path";import Bd from"v8";import{format as Ud,inspect as Di}from"util";var ac=new Set(Mi);function $i(e){return e.replace(/\\/g,"/")}var Gd={}.hasOwnProperty,Wd=/^([A-Z][a-z\d]*)+$/,Hd=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ge={};function Pi(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var oc=new Map,qd="__node_internal_",zu;ge.ERR_INVALID_ARG_TYPE=Ie("ERR_INVALID_ARG_TYPE",(e,t,r)=>{ct(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let s="The ";if(e.endsWith(" argument"))s+=`${e} `;else{let u=e.includes(".")?"property":"argument";s+=`"${e}" ${u} `}s+="must be ";let i=[],n=[],a=[];for(let u of t)ct(typeof u=="string","All expected entries have to be of type string"),Hd.has(u)?i.push(u.toLowerCase()):Wd.exec(u)===null?(ct(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=i.indexOf("object");u!==-1&&(i.slice(u,1),n.push("Object"))}return i.length>0&&(s+=`${i.length>1?"one of type":"of type"} ${Pi(i,"or")}`,(n.length>0||a.length>0)&&(s+=" or ")),n.length>0&&(s+=`an instance of ${Pi(n,"or")}`,a.length>0&&(s+=" or ")),a.length>0&&(a.length>1?s+=`one of ${Pi(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(s+="an "),s+=`${a[0]}`)),s+=`. Received ${Xd(r)}`,s},TypeError);ge.ERR_INVALID_MODULE_SPECIFIER=Ie("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);ge.ERR_INVALID_PACKAGE_CONFIG=Ie("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);ge.ERR_INVALID_PACKAGE_TARGET=Ie("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,i=void 0)=>{let n=typeof r=="string"&&!s&&r.length>0&&!r.startsWith("./");return t==="."?(ct(s===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`},Error);ge.ERR_MODULE_NOT_FOUND=Ie("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);ge.ERR_NETWORK_IMPORT_DISALLOWED=Ie("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);ge.ERR_PACKAGE_IMPORT_NOT_DEFINED=Ie("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError);ge.ERR_PACKAGE_PATH_NOT_EXPORTED=Ie("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);ge.ERR_UNSUPPORTED_DIR_IMPORT=Ie("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);ge.ERR_UNSUPPORTED_RESOLVE_REQUEST=Ie("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);ge.ERR_UNKNOWN_FILE_EXTENSION=Ie("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ge.ERR_INVALID_ARG_VALUE=Ie("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let s=Di(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${s}`},TypeError);function Ie(e,t,r){return oc.set(e,t),zd(r,e)}function zd(e,t){return r;function r(...s){let i=Error.stackTraceLimit;Fi()&&(Error.stackTraceLimit=0);let n=new e;Fi()&&(Error.stackTraceLimit=i);let a=Qd(t,s,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Yd(n),n.code=t,n}}function Fi(){try{if(Bd.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Gd.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Kd(e){let t=qd+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Yd=Kd(function(e){let t=Fi();return t&&(zu=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=zu),e});function Qd(e,t,r){let s=oc.get(e);if(ct(s!==void 0,"expected `message` to be found"),typeof s=="function")return ct(s.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`),Reflect.apply(s,r,t);let i=/%[dfijoOs]/g,n=0;for(;i.exec(s)!==null;)n++;return ct(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?s:(t.unshift(s),Reflect.apply(Ud,null,t))}function Xd(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${Di(e,{depth:-1})}`;let t=Di(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Zt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Zd}=ge,Ku=new Map;function uc(e,{base:t,specifier:r}){let s=Ku.get(e);if(s)return s;let i;try{i=Vd.readFileSync(ji.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let a;try{a=JSON.parse(i)}catch(u){let c=u,f=new Zd(e,(t?`"${r}" from `:"")+D(t||r),c.message);throw f.cause=c,f}n.exists=!0,Zt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Zt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Zt.call(a,"exports")&&(n.exports=a.exports),Zt.call(a,"imports")&&(n.imports=a.imports),Zt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return Ku.set(e,n),n}function Bi(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let i=uc(D(t),{specifier:e});if(i.exists)return i;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:D(t),exists:!1,type:"none"}}function Yu(e){return Bi(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:Jd}=ge,em={}.hasOwnProperty,tm={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function rm(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var Qu={__proto__:null,"data:":sm,"file:":nm,"http:":Xu,"https:":Xu,"node:"(){return"builtin"}};function sm(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return rm(t)}function im(e){let t=e.pathname,r=t.length;for(;r--;){let s=t.codePointAt(r);if(s===47)return"";if(s===46)return t.codePointAt(r-1)===47?"":t.slice(r)}return""}function nm(e,t,r){let s=im(e);if(s===".js"){let a=Yu(e);return a!=="none"?a:"commonjs"}if(s===""){let a=Yu(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let i=tm[s];if(i)return i;if(r)return;let n=D(e);throw new Jd(s,n)}function Xu(){}function am(e,t){let r=e.protocol;return em.call(Qu,r)&&Qu[r](e,t,!0)||null}var Hr=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:bx,ERR_INVALID_MODULE_SPECIFIER:Yr,ERR_INVALID_PACKAGE_CONFIG:cc,ERR_INVALID_PACKAGE_TARGET:om,ERR_MODULE_NOT_FOUND:Ui,ERR_PACKAGE_IMPORT_NOT_DEFINED:um,ERR_PACKAGE_PATH_NOT_EXPORTED:cm,ERR_UNSUPPORTED_DIR_IMPORT:lm,ERR_UNSUPPORTED_RESOLVE_REQUEST:Zu}=ge,lc={}.hasOwnProperty,Ju=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,ec=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,hm=/^\.|%|\\/,qr=/\*/g,fm=/%2f|%5c/i,tc=new Set,pm=/[/\\]{2}/;function rc(e,t,r,s,i,n,a){if(_t.noDeprecation)return;let u=D(s),c=pm.exec(a?e:t)!==null;_t.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${D(n)}`:""}.`,"DeprecationWarning","DEP0166")}function sc(e,t,r,s){if(_t.noDeprecation||am(e,{parentURL:r.href})!=="module")return;let n=D(e.href),a=D(new ie(".",t)),u=D(r);s?ji.resolve(a,s)!==n&&_t.emitWarning(`Package ${a} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}.
45
- Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):_t.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}.
46
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function hc(e){try{return Vi(e)}catch{}}function Ii(e){let t=Vi(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function dm(e,t,r){let s;if(t.main!==void 0){if(s=new ie(t.main,e),Ii(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new ie(a[u],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new ie(i[n],e),!Ii(s));)s=void 0;if(s)return sc(s,e,r,t.main),s;throw new Ui(D(new ie(".",e)),D(r))}function mm(e,t,r){if(fm.exec(e.pathname)!==null)throw new Yr(e.pathname,'must not include encoded "/" or "\\" characters',D(t));let s;try{s=D(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=hc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new lm(s,D(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Ui(s||e.pathname,t&&D(t),!0);throw n.url=String(e),n}{let n=jd(s),{search:a,hash:u}=e;e=Kr(n+(s.endsWith(ji.sep)?"/":"")),e.search=a,e.hash=u}return e}function gm(e,t,r){return new um(e,t&&D(new ie(".",t)),D(r))}function Ni(e,t,r){return new cm(D(new ie(".",t)),e,r&&D(r))}function xm(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${D(r)}`;throw new Yr(e,n,i&&D(i))}function Jt(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new om(D(new ie(".",r)),e,t,s,i&&D(i))}function _m(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw Jt(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new ie(e),p=!0}catch{}if(!p){let d=n?Hr.call(qr,e,()=>t):e+t;return pc(d,s,c)}}throw Jt(r,e,s,a,i)}if(Ju.exec(e.slice(2))!==null)if(ec.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!0)}}else throw Jt(r,e,s,a,i);let f=new ie(e,s),l=f.pathname,h=new ie(".",s).pathname;if(!l.startsWith(h))throw Jt(r,e,s,a,i);if(t==="")return f;if(Ju.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(ec.exec(t)===null){if(!u){let d=n?Hr.call(qr,e,()=>t):e;rc(d,p,r,s,a,i,!1)}}else xm(p,r,s,a,i)}return n?new ie(Hr.call(qr,f.href,()=>t)):new ie(t,f)}function ym(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function It(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return _m(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=It(e,p,r,s,i,n,a,u,c)}catch(B){let W=B;if(l=W,W.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw B}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(ym(h))throw new cc(D(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=It(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw Jt(s,t,e,a,i)}function vm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new cc(D(t),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function bm(e,t,r){if(_t.noDeprecation)return;let s=D(t);tc.has(s+"|"+e)||(tc.add(s+"|"+e),_t.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${D(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function ic(e,t,r,s,i){let n=r.exports;if(vm(n,e,s)&&(n={".":n}),lc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=It(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Ni(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&bm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=It(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Ni(t,e,s);return h}throw Ni(t,e,s)}function fc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function wm(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Yr(e,n,D(t))}let s,i=Bi(t);if(i.exists){s=Kr(i.pjsonPath);let n=i.imports;if(n)if(lc.call(n,e)&&!e.includes("*")){let a=It(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&fc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=It(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw gm(e,s,t)}function Cm(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(hm.exec(n)!==null&&(s=!1),!s)throw new Yr(e,"is not a valid package name",D(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function pc(e,t,r){if(Mi.includes(e))return new ie("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Cm(e,t),a=Bi(t);if(a.exists){let l=Kr(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return ic(l,i,a,t,r)}let u=new ie("./node_modules/"+s+"/package.json",t),c=D(u),f;do{let l=hc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new ie((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=D(u);continue}let h=uc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?ic(u,i,h,t,r):i==="."?dm(u,h,t):new ie(i,u)}while(c.length!==f.length);throw new Ui(s,D(t),!1)}function km(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Em(e){return e===""?!1:e[0]==="/"?!0:km(e)}function Sm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Em(e))try{u=new ie(e,t)}catch(c){let f=new Zu(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=wm(e,t,r);else try{u=new ie(e)}catch(c){if(a&&!Mi.includes(e)){let f=new Zu(e,t);throw f.cause=c,f}u=pc(e,t,r)}return ct(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:mm(u,t)}function zr(e){return typeof e=="string"&&!e.startsWith("file://")?$i(e):$i(D(e))}function Li(e){return Kr(zr(e)).toString()}function Am(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:ac.has(e)?"node:"+e:"file://"+encodeURI($i(e))}var Tm=new Set(["node","import"]),Om=[".mjs",".cjs",".js",".json"],Rm=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function nc(e,t,r){try{return Sm(e,t,r)}catch(s){if(!Rm.has(s?.code))throw s}}function Pm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=zr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(ac.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=zr(e)),Ri(e))try{if(Vi(e).isFile())return Li(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Tm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Am(a.toString())));s.length===0&&s.push(new URL(Li(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Oi(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=nc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Om)if(n=nc(Oi(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return Li(n)}function Im(e,t){return Pm(e,t)}function dc(e,t){return zr(Im(e,t))}y();y();var mc=Symbol.for("quansync.getIsAsync"),Qr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function Wi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function Hi(e){let t=function*(...s){return(yield mc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function Lm(e){return Hi({async:()=>Promise.resolve(e),sync:()=>{if(Wi(e))throw new Qr;return e}})}function Gi(e,t){if(e===mc)return t;if(Nm(e))return t?_c(e):xc(e);if(!t&&Wi(e))throw new Qr;return e}var gc=e=>e;function xc(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(Gi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Gi(r.value)}async function _c(e,t=gc){let r=e.next();for(;!r.done;)try{r=e.next(await Gi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Dm(e,t){return Hi({name:e.name,async(...r){return _c(e.apply(this,r),t?.onYield)},sync(...r){return xc(e.apply(this,r),t?.onYield)}})}function qi(e,t){return Wi(e)?Lm(e):typeof e=="function"?Dm(e,t):Hi(e)}var kx=qi({async:()=>Promise.resolve(!0),sync:()=>!1});var Nt=qi;var Xr=e=>e instanceof URL?jm(e):e;async function Bm(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s??n));let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=await Vm.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function Um(e,{cwd:t=Lt.cwd(),type:r="file",stopAt:s}={}){let i=Ne.resolve(Xr(t)??""),{root:n}=Ne.parse(i);s=Ne.resolve(i,Xr(s)??n);let a=Ne.isAbsolute(e);for(;i;){let u=a?e:Ne.join(i,e);try{let c=er.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=Ne.dirname(i)}}function yc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=Lt.platform==="win32"?"win32":"posix"),Lt.versions.pnp){let s=t.paths||[];s.length===0&&s.push(Lt.cwd());let i=$m(import.meta.url);try{return i.resolve(e,{paths:s})}catch{}}let r=dc(e,{url:t.paths});return t.platform==="win32"?Mm.normalize(r):r}function bc(e,t={}){return!!Cc(e,t)}function Gm(e,t={}){let r=Cc(e,t);if(r)return Hm(r)}var wc=Nt({async:e=>er.promises.readFile(e,"utf8"),sync:e=>er.readFileSync(e,"utf8")}),Wm=Nt(function*(e,t={}){let r=Gm(e,t);if(!r)return;let s=JSON.parse(yield wc(r));return{name:e,version:s.version,rootPath:vc(r),packageJsonPath:r,packageJson:s}}),Vx=Wm.sync;function Cc(e,t={}){try{return yc(`${e}/package.json`,t)}catch{}try{return yc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Hm(e){let t;for(;;){if(!e)return;let r=vc(e);if(r===e)return;if(e=r,t=Fm(e,"package.json"),er.existsSync(t))break}return t}var qm=Nt({sync:Um,async:Bm}),kc=Nt(function*(e=Lt.cwd()){let t=yield qm("package.json",{cwd:e});return!t||!er.existsSync(t)?null:JSON.parse(yield wc(t))}),jx=kc.sync,zm=Nt(function*(e,t){let r=(yield kc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),Bx=zm.sync;var Sc="@lntvow/dev",Ac="5.0.11";y();var tr=st(xs(),1);import{execSync as Km}from"child_process";import{existsSync as Ym}from"fs";import{resolve as Qm}from"path";var Z={info:e=>console.log(tr.default.blue(`\u25CF ${e}`)),success:e=>console.log(tr.default.green(`\u2713 ${e}`)),warn:e=>console.log(tr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(tr.default.red(`\u2717 ${e}`))};function zi(e,t={}){try{return Km(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Tc(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:r,manager:s}of e)if(Ym(Qm(process.cwd(),r)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}y();var Oc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && pnpm release -y",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Rc=["@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","bumpp","commitizen","cz-conventional-changelog","eslint","lint-staged","npm-run-all","prettier","simple-git-hooks","typescript"].sort((e,t)=>e.localeCompare(t));y();import rr from"fs";import Ki from"path";function Yi(e,t){if(rr.statSync(e).isDirectory()){if(Ki.basename(e)==="node_modules")return;rr.mkdirSync(t,{recursive:!0}),rr.readdirSync(e).forEach(s=>{Yi(Ki.resolve(e,s),Ki.resolve(t,s))})}else{if(rr.existsSync(t))return;rr.copyFileSync(e,t)}}var eg=Jm(import.meta.url),tg=Zm(eg);Ft.name(Sc).version(Ac,"-v, --version","output the version number");Ft.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{Z.success("Init project by @lntvow/dev"),Z.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{ng(),t&&rg(),s&&ig(),r&&sg(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function rg(){Z.info("Copying template files..."),Yi(Ic(tg,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function sg(){if(!bc("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),zi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function ig(){Z.info("Updating package.json scripts...");let e=Ic(process.cwd(),"package.json"),t;try{t=Xm(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Oc,...r.scripts}};Pc(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&Pc(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function ng(){try{let e=Rc.map(s=>`${s}@latest`).join(" "),t=Tc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,Z.info(`Installing dependencies: ${r}`),zi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Ft.command("release").description("git release").action(async()=>{console.log(Nc.default.green("Release project..."));try{await ag(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function ag(){let e=au(process.cwd());try{let t=(0,Lc.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),Z.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){Z.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Ft.parse();
3
+ import{readFileSync as C,writeFileSync as v}from"fs";import{dirname as P,resolve as h}from"path";import{fileURLToPath as T}from"url";import{program as r}from"commander";import F from"picocolors";import I from"dayjs";import G from"simple-git";import{isPackageExists as N}from"local-pkg";var p="@lntvow/dev",m="5.0.12";import{execSync as w}from"child_process";import{existsSync as j}from"fs";import{resolve as S}from"path";import o from"picocolors";var i={info:e=>console.log(o.blue(`\u25CF ${e}`)),success:e=>console.log(o.green(`\u2713 ${e}`)),warn:e=>console.log(o.yellow(`\u25B2 ${e}`)),error:e=>console.log(o.red(`\u2717 ${e}`))};function c(e,t={}){try{return w(e,{stdio:"inherit",...t})}catch(n){throw i.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),n}}function f(){let e=[{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];for(let{file:n,manager:s}of e)if(j(S(process.cwd(),n)))return s;let t=process.env.npm_config_user_agent||"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":"npm"}var u={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u --reject @types/node && pnpm install",commit:"git add . && git-cz && pnpm release -y",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},y=["@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","bumpp","commitizen","cz-conventional-changelog","eslint","lint-staged","npm-run-all","prettier","simple-git-hooks","typescript"].sort((e,t)=>e.localeCompare(t));import{statSync as D,mkdirSync as E,readdirSync as $,existsSync as _,copyFileSync as b}from"fs";import{basename as z,resolve as k}from"path";function a(e,t){if(D(e).isDirectory()){if(z(e)==="node_modules")return;E(t,{recursive:!0}),$(e).forEach(s=>{a(k(e,s),k(t,s))})}else{if(_(t))return;b(e,t)}}var R=T(import.meta.url),M=P(R);r.name(p).version(m,"-v, --version","output the version number");r.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{i.success("Init project by @lntvow/dev"),i.info(`Cwd is ${process.cwd()}`);let{temp:t,git:n,scripts:s}=e;try{A(),t&&O(),s&&Y(),n&&U(),i.success("Project initialization completed successfully!")}catch(x){i.error(`Initialization failed: ${x.message}`),process.exit(1)}});function O(){i.info("Copying template files..."),a(h(M,"./configs"),process.cwd()),i.success("Template files copied successfully")}function U(){if(!N("simple-git-hooks")){i.warn("simple-git-hooks not installed, skipping initialization");return}try{i.info("Initializing Git hooks..."),c("npx simple-git-hooks"),i.success("Git hooks initialized successfully")}catch(e){i.error(`Failed to initialize Git hooks: ${e.message}`)}}function Y(){i.info("Updating package.json scripts...");let e=h(process.cwd(),"package.json"),t;try{t=C(e,"utf-8");let n=JSON.parse(t),s={...n,scripts:{...u,...n.scripts}};v(e,JSON.stringify(s,null,2)),i.success("Package.json scripts updated successfully")}catch(n){t&&v(e,t),i.error(`Failed to update package.json: ${n.message}`),process.exit(1)}}function A(){try{let e=y.map(s=>`${s}@latest`).join(" "),t=f(),n="";t==="pnpm"?n=`pnpm add -D ${e}`:t==="yarn"?n=`yarn add -D ${e}`:n=`npm install -D ${e}`,i.info(`Installing dependencies: ${n}`),c(n),i.success("Dependencies installed successfully")}catch(e){i.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}r.command("release").description("git release").action(async()=>{console.log(F.green("Release project..."));try{await H(),i.success("Release completed successfully!")}catch(e){i.error(`Release failed: ${e.message}`),process.exit(1)}});async function H(){let e=G(process.cwd());try{let t=I().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),i.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){i.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}r.parse();