edgeone 1.3.0-beta.1 → 1.3.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.
@@ -519,7 +519,7 @@ ${A.join(`
519
519
  `;x.forEach(A=>{b+=A}),t.fail(b)}};let f={};s.conflicts=function(g,x){Zn("<string|object> [array|string]",[g,x],arguments.length),typeof g=="object"?Object.keys(g).forEach(b=>{s.conflicts(b,g[b])}):(e.global(g),f[g]||(f[g]=[]),Array.isArray(x)?x.forEach(b=>s.conflicts(g,b)):f[g].push(x))},s.getConflicting=()=>f,s.conflicting=function(g){Object.keys(g).forEach(x=>{f[x]&&f[x].forEach(b=>{b&&g[x]!==void 0&&g[b]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",x,b))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(f).forEach(x=>{f[x].forEach(b=>{b&&g[r.Parser.camelCase(x)]!==void 0&&g[r.Parser.camelCase(b)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",x,b))})})},s.recommendCommands=function(g,x){x=x.sort((I,k)=>k.length-I.length);let A=null,C=1/0;for(let I=0,k;(k=x[I])!==void 0;I++){let O=oRe(g,k);O<=3&&O<C&&(C=O,A=k)}A&&t.fail(n("Did you mean %s?",A))},s.reset=function(g){return c=jC(c,x=>!g[x]),f=jC(f,x=>!g[x]),s};let d=[];return s.freeze=function(){d.push({implied:c,conflicting:f})},s.unfreeze=function(){let g=d.pop();om(g,void 0,r),{implied:c,conflicting:f}=g},s}var ti=function(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r},qe=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ep,Qk,sL,cy,zg,q7,qC,Lk,U7,uy,z7,ly,Yb,Hg,py,H7,SR,If,bi,$7,V7,$g,jk,CR,Mk,UC,W7,us,qk,Uk,zk,Ss,G7,Jb,Tl;function TRe(e){return(t=[],r=e.process.cwd(),n)=>{let a=new Nie(t,r,n,e);return Object.defineProperty(a,"argv",{get:()=>a.parse(),enumerable:!0}),a.help(),a.version(),a}}var lRe=Symbol("copyDoubleDash"),pRe=Symbol("copyDoubleDash"),Sie=Symbol("deleteFromParserHintObject"),fRe=Symbol("emitWarning"),dRe=Symbol("freeze"),hRe=Symbol("getDollarZero"),Hk=Symbol("getParserConfiguration"),mRe=Symbol("getUsageConfiguration"),Cie=Symbol("guessLocale"),gRe=Symbol("guessVersion"),ARe=Symbol("parsePositionalNumbers"),_ie=Symbol("pkgUp"),zC=Symbol("populateParserHintArray"),_R=Symbol("populateParserHintSingleValueDictionary"),Iie=Symbol("populateParserHintArrayDictionary"),kie=Symbol("populateParserHintDictionary"),Tie=Symbol("sanitizeKey"),Bie=Symbol("setKey"),Die=Symbol("unfreeze"),yRe=Symbol("validateAsync"),vRe=Symbol("getCommandInstance"),xRe=Symbol("getContext"),bRe=Symbol("getHasOutput"),ERe=Symbol("getLoggerInstance"),wRe=Symbol("getParseContext"),SRe=Symbol("getUsageInstance"),CRe=Symbol("getValidationInstance"),Y7=Symbol("hasParseCallback"),_Re=Symbol("isGlobalContext"),$k=Symbol("postProcess"),IRe=Symbol("rebase"),Pie=Symbol("reset"),aL=Symbol("runYargsParserAndExecuteCommands"),Rie=Symbol("runValidation"),kRe=Symbol("setHasOutput"),Vk=Symbol("kTrackManuallySetKeys"),Nie=class{constructor(t=[],r,n,a){this.customScriptName=!1,this.parsed=!1,ep.set(this,void 0),Qk.set(this,void 0),sL.set(this,{commands:[],fullCommands:[]}),cy.set(this,null),zg.set(this,null),q7.set(this,"show-hidden"),qC.set(this,null),Lk.set(this,!0),U7.set(this,{}),uy.set(this,!0),z7.set(this,[]),ly.set(this,void 0),Yb.set(this,{}),Hg.set(this,!1),py.set(this,null),H7.set(this,!0),SR.set(this,void 0),If.set(this,""),bi.set(this,void 0),$7.set(this,void 0),V7.set(this,{}),$g.set(this,null),jk.set(this,null),CR.set(this,{}),Mk.set(this,{}),UC.set(this,void 0),W7.set(this,!1),us.set(this,void 0),qk.set(this,!1),Uk.set(this,!1),zk.set(this,!1),Ss.set(this,void 0),G7.set(this,{}),Jb.set(this,null),Tl.set(this,void 0),ti(this,us,a,"f"),ti(this,UC,t,"f"),ti(this,Qk,r,"f"),ti(this,$7,n,"f"),ti(this,ly,new L7(this),"f"),this.$0=this[hRe](),this[Pie](),ti(this,ep,qe(this,ep,"f"),"f"),ti(this,Ss,qe(this,Ss,"f"),"f"),ti(this,Tl,qe(this,Tl,"f"),"f"),ti(this,bi,qe(this,bi,"f"),"f"),qe(this,bi,"f").showHiddenOpt=qe(this,q7,"f"),ti(this,SR,this[pRe](),"f")}addHelpOpt(t,r){let n="help";return Zn("[string|boolean] [string]",[t,r],arguments.length),qe(this,py,"f")&&(this[Sie](qe(this,py,"f")),ti(this,py,null,"f")),t===!1&&r===void 0?this:(ti(this,py,typeof t=="string"?t:n,"f"),this.boolean(qe(this,py,"f")),this.describe(qe(this,py,"f"),r||qe(this,Ss,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(Zn("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:qe(this,q7,"f");return this.boolean(n),this.describe(n,r||qe(this,Ss,"f").deferY18nLookup("Show hidden options")),qe(this,bi,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return Zn("<object|string|array> [string|array]",[t,r],arguments.length),this[Iie](this.alias.bind(this),"alias",t,r),this}array(t){return Zn("<array|string>",[t],arguments.length),this[zC]("array",t),this[Vk](t),this}boolean(t){return Zn("<array|string>",[t],arguments.length),this[zC]("boolean",t),this[Vk](t),this}check(t,r){return Zn("<function> [boolean]",[t,r],arguments.length),this.middleware((n,a)=>Ok(()=>t(n,a.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&qe(this,Ss,"f").fail(s.toString(),s):qe(this,Ss,"f").fail(qe(this,us,"f").y18n.__("Argument check failed: %s",t.toString())),n),s=>(qe(this,Ss,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(t,r){return Zn("<object|string|array> [string|array]",[t,r],arguments.length),this[Iie](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(Zn("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new uu("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new uu("coerce callback must be provided");return qe(this,bi,"f").key[t]=!0,qe(this,ly,"f").addCoerceMiddleware((n,a)=>{let s;return Object.prototype.hasOwnProperty.call(n,t)?Ok(()=>(s=a.getAliases(),r(n[t])),l=>{n[t]=l;let f=a.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[t]&&f!==!0)for(let d of s[t])n[d]=l;return n},l=>{throw new uu(l.message)}):n},t),this}conflicts(t,r){return Zn("<string|object> [string|array]",[t,r],arguments.length),qe(this,Tl,"f").conflicts(t,r),this}config(t="config",r,n){return Zn("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=rL(t,qe(this,Qk,"f"),this[Hk]()["deep-merge-config"]||!1,qe(this,us,"f")),qe(this,bi,"f").configObjects=(qe(this,bi,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||qe(this,Ss,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(a=>{qe(this,bi,"f").config[a]=n||!0}),this)}completion(t,r,n){return Zn("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ti(this,zg,t||qe(this,zg,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(qe(this,zg,"f"),r),n&&qe(this,cy,"f").registerFunction(n),this}command(t,r,n,a,s,c){return Zn("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,a,s,c],arguments.length),qe(this,ep,"f").addHandler(t,r,n,a,s,c),this}commands(t,r,n,a,s,c){return this.command(t,r,n,a,s,c)}commandDir(t,r){Zn("<string> [object]",[t,r],arguments.length);let n=qe(this,$7,"f")||qe(this,us,"f").require;return qe(this,ep,"f").addDirectory(t,n,qe(this,us,"f").getCallerFile(),r),this}count(t){return Zn("<array|string>",[t],arguments.length),this[zC]("count",t),this[Vk](t),this}default(t,r,n){return Zn("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(vie(t,qe(this,us,"f")),qe(this,bi,"f").defaultDescription[t]=n),typeof r=="function"&&(vie(t,qe(this,us,"f")),qe(this,bi,"f").defaultDescription[t]||(qe(this,bi,"f").defaultDescription[t]=qe(this,Ss,"f").functionDescription(r)),r=r.call()),this[_R](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,a){return Zn("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,a],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),qe(this,bi,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:a},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(a=>{om(n,!0,qe(this,us,"f")),this.demandOption(a,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(om(n,!0,qe(this,us,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(a=>{om(n,!0,qe(this,us,"f")),this.demandOption(a,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return Zn("<object|string|array> [string]",[t,r],arguments.length),this[_R](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return Zn("<string> [string|boolean]",[t,r],arguments.length),qe(this,bi,"f").deprecatedOptions[t]=r,this}describe(t,r){return Zn("<object|string|array> [string]",[t,r],arguments.length),this[Bie](t,!0),qe(this,Ss,"f").describe(t,r),this}detectLocale(t){return Zn("<boolean>",[t],arguments.length),ti(this,Lk,t,"f"),this}env(t){return Zn("[string|boolean]",[t],arguments.length),t===!1?delete qe(this,bi,"f").envPrefix:qe(this,bi,"f").envPrefix=t||"",this}epilogue(t){return Zn("<string>",[t],arguments.length),qe(this,Ss,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return Zn("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):qe(this,Ss,"f").example(t,r),this}exit(t,r){ti(this,Hg,!0,"f"),ti(this,qC,r,"f"),qe(this,uy,"f")&&qe(this,us,"f").process.exit(t)}exitProcess(t=!0){return Zn("[boolean]",[t],arguments.length),ti(this,uy,t,"f"),this}fail(t){if(Zn("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new uu("Invalid first argument. Expected function or boolean 'false'");return qe(this,Ss,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return Zn("<array> [function]",[t,r],arguments.length),r?qe(this,cy,"f").getCompletion(t,r):new Promise((n,a)=>{qe(this,cy,"f").getCompletion(t,(s,c)=>{s?a(s):n(c)})})}getDemandedOptions(){return Zn([],0),qe(this,bi,"f").demandedOptions}getDemandedCommands(){return Zn([],0),qe(this,bi,"f").demandedCommands}getDeprecatedOptions(){return Zn([],0),qe(this,bi,"f").deprecatedOptions}getDetectLocale(){return qe(this,Lk,"f")}getExitProcess(){return qe(this,uy,"f")}getGroups(){return Object.assign({},qe(this,Yb,"f"),qe(this,Mk,"f"))}getHelp(){if(ti(this,Hg,!0,"f"),!qe(this,Ss,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[aL](qe(this,UC,"f"),void 0,void 0,0,!0);if(lu(r))return r.then(()=>qe(this,Ss,"f").help())}let t=qe(this,ep,"f").runDefaultBuilderOn(this);if(lu(t))return t.then(()=>qe(this,Ss,"f").help())}return Promise.resolve(qe(this,Ss,"f").help())}getOptions(){return qe(this,bi,"f")}getStrict(){return qe(this,qk,"f")}getStrictCommands(){return qe(this,Uk,"f")}getStrictOptions(){return qe(this,zk,"f")}global(t,r){return Zn("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?qe(this,bi,"f").local=qe(this,bi,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{qe(this,bi,"f").local.includes(n)||qe(this,bi,"f").local.push(n)}),this}group(t,r){Zn("<string|array> <string>",[t,r],arguments.length);let n=qe(this,Mk,"f")[r]||qe(this,Yb,"f")[r];qe(this,Mk,"f")[r]&&delete qe(this,Mk,"f")[r];let a={};return qe(this,Yb,"f")[r]=(n||[]).concat(t).filter(s=>a[s]?!1:a[s]=!0),this}hide(t){return Zn("<string>",[t],arguments.length),qe(this,bi,"f").hiddenOptions.push(t),this}implies(t,r){return Zn("<string|object> [number|string|array]",[t,r],arguments.length),qe(this,Tl,"f").implies(t,r),this}locale(t){return Zn("[string]",[t],arguments.length),t===void 0?(this[Cie](),qe(this,us,"f").y18n.getLocale()):(ti(this,Lk,!1,"f"),qe(this,us,"f").y18n.setLocale(t),this)}middleware(t,r,n){return qe(this,ly,"f").addMiddleware(t,!!r,n)}nargs(t,r){return Zn("<string|object|array> [number]",[t,r],arguments.length),this[_R](this.nargs.bind(this),"narg",t,r),this}normalize(t){return Zn("<array|string>",[t],arguments.length),this[zC]("normalize",t),this}number(t){return Zn("<array|string>",[t],arguments.length),this[zC]("number",t),this[Vk](t),this}option(t,r){if(Zn("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[Vk](t),qe(this,Jb,"f")&&(t==="version"||(r==null?void 0:r.alias)==="version")&&this[fRe](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
520
520
  `),void 0,"versionWarning"),qe(this,bi,"f").key[t]=!0,r.alias&&this.alias(t,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(t,n);let a=r.demand||r.required||r.require;a&&this.demand(t,a),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(qe(this,bi,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let s=r.describe||r.description||r.desc,c=qe(this,Ss,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,t)||typeof s=="string")&&this.describe(t,s),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t)}return this}options(t,r){return this.option(t,r)}parse(t,r,n){Zn("[string|array] [function|boolean|object] [function]",[t,r,n],arguments.length),this[dRe](),typeof t>"u"&&(t=qe(this,UC,"f")),typeof r=="object"&&(ti(this,jk,r,"f"),r=n),typeof r=="function"&&(ti(this,$g,r,"f"),r=!1),r||ti(this,UC,t,"f"),qe(this,$g,"f")&&ti(this,uy,!1,"f");let a=this[aL](t,!!r),s=this.parsed;return qe(this,cy,"f").setParsed(this.parsed),lu(a)?a.then(c=>(qe(this,$g,"f")&&qe(this,$g,"f").call(this,qe(this,qC,"f"),c,qe(this,If,"f")),c)).catch(c=>{throw qe(this,$g,"f")&&qe(this,$g,"f")(c,this.parsed.argv,qe(this,If,"f")),c}).finally(()=>{this[Die](),this.parsed=s}):(qe(this,$g,"f")&&qe(this,$g,"f").call(this,qe(this,qC,"f"),a,qe(this,If,"f")),this[Die](),this.parsed=s,a)}parseAsync(t,r,n){let a=this.parse(t,r,n);return lu(a)?a:Promise.resolve(a)}parseSync(t,r,n){let a=this.parse(t,r,n);if(lu(a))throw new uu(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return a}parserConfiguration(t){return Zn("<object>",[t],arguments.length),ti(this,V7,t,"f"),this}pkgConf(t,r){Zn("<string> [string]",[t,r],arguments.length);let n=null,a=this[_ie](r||qe(this,Qk,"f"));return a[t]&&typeof a[t]=="object"&&(n=rL(a[t],r||qe(this,Qk,"f"),this[Hk]()["deep-merge-config"]||!1,qe(this,us,"f")),qe(this,bi,"f").configObjects=(qe(this,bi,"f").configObjects||[]).concat(n)),this}positional(t,r){Zn("<string> <object>",[t,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=jC(r,(c,l)=>c==="type"&&!["string","number","boolean"].includes(l)?!1:n.includes(c));let a=qe(this,sL,"f").fullCommands[qe(this,sL,"f").fullCommands.length-1],s=a?qe(this,ep,"f").cmdToParseOptions(a):{array:[],alias:{},default:{},demand:{}};return ER(s).forEach(c=>{let l=s[c];Array.isArray(l)?l.indexOf(t)!==-1&&(r[c]=!0):l[t]&&!(c in r)&&(r[c]=l[t])}),this.group(t,qe(this,Ss,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=!0){return Zn("[boolean]",[t],arguments.length),ti(this,W7,t,"f"),this}required(t,r,n){return this.demand(t,r,n)}require(t,r,n){return this.demand(t,r,n)}requiresArg(t){return Zn("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&qe(this,bi,"f").narg[t]?this:(this[_R](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return Zn("[string] [string]",[t,r],arguments.length),t=t||this.$0,qe(this,SR,"f").log(qe(this,cy,"f").generateCompletionScript(t,r||qe(this,zg,"f")||"completion")),this}showHelp(t){if(Zn("[string|function]",[t],arguments.length),ti(this,Hg,!0,"f"),!qe(this,Ss,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[aL](qe(this,UC,"f"),void 0,void 0,0,!0);if(lu(n))return n.then(()=>{qe(this,Ss,"f").showHelp(t)}),this}let r=qe(this,ep,"f").runDefaultBuilderOn(this);if(lu(r))return r.then(()=>{qe(this,Ss,"f").showHelp(t)}),this}return qe(this,Ss,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,r){return Zn("[boolean|string] [string]",[t,r],arguments.length),qe(this,Ss,"f").showHelpOnFail(t,r),this}showVersion(t){return Zn("[string|function]",[t],arguments.length),qe(this,Ss,"f").showVersion(t),this}skipValidation(t){return Zn("<array|string>",[t],arguments.length),this[zC]("skipValidation",t),this}strict(t){return Zn("[boolean]",[t],arguments.length),ti(this,qk,t!==!1,"f"),this}strictCommands(t){return Zn("[boolean]",[t],arguments.length),ti(this,Uk,t!==!1,"f"),this}strictOptions(t){return Zn("[boolean]",[t],arguments.length),ti(this,zk,t!==!1,"f"),this}string(t){return Zn("<array|string>",[t],arguments.length),this[zC]("string",t),this[Vk](t),this}terminalWidth(){return Zn([],0),qe(this,us,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return Zn("<object>",[t],arguments.length),ti(this,Lk,!1,"f"),qe(this,us,"f").y18n.updateLocale(t),this}usage(t,r,n,a){if(Zn("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,n,a],arguments.length),r!==void 0){if(om(t,null,qe(this,us,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,n,a);throw new uu(".usage() description must start with $0 if being used as alias for .command()")}else return qe(this,Ss,"f").usage(t),this}usageConfiguration(t){return Zn("<object>",[t],arguments.length),ti(this,G7,t,"f"),this}version(t,r,n){let a="version";if(Zn("[boolean|string] [string] [string]",[t,r,n],arguments.length),qe(this,Jb,"f")&&(this[Sie](qe(this,Jb,"f")),qe(this,Ss,"f").version(void 0),ti(this,Jb,null,"f")),arguments.length===0)n=this[gRe](),t=a;else if(arguments.length===1){if(t===!1)return this;n=t,t=a}else arguments.length===2&&(n=r,r=void 0);return ti(this,Jb,typeof t=="string"?t:a,"f"),r=r||qe(this,Ss,"f").deferY18nLookup("Show version number"),qe(this,Ss,"f").version(n||void 0),this.boolean(qe(this,Jb,"f")),this.describe(qe(this,Jb,"f"),r),this}wrap(t){return Zn("<number|null|undefined>",[t],arguments.length),qe(this,Ss,"f").wrap(t),this}[(ep=new WeakMap,Qk=new WeakMap,sL=new WeakMap,cy=new WeakMap,zg=new WeakMap,q7=new WeakMap,qC=new WeakMap,Lk=new WeakMap,U7=new WeakMap,uy=new WeakMap,z7=new WeakMap,ly=new WeakMap,Yb=new WeakMap,Hg=new WeakMap,py=new WeakMap,H7=new WeakMap,SR=new WeakMap,If=new WeakMap,bi=new WeakMap,$7=new WeakMap,V7=new WeakMap,$g=new WeakMap,jk=new WeakMap,CR=new WeakMap,Mk=new WeakMap,UC=new WeakMap,W7=new WeakMap,us=new WeakMap,qk=new WeakMap,Uk=new WeakMap,zk=new WeakMap,Ss=new WeakMap,G7=new WeakMap,Jb=new WeakMap,Tl=new WeakMap,lRe)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[pRe](){return{log:(...t)=>{this[Y7]()||console.log(...t),ti(this,Hg,!0,"f"),qe(this,If,"f").length&&ti(this,If,qe(this,If,"f")+`
521
521
  `,"f"),ti(this,If,qe(this,If,"f")+t.join(" "),"f")},error:(...t)=>{this[Y7]()||console.error(...t),ti(this,Hg,!0,"f"),qe(this,If,"f").length&&ti(this,If,qe(this,If,"f")+`
522
- `,"f"),ti(this,If,qe(this,If,"f")+t.join(" "),"f")}}}[Sie](t){ER(qe(this,bi,"f")).forEach(r=>{if((a=>a==="configObjects")(r))return;let n=qe(this,bi,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete qe(this,Ss,"f").getDescriptions()[t]}[fRe](t,r,n){qe(this,U7,"f")[n]||(qe(this,us,"f").process.emitWarning(t,r),qe(this,U7,"f")[n]=!0)}[dRe](){qe(this,z7,"f").push({options:qe(this,bi,"f"),configObjects:qe(this,bi,"f").configObjects.slice(0),exitProcess:qe(this,uy,"f"),groups:qe(this,Yb,"f"),strict:qe(this,qk,"f"),strictCommands:qe(this,Uk,"f"),strictOptions:qe(this,zk,"f"),completionCommand:qe(this,zg,"f"),output:qe(this,If,"f"),exitError:qe(this,qC,"f"),hasOutput:qe(this,Hg,"f"),parsed:this.parsed,parseFn:qe(this,$g,"f"),parseContext:qe(this,jk,"f")}),qe(this,Ss,"f").freeze(),qe(this,Tl,"f").freeze(),qe(this,ep,"f").freeze(),qe(this,ly,"f").freeze()}[hRe](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(qe(this,us,"f").process.argv()[0])?r=qe(this,us,"f").process.argv().slice(1,2):r=qe(this,us,"f").process.argv().slice(0,1),t=r.map(n=>{let a=this[IRe](qe(this,Qk,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&a.length<n.length?a:n}).join(" ").trim(),qe(this,us,"f").getEnv("_")&&qe(this,us,"f").getProcessArgvBin()===qe(this,us,"f").getEnv("_")&&(t=qe(this,us,"f").getEnv("_").replace(`${qe(this,us,"f").path.dirname(qe(this,us,"f").process.execPath())}/`,"")),t}[Hk](){return qe(this,V7,"f")}[mRe](){return qe(this,G7,"f")}[Cie](){if(!qe(this,Lk,"f"))return;let t=qe(this,us,"f").getEnv("LC_ALL")||qe(this,us,"f").getEnv("LC_MESSAGES")||qe(this,us,"f").getEnv("LANG")||qe(this,us,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[gRe](){return this[_ie]().version||"unknown"}[ARe](t){let r=t["--"]?t["--"]:t._;for(let n=0,a;(a=r[n])!==void 0;n++)qe(this,us,"f").Parser.looksLikeNumber(a)&&Number.isSafeInteger(Math.floor(parseFloat(`${a}`)))&&(r[n]=Number(a));return t}[_ie](t){let r=t||"*";if(qe(this,CR,"f")[r])return qe(this,CR,"f")[r];let n={};try{let a=t||qe(this,us,"f").mainFilename;!t&&qe(this,us,"f").path.extname(a)&&(a=qe(this,us,"f").path.dirname(a));let s=qe(this,us,"f").findUp(a,(c,l)=>{if(l.includes("package.json"))return"package.json"});om(s,void 0,qe(this,us,"f")),n=JSON.parse(qe(this,us,"f").readFileSync(s,"utf8"))}catch{}return qe(this,CR,"f")[r]=n||{},qe(this,CR,"f")[r]}[zC](t,r){r=[].concat(r),r.forEach(n=>{n=this[Tie](n),qe(this,bi,"f")[t].push(n)})}[_R](t,r,n,a){this[kie](t,r,n,a,(s,c,l)=>{qe(this,bi,"f")[s][c]=l})}[Iie](t,r,n,a){this[kie](t,r,n,a,(s,c,l)=>{qe(this,bi,"f")[s][c]=(qe(this,bi,"f")[s][c]||[]).concat(l)})}[kie](t,r,n,a,s){if(Array.isArray(n))n.forEach(c=>{t(c,a)});else if((c=>typeof c=="object")(n))for(let c of ER(n))t(c,n[c]);else s(r,this[Tie](n),a)}[Tie](t){return t==="__proto__"?"___proto___":t}[Bie](t,r){return this[_R](this[Bie].bind(this),"key",t,r),this}[Die](){var t,r,n,a,s,c,l,f,d,m,g,x;let b=qe(this,z7,"f").pop();om(b,void 0,qe(this,us,"f"));let A;t=this,r=this,n=this,a=this,s=this,c=this,l=this,f=this,d=this,m=this,g=this,x=this,{options:{set value(C){ti(t,bi,C,"f")}}.value,configObjects:A,exitProcess:{set value(C){ti(r,uy,C,"f")}}.value,groups:{set value(C){ti(n,Yb,C,"f")}}.value,output:{set value(C){ti(a,If,C,"f")}}.value,exitError:{set value(C){ti(s,qC,C,"f")}}.value,hasOutput:{set value(C){ti(c,Hg,C,"f")}}.value,parsed:this.parsed,strict:{set value(C){ti(l,qk,C,"f")}}.value,strictCommands:{set value(C){ti(f,Uk,C,"f")}}.value,strictOptions:{set value(C){ti(d,zk,C,"f")}}.value,completionCommand:{set value(C){ti(m,zg,C,"f")}}.value,parseFn:{set value(C){ti(g,$g,C,"f")}}.value,parseContext:{set value(C){ti(x,jk,C,"f")}}.value}=b,qe(this,bi,"f").configObjects=A,qe(this,Ss,"f").unfreeze(),qe(this,Tl,"f").unfreeze(),qe(this,ep,"f").unfreeze(),qe(this,ly,"f").unfreeze()}[yRe](t,r){return Ok(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[vRe].bind(this),getContext:this[xRe].bind(this),getHasOutput:this[bRe].bind(this),getLoggerInstance:this[ERe].bind(this),getParseContext:this[wRe].bind(this),getParserConfiguration:this[Hk].bind(this),getUsageConfiguration:this[mRe].bind(this),getUsageInstance:this[SRe].bind(this),getValidationInstance:this[CRe].bind(this),hasParseCallback:this[Y7].bind(this),isGlobalContext:this[_Re].bind(this),postProcess:this[$k].bind(this),reset:this[Pie].bind(this),runValidation:this[Rie].bind(this),runYargsParserAndExecuteCommands:this[aL].bind(this),setHasOutput:this[kRe].bind(this)}}[vRe](){return qe(this,ep,"f")}[xRe](){return qe(this,sL,"f")}[bRe](){return qe(this,Hg,"f")}[ERe](){return qe(this,SR,"f")}[wRe](){return qe(this,jk,"f")||{}}[SRe](){return qe(this,Ss,"f")}[CRe](){return qe(this,Tl,"f")}[Y7](){return!!qe(this,$g,"f")}[_Re](){return qe(this,H7,"f")}[$k](t,r,n,a){return n||lu(t)||(r||(t=this[lRe](t)),(this[Hk]()["parse-positional-numbers"]||this[Hk]()["parse-positional-numbers"]===void 0)&&(t=this[ARe](t)),a&&(t=Fk(t,this,qe(this,ly,"f").getMiddleware(),!1))),t}[Pie](t={}){ti(this,bi,qe(this,bi,"f")||{},"f");let r={};r.local=qe(this,bi,"f").local||[],r.configObjects=qe(this,bi,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(t[c]||[]).forEach(l=>{n[l]=!0})}),Object.assign(qe(this,Mk,"f"),Object.keys(qe(this,Yb,"f")).reduce((c,l)=>{let f=qe(this,Yb,"f")[l].filter(d=>!(d in n));return f.length>0&&(c[l]=f),c},{})),ti(this,Yb,{},"f");let a=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return a.forEach(c=>{r[c]=(qe(this,bi,"f")[c]||[]).filter(l=>!n[l])}),s.forEach(c=>{r[c]=jC(qe(this,bi,"f")[c],l=>!n[l])}),r.envPrefix=qe(this,bi,"f").envPrefix,ti(this,bi,r,"f"),ti(this,Ss,qe(this,Ss,"f")?qe(this,Ss,"f").reset(n):nRe(this,qe(this,us,"f")),"f"),ti(this,Tl,qe(this,Tl,"f")?qe(this,Tl,"f").reset(n):uRe(this,qe(this,Ss,"f"),qe(this,us,"f")),"f"),ti(this,ep,qe(this,ep,"f")?qe(this,ep,"f").reset():eRe(qe(this,Ss,"f"),qe(this,Tl,"f"),qe(this,ly,"f"),qe(this,us,"f")),"f"),qe(this,cy,"f")||ti(this,cy,aRe(this,qe(this,Ss,"f"),qe(this,ep,"f"),qe(this,us,"f")),"f"),qe(this,ly,"f").reset(),ti(this,zg,null,"f"),ti(this,If,"","f"),ti(this,qC,null,"f"),ti(this,Hg,!1,"f"),this.parsed=!1,this}[IRe](t,r){return qe(this,us,"f").path.relative(t,r)}[aL](t,r,n,a=0,s=!1){let c=!!n||s;t=t||qe(this,UC,"f"),qe(this,bi,"f").__=qe(this,us,"f").y18n.__,qe(this,bi,"f").configuration=this[Hk]();let l=!!qe(this,bi,"f").configuration["populate--"],f=Object.assign({},qe(this,bi,"f").configuration,{"populate--":!0}),d=qe(this,us,"f").Parser.detailed(t,Object.assign({},qe(this,bi,"f"),{configuration:{"parse-positional-numbers":!1,...f}})),m=Object.assign(d.argv,qe(this,jk,"f")),g,x=d.aliases,b=!1,A=!1;Object.keys(m).forEach(C=>{C===qe(this,py,"f")&&m[C]?b=!0:C===qe(this,Jb,"f")&&m[C]&&(A=!0)}),m.$0=this.$0,this.parsed=d,a===0&&qe(this,Ss,"f").clearCachedHelpMessage();try{if(this[Cie](),r)return this[$k](m,l,!!n,!1);qe(this,py,"f")&&[qe(this,py,"f")].concat(x[qe(this,py,"f")]||[]).filter(M=>M.length>1).includes(""+m._[m._.length-1])&&(m._.pop(),b=!0),ti(this,H7,!1,"f");let C=qe(this,ep,"f").getCommands(),I=qe(this,cy,"f").completionKey in m,k=b||I||s;if(m._.length){if(C.length){let O;for(let M=a||0,j;m._[M]!==void 0;M++)if(j=String(m._[M]),C.includes(j)&&j!==qe(this,zg,"f")){let W=qe(this,ep,"f").runCommand(j,this,d,M+1,s,b||A||s);return this[$k](W,l,!!n,!1)}else if(!O&&j!==qe(this,zg,"f")){O=j;break}!qe(this,ep,"f").hasDefaultCommand()&&qe(this,W7,"f")&&O&&!k&&qe(this,Tl,"f").recommendCommands(O,C)}qe(this,zg,"f")&&m._.includes(qe(this,zg,"f"))&&!I&&(qe(this,uy,"f")&&MC(!0),this.showCompletionScript(),this.exit(0))}if(qe(this,ep,"f").hasDefaultCommand()&&!k){let O=qe(this,ep,"f").runCommand(null,this,d,0,s,b||A||s);return this[$k](O,l,!!n,!1)}if(I){qe(this,uy,"f")&&MC(!0),t=[].concat(t);let O=t.slice(t.indexOf(`--${qe(this,cy,"f").completionKey}`)+1);return qe(this,cy,"f").getCompletion(O,(M,j)=>{if(M)throw new uu(M.message);(j||[]).forEach(W=>{qe(this,SR,"f").log(W)}),this.exit(0)}),this[$k](m,!l,!!n,!1)}if(qe(this,Hg,"f")||(b?(qe(this,uy,"f")&&MC(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(qe(this,uy,"f")&&MC(!0),c=!0,qe(this,Ss,"f").showVersion("log"),this.exit(0))),!c&&qe(this,bi,"f").skipValidation.length>0&&(c=Object.keys(m).some(O=>qe(this,bi,"f").skipValidation.indexOf(O)>=0&&m[O]===!0)),!c){if(d.error)throw new uu(d.error.message);if(!I){let O=this[Rie](x,{},d.error);n||(g=Fk(m,this,qe(this,ly,"f").getMiddleware(),!0)),g=this[yRe](O,g!=null?g:m),lu(g)&&!n&&(g=g.then(()=>Fk(m,this,qe(this,ly,"f").getMiddleware(),!1)))}}}catch(C){if(C instanceof uu)qe(this,Ss,"f").fail(C.message,C);else throw C}return this[$k](g!=null?g:m,l,!!n,!0)}[Rie](t,r,n,a){let s={...this.getDemandedOptions()};return c=>{if(n)throw new uu(n.message);qe(this,Tl,"f").nonOptionCount(c),qe(this,Tl,"f").requiredArguments(c,s);let l=!1;qe(this,Uk,"f")&&(l=qe(this,Tl,"f").unknownCommands(c)),qe(this,qk,"f")&&!l?qe(this,Tl,"f").unknownArguments(c,t,r,!!a):qe(this,zk,"f")&&qe(this,Tl,"f").unknownArguments(c,t,{},!1,!1),qe(this,Tl,"f").limitedChoices(c),qe(this,Tl,"f").implications(c),qe(this,Tl,"f").conflicting(c)}}[kRe](){ti(this,Hg,!0,"f")}[Vk](t){if(typeof t=="string")qe(this,bi,"f").key[t]=!0;else for(let r of t)qe(this,bi,"f").key[r]=!0}};function tRe(e){return!!e&&typeof e.getInternalMethods=="function"}var szt=TRe(yie),BRe=szt;var Wk={name:"edgeone",version:"1.3.0-beta.1",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/templates","./edgeone-dist/pages/dev/runner-worker.js"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build",prepublishOnly:"npm run build",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/nuxt-pages":"1.1.0-beta.4","@edgeone/opennextjs-pages":"0.1.7",archiver:"^7.0.1",chokidar:"^4.0.1","common-path-prefix":"^1.0.0","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6",crypto:"^1.0.1","detect-port":"^2.1.0",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","esbuild-plugin-vue":"^0.2.4","fast-glob":"^3.3.0","fs-extra":"^11.3.1","ink-table":"^3.1.0",inquirer:"^8.2.4",install:"^0.13.0",lodash:"^4.17.21","mime-types":"^3.0.1",minimatch:"^9.0.5","node-persist":"^4.0.3",npm:"^10.9.1",open:"^8.4.2","p-map":"^5.5.0","parse-gitignore":"^2.0.0",portfinder:"^1.0.32",undici:"^5.29.0",vitest:"^4.0.17"},devDependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",axios:"^1.7.9",chalk:"^5.3.0",cookie:"^1.0.2",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0",ip:"^2.0.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21",moment:"^2.30.1","node-fetch":"^3.3.2",prettier:"^3.1.1",prompts:"^2.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3","update-check":"^1.5.4",uuid:"^9.0.0",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var Fie=class{log(t,r){try{let n=this.format(r),a=JSON.stringify({key:t,value:n});process.send(a)}catch{}}format(t){return typeof t=="object"?JSON.stringify(t):typeof t=="number"?String(t):t}},ozt=new Fie,J7=ozt;var Kqe=gr(_c()),Xqe=gr(zR()),Zqe=gr(Lae());var BQe=gr(Uae()),n2=gr(require("fs"));var zae=gr(require("path"));function vd(e,t){return zae.default.join(e,t)}function pn(e){return vd(process.cwd(),e)}function yQe(e){return zae.default.dirname(e)}var Uz=TQe(),Yae=require("path");function Jae(){try{Uz.initSync({dir:FGt()})}catch(e){console.error("[File] initStorage error",e)}}async function VR(e,t,r){Jae(),await Uz.setItem(e,t).catch(n=>{console.error("[File] setLocalData error",n)}),r==null||r()}async function WR(e){return Jae(),await Uz.getItem(e).catch(r=>{console.error("[File] getLocalData error",r)})}async function zz(e){Jae(),await Uz.removeItem(e).catch(t=>{console.error("[File] removeLocalData error",t)})}function FGt(){try{let e=Yae.parse(process.cwd()).root,t=process.cwd(),n=Yae.relative(e,t).split(Yae.sep).length-2;return`${new Array(Math.max(0,n)).fill("../").join("")}.edgeone`}catch{return".edgeone"}}function DQe(e){return n2.default.statSync(e)}function OGt(e){return n2.default.mkdirSync(e,{recursive:!0})}function QGt(e){return n2.default.existsSync(e)}function GR(e){return n2.default.existsSync(e)}function Hz(e,t="utf-8"){return n2.default.readFileSync(e,t)}function D0(e){let t=Hz(e);return JSON.parse(t)}function YR(e){let t=Hz(e);return BQe.default.parse(t)}function ph(e,t,r="utf-8"){let n=yQe(e);return QGt(n)||OGt(n),n2.default.writeFileSync(e,t,r)}function Kae(e,t){return GR(e)?n2.default.appendFileSync(e,t):n2.default.writeFileSync(e,t)}var Ks=gr(zR()),Os=gr(_c()),aj=gr(PQe());function cm(){return!process.stdout.isTTY||process.env.FORCE_NON_TTY==="1"}function sT({prefix:e="cli"}){return Os.default.createElement(Ks.Text,{color:"grey"},"[",e,"]")}function Yr(e,t="cli"){if(cm()){console.log(`[${t}][\u2718] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"red"},"[\u2718] "),e));r()}function ha(e,t="cli"){if(cm()){console.log(`[${t}][\u2714] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"green"},"[\u2714] "),e));r()}function aT(e,t="cli"){if(cm()){console.log(`[${t}] WARNING: ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"orange"},"\u2757\uFE0F "),e));r()}function Zo(e,t="cli"){if(cm()){console.log(`[${t}]${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"cyan"},Os.default.createElement(sT,{prefix:t}),e));r()}function $z(e){if(cm()){console.log(e);return}let{unmount:t}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"cyan"},e));t()}function wn(e,t="cli"){if(cm()){console.log(`[${t}]${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"white"},Os.default.createElement(sT,{prefix:t}),e));r()}function NQe(e,t,r="cli"){let n=t;if(t.includes("http")&&(n=new URL(t).pathname),cm()){console.log(`${e} ${n}`);return}let{unmount:a}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"grey"},e," ",n));a()}function Zae({timestamp:e}){return Os.default.createElement(Ks.Box,{width:13},Os.default.createElement(Ks.Text,{color:"grey"},(0,aj.default)(e).format("HH:mm:ss.SSS")))}function FQe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white"},e)));r()}function OQe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} [WARNING] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white",backgroundColor:"yellow"},"[WARNING]"),Os.default.createElement(Ks.Text,null," ",e)));r()}function eoe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} [ERROR] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white",backgroundColor:"red"},"[ERROR]"),Os.default.createElement(Ks.Text,{color:"white"}," ",e)));r()}function LGt({content:e="Loading",prefix:t="cli",intervalMs:r=500,maxDots:n=6}){let[a,s]=(0,Os.useState)("");return(0,Os.useEffect)(()=>{let c=setInterval(()=>{s(l=>l.length>=n?"":l+".")},r);return()=>clearInterval(c)},[r,n]),Os.default.createElement(Ks.Text,{color:"cyan"},Os.default.createElement(sT,{prefix:t}),e,a)}function QQe(e="Loading",t="cli",r=500,n=6){if(cm())return console.log(`[${t}]${e}...`),{stop:()=>{}};let a=(0,Ks.render)(Os.default.createElement(LGt,{content:e,prefix:t,intervalMs:r,maxDots:n}));return{stop:()=>a.unmount()}}function RQe({percent:e,width:t=30,prefix:r="cli",label:n="Progress",color:a="cyan"}){let s=Math.max(0,Math.min(100,Math.round(e))),c=Math.round(s/100*t),l=t-c,f="\u2593".repeat(c),d="\u2591".repeat(Math.max(0,l)),m=String(s).padStart(3," ");return Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:r}),Os.default.createElement(Ks.Text,{color:a},n,": "),"[",Os.default.createElement(Ks.Text,{color:a},f),d,"] ",m,"%")}function LQe(e="Progress",t="cli",r=30,n="cyan"){if(cm()){let c=-1;return{update:(l,f)=>{let d=Math.max(0,Math.min(100,Math.round(l)));(d>=c+20||d===100)&&(c=d,console.log(`[${t}]${f!=null?f:e}: ${d}%`))},stop:()=>{}}}let a=0,s=(0,Ks.render)(Os.default.createElement(RQe,{percent:a,width:r,prefix:t,label:e,color:n}));return{update:(c,l)=>{a=c;let f=l!=null?l:e;s.rerender(Os.default.createElement(RQe,{percent:a,width:r,prefix:t,label:f,color:n}))},stop:()=>s.unmount()}}var HHn=require("fs"),$Hn=require("path");async function Xv(){return process.env.EDGEONE_PAGES_API_REGION?process.env.EDGEONE_PAGES_API_REGION:await WR("login_region")}function oj(e,t){return function(){return e.apply(t,arguments)}}var{toString:jGt}=Object.prototype,{getPrototypeOf:roe}=Object,{iterator:Wz,toStringTag:MQe}=Symbol,Gz=(e=>t=>{let r=jGt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Zv=e=>(e=e.toLowerCase(),t=>Gz(t)===e),Yz=e=>t=>typeof t===e,{isArray:KR}=Array,cj=Yz("undefined");function uj(e){return e!==null&&!cj(e)&&e.constructor!==null&&!cj(e.constructor)&&P0(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var qQe=Zv("ArrayBuffer");function MGt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qQe(e.buffer),t}var qGt=Yz("string"),P0=Yz("function"),UQe=Yz("number"),lj=e=>e!==null&&typeof e=="object",UGt=e=>e===!0||e===!1,Vz=e=>{if(Gz(e)!=="object")return!1;let t=roe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(MQe in e)&&!(Wz in e)},zGt=e=>{if(!lj(e)||uj(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},HGt=Zv("Date"),$Gt=Zv("File"),VGt=Zv("Blob"),WGt=Zv("FileList"),GGt=e=>lj(e)&&P0(e.pipe),YGt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P0(e.append)&&((t=Gz(e))==="formdata"||t==="object"&&P0(e.toString)&&e.toString()==="[object FormData]"))},JGt=Zv("URLSearchParams"),[KGt,XGt,ZGt,eYt]=["ReadableStream","Request","Response","Headers"].map(Zv),tYt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pj(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),KR(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(uj(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),c=s.length,l;for(n=0;n<c;n++)l=s[n],t.call(null,e[l],l,e)}}function zQe(e,t){if(uj(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}var oT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,HQe=e=>!cj(e)&&e!==oT;function toe(){let{caseless:e}=HQe(this)&&this||{},t={},r=(n,a)=>{let s=e&&zQe(t,a)||a;Vz(t[s])&&Vz(n)?t[s]=toe(t[s],n):Vz(n)?t[s]=toe({},n):KR(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&pj(arguments[n],r);return t}var rYt=(e,t,r,{allOwnKeys:n}={})=>(pj(t,(a,s)=>{r&&P0(a)?e[s]=oj(a,r):e[s]=a},{allOwnKeys:n}),e),nYt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),iYt=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sYt=(e,t,r,n)=>{let a,s,c,l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)c=a[s],(!n||n(c,e,t))&&!l[c]&&(t[c]=e[c],l[c]=!0);e=r!==!1&&roe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},aYt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},oYt=e=>{if(!e)return null;if(KR(e))return e;let t=e.length;if(!UQe(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cYt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&roe(Uint8Array)),uYt=(e,t)=>{let n=(e&&e[Wz]).call(e),a;for(;(a=n.next())&&!a.done;){let s=a.value;t.call(e,s[0],s[1])}},lYt=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pYt=Zv("HTMLFormElement"),fYt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),jQe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dYt=Zv("RegExp"),$Qe=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};pj(r,(a,s)=>{let c;(c=t(a,s,e))!==!1&&(n[s]=c||a)}),Object.defineProperties(e,n)},hYt=e=>{$Qe(e,(t,r)=>{if(P0(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(P0(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},mYt=(e,t)=>{let r={},n=a=>{a.forEach(s=>{r[s]=!0})};return KR(e)?n(e):n(String(e).split(t)),r},gYt=()=>{},AYt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yYt(e){return!!(e&&P0(e.append)&&e[MQe]==="FormData"&&e[Wz])}var vYt=e=>{let t=new Array(10),r=(n,a)=>{if(lj(n)){if(t.indexOf(n)>=0)return;if(uj(n))return n;if(!("toJSON"in n)){t[a]=n;let s=KR(n)?[]:{};return pj(n,(c,l)=>{let f=r(c,a+1);!cj(f)&&(s[l]=f)}),t[a]=void 0,s}}return n};return r(e,0)},xYt=Zv("AsyncFunction"),bYt=e=>e&&(lj(e)||P0(e))&&P0(e.then)&&P0(e.catch),VQe=((e,t)=>e?setImmediate:t?((r,n)=>(oT.addEventListener("message",({source:a,data:s})=>{a===oT&&s===r&&n.length&&n.shift()()},!1),a=>{n.push(a),oT.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P0(oT.postMessage)),EYt=typeof queueMicrotask<"u"?queueMicrotask.bind(oT):typeof process<"u"&&process.nextTick||VQe,wYt=e=>e!=null&&P0(e[Wz]),bt={isArray:KR,isArrayBuffer:qQe,isBuffer:uj,isFormData:YGt,isArrayBufferView:MGt,isString:qGt,isNumber:UQe,isBoolean:UGt,isObject:lj,isPlainObject:Vz,isEmptyObject:zGt,isReadableStream:KGt,isRequest:XGt,isResponse:ZGt,isHeaders:eYt,isUndefined:cj,isDate:HGt,isFile:$Gt,isBlob:VGt,isRegExp:dYt,isFunction:P0,isStream:GGt,isURLSearchParams:JGt,isTypedArray:cYt,isFileList:WGt,forEach:pj,merge:toe,extend:rYt,trim:tYt,stripBOM:nYt,inherits:iYt,toFlatObject:sYt,kindOf:Gz,kindOfTest:Zv,endsWith:aYt,toArray:oYt,forEachEntry:uYt,matchAll:lYt,isHTMLForm:pYt,hasOwnProperty:jQe,hasOwnProp:jQe,reduceDescriptors:$Qe,freezeMethods:hYt,toObjectSet:mYt,toCamelCase:fYt,noop:gYt,toFiniteNumber:AYt,findKey:zQe,global:oT,isContextDefined:HQe,isSpecCompliantForm:yYt,toJSONObject:vYt,isAsyncFn:xYt,isThenable:bYt,setImmediate:VQe,asap:EYt,isIterable:wYt};function XR(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}bt.inherits(XR,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:bt.toJSONObject(this.config),code:this.code,status:this.status}}});var WQe=XR.prototype,GQe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GQe[e]={value:e}});Object.defineProperties(XR,GQe);Object.defineProperty(WQe,"isAxiosError",{value:!0});XR.from=(e,t,r,n,a,s)=>{let c=Object.create(WQe);return bt.toFlatObject(e,c,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),XR.call(c,e.message,t,r,n,a),c.cause=e,c.name=e.name,s&&Object.assign(c,s),c};var kn=XR;var JLe=gr(YLe(),1),oH=JLe.default;function woe(e){return bt.isPlainObject(e)||bt.isArray(e)}function XLe(e){return bt.endsWith(e,"[]")?e.slice(0,-2):e}function KLe(e,t,r){return e?e.concat(t).map(function(a,s){return a=XLe(a),!r&&s?"["+a+"]":a}).join(r?".":""):t}function cKt(e){return bt.isArray(e)&&!e.some(woe)}var uKt=bt.toFlatObject(bt,{},null,function(t){return/^is[A-Z]/.test(t)});function lKt(e,t,r){if(!bt.isObject(e))throw new TypeError("target must be an object");t=t||new(oH||FormData),r=bt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,I){return!bt.isUndefined(I[C])});let n=r.metaTokens,a=r.visitor||m,s=r.dots,c=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&bt.isSpecCompliantForm(t);if(!bt.isFunction(a))throw new TypeError("visitor must be a function");function d(A){if(A===null)return"";if(bt.isDate(A))return A.toISOString();if(bt.isBoolean(A))return A.toString();if(!f&&bt.isBlob(A))throw new kn("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(A)||bt.isTypedArray(A)?f&&typeof Blob=="function"?new Blob([A]):Buffer.from(A):A}function m(A,C,I){let k=A;if(A&&!I&&typeof A=="object"){if(bt.endsWith(C,"{}"))C=n?C:C.slice(0,-2),A=JSON.stringify(A);else if(bt.isArray(A)&&cKt(A)||(bt.isFileList(A)||bt.endsWith(C,"[]"))&&(k=bt.toArray(A)))return C=XLe(C),k.forEach(function(M,j){!(bt.isUndefined(M)||M===null)&&t.append(c===!0?KLe([C],j,s):c===null?C:C+"[]",d(M))}),!1}return woe(A)?!0:(t.append(KLe(I,C,s),d(A)),!1)}let g=[],x=Object.assign(uKt,{defaultVisitor:m,convertValue:d,isVisitable:woe});function b(A,C){if(!bt.isUndefined(A)){if(g.indexOf(A)!==-1)throw Error("Circular reference detected in "+C.join("."));g.push(A),bt.forEach(A,function(k,O){(!(bt.isUndefined(k)||k===null)&&a.call(t,k,bt.isString(O)?O.trim():O,C,x))===!0&&b(k,C?C.concat(O):[O])}),g.pop()}}if(!bt.isObject(e))throw new TypeError("data must be an object");return b(e),t}var JC=lKt;function ZLe(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function eje(e,t){this._pairs=[],e&&JC(e,this,t)}var tje=eje.prototype;tje.append=function(t,r){this._pairs.push([t,r])};tje.toString=function(t){let r=t?function(n){return t.call(this,n,ZLe)}:ZLe;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};var rje=eje;function pKt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uT(e,t,r){if(!t)return e;let n=r&&r.encode||pKt;bt.isFunction(r)&&(r={serialize:r});let a=r&&r.serialize,s;if(a?s=a(t,r):s=bt.isURLSearchParams(t)?t.toString():new rje(t,r).toString(n),s){let c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var Soe=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){bt.forEach(this.handlers,function(n){n!==null&&t(n)})}},Coe=Soe;var nN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var aje=gr(require("crypto"),1);var nje=gr(require("url"),1),ije=nje.default.URLSearchParams;var _oe="abcdefghijklmnopqrstuvwxyz",sje="0123456789",oje={DIGIT:sje,ALPHA:_oe,ALPHA_DIGIT:_oe+_oe.toUpperCase()+sje},fKt=(e=16,t=oje.ALPHA_DIGIT)=>{let r="",{length:n}=t,a=new Uint32Array(e);aje.default.randomFillSync(a);for(let s=0;s<e;s++)r+=t[a[s]%n];return r},cje={isNode:!0,classes:{URLSearchParams:ije,FormData:oH,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:oje,generateString:fKt,protocols:["http","https","file","data"]};var Toe={};CPe(Toe,{hasBrowserEnv:()=>koe,hasStandardBrowserEnv:()=>dKt,hasStandardBrowserWebWorkerEnv:()=>hKt,navigator:()=>Ioe,origin:()=>mKt});var koe=typeof window<"u"&&typeof document<"u",Ioe=typeof navigator=="object"&&navigator||void 0,dKt=koe&&(!Ioe||["ReactNative","NativeScript","NS"].indexOf(Ioe.product)<0),hKt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mKt=koe&&window.location.href||"http://localhost";var Po={...Toe,...cje};function Boe(e,t){return JC(e,new Po.classes.URLSearchParams,{visitor:function(r,n,a,s){return Po.isNode&&bt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function gKt(e){return bt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AKt(e){let t={},r=Object.keys(e),n,a=r.length,s;for(n=0;n<a;n++)s=r[n],t[s]=e[s];return t}function yKt(e){function t(r,n,a,s){let c=r[s++];if(c==="__proto__")return!0;let l=Number.isFinite(+c),f=s>=r.length;return c=!c&&bt.isArray(a)?a.length:c,f?(bt.hasOwnProp(a,c)?a[c]=[a[c],n]:a[c]=n,!l):((!a[c]||!bt.isObject(a[c]))&&(a[c]=[]),t(r,n,a[c],s)&&bt.isArray(a[c])&&(a[c]=AKt(a[c])),!l)}if(bt.isFormData(e)&&bt.isFunction(e.entries)){let r={};return bt.forEachEntry(e,(n,a)=>{t(gKt(n),a,r,0)}),r}return null}var cH=yKt;function vKt(e,t,r){if(bt.isString(e))try{return(t||JSON.parse)(e),bt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Doe={transitional:nN,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",a=n.indexOf("application/json")>-1,s=bt.isObject(t);if(s&&bt.isHTMLForm(t)&&(t=new FormData(t)),bt.isFormData(t))return a?JSON.stringify(cH(t)):t;if(bt.isArrayBuffer(t)||bt.isBuffer(t)||bt.isStream(t)||bt.isFile(t)||bt.isBlob(t)||bt.isReadableStream(t))return t;if(bt.isArrayBufferView(t))return t.buffer;if(bt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Boe(t,this.formSerializer).toString();if((l=bt.isFileList(t))||n.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return JC(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),vKt(t)):t}],transformResponse:[function(t){let r=this.transitional||Doe.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(bt.isResponse(t)||bt.isReadableStream(t))return t;if(t&&bt.isString(t)&&(n&&!this.responseType||a)){let c=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(c)throw l.name==="SyntaxError"?kn.from(l,kn.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Po.classes.FormData,Blob:Po.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],e=>{Doe.headers[e]={}});var iN=Doe;var xKt=bt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uje=e=>{let t={},r,n,a;return e&&e.split(`
522
+ `,"f"),ti(this,If,qe(this,If,"f")+t.join(" "),"f")}}}[Sie](t){ER(qe(this,bi,"f")).forEach(r=>{if((a=>a==="configObjects")(r))return;let n=qe(this,bi,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete qe(this,Ss,"f").getDescriptions()[t]}[fRe](t,r,n){qe(this,U7,"f")[n]||(qe(this,us,"f").process.emitWarning(t,r),qe(this,U7,"f")[n]=!0)}[dRe](){qe(this,z7,"f").push({options:qe(this,bi,"f"),configObjects:qe(this,bi,"f").configObjects.slice(0),exitProcess:qe(this,uy,"f"),groups:qe(this,Yb,"f"),strict:qe(this,qk,"f"),strictCommands:qe(this,Uk,"f"),strictOptions:qe(this,zk,"f"),completionCommand:qe(this,zg,"f"),output:qe(this,If,"f"),exitError:qe(this,qC,"f"),hasOutput:qe(this,Hg,"f"),parsed:this.parsed,parseFn:qe(this,$g,"f"),parseContext:qe(this,jk,"f")}),qe(this,Ss,"f").freeze(),qe(this,Tl,"f").freeze(),qe(this,ep,"f").freeze(),qe(this,ly,"f").freeze()}[hRe](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(qe(this,us,"f").process.argv()[0])?r=qe(this,us,"f").process.argv().slice(1,2):r=qe(this,us,"f").process.argv().slice(0,1),t=r.map(n=>{let a=this[IRe](qe(this,Qk,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&a.length<n.length?a:n}).join(" ").trim(),qe(this,us,"f").getEnv("_")&&qe(this,us,"f").getProcessArgvBin()===qe(this,us,"f").getEnv("_")&&(t=qe(this,us,"f").getEnv("_").replace(`${qe(this,us,"f").path.dirname(qe(this,us,"f").process.execPath())}/`,"")),t}[Hk](){return qe(this,V7,"f")}[mRe](){return qe(this,G7,"f")}[Cie](){if(!qe(this,Lk,"f"))return;let t=qe(this,us,"f").getEnv("LC_ALL")||qe(this,us,"f").getEnv("LC_MESSAGES")||qe(this,us,"f").getEnv("LANG")||qe(this,us,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[gRe](){return this[_ie]().version||"unknown"}[ARe](t){let r=t["--"]?t["--"]:t._;for(let n=0,a;(a=r[n])!==void 0;n++)qe(this,us,"f").Parser.looksLikeNumber(a)&&Number.isSafeInteger(Math.floor(parseFloat(`${a}`)))&&(r[n]=Number(a));return t}[_ie](t){let r=t||"*";if(qe(this,CR,"f")[r])return qe(this,CR,"f")[r];let n={};try{let a=t||qe(this,us,"f").mainFilename;!t&&qe(this,us,"f").path.extname(a)&&(a=qe(this,us,"f").path.dirname(a));let s=qe(this,us,"f").findUp(a,(c,l)=>{if(l.includes("package.json"))return"package.json"});om(s,void 0,qe(this,us,"f")),n=JSON.parse(qe(this,us,"f").readFileSync(s,"utf8"))}catch{}return qe(this,CR,"f")[r]=n||{},qe(this,CR,"f")[r]}[zC](t,r){r=[].concat(r),r.forEach(n=>{n=this[Tie](n),qe(this,bi,"f")[t].push(n)})}[_R](t,r,n,a){this[kie](t,r,n,a,(s,c,l)=>{qe(this,bi,"f")[s][c]=l})}[Iie](t,r,n,a){this[kie](t,r,n,a,(s,c,l)=>{qe(this,bi,"f")[s][c]=(qe(this,bi,"f")[s][c]||[]).concat(l)})}[kie](t,r,n,a,s){if(Array.isArray(n))n.forEach(c=>{t(c,a)});else if((c=>typeof c=="object")(n))for(let c of ER(n))t(c,n[c]);else s(r,this[Tie](n),a)}[Tie](t){return t==="__proto__"?"___proto___":t}[Bie](t,r){return this[_R](this[Bie].bind(this),"key",t,r),this}[Die](){var t,r,n,a,s,c,l,f,d,m,g,x;let b=qe(this,z7,"f").pop();om(b,void 0,qe(this,us,"f"));let A;t=this,r=this,n=this,a=this,s=this,c=this,l=this,f=this,d=this,m=this,g=this,x=this,{options:{set value(C){ti(t,bi,C,"f")}}.value,configObjects:A,exitProcess:{set value(C){ti(r,uy,C,"f")}}.value,groups:{set value(C){ti(n,Yb,C,"f")}}.value,output:{set value(C){ti(a,If,C,"f")}}.value,exitError:{set value(C){ti(s,qC,C,"f")}}.value,hasOutput:{set value(C){ti(c,Hg,C,"f")}}.value,parsed:this.parsed,strict:{set value(C){ti(l,qk,C,"f")}}.value,strictCommands:{set value(C){ti(f,Uk,C,"f")}}.value,strictOptions:{set value(C){ti(d,zk,C,"f")}}.value,completionCommand:{set value(C){ti(m,zg,C,"f")}}.value,parseFn:{set value(C){ti(g,$g,C,"f")}}.value,parseContext:{set value(C){ti(x,jk,C,"f")}}.value}=b,qe(this,bi,"f").configObjects=A,qe(this,Ss,"f").unfreeze(),qe(this,Tl,"f").unfreeze(),qe(this,ep,"f").unfreeze(),qe(this,ly,"f").unfreeze()}[yRe](t,r){return Ok(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[vRe].bind(this),getContext:this[xRe].bind(this),getHasOutput:this[bRe].bind(this),getLoggerInstance:this[ERe].bind(this),getParseContext:this[wRe].bind(this),getParserConfiguration:this[Hk].bind(this),getUsageConfiguration:this[mRe].bind(this),getUsageInstance:this[SRe].bind(this),getValidationInstance:this[CRe].bind(this),hasParseCallback:this[Y7].bind(this),isGlobalContext:this[_Re].bind(this),postProcess:this[$k].bind(this),reset:this[Pie].bind(this),runValidation:this[Rie].bind(this),runYargsParserAndExecuteCommands:this[aL].bind(this),setHasOutput:this[kRe].bind(this)}}[vRe](){return qe(this,ep,"f")}[xRe](){return qe(this,sL,"f")}[bRe](){return qe(this,Hg,"f")}[ERe](){return qe(this,SR,"f")}[wRe](){return qe(this,jk,"f")||{}}[SRe](){return qe(this,Ss,"f")}[CRe](){return qe(this,Tl,"f")}[Y7](){return!!qe(this,$g,"f")}[_Re](){return qe(this,H7,"f")}[$k](t,r,n,a){return n||lu(t)||(r||(t=this[lRe](t)),(this[Hk]()["parse-positional-numbers"]||this[Hk]()["parse-positional-numbers"]===void 0)&&(t=this[ARe](t)),a&&(t=Fk(t,this,qe(this,ly,"f").getMiddleware(),!1))),t}[Pie](t={}){ti(this,bi,qe(this,bi,"f")||{},"f");let r={};r.local=qe(this,bi,"f").local||[],r.configObjects=qe(this,bi,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(t[c]||[]).forEach(l=>{n[l]=!0})}),Object.assign(qe(this,Mk,"f"),Object.keys(qe(this,Yb,"f")).reduce((c,l)=>{let f=qe(this,Yb,"f")[l].filter(d=>!(d in n));return f.length>0&&(c[l]=f),c},{})),ti(this,Yb,{},"f");let a=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return a.forEach(c=>{r[c]=(qe(this,bi,"f")[c]||[]).filter(l=>!n[l])}),s.forEach(c=>{r[c]=jC(qe(this,bi,"f")[c],l=>!n[l])}),r.envPrefix=qe(this,bi,"f").envPrefix,ti(this,bi,r,"f"),ti(this,Ss,qe(this,Ss,"f")?qe(this,Ss,"f").reset(n):nRe(this,qe(this,us,"f")),"f"),ti(this,Tl,qe(this,Tl,"f")?qe(this,Tl,"f").reset(n):uRe(this,qe(this,Ss,"f"),qe(this,us,"f")),"f"),ti(this,ep,qe(this,ep,"f")?qe(this,ep,"f").reset():eRe(qe(this,Ss,"f"),qe(this,Tl,"f"),qe(this,ly,"f"),qe(this,us,"f")),"f"),qe(this,cy,"f")||ti(this,cy,aRe(this,qe(this,Ss,"f"),qe(this,ep,"f"),qe(this,us,"f")),"f"),qe(this,ly,"f").reset(),ti(this,zg,null,"f"),ti(this,If,"","f"),ti(this,qC,null,"f"),ti(this,Hg,!1,"f"),this.parsed=!1,this}[IRe](t,r){return qe(this,us,"f").path.relative(t,r)}[aL](t,r,n,a=0,s=!1){let c=!!n||s;t=t||qe(this,UC,"f"),qe(this,bi,"f").__=qe(this,us,"f").y18n.__,qe(this,bi,"f").configuration=this[Hk]();let l=!!qe(this,bi,"f").configuration["populate--"],f=Object.assign({},qe(this,bi,"f").configuration,{"populate--":!0}),d=qe(this,us,"f").Parser.detailed(t,Object.assign({},qe(this,bi,"f"),{configuration:{"parse-positional-numbers":!1,...f}})),m=Object.assign(d.argv,qe(this,jk,"f")),g,x=d.aliases,b=!1,A=!1;Object.keys(m).forEach(C=>{C===qe(this,py,"f")&&m[C]?b=!0:C===qe(this,Jb,"f")&&m[C]&&(A=!0)}),m.$0=this.$0,this.parsed=d,a===0&&qe(this,Ss,"f").clearCachedHelpMessage();try{if(this[Cie](),r)return this[$k](m,l,!!n,!1);qe(this,py,"f")&&[qe(this,py,"f")].concat(x[qe(this,py,"f")]||[]).filter(M=>M.length>1).includes(""+m._[m._.length-1])&&(m._.pop(),b=!0),ti(this,H7,!1,"f");let C=qe(this,ep,"f").getCommands(),I=qe(this,cy,"f").completionKey in m,k=b||I||s;if(m._.length){if(C.length){let O;for(let M=a||0,j;m._[M]!==void 0;M++)if(j=String(m._[M]),C.includes(j)&&j!==qe(this,zg,"f")){let W=qe(this,ep,"f").runCommand(j,this,d,M+1,s,b||A||s);return this[$k](W,l,!!n,!1)}else if(!O&&j!==qe(this,zg,"f")){O=j;break}!qe(this,ep,"f").hasDefaultCommand()&&qe(this,W7,"f")&&O&&!k&&qe(this,Tl,"f").recommendCommands(O,C)}qe(this,zg,"f")&&m._.includes(qe(this,zg,"f"))&&!I&&(qe(this,uy,"f")&&MC(!0),this.showCompletionScript(),this.exit(0))}if(qe(this,ep,"f").hasDefaultCommand()&&!k){let O=qe(this,ep,"f").runCommand(null,this,d,0,s,b||A||s);return this[$k](O,l,!!n,!1)}if(I){qe(this,uy,"f")&&MC(!0),t=[].concat(t);let O=t.slice(t.indexOf(`--${qe(this,cy,"f").completionKey}`)+1);return qe(this,cy,"f").getCompletion(O,(M,j)=>{if(M)throw new uu(M.message);(j||[]).forEach(W=>{qe(this,SR,"f").log(W)}),this.exit(0)}),this[$k](m,!l,!!n,!1)}if(qe(this,Hg,"f")||(b?(qe(this,uy,"f")&&MC(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(qe(this,uy,"f")&&MC(!0),c=!0,qe(this,Ss,"f").showVersion("log"),this.exit(0))),!c&&qe(this,bi,"f").skipValidation.length>0&&(c=Object.keys(m).some(O=>qe(this,bi,"f").skipValidation.indexOf(O)>=0&&m[O]===!0)),!c){if(d.error)throw new uu(d.error.message);if(!I){let O=this[Rie](x,{},d.error);n||(g=Fk(m,this,qe(this,ly,"f").getMiddleware(),!0)),g=this[yRe](O,g!=null?g:m),lu(g)&&!n&&(g=g.then(()=>Fk(m,this,qe(this,ly,"f").getMiddleware(),!1)))}}}catch(C){if(C instanceof uu)qe(this,Ss,"f").fail(C.message,C);else throw C}return this[$k](g!=null?g:m,l,!!n,!0)}[Rie](t,r,n,a){let s={...this.getDemandedOptions()};return c=>{if(n)throw new uu(n.message);qe(this,Tl,"f").nonOptionCount(c),qe(this,Tl,"f").requiredArguments(c,s);let l=!1;qe(this,Uk,"f")&&(l=qe(this,Tl,"f").unknownCommands(c)),qe(this,qk,"f")&&!l?qe(this,Tl,"f").unknownArguments(c,t,r,!!a):qe(this,zk,"f")&&qe(this,Tl,"f").unknownArguments(c,t,{},!1,!1),qe(this,Tl,"f").limitedChoices(c),qe(this,Tl,"f").implications(c),qe(this,Tl,"f").conflicting(c)}}[kRe](){ti(this,Hg,!0,"f")}[Vk](t){if(typeof t=="string")qe(this,bi,"f").key[t]=!0;else for(let r of t)qe(this,bi,"f").key[r]=!0}};function tRe(e){return!!e&&typeof e.getInternalMethods=="function"}var szt=TRe(yie),BRe=szt;var Wk={name:"edgeone",version:"1.3.0",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/templates","./edgeone-dist/pages/dev/runner-worker.js"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build",prepublishOnly:"npm run build",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/nuxt-pages":"1.1.0-beta.4","@edgeone/opennextjs-pages":"0.1.7",archiver:"^7.0.1",chokidar:"^4.0.1","common-path-prefix":"^1.0.0","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6",crypto:"^1.0.1","detect-port":"^2.1.0",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","esbuild-plugin-vue":"^0.2.4","fast-glob":"^3.3.0","fs-extra":"^11.3.1","ink-table":"^3.1.0",inquirer:"^8.2.4",install:"^0.13.0",lodash:"^4.17.21","mime-types":"^3.0.1",minimatch:"^9.0.5","node-persist":"^4.0.3",npm:"^10.9.1",open:"^8.4.2","p-map":"^5.5.0","parse-gitignore":"^2.0.0",portfinder:"^1.0.32",undici:"^5.29.0",vitest:"^4.0.17"},devDependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",axios:"^1.7.9",chalk:"^5.3.0",cookie:"^1.0.2",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0",ip:"^2.0.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21",moment:"^2.30.1","node-fetch":"^3.3.2",prettier:"^3.1.1",prompts:"^2.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3","update-check":"^1.5.4",uuid:"^9.0.0",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var Fie=class{log(t,r){try{let n=this.format(r),a=JSON.stringify({key:t,value:n});process.send(a)}catch{}}format(t){return typeof t=="object"?JSON.stringify(t):typeof t=="number"?String(t):t}},ozt=new Fie,J7=ozt;var Kqe=gr(_c()),Xqe=gr(zR()),Zqe=gr(Lae());var BQe=gr(Uae()),n2=gr(require("fs"));var zae=gr(require("path"));function vd(e,t){return zae.default.join(e,t)}function pn(e){return vd(process.cwd(),e)}function yQe(e){return zae.default.dirname(e)}var Uz=TQe(),Yae=require("path");function Jae(){try{Uz.initSync({dir:FGt()})}catch(e){console.error("[File] initStorage error",e)}}async function VR(e,t,r){Jae(),await Uz.setItem(e,t).catch(n=>{console.error("[File] setLocalData error",n)}),r==null||r()}async function WR(e){return Jae(),await Uz.getItem(e).catch(r=>{console.error("[File] getLocalData error",r)})}async function zz(e){Jae(),await Uz.removeItem(e).catch(t=>{console.error("[File] removeLocalData error",t)})}function FGt(){try{let e=Yae.parse(process.cwd()).root,t=process.cwd(),n=Yae.relative(e,t).split(Yae.sep).length-2;return`${new Array(Math.max(0,n)).fill("../").join("")}.edgeone`}catch{return".edgeone"}}function DQe(e){return n2.default.statSync(e)}function OGt(e){return n2.default.mkdirSync(e,{recursive:!0})}function QGt(e){return n2.default.existsSync(e)}function GR(e){return n2.default.existsSync(e)}function Hz(e,t="utf-8"){return n2.default.readFileSync(e,t)}function D0(e){let t=Hz(e);return JSON.parse(t)}function YR(e){let t=Hz(e);return BQe.default.parse(t)}function ph(e,t,r="utf-8"){let n=yQe(e);return QGt(n)||OGt(n),n2.default.writeFileSync(e,t,r)}function Kae(e,t){return GR(e)?n2.default.appendFileSync(e,t):n2.default.writeFileSync(e,t)}var Ks=gr(zR()),Os=gr(_c()),aj=gr(PQe());function cm(){return!process.stdout.isTTY||process.env.FORCE_NON_TTY==="1"}function sT({prefix:e="cli"}){return Os.default.createElement(Ks.Text,{color:"grey"},"[",e,"]")}function Yr(e,t="cli"){if(cm()){console.log(`[${t}][\u2718] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"red"},"[\u2718] "),e));r()}function ha(e,t="cli"){if(cm()){console.log(`[${t}][\u2714] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"green"},"[\u2714] "),e));r()}function aT(e,t="cli"){if(cm()){console.log(`[${t}] WARNING: ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:t}),Os.default.createElement(Ks.Text,{color:"orange"},"\u2757\uFE0F "),e));r()}function Zo(e,t="cli"){if(cm()){console.log(`[${t}]${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"cyan"},Os.default.createElement(sT,{prefix:t}),e));r()}function $z(e){if(cm()){console.log(e);return}let{unmount:t}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"cyan"},e));t()}function wn(e,t="cli"){if(cm()){console.log(`[${t}]${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"white"},Os.default.createElement(sT,{prefix:t}),e));r()}function NQe(e,t,r="cli"){let n=t;if(t.includes("http")&&(n=new URL(t).pathname),cm()){console.log(`${e} ${n}`);return}let{unmount:a}=(0,Ks.render)(Os.default.createElement(Ks.Text,{color:"grey"},e," ",n));a()}function Zae({timestamp:e}){return Os.default.createElement(Ks.Box,{width:13},Os.default.createElement(Ks.Text,{color:"grey"},(0,aj.default)(e).format("HH:mm:ss.SSS")))}function FQe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white"},e)));r()}function OQe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} [WARNING] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white",backgroundColor:"yellow"},"[WARNING]"),Os.default.createElement(Ks.Text,null," ",e)));r()}function eoe(e,t){if(cm()){console.log(`${(0,aj.default)(t).format("HH:mm:ss.SSS")} [ERROR] ${e}`);return}let{unmount:r}=(0,Ks.render)(Os.default.createElement(Ks.Box,null,Os.default.createElement(Zae,{timestamp:t}),Os.default.createElement(Ks.Text,{color:"white",backgroundColor:"red"},"[ERROR]"),Os.default.createElement(Ks.Text,{color:"white"}," ",e)));r()}function LGt({content:e="Loading",prefix:t="cli",intervalMs:r=500,maxDots:n=6}){let[a,s]=(0,Os.useState)("");return(0,Os.useEffect)(()=>{let c=setInterval(()=>{s(l=>l.length>=n?"":l+".")},r);return()=>clearInterval(c)},[r,n]),Os.default.createElement(Ks.Text,{color:"cyan"},Os.default.createElement(sT,{prefix:t}),e,a)}function QQe(e="Loading",t="cli",r=500,n=6){if(cm())return console.log(`[${t}]${e}...`),{stop:()=>{}};let a=(0,Ks.render)(Os.default.createElement(LGt,{content:e,prefix:t,intervalMs:r,maxDots:n}));return{stop:()=>a.unmount()}}function RQe({percent:e,width:t=30,prefix:r="cli",label:n="Progress",color:a="cyan"}){let s=Math.max(0,Math.min(100,Math.round(e))),c=Math.round(s/100*t),l=t-c,f="\u2593".repeat(c),d="\u2591".repeat(Math.max(0,l)),m=String(s).padStart(3," ");return Os.default.createElement(Ks.Text,null,Os.default.createElement(sT,{prefix:r}),Os.default.createElement(Ks.Text,{color:a},n,": "),"[",Os.default.createElement(Ks.Text,{color:a},f),d,"] ",m,"%")}function LQe(e="Progress",t="cli",r=30,n="cyan"){if(cm()){let c=-1;return{update:(l,f)=>{let d=Math.max(0,Math.min(100,Math.round(l)));(d>=c+20||d===100)&&(c=d,console.log(`[${t}]${f!=null?f:e}: ${d}%`))},stop:()=>{}}}let a=0,s=(0,Ks.render)(Os.default.createElement(RQe,{percent:a,width:r,prefix:t,label:e,color:n}));return{update:(c,l)=>{a=c;let f=l!=null?l:e;s.rerender(Os.default.createElement(RQe,{percent:a,width:r,prefix:t,label:f,color:n}))},stop:()=>s.unmount()}}var HHn=require("fs"),$Hn=require("path");async function Xv(){return process.env.EDGEONE_PAGES_API_REGION?process.env.EDGEONE_PAGES_API_REGION:await WR("login_region")}function oj(e,t){return function(){return e.apply(t,arguments)}}var{toString:jGt}=Object.prototype,{getPrototypeOf:roe}=Object,{iterator:Wz,toStringTag:MQe}=Symbol,Gz=(e=>t=>{let r=jGt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Zv=e=>(e=e.toLowerCase(),t=>Gz(t)===e),Yz=e=>t=>typeof t===e,{isArray:KR}=Array,cj=Yz("undefined");function uj(e){return e!==null&&!cj(e)&&e.constructor!==null&&!cj(e.constructor)&&P0(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var qQe=Zv("ArrayBuffer");function MGt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qQe(e.buffer),t}var qGt=Yz("string"),P0=Yz("function"),UQe=Yz("number"),lj=e=>e!==null&&typeof e=="object",UGt=e=>e===!0||e===!1,Vz=e=>{if(Gz(e)!=="object")return!1;let t=roe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(MQe in e)&&!(Wz in e)},zGt=e=>{if(!lj(e)||uj(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},HGt=Zv("Date"),$Gt=Zv("File"),VGt=Zv("Blob"),WGt=Zv("FileList"),GGt=e=>lj(e)&&P0(e.pipe),YGt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P0(e.append)&&((t=Gz(e))==="formdata"||t==="object"&&P0(e.toString)&&e.toString()==="[object FormData]"))},JGt=Zv("URLSearchParams"),[KGt,XGt,ZGt,eYt]=["ReadableStream","Request","Response","Headers"].map(Zv),tYt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pj(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),KR(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(uj(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),c=s.length,l;for(n=0;n<c;n++)l=s[n],t.call(null,e[l],l,e)}}function zQe(e,t){if(uj(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}var oT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,HQe=e=>!cj(e)&&e!==oT;function toe(){let{caseless:e}=HQe(this)&&this||{},t={},r=(n,a)=>{let s=e&&zQe(t,a)||a;Vz(t[s])&&Vz(n)?t[s]=toe(t[s],n):Vz(n)?t[s]=toe({},n):KR(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&pj(arguments[n],r);return t}var rYt=(e,t,r,{allOwnKeys:n}={})=>(pj(t,(a,s)=>{r&&P0(a)?e[s]=oj(a,r):e[s]=a},{allOwnKeys:n}),e),nYt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),iYt=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sYt=(e,t,r,n)=>{let a,s,c,l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)c=a[s],(!n||n(c,e,t))&&!l[c]&&(t[c]=e[c],l[c]=!0);e=r!==!1&&roe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},aYt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},oYt=e=>{if(!e)return null;if(KR(e))return e;let t=e.length;if(!UQe(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cYt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&roe(Uint8Array)),uYt=(e,t)=>{let n=(e&&e[Wz]).call(e),a;for(;(a=n.next())&&!a.done;){let s=a.value;t.call(e,s[0],s[1])}},lYt=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pYt=Zv("HTMLFormElement"),fYt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),jQe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dYt=Zv("RegExp"),$Qe=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};pj(r,(a,s)=>{let c;(c=t(a,s,e))!==!1&&(n[s]=c||a)}),Object.defineProperties(e,n)},hYt=e=>{$Qe(e,(t,r)=>{if(P0(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(P0(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},mYt=(e,t)=>{let r={},n=a=>{a.forEach(s=>{r[s]=!0})};return KR(e)?n(e):n(String(e).split(t)),r},gYt=()=>{},AYt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yYt(e){return!!(e&&P0(e.append)&&e[MQe]==="FormData"&&e[Wz])}var vYt=e=>{let t=new Array(10),r=(n,a)=>{if(lj(n)){if(t.indexOf(n)>=0)return;if(uj(n))return n;if(!("toJSON"in n)){t[a]=n;let s=KR(n)?[]:{};return pj(n,(c,l)=>{let f=r(c,a+1);!cj(f)&&(s[l]=f)}),t[a]=void 0,s}}return n};return r(e,0)},xYt=Zv("AsyncFunction"),bYt=e=>e&&(lj(e)||P0(e))&&P0(e.then)&&P0(e.catch),VQe=((e,t)=>e?setImmediate:t?((r,n)=>(oT.addEventListener("message",({source:a,data:s})=>{a===oT&&s===r&&n.length&&n.shift()()},!1),a=>{n.push(a),oT.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P0(oT.postMessage)),EYt=typeof queueMicrotask<"u"?queueMicrotask.bind(oT):typeof process<"u"&&process.nextTick||VQe,wYt=e=>e!=null&&P0(e[Wz]),bt={isArray:KR,isArrayBuffer:qQe,isBuffer:uj,isFormData:YGt,isArrayBufferView:MGt,isString:qGt,isNumber:UQe,isBoolean:UGt,isObject:lj,isPlainObject:Vz,isEmptyObject:zGt,isReadableStream:KGt,isRequest:XGt,isResponse:ZGt,isHeaders:eYt,isUndefined:cj,isDate:HGt,isFile:$Gt,isBlob:VGt,isRegExp:dYt,isFunction:P0,isStream:GGt,isURLSearchParams:JGt,isTypedArray:cYt,isFileList:WGt,forEach:pj,merge:toe,extend:rYt,trim:tYt,stripBOM:nYt,inherits:iYt,toFlatObject:sYt,kindOf:Gz,kindOfTest:Zv,endsWith:aYt,toArray:oYt,forEachEntry:uYt,matchAll:lYt,isHTMLForm:pYt,hasOwnProperty:jQe,hasOwnProp:jQe,reduceDescriptors:$Qe,freezeMethods:hYt,toObjectSet:mYt,toCamelCase:fYt,noop:gYt,toFiniteNumber:AYt,findKey:zQe,global:oT,isContextDefined:HQe,isSpecCompliantForm:yYt,toJSONObject:vYt,isAsyncFn:xYt,isThenable:bYt,setImmediate:VQe,asap:EYt,isIterable:wYt};function XR(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}bt.inherits(XR,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:bt.toJSONObject(this.config),code:this.code,status:this.status}}});var WQe=XR.prototype,GQe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GQe[e]={value:e}});Object.defineProperties(XR,GQe);Object.defineProperty(WQe,"isAxiosError",{value:!0});XR.from=(e,t,r,n,a,s)=>{let c=Object.create(WQe);return bt.toFlatObject(e,c,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),XR.call(c,e.message,t,r,n,a),c.cause=e,c.name=e.name,s&&Object.assign(c,s),c};var kn=XR;var JLe=gr(YLe(),1),oH=JLe.default;function woe(e){return bt.isPlainObject(e)||bt.isArray(e)}function XLe(e){return bt.endsWith(e,"[]")?e.slice(0,-2):e}function KLe(e,t,r){return e?e.concat(t).map(function(a,s){return a=XLe(a),!r&&s?"["+a+"]":a}).join(r?".":""):t}function cKt(e){return bt.isArray(e)&&!e.some(woe)}var uKt=bt.toFlatObject(bt,{},null,function(t){return/^is[A-Z]/.test(t)});function lKt(e,t,r){if(!bt.isObject(e))throw new TypeError("target must be an object");t=t||new(oH||FormData),r=bt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,I){return!bt.isUndefined(I[C])});let n=r.metaTokens,a=r.visitor||m,s=r.dots,c=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&bt.isSpecCompliantForm(t);if(!bt.isFunction(a))throw new TypeError("visitor must be a function");function d(A){if(A===null)return"";if(bt.isDate(A))return A.toISOString();if(bt.isBoolean(A))return A.toString();if(!f&&bt.isBlob(A))throw new kn("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(A)||bt.isTypedArray(A)?f&&typeof Blob=="function"?new Blob([A]):Buffer.from(A):A}function m(A,C,I){let k=A;if(A&&!I&&typeof A=="object"){if(bt.endsWith(C,"{}"))C=n?C:C.slice(0,-2),A=JSON.stringify(A);else if(bt.isArray(A)&&cKt(A)||(bt.isFileList(A)||bt.endsWith(C,"[]"))&&(k=bt.toArray(A)))return C=XLe(C),k.forEach(function(M,j){!(bt.isUndefined(M)||M===null)&&t.append(c===!0?KLe([C],j,s):c===null?C:C+"[]",d(M))}),!1}return woe(A)?!0:(t.append(KLe(I,C,s),d(A)),!1)}let g=[],x=Object.assign(uKt,{defaultVisitor:m,convertValue:d,isVisitable:woe});function b(A,C){if(!bt.isUndefined(A)){if(g.indexOf(A)!==-1)throw Error("Circular reference detected in "+C.join("."));g.push(A),bt.forEach(A,function(k,O){(!(bt.isUndefined(k)||k===null)&&a.call(t,k,bt.isString(O)?O.trim():O,C,x))===!0&&b(k,C?C.concat(O):[O])}),g.pop()}}if(!bt.isObject(e))throw new TypeError("data must be an object");return b(e),t}var JC=lKt;function ZLe(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function eje(e,t){this._pairs=[],e&&JC(e,this,t)}var tje=eje.prototype;tje.append=function(t,r){this._pairs.push([t,r])};tje.toString=function(t){let r=t?function(n){return t.call(this,n,ZLe)}:ZLe;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};var rje=eje;function pKt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uT(e,t,r){if(!t)return e;let n=r&&r.encode||pKt;bt.isFunction(r)&&(r={serialize:r});let a=r&&r.serialize,s;if(a?s=a(t,r):s=bt.isURLSearchParams(t)?t.toString():new rje(t,r).toString(n),s){let c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var Soe=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){bt.forEach(this.handlers,function(n){n!==null&&t(n)})}},Coe=Soe;var nN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var aje=gr(require("crypto"),1);var nje=gr(require("url"),1),ije=nje.default.URLSearchParams;var _oe="abcdefghijklmnopqrstuvwxyz",sje="0123456789",oje={DIGIT:sje,ALPHA:_oe,ALPHA_DIGIT:_oe+_oe.toUpperCase()+sje},fKt=(e=16,t=oje.ALPHA_DIGIT)=>{let r="",{length:n}=t,a=new Uint32Array(e);aje.default.randomFillSync(a);for(let s=0;s<e;s++)r+=t[a[s]%n];return r},cje={isNode:!0,classes:{URLSearchParams:ije,FormData:oH,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:oje,generateString:fKt,protocols:["http","https","file","data"]};var Toe={};CPe(Toe,{hasBrowserEnv:()=>koe,hasStandardBrowserEnv:()=>dKt,hasStandardBrowserWebWorkerEnv:()=>hKt,navigator:()=>Ioe,origin:()=>mKt});var koe=typeof window<"u"&&typeof document<"u",Ioe=typeof navigator=="object"&&navigator||void 0,dKt=koe&&(!Ioe||["ReactNative","NativeScript","NS"].indexOf(Ioe.product)<0),hKt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mKt=koe&&window.location.href||"http://localhost";var Po={...Toe,...cje};function Boe(e,t){return JC(e,new Po.classes.URLSearchParams,{visitor:function(r,n,a,s){return Po.isNode&&bt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function gKt(e){return bt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AKt(e){let t={},r=Object.keys(e),n,a=r.length,s;for(n=0;n<a;n++)s=r[n],t[s]=e[s];return t}function yKt(e){function t(r,n,a,s){let c=r[s++];if(c==="__proto__")return!0;let l=Number.isFinite(+c),f=s>=r.length;return c=!c&&bt.isArray(a)?a.length:c,f?(bt.hasOwnProp(a,c)?a[c]=[a[c],n]:a[c]=n,!l):((!a[c]||!bt.isObject(a[c]))&&(a[c]=[]),t(r,n,a[c],s)&&bt.isArray(a[c])&&(a[c]=AKt(a[c])),!l)}if(bt.isFormData(e)&&bt.isFunction(e.entries)){let r={};return bt.forEachEntry(e,(n,a)=>{t(gKt(n),a,r,0)}),r}return null}var cH=yKt;function vKt(e,t,r){if(bt.isString(e))try{return(t||JSON.parse)(e),bt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Doe={transitional:nN,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",a=n.indexOf("application/json")>-1,s=bt.isObject(t);if(s&&bt.isHTMLForm(t)&&(t=new FormData(t)),bt.isFormData(t))return a?JSON.stringify(cH(t)):t;if(bt.isArrayBuffer(t)||bt.isBuffer(t)||bt.isStream(t)||bt.isFile(t)||bt.isBlob(t)||bt.isReadableStream(t))return t;if(bt.isArrayBufferView(t))return t.buffer;if(bt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Boe(t,this.formSerializer).toString();if((l=bt.isFileList(t))||n.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return JC(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),vKt(t)):t}],transformResponse:[function(t){let r=this.transitional||Doe.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(bt.isResponse(t)||bt.isReadableStream(t))return t;if(t&&bt.isString(t)&&(n&&!this.responseType||a)){let c=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(c)throw l.name==="SyntaxError"?kn.from(l,kn.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Po.classes.FormData,Blob:Po.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],e=>{Doe.headers[e]={}});var iN=Doe;var xKt=bt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uje=e=>{let t={},r,n,a;return e&&e.split(`
523
523
  `).forEach(function(c){a=c.indexOf(":"),r=c.substring(0,a).trim().toLowerCase(),n=c.substring(a+1).trim(),!(!r||t[r]&&xKt[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var lje=Symbol("internals");function gj(e){return e&&String(e).trim().toLowerCase()}function uH(e){return e===!1||e==null?e:bt.isArray(e)?e.map(uH):String(e)}function bKt(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var EKt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Poe(e,t,r,n,a){if(bt.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!bt.isString(t)){if(bt.isString(n))return t.indexOf(n)!==-1;if(bt.isRegExp(n))return n.test(t)}}function wKt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function SKt(e,t){let r=bt.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,s,c){return this[n].call(this,t,a,s,c)},configurable:!0})})}var sN=class{constructor(t){t&&this.set(t)}set(t,r,n){let a=this;function s(l,f,d){let m=gj(f);if(!m)throw new Error("header name must be a non-empty string");let g=bt.findKey(a,m);(!g||a[g]===void 0||d===!0||d===void 0&&a[g]!==!1)&&(a[g||f]=uH(l))}let c=(l,f)=>bt.forEach(l,(d,m)=>s(d,m,f));if(bt.isPlainObject(t)||t instanceof this.constructor)c(t,r);else if(bt.isString(t)&&(t=t.trim())&&!EKt(t))c(uje(t),r);else if(bt.isObject(t)&&bt.isIterable(t)){let l={},f,d;for(let m of t){if(!bt.isArray(m))throw TypeError("Object iterator must return a key-value pair");l[d=m[0]]=(f=l[d])?bt.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}c(l,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=gj(t),t){let n=bt.findKey(this,t);if(n){let a=this[n];if(!r)return a;if(r===!0)return bKt(a);if(bt.isFunction(r))return r.call(this,a,n);if(bt.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=gj(t),t){let n=bt.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Poe(this,this[n],n,r)))}return!1}delete(t,r){let n=this,a=!1;function s(c){if(c=gj(c),c){let l=bt.findKey(n,c);l&&(!r||Poe(n,n[l],l,r))&&(delete n[l],a=!0)}}return bt.isArray(t)?t.forEach(s):s(t),a}clear(t){let r=Object.keys(this),n=r.length,a=!1;for(;n--;){let s=r[n];(!t||Poe(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){let r=this,n={};return bt.forEach(this,(a,s)=>{let c=bt.findKey(n,s);if(c){r[c]=uH(a),delete r[s];return}let l=t?wKt(s):String(s).trim();l!==s&&delete r[s],r[l]=uH(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return bt.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&bt.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
524
524
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){let n=(this[lje]=this[lje]={accessors:{}}).accessors,a=this.prototype;function s(c){let l=gj(c);n[l]||(SKt(a,c),n[l]=!0)}return bt.isArray(t)?t.forEach(s):s(t),this}};sN.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);bt.reduceDescriptors(sN.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});bt.freezeMethods(sN);var el=sN;function Aj(e,t){let r=this||iN,n=t||r,a=el.from(n.headers),s=n.data;return bt.forEach(e,function(l){s=l.call(r,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function yj(e){return!!(e&&e.__CANCEL__)}function pje(e,t,r){kn.call(this,e==null?"canceled":e,kn.ERR_CANCELED,t,r),this.name="CanceledError"}bt.inherits(pje,kn,{__CANCEL__:!0});var Gg=pje;function rE(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new kn("Request failed with status code "+r.status,[kn.ERR_BAD_REQUEST,kn.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Roe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Noe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lT(e,t,r){let n=!Roe(t);return e&&(n||r==!1)?Noe(e,t):t}var qje=gr(dje(),1),Uje=gr(require("http"),1),zje=gr(require("https"),1),Hje=gr(require("util"),1),$je=gr(Yoe(),1),s2=gr(require("zlib"),1);var hT="1.11.0";function wj(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var oXt=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Joe(e,t,r){let n=r&&r.Blob||Po.classes.Blob,a=wj(e);if(t===void 0&&n&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let s=oXt.exec(e);if(!s)throw new kn("Invalid URL",kn.ERR_INVALID_URL);let c=s[1],l=s[2],f=s[3],d=Buffer.from(decodeURIComponent(f),l?"base64":"utf8");if(t){if(!n)throw new kn("Blob is not supported",kn.ERR_NOT_SUPPORT);return new n([d],{type:c})}return d}throw new kn("Unsupported protocol "+a,kn.ERR_NOT_SUPPORT)}var gT=gr(require("stream"),1);var _je=gr(require("stream"),1);var Koe=Symbol("internals"),Xoe=class extends _je.default.Transform{constructor(t){t=bt.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,a)=>!bt.isUndefined(a[n])),super({readableHighWaterMark:t.chunkSize});let r=this[Koe]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[Koe];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let a=this[Koe],s=a.maxRate,c=this.readableHighWaterMark,l=a.timeWindow,f=1e3/l,d=s/f,m=a.minChunkSize!==!1?Math.max(a.minChunkSize,d*.01):0,g=(b,A)=>{let C=Buffer.byteLength(b);a.bytesSeen+=C,a.bytes+=C,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(b)?process.nextTick(A):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(A)}},x=(b,A)=>{let C=Buffer.byteLength(b),I=null,k=c,O,M=0;if(s){let j=Date.now();(!a.ts||(M=j-a.ts)>=l)&&(a.ts=j,O=d-a.bytes,a.bytes=O<0?-O:0,M=0),O=d-a.bytes}if(s){if(O<=0)return setTimeout(()=>{A(null,b)},l-M);O<k&&(k=O)}k&&C>k&&C-k>m&&(I=b.subarray(k),b=b.subarray(0,k)),g(b,I?()=>{process.nextTick(A,null,I)}:A)};x(t,function b(A,C){if(A)return n(A);C?x(C,b):n(null)})}},Zoe=Xoe;var Vje=require("events");var kje=gr(require("util"),1),Tje=require("stream");var{asyncIterator:Ije}=Symbol,cXt=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Ije]?yield*e[Ije]():yield e},mH=cXt;var uXt=Po.ALPHABET.ALPHA_DIGIT+"-_",Sj=typeof TextEncoder=="function"?new TextEncoder:new kje.default.TextEncoder,mT=`\r
525
525
  `,lXt=Sj.encode(mT),pXt=2,ece=class{constructor(t,r){let{escapeName:n}=this.constructor,a=bt.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!a&&r.name?`; filename="${n(r.name)}"`:""}${mT}`;a?r=Sj.encode(String(r).replace(/\r?\n|\r\n?/g,mT)):s+=`Content-Type: ${r.type||"application/octet-stream"}${mT}`,this.headers=Sj.encode(s+mT),this.contentLength=a?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+pXt,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;bt.isTypedArray(t)?yield t:yield*mH(t),yield lXt}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},fXt=(e,t,r)=>{let{tag:n="form-data-boundary",size:a=25,boundary:s=n+"-"+Po.generateString(a,uXt)}=r||{};if(!bt.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let c=Sj.encode("--"+s+mT),l=Sj.encode("--"+s+"--"+mT),f=l.byteLength,d=Array.from(e.entries()).map(([g,x])=>{let b=new ece(g,x);return f+=b.size,b});f+=c.byteLength*d.length,f=bt.toFiniteNumber(f);let m={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(f)&&(m["Content-Length"]=f),t&&t(m),Tje.Readable.from(async function*(){for(let g of d)yield c,yield*g.encode();yield l}())},Bje=fXt;var Dje=gr(require("stream"),1),tce=class extends Dje.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,r)}this.__transform(t,r,n)}},Pje=tce;var dXt=(e,t)=>bt.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(a=>{try{t?n(null,...t(a)):n(null,a)}catch(s){n(s)}},n)}:e,Rje=dXt;function hXt(e,t){e=e||10;let r=new Array(e),n=new Array(e),a=0,s=0,c;return t=t!==void 0?t:1e3,function(f){let d=Date.now(),m=n[s];c||(c=d),r[a]=f,n[a]=d;let g=s,x=0;for(;g!==a;)x+=r[g++],g=g%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),d-c<t)return;let b=m&&d-m;return b?Math.round(x*1e3/b):void 0}}var Nje=hXt;function mXt(e,t){let r=0,n=1e3/t,a,s,c=(d,m=Date.now())=>{r=m,a=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{let m=Date.now(),g=m-r;g>=n?c(d,m):(a=d,s||(s=setTimeout(()=>{s=null,c(a)},n-g)))},()=>a&&c(a)]}var Fje=mXt;var i2=(e,t,r=3)=>{let n=0,a=Nje(50,250);return Fje(s=>{let c=s.loaded,l=s.lengthComputable?s.total:void 0,f=c-n,d=a(f),m=c<=l;n=c;let g={loaded:c,total:l,progress:l?c/l:void 0,bytes:f,rate:d||void 0,estimated:d&&l&&m?(l-c)/d:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(g)},r)},lN=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},pN=e=>(...t)=>bt.asap(()=>e(...t));var Oje={flush:s2.default.constants.Z_SYNC_FLUSH,finishFlush:s2.default.constants.Z_SYNC_FLUSH},gXt={flush:s2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:s2.default.constants.BROTLI_OPERATION_FLUSH},Qje=bt.isFunction(s2.default.createBrotliDecompress),{http:AXt,https:yXt}=$je.default,vXt=/https:?/,Lje=Po.protocols.map(e=>e+":"),jje=(e,[t,r])=>(e.on("end",r).on("error",r),t);function xXt(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function Wje(e,t,r){let n=t;if(!n&&n!==!1){let a=qje.default.getProxyForUrl(r);a&&(n=new URL(a))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=n.hostname||n.host;e.hostname=a,e.host=a,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(s){Wje(s,t,s.href)}}var bXt=typeof process<"u"&&bt.kindOf(process)==="process",EXt=e=>new Promise((t,r)=>{let n,a,s=(f,d)=>{a||(a=!0,n&&n(f,d))},c=f=>{s(f),t(f)},l=f=>{s(f,!0),r(f)};e(c,l,f=>n=f).catch(l)}),wXt=({address:e,family:t})=>{if(!bt.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},Mje=(e,t)=>wXt(bt.isObject(e)?e:{address:e,family:t}),Gje=bXt&&function(t){return EXt(async function(n,a,s){let{data:c,lookup:l,family:f}=t,{responseType:d,responseEncoding:m}=t,g=t.method.toUpperCase(),x,b=!1,A;if(l){let ye=Rje(l,ve=>bt.isArray(ve)?ve:[ve]);l=(ve,Pe,$e)=>{ye(ve,Pe,(Ct,Ut,ct)=>{if(Ct)return $e(Ct);let nt=bt.isArray(Ut)?Ut.map(ze=>Mje(ze)):[Mje(Ut,ct)];Pe.all?$e(Ct,nt):$e(Ct,nt[0].address,nt[0].family)})}}let C=new Vje.EventEmitter,I=()=>{t.cancelToken&&t.cancelToken.unsubscribe(k),t.signal&&t.signal.removeEventListener("abort",k),C.removeAllListeners()};s((ye,ve)=>{x=!0,ve&&(b=!0,I())});function k(ye){C.emit("abort",!ye||ye.type?new Gg(null,t,A):ye)}C.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(k),t.signal&&(t.signal.aborted?k():t.signal.addEventListener("abort",k)));let O=lT(t.baseURL,t.url,t.allowAbsoluteUrls),M=new URL(O,Po.hasBrowserEnv?Po.origin:void 0),j=M.protocol||Lje[0];if(j==="data:"){let ye;if(g!=="GET")return rE(n,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{ye=Joe(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(ve){throw kn.from(ve,kn.ERR_BAD_REQUEST,t)}return d==="text"?(ye=ye.toString(m),(!m||m==="utf8")&&(ye=bt.stripBOM(ye))):d==="stream"&&(ye=gT.default.Readable.from(ye)),rE(n,a,{data:ye,status:200,statusText:"OK",headers:new el,config:t})}if(Lje.indexOf(j)===-1)return a(new kn("Unsupported protocol "+j,kn.ERR_BAD_REQUEST,t));let W=el.from(t.headers).normalize();W.set("User-Agent","axios/"+hT,!1);let{onUploadProgress:ne,onDownloadProgress:K}=t,be=t.maxRate,ae,he;if(bt.isSpecCompliantForm(c)){let ye=W.getContentType(/boundary=([-_\w\d]{10,70})/i);c=Bje(c,ve=>{W.set(ve)},{tag:`axios-${hT}-boundary`,boundary:ye&&ye[1]||void 0})}else if(bt.isFormData(c)&&bt.isFunction(c.getHeaders)){if(W.set(c.getHeaders()),!W.hasContentLength())try{let ye=await Hje.default.promisify(c.getLength).call(c);Number.isFinite(ye)&&ye>=0&&W.setContentLength(ye)}catch{}}else if(bt.isBlob(c)||bt.isFile(c))c.size&&W.setContentType(c.type||"application/octet-stream"),W.setContentLength(c.size||0),c=gT.default.Readable.from(mH(c));else if(c&&!bt.isStream(c)){if(!Buffer.isBuffer(c))if(bt.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(bt.isString(c))c=Buffer.from(c,"utf-8");else return a(new kn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",kn.ERR_BAD_REQUEST,t));if(W.setContentLength(c.length,!1),t.maxBodyLength>-1&&c.length>t.maxBodyLength)return a(new kn("Request body larger than maxBodyLength limit",kn.ERR_BAD_REQUEST,t))}let me=bt.toFiniteNumber(W.getContentLength());bt.isArray(be)?(ae=be[0],he=be[1]):ae=he=be,c&&(ne||ae)&&(bt.isStream(c)||(c=gT.default.Readable.from(c,{objectMode:!1})),c=gT.default.pipeline([c,new Zoe({maxRate:bt.toFiniteNumber(ae)})],bt.noop),ne&&c.on("progress",jje(c,lN(me,i2(pN(ne),!1,3)))));let Ae;if(t.auth){let ye=t.auth.username||"",ve=t.auth.password||"";Ae=ye+":"+ve}if(!Ae&&M.username){let ye=M.username,ve=M.password;Ae=ye+":"+ve}Ae&&W.delete("authorization");let ce;try{ce=uT(M.pathname+M.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(ye){let ve=new Error(ye.message);return ve.config=t,ve.url=t.url,ve.exists=!0,a(ve)}W.set("Accept-Encoding","gzip, compress, deflate"+(Qje?", br":""),!1);let ie={path:ce,method:g,headers:W.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:Ae,protocol:j,family:f,beforeRedirect:xXt,beforeRedirects:{}};!bt.isUndefined(l)&&(ie.lookup=l),t.socketPath?ie.socketPath=t.socketPath:(ie.hostname=M.hostname.startsWith("[")?M.hostname.slice(1,-1):M.hostname,ie.port=M.port,Wje(ie,t.proxy,j+"//"+M.hostname+(M.port?":"+M.port:"")+ie.path));let Ee,We=vXt.test(ie.protocol);if(ie.agent=We?t.httpsAgent:t.httpAgent,t.transport?Ee=t.transport:t.maxRedirects===0?Ee=We?zje.default:Uje.default:(t.maxRedirects&&(ie.maxRedirects=t.maxRedirects),t.beforeRedirect&&(ie.beforeRedirects.config=t.beforeRedirect),Ee=We?yXt:AXt),t.maxBodyLength>-1?ie.maxBodyLength=t.maxBodyLength:ie.maxBodyLength=1/0,t.insecureHTTPParser&&(ie.insecureHTTPParser=t.insecureHTTPParser),A=Ee.request(ie,function(ve){if(A.destroyed)return;let Pe=[ve],$e=+ve.headers["content-length"];if(K||he){let ze=new Zoe({maxRate:bt.toFiniteNumber(he)});K&&ze.on("progress",jje(ze,lN($e,i2(pN(K),!0,3)))),Pe.push(ze)}let Ct=ve,Ut=ve.req||A;if(t.decompress!==!1&&ve.headers["content-encoding"])switch((g==="HEAD"||ve.statusCode===204)&&delete ve.headers["content-encoding"],(ve.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Pe.push(s2.default.createUnzip(Oje)),delete ve.headers["content-encoding"];break;case"deflate":Pe.push(new Pje),Pe.push(s2.default.createUnzip(Oje)),delete ve.headers["content-encoding"];break;case"br":Qje&&(Pe.push(s2.default.createBrotliDecompress(gXt)),delete ve.headers["content-encoding"])}Ct=Pe.length>1?gT.default.pipeline(Pe,bt.noop):Pe[0];let ct=gT.default.finished(Ct,()=>{ct(),I()}),nt={status:ve.statusCode,statusText:ve.statusMessage,headers:new el(ve.headers),config:t,request:Ut};if(d==="stream")nt.data=Ct,rE(n,a,nt);else{let ze=[],tt=0;Ct.on("data",function(Wt){ze.push(Wt),tt+=Wt.length,t.maxContentLength>-1&&tt>t.maxContentLength&&(b=!0,Ct.destroy(),a(new kn("maxContentLength size of "+t.maxContentLength+" exceeded",kn.ERR_BAD_RESPONSE,t,Ut)))}),Ct.on("aborted",function(){if(b)return;let Wt=new kn("stream has been aborted",kn.ERR_BAD_RESPONSE,t,Ut);Ct.destroy(Wt),a(Wt)}),Ct.on("error",function(Wt){A.destroyed||a(kn.from(Wt,null,t,Ut))}),Ct.on("end",function(){try{let Wt=ze.length===1?ze[0]:Buffer.concat(ze);d!=="arraybuffer"&&(Wt=Wt.toString(m),(!m||m==="utf8")&&(Wt=bt.stripBOM(Wt))),nt.data=Wt}catch(Wt){return a(kn.from(Wt,null,t,nt.request,nt))}rE(n,a,nt)})}C.once("abort",ze=>{Ct.destroyed||(Ct.emit("error",ze),Ct.destroy())})}),C.once("abort",ye=>{a(ye),A.destroy(ye)}),A.on("error",function(ve){a(kn.from(ve,null,t,A))}),A.on("socket",function(ve){ve.setKeepAlive(!0,1e3*60)}),t.timeout){let ye=parseInt(t.timeout,10);if(Number.isNaN(ye)){a(new kn("error trying to parse `config.timeout` to int",kn.ERR_BAD_OPTION_VALUE,t,A));return}A.setTimeout(ye,function(){if(x)return;let Pe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",$e=t.transitional||nN;t.timeoutErrorMessage&&(Pe=t.timeoutErrorMessage),a(new kn(Pe,$e.clarifyTimeoutError?kn.ETIMEDOUT:kn.ECONNABORTED,t,A)),k()})}if(bt.isStream(c)){let ye=!1,ve=!1;c.on("end",()=>{ye=!0}),c.once("error",Pe=>{ve=!0,A.destroy(Pe)}),c.on("close",()=>{!ye&&!ve&&k(new Gg("Request stream has been aborted",t,A))}),c.pipe(A)}else A.end(c)})};var Yje=Po.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Po.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Po.origin),Po.navigator&&/(msie|trident)/i.test(Po.navigator.userAgent)):()=>!0;var Jje=Po.hasStandardBrowserEnv?{write(e,t,r,n,a,s){let c=[e+"="+encodeURIComponent(t)];bt.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),bt.isString(n)&&c.push("path="+n),bt.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var Kje=e=>e instanceof el?{...e}:e;function tx(e,t){t=t||{};let r={};function n(d,m,g,x){return bt.isPlainObject(d)&&bt.isPlainObject(m)?bt.merge.call({caseless:x},d,m):bt.isPlainObject(m)?bt.merge({},m):bt.isArray(m)?m.slice():m}function a(d,m,g,x){if(bt.isUndefined(m)){if(!bt.isUndefined(d))return n(void 0,d,g,x)}else return n(d,m,g,x)}function s(d,m){if(!bt.isUndefined(m))return n(void 0,m)}function c(d,m){if(bt.isUndefined(m)){if(!bt.isUndefined(d))return n(void 0,d)}else return n(void 0,m)}function l(d,m,g){if(g in t)return n(d,m);if(g in e)return n(void 0,d)}let f={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:l,headers:(d,m,g)=>a(Kje(d),Kje(m),g,!0)};return bt.forEach(Object.keys({...e,...t}),function(m){let g=f[m]||a,x=g(e[m],t[m],m);bt.isUndefined(x)&&g!==l||(r[m]=x)}),r}var gH=e=>{let t=tx({},e),{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:c,auth:l}=t;t.headers=c=el.from(c),t.url=uT(lT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&c.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let f;if(bt.isFormData(r)){if(Po.hasStandardBrowserEnv||Po.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((f=c.getContentType())!==!1){let[d,...m]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];c.setContentType([d||"multipart/form-data",...m].join("; "))}}if(Po.hasStandardBrowserEnv&&(n&&bt.isFunction(n)&&(n=n(t)),n||n!==!1&&Yje(t.url))){let d=a&&s&&Jje.read(s);d&&c.set(a,d)}return t};var SXt=typeof XMLHttpRequest<"u",Xje=SXt&&function(e){return new Promise(function(r,n){let a=gH(e),s=a.data,c=el.from(a.headers).normalize(),{responseType:l,onUploadProgress:f,onDownloadProgress:d}=a,m,g,x,b,A;function C(){b&&b(),A&&A(),a.cancelToken&&a.cancelToken.unsubscribe(m),a.signal&&a.signal.removeEventListener("abort",m)}let I=new XMLHttpRequest;I.open(a.method.toUpperCase(),a.url,!0),I.timeout=a.timeout;function k(){if(!I)return;let M=el.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:M,config:e,request:I};rE(function(K){r(K),C()},function(K){n(K),C()},W),I=null}"onloadend"in I?I.onloadend=k:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(k)},I.onabort=function(){I&&(n(new kn("Request aborted",kn.ECONNABORTED,e,I)),I=null)},I.onerror=function(){n(new kn("Network Error",kn.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){let j=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",W=a.transitional||nN;a.timeoutErrorMessage&&(j=a.timeoutErrorMessage),n(new kn(j,W.clarifyTimeoutError?kn.ETIMEDOUT:kn.ECONNABORTED,e,I)),I=null},s===void 0&&c.setContentType(null),"setRequestHeader"in I&&bt.forEach(c.toJSON(),function(j,W){I.setRequestHeader(W,j)}),bt.isUndefined(a.withCredentials)||(I.withCredentials=!!a.withCredentials),l&&l!=="json"&&(I.responseType=a.responseType),d&&([x,A]=i2(d,!0),I.addEventListener("progress",x)),f&&I.upload&&([g,b]=i2(f),I.upload.addEventListener("progress",g),I.upload.addEventListener("loadend",b)),(a.cancelToken||a.signal)&&(m=M=>{I&&(n(!M||M.type?new Gg(null,e,I):M),I.abort(),I=null)},a.cancelToken&&a.cancelToken.subscribe(m),a.signal&&(a.signal.aborted?m():a.signal.addEventListener("abort",m)));let O=wj(a.url);if(O&&Po.protocols.indexOf(O)===-1){n(new kn("Unsupported protocol "+O+":",kn.ERR_BAD_REQUEST,e));return}I.send(s||null)})};var CXt=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a,s=function(d){if(!a){a=!0,l();let m=d instanceof Error?d:this.reason;n.abort(m instanceof kn?m:new Gg(m instanceof Error?m.message:m))}},c=t&&setTimeout(()=>{c=null,s(new kn(`timeout ${t} of ms exceeded`,kn.ETIMEDOUT))},t),l=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));let{signal:f}=n;return f.unsubscribe=()=>bt.asap(l),f}},Zje=CXt;var _Xt=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},IXt=async function*(e,t){for await(let r of kXt(e))yield*_Xt(r,t)},kXt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},rce=(e,t,r,n)=>{let a=IXt(e,t),s=0,c,l=f=>{c||(c=!0,n&&n(f))};return new ReadableStream({async pull(f){try{let{done:d,value:m}=await a.next();if(d){l(),f.close();return}let g=m.byteLength;if(r){let x=s+=g;r(x)}f.enqueue(new Uint8Array(m))}catch(d){throw l(d),d}},cancel(f){return l(f),a.return()}},{highWaterMark:2})};var yH=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",tMe=yH&&typeof ReadableStream=="function",TXt=yH&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),rMe=(e,...t)=>{try{return!!e(...t)}catch{return!1}},BXt=tMe&&rMe(()=>{let e=!1,t=new Request(Po.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),eMe=64*1024,nce=tMe&&rMe(()=>bt.isReadableStream(new Response("").body)),AH={stream:nce&&(e=>e.body)};yH&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!AH[t]&&(AH[t]=bt.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new kn(`Response type '${t}' is not supported`,kn.ERR_NOT_SUPPORT,n)})})})(new Response);var DXt=async e=>{if(e==null)return 0;if(bt.isBlob(e))return e.size;if(bt.isSpecCompliantForm(e))return(await new Request(Po.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(bt.isArrayBufferView(e)||bt.isArrayBuffer(e))return e.byteLength;if(bt.isURLSearchParams(e)&&(e=e+""),bt.isString(e))return(await TXt(e)).byteLength},PXt=async(e,t)=>{let r=bt.toFiniteNumber(e.getContentLength());return r==null?DXt(t):r},nMe=yH&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:s,timeout:c,onDownloadProgress:l,onUploadProgress:f,responseType:d,headers:m,withCredentials:g="same-origin",fetchOptions:x}=gH(e);d=d?(d+"").toLowerCase():"text";let b=Zje([a,s&&s.toAbortSignal()],c),A,C=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),I;try{if(f&&BXt&&r!=="get"&&r!=="head"&&(I=await PXt(m,n))!==0){let W=new Request(t,{method:"POST",body:n,duplex:"half"}),ne;if(bt.isFormData(n)&&(ne=W.headers.get("content-type"))&&m.setContentType(ne),W.body){let[K,be]=lN(I,i2(pN(f)));n=rce(W.body,eMe,K,be)}}bt.isString(g)||(g=g?"include":"omit");let k="credentials"in Request.prototype;A=new Request(t,{...x,signal:b,method:r.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:k?g:void 0});let O=await fetch(A,x),M=nce&&(d==="stream"||d==="response");if(nce&&(l||M&&C)){let W={};["status","statusText","headers"].forEach(ae=>{W[ae]=O[ae]});let ne=bt.toFiniteNumber(O.headers.get("content-length")),[K,be]=l&&lN(ne,i2(pN(l),!0))||[];O=new Response(rce(O.body,eMe,K,()=>{be&&be(),C&&C()}),W)}d=d||"text";let j=await AH[bt.findKey(AH,d)||"text"](O,e);return!M&&C&&C(),await new Promise((W,ne)=>{rE(W,ne,{data:j,headers:el.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:A})})}catch(k){throw C&&C(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new kn("Network Error",kn.ERR_NETWORK,e,A),{cause:k.cause||k}):kn.from(k,k&&k.code,e,A)}});var ice={http:Gje,xhr:Xje,fetch:nMe};bt.forEach(ice,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var iMe=e=>`- ${e}`,RXt=e=>bt.isFunction(e)||e===null||e===!1,vH={getAdapter:e=>{e=bt.isArray(e)?e:[e];let{length:t}=e,r,n,a={};for(let s=0;s<t;s++){r=e[s];let c;if(n=r,!RXt(r)&&(n=ice[(c=String(r)).toLowerCase()],n===void 0))throw new kn(`Unknown adapter '${c}'`);if(n)break;a[c||"#"+s]=n}if(!n){let s=Object.entries(a).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build")),c=t?s.length>1?`since :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edgeone",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0",
4
4
  "description": "Command-line interface for TencentCloud Pages Functions",
5
5
  "bin": {
6
6
  "edgeone": "./edgeone-bin/edgeone.js"