@lntvow/dev 4.4.19 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1,3 +1,45 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var z=Object.create;var f=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var I=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of R(e))!Y.call(t,i)&&i!==n&&f(t,i,{get:()=>e[i],enumerable:!(s=D(e,i))||s.enumerable});return t};var c=(t,e,n)=>(n=t!=null?z(U(t)):{},I(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var M=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,d=M();var b=require("child_process"),a=require("fs"),x=require("path"),p=require("commander"),o=c(require("picocolors"),1),u=c(require("dayjs"),1),k=c(require("dayjs/plugin/timezone.js"),1),_=c(require("simple-git"),1);var v="@lntvow/dev",h="4.4.19";var r=c(require("fs"),1),l=c(require("path"),1),w=require("url"),g=c(require("picocolors"),1),T=(0,w.fileURLToPath)(d),C=l.default.dirname(T);function S(t,e){if(r.default.statSync(t).isDirectory()){if(l.default.basename(t)==="node_modules")return;r.default.mkdirSync(e,{recursive:!0}),r.default.readdirSync(t).forEach(s=>{S(l.default.resolve(t,s),l.default.resolve(e,s))})}else{if(r.default.existsSync(e))return;r.default.copyFileSync(t,e)}}function j(){console.log(g.default.blue("Start copying template files")),S(l.default.resolve(C,"./configs"),process.cwd()),console.log(g.default.green("Template files copied successfully"))}u.default.extend(k.default);console.log(o.default.blue(`Cwd is ${process.cwd()}`));p.program.name(v).version(h,"-v, --version","output the version number");p.program.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(o.default.green("Init project by @lntvow/dev"));let{temp:e,git:n,scripts:s}=t;if(e&&j(),n){console.log(o.default.blue("Start init simple-git-hooks"));let i=(0,b.execSync)("npx simple-git-hooks");console.log(i.toString())}if(s){console.log(o.default.blue("Start init scripts"));try{let i=(0,x.resolve)(process.cwd(),"package.json"),m=JSON.parse((0,a.readFileSync)(i,"utf-8"));m={...m,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",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",...m.scripts}},(0,a.writeFileSync)(i,JSON.stringify(m,null,2)),console.log(o.default.green("Scripts added successfully"))}catch{console.log(o.default.yellow("No package.json file found ignoring scripts"))}}console.log(o.default.yellow(`
3
- You may need to re-execute the "pnpm install" command`))});p.program.command("release").description("git release").action(async()=>{console.log(o.default.green("Release project...")),await E()});p.program.parse();async function E(){let t=(0,_.default)(),e=(0,u.default)().format("YYYYMMDD");await t.cwd(process.cwd()),await t.pull(),await t.add("."),await t.commit(e,"--no-verify"),await t.push("origin"),console.log(o.default.green(`Changes committed with message: ${e}`))}
2
+ "use strict";var Gc=Object.create;var Zi=Object.defineProperty;var Wc=Object.getOwnPropertyDescriptor;var Hc=Object.getOwnPropertyNames;var qc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty;var Kc=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Yc=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hc(t))!zc.call(e,i)&&i!==r&&Zi(e,i,{get:()=>t[i],enumerable:!(s=Wc(t,i))||s.enumerable});return e};var ie=(e,t,r)=>(r=e!=null?Gc(qc(e)):{},Yc(t||!e||!e.__esModule?Zi(r,"default",{value:e,enumerable:!0}):r,e));var Qc,$,_=Kc(()=>{"use strict";Qc=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,$=Qc()});var Ft=se(is=>{"use strict";_();var or=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}},ss=class extends or{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};is.CommanderError=or;is.InvalidArgumentError=ss});var ur=se(as=>{"use strict";_();var{InvalidArgumentError:Xc}=Ft(),ns=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 Xc(`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 Zc(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}as.Argument=ns;as.humanReadableArgName=Zc});var cs=se(us=>{"use strict";_();var{humanReadableArgName:Jc}=ur(),os=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=>Jc(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(R=>n(r.styleOptionTerm(r.optionTerm(R)),r.styleOptionDescription(r.optionDescription(R))));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(R=>n(r.styleSubcommandTerm(r.subcommandTerm(R)),r.styleSubcommandDescription(r.subcommandDescription(R))));a=a.concat(this.formatItemList(p,d,r))}),a.join(`
3
+ `)}displayWidth(t){return Ji(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,`
4
+ `+" ".repeat(r+c)),a+u+" ".repeat(c)+h.replace(/\n/g,`
5
+ ${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(`
6
+ `)}};function Ji(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}us.Help=os;us.stripColor=Ji});var ps=se(fs=>{"use strict";_();var{InvalidArgumentError:el}=Ft(),ls=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=tl(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 el(`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?en(this.name().replace(/^no-/,"")):en(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}},hs=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 en(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function tl(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}
7
+ - a short flag is a single dash and a single character
8
+ - either use a single dash and a single character (for a short flag)
9
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):s.test(a)?new Error(`${u}
10
+ - too many short flags`):i.test(a)?new Error(`${u}
11
+ - too many long flags`):new Error(`${u}
12
+ - 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}}fs.Option=ls;fs.DualOptions=hs});var rn=se(tn=>{"use strict";_();function rl(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 sl(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=rl(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?`
13
+ (Did you mean one of ${s.join(", ")}?)`:s.length===1?`
14
+ (Did you mean ${s[0]}?)`:""}tn.suggestSimilar=sl});var on=se(_s=>{"use strict";_();var il=require("events").EventEmitter,ds=require("child_process"),Ye=require("path"),cr=require("fs"),U=require("process"),{Argument:nl,humanReadableArgName:al}=ur(),{CommanderError:ms}=Ft(),{Help:ol,stripColor:ul}=cs(),{Option:sn,DualOptions:cl}=ps(),{suggestSimilar:nn}=rn(),gs=class e extends il{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=>U.stdout.write(r),writeErr:r=>U.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>U.stdout.isTTY?U.stdout.columns:void 0,getErrHelpWidth:()=>U.stderr.isTTY?U.stderr.columns:void 0,getOutHasColors:()=>xs()??(U.stdout.isTTY&&U.stdout.hasColors?.()),getErrHasColors:()=>xs()??(U.stderr.isTTY&&U.stderr.hasColors?.()),stripColor:r=>ul(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 ol,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
15
+ - 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 nl(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}'.
16
+ 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 ms(t,r,s)),U.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 sn(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}'
17
+ - 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 sn)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){U.versions?.electron&&(r.from="electron");let i=U.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}t===void 0&&(t=U.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":U.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.
18
+ - 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(cr.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
19
+ - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
+ - ${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=Ye.resolve(l,h);if(cr.existsSync(p))return p;if(i.includes(Ye.extname(h)))return;let d=i.find(R=>cr.existsSync(`${p}${R}`));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=cr.realpathSync(this._scriptPath)}catch{l=this._scriptPath}u=Ye.resolve(Ye.dirname(l),u)}if(u){let l=n(u,a);if(!l&&!t._executableFile&&this._scriptPath){let h=Ye.basename(this._scriptPath,Ye.extname(this._scriptPath));h!==this._name&&(l=n(u,`${h}-${t._name}`))}a=l||a}s=i.includes(Ye.extname(a));let c;U.platform!=="win32"?s?(r.unshift(a),r=an(U.execArgv).concat(r),c=ds.spawn(U.argv[0],r,{stdio:"inherit"})):c=ds.spawn(a,r,{stdio:"inherit"}):(this._checkForMissingExecutable(a,u,t._name),r.unshift(a),r=an(U.execArgv).concat(r),c=ds.spawn(U.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{U.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 ms(l,"commander.executeSubCommandAsync","(close)")):U.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)U.exit(1);else{let h=new ms(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}
22
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
+ `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
+ `),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 U.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()}`,U.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new cl(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=nn(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=nn(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}
25
+ `),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=>al(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=Ye.basename(t,Ye.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(U.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.
26
+ 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}
27
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function an(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 xs(){if(U.env.NO_COLOR||U.env.FORCE_COLOR==="0"||U.env.FORCE_COLOR==="false")return!1;if(U.env.FORCE_COLOR||U.env.CLICOLOR_FORCE!==void 0)return!0}_s.Command=gs;_s.useColor=xs});var hn=se(Ie=>{"use strict";_();var{Argument:un}=ur(),{Command:ys}=on(),{CommanderError:ll,InvalidArgumentError:cn}=Ft(),{Help:hl}=cs(),{Option:ln}=ps();Ie.program=new ys;Ie.createCommand=e=>new ys(e);Ie.createOption=(e,t)=>new ln(e,t);Ie.createArgument=(e,t)=>new un(e,t);Ie.Command=ys;Ie.Option=ln;Ie.Argument=un;Ie.Help=hl;Ie.CommanderError=ll;Ie.InvalidArgumentError=cn;Ie.InvalidOptionArgumentError=cn});var bs=se((Sg,vs)=>{"use strict";_();var hr=process||{},pn=hr.argv||[],lr=hr.env||{},fl=!(lr.NO_COLOR||pn.includes("--no-color"))&&(!!lr.FORCE_COLOR||pn.includes("--color")||hr.platform==="win32"||(hr.stdout||{}).isTTY&&lr.TERM!=="dumb"||!!lr.CI),pl=(e,t,r=e)=>s=>{let i=""+s,n=i.indexOf(t,e.length);return~n?e+dl(i,t,r,n)+t:e+i+t},dl=(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)},dn=(e=fl)=>{let t=e?pl:()=>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")}};vs.exports=dn();vs.exports.createColors=dn});var mn=se((ws,Cs)=>{"use strict";_();(function(e,t){typeof ws=="object"&&typeof Cs<"u"?Cs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(ws,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",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|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,V={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(A){var v=["th","st","nd","rd"],x=A%100;return"["+A+(v[(x-20)%10]||v[x]||v[0])+"]"}},G=function(A,v,x){var E=String(A);return!E||E.length>=v?A:""+Array(v+1-E.length).join(x)+A},oe={s:G,z:function(A){var v=-A.utcOffset(),x=Math.abs(v),E=Math.floor(x/60),y=x%60;return(v<=0?"+":"-")+G(E,2,"0")+":"+G(y,2,"0")},m:function A(v,x){if(v.date()<x.date())return-A(x,v);var E=12*(x.year()-v.year())+(x.month()-v.month()),y=v.clone().add(E,f),P=x-y<0,I=v.clone().add(E+(P?-1:1),f);return+(-(E+(x-y)/(P?y-I:I-y))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:f,y:h,w:c,d:u,D:p,h:a,m:n,s:i,ms:s,Q:l}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},te="en",ae={};ae[te]=V;var Pe="$isDayjsObject",me=function(A){return A instanceof yt||!(!A||!A[Pe])},Te=function A(v,x,E){var y;if(!v)return te;if(typeof v=="string"){var P=v.toLowerCase();ae[P]&&(y=P),x&&(ae[P]=x,y=P);var I=v.split("-");if(!y&&I.length>1)return A(I[0])}else{var H=v.name;ae[H]=v,y=H}return!E&&y&&(te=y),y||!E&&te},W=function(A,v){if(me(A))return A.clone();var x=typeof v=="object"?v:{};return x.date=A,x.args=arguments,new yt(x)},D=oe;D.l=Te,D.i=me,D.w=function(A,v){return W(A,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var yt=function(){function A(x){this.$L=Te(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[Pe]=!0}var v=A.prototype;return v.parse=function(x){this.$d=function(E){var y=E.date,P=E.utc;if(y===null)return new Date(NaN);if(D.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var I=y.match(R);if(I){var H=I[2]-1||0,Y=(I[7]||"0").substring(0,3);return P?new Date(Date.UTC(I[1],H,I[3]||1,I[4]||0,I[5]||0,I[6]||0,Y)):new Date(I[1],H,I[3]||1,I[4]||0,I[5]||0,I[6]||0,Y)}}return new Date(y)}(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 D},v.isValid=function(){return this.$d.toString()!==d},v.isSame=function(x,E){var y=W(x);return this.startOf(E)<=y&&y<=this.endOf(E)},v.isAfter=function(x,E){return W(x)<this.startOf(E)},v.isBefore=function(x,E){return this.endOf(E)<W(x)},v.$g=function(x,E,y){return D.u(x)?this[E]:this.set(y,x)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(x,E){var y=this,P=!!D.u(E)||E,I=D.p(x),H=function(Ke,he){var Be=D.w(y.$u?Date.UTC(y.$y,he,Ke):new Date(y.$y,he,Ke),y);return P?Be:Be.endOf(u)},Y=function(Ke,he){return D.w(y.toDate()[Ke].apply(y.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(he)),y)},re=this.$W,ue=this.$M,be=this.$D,st="set"+(this.$u?"UTC":"");switch(I){case h:return P?H(1,0):H(31,11);case f:return P?H(1,ue):H(0,ue+1);case c:var ze=this.$locale().weekStart||0,lt=(re<ze?re+7:re)-ze;return H(P?be-lt:be+(6-lt),ue);case u:case p:return Y(st+"Hours",0);case a:return Y(st+"Minutes",1);case n:return Y(st+"Seconds",2);case i:return Y(st+"Milliseconds",3);default:return this.clone()}},v.endOf=function(x){return this.startOf(x,!1)},v.$set=function(x,E){var y,P=D.p(x),I="set"+(this.$u?"UTC":""),H=(y={},y[u]=I+"Date",y[p]=I+"Date",y[f]=I+"Month",y[h]=I+"FullYear",y[a]=I+"Hours",y[n]=I+"Minutes",y[i]=I+"Seconds",y[s]=I+"Milliseconds",y)[P],Y=P===u?this.$D+(E-this.$W):E;if(P===f||P===h){var re=this.clone().set(p,1);re.$d[H](Y),re.init(),this.$d=re.set(p,Math.min(this.$D,re.daysInMonth())).$d}else H&&this.$d[H](Y);return this.init(),this},v.set=function(x,E){return this.clone().$set(x,E)},v.get=function(x){return this[D.p(x)]()},v.add=function(x,E){var y,P=this;x=Number(x);var I=D.p(E),H=function(ue){var be=W(P);return D.w(be.date(be.date()+Math.round(ue*x)),P)};if(I===f)return this.set(f,this.$M+x);if(I===h)return this.set(h,this.$y+x);if(I===u)return H(1);if(I===c)return H(7);var Y=(y={},y[n]=t,y[a]=r,y[i]=e,y)[I]||1,re=this.$d.getTime()+x*Y;return D.w(re,this)},v.subtract=function(x,E){return this.add(-1*x,E)},v.format=function(x){var E=this,y=this.$locale();if(!this.isValid())return y.invalidDate||d;var P=x||"YYYY-MM-DDTHH:mm:ssZ",I=D.z(this),H=this.$H,Y=this.$m,re=this.$M,ue=y.weekdays,be=y.months,st=y.meridiem,ze=function(he,Be,ht,ge){return he&&(he[Be]||he(E,P))||ht[Be].slice(0,ge)},lt=function(he){return D.s(H%12||12,he,"0")},Ke=st||function(he,Be,ht){var ge=he<12?"AM":"PM";return ht?ge.toLowerCase():ge};return P.replace(L,function(he,Be){return Be||function(ht){switch(ht){case"YY":return String(E.$y).slice(-2);case"YYYY":return D.s(E.$y,4,"0");case"M":return re+1;case"MM":return D.s(re+1,2,"0");case"MMM":return ze(y.monthsShort,re,be,3);case"MMMM":return ze(be,re);case"D":return E.$D;case"DD":return D.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ze(y.weekdaysMin,E.$W,ue,2);case"ddd":return ze(y.weekdaysShort,E.$W,ue,3);case"dddd":return ue[E.$W];case"H":return String(H);case"HH":return D.s(H,2,"0");case"h":return lt(1);case"hh":return lt(2);case"a":return Ke(H,Y,!0);case"A":return Ke(H,Y,!1);case"m":return String(Y);case"mm":return D.s(Y,2,"0");case"s":return String(E.$s);case"ss":return D.s(E.$s,2,"0");case"SSS":return D.s(E.$ms,3,"0");case"Z":return I}return null}(he)||I.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(x,E,y){var P,I=this,H=D.p(E),Y=W(x),re=(Y.utcOffset()-this.utcOffset())*t,ue=this-Y,be=function(){return D.m(I,Y)};switch(H){case h:P=be()/12;break;case f:P=be();break;case l:P=be()/3;break;case c:P=(ue-re)/6048e5;break;case u:P=(ue-re)/864e5;break;case a:P=ue/r;break;case n:P=ue/t;break;case i:P=ue/e;break;default:P=ue}return y?P:D.a(P)},v.daysInMonth=function(){return this.endOf(f).$D},v.$locale=function(){return ae[this.$L]},v.locale=function(x,E){if(!x)return this.$L;var y=this.clone(),P=Te(x,E,!0);return P&&(y.$L=P),y},v.clone=function(){return D.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()},A}(),ar=yt.prototype;return W.prototype=ar,[["$ms",s],["$s",i],["$m",n],["$H",a],["$W",u],["$M",f],["$y",h],["$D",p]].forEach(function(A){ar[A[1]]=function(v){return this.$g(v,A[0],A[1])}}),W.extend=function(A,v){return A.$i||(A(v,yt,W),A.$i=!0),W},W.locale=Te,W.isDayjs=me,W.unix=function(A){return W(1e3*A)},W.en=ae[te],W.Ls=ae,W.p={},W})});var gn=se((ks,Es)=>{"use strict";_();(function(e,t){typeof ks=="object"&&typeof Es<"u"?Es.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(ks,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,s,i){var n,a=function(l,h,p){p===void 0&&(p={});var d=new Date(l),R=function(L,V){V===void 0&&(V={});var G=V.timeZoneName||"short",oe=L+"|"+G,te=t[oe];return te||(te=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:L,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:G}),t[oe]=te),te}(h,p);return R.formatToParts(d)},u=function(l,h){for(var p=a(l,h),d=[],R=0;R<p.length;R+=1){var L=p[R],V=L.type,G=L.value,oe=e[V];oe>=0&&(d[oe]=parseInt(G,10))}var te=d[3],ae=te===24?0:te,Pe=d[0]+"-"+d[1]+"-"+d[2]+" "+ae+":"+d[4]+":"+d[5]+":000",me=+l;return(i.utc(Pe).valueOf()-(me-=me%1e3))/6e4},c=s.prototype;c.tz=function(l,h){l===void 0&&(l=n);var p,d=this.utcOffset(),R=this.toDate(),L=R.toLocaleString("en-US",{timeZone:l}),V=Math.round((R-new Date(L))/1e3/60),G=15*-Math.round(R.getTimezoneOffset()/15)-V;if(!Number(G))p=this.utcOffset(0,h);else if(p=i(L,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(G,!0),h){var oe=p.utcOffset();p=p.add(d-oe,"minute")}return p.$x.$timezone=l,p},c.offsetName=function(l){var h=this.$x.$timezone||i.tz.guess(),p=a(this.valueOf(),h,{timeZoneName:l}).find(function(d){return d.type.toLowerCase()==="timezonename"});return p&&p.value};var f=c.startOf;c.startOf=function(l,h){if(!this.$x||!this.$x.$timezone)return f.call(this,l,h);var p=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(p,l,h).tz(this.$x.$timezone,!0)},i.tz=function(l,h,p){var d=p&&h,R=p||h||n,L=u(+i(),R);if(typeof l!="string")return i(l).tz(R);var V=function(ae,Pe,me){var Te=ae-60*Pe*1e3,W=u(Te,me);if(Pe===W)return[Te,Pe];var D=u(Te-=60*(W-Pe)*1e3,me);return W===D?[Te,W]:[ae-60*Math.min(W,D)*1e3,Math.max(W,D)]}(i.utc(l,d).valueOf(),L,R),G=V[0],oe=V[1],te=i(G).utcOffset(oe);return te.$x.$timezone=R,te},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(l){n=l}}})});var _n=se((Rg,xn)=>{"use strict";_();var vt=1e3,bt=vt*60,wt=bt*60,ft=wt*24,ml=ft*7,gl=ft*365.25;xn.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return xl(e);if(r==="number"&&isFinite(e))return t.long?yl(e):_l(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xl(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*gl;case"weeks":case"week":case"w":return r*ml;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 _l(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 yl(e){var t=Math.abs(e);return t>=ft?fr(e,t,ft,"day"):t>=wt?fr(e,t,wt,"hour"):t>=bt?fr(e,t,bt,"minute"):t>=vt?fr(e,t,vt,"second"):e+" ms"}function fr(e,t,r,s){var i=t>=r*1.5;return Math.round(e/r)+" "+s+(i?"s":"")}});var Ss=se((Ig,yn)=>{"use strict";_();function vl(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=u,r.humanize=_n(),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,R;function L(...V){if(!L.enabled)return;let G=L,oe=Number(new Date),te=oe-(h||oe);G.diff=te,G.prev=h,G.curr=oe,h=oe,V[0]=r.coerce(V[0]),typeof V[0]!="string"&&V.unshift("%O");let ae=0;V[0]=V[0].replace(/%([a-zA-Z%])/g,(me,Te)=>{if(me==="%%")return"%";ae++;let W=r.formatters[Te];if(typeof W=="function"){let D=V[ae];me=W.call(G,D),V.splice(ae,1),ae--}return me}),r.formatArgs.call(G,V),(G.log||r.log).apply(G,V)}return L.namespace=l,L.useColors=r.useColors(),L.color=r.selectColor(l),L.extend=s,L.destroy=r.destroy,Object.defineProperty(L,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,R=r.enabled(l)),R),set:V=>{p=V}}),typeof r.init=="function"&&r.init(L),L}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,R=-1,L=0;for(;p<l.length;)if(d<h.length&&(h[d]===l[p]||h[d]==="*"))h[d]==="*"?(R=d,L=p,d++):(p++,d++);else if(R!==-1)d=R+1,L++,p=L;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}yn.exports=vl});var vn=se((we,pr)=>{"use strict";_();we.formatArgs=wl;we.save=Cl;we.load=kl;we.useColors=bl;we.storage=El();we.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`."))}})();we.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 bl(){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 wl(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+pr.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)}we.log=console.debug||console.log||(()=>{});function Cl(e){try{e?we.storage.setItem("debug",e):we.storage.removeItem("debug")}catch{}}function kl(){let e;try{e=we.storage.getItem("debug")||we.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function El(){try{return localStorage}catch{}}pr.exports=Ss()(we);var{formatters:Sl}=pr.exports;Sl.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var wn=se((Dg,bn)=>{"use strict";_();bn.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 kn=se((Fg,Cn)=>{"use strict";_();var Al=require("os"),Ve=wn(),fe=process.env,Ct;Ve("no-color")||Ve("no-colors")||Ve("color=false")?Ct=!1:(Ve("color")||Ve("colors")||Ve("color=true")||Ve("color=always"))&&(Ct=!0);"FORCE_COLOR"in fe&&(Ct=fe.FORCE_COLOR.length===0||parseInt(fe.FORCE_COLOR,10)!==0);function Tl(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ol(e){if(Ct===!1)return 0;if(Ve("color=16m")||Ve("color=full")||Ve("color=truecolor"))return 3;if(Ve("color=256"))return 2;if(e&&!e.isTTY&&Ct!==!0)return 0;let t=Ct?1:0;if(process.platform==="win32"){let r=Al.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 fe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in fe)||fe.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in fe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in fe){let r=parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:(fe.TERM==="dumb",t)}function As(e){let t=Ol(e);return Tl(t)}Cn.exports={supportsColor:As,stdout:As(process.stdout),stderr:As(process.stderr)}});var Sn=se((ce,mr)=>{"use strict";_();var Rl=require("tty"),dr=require("util");ce.init=Fl;ce.log=Ll;ce.formatArgs=Il;ce.save=Dl;ce.load=$l;ce.useColors=Pl;ce.destroy=dr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ce.colors=[6,2,3,4,5,1];try{let e=kn();e&&(e.stderr||e).level>=2&&(ce.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{}ce.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 Pl(){return"colors"in ce.inspectOpts?!!ce.inspectOpts.colors:Rl.isatty(process.stderr.fd)}function Il(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(`
28
+ `).join(`
29
+ `+n),e.push(i+"m+"+mr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Nl()+t+" "+e[0]}function Nl(){return ce.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ll(...e){return process.stderr.write(dr.formatWithOptions(ce.inspectOpts,...e)+`
30
+ `)}function Dl(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function $l(){return process.env.DEBUG}function Fl(e){e.inspectOpts={};let t=Object.keys(ce.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ce.inspectOpts[t[r]]}mr.exports=Ss()(ce);var{formatters:En}=mr.exports;En.o=function(e){return this.inspectOpts.colors=this.useColors,dr.inspect(e,this.inspectOpts).split(`
31
+ `).map(t=>t.trim()).join(" ")};En.O=function(e){return this.inspectOpts.colors=this.useColors,dr.inspect(e,this.inspectOpts)}});var Os=se((jg,Ts)=>{"use strict";_();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ts.exports=vn():Ts.exports=Sn()});var An=se(Oe=>{"use strict";_();var Ml=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});var Vl=require("fs"),jl=Ml(Os()),kt=jl.default("@kwsites/file-exists");function Bl(e,t,r){kt("checking %s",e);try{let s=Vl.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 Ul(e,t=Oe.READABLE){return Bl(e,(t&Oe.FILE)>0,(t&Oe.FOLDER)>0)}Oe.exists=Ul;Oe.FILE=1;Oe.FOLDER=2;Oe.READABLE=Oe.FILE+Oe.FOLDER});var Tn=se(gr=>{"use strict";_();function Gl(e){for(var t in e)gr.hasOwnProperty(t)||(gr[t]=e[t])}Object.defineProperty(gr,"__esModule",{value:!0});Gl(An())});var Ps=se(pt=>{"use strict";_();Object.defineProperty(pt,"__esModule",{value:!0});pt.createDeferred=pt.deferred=void 0;function Rs(){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=Rs;pt.createDeferred=Rs;pt.default=Rs});_();var ir=require("fs"),nr=require("path");_();var fn=ie(hn(),1),{program:Mt,createCommand:dg,createArgument:mg,createOption:gg,CommanderError:xg,InvalidArgumentError:_g,InvalidOptionArgumentError:yg,Command:vg,Argument:bg,Option:wg,Help:Cg}=fn.default;var jc=ie(bs(),1),ts=ie(mn(),1),Bc=ie(gn(),1);_();var ua=require("buffer"),Tr=ie(Tn(),1),Er=ie(Os(),1),eo=require("child_process"),Mo=ie(Ps(),1),Et=ie(Ps(),1),lu=require("events"),Zs=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,Js=Object.getOwnPropertyNames,Hl=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[Js(e)[0]])(e=0)),t},ql=(e,t)=>function(){return t||(0,e[Js(e)[0]])((t={exports:{}}).exports,t),t.exports},ee=(e,t)=>{for(var r in t)Zs(e,r,{get:t[r],enumerable:!0})},zl=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Js(t))!Hl.call(e,i)&&i!==r&&Zs(e,i,{get:()=>t[i],enumerable:!(s=Wl(t,i))||s.enumerable});return e},Q=e=>zl(Zs({},"__esModule",{value:!0}),e);function Kl(...e){let t=new String(e);return Ar.set(t,e),t}function wr(e){return e instanceof String&&Ar.has(e)}function On(e){return Ar.get(e)||[]}var Ar,Ut=g({"src/lib/args/pathspec.ts"(){"use strict";Ar=new WeakMap}}),Xe,nt=g({"src/lib/errors/git-error.ts"(){"use strict";Xe=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Gt,At=g({"src/lib/errors/git-response-error.ts"(){"use strict";nt(),Gt=class extends Xe{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),aa,oa=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";nt(),aa=class extends Xe{constructor(e){super(void 0,e)}}}});function ca(e){return typeof e!="function"?gt:e}function la(e){return typeof e=="function"&&e!==gt}function ha(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function fa(e,t=0){return pa(e)&&e.length>t?e[t]:void 0}function mt(e,t=0){if(pa(e)&&e.length>t)return e[e.length-1-t]}function pa(e){return!!(e&&typeof e.length=="number")}function Wt(e="",t=!0,r=`
32
+ `){return e.split(r).reduce((s,i)=>{let n=t?i.trim():i;return n&&s.push(n),s},[])}function ei(e,t){return Wt(e,!0).map(r=>t(r))}function ti(e){return(0,Tr.exists)(e,Tr.FOLDER)}function B(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function da(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Or(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Ue(e){return Array.isArray(e)?e:[e]}function ma(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function ga(e){return Ue(e).map(String)}function z(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function jt(e,t){let r=[];for(let s=0,i=e.length;s<i;s++)r.push(t,e[s]);return r}function Bt(e){return(Array.isArray(e)?ua.Buffer.concat(e):e).toString("utf-8")}function xa(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Ms(e=0){return new Promise(t=>setTimeout(t,e))}function Vs(e){if(e!==!1)return e}var St,gt,Ht,Rr=g({"src/lib/utils/util.ts"(){"use strict";St="\0",gt=()=>{},Ht=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ge(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function js(e,t){let r=wr(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Pr(e){return!!e&&Ht(e)==="[object Object]"}function _a(e){return typeof e=="function"}var qt,pe,ya,Cr,ri,va=g({"src/lib/utils/argument-filters.ts"(){"use strict";Rr(),Ut(),qt=e=>Array.isArray(e),pe=e=>typeof e=="string",ya=e=>Array.isArray(e)&&e.every(pe),Cr=e=>pe(e)||Array.isArray(e)&&e.every(pe),ri=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),Bs,Yl=g({"src/lib/utils/exit-codes.ts"(){"use strict";Bs=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Bs||{})}}),kr,Ql=g({"src/lib/utils/git-output-streams.ts"(){"use strict";kr=class ba{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new ba(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),N,it,Xl=g({"src/lib/utils/line-parser.ts"(){"use strict";N=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 N{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 wa(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...Ca},...e.filter(s=>typeof s=="object"&&s));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Ca,Zl=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Ca={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function si(e,t=[]){return Pr(e)?Object.keys(e).reduce((r,s)=>{let i=e[s];if(wr(i))r.push(i);else if(js(i,["boolean"]))r.push(s+"="+i);else if(Array.isArray(i))for(let n of i)js(n,["string","number"])||r.push(s+"="+n);else r.push(s);return r},t):t}function Ce(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 si(ii(e),s),r||s.push(...Jl(e)),s}function Jl(e){let t=typeof mt(e)=="function";return Ge(mt(e,t?1:0),qt,[])}function ii(e){let t=_a(mt(e));return Ge(mt(e,t?1:0),Pr)}function X(e,t=!0){let r=ca(mt(e));return t||la(r)?r:void 0}var eh=g({"src/lib/utils/task-options.ts"(){"use strict";va(),Rr(),Ut()}});function Us(e,t){return e(t.stdOut,t.stdErr)}function Ee(e,t,r,s=!0){return Ue(r).forEach(i=>{for(let n=Wt(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 th=g({"src/lib/utils/task-parser.ts"(){"use strict";Rr()}}),ka={};ee(ka,{ExitCodes:()=>Bs,GitOutputStreams:()=>kr,LineParser:()=>N,NOOP:()=>gt,NULL:()=>St,RemoteLineParser:()=>it,append:()=>B,appendTaskOptions:()=>si,asArray:()=>Ue,asCamelCase:()=>ma,asFunction:()=>ca,asNumber:()=>z,asStringArray:()=>ga,bufferToString:()=>Bt,callTaskParser:()=>Us,createInstanceConfig:()=>wa,delay:()=>Ms,filterArray:()=>qt,filterFunction:()=>_a,filterHasLength:()=>ri,filterPlainObject:()=>Pr,filterPrimitives:()=>js,filterString:()=>pe,filterStringArray:()=>ya,filterStringOrStringArray:()=>Cr,filterType:()=>Ge,first:()=>fa,folderExists:()=>ti,forEachLineWithContent:()=>ei,getTrailingOptions:()=>Ce,including:()=>da,isUserFunction:()=>la,last:()=>mt,objectToString:()=>Ht,orVoid:()=>Vs,parseStringResponse:()=>Ee,pick:()=>xa,prefixedArray:()=>jt,remove:()=>Or,splitOn:()=>ha,toLinesWithContent:()=>Wt,trailingFunctionArgument:()=>X,trailingOptionsArgument:()=>ii});var T=g({"src/lib/utils/index.ts"(){"use strict";va(),Yl(),Ql(),Xl(),Zl(),eh(),th(),Rr()}}),Ea={};ee(Ea,{CheckRepoActions:()=>Gs,checkIsBareRepoTask:()=>Aa,checkIsRepoRootTask:()=>Sa,checkIsRepoTask:()=>rh});function rh(e){switch(e){case"bare":return Aa();case"root":return Sa()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Ir,parser:ni}}function Sa(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Ir,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Aa(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Ir,parser:ni}}function sh(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Gs,Ir,ni,Ta=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";T(),Gs=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Gs||{}),Ir=({exitCode:e},t,r,s)=>{if(e===128&&sh(t))return r(Buffer.from("false"));s(t)},ni=e=>e.trim()==="true"}});function ih(e,t){let r=new Oa(e),s=e?Pa:Ra;return Wt(t).forEach(i=>{let n=i.replace(s,"");r.paths.push(n),(Ia.test(n)?r.folders:r.files).push(n)}),r}var Oa,Ra,Pa,Ia,nh=g({"src/lib/responses/CleanSummary.ts"(){"use strict";T(),Oa=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Ra=/^[a-z]+\s*/i,Pa=/^[a-z]+\s+[a-z]+\s*/i,Ia=/\/$/}}),Ws={};ee(Ws,{EMPTY_COMMANDS:()=>Nr,adhocExecTask:()=>Na,configurationErrorTask:()=>ke,isBufferTask:()=>Da,isEmptyTask:()=>$a,straightThroughBufferTask:()=>La,straightThroughStringTask:()=>_e});function Na(e){return{commands:Nr,format:"empty",parser:e}}function ke(e){return{commands:Nr,format:"empty",parser(){throw typeof e=="string"?new aa(e):e}}}function _e(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function La(e){return{commands:e,format:"buffer",parser(t){return t}}}function Da(e){return e.format==="buffer"}function $a(e){return e.format==="empty"||!e.commands.length}var Nr,J=g({"src/lib/tasks/task.ts"(){"use strict";oa(),Nr=[]}}),Fa={};ee(Fa,{CONFIG_ERROR_INTERACTIVE_MODE:()=>ai,CONFIG_ERROR_MODE_REQUIRED:()=>oi,CONFIG_ERROR_UNKNOWN_OPTION:()=>ui,CleanOptions:()=>_r,cleanTask:()=>Ma,cleanWithOptionsTask:()=>ah,isCleanOptionsArray:()=>oh});function ah(e,t){let{cleanMode:r,options:s,valid:i}=uh(e);return r?i.options?(s.push(...t),s.some(hh)?ke(ai):Ma(r,s)):ke(ui+JSON.stringify(e)):ke(oi)}function Ma(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(s){return ih(e==="n",s)}}}function oh(e){return Array.isArray(e)&&e.every(t=>ci.has(t))}function uh(e){let t,r=[],s={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{ch(i)?(t=i,s.cleanMode=!0):s.options=s.options&&lh(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:s}}function ch(e){return e==="f"||e==="n"}function lh(e){return/^-[a-z]$/i.test(e)&&ci.has(e.charAt(1))}function hh(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var ai,oi,ui,_r,ci,Va=g({"src/lib/tasks/clean.ts"(){"use strict";nh(),T(),J(),ai="Git clean interactive mode is not supported",oi='Git clean mode parameter ("n" or "f") is required',ui="Git clean unknown option found in: ",_r=(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))(_r||{}),ci=new Set(["i",...ga(Object.values(_r))])}});function fh(e){let t=new Ba;for(let r of ja(e))t.addValue(r.file,String(r.key),r.value);return t}function ph(e,t){let r=null,s=[],i=new Map;for(let n of ja(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 dh(e){return e.replace(/^(file):/,"")}function*ja(e,t=null){let r=e.split("\0");for(let s=0,i=r.length-1;s<i;){let n=dh(r[s++]),a=r[s++],u=t;if(a.includes(`
33
+ `)){let c=ha(a,`
34
+ `);u=c[0],a=c[1]}yield{file:n,key:u,value:a}}}var Ba,mh=g({"src/lib/responses/ConfigList.ts"(){"use strict";T(),Ba=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 Is(e,t){return typeof e=="string"&&Hs.hasOwnProperty(e)?e:t}function gh(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 xh(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 ph(s,e)}}}function _h(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return fh(r)}}}function yh(){return{addConfig(e,t,...r){return this._runTask(gh(e,t,r[0]===!0,Is(r[1],"local")),X(arguments))},getConfig(e,t){return this._runTask(xh(e,Is(t,void 0)),X(arguments))},listConfig(...e){return this._runTask(_h(Is(e[0],void 0)),X(arguments))}}}var Hs,Ua=g({"src/lib/tasks/config.ts"(){"use strict";mh(),T(),Hs=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Hs||{})}});function vh(e){return Ga.has(e)}var Ns,Ga,Wa=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ns=(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))(Ns||{}),Ga=new Set(Object.values(Ns))}});function bh(...e){return new qa().param(...e)}function wh(e){let t=new Set,r={};return ei(e,s=>{let[i,n,a]=s.split(St);t.add(i),(r[i]=r[i]||[]).push({line:z(n),path:i,preview:a})}),{paths:t,results:r}}function Ch(){return{grep(e){let t=X(arguments),r=Ce(arguments);for(let i of Ha)if(r.includes(i))return this._runTask(ke(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=bh().param(e));let s=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:s,format:"utf-8",parser(i){return wh(i)}},t)}}}var Ha,Vt,Rn,qa,za=g({"src/lib/tasks/grep.ts"(){"use strict";T(),J(),Ha=["-h"],Vt=Symbol("grepQuery"),qa=class{constructor(){this[Rn]=[]}*[(Rn=Vt,Symbol.iterator)](){for(let e of this[Vt])yield e}and(...e){return e.length&&this[Vt].push("--and","(",...jt(e,"-e"),")"),this}param(...e){return this[Vt].push(...jt(e,"-e")),this}}}}),Ka={};ee(Ka,{ResetMode:()=>yr,getResetMode:()=>Eh,resetTask:()=>kh});function kh(e,t){let r=["reset"];return Ya(e)&&r.push(`--${e}`),r.push(...t),_e(r)}function Eh(e){if(Ya(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Ya(e){return Qa.includes(e)}var yr,Qa,Xa=g({"src/lib/tasks/reset.ts"(){"use strict";J(),yr=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(yr||{}),Qa=Array.from(Object.values(yr))}});function Sh(){return(0,Er.default)("simple-git")}function Pn(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 Ah(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 li(e,t,r,s=Sh()){let i=e&&`[${e}]`||"",n=[],a=typeof t=="string"?s.extend(t):t,u=Ah(Ge(t,pe),a,s);return f(r);function c(l,h){return B(n,li(e,u.replace(/^[^:]+/,l),h,s))}function f(l){let h=l&&`[${l}]`||"",p=a&&Pn(a,h)||gt,d=Pn(s,`${i} ${h}`,p);return Object.assign(a?p:d,{label:e,sibling:c,info:d,step:f})}}var Za=g({"src/lib/git-logger.ts"(){"use strict";T(),Er.default.formatters.L=e=>String(ri(e)?e.length:"-"),Er.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Ht(e)}}),Ja,Th=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";nt(),Za(),Ja=class qs{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let r=qs.getName(t.commands[0]),s=li(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 Xe(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(t="empty"){return`task:${t}:${++qs.counter}`}static{this.counter=0}}}});function dt(e,t){return{method:fa(e.commands)||"",commands:t}}function Oh(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function In(e,t,r,s){return i=>{r("%s received %L bytes",t,i),s("%B",i),e.push(i)}}var zs,Rh=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";nt(),J(),T(),Th(),zs=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Ja}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($a(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 Xe?Object.assign(t,{task:e}):new Xe(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),Da(e)?Us(e.parser,n):Us(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",Ht(h)),c(new kr(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 kr(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=(0,eo.spawn)(t,r,a);h.stdout.on("data",In(c,"stdOut",i,n.step("stdOut"))),h.stderr.on("data",In(f,"stdErr",i,n.step("stdErr"))),h.on("error",Oh(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}}}}),to={};ee(to,{GitExecutor:()=>ro});var ro,Ph=g({"src/lib/runners/git-executor.ts"(){"use strict";Rh(),ro=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new zs(this,this._scheduler,this._plugins)}chain(){return new zs(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Ih(e,t,r=gt){let s=n=>{r(null,n)},i=n=>{n?.task===e&&r(n instanceof Gt?Nh(n):n,void 0)};t.then(s,i)}function Nh(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 Lh=g({"src/lib/task-callback.ts"(){"use strict";At(),T()}});function Nn(e,t){return Na(r=>{if(!ti(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var Dh=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";T(),J()}});function Ls(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Or(t,"-B")),_e(t)}function $h(){return{checkout(){return this._runTask(Ls(Ce(arguments,1)),X(arguments))},checkoutBranch(e,t){return this._runTask(Ls(["-b",e,t,...Ce(arguments)]),X(arguments))},checkoutLocalBranch(e){return this._runTask(Ls(["-b",e,...Ce(arguments)]),X(arguments))}}}var Fh=g({"src/lib/tasks/checkout.ts"(){"use strict";T(),J()}});function Mh(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Vh(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return Ee(Mh(),[so],e)}})}}}var so,jh=g({"src/lib/tasks/count-objects.ts"(){"use strict";T(),so=new N(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let s=ma(t);e.hasOwnProperty(s)&&(e[s]=z(r))})}});function Bh(e){return Ee({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},io,e)}var io,Uh=g({"src/lib/parsers/parse-commit.ts"(){"use strict";T(),io=[new N(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,s])=>{e.branch=t,e.commit=s,e.root=!!r}),new N(/\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 N(/(\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 N(/^(\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 Gh(e,t,r){return{commands:["-c","core.abbrev=40","commit",...jt(e,"-m"),...t,...r],format:"utf-8",parser:Bh}}function Wh(){return{commit(t,...r){let s=X(arguments),i=e(t)||Gh(Ue(t),Ue(Ge(r[0],Cr,[])),[...Ge(r[1],qt,[]),...Ce(arguments,0,!0)]);return this._runTask(i,s)}};function e(t){return!Cr(t)&&ke("git.commit: requires the commit message to be supplied as a string/string[]")}}var Hh=g({"src/lib/tasks/commit.ts"(){"use strict";Uh(),T(),J()}});function qh(){return{firstCommit(){return this._runTask(_e(["rev-list","--max-parents=0","HEAD"],!0),X(arguments))}}}var zh=g({"src/lib/tasks/first-commit.ts"(){"use strict";T(),J()}});function Kh(e,t){let r=["hash-object",e];return t&&r.push("-w"),_e(r,!0)}var Yh=g({"src/lib/tasks/hash-object.ts"(){"use strict";J()}});function Qh(e,t,r){let s=String(r).trim(),i;if(i=no.exec(s))return new vr(e,t,!1,i[1]);if(i=ao.exec(s))return new vr(e,t,!0,i[1]);let n="",a=s.split(" ");for(;a.length;)if(a.shift()==="in"){n=a.join(" ");break}return new vr(e,t,/^re/i.test(s),n)}var vr,no,ao,Xh=g({"src/lib/responses/InitSummary.ts"(){"use strict";vr=class{constructor(e,t,r,s){this.bare=e,this.path=t,this.existing=r,this.gitDir=s}},no=/^Init.+ repository in (.+)$/,ao=/^Rein.+ in (.+)$/}});function Zh(e){return e.includes(hi)}function Jh(e=!1,t,r){let s=["init",...r];return e&&!Zh(s)&&s.splice(1,0,hi),{commands:s,format:"utf-8",parser(i){return Qh(s.includes("--bare"),t,i)}}}var hi,ef=g({"src/lib/tasks/init.ts"(){"use strict";Xh(),hi="--bare"}});function fi(e){for(let t=0;t<e.length;t++){let r=pi.exec(e[t]);if(r)return`--${r[1]}`}return""}function tf(e){return pi.test(e)}var pi,zt=g({"src/lib/args/log-format.ts"(){"use strict";pi=/^--(stat|numstat|name-only|name-status)(=|$)/}}),oo,rf=g({"src/lib/responses/DiffSummary.ts"(){"use strict";oo=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function uo(e=""){let t=co[e];return r=>Ee(new oo,t,r,!1)}var Ds,Ln,Dn,$n,co,lo=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";zt(),rf(),Wa(),T(),Ds=[new N(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,s=""])=>{e.files.push({file:t.trim(),changes:z(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:!1})}),new N(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,s])=>{e.files.push({file:t.trim(),before:z(r),after:z(s),binary:!0})}),new N(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let s=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=z(t),e.insertions=z(s?.[1]),e.deletions=z(i?.[1])})],Ln=[new N(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,s])=>{let i=z(t),n=z(r);e.changed++,e.insertions+=i,e.deletions+=n,e.files.push({file:s,changes:i+n,insertions:i,deletions:n,binary:!1})}),new N(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Dn=[new N(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],$n=[new N(/([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:Vs(vh(t)&&t),from:Vs(!!n&&s!==n&&s),similarity:z(r)})})],co={"":Ds,"--stat":Ds,"--numstat":Ln,"--name-status":$n,"--name-only":Dn}}});function sf(e,t){return t.reduce((r,s,i)=>(r[s]=e[i]||"",r),Object.create({diff:null}))}function ho(e=gi,t=fo,r=""){let s=uo(r);return function(i){let n=Wt(i.trim(),!1,di).map(function(a){let u=a.split(mi),c=sf(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 di,mi,gi,fo,po=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";T(),lo(),zt(),di="\xF2\xF2\xF2\xF2\xF2\xF2 ",mi=" \xF2\xF2",gi=" \xF2 ",fo=["hash","date","message","refs","author_name","author_email"]}}),mo={};ee(mo,{diffSummaryTask:()=>nf,validateLogFormatConfig:()=>Lr});function nf(e){let t=fi(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Lr(r)||{commands:r,format:"utf-8",parser:uo(t)}}function Lr(e){let t=e.filter(tf);if(t.length>1)return ke(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ke(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var xi=g({"src/lib/tasks/diff.ts"(){"use strict";zt(),lo(),J()}});function af(e,t){let r=[],s=[];return Object.keys(e).forEach(i=>{r.push(i),s.push(String(e[i]))}),[r,s.join(t)]}function of(e){return Object.keys(e).reduce((t,r)=>(r in Ks||(t[r]=e[r]),t),{})}function go(e={},t=[]){let r=Ge(e.splitter,pe,gi),s=Pr(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]=af(s,r),a=[],u=[`--pretty=format:${di}${n}${mi}`,...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 pe(e.file)&&u.push("--follow",Kl(e.file)),si(of(e),u),{fields:i,splitter:r,commands:[...u,...a]}}function uf(e,t,r){let s=ho(e,t,fi(r));return{commands:["log",...r],format:"utf-8",parser:s}}function cf(){return{log(...r){let s=X(arguments),i=go(ii(arguments),Ge(arguments[0],qt)),n=t(...r)||Lr(i.commands)||e(i);return this._runTask(n,s)}};function e(r){return uf(r.splitter,r.fields,r.commands)}function t(r,s){return pe(r)&&pe(s)&&ke("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Ks,xo=g({"src/lib/tasks/log.ts"(){"use strict";zt(),Ut(),po(),T(),J(),xi(),Ks=(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))(Ks||{})}}),br,_o,lf=g({"src/lib/responses/MergeSummary.ts"(){"use strict";br=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},_o=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"}}}}),Ys,yo,hf=g({"src/lib/responses/PullSummary.ts"(){"use strict";Ys=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},yo=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function $s(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 Fn(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:z(t&&t[1]||"0"),delta:z(r&&r[1]||"0")}}var vo,ff=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";T(),vo=[new it(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=$s(e.remoteMessages);Object.assign(i,{[s]:z(r)})}),new it(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=$s(e.remoteMessages);Object.assign(i,{[s]:z(r)})}),new it(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,s])=>{let i=$s(e.remoteMessages);i.total=Fn(t),i.reused=Fn(r),i.packReused=z(s)})]}});function bo(e,t){return Ee({remoteMessages:new Co},wo,t)}var wo,Co,ko=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";T(),ff(),wo=[new it(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...vo,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:z(t),summary:r,url:s}})],Co=class{constructor(){this.all=[]}}}});function pf(e,t){let r=Ee(new yo,Eo,[e,t]);return r.message&&r}var Mn,Vn,jn,Bn,Eo,Un,_i,So=g({"src/lib/parsers/parse-pull.ts"(){"use strict";hf(),T(),ko(),Mn=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Vn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,jn=/^(create|delete) mode \d+ (.+)/,Bn=[new N(Mn,(e,[t,r,s])=>{e.files.push(t),r&&(e.insertions[t]=r.length),s&&(e.deletions[t]=s.length)}),new N(Vn,(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 N(jn,(e,[t,r])=>{B(e.files,r),B(t==="create"?e.created:e.deleted,r)})],Eo=[new N(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new N(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new N(/([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})],Un=(e,t)=>Ee(new Ys,Bn,[e,t]),_i=(e,t)=>Object.assign(new Ys,Un(e,t),bo(e,t))}}),Gn,Ao,Wn,df=g({"src/lib/parsers/parse-merge.ts"(){"use strict";lf(),T(),So(),Gn=[new N(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new N(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new br(t,r))}),new N(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,s])=>{e.conflicts.push(new br(t,r,{deleteRef:s}))}),new N(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new br(t,null))}),new N(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Ao=(e,t)=>Object.assign(Wn(e,t),_i(e,t)),Wn=e=>Ee(new _o,Gn,e)}});function Hn(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let s=Ao(t,r);if(s.failed)throw new Gt(s);return s}}:ke("Git.merge requires at least one option")}var mf=g({"src/lib/tasks/merge.ts"(){"use strict";At(),df(),J()}});function gf(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 qn,To,zn,xf=g({"src/lib/parsers/parse-push.ts"(){"use strict";T(),ko(),qn=[new N(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new N(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new N(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,s])=>{e.pushed.push(gf(t,r,s))}),new N(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,s])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:s}}),new N(/^([^:]+):(\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}}})],To=(e,t)=>{let r=zn(e,t),s=bo(e,t);return{...r,...s}},zn=(e,t)=>Ee({pushed:[]},qn,[e,t])}}),Oo={};ee(Oo,{pushTagsTask:()=>_f,pushTask:()=>yi});function _f(e={},t){return B(t,"--tags"),yi(e,t)}function yi(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Or(r,"-v"),B(r,"--verbose"),B(r,"--porcelain"),{commands:r,format:"utf-8",parser:To}}var Ro=g({"src/lib/tasks/push.ts"(){"use strict";xf(),T()}});function yf(){return{showBuffer(){let e=["show",...Ce(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(La(e),X(arguments))},show(){let e=["show",...Ce(arguments,1)];return this._runTask(_e(e),X(arguments))}}}var vf=g({"src/lib/tasks/show.ts"(){"use strict";T(),J()}}),Kn,Po,bf=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Kn=/^(.+)\0(.+)$/,Po=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let s=Kn.exec(e)||[null,e,e];this.from=s[2]||"",this.path=s[1]||""}}}}});function Yn(e){let[t,r]=e.split(St);return{from:r||t,to:t}}function Re(e,t,r){return[`${e}${t}`,r]}function Fs(e,...t){return t.map(r=>Re(e,r,(s,i)=>B(s.conflicted,i)))}function wf(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=Io.get(u);c&&c(e,a),u!=="##"&&u!=="!!"&&e.files.push(new Po(a,i,n))}}var Qn,Io,No,Cf=g({"src/lib/responses/StatusSummary.ts"(){"use strict";T(),bf(),Qn=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}},Io=new Map([Re(" ","A",(e,t)=>B(e.created,t)),Re(" ","D",(e,t)=>B(e.deleted,t)),Re(" ","M",(e,t)=>B(e.modified,t)),Re("A"," ",(e,t)=>B(e.created,t)&&B(e.staged,t)),Re("A","M",(e,t)=>B(e.created,t)&&B(e.staged,t)&&B(e.modified,t)),Re("D"," ",(e,t)=>B(e.deleted,t)&&B(e.staged,t)),Re("M"," ",(e,t)=>B(e.modified,t)&&B(e.staged,t)),Re("M","M",(e,t)=>B(e.modified,t)&&B(e.staged,t)),Re("R"," ",(e,t)=>{B(e.renamed,Yn(t))}),Re("R","M",(e,t)=>{let r=Yn(t);B(e.renamed,r),B(e.modified,r.to)}),Re("!","!",(e,t)=>{B(e.ignored=e.ignored||[],t)}),Re("?","?",(e,t)=>B(e.not_added,t)),...Fs("A","A","U"),...Fs("D","D","U"),...Fs("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)}]]),No=function(e){let t=e.split(St),r=new Qn;for(let s=0,i=t.length;s<i;){let n=t[s++].trim();n&&(n.charAt(0)==="R"&&(n+=St+(t[s++]||"")),wf(r,n))}return r}}});function kf(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!Lo.includes(r))],parser(r){return No(r)}}}var Lo,Ef=g({"src/lib/tasks/status.ts"(){"use strict";Cf(),Lo=["--null","-z"]}});function Sr(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 Sf(){return Sr(0,0,0,"",!1)}function Af(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Tf,onError(e,t,r,s){if(e.exitCode===-2)return r(Buffer.from(vi));s(t)}})}}}function Tf(e){return e===vi?Sf():Ee(Sr(0,0,0,e),Do,e)}var vi,Do,Of=g({"src/lib/tasks/version.ts"(){"use strict";T(),vi="installed=false",Do=[new N(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,s,i=""])=>{Object.assign(e,Sr(z(t),z(r),z(s),i))}),new N(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,s,i=""])=>{Object.assign(e,Sr(z(t),z(r),s,i))})]}}),$o={};ee($o,{SimpleGitApi:()=>Qs});var Qs,Rf=g({"src/lib/simple-git-api.ts"(){"use strict";Lh(),Dh(),Fh(),jh(),Hh(),Ua(),zh(),za(),Yh(),ef(),xo(),mf(),Ro(),vf(),Ef(),J(),Of(),T(),Qs=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),s=r.push(e);return t&&Ih(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(_e(["add",...Ue(e)]),X(arguments))}cwd(e){let t=X(arguments);return typeof e=="string"?this._runTask(Nn(e,this._executor),t):typeof e?.path=="string"?this._runTask(Nn(e.path,e.root&&this._executor||void 0),t):this._runTask(ke("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Kh(e,t===!0),X(arguments))}init(e){return this._runTask(Jh(e===!0,this._executor.cwd,Ce(arguments)),X(arguments))}merge(){return this._runTask(Hn(Ce(arguments)),X(arguments))}mergeFromTo(e,t){return pe(e)&&pe(t)?this._runTask(Hn([e,t,...Ce(arguments)]),X(arguments,!1)):this._runTask(ke("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=yi({remote:Ge(arguments[0],pe),branch:Ge(arguments[1],pe)},Ce(arguments));return this._runTask(e,X(arguments))}stash(){return this._runTask(_e(["stash",...Ce(arguments)]),X(arguments))}status(){return this._runTask(kf(Ce(arguments)),X(arguments))}},Object.assign(Qs.prototype,$h(),Wh(),yh(),Vh(),qh(),Ch(),cf(),yf(),Af())}}),Fo={};ee(Fo,{Scheduler:()=>Vo});var Xn,Vo,Pf=g({"src/lib/runners/scheduler.ts"(){"use strict";T(),Za(),Xn=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,Mo.createDeferred)();return{promise:t,done:r,id:e}}})(),Vo=class{constructor(e=2){this.concurrency=e,this.logger=li("","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=B(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Or(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=B(this.pending,Xn());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),jo={};ee(jo,{applyPatchTask:()=>If});function If(e,t){return _e(["apply",...t,...e])}var Nf=g({"src/lib/tasks/apply-patch.ts"(){"use strict";J()}});function Lf(e,t){return{branch:e,hash:t,success:!0}}function Df(e){return{branch:e,hash:null,success:!1}}var Bo,$f=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Bo=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Uo(e,t){return t===1&&Xs.test(e)}var Zn,Xs,Jn,Dr,Ff=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";$f(),T(),Zn=/(\S+)\s+\(\S+\s([^)]+)\)/,Xs=/^error[^']+'([^']+)'/m,Jn=[new N(Zn,(e,[t,r])=>{let s=Lf(t,r);e.all.push(s),e.branches[t]=s}),new N(Xs,(e,[t])=>{let r=Df(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Dr=(e,t)=>Ee(new Bo,Jn,[e,t])}}),Go,Mf=g({"src/lib/responses/BranchSummary.ts"(){"use strict";Go=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 ea(e){return e?e.charAt(0):""}function Wo(e){return Ee(new Go,Ho,e)}var Ho,Vf=g({"src/lib/parsers/parse-branch.ts"(){"use strict";Mf(),T(),Ho=[new N(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,s,i])=>{e.push(ea(t),!0,r,s,i)}),new N(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,s,i])=>{e.push(ea(t),!1,r,s,i)})]}}),qo={};ee(qo,{branchLocalTask:()=>Bf,branchTask:()=>jf,containsDeleteBranchCommand:()=>zo,deleteBranchTask:()=>Gf,deleteBranchesTask:()=>Uf});function zo(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function jf(e){let t=zo(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?Dr(s,i).all[0]:Wo(s)}}}function Bf(){return{format:"utf-8",commands:["branch","-v"],parser:Wo}}function Uf(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,s){return Dr(r,s)},onError({exitCode:r,stdOut:s},i,n,a){if(!Uo(String(i),r))return a(i);n(s)}}}function Gf(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(s,i){return Dr(s,i).branches[e]},onError({exitCode:s,stdErr:i,stdOut:n},a,u,c){if(!Uo(String(a),s))return c(a);throw new Gt(r.parser(Bt(n),Bt(i)),String(a))}};return r}var Wf=g({"src/lib/tasks/branch.ts"(){"use strict";At(),Ff(),Vf(),T()}}),Ko,Hf=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";Ko=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Yo={};ee(Yo,{checkIgnoreTask:()=>qf});function qf(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Ko}}var zf=g({"src/lib/tasks/check-ignore.ts"(){"use strict";Hf()}}),Qo={};ee(Qo,{cloneMirrorTask:()=>Yf,cloneTask:()=>Xo});function Kf(e){return/^--upload-pack(=|$)/.test(e)}function Xo(e,t,r){let s=["clone",...r];return pe(e)&&s.push(e),pe(t)&&s.push(t),s.find(Kf)?ke("git.fetch: potential exploit argument blocked."):_e(s)}function Yf(e,t,r){return B(r,"--mirror"),Xo(e,t,r)}var Qf=g({"src/lib/tasks/clone.ts"(){"use strict";J(),T()}});function Xf(e,t){return Ee({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Zo,[e,t])}var Zo,Zf=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";T(),Zo=[new N(/From (.+)$/,(e,[t])=>{e.remote=t}),new N(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new N(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new N(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new N(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,s,i])=>{e.updated.push({name:s,tracking:i,to:r,from:t})})]}}),Jo={};ee(Jo,{fetchTask:()=>ep});function Jf(e){return/^--upload-pack(=|$)/.test(e)}function ep(e,t,r){let s=["fetch",...r];return e&&t&&s.push(e,t),s.find(Jf)?ke("git.fetch: potential exploit argument blocked."):{commands:s,format:"utf-8",parser:Xf}}var tp=g({"src/lib/tasks/fetch.ts"(){"use strict";Zf(),J()}});function rp(e){return Ee({moves:[]},eu,e)}var eu,sp=g({"src/lib/parsers/parse-move.ts"(){"use strict";T(),eu=[new N(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),tu={};ee(tu,{moveTask:()=>ip});function ip(e,t){return{commands:["mv","-v",...Ue(e),t],format:"utf-8",parser:rp}}var np=g({"src/lib/tasks/move.ts"(){"use strict";sp(),T()}}),ru={};ee(ru,{pullTask:()=>ap});function ap(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 _i(i,n)},onError(i,n,a,u){let c=pf(Bt(i.stdOut),Bt(i.stdErr));if(c)return u(new Gt(c));u(n)}}}var op=g({"src/lib/tasks/pull.ts"(){"use strict";At(),So(),T()}});function up(e){let t={};return su(e,([r])=>t[r]={name:r}),Object.values(t)}function cp(e){let t={};return su(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 su(e,t){ei(e,r=>t(r.split(/\s+/)))}var lp=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";T()}}),iu={};ee(iu,{addRemoteTask:()=>hp,getRemotesTask:()=>fp,listRemotesTask:()=>pp,remoteTask:()=>dp,removeRemoteTask:()=>mp});function hp(e,t,r){return _e(["remote","add",...r,e,t])}function fp(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?cp:up}}function pp(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),_e(t)}function dp(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),_e(t)}function mp(e){return _e(["remote","remove",e])}var gp=g({"src/lib/tasks/remote.ts"(){"use strict";lp(),J()}}),nu={};ee(nu,{stashListTask:()=>xp});function xp(e={},t){let r=go(e),s=["stash","list",...r.commands,...t],i=ho(r.splitter,r.fields,fi(s));return Lr(s)||{commands:s,format:"utf-8",parser:i}}var _p=g({"src/lib/tasks/stash-list.ts"(){"use strict";zt(),po(),xi(),xo()}}),au={};ee(au,{addSubModuleTask:()=>yp,initSubModuleTask:()=>vp,subModuleTask:()=>$r,updateSubModuleTask:()=>bp});function yp(e,t){return $r(["add",e,t])}function vp(e){return $r(["init",...e])}function $r(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),_e(t)}function bp(e){return $r(["update",...e])}var wp=g({"src/lib/tasks/sub-module.ts"(){"use strict";J()}});function Cp(e,t){let r=isNaN(e),s=isNaN(t);return r!==s?r?1:-1:r?ou(e,t):0}function ou(e,t){return e===t?0:e>t?1:-1}function kp(e){return e.trim()}function xr(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var ta,uu,Ep=g({"src/lib/responses/TagList.ts"(){"use strict";ta=class{constructor(e,t){this.all=e,this.latest=t}},uu=function(e,t=!1){let r=e.split(`
35
+ `).map(kp).filter(Boolean);t||r.sort(function(i,n){let a=i.split("."),u=n.split(".");if(a.length===1||u.length===1)return Cp(xr(a[0]),xr(u[0]));for(let c=0,f=Math.max(a.length,u.length);c<f;c++){let l=ou(xr(a[c]),xr(u[c]));if(l)return l}return 0});let s=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new ta(r,s)}}}),cu={};ee(cu,{addAnnotatedTagTask:()=>Tp,addTagTask:()=>Ap,tagListTask:()=>Sp});function Sp(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return uu(r,t)}}}function Ap(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function Tp(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Op=g({"src/lib/tasks/tag.ts"(){"use strict";Ep()}}),Rp=ql({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(Ph(),Q(to)),{SimpleGitApi:s}=(Rf(),Q($o)),{Scheduler:i}=(Pf(),Q(Fo)),{configurationErrorTask:n}=(J(),Q(Ws)),{asArray:a,filterArray:u,filterPrimitives:c,filterString:f,filterStringOrStringArray:l,filterType:h,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:R}=(T(),Q(ka)),{applyPatchTask:L}=(Nf(),Q(jo)),{branchTask:V,branchLocalTask:G,deleteBranchesTask:oe,deleteBranchTask:te}=(Wf(),Q(qo)),{checkIgnoreTask:ae}=(zf(),Q(Yo)),{checkIsRepoTask:Pe}=(Ta(),Q(Ea)),{cloneTask:me,cloneMirrorTask:Te}=(Qf(),Q(Qo)),{cleanWithOptionsTask:W,isCleanOptionsArray:D}=(Va(),Q(Fa)),{diffSummaryTask:yt}=(xi(),Q(mo)),{fetchTask:ar}=(tp(),Q(Jo)),{moveTask:A}=(np(),Q(tu)),{pullTask:v}=(op(),Q(ru)),{pushTagsTask:x}=(Ro(),Q(Oo)),{addRemoteTask:E,getRemotesTask:y,listRemotesTask:P,remoteTask:I,removeRemoteTask:H}=(gp(),Q(iu)),{getResetMode:Y,resetTask:re}=(Xa(),Q(Ka)),{stashListTask:ue}=(_p(),Q(nu)),{addSubModuleTask:be,initSubModuleTask:st,subModuleTask:ze,updateSubModuleTask:lt}=(wp(),Q(au)),{addAnnotatedTagTask:Ke,addTagTask:he,tagListTask:Be}=(Op(),Q(cu)),{straightThroughBufferTask:ht,straightThroughStringTask:ge}=(J(),Q(Ws));function S(m,k){this._plugins=k,this._executor=new r(m.baseDir,new i(m.maxConcurrentProcesses),k),this._trimmed=m.trimmed}(S.prototype=Object.create(s.prototype)).constructor=S,S.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},S.prototype.env=function(m,k){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=k,this},S.prototype.stashList=function(m){return this._runTask(ue(R(arguments)||{},u(m)&&m||[]),d(arguments))};function Xi(m,k,q,xe){return typeof q!="string"?n(`git.${m}() requires a string 'repoPath'`):k(q,h(xe,f),p(arguments))}S.prototype.clone=function(){return this._runTask(Xi("clone",me,...arguments),d(arguments))},S.prototype.mirror=function(){return this._runTask(Xi("mirror",Te,...arguments),d(arguments))},S.prototype.mv=function(m,k){return this._runTask(A(m,k),d(arguments))},S.prototype.checkoutLatestTag=function(m){var k=this;return this.pull(function(){k.tags(function(q,xe){k.checkout(xe.latest,m)})})},S.prototype.pull=function(m,k,q,xe){return this._runTask(v(h(m,f),h(k,f),p(arguments)),d(arguments))},S.prototype.fetch=function(m,k){return this._runTask(ar(h(m,f),h(k,f),p(arguments)),d(arguments))},S.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},S.prototype.tags=function(m,k){return this._runTask(Be(p(arguments)),d(arguments))},S.prototype.rebase=function(){return this._runTask(ge(["rebase",...p(arguments)]),d(arguments))},S.prototype.reset=function(m){return this._runTask(re(Y(m),p(arguments)),d(arguments))},S.prototype.revert=function(m){let k=d(arguments);return typeof m!="string"?this._runTask(n("Commit must be a string"),k):this._runTask(ge(["revert",...p(arguments,0,!0),m]),k)},S.prototype.addTag=function(m){let k=typeof m=="string"?he(m):n("Git.addTag requires a tag name");return this._runTask(k,d(arguments))},S.prototype.addAnnotatedTag=function(m,k){return this._runTask(Ke(m,k),d(arguments))},S.prototype.deleteLocalBranch=function(m,k,q){return this._runTask(te(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.deleteLocalBranches=function(m,k,q){return this._runTask(oe(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.branch=function(m,k){return this._runTask(V(p(arguments)),d(arguments))},S.prototype.branchLocal=function(m){return this._runTask(G(),d(arguments))},S.prototype.raw=function(m){let k=!Array.isArray(m),q=[].slice.call(k?arguments:m,0);for(let Me=0;Me<q.length&&k;Me++)if(!c(q[Me])){q.splice(Me,q.length-Me);break}q.push(...p(arguments,0,!0));var xe=d(arguments);return q.length?this._runTask(ge(q,this._trimmed),xe):this._runTask(n("Raw: must supply one or more command to execute"),xe)},S.prototype.submoduleAdd=function(m,k,q){return this._runTask(be(m,k),d(arguments))},S.prototype.submoduleUpdate=function(m,k){return this._runTask(lt(p(arguments,!0)),d(arguments))},S.prototype.submoduleInit=function(m,k){return this._runTask(st(p(arguments,!0)),d(arguments))},S.prototype.subModule=function(m,k){return this._runTask(ze(p(arguments)),d(arguments))},S.prototype.listRemote=function(){return this._runTask(P(p(arguments)),d(arguments))},S.prototype.addRemote=function(m,k,q){return this._runTask(E(m,k,p(arguments)),d(arguments))},S.prototype.removeRemote=function(m,k){return this._runTask(H(m),d(arguments))},S.prototype.getRemotes=function(m,k){return this._runTask(y(m===!0),d(arguments))},S.prototype.remote=function(m,k){return this._runTask(I(p(arguments)),d(arguments))},S.prototype.tag=function(m,k){let q=p(arguments);return q[0]!=="tag"&&q.unshift("tag"),this._runTask(ge(q),d(arguments))},S.prototype.updateServerInfo=function(m){return this._runTask(ge(["update-server-info"]),d(arguments))},S.prototype.pushTags=function(m,k){let q=x({remote:h(m,f)},p(arguments));return this._runTask(q,d(arguments))},S.prototype.rm=function(m){return this._runTask(ge(["rm","-f",...a(m)]),d(arguments))},S.prototype.rmKeepLocal=function(m){return this._runTask(ge(["rm","--cached",...a(m)]),d(arguments))},S.prototype.catFile=function(m,k){return this._catFile("utf-8",arguments)},S.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},S.prototype._catFile=function(m,k){var q=d(k),xe=["cat-file"],Me=k[0];if(typeof Me=="string")return this._runTask(n("Git.catFile: options must be supplied as an array of strings"),q);Array.isArray(Me)&&xe.push.apply(xe,Me);let rs=m==="buffer"?ht(xe):ge(xe);return this._runTask(rs,q)},S.prototype.diff=function(m,k){let q=f(m)?n("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):ge(["diff",...p(arguments)]);return this._runTask(q,d(arguments))},S.prototype.diffSummary=function(){return this._runTask(yt(p(arguments,1)),d(arguments))},S.prototype.applyPatch=function(m){let k=l(m)?L(a(m),p([].slice.call(arguments,1))):n("git.applyPatch requires one or more string patches as the first argument");return this._runTask(k,d(arguments))},S.prototype.revparse=function(){let m=["rev-parse",...p(arguments,!0)];return this._runTask(ge(m,!0),d(arguments))},S.prototype.clean=function(m,k,q){let xe=D(m),Me=xe&&m.join("")||h(m,f)||"",rs=p([].slice.call(arguments,xe?1:0));return this._runTask(W(Me,rs),d(arguments))},S.prototype.exec=function(m){let k={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(k)},S.prototype.clearQueue=function(){return this},S.prototype.checkIgnore=function(m,k){return this._runTask(ae(a(h(m,l,[]))),d(arguments))},S.prototype.checkIsRepo=function(m,k){return this._runTask(Pe(h(m,f)),d(arguments))},t.exports=S}});Ut();nt();var Pp=class extends Xe{constructor(e,t){super(void 0,t),this.config=e}};nt();nt();var Qe=class extends Xe{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};At();oa();Ta();Va();Ua();Wa();za();Xa();function Ip(e){return e?[{type:"spawn.before",action(s,i){e.aborted&&i.kill(new Qe(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,i){function n(){i.kill(new Qe(void 0,"abort","Abort signal received"))}e.addEventListener("abort",n),i.spawned.on("close",()=>e.removeEventListener("abort",n))}}]:void 0}function Np(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function Lp(e,t){if(Np(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Qe(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Dp(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Qe(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 Qe(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 Qe(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function $p({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||Lp(i,a),t||Dp(i,s.method)}),r}}}T();function Fp(e){let t=jt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}T();var ra=(0,Et.deferred)().promise;function Mp({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?ra:n.closeTimeout.promise,t===!1?ra: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(()=>Ms(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 Ms(50),a(u.exitCode)}catch(l){a(u.exitCode,l)}}}}T();var Vp="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",sa="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function jp(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function ia(e,t){if(e.length<1||e.length>2)throw new Qe(void 0,"binary",Vp);if(e.some(jp))if(t)console.warn(sa);else throw new Qe(void 0,"binary",sa);let[s,i]=e;return{binary:s,prefix:i}}function Bp(e,t=["git"],r=!1){let s=ia(Ue(t),r);e.on("binary",i=>{s=ia(Ue(i),r)}),e.append("spawn.binary",()=>s.binary),e.append("spawn.args",i=>s.prefix?[s.prefix,...i]:i)}nt();function Up(e){return!!(e.exitCode&&e.stdErr.length)}function Gp(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Wp(e=!1,t=Up,r=Gp){return(s,i)=>!e&&s||!t(i)?s:r(i)}function na(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 Xe(void 0,s.toString("utf-8"))}:{error:s}}}}T();var Hp=class{constructor(){this.plugins=new Set,this.events=new lu.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=B(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Ue(e).forEach(r=>r&&this.plugins.add(B(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}};T();function qp(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(n,a){return r.includes(a.method)?da(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:zp(c[1]),progress:z(c[2]),processed:z(c[3]),total:z(c[4])})})}}]}function zp(e){return String(e.toLowerCase().split(" ",1))||"unknown"}T();function Kp(e){let t=xa(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function Yp({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 Qe(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()}}}Ut();function Qp(){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(wr(n)){s(On(n));continue}if(n==="--"){s(e.slice(i+1).flatMap(a=>wr(a)&&On(a)||a));break}t.push(n)}return r?[...t,"--",...r.map(String)]:t}}}T();var Xp=Rp();function Zp(e,t){let r=new Hp,s=wa(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!ti(s.baseDir))throw new Pp(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&r.add(Fp(s.config)),r.add($p(s.unsafe)),r.add(Qp()),r.add(Mp(s.completion)),s.abort&&r.add(Ip(s.abort)),s.progress&&r.add(qp(s.progress)),s.timeout&&r.add(Yp(s.timeout)),s.spawnOptions&&r.add(Kp(s.spawnOptions)),r.add(na(Wp(!0))),s.errors&&r.add(na(s.errors)),Bp(r,s.binary,s.unsafe?.allowUnsafeCustomBinary),new Xp(s,r)}At();var hu=Zp;var pu="@lntvow/dev",du="5.0.0";_();var Dt=ie(require("fs"),1),Oc=require("module"),ne=ie(require("path"),1),_t=ie(require("process"),1),Rc=ie(require("fs/promises"),1),Pc=require("url");_();_();var Jp=[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],vu=[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],ed="\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",bu="\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",bi={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"},wi="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",td={5:wi,"5module":wi+" export import",6:wi+" const class extends export import super"},rd=/^in(stanceof)?$/,sd=new RegExp("["+bu+"]"),id=new RegExp("["+bu+ed+"]");function ki(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 We(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&sd.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)}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&&id.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)||ki(e,Jp)}var j=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 Ne(e,t){return new j(e,{beforeExpr:!0,binop:t})}var Le={beforeExpr:!0},Se={startsExpr:!0},Ti={};function M(e,t){return t===void 0&&(t={}),t.keyword=e,Ti[e]=new j(e,t)}var o={num:new j("num",Se),regexp:new j("regexp",Se),string:new j("string",Se),name:new j("name",Se),privateId:new j("privateId",Se),eof:new j("eof"),bracketL:new j("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new j("]"),braceL:new j("{",{beforeExpr:!0,startsExpr:!0}),braceR:new j("}"),parenL:new j("(",{beforeExpr:!0,startsExpr:!0}),parenR:new j(")"),comma:new j(",",Le),semi:new j(";",Le),colon:new j(":",Le),dot:new j("."),question:new j("?",Le),questionDot:new j("?."),arrow:new j("=>",Le),template:new j("template"),invalidTemplate:new j("invalidTemplate"),ellipsis:new j("...",Le),backQuote:new j("`",Se),dollarBraceL:new j("${",{beforeExpr:!0,startsExpr:!0}),eq:new j("=",{beforeExpr:!0,isAssign:!0}),assign:new j("_=",{beforeExpr:!0,isAssign:!0}),incDec:new j("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new j("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ne("||",1),logicalAND:Ne("&&",2),bitwiseOR:Ne("|",3),bitwiseXOR:Ne("^",4),bitwiseAND:Ne("&",5),equality:Ne("==/!=/===/!==",6),relational:Ne("</>/<=/>=",7),bitShift:Ne("<</>>/>>>",8),plusMin:new j("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ne("%",10),star:Ne("*",10),slash:Ne("/",10),starstar:new j("**",{beforeExpr:!0}),coalesce:Ne("??",1),_break:M("break"),_case:M("case",Le),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",Le),_do:M("do",{isLoop:!0,beforeExpr:!0}),_else:M("else",Le),_finally:M("finally"),_for:M("for",{isLoop:!0}),_function:M("function",Se),_if:M("if"),_return:M("return",Le),_switch:M("switch"),_throw:M("throw",Le),_try:M("try"),_var:M("var"),_const:M("const"),_while:M("while",{isLoop:!0}),_with:M("with"),_new:M("new",{beforeExpr:!0,startsExpr:!0}),_this:M("this",Se),_super:M("super",Se),_class:M("class",Se),_extends:M("extends",Le),_export:M("export"),_import:M("import",Se),_null:M("null",Se),_true:M("true",Se),_false:M("false",Se),_in:M("in",{beforeExpr:!0,binop:7}),_instanceof:M("instanceof",{beforeExpr:!0,binop:7}),_typeof:M("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:M("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:M("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ae=/\r\n?|\n|\u2028|\u2029/,nd=new RegExp(Ae.source,"g");function Tt(e){return e===10||e===13||e===8232||e===8233}function wu(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 Cu=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ku=Object.prototype,ad=ku.hasOwnProperty,od=ku.toString,Ot=Object.hasOwn||function(e,t){return ad.call(e,t)},mu=Array.isArray||function(e){return od.call(e)==="[object Array]"},gu=Object.create(null);function at(e){return gu[e]||(gu[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ze(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ud=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Yt=function(t,r){this.line=t,this.column=r};Yt.prototype.offset=function(t){return new Yt(this.line,this.column+t)};var Ur=function(t,r,s){this.start=r,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Eu(e,t){for(var r=1,s=0;;){var i=wu(e,s,t);if(i<0)return new Yt(r,t-s);++r,s=i}}var Ei={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},xu=!1;function cd(e){var t={};for(var r in Ei)t[r]=e&&Ot(e,r)?e[r]:Ei[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!xu&&typeof console=="object"&&console.warn&&(xu=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
36
+ 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),mu(t.onToken)){var s=t.onToken;t.onToken=function(i){return s.push(i)}}return mu(t.onComment)&&(t.onComment=ld(t,t.onComment)),t}function ld(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 Ur(this,a,u)),e.ranges&&(c.range=[i,n]),t.push(c)}}var Qt=1,Rt=2,Oi=4,Su=8,Ri=16,Au=32,Gr=64,Tu=128,xt=256,Xt=512,Wr=Qt|Rt|xt;function Pi(e,t){return Rt|(e?Oi:0)|(t?Su:0)}var Mr=0,Ii=1,et=2,Ou=3,Ru=4,Pu=5,le=function(t,r,s){this.options=t=cd(t),this.sourceFile=t.sourceFile,this.keywords=at(td[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=bi[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=at(i);var n=(i?i+" ":"")+bi.strict;this.reservedWordsStrict=at(n),this.reservedWordsStrictBind=at(n+" "+bi.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
37
+ `,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ae).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(Qt),this.regexpState=null,this.privateNameStack=[]},He={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}};le.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};He.inFunction.get=function(){return(this.currentVarScope().flags&Rt)>0};He.inGenerator.get=function(){return(this.currentVarScope().flags&Su)>0};He.inAsync.get=function(){return(this.currentVarScope().flags&Oi)>0};He.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Xt))return!1;if(r&Rt)return(r&Oi)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};He.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Gr)>0||this.options.allowSuperOutsideMethod};He.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tu)>0};He.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};He.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Xt)||r&Rt&&!(r&Ri))return!0}return!1};He.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xt)>0};le.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};le.parse=function(t,r){return new this(r,t).parse()};le.parseExpressionAt=function(t,r,s){var i=new this(s,t,r);return i.nextToken(),i.parseExpression()};le.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(le.prototype,He);var ye=le.prototype,hd=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ye.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){de.lastIndex=e,e+=de.exec(this.input)[0].length;var t=hd.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){de.lastIndex=e+t[0].length;var r=de.exec(this.input),s=r.index+r[0].length,i=this.input.charAt(s);return i===";"||i==="}"||Ae.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,de.lastIndex=e,e+=de.exec(this.input)[0].length,this.input[e]===";"&&e++}};ye.eat=function(e){return this.type===e?(this.next(),!0):!1};ye.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};ye.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};ye.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};ye.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||Ae.test(this.input.slice(this.lastTokEnd,this.start))};ye.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ye.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};ye.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};ye.expect=function(e){this.eat(e)||this.unexpected()};ye.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Hr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ye.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")}};ye.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")};ye.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")};ye.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var w=le.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 Ni={kind:"loop"},fd={kind:"switch"};w.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;de.lastIndex=this.pos;var t=de.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(We(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(!rd.test(n))return!0}return!1};w.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;de.lastIndex=this.pos;var e=de.exec(this.input),t=this.pos+e[0].length,r;return!Ae.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;de.lastIndex=this.pos;var r=de.exec(this.input),s=this.pos+r[0].length;if(Ae.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;de.lastIndex=i;var a=de.exec(this.input);if(a&&Ae.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 We(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){de.lastIndex=this.pos;var a=de.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(Ni),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(Ni),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 Hr,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,Kt|(r?0:Si),!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(fd),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(),Ae.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 pd=[];w.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Au:0),this.checkLValPattern(e,t?Ru:et),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(Ni),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"?Ii:et,!1)};var Kt=1,Si=2,Iu=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&Si&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&Kt&&(e.id=t&Iu&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Si)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ii:et:Ou));var n=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Pi(e.async,e.generator)),t&Kt||(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&Kt?"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"&&dd(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&&Vr(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&&Vr(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 Vr(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Vr(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope(Xt|Gr),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|Gr);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,et,!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 dd(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 Vr(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,Kt|Iu,!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=pd,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,et),this.finishNode(e,"ImportSpecifier")};w.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,et),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,et),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 ud.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 $e=le.prototype;$e.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};$e.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};$e.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};$e.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")};$e.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()};$e.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};$e.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};$e.parseBindingListItem=function(e){return e};$e.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")};$e.checkLValSimple=function(e,t,r){t===void 0&&(t=Mr);var s=t!==Mr;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===et&&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!==Pu&&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")}};$e.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Mr),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)}};$e.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Mr),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 je=function(t,r,s,i,n){this.token=t,this.isExpr=!!r,this.preserveSpace=!!s,this.override=i,this.generator=!!n},K={b_stat:new je("{",!1),b_expr:new je("{",!0),b_tmpl:new je("${",!1),p_stat:new je("(",!1),p_expr:new je("(",!0),q_tmpl:new je("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new je("function",!1),f_expr:new je("function",!0),f_expr_gen:new je("function",!0,!1,null,!0),f_gen:new je("function",!1,!1,null,!0)},Pt=le.prototype;Pt.initialContext=function(){return[K.b_stat]};Pt.curContext=function(){return this.context[this.context.length-1]};Pt.braceIsBlock=function(e){var t=this.curContext();return t===K.f_expr||t===K.f_stat?!0:e===o.colon&&(t===K.b_stat||t===K.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?Ae.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===K.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===K.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)?K.b_stat:K.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(K.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?K.p_stat:K.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()!==K.p_stat)&&!(e===o._return&&Ae.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===K.b_stat)?this.context.push(K.f_expr):this.context.push(K.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()===K.q_tmpl?this.context.pop():this.context.push(K.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===K.f_expr?this.context[t]=K.f_expr_gen:this.context[t]=K.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 O=le.prototype;O.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}};O.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};O.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 Hr,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};O.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};O.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)};O.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};O.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")};O.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"&&Nu(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Ai(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 Nu(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Nu(e.expression)}function Ai(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ai(e.expression)||e.type==="ParenthesizedExpression"&&Ai(e.expression)}O.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};O.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}};O.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};O.parseSubscriptAsyncArrow=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,s)};O.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 Hr,p=this.yieldPos,d=this.awaitPos,R=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var L=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=R,this.parseSubscriptAsyncArrow(t,r,L,a);this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=R||this.awaitIdentPos;var V=this.startNodeAt(t,r);V.callee=e,V.arguments=L,u&&(V.optional=c),e=this.finishNode(V,"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 G=this.startNodeAt(t,r);G.tag=e,G.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(G,"TaggedTemplateExpression")}return e};O.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(K.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(K.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()}};O.parseExprAtomDefault=function(){this.unexpected()};O.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()};O.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")};O.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")};O.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")};O.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};O.shouldParseArrow=function(e){return!this.canInsertSemicolon()};O.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 Hr,p=this.yieldPos,d=this.awaitPos,R;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){R=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 L=this.lastTokEnd,V=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),R&&this.unexpected(R),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",L,V)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var G=this.startNodeAt(r,s);return G.expression=i,this.finishNode(G,"ParenthesizedExpression")}else return i};O.parseParenItem=function(e){return e};O.parseParenArrowList=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,s)};var md=[];O.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=md,this.finishNode(e,"NewExpression")};O.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,`
38
+ `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
39
+ `),cooked:this.value},this.next(),r.tail=this.type===o.backQuote,this.finishNode(r,"TemplateElement")};O.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")};O.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)&&!Ae.test(this.input.slice(this.lastTokEnd,this.start))};O.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")};O.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")};O.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")};O.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()};O.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")};O.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};O.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(Pi(t,s.generator)|Gr|(r?Tu: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")};O.parseArrowExpression=function(e,t,r,s){var i=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(Pi(r,!1)|Ri),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")};O.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,Pu),e.body=this.parseBlock(!1,void 0,a&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};O.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};O.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,Ii,t?null:r)}};O.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};O.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&Wr)&&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"))}};O.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};O.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};O.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};O.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")};O.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 jr=le.prototype;jr.raise=function(e,t){var r=Eu(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};jr.raiseRecoverable=jr.raise;jr.curPosition=function(){if(this.options.locations)return new Yt(this.curLine,this.pos-this.lineStart)};var ut=le.prototype,gd=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ut.enterScope=function(e){this.scopeStack.push(new gd(e))};ut.exitScope=function(){this.scopeStack.pop()};ut.treatFunctionsAsVarInScope=function(e){return e.flags&Rt||!this.inModule&&e.flags&Qt};ut.declareName=function(e,t,r){var s=!1;if(t===et){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&Qt&&delete this.undefinedExports[e]}else if(t===Ru){var n=this.currentScope();n.lexical.push(e)}else if(t===Ou){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&Au&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=!0;break}if(c.var.push(e),this.inModule&&c.flags&Qt&&delete this.undefinedExports[e],c.flags&Wr)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&(Wr|Xt|xt))return t}};ut.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Wr|Xt|xt)&&!(t.flags&Ri))return t}};var qr=function(t,r,s){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new Ur(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},Zt=le.prototype;Zt.startNode=function(){return new qr(this,this.start,this.startLoc)};Zt.startNodeAt=function(e,t){return new qr(this,e,t)};function Lu(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}Zt.finishNode=function(e,t){return Lu.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Zt.finishNodeAt=function(e,t,r,s){return Lu.call(this,e,t,r,s)};Zt.copyNode=function(e){var t=new qr(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var xd="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",Du="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",$u=Du+" Extended_Pictographic",Fu=$u,Mu=Fu+" EBase EComp EMod EPres ExtPict",Vu=Mu,_d=Vu,yd={9:Du,10:$u,11:Fu,12:Mu,13:Vu,14:_d},vd="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bd={9:"",10:"",11:"",12:"",13:"",14:vd},_u="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",ju="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",Bu=ju+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Uu=Bu+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Gu=Uu+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Wu=Gu+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",wd=Wu+" "+xd,Cd={9:ju,10:Bu,11:Uu,12:Gu,13:Wu,14:wd},Hu={};function kd(e){var t=Hu[e]={binary:at(yd[e]+" "+_u),binaryOfStrings:at(bd[e]),nonBinary:{General_Category:at(_u),Script:at(Cd[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(Fr=0,Ci=[9,10,11,12,13,14];Fr<Ci.length;Fr+=1)yu=Ci[Fr],kd(yu);var yu,Fr,Ci,b=le.prototype,Br=function(t,r){this.parent=t,this.base=r||this};Br.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};Br.prototype.sibling=function(){return new Br(this.parent,this.base)};var qe=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=Hu[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};qe.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)};qe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};qe.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};qe.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};qe.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};qe.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};qe.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};qe.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};qe.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 Ed(e){for(var t in e)return!0;return!1}b.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Ed(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 Br(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&&Sd(r);)t+=Ze(r),e.advance();return t};function Sd(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 qu(t)?(e.lastIntValue=t,e.advance(),!0):!1};function qu(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&&!qu(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+=Ze(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Ze(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),Ad(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Ad(e){return We(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),Td(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Td(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&&!zr(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 zu(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function zu(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)&&Od(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Od(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 Ku=0,Je=1,De=2;b.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Rd(t))return e.lastIntValue=-1,e.advance(),Je;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===De&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Ku};function Rd(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),Je}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return Ku};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 Je;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return De;e.raise("Invalid property name")};b.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Yu(t=e.current());)e.lastStringValue+=Ze(t),e.advance();return e.lastStringValue!==""};function Yu(e){return zu(e)||e===95}b.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Pd(t=e.current());)e.lastStringValue+=Ze(t),e.advance();return e.lastStringValue!==""};function Pd(e){return Yu(e)||zr(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===De&&e.raise("Negated character class may contain strings"),!0}return!1};b.regexp_classContents=function(e){return e.current()===93?Je:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Je)};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||Zu(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=Je,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===De&&(t=De);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==De&&(t=Je);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===De&&(t=De)}};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)?Je: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===De&&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)===De&&(t=De);return t};b.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Je:De};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()&&Id(r)||Nd(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Id(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 Nd(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 Ld(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ld(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 zr(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;zr(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function zr(e){return e>=48&&e<=57}b.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Qu(r=e.current());)e.lastIntValue=16*e.lastIntValue+Xu(r),e.advance();return e.pos!==t};function Qu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Xu(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 Zu(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Zu(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(!Qu(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+Xu(i),e.advance()}return!0};var Li=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ur(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},F=le.prototype;F.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 Li(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};F.getToken=function(){return this.next(),new Li(this)};typeof Symbol<"u"&&(F[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});F.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())};F.readToken=function(e){return We(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};F.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};F.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=wu(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())};F.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())};F.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&&Cu.test(String.fromCharCode(e)))++this.pos;else break e}}};F.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)};F.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))};F.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)};F.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)};F.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)};F.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};F.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||Ae.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)};F.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))};F.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)};F.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)};F.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),We(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ze(t)+"'")};F.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 '"+Ze(e)+"'")};F.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};F.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(Ae.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 qe(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})};F.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 Dd(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Ju(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}F.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=Ju(this.input.slice(t,this.pos)),++this.pos):We(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,r)};F.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=Ju(this.input.slice(t,this.pos));return++this.pos,We(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")),We(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=Dd(this.input.slice(t,this.pos),r);return this.finishToken(o.num,n)};F.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};F.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 ec={};F.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ec)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};F.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ec;this.raise(e,t)};F.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+=`
40
+ `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};F.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]===`
41
+ `&&++this.pos;case`
42
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};F.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
43
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ze(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)}};F.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};F.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?We:ot)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ze(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};F.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=Ti[e]),this.finishToken(t,e)};var $d="8.15.0";le.acorn={Parser:le,version:$d,defaultOptions:Ei,Position:Yt,SourceLocation:Ur,getLineInfo:Eu,Node:qr,TokenType:j,tokTypes:o,keywordTypes:Ti,TokContext:je,tokContexts:K,isIdentifierChar:ot,isIdentifierStart:We,Token:Li,isNewLine:Tt,lineBreak:Ae,lineBreakG:nd,nonASCIIwhitespace:Cu};var tr=require("module"),rt=ie(require("fs"),1);_();var S0=String.fromCharCode;var Fd=/\/$|\/\?|\/#/,Md=/^\.?\//;function Vd(e="",t){return t?Fd.test(e):e.endsWith("/")}function jd(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Vd(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 Bd(e){return e&&e!=="/"}function Di(e,...t){let r=e||"";for(let s of t.filter(i=>Bd(i)))if(r){let i=s.replace(Md,"");r=jd(r)+i}else r=s;return r}var A0=Symbol.for("ufo:protocolRelative");_();_();var Ud=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var $i=function(e){return Ud.test(e)};var C=require("url"),tt=ie(require("assert"),1),ct=ie(require("process"),1),rr=ie(require("path"),1),dc=ie(require("v8"),1),It=require("util"),mc=new Set(tr.builtinModules);function Bi(e){return e.replace(/\\/g,"/")}var Hd={}.hasOwnProperty,qd=/^([A-Z][a-z\d]*)+$/,zd=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ve={};function Fi(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var gc=new Map,Kd="__node_internal_",tc;ve.ERR_INVALID_ARG_TYPE=Fe("ERR_INVALID_ARG_TYPE",(e,t,r)=>{(0,tt.default)(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)(0,tt.default)(typeof u=="string","All expected entries have to be of type string"),zd.has(u)?i.push(u.toLowerCase()):qd.exec(u)===null?((0,tt.default)(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"} ${Fi(i,"or")}`,(n.length>0||a.length>0)&&(s+=" or ")),n.length>0&&(s+=`an instance of ${Fi(n,"or")}`,a.length>0&&(s+=" or ")),a.length>0&&(a.length>1?s+=`one of ${Fi(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(s+="an "),s+=`${a[0]}`)),s+=`. Received ${Jd(r)}`,s},TypeError);ve.ERR_INVALID_MODULE_SPECIFIER=Fe("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);ve.ERR_INVALID_PACKAGE_CONFIG=Fe("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);ve.ERR_INVALID_PACKAGE_TARGET=Fe("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==="."?((0,tt.default)(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);ve.ERR_MODULE_NOT_FOUND=Fe("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);ve.ERR_NETWORK_IMPORT_DISALLOWED=Fe("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);ve.ERR_PACKAGE_IMPORT_NOT_DEFINED=Fe("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);ve.ERR_PACKAGE_PATH_NOT_EXPORTED=Fe("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);ve.ERR_UNSUPPORTED_DIR_IMPORT=Fe("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);ve.ERR_UNSUPPORTED_RESOLVE_REQUEST=Fe("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);ve.ERR_UNKNOWN_FILE_EXTENSION=Fe("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ve.ERR_INVALID_ARG_VALUE=Fe("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let s=(0,It.inspect)(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${s}`},TypeError);function Fe(e,t,r){return gc.set(e,t),Yd(r,e)}function Yd(e,t){return r;function r(...s){let i=Error.stackTraceLimit;Ui()&&(Error.stackTraceLimit=0);let n=new e;Ui()&&(Error.stackTraceLimit=i);let a=Zd(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}}),Xd(n),n.code=t,n}}function Ui(){try{if(dc.default.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Hd.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Qd(e){let t=Kd+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Xd=Qd(function(e){let t=Ui();return t&&(tc=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=tc),e});function Zd(e,t,r){let s=gc.get(e);if((0,tt.default)(s!==void 0,"expected `message` to be found"),typeof s=="function")return(0,tt.default)(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(0,tt.default)(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(It.format,null,t))}function Jd(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}`:`${(0,It.inspect)(e,{depth:-1})}`;let t=(0,It.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Jt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:em}=ve,rc=new Map;function xc(e,{base:t,specifier:r}){let s=rc.get(e);if(s)return s;let i;try{i=rt.default.readFileSync(rr.default.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 em(e,(t?`"${r}" from `:"")+(0,C.fileURLToPath)(t||r),c.message);throw f.cause=c,f}n.exists=!0,Jt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Jt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Jt.call(a,"exports")&&(n.exports=a.exports),Jt.call(a,"imports")&&(n.imports=a.imports),Jt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return rc.set(e,n),n}function Gi(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let i=xc((0,C.fileURLToPath)(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:(0,C.fileURLToPath)(t),exists:!1,type:"none"}}function sc(e){return Gi(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:tm}=ve,rm={}.hasOwnProperty,sm={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function im(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var ic={__proto__:null,"data:":nm,"file:":om,"http:":nc,"https:":nc,"node:"(){return"builtin"}};function nm(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return im(t)}function am(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 om(e,t,r){let s=am(e);if(s===".js"){let a=sc(e);return a!=="none"?a:"commonjs"}if(s===""){let a=sc(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let i=sm[s];if(i)return i;if(r)return;let n=(0,C.fileURLToPath)(e);throw new tm(s,n)}function nc(){}function um(e,t){let r=e.protocol;return rm.call(ic,r)&&ic[r](e,t,!0)||null}var Kr=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:Q0,ERR_INVALID_MODULE_SPECIFIER:Xr,ERR_INVALID_PACKAGE_CONFIG:_c,ERR_INVALID_PACKAGE_TARGET:cm,ERR_MODULE_NOT_FOUND:Wi,ERR_PACKAGE_IMPORT_NOT_DEFINED:lm,ERR_PACKAGE_PATH_NOT_EXPORTED:hm,ERR_UNSUPPORTED_DIR_IMPORT:fm,ERR_UNSUPPORTED_RESOLVE_REQUEST:ac}=ve,yc={}.hasOwnProperty,oc=/(^|\\|\/)((\.|%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,uc=/(^|\\|\/)((\.|%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,pm=/^\.|%|\\/,Yr=/\*/g,dm=/%2f|%5c/i,cc=new Set,mm=/[/\\]{2}/;function lc(e,t,r,s,i,n,a){if(ct.default.noDeprecation)return;let u=(0,C.fileURLToPath)(s),c=mm.exec(a?e:t)!==null;ct.default.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 ${(0,C.fileURLToPath)(n)}`:""}.`,"DeprecationWarning","DEP0166")}function hc(e,t,r,s){if(ct.default.noDeprecation||um(e,{parentURL:r.href})!=="module")return;let n=(0,C.fileURLToPath)(e.href),a=(0,C.fileURLToPath)(new C.URL(".",t)),u=(0,C.fileURLToPath)(r);s?rr.default.resolve(a,s)!==n&&ct.default.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}.
44
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):ct.default.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}.
45
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function vc(e){try{return(0,rt.statSync)(e)}catch{}}function Mi(e){let t=(0,rt.statSync)(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function gm(e,t,r){let s;if(t.main!==void 0){if(s=new C.URL(t.main,e),Mi(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 C.URL(a[u],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new C.URL(i[n],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s;throw new Wi((0,C.fileURLToPath)(new C.URL(".",e)),(0,C.fileURLToPath)(r))}function xm(e,t,r){if(dm.exec(e.pathname)!==null)throw new Xr(e.pathname,'must not include encoded "/" or "\\" characters',(0,C.fileURLToPath)(t));let s;try{s=(0,C.fileURLToPath)(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=vc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new fm(s,(0,C.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Wi(s||e.pathname,t&&(0,C.fileURLToPath)(t),!0);throw n.url=String(e),n}{let n=(0,rt.realpathSync)(s),{search:a,hash:u}=e;e=(0,C.pathToFileURL)(n+(s.endsWith(rr.default.sep)?"/":"")),e.search=a,e.hash=u}return e}function _m(e,t,r){return new lm(e,t&&(0,C.fileURLToPath)(new C.URL(".",t)),(0,C.fileURLToPath)(r))}function Vi(e,t,r){return new hm((0,C.fileURLToPath)(new C.URL(".",t)),e,r&&(0,C.fileURLToPath)(r))}function ym(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${(0,C.fileURLToPath)(r)}`;throw new Xr(e,n,i&&(0,C.fileURLToPath)(i))}function er(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new cm((0,C.fileURLToPath)(new C.URL(".",r)),e,t,s,i&&(0,C.fileURLToPath)(i))}function vm(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw er(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new C.URL(e),p=!0}catch{}if(!p){let d=n?Kr.call(Yr,e,()=>t):e+t;return wc(d,s,c)}}throw er(r,e,s,a,i)}if(oc.exec(e.slice(2))!==null)if(uc.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!0)}}else throw er(r,e,s,a,i);let f=new C.URL(e,s),l=f.pathname,h=new C.URL(".",s).pathname;if(!l.startsWith(h))throw er(r,e,s,a,i);if(t==="")return f;if(oc.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(uc.exec(t)===null){if(!u){let d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!1)}}else ym(p,r,s,a,i)}return n?new C.URL(Kr.call(Yr,f.href,()=>t)):new C.URL(t,f)}function bm(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Nt(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return vm(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=Nt(e,p,r,s,i,n,a,u,c)}catch(R){let L=R;if(l=L,L.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw R}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(bm(h))throw new _c((0,C.fileURLToPath)(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=Nt(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw er(s,t,e,a,i)}function wm(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 _c((0,C.fileURLToPath)(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 Cm(e,t,r){if(ct.default.noDeprecation)return;let s=(0,C.fileURLToPath)(t);cc.has(s+"|"+e)||(cc.add(s+"|"+e),ct.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${(0,C.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function fc(e,t,r,s,i){let n=r.exports;if(wm(n,e,s)&&(n={".":n}),yc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=Nt(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Vi(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("/")&&Cm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=Nt(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Vi(t,e,s);return h}throw Vi(t,e,s)}function bc(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 km(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Xr(e,n,(0,C.fileURLToPath)(t))}let s,i=Gi(t);if(i.exists){s=(0,C.pathToFileURL)(i.pjsonPath);let n=i.imports;if(n)if(yc.call(n,e)&&!e.includes("*")){let a=Nt(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)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=Nt(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw _m(e,s,t)}function Em(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(pm.exec(n)!==null&&(s=!1),!s)throw new Xr(e,"is not a valid package name",(0,C.fileURLToPath)(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function wc(e,t,r){if(tr.builtinModules.includes(e))return new C.URL("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Em(e,t),a=Gi(t);if(a.exists){let l=(0,C.pathToFileURL)(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return fc(l,i,a,t,r)}let u=new C.URL("./node_modules/"+s+"/package.json",t),c=(0,C.fileURLToPath)(u),f;do{let l=vc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new C.URL((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=(0,C.fileURLToPath)(u);continue}let h=xc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?fc(u,i,h,t,r):i==="."?gm(u,h,t):new C.URL(i,u)}while(c.length!==f.length);throw new Wi(s,(0,C.fileURLToPath)(t),!1)}function Sm(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Am(e){return e===""?!1:e[0]==="/"?!0:Sm(e)}function Tm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Am(e))try{u=new C.URL(e,t)}catch(c){let f=new ac(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=km(e,t,r);else try{u=new C.URL(e)}catch(c){if(a&&!tr.builtinModules.includes(e)){let f=new ac(e,t);throw f.cause=c,f}u=wc(e,t,r)}return(0,tt.default)(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:xm(u,t)}function Qr(e){return typeof e=="string"&&!e.startsWith("file://")?Bi(e):Bi((0,C.fileURLToPath)(e))}function ji(e){return(0,C.pathToFileURL)(Qr(e)).toString()}function Om(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:mc.has(e)?"node:"+e:"file://"+encodeURI(Bi(e))}var Rm=new Set(["node","import"]),Pm=[".mjs",".cjs",".js",".json"],Im=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function pc(e,t,r){try{return Tm(e,t,r)}catch(s){if(!Im.has(s?.code))throw s}}function Nm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Qr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(mc.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Qr(e)),$i(e))try{if((0,rt.statSync)(e).isFile())return ji(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Rm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Om(a.toString())));s.length===0&&s.push(new URL(ji(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Di(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=pc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Pm)if(n=pc(Di(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 ji(n)}function Lm(e,t){return Nm(e,t)}function Cc(e,t){return Qr(Lm(e,t))}_();_();var kc=Symbol.for("quansync.getIsAsync"),Zr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function qi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Dm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function zi(e){let t=function*(...s){return(yield kc)?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 $m(e){return zi({async:()=>Promise.resolve(e),sync:()=>{if(qi(e))throw new Zr;return e}})}function Hi(e,t){if(e===kc)return t;if(Dm(e))return t?Ac(e):Sc(e);if(!t&&qi(e))throw new Zr;return e}var Ec=e=>e;function Sc(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(Hi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Hi(r.value)}async function Ac(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(await Hi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Fm(e,t){return zi({name:e.name,async(...r){return Ac(e.apply(this,r),t?.onYield)},sync(...r){return Sc(e.apply(this,r),t?.onYield)}})}function Ki(e,t){return qi(e)?$m(e):typeof e=="function"?Fm(e,t):zi(e)}var J0=Ki({async:()=>Promise.resolve(!0),sync:()=>!1});var Lt=Ki;var Jr=e=>e instanceof URL?(0,Pc.fileURLToPath)(e):e;async function Mm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s??n));let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=await Rc.default.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Vm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s)??n);let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=Dt.default.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Tc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=_t.default.platform==="win32"?"win32":"posix"),_t.default.versions.pnp){let s=t.paths||[];s.length===0&&s.push(_t.default.cwd());let i=(0,Oc.createRequire)($);try{return i.resolve(e,{paths:s})}catch{}}let r=Cc(e,{url:t.paths});return t.platform==="win32"?ne.win32.normalize(r):r}function Ic(e,t={}){return!!Lc(e,t)}function jm(e,t={}){let r=Lc(e,t);if(r)return Um(r)}var Nc=Lt({async:e=>Dt.default.promises.readFile(e,"utf8"),sync:e=>Dt.default.readFileSync(e,"utf8")}),Bm=Lt(function*(e,t={}){let r=jm(e,t);if(!r)return;let s=JSON.parse(yield Nc(r));return{name:e,version:s.version,rootPath:(0,ne.dirname)(r),packageJsonPath:r,packageJson:s}}),ux=Bm.sync;function Lc(e,t={}){try{return Tc(`${e}/package.json`,t)}catch{}try{return Tc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Um(e){let t;for(;;){if(!e)return;let r=(0,ne.dirname)(e);if(r===e)return;if(e=r,t=(0,ne.join)(e,"package.json"),Dt.default.existsSync(t))break}return t}var Gm=Lt({sync:Vm,async:Mm}),Dc=Lt(function*(e=_t.default.cwd()){let t=yield Gm("package.json",{cwd:e});return!t||!Dt.default.existsSync(t)?null:JSON.parse(yield Nc(t))}),cx=Dc.sync,Wm=Lt(function*(e,t){let r=(yield Dc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),lx=Wm.sync;_();var $c=require("child_process"),sr=ie(bs(),1),Z={info:e=>console.log(sr.default.blue(`\u25CF ${e}`)),success:e=>console.log(sr.default.green(`\u2713 ${e}`)),warn:e=>console.log(sr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(sr.default.red(`\u2717 ${e}`))};function Yi(e,t={}){try{return(0,$c.execSync)(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Fc(){let e=process.env.npm_config_user_agent||"";return e.startsWith("pnpm")?"pnpm":e.startsWith("yarn")?"yarn":"npm"}_();var Mc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",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"},Vc=["simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];_();var $t=ie(require("fs"),1),es=ie(require("path"),1);function Qi(e,t){if($t.default.statSync(e).isDirectory()){if(es.default.basename(e)==="node_modules")return;$t.default.mkdirSync(t,{recursive:!0}),$t.default.readdirSync(e).forEach(s=>{Qi(es.default.resolve(e,s),es.default.resolve(t,s))})}else{if($t.default.existsSync(t))return;$t.default.copyFileSync(e,t)}}var Uc=require("url");ts.default.extend(Bc.default);ts.default.tz.setDefault("Asia/Shanghai");var Hm=(0,Uc.fileURLToPath)($),qm=(0,nr.dirname)(Hm);Mt.name(pu).version(du,"-v, --version","output the version number");Mt.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").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{Qm(),t&&zm(),s&&Ym(),r&&Km(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function zm(){Z.info("Copying template files..."),Qi((0,nr.resolve)(qm,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function Km(){if(!Ic("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),Yi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function Ym(){Z.info("Updating package.json scripts...");let e=(0,nr.resolve)(process.cwd(),"package.json"),t;try{t=(0,ir.readFileSync)(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Mc,...r.scripts}};(0,ir.writeFileSync)(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&(0,ir.writeFileSync)(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function Qm(){try{let e=Vc.map(s=>`${s}@latest`).join(" "),t=Fc(),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}`),Yi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Mt.command("release").description("git release").action(async()=>{console.log(jc.default.green("Release project..."));try{await Xm(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function Xm(){let e=hu(process.cwd());try{let t=(0,ts.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)}}Mt.parse();