@xsahxl/s
Version:
Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.
21 lines • 6.6 MB
JavaScript
var Gnr=Object.create;var jce=Object.defineProperty;var Wnr=Object.getOwnPropertyDescriptor;var Hnr=Object.getOwnPropertyNames;var Vnr=Object.getPrototypeOf,Knr=Object.prototype.hasOwnProperty;var Ynr=(e,t,r)=>t in e?jce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var bt=(e,t)=>()=>(e&&(t=e(e=0)),t);var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xnr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Hnr(t))!Knr.call(e,u)&&u!==r&&jce(e,u,{get:()=>t[u],enumerable:!(n=Wnr(t,u))||n.enumerable});return e};var ut=(e,t,r)=>(r=e!=null?Gnr(Vnr(e)):{},Xnr(t||!e||!e.__esModule?jce(r,"default",{value:e,enumerable:!0}):r,e));var Cn=(e,t,r)=>(Ynr(e,typeof t!="symbol"?t+"":t,r),r),Nce=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var be=(e,t,r)=>(Nce(e,t,"read from private field"),r?r.call(e):t.get(e)),Ot=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Et=(e,t,r,n)=>(Nce(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Dq=(e,t,r,n)=>({set _(u){Et(e,t,u,r)},get _(){return be(e,t,n)}}),Rt=(e,t,r)=>(Nce(e,t,"access private method"),r);var H_=L(Mce=>{var yq=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},qce=class extends yq{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Mce.CommanderError=yq;Mce.InvalidArgumentError=qce});var Eq=L($ce=>{var{InvalidArgumentError:Jnr}=H_(),Uce=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,n)=>{if(!this.argChoices.includes(r))throw new Jnr(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Qnr(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}$ce.Argument=Uce;$ce.humanReadableArgName=Qnr});var Gce=L(Ike=>{var{humanReadableArgName:Znr}=Eq(),zce=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden);if(t._hasImplicitHelpCommand()){let[,n,u]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),i=t.createCommand(n).helpOption(!1);i.description(t._helpCommandDescription),u&&i.arguments(u),r.push(i)}return this.sortSubcommands&&r.sort((n,u)=>n.name().localeCompare(u.name())),r}compareOptions(t,r){let n=u=>u.short?u.short.replace(/^-/,""):u.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(i=>!i.hidden),n=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag),u=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(n||u){let i;n?u?i=t.createOption(t._helpFlags,t._helpDescription):i=t.createOption(t._helpShortFlag,t._helpDescription):i=t.createOption(t._helpLongFlag,t._helpDescription),r.push(i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let u=n.options.filter(i=>!i.hidden);r.push(...u)}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(n=>Znr(n)).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((n,u)=>Math.max(n,r.subcommandTerm(u).length),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,u)=>Math.max(n,r.optionTerm(u).length),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,u)=>Math.max(n,r.optionTerm(u).length),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,u)=>Math.max(n,r.argumentTerm(u).length),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let u=t.parent;u;u=u.parent)n=u.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).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?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatHelp(t,r){let n=r.padWidth(t,r),u=r.helpWidth||80,i=2,o=2;function s(d,m){if(m){let v=`${d.padEnd(n+o)}${m}`;return r.wrap(v,u-i,n+o)}return d}function a(d){return d.join(`
`).replace(/^/gm," ".repeat(i))}let c=[`Usage: ${r.commandUsage(t)}`,""],l=r.commandDescription(t);l.length>0&&(c=c.concat([r.wrap(l,u,0),""]));let f=r.visibleArguments(t).map(d=>s(r.argumentTerm(d),r.argumentDescription(d)));f.length>0&&(c=c.concat(["Arguments:",a(f),""]));let p=r.visibleOptions(t).map(d=>s(r.optionTerm(d),r.optionDescription(d)));if(p.length>0&&(c=c.concat(["Options:",a(p),""])),this.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(m=>s(r.optionTerm(m),r.optionDescription(m)));d.length>0&&(c=c.concat(["Global Options:",a(d),""]))}let h=r.visibleCommands(t).map(d=>s(r.subcommandTerm(d),r.subcommandDescription(d)));return h.length>0&&(c=c.concat(["Commands:",a(h),""])),c.join(`
`)}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}wrap(t,r,n,u=40){let i=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${i}]+`);if(t.match(o))return t;let s=r-n;if(s<u)return t;let a=t.slice(0,n),c=t.slice(n).replace(`\r
`,`
`),l=" ".repeat(n),p="\\s\u200B",h=new RegExp(`
|.{1,${s-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),d=c.match(h)||[];return a+d.map((m,v)=>m===`
`?"":(v>0?l:"")+m.trimEnd()).join(`
`)}};Ike.Help=zce});var Vce=L(bq=>{var{InvalidArgumentError:eur}=H_(),Wce=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 n=Lke(t);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(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,n)=>{if(!this.argChoices.includes(r))throw new eur(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return tur(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Hce=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,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(t,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let u=this.negativeOptions.get(n).presetArg,i=u!==void 0?u:!1;return r.negate===(i===t)}};function tur(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Lke(e){let t,r,n=e.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(t=n.shift()),r=n.shift(),!t&&/^-[^-]$/.test(r)&&(t=r,r=void 0),{shortFlag:t,longFlag:r}}bq.Option=Wce;bq.splitOptionFlags=Lke;bq.DualOptions=Hce});var Nke=L(jke=>{function rur(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let n=0;n<=e.length;n++)r[n]=[n];for(let n=0;n<=t.length;n++)r[0][n]=n;for(let n=1;n<=t.length;n++)for(let u=1;u<=e.length;u++){let i=1;e[u-1]===t[n-1]?i=0:i=1,r[u][n]=Math.min(r[u-1][n]+1,r[u][n-1]+1,r[u-1][n-1]+i),u>1&&n>1&&e[u-1]===t[n-2]&&e[u-2]===t[n-1]&&(r[u][n]=Math.min(r[u][n],r[u-2][n-2]+1))}return r[e.length][t.length]}function nur(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(o=>o.slice(2)));let n=[],u=3,i=.4;return t.forEach(o=>{if(o.length<=1)return;let s=rur(e,o),a=Math.max(e.length,o.length);(a-s)/a>i&&(s<u?(u=s,n=[o]):s===u&&n.push(o))}),n.sort((o,s)=>o.localeCompare(s)),r&&(n=n.map(o=>`--${o}`)),n.length>1?`
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
(Did you mean ${n[0]}?)`:""}jke.suggestSimilar=nur});var Gke=L(zke=>{var uur=require("events").EventEmitter,Kce=require("child_process"),j2=require("path"),Yce=require("fs"),yi=require("process"),{Argument:iur,humanReadableArgName:our}=Eq(),{CommanderError:Xce}=H_(),{Help:sur}=Gce(),{Option:qke,splitOptionFlags:aur,DualOptions:cur}=Vce(),{suggestSimilar:Mke}=Nke(),Jce=class e extends uur{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=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._outputConfiguration={writeOut:r=>yi.stdout.write(r),writeErr:r=>yi.stderr.write(r),getOutHelpWidth:()=>yi.stdout.isTTY?yi.stdout.columns:void 0,getErrHelpWidth:()=>yi.stderr.isTTY?yi.stderr.columns:void 0,outputError:(r,n)=>n(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._hasHelpOption=t._hasHelpOption,this._helpFlags=t._helpFlags,this._helpDescription=t._helpDescription,this._helpShortFlag=t._helpShortFlag,this._helpLongFlag=t._helpLongFlag,this._helpCommandName=t._helpCommandName,this._helpCommandnameAndArgs=t._helpCommandnameAndArgs,this._helpCommandDescription=t._helpCommandDescription,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,n){let u=r,i=n;typeof u=="object"&&u!==null&&(i=u,u=null),i=i||{};let[,o,s]=t.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return u&&(a.description(u),a._executableHandler=!0),i.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(i.noHelp||i.hidden),a._executableFile=i.executableFile||null,s&&a.arguments(s),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),u?this:a}createCommand(t){return new e(t)}createHelp(){return Object.assign(new sur,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?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
- 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.commands.push(t),t.parent=this,this}createArgument(t,r){return new iur(t,r)}argument(t,r,n,u){let i=this.createArgument(t,r);return typeof n=="function"?i.default(u).argParser(n):i.default(n),this.addArgument(i),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}addHelpCommand(t,r){return t===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof t=="string"&&(this._helpCommandName=t.split(" ")[0],this._helpCommandnameAndArgs=t),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(t,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
Expecting one of '${n.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,n){this._exitCallback&&this._exitCallback(new Xce(t,r,n)),yi.exit(t)}action(t){let r=n=>{let u=this.registeredArguments.length,i=n.slice(0,u);return this._storeOptionsAsProperties?i[u]=this:i[u]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new qke(t,r)}_callParseArg(t,r,n,u){try{return t.parseArg(r,n)}catch(i){if(i.code==="commander.invalidArgument"){let o=`${u} ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}addOption(t){let r=t.name(),n=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(n,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(n,t.defaultValue,"default");this.options.push(t);let u=(i,o,s)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let a=this.getOptionValue(n);i!==null&&t.parseArg?i=this._callParseArg(t,i,a,o):i!==null&&t.variadic&&(i=t._concatValue(i,a)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(n,i,s)};return this.on("option:"+r,i=>{let o=`error: option '${t.flags}' argument '${i}' is invalid.`;u(i,o,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let o=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;u(i,o,"env")}),this}_optionEx(t,r,n,u,i){if(typeof r=="object"&&r instanceof qke)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,n);if(o.makeOptionMandatory(!!t.mandatory),typeof u=="function")o.default(i).argParser(u);else if(u instanceof RegExp){let s=u;u=(a,c)=>{let l=s.exec(a);return l?l[0]:c},o.default(i).argParser(u)}else o.default(u);return this.addOption(o)}option(t,r,n,u){return this._optionEx({},t,r,n,u)}requiredOption(t,r,n,u){return this._optionEx({mandatory:!0},t,r,n,u)}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){if(this._passThroughOptions=!!t,this.parent&&t&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");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,n){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=n,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(t)!==void 0&&(r=n.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");r=r||{},t===void 0&&(t=yi.argv,yi.versions&&yi.versions.electron&&(r.from="electron")),this.rawArgs=t.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=t[1],n=t.slice(2);break;case"electron":yi.defaultApp?(this._scriptPath=t[1],n=t.slice(2)):n=t.slice(1);break;case"user":n=t.slice(0);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",n}parse(t,r){let n=this._prepareUserArgs(t,r);return this._parseCommand([],n),this}async parseAsync(t,r){let n=this._prepareUserArgs(t,r);return await this._parseCommand([],n),this}_executeSubCommand(t,r){r=r.slice();let n=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];function i(l,f){let p=j2.resolve(l,f);if(Yce.existsSync(p))return p;if(u.includes(j2.extname(f)))return;let h=u.find(d=>Yce.existsSync(`${p}${d}`));if(h)return`${p}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=t._executableFile||`${this._name}-${t._name}`,s=this._executableDir||"";if(this._scriptPath){let l;try{l=Yce.realpathSync(this._scriptPath)}catch{l=this._scriptPath}s=j2.resolve(j2.dirname(l),s)}if(s){let l=i(s,o);if(!l&&!t._executableFile&&this._scriptPath){let f=j2.basename(this._scriptPath,j2.extname(this._scriptPath));f!==this._name&&(l=i(s,`${f}-${t._name}`))}o=l||o}n=u.includes(j2.extname(o));let a;yi.platform!=="win32"?n?(r.unshift(o),r=$ke(yi.execArgv).concat(r),a=Kce.spawn(yi.argv[0],r,{stdio:"inherit"})):a=Kce.spawn(o,r,{stdio:"inherit"}):(r.unshift(o),r=$ke(yi.execArgv).concat(r),a=Kce.spawn(yi.execPath,r,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{yi.on(f,()=>{a.killed===!1&&a.exitCode===null&&a.kill(f)})});let c=this._exitCallback;c?a.on("close",()=>{c(new Xce(yi.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):a.on("close",yi.exit.bind(yi)),a.on("error",l=>{if(l.code==="ENOENT"){let f=s?`searched for local subcommand relative to directory '${s}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${o}' does not exist
- if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
- ${f}`;throw new Error(p)}else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)yi.exit(1);else{let f=new Xce(1,"commander.executeSubCommandAsync","(error)");f.nestedError=l,c(f)}}),this.runningCommand=a}_dispatchSubcommand(t,r,n){let u=this._findCommand(t);u||this.help({error:!0});let i;return i=this._chainOrCallSubCommandHook(i,u,"preSubcommand"),i=this._chainOrCall(i,()=>{if(u._executableHandler)this._executeSubCommand(u,r.concat(n));else return u._parseCommand(r,n)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._helpLongFlag||this._helpShortFlag])}_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=(n,u,i)=>{let o=u;if(u!==null&&n.parseArg){let s=`error: command-argument value '${u}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,u,i,s)}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,u)=>{let i=n.defaultValue;n.variadic?u<this.args.length?(i=this.args.slice(u),n.parseArg&&(i=i.reduce((o,s)=>t(n,s,o),n.defaultValue))):i===void 0&&(i=[]):u<this.args.length&&(i=this.args[u],n.parseArg&&(i=t(n,i,n.defaultValue))),r[u]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let n=t,u=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(o=>{u.push({hookedCommand:i,callback:o})})}),r==="postAction"&&u.reverse(),u.forEach(i=>{n=this._chainOrCall(n,()=>i.callback(i.hookedCommand,this))}),n}_chainOrCallSubCommandHook(t,r,n){let u=t;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(i=>{u=this._chainOrCall(u,()=>i(this,r))}),u}_parseCommand(t,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(n.operands),r=n.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName)return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return Uke(this,r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),Uke(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){u(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(i,t,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(i))u(),this._processArguments(),this.parent.emit(i,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():(u(),this._processArguments())}else this.commands.length?(u(),this.help({error:!0})):(u(),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(n=>{let u=n.attributeName();return this.getOptionValue(u)===void 0?!1:this.getOptionValueSource(u)!=="default"});t.filter(n=>n.conflictsWith.length>0).forEach(n=>{let u=t.find(i=>n.conflictsWith.includes(i.attributeName()));u&&this._conflictingOption(n,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],n=[],u=r,i=t.slice();function o(a){return a.length>1&&a[0]==="-"}let s=null;for(;i.length;){let a=i.shift();if(a==="--"){u===n&&u.push(a),u.push(...i);break}if(s&&!o(a)){this.emit(`option:${s.name()}`,a);continue}if(s=null,o(a)){let c=this._findOption(a);if(c){if(c.required){let l=i.shift();l===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,l)}else if(c.optional){let l=null;i.length>0&&!o(i[0])&&(l=i.shift()),this.emit(`option:${c.name()}`,l)}else this.emit(`option:${c.name()}`);s=c.variadic?c:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let c=this._findOption(`-${a[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,a.slice(2)):(this.emit(`option:${c.name()}`),i.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let c=a.indexOf("="),l=this._findOption(a.slice(0,c));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,a.slice(c+1));continue}}if(o(a)&&(u=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(a)){r.push(a),i.length>0&&n.push(...i);break}else if(a===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(a),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){n.push(a),i.length>0&&n.push(...i);break}}if(this._passThroughOptions){u.push(a),i.length>0&&u.push(...i);break}u.push(a)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let n=0;n<r;n++){let u=this.options[n].attributeName();t[u]=u===this._versionOptionName?this._version:this[u]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
`),this.outputHelp({error:!0}));let n=r||{},u=n.exitCode||1,i=n.code||"commander.error";this._exit(u,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in yi.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()}`,yi.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new cur(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&t.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(u=>!r(u)).forEach(u=>{this.setOptionValueWithSource(u,n.implied[u],"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 n=o=>{let s=o.attributeName(),a=this.getOptionValue(s),c=this.options.find(f=>f.negate&&s===f.attributeName()),l=this.options.find(f=>!f.negate&&s===f.attributeName());return c&&(c.presetArg===void 0&&a===!1||c.presetArg!==void 0&&a===c.presetArg)?c:l||o},u=o=>{let s=n(o),a=s.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},i=`error: ${u(t)} cannot be used with ${u(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let u=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);u=u.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);r=Mke(t,u)}let n=`error: unknown option '${t}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach(i=>{u.push(i.name()),i.alias()&&u.push(i.alias())}),r=Mke(t,u)}let n=`error: unknown command '${t}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(t,r,n){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",n=n||"output the version number";let u=this.createOption(r,n);return this._versionOptionName=u.attributeName(),this.options.push(u),this.on("option:"+u.name(),()=>{this._outputConfiguration.writeOut(`${t}
`),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");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(n=>our(n));return[].concat(this.options.length||this._hasHelpOption?"[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)}nameFromFilename(t){return this._name=j2.basename(t,j2.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(t){t=t||{};let r={error:!!t.error},n;return r.error?n=u=>this._outputConfiguration.writeErr(u):n=u=>this._outputConfiguration.writeOut(u),r.write=t.write||n,r.command=this,r}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let n=this._getHelpContext(t);this._getCommandAndAncestors().reverse().forEach(i=>i.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let u=this.helpInformation(n);if(r&&(u=r(u),typeof u!="string"&&!Buffer.isBuffer(u)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(u),this._helpLongFlag&&this.emit(this._helpLongFlag),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(i=>i.emit("afterAllHelp",n))}helpOption(t,r){if(typeof t=="boolean")return this._hasHelpOption=t,this;this._helpFlags=t||this._helpFlags,this._helpDescription=r||this._helpDescription;let n=aur(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(t){this.outputHelp(t);let r=yi.exitCode||0;r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(t))throw new Error(`Unexpected value for position to addHelpText.
Expecting one of '${n.join("', '")}'`);let u=`${t}Help`;return this.on(u,i=>{let o;typeof r=="function"?o=r({error:i.error,command:i.command}):o=r,o&&i.write(`${o}
`)}),this}};function Uke(e,t){e._hasHelpOption&&t.find(n=>n===e._helpLongFlag||n===e._helpShortFlag)&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function $ke(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",u="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?u=i[3]:n=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],n=i[3],u=i[4]),r&&u!=="0"?`${r}=${n}:${parseInt(u)+1}`:t})}zke.Command=Jce});var Kke=L((ch,Vke)=>{var{Argument:lur}=Eq(),{Command:Wke}=Gke(),{CommanderError:fur,InvalidArgumentError:Hke}=H_(),{Help:pur}=Gce(),{Option:hur}=Vce();ch=Vke.exports=new Wke;ch.program=ch;ch.Command=Wke;ch.Option=hur;ch.Argument=lur;ch.Help=pur;ch.CommanderError=fur;ch.InvalidArgumentError=Hke;ch.InvalidOptionArgumentError=Hke});var Yke,Lhu,jhu,Nhu,qhu,Mhu,Uhu,$hu,Xke,zhu,Zv,Ghu,V_=bt(()=>{Yke=ut(Kke(),1),{program:Lhu,createCommand:jhu,createArgument:Nhu,createOption:qhu,CommanderError:Mhu,InvalidArgumentError:Uhu,InvalidOptionArgumentError:$hu,Command:Xke,Argument:zhu,Option:Zv,Help:Ghu}=Yke.default});var Jt=L((A7,K_)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",i="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",s=500,a="__lodash_placeholder__",c=1,l=2,f=4,p=1,h=2,d=1,m=2,v=4,y=8,g=16,D=32,E=64,b=128,C=256,x=512,F=30,A="...",S=800,B=16,O=1,T=2,P=3,N=1/0,j=9007199254740991,$=17976931348623157e292,G=0/0,I=4294967295,U=I-1,z=I>>>1,H=[["ary",b],["bind",d],["bindKey",m],["curry",y],["curryRight",g],["flip",x],["partial",D],["partialRight",E],["rearg",C]],X="[object Arguments]",Z="[object Array]",ie="[object AsyncFunction]",te="[object Boolean]",Y="[object Date]",ee="[object DOMException]",Q="[object Error]",q="[object Function]",M="[object GeneratorFunction]",J="[object Map]",re="[object Number]",ue="[object Null]",ne="[object Object]",ae="[object Promise]",he="[object Proxy]",Ee="[object RegExp]",ye="[object Set]",xe="[object String]",Pe="[object Symbol]",qe="[object Undefined]",se="[object WeakMap]",_e="[object WeakSet]",Me="[object ArrayBuffer]",fe="[object DataView]",le="[object Float32Array]",me="[object Float64Array]",de="[object Int8Array]",Ae="[object Int16Array]",Be="[object Int32Array]",$e="[object Uint8Array]",Le="[object Uint8ClampedArray]",Ye="[object Uint16Array]",it="[object Uint32Array]",ve=/\b__p \+= '';/g,Ze=/\b(__p \+=) '' \+/g,at=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Xe=/[&<>"']/g,ot=RegExp(Ie.source),ze=RegExp(Xe.source),Se=/<%-([\s\S]+?)%>/g,et=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,st=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ft=/[\\^$.*+?()[\]{}|]/g,Ve=RegExp(Ft.source),lt=/^\s+/,_t=/\s/,jt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ur=/\{\n\/\* \[wrapped with (.+)\] \*/,Vr=/,? & /,Jr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wr=/[()=,{}\[\]\/\s]/,Yr=/\\(\\)?/g,On=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jn=/\w*$/,Bu=/^[-+]0x[0-9a-f]+$/i,wu=/^0b[01]+$/i,Co=/^\[object .+?Constructor\]$/,io=/^0o[0-7]+$/i,Zo=/^(?:0|[1-9]\d*)$/,vc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vi=/($^)/,Tt=/['\n\r\u2028\u2029\\]/g,rr="\\ud800-\\udfff",tn="\\u0300-\\u036f",Ir="\\ufe20-\\ufe2f",qu="\\u20d0-\\u20ff",Tn=tn+Ir+qu,ri="\\u2700-\\u27bf",Mu="a-z\\xdf-\\xf6\\xf8-\\xff",ku="\\xac\\xb1\\xd7\\xf7",ki="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",al="\\u2000-\\u206f",cf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ys="A-Z\\xc0-\\xd6\\xd8-\\xde",Lp="\\ufe0e\\ufe0f",Dc=ku+ki+al+cf,cl="['\u2019]",ll="["+rr+"]",fl="["+Dc+"]",Xs="["+Tn+"]",lf="\\d+",yc="["+ri+"]",pl="["+Mu+"]",jp="[^"+rr+Dc+lf+ri+Mu+Ys+"]",hl="\\ud83c[\\udffb-\\udfff]",Np="(?:"+Xs+"|"+hl+")",dl="[^"+rr+"]",ff="(?:\\ud83c[\\udde6-\\uddff]){2}",ml="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Ys+"]",Ec="\\u200d",es="(?:"+pl+"|"+jp+")",gl="(?:"+ms+"|"+jp+")",Pa="(?:"+cl+"(?:d|ll|m|re|s|t|ve))?",qp="(?:"+cl+"(?:D|LL|M|RE|S|T|VE))?",vl=Np+"?",Mp="["+Lp+"]?",w0="(?:"+Ec+"(?:"+[dl,ff,ml].join("|")+")"+Mp+vl+")*",Fd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Up="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$p=Mp+vl+w0,S0="(?:"+[yc,ff,ml].join("|")+")"+$p,O0="(?:"+[dl+Xs+"?",Xs,ff,ml,ll].join("|")+")",Dl=RegExp(cl,"g"),_d=RegExp(Xs,"g"),bc=RegExp(hl+"(?="+hl+")|"+O0+$p,"g"),Bd=RegExp([ms+"?"+pl+"+"+Pa+"(?="+[fl,ms,"$"].join("|")+")",gl+"+"+qp+"(?="+[fl,ms+es,"$"].join("|")+")",ms+"?"+es+"+"+Pa,ms+"+"+qp,Up,Fd,lf,S0].join("|"),"g"),T0=RegExp("["+Ec+rr+Tn+Lp+"]"),pf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,v2=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cc=-1,Vn={};Vn[le]=Vn[me]=Vn[de]=Vn[Ae]=Vn[Be]=Vn[$e]=Vn[Le]=Vn[Ye]=Vn[it]=!0,Vn[X]=Vn[Z]=Vn[Me]=Vn[te]=Vn[fe]=Vn[Y]=Vn[Q]=Vn[q]=Vn[J]=Vn[re]=Vn[ne]=Vn[Ee]=Vn[ye]=Vn[xe]=Vn[se]=!1;var bn={};bn[X]=bn[Z]=bn[Me]=bn[fe]=bn[te]=bn[Y]=bn[le]=bn[me]=bn[de]=bn[Ae]=bn[Be]=bn[J]=bn[re]=bn[ne]=bn[Ee]=bn[ye]=bn[xe]=bn[Pe]=bn[$e]=bn[Le]=bn[Ye]=bn[it]=!0,bn[Q]=bn[q]=bn[se]=!1;var Kn={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},_n={"&":"&","<":"<",">":">",'"':""","'":"'"},wd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},hf=parseFloat,Od=parseInt,yl=typeof global=="object"&&global&&global.Object===Object&&global,zp=typeof self=="object"&&self&&self.Object===Object&&self,Ru=yl||zp||Function("return this")(),df=typeof A7=="object"&&A7&&!A7.nodeType&&A7,Yn=df&&typeof K_=="object"&&K_&&!K_.nodeType&&K_,mf=Yn&&Yn.exports===df,Hi=mf&&yl.process,Uu=function(){try{var mt=Yn&&Yn.require&&Yn.require("util").types;return mt||Hi&&Hi.binding&&Hi.binding("util")}catch{}}(),oo=Uu&&Uu.isArrayBuffer,lu=Uu&&Uu.isDate,Js=Uu&&Uu.isMap,Ue=Uu&&Uu.isRegExp,Te=Uu&&Uu.isSet,pe=Uu&&Uu.isTypedArray;function ge(mt,Bt,Ne){switch(Ne.length){case 0:return mt.call(Bt);case 1:return mt.call(Bt,Ne[0]);case 2:return mt.call(Bt,Ne[0],Ne[1]);case 3:return mt.call(Bt,Ne[0],Ne[1],Ne[2])}return mt.apply(Bt,Ne)}function Ce(mt,Bt,Ne,ft){for(var dt=-1,$t=mt==null?0:mt.length;++dt<$t;){var or=mt[dt];Bt(ft,or,Ne(or),mt)}return ft}function we(mt,Bt){for(var Ne=-1,ft=mt==null?0:mt.length;++Ne<ft&&Bt(mt[Ne],Ne,mt)!==!1;);return mt}function Ge(mt,Bt){for(var Ne=mt==null?0:mt.length;Ne--&&Bt(mt[Ne],Ne,mt)!==!1;);return mt}function He(mt,Bt){for(var Ne=-1,ft=mt==null?0:mt.length;++Ne<ft;)if(!Bt(mt[Ne],Ne,mt))return!1;return!0}function Qe(mt,Bt){for(var Ne=-1,ft=mt==null?0:mt.length,dt=0,$t=[];++Ne<ft;){var or=mt[Ne];Bt(or,Ne,mt)&&($t[dt++]=or)}return $t}function pt(mt,Bt){var Ne=mt==null?0:mt.length;return!!Ne&&Lt(mt,Bt,0)>-1}function xt(mt,Bt,Ne){for(var ft=-1,dt=mt==null?0:mt.length;++ft<dt;)if(Ne(Bt,mt[ft]))return!0;return!1}function kt(mt,Bt){for(var Ne=-1,ft=mt==null?0:mt.length,dt=Array(ft);++Ne<ft;)dt[Ne]=Bt(mt[Ne],Ne,mt);return dt}function Vt(mt,Bt){for(var Ne=-1,ft=Bt.length,dt=mt.length;++Ne<ft;)mt[dt+Ne]=Bt[Ne];return mt}function Zt(mt,Bt,Ne,ft){var dt=-1,$t=mt==null?0:mt.length;for(ft&&$t&&(Ne=mt[++dt]);++dt<$t;)Ne=Bt(Ne,mt[dt],dt,mt);return Ne}function Mr(mt,Bt,Ne,ft){var dt=mt==null?0:mt.length;for(ft&&dt&&(Ne=mt[--dt]);dt--;)Ne=Bt(Ne,mt[dt],dt,mt);return Ne}function Iu(mt,Bt){for(var Ne=-1,ft=mt==null?0:mt.length;++Ne<ft;)if(Bt(mt[Ne],Ne,mt))return!0;return!1}var ka=iu("length");function Xr(mt){return mt.split("")}function hr(mt){return mt.match(Jr)||[]}function Ut(mt,Bt,Ne){var ft;return Ne(mt,function(dt,$t,or){if(Bt(dt,$t,or))return ft=$t,!1}),ft}function It(mt,Bt,Ne,ft){for(var dt=mt.length,$t=Ne+(ft?1:-1);ft?$t--:++$t<dt;)if(Bt(mt[$t],$t,mt))return $t;return-1}function Lt(mt,Bt,Ne){return Bt===Bt?P3(mt,Bt,Ne):It(mt,sr,Ne)}function Kt(mt,Bt,Ne,ft){for(var dt=Ne-1,$t=mt.length;++dt<$t;)if(ft(mt[dt],Bt))return dt;return-1}function sr(mt){return mt!==mt}function ln(mt,Bt){var Ne=mt==null?0:mt.length;return Ne?P0(mt,Bt)/Ne:G}function iu(mt){return function(Bt){return Bt==null?e:Bt[mt]}}function $u(mt){return function(Bt){return mt==null?e:mt[Bt]}}function ts(mt,Bt,Ne,ft,dt){return dt(mt,function($t,or,_r){Ne=ft?(ft=!1,$t):Bt(Ne,$t,or,_r)}),Ne}function gf(mt,Bt){var Ne=mt.length;for(mt.sort(Bt);Ne--;)mt[Ne]=mt[Ne].value;return mt}function P0(mt,Bt){for(var Ne,ft=-1,dt=mt.length;++ft<dt;){var $t=Bt(mt[ft]);$t!==e&&(Ne=Ne===e?$t:Ne+$t)}return Ne}function zF(mt,Bt){for(var Ne=-1,ft=Array(mt);++Ne<mt;)ft[Ne]=Bt(Ne);return ft}function GF(mt,Bt){return kt(Bt,function(Ne){return[Ne,mt[Ne]]})}function S3(mt){return mt&&mt.slice(0,D2(mt)+1).replace(lt,"")}function xc(mt){return function(Bt){return mt(Bt)}}function O3(mt,Bt){return kt(Bt,function(Ne){return mt[Ne]})}function rs(mt,Bt){return mt.has(Bt)}function T3(mt,Bt){for(var Ne=-1,ft=mt.length;++Ne<ft&&Lt(Bt,mt[Ne],0)>-1;);return Ne}function H5(mt,Bt){for(var Ne=mt.length;Ne--&&Lt(Bt,mt[Ne],0)>-1;);return Ne}function Ij(mt,Bt){for(var Ne=mt.length,ft=0;Ne--;)mt[Ne]===Bt&&++ft;return ft}var Lj=$u(Kn),_ie=$u(_n);function Bie(mt){return"\\"+Sd[mt]}function wie(mt,Bt){return mt==null?e:mt[Bt]}function V5(mt){return T0.test(mt)}function Sie(mt){return pf.test(mt)}function K5(mt){for(var Bt,Ne=[];!(Bt=mt.next()).done;)Ne.push(Bt.value);return Ne}function WF(mt){var Bt=-1,Ne=Array(mt.size);return mt.forEach(function(ft,dt){Ne[++Bt]=[dt,ft]}),Ne}function jj(mt,Bt){return function(Ne){return mt(Bt(Ne))}}function k0(mt,Bt){for(var Ne=-1,ft=mt.length,dt=0,$t=[];++Ne<ft;){var or=mt[Ne];(or===Bt||or===a)&&(mt[Ne]=a,$t[dt++]=Ne)}return $t}function mv(mt){var Bt=-1,Ne=Array(mt.size);return mt.forEach(function(ft){Ne[++Bt]=ft}),Ne}function Td(mt){var Bt=-1,Ne=Array(mt.size);return mt.forEach(function(ft){Ne[++Bt]=[ft,ft]}),Ne}function P3(mt,Bt,Ne){for(var ft=Ne-1,dt=mt.length;++ft<dt;)if(mt[ft]===Bt)return ft;return-1}function Oie(mt,Bt,Ne){for(var ft=Ne+1;ft--;)if(mt[ft]===Bt)return ft;return ft}function Y5(mt){return V5(mt)?Nj(mt):ka(mt)}function vf(mt){return V5(mt)?Tie(mt):Xr(mt)}function D2(mt){for(var Bt=mt.length;Bt--&&_t.test(mt.charAt(Bt)););return Bt}var Df=$u(wd);function Nj(mt){for(var Bt=bc.lastIndex=0;bc.test(mt);)++Bt;return Bt}function Tie(mt){return mt.match(bc)||[]}function Pie(mt){return mt.match(Bd)||[]}var kie=function mt(Bt){Bt=Bt==null?Ru:Pd.defaults(Ru.Object(),Bt,Pd.pick(Ru,v2));var Ne=Bt.Array,ft=Bt.Date,dt=Bt.Error,$t=Bt.Function,or=Bt.Math,_r=Bt.Object,Ri=Bt.RegExp,Su=Bt.String,Ra=Bt.TypeError,k3=Ne.prototype,El=$t.prototype,Gp=_r.prototype,R3=Bt["__core-js_shared__"],Wp=El.toString,Wn=Gp.hasOwnProperty,I3=0,ou=function(){var R=/[^.]+$/.exec(R3&&R3.keys&&R3.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),L3=Gp.toString,qj=Wp.call(_r),j3=Ru._,Rie=Ri("^"+Wp.call(Wn).replace(Ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N3=mf?Bt.Buffer:e,kd=Bt.Symbol,y2=Bt.Uint8Array,Hp=N3?N3.allocUnsafe:e,E2=jj(_r.getPrototypeOf,_r),HF=_r.create,gv=Gp.propertyIsEnumerable,vv=k3.splice,VF=kd?kd.isConcatSpreadable:e,Rd=kd?kd.iterator:e,Id=kd?kd.toStringTag:e,Ld=function(){try{var R=U0(_r,"defineProperty");return R({},"",{}),R}catch{}}(),b2=Bt.clearTimeout!==Ru.clearTimeout&&Bt.clearTimeout,q3=ft&&ft.now!==Ru.Date.now&&ft.now,Iie=Bt.setTimeout!==Ru.setTimeout&&Bt.setTimeout,M3=or.ceil,U3=or.floor,X5=_r.getOwnPropertySymbols,$3=N3?N3.isBuffer:e,z3=Bt.isFinite,Lie=k3.join,Mj=jj(_r.keys,_r),so=or.max,gs=or.min,ao=ft.now,vs=Bt.parseInt,Uj=or.random,jie=k3.reverse,G3=U0(Bt,"DataView"),Dv=U0(Bt,"Map"),yv=U0(Bt,"Promise"),R0=U0(Bt,"Set"),C2=U0(Bt,"WeakMap"),I0=U0(_r,"create"),jd=C2&&new C2,L0={},W3=Md(G3),J5=Md(Dv),Nie=Md(yv),qie=Md(R0),Mie=Md(C2),H3=kd?kd.prototype:e,Ev=H3?H3.valueOf:e,bv=H3?H3.toString:e;function ke(R){if(zu(R)&&!Qr(R)&&!(R instanceof gn)){if(R instanceof ns)return R;if(Wn.call(R,"__wrapped__"))return Ud(R)}return new ns(R)}var x2=function(){function R(){}return function(W){if(!Ku(W))return{};if(HF)return HF(W);R.prototype=W;var w=new R;return R.prototype=e,w}}();function Re(){}function ns(R,W){this.__wrapped__=R,this.__actions__=[],this.__chain__=!!W,this.__index__=0,this.__values__=e}ke.templateSettings={escape:Se,evaluate:et,interpolate:rt,variable:"",imports:{_:ke}},ke.prototype=Re.prototype,ke.prototype.constructor=ke,ns.prototype=x2(Re.prototype),ns.prototype.constructor=ns;function gn(R){this.__wrapped__=R,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=I,this.__views__=[]}function bl(){var R=new gn(this.__wrapped__);return R.__actions__=na(this.__actions__),R.__dir__=this.__dir__,R.__filtered__=this.__filtered__,R.__iteratees__=na(this.__iteratees__),R.__takeCount__=this.__takeCount__,R.__views__=na(this.__views__),R}function Bn(){if(this.__filtered__){var R=new gn(this);R.__dir__=-1,R.__filtered__=!0}else R=this.clone(),R.__dir__*=-1;return R}function Uie(){var R=this.__wrapped__.value(),W=this.__dir__,w=Qr(R),k=W<0,V=w?R.length:0,oe=yN(0,V,this.__views__),ce=oe.start,De=oe.end,Fe=De-ce,je=k?De:ce-1,We=this.__iteratees__,nt=We.length,ht=0,yt=gs(Fe,this.__takeCount__);if(!w||!k&&V==Fe&&yt==Fe)return i_(R,this.__actions__);var Pt=[];e:for(;Fe--&&ht<yt;){je+=W;for(var Nt=-1,qt=R[je];++Nt<nt;){var Xt=We[Nt],Ht=Xt.iteratee,$r=Xt.type,zr=Ht(qt);if($r==T)qt=zr;else if(!zr){if($r==O)continue e;break e}}Pt[ht++]=qt}return Pt}gn.prototype=x2(Re.prototype),gn.prototype.constructor=gn;function A2(R){var W=-1,w=R==null?0:R.length;for(this.clear();++W<w;){var k=R[W];this.set(k[0],k[1])}}function $ie(){this.__data__=I0?I0(null):{},this.size=0}function F2(R){var W=this.has(R)&&delete this.__data__[R];return this.size-=W?1:0,W}function zie(R){var W=this.__data__;if(I0){var w=W[R];return w===o?e:w}return Wn.call(W,R)?W[R]: