edgeone 1.6.14-beta.7 → 1.6.14-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/edgeone-dist/cli.js +53 -75
- package/edgeone-dist/pages/dev/runner-worker.js +53 -75
- package/package.json +1 -1
package/edgeone-dist/cli.js
CHANGED
|
@@ -566,7 +566,7 @@ ${A.join(`
|
|
|
566
566
|
`;y.forEach(A=>{v+=A}),e.fail(v)}};let p={};s.conflicts=function(g,y){si("<string|object> [array|string]",[g,y],arguments.length),typeof g=="object"?Object.keys(g).forEach(v=>{s.conflicts(v,g[v])}):(t.global(g),p[g]||(p[g]=[]),Array.isArray(y)?y.forEach(v=>s.conflicts(g,v)):p[g].push(y))},s.getConflicting=()=>p,s.conflicting=function(g){Object.keys(g).forEach(y=>{p[y]&&p[y].forEach(v=>{v&&g[y]!==void 0&&g[v]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,v))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(p).forEach(y=>{p[y].forEach(v=>{v&&g[r.Parser.camelCase(y)]!==void 0&&g[r.Parser.camelCase(v)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,v))})})},s.recommendCommands=function(g,y){y=y.sort((E,k)=>k.length-E.length);let A=null,S=1/0;for(let E=0,k;(k=y[E])!==void 0;E++){let P=S3e(g,k);P<=3&&P<S&&(S=P,A=k)}A&&e.fail(n("Did you mean %s?",A))},s.reset=function(g){return c=WI(c,y=>!g[y]),p=WI(p,y=>!g[y]),s};let f=[];return s.freeze=function(){f.push({implied:c,conflicting:p})},s.unfreeze=function(){let g=f.pop();ig(g,void 0,r),{implied:c,conflicting:p}=g},s}var ci=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Ve=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fp,uD,P8,_v,JA,VV,JI,lD,GV,Sv,WV,Cv,Mw,KA,Iv,YV,fF,md,Bi,JV,KV,XA,pD,dF,fD,KI,XV,xs,dD,hD,mD,Ls,ZV,Qw,cp;function G3e(t){return(e=[],r=t.process.cwd(),n)=>{let o=new jue(e,r,n,t);return Object.defineProperty(o,"argv",{get:()=>o.parse(),enumerable:!0}),o.help(),o.version(),o}}var k3e=Symbol("copyDoubleDash"),T3e=Symbol("copyDoubleDash"),kue=Symbol("deleteFromParserHintObject"),B3e=Symbol("emitWarning"),D3e=Symbol("freeze"),P3e=Symbol("getDollarZero"),gD=Symbol("getParserConfiguration"),R3e=Symbol("getUsageConfiguration"),Tue=Symbol("guessLocale"),N3e=Symbol("guessVersion"),O3e=Symbol("parsePositionalNumbers"),Bue=Symbol("pkgUp"),XI=Symbol("populateParserHintArray"),hF=Symbol("populateParserHintSingleValueDictionary"),Due=Symbol("populateParserHintArrayDictionary"),Pue=Symbol("populateParserHintDictionary"),Rue=Symbol("sanitizeKey"),Nue=Symbol("setKey"),Oue=Symbol("unfreeze"),F3e=Symbol("validateAsync"),L3e=Symbol("getCommandInstance"),j3e=Symbol("getContext"),M3e=Symbol("getHasOutput"),Q3e=Symbol("getLoggerInstance"),q3e=Symbol("getParseContext"),U3e=Symbol("getUsageInstance"),$3e=Symbol("getValidationInstance"),eG=Symbol("hasParseCallback"),z3e=Symbol("isGlobalContext"),AD=Symbol("postProcess"),H3e=Symbol("rebase"),Fue=Symbol("reset"),R8=Symbol("runYargsParserAndExecuteCommands"),Lue=Symbol("runValidation"),V3e=Symbol("setHasOutput"),yD=Symbol("kTrackManuallySetKeys"),jue=class{constructor(e=[],r,n,o){this.customScriptName=!1,this.parsed=!1,Fp.set(this,void 0),uD.set(this,void 0),P8.set(this,{commands:[],fullCommands:[]}),_v.set(this,null),JA.set(this,null),VV.set(this,"show-hidden"),JI.set(this,null),lD.set(this,!0),GV.set(this,{}),Sv.set(this,!0),WV.set(this,[]),Cv.set(this,void 0),Mw.set(this,{}),KA.set(this,!1),Iv.set(this,null),YV.set(this,!0),fF.set(this,void 0),md.set(this,""),Bi.set(this,void 0),JV.set(this,void 0),KV.set(this,{}),XA.set(this,null),pD.set(this,null),dF.set(this,{}),fD.set(this,{}),KI.set(this,void 0),XV.set(this,!1),xs.set(this,void 0),dD.set(this,!1),hD.set(this,!1),mD.set(this,!1),Ls.set(this,void 0),ZV.set(this,{}),Qw.set(this,null),cp.set(this,void 0),ci(this,xs,o,"f"),ci(this,KI,e,"f"),ci(this,uD,r,"f"),ci(this,JV,n,"f"),ci(this,Cv,new $V(this),"f"),this.$0=this[P3e](),this[Fue](),ci(this,Fp,Ve(this,Fp,"f"),"f"),ci(this,Ls,Ve(this,Ls,"f"),"f"),ci(this,cp,Ve(this,cp,"f"),"f"),ci(this,Bi,Ve(this,Bi,"f"),"f"),Ve(this,Bi,"f").showHiddenOpt=Ve(this,VV,"f"),ci(this,fF,this[T3e](),"f")}addHelpOpt(e,r){let n="help";return si("[string|boolean] [string]",[e,r],arguments.length),Ve(this,Iv,"f")&&(this[kue](Ve(this,Iv,"f")),ci(this,Iv,null,"f")),e===!1&&r===void 0?this:(ci(this,Iv,typeof e=="string"?e:n,"f"),this.boolean(Ve(this,Iv,"f")),this.describe(Ve(this,Iv,"f"),r||Ve(this,Ls,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(si("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:Ve(this,VV,"f");return this.boolean(n),this.describe(n,r||Ve(this,Ls,"f").deferY18nLookup("Show hidden options")),Ve(this,Bi,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return si("<object|string|array> [string|array]",[e,r],arguments.length),this[Due](this.alias.bind(this),"alias",e,r),this}array(e){return si("<array|string>",[e],arguments.length),this[XI]("array",e),this[yD](e),this}boolean(e){return si("<array|string>",[e],arguments.length),this[XI]("boolean",e),this[yD](e),this}check(e,r){return si("<function> [boolean]",[e,r],arguments.length),this.middleware((n,o)=>cD(()=>e(n,o.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&Ve(this,Ls,"f").fail(s.toString(),s):Ve(this,Ls,"f").fail(Ve(this,xs,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(Ve(this,Ls,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return si("<object|string|array> [string|array]",[e,r],arguments.length),this[Due](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(si("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Fu("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Fu("coerce callback must be provided");return Ve(this,Bi,"f").key[e]=!0,Ve(this,Cv,"f").addCoerceMiddleware((n,o)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?cD(()=>(s=o.getAliases(),r(n[e])),u=>{n[e]=u;let p=o.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&p!==!0)for(let f of s[e])n[f]=u;return n},u=>{throw new Fu(u.message)}):n},e),this}conflicts(e,r){return si("<string|object> [string|array]",[e,r],arguments.length),Ve(this,cp,"f").conflicts(e,r),this}config(e="config",r,n){return si("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=T8(e,Ve(this,uD,"f"),this[gD]()["deep-merge-config"]||!1,Ve(this,xs,"f")),Ve(this,Bi,"f").configObjects=(Ve(this,Bi,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||Ve(this,Ls,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(o=>{Ve(this,Bi,"f").config[o]=n||!0}),this)}completion(e,r,n){return si("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ci(this,JA,e||Ve(this,JA,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(Ve(this,JA,"f"),r),n&&Ve(this,_v,"f").registerFunction(n),this}command(e,r,n,o,s,c){return si("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,o,s,c],arguments.length),Ve(this,Fp,"f").addHandler(e,r,n,o,s,c),this}commands(e,r,n,o,s,c){return this.command(e,r,n,o,s,c)}commandDir(e,r){si("<string> [object]",[e,r],arguments.length);let n=Ve(this,JV,"f")||Ve(this,xs,"f").require;return Ve(this,Fp,"f").addDirectory(e,n,Ve(this,xs,"f").getCallerFile(),r),this}count(e){return si("<array|string>",[e],arguments.length),this[XI]("count",e),this[yD](e),this}default(e,r,n){return si("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(wue(e,Ve(this,xs,"f")),Ve(this,Bi,"f").defaultDescription[e]=n),typeof r=="function"&&(wue(e,Ve(this,xs,"f")),Ve(this,Bi,"f").defaultDescription[e]||(Ve(this,Bi,"f").defaultDescription[e]=Ve(this,Ls,"f").functionDescription(r)),r=r.call()),this[hF](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,o){return si("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,o],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),Ve(this,Bi,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:o},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(o=>{ig(n,!0,Ve(this,xs,"f")),this.demandOption(o,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(ig(n,!0,Ve(this,xs,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(o=>{ig(n,!0,Ve(this,xs,"f")),this.demandOption(o,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return si("<object|string|array> [string]",[e,r],arguments.length),this[hF](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return si("<string> [string|boolean]",[e,r],arguments.length),Ve(this,Bi,"f").deprecatedOptions[e]=r,this}describe(e,r){return si("<object|string|array> [string]",[e,r],arguments.length),this[Nue](e,!0),Ve(this,Ls,"f").describe(e,r),this}detectLocale(e){return si("<boolean>",[e],arguments.length),ci(this,lD,e,"f"),this}env(e){return si("[string|boolean]",[e],arguments.length),e===!1?delete Ve(this,Bi,"f").envPrefix:Ve(this,Bi,"f").envPrefix=e||"",this}epilogue(e){return si("<string>",[e],arguments.length),Ve(this,Ls,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return si("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):Ve(this,Ls,"f").example(e,r),this}exit(e,r){ci(this,KA,!0,"f"),ci(this,JI,r,"f"),Ve(this,Sv,"f")&&Ve(this,xs,"f").process.exit(e)}exitProcess(e=!0){return si("[boolean]",[e],arguments.length),ci(this,Sv,e,"f"),this}fail(e){if(si("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Fu("Invalid first argument. Expected function or boolean 'false'");return Ve(this,Ls,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return si("<array> [function]",[e,r],arguments.length),r?Ve(this,_v,"f").getCompletion(e,r):new Promise((n,o)=>{Ve(this,_v,"f").getCompletion(e,(s,c)=>{s?o(s):n(c)})})}getDemandedOptions(){return si([],0),Ve(this,Bi,"f").demandedOptions}getDemandedCommands(){return si([],0),Ve(this,Bi,"f").demandedCommands}getDeprecatedOptions(){return si([],0),Ve(this,Bi,"f").deprecatedOptions}getDetectLocale(){return Ve(this,lD,"f")}getExitProcess(){return Ve(this,Sv,"f")}getGroups(){return Object.assign({},Ve(this,Mw,"f"),Ve(this,fD,"f"))}getHelp(){if(ci(this,KA,!0,"f"),!Ve(this,Ls,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[R8](Ve(this,KI,"f"),void 0,void 0,0,!0);if(Lu(r))return r.then(()=>Ve(this,Ls,"f").help())}let e=Ve(this,Fp,"f").runDefaultBuilderOn(this);if(Lu(e))return e.then(()=>Ve(this,Ls,"f").help())}return Promise.resolve(Ve(this,Ls,"f").help())}getOptions(){return Ve(this,Bi,"f")}getStrict(){return Ve(this,dD,"f")}getStrictCommands(){return Ve(this,hD,"f")}getStrictOptions(){return Ve(this,mD,"f")}global(e,r){return si("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?Ve(this,Bi,"f").local=Ve(this,Bi,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{Ve(this,Bi,"f").local.includes(n)||Ve(this,Bi,"f").local.push(n)}),this}group(e,r){si("<string|array> <string>",[e,r],arguments.length);let n=Ve(this,fD,"f")[r]||Ve(this,Mw,"f")[r];Ve(this,fD,"f")[r]&&delete Ve(this,fD,"f")[r];let o={};return Ve(this,Mw,"f")[r]=(n||[]).concat(e).filter(s=>o[s]?!1:o[s]=!0),this}hide(e){return si("<string>",[e],arguments.length),Ve(this,Bi,"f").hiddenOptions.push(e),this}implies(e,r){return si("<string|object> [number|string|array]",[e,r],arguments.length),Ve(this,cp,"f").implies(e,r),this}locale(e){return si("[string]",[e],arguments.length),e===void 0?(this[Tue](),Ve(this,xs,"f").y18n.getLocale()):(ci(this,lD,!1,"f"),Ve(this,xs,"f").y18n.setLocale(e),this)}middleware(e,r,n){return Ve(this,Cv,"f").addMiddleware(e,!!r,n)}nargs(e,r){return si("<string|object|array> [number]",[e,r],arguments.length),this[hF](this.nargs.bind(this),"narg",e,r),this}normalize(e){return si("<array|string>",[e],arguments.length),this[XI]("normalize",e),this}number(e){return si("<array|string>",[e],arguments.length),this[XI]("number",e),this[yD](e),this}option(e,r){if(si("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[yD](e),Ve(this,Qw,"f")&&(e==="version"||(r==null?void 0:r.alias)==="version")&&this[B3e](['"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(`
|
|
567
567
|
`),void 0,"versionWarning"),Ve(this,Bi,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let o=r.demand||r.required||r.require;o&&this.demand(e,o),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(Ve(this,Bi,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let s=r.describe||r.description||r.desc,c=Ve(this,Ls,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){si("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[D3e](),typeof e>"u"&&(e=Ve(this,KI,"f")),typeof r=="object"&&(ci(this,pD,r,"f"),r=n),typeof r=="function"&&(ci(this,XA,r,"f"),r=!1),r||ci(this,KI,e,"f"),Ve(this,XA,"f")&&ci(this,Sv,!1,"f");let o=this[R8](e,!!r),s=this.parsed;return Ve(this,_v,"f").setParsed(this.parsed),Lu(o)?o.then(c=>(Ve(this,XA,"f")&&Ve(this,XA,"f").call(this,Ve(this,JI,"f"),c,Ve(this,md,"f")),c)).catch(c=>{throw Ve(this,XA,"f")&&Ve(this,XA,"f")(c,this.parsed.argv,Ve(this,md,"f")),c}).finally(()=>{this[Oue](),this.parsed=s}):(Ve(this,XA,"f")&&Ve(this,XA,"f").call(this,Ve(this,JI,"f"),o,Ve(this,md,"f")),this[Oue](),this.parsed=s,o)}parseAsync(e,r,n){let o=this.parse(e,r,n);return Lu(o)?o:Promise.resolve(o)}parseSync(e,r,n){let o=this.parse(e,r,n);if(Lu(o))throw new Fu(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return o}parserConfiguration(e){return si("<object>",[e],arguments.length),ci(this,KV,e,"f"),this}pkgConf(e,r){si("<string> [string]",[e,r],arguments.length);let n=null,o=this[Bue](r||Ve(this,uD,"f"));return o[e]&&typeof o[e]=="object"&&(n=T8(o[e],r||Ve(this,uD,"f"),this[gD]()["deep-merge-config"]||!1,Ve(this,xs,"f")),Ve(this,Bi,"f").configObjects=(Ve(this,Bi,"f").configObjects||[]).concat(n)),this}positional(e,r){si("<string> <object>",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=WI(r,(c,u)=>c==="type"&&!["string","number","boolean"].includes(u)?!1:n.includes(c));let o=Ve(this,P8,"f").fullCommands[Ve(this,P8,"f").fullCommands.length-1],s=o?Ve(this,Fp,"f").cmdToParseOptions(o):{array:[],alias:{},default:{},demand:{}};return lF(s).forEach(c=>{let u=s[c];Array.isArray(u)?u.indexOf(e)!==-1&&(r[c]=!0):u[e]&&!(c in r)&&(r[c]=u[e])}),this.group(e,Ve(this,Ls,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return si("[boolean]",[e],arguments.length),ci(this,XV,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return si("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&Ve(this,Bi,"f").narg[e]?this:(this[hF](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return si("[string] [string]",[e,r],arguments.length),e=e||this.$0,Ve(this,fF,"f").log(Ve(this,_v,"f").generateCompletionScript(e,r||Ve(this,JA,"f")||"completion")),this}showHelp(e){if(si("[string|function]",[e],arguments.length),ci(this,KA,!0,"f"),!Ve(this,Ls,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[R8](Ve(this,KI,"f"),void 0,void 0,0,!0);if(Lu(n))return n.then(()=>{Ve(this,Ls,"f").showHelp(e)}),this}let r=Ve(this,Fp,"f").runDefaultBuilderOn(this);if(Lu(r))return r.then(()=>{Ve(this,Ls,"f").showHelp(e)}),this}return Ve(this,Ls,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return si("[boolean|string] [string]",[e,r],arguments.length),Ve(this,Ls,"f").showHelpOnFail(e,r),this}showVersion(e){return si("[string|function]",[e],arguments.length),Ve(this,Ls,"f").showVersion(e),this}skipValidation(e){return si("<array|string>",[e],arguments.length),this[XI]("skipValidation",e),this}strict(e){return si("[boolean]",[e],arguments.length),ci(this,dD,e!==!1,"f"),this}strictCommands(e){return si("[boolean]",[e],arguments.length),ci(this,hD,e!==!1,"f"),this}strictOptions(e){return si("[boolean]",[e],arguments.length),ci(this,mD,e!==!1,"f"),this}string(e){return si("<array|string>",[e],arguments.length),this[XI]("string",e),this[yD](e),this}terminalWidth(){return si([],0),Ve(this,xs,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return si("<object>",[e],arguments.length),ci(this,lD,!1,"f"),Ve(this,xs,"f").y18n.updateLocale(e),this}usage(e,r,n,o){if(si("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,o],arguments.length),r!==void 0){if(ig(e,null,Ve(this,xs,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,o);throw new Fu(".usage() description must start with $0 if being used as alias for .command()")}else return Ve(this,Ls,"f").usage(e),this}usageConfiguration(e){return si("<object>",[e],arguments.length),ci(this,ZV,e,"f"),this}version(e,r,n){let o="version";if(si("[boolean|string] [string] [string]",[e,r,n],arguments.length),Ve(this,Qw,"f")&&(this[kue](Ve(this,Qw,"f")),Ve(this,Ls,"f").version(void 0),ci(this,Qw,null,"f")),arguments.length===0)n=this[N3e](),e=o;else if(arguments.length===1){if(e===!1)return this;n=e,e=o}else arguments.length===2&&(n=r,r=void 0);return ci(this,Qw,typeof e=="string"?e:o,"f"),r=r||Ve(this,Ls,"f").deferY18nLookup("Show version number"),Ve(this,Ls,"f").version(n||void 0),this.boolean(Ve(this,Qw,"f")),this.describe(Ve(this,Qw,"f"),r),this}wrap(e){return si("<number|null|undefined>",[e],arguments.length),Ve(this,Ls,"f").wrap(e),this}[(Fp=new WeakMap,uD=new WeakMap,P8=new WeakMap,_v=new WeakMap,JA=new WeakMap,VV=new WeakMap,JI=new WeakMap,lD=new WeakMap,GV=new WeakMap,Sv=new WeakMap,WV=new WeakMap,Cv=new WeakMap,Mw=new WeakMap,KA=new WeakMap,Iv=new WeakMap,YV=new WeakMap,fF=new WeakMap,md=new WeakMap,Bi=new WeakMap,JV=new WeakMap,KV=new WeakMap,XA=new WeakMap,pD=new WeakMap,dF=new WeakMap,fD=new WeakMap,KI=new WeakMap,XV=new WeakMap,xs=new WeakMap,dD=new WeakMap,hD=new WeakMap,mD=new WeakMap,Ls=new WeakMap,ZV=new WeakMap,Qw=new WeakMap,cp=new WeakMap,k3e)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[T3e](){return{log:(...e)=>{this[eG]()||console.log(...e),ci(this,KA,!0,"f"),Ve(this,md,"f").length&&ci(this,md,Ve(this,md,"f")+`
|
|
568
568
|
`,"f"),ci(this,md,Ve(this,md,"f")+e.join(" "),"f")},error:(...e)=>{this[eG]()||console.error(...e),ci(this,KA,!0,"f"),Ve(this,md,"f").length&&ci(this,md,Ve(this,md,"f")+`
|
|
569
|
-
`,"f"),ci(this,md,Ve(this,md,"f")+e.join(" "),"f")}}}[kue](e){lF(Ve(this,Bi,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=Ve(this,Bi,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete Ve(this,Ls,"f").getDescriptions()[e]}[B3e](e,r,n){Ve(this,GV,"f")[n]||(Ve(this,xs,"f").process.emitWarning(e,r),Ve(this,GV,"f")[n]=!0)}[D3e](){Ve(this,WV,"f").push({options:Ve(this,Bi,"f"),configObjects:Ve(this,Bi,"f").configObjects.slice(0),exitProcess:Ve(this,Sv,"f"),groups:Ve(this,Mw,"f"),strict:Ve(this,dD,"f"),strictCommands:Ve(this,hD,"f"),strictOptions:Ve(this,mD,"f"),completionCommand:Ve(this,JA,"f"),output:Ve(this,md,"f"),exitError:Ve(this,JI,"f"),hasOutput:Ve(this,KA,"f"),parsed:this.parsed,parseFn:Ve(this,XA,"f"),parseContext:Ve(this,pD,"f")}),Ve(this,Ls,"f").freeze(),Ve(this,cp,"f").freeze(),Ve(this,Fp,"f").freeze(),Ve(this,Cv,"f").freeze()}[P3e](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Ve(this,xs,"f").process.argv()[0])?r=Ve(this,xs,"f").process.argv().slice(1,2):r=Ve(this,xs,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[H3e](Ve(this,uD,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),Ve(this,xs,"f").getEnv("_")&&Ve(this,xs,"f").getProcessArgvBin()===Ve(this,xs,"f").getEnv("_")&&(e=Ve(this,xs,"f").getEnv("_").replace(`${Ve(this,xs,"f").path.dirname(Ve(this,xs,"f").process.execPath())}/`,"")),e}[gD](){return Ve(this,KV,"f")}[R3e](){return Ve(this,ZV,"f")}[Tue](){if(!Ve(this,lD,"f"))return;let e=Ve(this,xs,"f").getEnv("LC_ALL")||Ve(this,xs,"f").getEnv("LC_MESSAGES")||Ve(this,xs,"f").getEnv("LANG")||Ve(this,xs,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[N3e](){return this[Bue]().version||"unknown"}[O3e](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)Ve(this,xs,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Bue](e){let r=e||"*";if(Ve(this,dF,"f")[r])return Ve(this,dF,"f")[r];let n={};try{let o=e||Ve(this,xs,"f").mainFilename;!e&&Ve(this,xs,"f").path.extname(o)&&(o=Ve(this,xs,"f").path.dirname(o));let s=Ve(this,xs,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});ig(s,void 0,Ve(this,xs,"f")),n=JSON.parse(Ve(this,xs,"f").readFileSync(s,"utf8"))}catch{}return Ve(this,dF,"f")[r]=n||{},Ve(this,dF,"f")[r]}[XI](e,r){r=[].concat(r),r.forEach(n=>{n=this[Rue](n),Ve(this,Bi,"f")[e].push(n)})}[hF](e,r,n,o){this[Pue](e,r,n,o,(s,c,u)=>{Ve(this,Bi,"f")[s][c]=u})}[Due](e,r,n,o){this[Pue](e,r,n,o,(s,c,u)=>{Ve(this,Bi,"f")[s][c]=(Ve(this,Bi,"f")[s][c]||[]).concat(u)})}[Pue](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of lF(n))e(c,n[c]);else s(r,this[Rue](n),o)}[Rue](e){return e==="__proto__"?"___proto___":e}[Nue](e,r){return this[hF](this[Nue].bind(this),"key",e,r),this}[Oue](){var e,r,n,o,s,c,u,p,f,h,g,y;let v=Ve(this,WV,"f").pop();ig(v,void 0,Ve(this,xs,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(S){ci(e,Bi,S,"f")}}.value,configObjects:A,exitProcess:{set value(S){ci(r,Sv,S,"f")}}.value,groups:{set value(S){ci(n,Mw,S,"f")}}.value,output:{set value(S){ci(o,md,S,"f")}}.value,exitError:{set value(S){ci(s,JI,S,"f")}}.value,hasOutput:{set value(S){ci(c,KA,S,"f")}}.value,parsed:this.parsed,strict:{set value(S){ci(u,dD,S,"f")}}.value,strictCommands:{set value(S){ci(p,hD,S,"f")}}.value,strictOptions:{set value(S){ci(f,mD,S,"f")}}.value,completionCommand:{set value(S){ci(h,JA,S,"f")}}.value,parseFn:{set value(S){ci(g,XA,S,"f")}}.value,parseContext:{set value(S){ci(y,pD,S,"f")}}.value}=v,Ve(this,Bi,"f").configObjects=A,Ve(this,Ls,"f").unfreeze(),Ve(this,cp,"f").unfreeze(),Ve(this,Fp,"f").unfreeze(),Ve(this,Cv,"f").unfreeze()}[F3e](e,r){return cD(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[L3e].bind(this),getContext:this[j3e].bind(this),getHasOutput:this[M3e].bind(this),getLoggerInstance:this[Q3e].bind(this),getParseContext:this[q3e].bind(this),getParserConfiguration:this[gD].bind(this),getUsageConfiguration:this[R3e].bind(this),getUsageInstance:this[U3e].bind(this),getValidationInstance:this[$3e].bind(this),hasParseCallback:this[eG].bind(this),isGlobalContext:this[z3e].bind(this),postProcess:this[AD].bind(this),reset:this[Fue].bind(this),runValidation:this[Lue].bind(this),runYargsParserAndExecuteCommands:this[R8].bind(this),setHasOutput:this[V3e].bind(this)}}[L3e](){return Ve(this,Fp,"f")}[j3e](){return Ve(this,P8,"f")}[M3e](){return Ve(this,KA,"f")}[Q3e](){return Ve(this,fF,"f")}[q3e](){return Ve(this,pD,"f")||{}}[U3e](){return Ve(this,Ls,"f")}[$3e](){return Ve(this,cp,"f")}[eG](){return!!Ve(this,XA,"f")}[z3e](){return Ve(this,YV,"f")}[AD](e,r,n,o){return n||Lu(e)||(r||(e=this[k3e](e)),(this[gD]()["parse-positional-numbers"]||this[gD]()["parse-positional-numbers"]===void 0)&&(e=this[O3e](e)),o&&(e=aD(e,this,Ve(this,Cv,"f").getMiddleware(),!1))),e}[Fue](e={}){ci(this,Bi,Ve(this,Bi,"f")||{},"f");let r={};r.local=Ve(this,Bi,"f").local||[],r.configObjects=Ve(this,Bi,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(Ve(this,fD,"f"),Object.keys(Ve(this,Mw,"f")).reduce((c,u)=>{let p=Ve(this,Mw,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),ci(this,Mw,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(Ve(this,Bi,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=WI(Ve(this,Bi,"f")[c],u=>!n[u])}),r.envPrefix=Ve(this,Bi,"f").envPrefix,ci(this,Bi,r,"f"),ci(this,Ls,Ve(this,Ls,"f")?Ve(this,Ls,"f").reset(n):b3e(this,Ve(this,xs,"f")),"f"),ci(this,cp,Ve(this,cp,"f")?Ve(this,cp,"f").reset(n):I3e(this,Ve(this,Ls,"f"),Ve(this,xs,"f")),"f"),ci(this,Fp,Ve(this,Fp,"f")?Ve(this,Fp,"f").reset():y3e(Ve(this,Ls,"f"),Ve(this,cp,"f"),Ve(this,Cv,"f"),Ve(this,xs,"f")),"f"),Ve(this,_v,"f")||ci(this,_v,_3e(this,Ve(this,Ls,"f"),Ve(this,Fp,"f"),Ve(this,xs,"f")),"f"),Ve(this,Cv,"f").reset(),ci(this,JA,null,"f"),ci(this,md,"","f"),ci(this,JI,null,"f"),ci(this,KA,!1,"f"),this.parsed=!1,this}[H3e](e,r){return Ve(this,xs,"f").path.relative(e,r)}[R8](e,r,n,o=0,s=!1){let c=!!n||s;e=e||Ve(this,KI,"f"),Ve(this,Bi,"f").__=Ve(this,xs,"f").y18n.__,Ve(this,Bi,"f").configuration=this[gD]();let u=!!Ve(this,Bi,"f").configuration["populate--"],p=Object.assign({},Ve(this,Bi,"f").configuration,{"populate--":!0}),f=Ve(this,xs,"f").Parser.detailed(e,Object.assign({},Ve(this,Bi,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,Ve(this,pD,"f")),g,y=f.aliases,v=!1,A=!1;Object.keys(h).forEach(S=>{S===Ve(this,Iv,"f")&&h[S]?v=!0:S===Ve(this,Qw,"f")&&h[S]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&Ve(this,Ls,"f").clearCachedHelpMessage();try{if(this[Tue](),r)return this[AD](h,u,!!n,!1);Ve(this,Iv,"f")&&[Ve(this,Iv,"f")].concat(y[Ve(this,Iv,"f")]||[]).filter(j=>j.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),v=!0),ci(this,YV,!1,"f");let S=Ve(this,Fp,"f").getCommands(),E=Ve(this,_v,"f").completionKey in h,k=v||E||s;if(h._.length){if(S.length){let P;for(let j=o||0,L;h._[j]!==void 0;j++)if(L=String(h._[j]),S.includes(L)&&L!==Ve(this,JA,"f")){let z=Ve(this,Fp,"f").runCommand(L,this,f,j+1,s,v||A||s);return this[AD](z,u,!!n,!1)}else if(!P&&L!==Ve(this,JA,"f")){P=L;break}!Ve(this,Fp,"f").hasDefaultCommand()&&Ve(this,XV,"f")&&P&&!k&&Ve(this,cp,"f").recommendCommands(P,S)}Ve(this,JA,"f")&&h._.includes(Ve(this,JA,"f"))&&!E&&(Ve(this,Sv,"f")&&YI(!0),this.showCompletionScript(),this.exit(0))}if(Ve(this,Fp,"f").hasDefaultCommand()&&!k){let P=Ve(this,Fp,"f").runCommand(null,this,f,0,s,v||A||s);return this[AD](P,u,!!n,!1)}if(E){Ve(this,Sv,"f")&&YI(!0),e=[].concat(e);let P=e.slice(e.indexOf(`--${Ve(this,_v,"f").completionKey}`)+1);return Ve(this,_v,"f").getCompletion(P,(j,L)=>{if(j)throw new Fu(j.message);(L||[]).forEach(z=>{Ve(this,fF,"f").log(z)}),this.exit(0)}),this[AD](h,!u,!!n,!1)}if(Ve(this,KA,"f")||(v?(Ve(this,Sv,"f")&&YI(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(Ve(this,Sv,"f")&&YI(!0),c=!0,Ve(this,Ls,"f").showVersion("log"),this.exit(0))),!c&&Ve(this,Bi,"f").skipValidation.length>0&&(c=Object.keys(h).some(P=>Ve(this,Bi,"f").skipValidation.indexOf(P)>=0&&h[P]===!0)),!c){if(f.error)throw new Fu(f.error.message);if(!E){let P=this[Lue](y,{},f.error);n||(g=aD(h,this,Ve(this,Cv,"f").getMiddleware(),!0)),g=this[F3e](P,g!=null?g:h),Lu(g)&&!n&&(g=g.then(()=>aD(h,this,Ve(this,Cv,"f").getMiddleware(),!1)))}}}catch(S){if(S instanceof Fu)Ve(this,Ls,"f").fail(S.message,S);else throw S}return this[AD](g!=null?g:h,u,!!n,!0)}[Lue](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Fu(n.message);Ve(this,cp,"f").nonOptionCount(c),Ve(this,cp,"f").requiredArguments(c,s);let u=!1;Ve(this,hD,"f")&&(u=Ve(this,cp,"f").unknownCommands(c)),Ve(this,dD,"f")&&!u?Ve(this,cp,"f").unknownArguments(c,e,r,!!o):Ve(this,mD,"f")&&Ve(this,cp,"f").unknownArguments(c,e,{},!1,!1),Ve(this,cp,"f").limitedChoices(c),Ve(this,cp,"f").implications(c),Ve(this,cp,"f").conflicting(c)}}[V3e](){ci(this,KA,!0,"f")}[yD](e){if(typeof e=="string")Ve(this,Bi,"f").key[e]=!0;else for(let r of e)Ve(this,Bi,"f").key[r]=!0}};function v3e(t){return!!t&&typeof t.getInternalMethods=="function"}var Ytr=G3e(Eue),W3e=Ytr;var Ab={name:"edgeone",version:"1.6.14-beta.7",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/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],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 prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/nuxt-pages":"1.1.0","@edgeone/opennextjs-pages":"0.2.10","@edgeone/pages-agent-toolkit":"^0.1.34","@edgeone/pages-blob":"^0.0.13",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",giget:"^2.0.0","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","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.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",protobufjs:"^8.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 Ode=Pt(Wc()),Fde=Pt(DF()),Lde=Pt(qpe());function Dq(t,e){return function(){return t.apply(e,arguments)}}var{toString:Jor}=Object.prototype,{getPrototypeOf:HG}=Object,{iterator:VG,toStringTag:N6e}=Symbol,GG=(t=>e=>{let r=Jor.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cb=t=>(t=t.toLowerCase(),e=>GG(e)===t),WG=t=>e=>typeof e===t,{isArray:DD}=Array,NF=WG("undefined");function OF(t){return t!==null&&!NF(t)&&t.constructor!==null&&!NF(t.constructor)&&O0(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var O6e=Cb("ArrayBuffer");function Kor(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&O6e(t.buffer),e}var Xor=WG("string"),O0=WG("function"),F6e=WG("number"),Pq=t=>t!==null&&typeof t=="object",Zor=t=>t===!0||t===!1,zG=t=>{if(GG(t)!=="object")return!1;let e=HG(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(N6e in t)&&!(VG in t)},ear=t=>{if(!Pq(t)||OF(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},tar=Cb("Date"),rar=Cb("File"),nar=t=>!!(t&&typeof t.uri<"u"),iar=t=>t&&typeof t.getParts<"u",sar=Cb("Blob"),oar=Cb("FileList"),aar=t=>Pq(t)&&O0(t.pipe);function car(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var P6e=car(),R6e=typeof P6e.FormData<"u"?P6e.FormData:void 0,uar=t=>{if(!t)return!1;if(R6e&&t instanceof R6e)return!0;let e=HG(t);if(!e||e===Object.prototype||!O0(t.append))return!1;let r=GG(t);return r==="formdata"||r==="object"&&O0(t.toString)&&t.toString()==="[object FormData]"},lar=Cb("URLSearchParams"),[par,far,dar,har]=["ReadableStream","Request","Response","Headers"].map(Cb),mar=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rq(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),DD(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(OF(t))return;let s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length,u;for(n=0;n<c;n++)u=s[n],e.call(null,t[u],u,t)}}function L6e(t,e){if(OF(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var BD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,j6e=t=>!NF(t)&&t!==BD;function Upe(...t){let{caseless:e,skipUndefined:r}=j6e(this)&&this||{},n={},o=(s,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;let u=e&&typeof c=="string"&&L6e(n,c)||c,p=$pe(n,u)?n[u]:void 0;zG(p)&&zG(s)?n[u]=Upe(p,s):zG(s)?n[u]=Upe({},s):DD(s)?n[u]=s.slice():(!r||!NF(s))&&(n[u]=s)};for(let s=0,c=t.length;s<c;s++){let u=t[s];if(!u||OF(u)||(Rq(u,o),typeof u!="object"||DD(u)))continue;let p=Object.getOwnPropertySymbols(u);for(let f=0;f<p.length;f++){let h=p[f];kar.call(u,h)&&o(u[h],h)}}return n}var gar=(t,e,r,{allOwnKeys:n}={})=>(Rq(e,(o,s)=>{r&&O0(o)?Object.defineProperty(t,s,{__proto__:null,value:Dq(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Aar=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),yar=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},xar=(t,e,r,n)=>{let o,s,c,u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!u[c]&&(e[c]=t[c],u[c]=!0);t=r!==!1&&HG(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},bar=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Ear=t=>{if(!t)return null;if(DD(t))return t;let e=t.length;if(!F6e(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},war=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&HG(Uint8Array)),_ar=(t,e)=>{let n=(t&&t[VG]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},Sar=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Car=Cb("HTMLFormElement"),Iar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),$pe=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),{propertyIsEnumerable:kar}=Object.prototype,Tar=Cb("RegExp"),M6e=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Rq(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},Bar=t=>{M6e(t,(e,r)=>{if(O0(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(O0(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Dar=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return DD(t)?n(t):n(String(t).split(e)),r},Par=()=>{},Rar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Nar(t){return!!(t&&O0(t.append)&&t[N6e]==="FormData"&&t[VG])}var Oar=t=>{let e=new WeakSet,r=n=>{if(Pq(n)){if(e.has(n))return;if(OF(n))return n;if(!("toJSON"in n)){e.add(n);let o=DD(n)?[]:{};return Rq(n,(s,c)=>{let u=r(s);!NF(u)&&(o[c]=u)}),e.delete(n),o}}return n};return r(t)},Far=Cb("AsyncFunction"),Lar=t=>t&&(Pq(t)||O0(t))&&O0(t.then)&&O0(t.catch),Q6e=((t,e)=>t?setImmediate:e?((r,n)=>(BD.addEventListener("message",({source:o,data:s})=>{o===BD&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),BD.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O0(BD.postMessage)),jar=typeof queueMicrotask<"u"?queueMicrotask.bind(BD):typeof process<"u"&&process.nextTick||Q6e,Mar=t=>t!=null&&O0(t[VG]),lt={isArray:DD,isArrayBuffer:O6e,isBuffer:OF,isFormData:uar,isArrayBufferView:Kor,isString:Xor,isNumber:F6e,isBoolean:Zor,isObject:Pq,isPlainObject:zG,isEmptyObject:ear,isReadableStream:par,isRequest:far,isResponse:dar,isHeaders:har,isUndefined:NF,isDate:tar,isFile:rar,isReactNativeBlob:nar,isReactNative:iar,isBlob:sar,isRegExp:Tar,isFunction:O0,isStream:aar,isURLSearchParams:lar,isTypedArray:war,isFileList:oar,forEach:Rq,merge:Upe,extend:gar,trim:mar,stripBOM:Aar,inherits:yar,toFlatObject:xar,kindOf:GG,kindOfTest:Cb,endsWith:bar,toArray:Ear,forEachEntry:_ar,matchAll:Sar,isHTMLForm:Car,hasOwnProperty:$pe,hasOwnProp:$pe,reduceDescriptors:M6e,freezeMethods:Bar,toObjectSet:Dar,toCamelCase:Iar,noop:Par,toFiniteNumber:Rar,findKey:L6e,global:BD,isContextDefined:j6e,isSpecCompliantForm:Nar,toJSONObject:Oar,isAsyncFn:Far,isThenable:Lar,setImmediate:Q6e,asap:jar,isIterable:Mar};var Qar=lt.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"]),q6e=t=>{let e={},r,n,o;return t&&t.split(`
|
|
569
|
+
`,"f"),ci(this,md,Ve(this,md,"f")+e.join(" "),"f")}}}[kue](e){lF(Ve(this,Bi,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=Ve(this,Bi,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete Ve(this,Ls,"f").getDescriptions()[e]}[B3e](e,r,n){Ve(this,GV,"f")[n]||(Ve(this,xs,"f").process.emitWarning(e,r),Ve(this,GV,"f")[n]=!0)}[D3e](){Ve(this,WV,"f").push({options:Ve(this,Bi,"f"),configObjects:Ve(this,Bi,"f").configObjects.slice(0),exitProcess:Ve(this,Sv,"f"),groups:Ve(this,Mw,"f"),strict:Ve(this,dD,"f"),strictCommands:Ve(this,hD,"f"),strictOptions:Ve(this,mD,"f"),completionCommand:Ve(this,JA,"f"),output:Ve(this,md,"f"),exitError:Ve(this,JI,"f"),hasOutput:Ve(this,KA,"f"),parsed:this.parsed,parseFn:Ve(this,XA,"f"),parseContext:Ve(this,pD,"f")}),Ve(this,Ls,"f").freeze(),Ve(this,cp,"f").freeze(),Ve(this,Fp,"f").freeze(),Ve(this,Cv,"f").freeze()}[P3e](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Ve(this,xs,"f").process.argv()[0])?r=Ve(this,xs,"f").process.argv().slice(1,2):r=Ve(this,xs,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[H3e](Ve(this,uD,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),Ve(this,xs,"f").getEnv("_")&&Ve(this,xs,"f").getProcessArgvBin()===Ve(this,xs,"f").getEnv("_")&&(e=Ve(this,xs,"f").getEnv("_").replace(`${Ve(this,xs,"f").path.dirname(Ve(this,xs,"f").process.execPath())}/`,"")),e}[gD](){return Ve(this,KV,"f")}[R3e](){return Ve(this,ZV,"f")}[Tue](){if(!Ve(this,lD,"f"))return;let e=Ve(this,xs,"f").getEnv("LC_ALL")||Ve(this,xs,"f").getEnv("LC_MESSAGES")||Ve(this,xs,"f").getEnv("LANG")||Ve(this,xs,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[N3e](){return this[Bue]().version||"unknown"}[O3e](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)Ve(this,xs,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Bue](e){let r=e||"*";if(Ve(this,dF,"f")[r])return Ve(this,dF,"f")[r];let n={};try{let o=e||Ve(this,xs,"f").mainFilename;!e&&Ve(this,xs,"f").path.extname(o)&&(o=Ve(this,xs,"f").path.dirname(o));let s=Ve(this,xs,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});ig(s,void 0,Ve(this,xs,"f")),n=JSON.parse(Ve(this,xs,"f").readFileSync(s,"utf8"))}catch{}return Ve(this,dF,"f")[r]=n||{},Ve(this,dF,"f")[r]}[XI](e,r){r=[].concat(r),r.forEach(n=>{n=this[Rue](n),Ve(this,Bi,"f")[e].push(n)})}[hF](e,r,n,o){this[Pue](e,r,n,o,(s,c,u)=>{Ve(this,Bi,"f")[s][c]=u})}[Due](e,r,n,o){this[Pue](e,r,n,o,(s,c,u)=>{Ve(this,Bi,"f")[s][c]=(Ve(this,Bi,"f")[s][c]||[]).concat(u)})}[Pue](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of lF(n))e(c,n[c]);else s(r,this[Rue](n),o)}[Rue](e){return e==="__proto__"?"___proto___":e}[Nue](e,r){return this[hF](this[Nue].bind(this),"key",e,r),this}[Oue](){var e,r,n,o,s,c,u,p,f,h,g,y;let v=Ve(this,WV,"f").pop();ig(v,void 0,Ve(this,xs,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(S){ci(e,Bi,S,"f")}}.value,configObjects:A,exitProcess:{set value(S){ci(r,Sv,S,"f")}}.value,groups:{set value(S){ci(n,Mw,S,"f")}}.value,output:{set value(S){ci(o,md,S,"f")}}.value,exitError:{set value(S){ci(s,JI,S,"f")}}.value,hasOutput:{set value(S){ci(c,KA,S,"f")}}.value,parsed:this.parsed,strict:{set value(S){ci(u,dD,S,"f")}}.value,strictCommands:{set value(S){ci(p,hD,S,"f")}}.value,strictOptions:{set value(S){ci(f,mD,S,"f")}}.value,completionCommand:{set value(S){ci(h,JA,S,"f")}}.value,parseFn:{set value(S){ci(g,XA,S,"f")}}.value,parseContext:{set value(S){ci(y,pD,S,"f")}}.value}=v,Ve(this,Bi,"f").configObjects=A,Ve(this,Ls,"f").unfreeze(),Ve(this,cp,"f").unfreeze(),Ve(this,Fp,"f").unfreeze(),Ve(this,Cv,"f").unfreeze()}[F3e](e,r){return cD(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[L3e].bind(this),getContext:this[j3e].bind(this),getHasOutput:this[M3e].bind(this),getLoggerInstance:this[Q3e].bind(this),getParseContext:this[q3e].bind(this),getParserConfiguration:this[gD].bind(this),getUsageConfiguration:this[R3e].bind(this),getUsageInstance:this[U3e].bind(this),getValidationInstance:this[$3e].bind(this),hasParseCallback:this[eG].bind(this),isGlobalContext:this[z3e].bind(this),postProcess:this[AD].bind(this),reset:this[Fue].bind(this),runValidation:this[Lue].bind(this),runYargsParserAndExecuteCommands:this[R8].bind(this),setHasOutput:this[V3e].bind(this)}}[L3e](){return Ve(this,Fp,"f")}[j3e](){return Ve(this,P8,"f")}[M3e](){return Ve(this,KA,"f")}[Q3e](){return Ve(this,fF,"f")}[q3e](){return Ve(this,pD,"f")||{}}[U3e](){return Ve(this,Ls,"f")}[$3e](){return Ve(this,cp,"f")}[eG](){return!!Ve(this,XA,"f")}[z3e](){return Ve(this,YV,"f")}[AD](e,r,n,o){return n||Lu(e)||(r||(e=this[k3e](e)),(this[gD]()["parse-positional-numbers"]||this[gD]()["parse-positional-numbers"]===void 0)&&(e=this[O3e](e)),o&&(e=aD(e,this,Ve(this,Cv,"f").getMiddleware(),!1))),e}[Fue](e={}){ci(this,Bi,Ve(this,Bi,"f")||{},"f");let r={};r.local=Ve(this,Bi,"f").local||[],r.configObjects=Ve(this,Bi,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(Ve(this,fD,"f"),Object.keys(Ve(this,Mw,"f")).reduce((c,u)=>{let p=Ve(this,Mw,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),ci(this,Mw,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(Ve(this,Bi,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=WI(Ve(this,Bi,"f")[c],u=>!n[u])}),r.envPrefix=Ve(this,Bi,"f").envPrefix,ci(this,Bi,r,"f"),ci(this,Ls,Ve(this,Ls,"f")?Ve(this,Ls,"f").reset(n):b3e(this,Ve(this,xs,"f")),"f"),ci(this,cp,Ve(this,cp,"f")?Ve(this,cp,"f").reset(n):I3e(this,Ve(this,Ls,"f"),Ve(this,xs,"f")),"f"),ci(this,Fp,Ve(this,Fp,"f")?Ve(this,Fp,"f").reset():y3e(Ve(this,Ls,"f"),Ve(this,cp,"f"),Ve(this,Cv,"f"),Ve(this,xs,"f")),"f"),Ve(this,_v,"f")||ci(this,_v,_3e(this,Ve(this,Ls,"f"),Ve(this,Fp,"f"),Ve(this,xs,"f")),"f"),Ve(this,Cv,"f").reset(),ci(this,JA,null,"f"),ci(this,md,"","f"),ci(this,JI,null,"f"),ci(this,KA,!1,"f"),this.parsed=!1,this}[H3e](e,r){return Ve(this,xs,"f").path.relative(e,r)}[R8](e,r,n,o=0,s=!1){let c=!!n||s;e=e||Ve(this,KI,"f"),Ve(this,Bi,"f").__=Ve(this,xs,"f").y18n.__,Ve(this,Bi,"f").configuration=this[gD]();let u=!!Ve(this,Bi,"f").configuration["populate--"],p=Object.assign({},Ve(this,Bi,"f").configuration,{"populate--":!0}),f=Ve(this,xs,"f").Parser.detailed(e,Object.assign({},Ve(this,Bi,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,Ve(this,pD,"f")),g,y=f.aliases,v=!1,A=!1;Object.keys(h).forEach(S=>{S===Ve(this,Iv,"f")&&h[S]?v=!0:S===Ve(this,Qw,"f")&&h[S]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&Ve(this,Ls,"f").clearCachedHelpMessage();try{if(this[Tue](),r)return this[AD](h,u,!!n,!1);Ve(this,Iv,"f")&&[Ve(this,Iv,"f")].concat(y[Ve(this,Iv,"f")]||[]).filter(j=>j.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),v=!0),ci(this,YV,!1,"f");let S=Ve(this,Fp,"f").getCommands(),E=Ve(this,_v,"f").completionKey in h,k=v||E||s;if(h._.length){if(S.length){let P;for(let j=o||0,L;h._[j]!==void 0;j++)if(L=String(h._[j]),S.includes(L)&&L!==Ve(this,JA,"f")){let z=Ve(this,Fp,"f").runCommand(L,this,f,j+1,s,v||A||s);return this[AD](z,u,!!n,!1)}else if(!P&&L!==Ve(this,JA,"f")){P=L;break}!Ve(this,Fp,"f").hasDefaultCommand()&&Ve(this,XV,"f")&&P&&!k&&Ve(this,cp,"f").recommendCommands(P,S)}Ve(this,JA,"f")&&h._.includes(Ve(this,JA,"f"))&&!E&&(Ve(this,Sv,"f")&&YI(!0),this.showCompletionScript(),this.exit(0))}if(Ve(this,Fp,"f").hasDefaultCommand()&&!k){let P=Ve(this,Fp,"f").runCommand(null,this,f,0,s,v||A||s);return this[AD](P,u,!!n,!1)}if(E){Ve(this,Sv,"f")&&YI(!0),e=[].concat(e);let P=e.slice(e.indexOf(`--${Ve(this,_v,"f").completionKey}`)+1);return Ve(this,_v,"f").getCompletion(P,(j,L)=>{if(j)throw new Fu(j.message);(L||[]).forEach(z=>{Ve(this,fF,"f").log(z)}),this.exit(0)}),this[AD](h,!u,!!n,!1)}if(Ve(this,KA,"f")||(v?(Ve(this,Sv,"f")&&YI(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(Ve(this,Sv,"f")&&YI(!0),c=!0,Ve(this,Ls,"f").showVersion("log"),this.exit(0))),!c&&Ve(this,Bi,"f").skipValidation.length>0&&(c=Object.keys(h).some(P=>Ve(this,Bi,"f").skipValidation.indexOf(P)>=0&&h[P]===!0)),!c){if(f.error)throw new Fu(f.error.message);if(!E){let P=this[Lue](y,{},f.error);n||(g=aD(h,this,Ve(this,Cv,"f").getMiddleware(),!0)),g=this[F3e](P,g!=null?g:h),Lu(g)&&!n&&(g=g.then(()=>aD(h,this,Ve(this,Cv,"f").getMiddleware(),!1)))}}}catch(S){if(S instanceof Fu)Ve(this,Ls,"f").fail(S.message,S);else throw S}return this[AD](g!=null?g:h,u,!!n,!0)}[Lue](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Fu(n.message);Ve(this,cp,"f").nonOptionCount(c),Ve(this,cp,"f").requiredArguments(c,s);let u=!1;Ve(this,hD,"f")&&(u=Ve(this,cp,"f").unknownCommands(c)),Ve(this,dD,"f")&&!u?Ve(this,cp,"f").unknownArguments(c,e,r,!!o):Ve(this,mD,"f")&&Ve(this,cp,"f").unknownArguments(c,e,{},!1,!1),Ve(this,cp,"f").limitedChoices(c),Ve(this,cp,"f").implications(c),Ve(this,cp,"f").conflicting(c)}}[V3e](){ci(this,KA,!0,"f")}[yD](e){if(typeof e=="string")Ve(this,Bi,"f").key[e]=!0;else for(let r of e)Ve(this,Bi,"f").key[r]=!0}};function v3e(t){return!!t&&typeof t.getInternalMethods=="function"}var Ytr=G3e(Eue),W3e=Ytr;var Ab={name:"edgeone",version:"1.6.14-beta.8",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/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],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 prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/nuxt-pages":"1.1.0","@edgeone/opennextjs-pages":"0.2.10","@edgeone/pages-agent-toolkit":"^0.1.34","@edgeone/pages-blob":"^0.0.13",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",giget:"^2.0.0","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","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.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",protobufjs:"^8.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 Ode=Pt(Wc()),Fde=Pt(DF()),Lde=Pt(qpe());function Dq(t,e){return function(){return t.apply(e,arguments)}}var{toString:Jor}=Object.prototype,{getPrototypeOf:HG}=Object,{iterator:VG,toStringTag:N6e}=Symbol,GG=(t=>e=>{let r=Jor.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cb=t=>(t=t.toLowerCase(),e=>GG(e)===t),WG=t=>e=>typeof e===t,{isArray:DD}=Array,NF=WG("undefined");function OF(t){return t!==null&&!NF(t)&&t.constructor!==null&&!NF(t.constructor)&&O0(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var O6e=Cb("ArrayBuffer");function Kor(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&O6e(t.buffer),e}var Xor=WG("string"),O0=WG("function"),F6e=WG("number"),Pq=t=>t!==null&&typeof t=="object",Zor=t=>t===!0||t===!1,zG=t=>{if(GG(t)!=="object")return!1;let e=HG(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(N6e in t)&&!(VG in t)},ear=t=>{if(!Pq(t)||OF(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},tar=Cb("Date"),rar=Cb("File"),nar=t=>!!(t&&typeof t.uri<"u"),iar=t=>t&&typeof t.getParts<"u",sar=Cb("Blob"),oar=Cb("FileList"),aar=t=>Pq(t)&&O0(t.pipe);function car(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var P6e=car(),R6e=typeof P6e.FormData<"u"?P6e.FormData:void 0,uar=t=>{if(!t)return!1;if(R6e&&t instanceof R6e)return!0;let e=HG(t);if(!e||e===Object.prototype||!O0(t.append))return!1;let r=GG(t);return r==="formdata"||r==="object"&&O0(t.toString)&&t.toString()==="[object FormData]"},lar=Cb("URLSearchParams"),[par,far,dar,har]=["ReadableStream","Request","Response","Headers"].map(Cb),mar=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rq(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),DD(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(OF(t))return;let s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length,u;for(n=0;n<c;n++)u=s[n],e.call(null,t[u],u,t)}}function L6e(t,e){if(OF(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var BD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,j6e=t=>!NF(t)&&t!==BD;function Upe(...t){let{caseless:e,skipUndefined:r}=j6e(this)&&this||{},n={},o=(s,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;let u=e&&typeof c=="string"&&L6e(n,c)||c,p=$pe(n,u)?n[u]:void 0;zG(p)&&zG(s)?n[u]=Upe(p,s):zG(s)?n[u]=Upe({},s):DD(s)?n[u]=s.slice():(!r||!NF(s))&&(n[u]=s)};for(let s=0,c=t.length;s<c;s++){let u=t[s];if(!u||OF(u)||(Rq(u,o),typeof u!="object"||DD(u)))continue;let p=Object.getOwnPropertySymbols(u);for(let f=0;f<p.length;f++){let h=p[f];kar.call(u,h)&&o(u[h],h)}}return n}var gar=(t,e,r,{allOwnKeys:n}={})=>(Rq(e,(o,s)=>{r&&O0(o)?Object.defineProperty(t,s,{__proto__:null,value:Dq(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Aar=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),yar=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},xar=(t,e,r,n)=>{let o,s,c,u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!u[c]&&(e[c]=t[c],u[c]=!0);t=r!==!1&&HG(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},bar=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Ear=t=>{if(!t)return null;if(DD(t))return t;let e=t.length;if(!F6e(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},war=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&HG(Uint8Array)),_ar=(t,e)=>{let n=(t&&t[VG]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},Sar=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Car=Cb("HTMLFormElement"),Iar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),$pe=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),{propertyIsEnumerable:kar}=Object.prototype,Tar=Cb("RegExp"),M6e=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Rq(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},Bar=t=>{M6e(t,(e,r)=>{if(O0(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(O0(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Dar=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return DD(t)?n(t):n(String(t).split(e)),r},Par=()=>{},Rar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Nar(t){return!!(t&&O0(t.append)&&t[N6e]==="FormData"&&t[VG])}var Oar=t=>{let e=new WeakSet,r=n=>{if(Pq(n)){if(e.has(n))return;if(OF(n))return n;if(!("toJSON"in n)){e.add(n);let o=DD(n)?[]:{};return Rq(n,(s,c)=>{let u=r(s);!NF(u)&&(o[c]=u)}),e.delete(n),o}}return n};return r(t)},Far=Cb("AsyncFunction"),Lar=t=>t&&(Pq(t)||O0(t))&&O0(t.then)&&O0(t.catch),Q6e=((t,e)=>t?setImmediate:e?((r,n)=>(BD.addEventListener("message",({source:o,data:s})=>{o===BD&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),BD.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O0(BD.postMessage)),jar=typeof queueMicrotask<"u"?queueMicrotask.bind(BD):typeof process<"u"&&process.nextTick||Q6e,Mar=t=>t!=null&&O0(t[VG]),lt={isArray:DD,isArrayBuffer:O6e,isBuffer:OF,isFormData:uar,isArrayBufferView:Kor,isString:Xor,isNumber:F6e,isBoolean:Zor,isObject:Pq,isPlainObject:zG,isEmptyObject:ear,isReadableStream:par,isRequest:far,isResponse:dar,isHeaders:har,isUndefined:NF,isDate:tar,isFile:rar,isReactNativeBlob:nar,isReactNative:iar,isBlob:sar,isRegExp:Tar,isFunction:O0,isStream:aar,isURLSearchParams:lar,isTypedArray:war,isFileList:oar,forEach:Rq,merge:Upe,extend:gar,trim:mar,stripBOM:Aar,inherits:yar,toFlatObject:xar,kindOf:GG,kindOfTest:Cb,endsWith:bar,toArray:Ear,forEachEntry:_ar,matchAll:Sar,isHTMLForm:Car,hasOwnProperty:$pe,hasOwnProp:$pe,reduceDescriptors:M6e,freezeMethods:Bar,toObjectSet:Dar,toCamelCase:Iar,noop:Par,toFiniteNumber:Rar,findKey:L6e,global:BD,isContextDefined:j6e,isSpecCompliantForm:Nar,toJSONObject:Oar,isAsyncFn:Far,isThenable:Lar,setImmediate:Q6e,asap:jar,isIterable:Mar};var Qar=lt.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"]),q6e=t=>{let e={},r,n,o;return t&&t.split(`
|
|
570
570
|
`).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim(),!(!r||e[r]&&Qar[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};function qar(t){let e=0,r=t.length;for(;e<r;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;r>e;){let n=t.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}var Uar=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),$ar=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function zpe(t,e){return lt.isArray(t)?t.map(r=>zpe(r,e)):qar(String(t).replace(e,""))}var U6e=t=>zpe(t,Uar),zar=t=>zpe(t,$ar);function FF(t){let e=Object.create(null);return lt.forEach(t.toJSON(),(r,n)=>{e[n]=zar(r)}),e}var $6e=Symbol("internals");function Nq(t){return t&&String(t).trim().toLowerCase()}function YG(t){return t===!1||t==null?t:lt.isArray(t)?t.map(YG):U6e(String(t))}function Har(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var Var=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Hpe(t,e,r,n,o){if(lt.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!lt.isString(e)){if(lt.isString(n))return e.indexOf(n)!==-1;if(lt.isRegExp(n))return n.test(e)}}function Gar(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function War(t,e){let r=lt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{__proto__:null,value:function(o,s,c){return this[n].call(this,e,o,s,c)},configurable:!0})})}var LF=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function s(u,p,f){let h=Nq(p);if(!h)return;let g=lt.findKey(o,h);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||p]=YG(u))}let c=(u,p)=>lt.forEach(u,(f,h)=>s(f,h,p));if(lt.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(lt.isString(e)&&(e=e.trim())&&!Var(e))c(q6e(e),r);else if(lt.isObject(e)&<.isIterable(e)){let u={},p,f;for(let h of e){if(!lt.isArray(h))throw new TypeError("Object iterator must return a key-value pair");u[f=h[0]]=(p=u[f])?lt.isArray(p)?[...p,h[1]]:[p,h[1]]:h[1]}c(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Nq(e),e){let n=lt.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return Har(o);if(lt.isFunction(r))return r.call(this,o,n);if(lt.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Nq(e),e){let n=lt.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Hpe(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function s(c){if(c=Nq(c),c){let u=lt.findKey(n,c);u&&(!r||Hpe(n,n[u],u,r))&&(delete n[u],o=!0)}}return lt.isArray(e)?e.forEach(s):s(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let s=r[n];(!e||Hpe(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){let r=this,n={};return lt.forEach(this,(o,s)=>{let c=lt.findKey(n,s);if(c){r[c]=YG(o),delete r[s];return}let u=e?Gar(s):String(s).trim();u!==s&&delete r[s],r[u]=YG(o),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return lt.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&<.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
571
571
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[$6e]=this[$6e]={accessors:{}}).accessors,o=this.prototype;function s(c){let u=Nq(c);n[u]||(War(o,c),n[u]=!0)}return lt.isArray(e)?e.forEach(s):s(e),this}};LF.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);lt.reduceDescriptors(LF.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});lt.freezeMethods(LF);var Mu=LF;var Yar="[REDACTED ****]";function Jar(t){if(lt.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(lt.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Kar(t,e){let r=new Set(e.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||lt.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof Mu&&(s=s.toJSON()),n.push(s);let c;if(lt.isArray(s))c=[],s.forEach((u,p)=>{let f=o(u);lt.isUndefined(f)||(c[p]=f)});else{if(!lt.isPlainObject(s)&&Jar(s))return n.pop(),s;c=Object.create(null);for(let[u,p]of Object.entries(s)){let f=r.has(u.toLowerCase())?Yar:o(p);lt.isUndefined(f)||(c[u]=f)}}return n.pop(),c};return o(t)}var fh=class t extends Error{static from(e,r,n,o,s,c){let u=new t(e.message,r||e.code,n,o,s);return u.cause=e,u.name=e.name,e.status!=null&&u.status==null&&(u.status=e.status),c&&Object.assign(u,c),u}constructor(e,r,n,o,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){let e=this.config,r=e&<.hasOwnProp(e,"redact")?e.redact:void 0,n=lt.isArray(r)&&r.length>0?Kar(e,r):lt.toJSONObject(e);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:n,code:this.code,status:this.status}}};fh.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";fh.ERR_BAD_OPTION="ERR_BAD_OPTION";fh.ECONNABORTED="ECONNABORTED";fh.ETIMEDOUT="ETIMEDOUT";fh.ECONNREFUSED="ECONNREFUSED";fh.ERR_NETWORK="ERR_NETWORK";fh.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";fh.ERR_DEPRECATED="ERR_DEPRECATED";fh.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";fh.ERR_BAD_REQUEST="ERR_BAD_REQUEST";fh.ERR_CANCELED="ERR_CANCELED";fh.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";fh.ERR_INVALID_URL="ERR_INVALID_URL";fh.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Jr=fh;var H5e=Pt(z5e(),1),aW=H5e.default;function dfe(t){return lt.isPlainObject(t)||lt.isArray(t)}function V5e(t){return lt.endsWith(t,"[]")?t.slice(0,-2):t}function ffe(t,e,r){return t?t.concat(e).map(function(o,s){return o=V5e(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function Fur(t){return lt.isArray(t)&&!t.some(dfe)}var Lur=lt.toFlatObject(lt,{},null,function(e){return/^is[A-Z]/.test(e)});function jur(t,e,r){if(!lt.isObject(t))throw new TypeError("target must be an object");e=e||new(aW||FormData),r=lt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,k){return!lt.isUndefined(k[E])});let n=r.metaTokens,o=r.visitor||g,s=r.dots,c=r.indexes,u=r.Blob||typeof Blob<"u"&&Blob,p=r.maxDepth===void 0?100:r.maxDepth,f=u&<.isSpecCompliantForm(e);if(!lt.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(lt.isDate(S))return S.toISOString();if(lt.isBoolean(S))return S.toString();if(!f&<.isBlob(S))throw new Jr("Blob is not supported. Use a Buffer instead.");return lt.isArrayBuffer(S)||lt.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,E,k){let P=S;if(lt.isReactNative(e)&<.isReactNativeBlob(S))return e.append(ffe(k,E,s),h(S)),!1;if(S&&!k&&typeof S=="object"){if(lt.endsWith(E,"{}"))E=n?E:E.slice(0,-2),S=JSON.stringify(S);else if(lt.isArray(S)&&Fur(S)||(lt.isFileList(S)||lt.endsWith(E,"[]"))&&(P=lt.toArray(S)))return E=V5e(E),P.forEach(function(L,z){!(lt.isUndefined(L)||L===null)&&e.append(c===!0?ffe([E],z,s):c===null?E:E+"[]",h(L))}),!1}return dfe(S)?!0:(e.append(ffe(k,E,s),h(S)),!1)}let y=[],v=Object.assign(Lur,{defaultVisitor:g,convertValue:h,isVisitable:dfe});function A(S,E,k=0){if(!lt.isUndefined(S)){if(k>p)throw new Jr("Object is too deeply nested ("+k+" levels). Max depth: "+p,Jr.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(S)!==-1)throw new Error("Circular reference detected in "+E.join("."));y.push(S),lt.forEach(S,function(j,L){(!(lt.isUndefined(j)||j===null)&&o.call(e,j,lt.isString(L)?L.trim():L,E,v))===!0&&A(j,E?E.concat(L):[L],k+1)}),y.pop()}}if(!lt.isObject(t))throw new TypeError("data must be an object");return A(t),e}var sk=jur;function G5e(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function W5e(t,e){this._pairs=[],t&&sk(t,this,e)}var Y5e=W5e.prototype;Y5e.append=function(e,r){this._pairs.push([e,r])};Y5e.toString=function(e){let r=e?function(n){return e.call(this,n,G5e)}:G5e;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var J5e=W5e;function Mur(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function RD(t,e,r){if(!e)return t;let n=r&&r.encode||Mur,o=lt.isFunction(r)?{serialize:r}:r,s=o&&o.serialize,c;if(s?c=s(e,o):c=lt.isURLSearchParams(e)?e.toString():new J5e(e,o).toString(n),c){let u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}var hfe=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){lt.forEach(this.handlers,function(n){n!==null&&e(n)})}},mfe=hfe;var ok={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1};var e9e=Pt(require("crypto"),1);var K5e=Pt(require("url"),1),X5e=K5e.default.URLSearchParams;var gfe="abcdefghijklmnopqrstuvwxyz",Z5e="0123456789",t9e={DIGIT:Z5e,ALPHA:gfe,ALPHA_DIGIT:gfe+gfe.toUpperCase()+Z5e},Qur=(t=16,e=t9e.ALPHA_DIGIT)=>{let r="",{length:n}=e,o=new Uint32Array(t);e9e.default.randomFillSync(o);for(let s=0;s<t;s++)r+=e[o[s]%n];return r},r9e={isNode:!0,classes:{URLSearchParams:X5e,FormData:aW,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:t9e,generateString:Qur,protocols:["http","https","file","data"]};var vfe={};uue(vfe,{hasBrowserEnv:()=>yfe,hasStandardBrowserEnv:()=>qur,hasStandardBrowserWebWorkerEnv:()=>Uur,navigator:()=>Afe,origin:()=>$ur});var yfe=typeof window<"u"&&typeof document<"u",Afe=typeof navigator=="object"&&navigator||void 0,qur=yfe&&(!Afe||["ReactNative","NativeScript","NS"].indexOf(Afe.product)<0),Uur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$ur=yfe&&window.location.href||"http://localhost";var Va={...vfe,...r9e};function xfe(t,e){return sk(t,new Va.classes.URLSearchParams,{visitor:function(r,n,o,s){return Va.isNode&<.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function zur(t){return lt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hur(t){let e={},r=Object.keys(t),n,o=r.length,s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function Vur(t){function e(r,n,o,s){let c=r[s++];if(c==="__proto__")return!0;let u=Number.isFinite(+c),p=s>=r.length;return c=!c&<.isArray(o)?o.length:c,p?(lt.hasOwnProp(o,c)?o[c]=lt.isArray(o[c])?o[c].concat(n):[o[c],n]:o[c]=n,!u):((!lt.hasOwnProp(o,c)||!lt.isObject(o[c]))&&(o[c]=[]),e(r,n,o[c],s)&<.isArray(o[c])&&(o[c]=Hur(o[c])),!u)}if(lt.isFormData(t)&<.isFunction(t.entries)){let r={};return lt.forEachEntry(t,(n,o)=>{e(zur(n),o,r,0)}),r}return null}var cW=Vur;var UF=(t,e)=>t!=null&<.hasOwnProp(t,e)?t[e]:void 0;function Gur(t,e,r){if(lt.isString(t))try{return(e||JSON.parse)(t),lt.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var bfe={transitional:ok,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=lt.isObject(e);if(s&<.isHTMLForm(e)&&(e=new FormData(e)),lt.isFormData(e))return o?JSON.stringify(cW(e)):e;if(lt.isArrayBuffer(e)||lt.isBuffer(e)||lt.isStream(e)||lt.isFile(e)||lt.isBlob(e)||lt.isReadableStream(e))return e;if(lt.isArrayBufferView(e))return e.buffer;if(lt.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){let p=UF(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return xfe(e,p).toString();if((u=lt.isFileList(e))||n.indexOf("multipart/form-data")>-1){let f=UF(this,"env"),h=f&&f.FormData;return sk(u?{"files[]":e}:e,h&&new h,p)}}return s||o?(r.setContentType("application/json",!1),Gur(e)):e}],transformResponse:[function(e){let r=UF(this,"transitional")||bfe.transitional,n=r&&r.forcedJSONParsing,o=UF(this,"responseType"),s=o==="json";if(lt.isResponse(e)||lt.isReadableStream(e))return e;if(e&<.isString(e)&&(n&&!o||s)){let u=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,UF(this,"parseReviver"))}catch(p){if(u)throw p.name==="SyntaxError"?Jr.from(p,Jr.ERR_BAD_RESPONSE,this,null,UF(this,"response")):p}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Va.classes.FormData,Blob:Va.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};lt.forEach(["delete","get","head","post","put","patch","query"],t=>{bfe.headers[t]={}});var $F=bfe;function Mq(t,e){let r=this||$F,n=e||r,o=Mu.from(n.headers),s=n.data;return lt.forEach(t,function(u){s=u.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Qq(t){return!!(t&&t.__CANCEL__)}var Efe=class extends Jr{constructor(e,r,n){super(e==null?"canceled":e,Jr.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},ty=Efe;function Hw(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Jr("Request failed with status code "+r.status,r.status>=400&&r.status<500?Jr.ERR_BAD_REQUEST:Jr.ERR_BAD_RESPONSE,r.config,r.request,r))}function wfe(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function _fe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ND(t,e,r){let n=!wfe(e);return t&&(n||r===!1)?_fe(t,e):e}var Wur={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Yur(t){try{return new URL(t)}catch{return null}}function n9e(t){var e=(typeof t=="string"?Yur(t):t)||{},r=e.protocol,n=e.host,o=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),o=parseInt(o)||Wur[r]||0,!Jur(n,o)))return"";var s=Sfe(r+"_proxy")||Sfe("all_proxy");return s&&s.indexOf("://")===-1&&(s=r+"://"+s),s}function Jur(t,e){var r=Sfe("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var o=n.match(/^(.+):(\d+)$/),s=o?o[1]:n,c=o?parseInt(o[2]):0;return c&&c!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!t.endsWith(s)):t!==s}):!0}function Sfe(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var nde=Pt(v9e(),1),Y9e=Pt(require("http"),1),J9e=Pt(require("https"),1),K9e=Pt(require("http2"),1),X9e=Pt(require("util"),1),rde=require("path"),Z9e=Pt(Gfe(),1),ry=Pt(require("zlib"),1);var tC="1.17.0";function Yq(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var Jlr=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function Wfe(t,e,r){let n=r&&r.Blob||Va.classes.Blob,o=Yq(t);if(e===void 0&&n&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let s=Jlr.exec(t);if(!s)throw new Jr("Invalid URL",Jr.ERR_INVALID_URL);let c=s[1],u=s[2],p=s[3]?"base64":"utf8",f=s[4],h;c?h=u?c+u:c:u&&(h="text/plain"+u);let g=Buffer.from(decodeURIComponent(f),p);if(e){if(!n)throw new Jr("Blob is not supported",Jr.ERR_NOT_SUPPORT);return new n([g],{type:h})}return g}throw new Jr("Unsupported protocol "+o,Jr.ERR_NOT_SUPPORT)}var Pv=Pt(require("stream"),1);var C9e=Pt(require("stream"),1);var Yfe=Symbol("internals"),Jfe=class extends C9e.default.Transform{constructor(e){e=lt.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,o)=>!lt.isUndefined(o[n])),super({readableHighWaterMark:e.chunkSize});let r=this[Yfe]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.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(e){let r=this[Yfe];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let o=this[Yfe],s=o.maxRate,c=this.readableHighWaterMark,u=o.timeWindow,p=1e3/u,f=s/p,h=o.minChunkSize!==!1?Math.max(o.minChunkSize,f*.01):0,g=(v,A)=>{let S=Buffer.byteLength(v);o.bytesSeen+=S,o.bytes+=S,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(v)?process.nextTick(A):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(A)}},y=(v,A)=>{let S=Buffer.byteLength(v),E=null,k=c,P,j=0;if(s){let L=Date.now();(!o.ts||(j=L-o.ts)>=u)&&(o.ts=L,P=f-o.bytes,o.bytes=P<0?-P:0,j=0),P=f-o.bytes}if(s){if(P<=0)return setTimeout(()=>{A(null,v)},u-j);P<k&&(k=P)}k&&S>k&&S-k>h&&(E=v.subarray(k),v=v.subarray(0,k)),g(v,E?()=>{process.nextTick(A,null,E)}:A)};y(e,function v(A,S){if(A)return n(A);S?y(S,v):n(null)})}},Kfe=Jfe;var e7e=require("events");var k9e=Pt(require("util"),1),T9e=require("stream");var{asyncIterator:I9e}=Symbol,Klr=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[I9e]?yield*t[I9e]():yield t},hW=Klr;var Xlr=Va.ALPHABET.ALPHA_DIGIT+"-_",Jq=typeof TextEncoder=="function"?new TextEncoder:new k9e.default.TextEncoder,QD=`\r
|
|
572
572
|
`,Zlr=Jq.encode(QD),epr=2,Xfe=class{constructor(e,r){let{escapeName:n}=this.constructor,o=lt.isString(r),s=`Content-Disposition: form-data; name="${n(e)}"${!o&&r.name?`; filename="${n(r.name)}"`:""}${QD}`;if(o)r=Jq.encode(String(r).replace(/\r?\n|\r\n?/g,QD));else{let c=String(r.type||"application/octet-stream").replace(/[\r\n]/g,"");s+=`Content-Type: ${c}${QD}`}this.headers=Jq.encode(s+QD),this.contentLength=o?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+epr,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;lt.isTypedArray(e)?yield e:yield*hW(e),yield Zlr}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},tpr=(t,e,r)=>{let{tag:n="form-data-boundary",size:o=25,boundary:s=n+"-"+Va.generateString(o,Xlr)}=r||{};if(!lt.isFormData(t))throw new TypeError("FormData instance required");if(s.length<1||s.length>70)throw new Error("boundary must be 1-70 characters long");let c=Jq.encode("--"+s+QD),u=Jq.encode("--"+s+"--"+QD),p=u.byteLength,f=Array.from(t.entries()).map(([g,y])=>{let v=new Xfe(g,y);return p+=v.size,v});p+=c.byteLength*f.length,p=lt.toFiniteNumber(p);let h={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(p)&&(h["Content-Length"]=p),e&&e(h),T9e.Readable.from(async function*(){for(let g of f)yield c,yield*g.encode();yield u}())},B9e=tpr;var D9e=Pt(require("stream"),1),Zfe=class extends D9e.default.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,r)}this.__transform(e,r,n)}},P9e=Zfe;var R9e=Pt(require("http2"),1),N9e=Pt(require("util"),1),ede=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let g=n.length;for(let y=0;y<g;y++){let[v,A]=n[y];if(!v.destroyed&&!v.closed&&N9e.default.isDeepStrictEqual(A,r))return v}}let o=R9e.default.connect(e,r),s,c,u=()=>{if(s)return;s=!0,c&&(clearTimeout(c),c=null);let g=n,y=g.length,v=y;for(;v--;)if(g[v][0]===o){y===1?delete this.sessions[e]:g.splice(v,1),o.closed||o.close();return}},p=o.request,{sessionTimeout:f}=r;if(f!=null){let g=0;o.request=function(){let y=p.apply(this,arguments);return g++,c&&(clearTimeout(c),c=null),y.once("close",()=>{--g||(c=setTimeout(()=>{c=null,u()},f))}),y}}o.once("close",u);let h=[o,r];return n?n.push(h):n=this.sessions[e]=[h],o}},O9e=ede;var rpr=(t,e)=>lt.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(o=>{try{e?n(null,...e(o)):n(null,o)}catch(s){n(s)}},n)}:t,F9e=rpr;var npr=new Set(["localhost"]),M9e=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(r=>/^\d+$/.test(r)&&Number(r)>=0&&Number(r)<=255)},ipr=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return M9e(e[1]);let r=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(r){let o=parseInt(r[1],16);return o>=32512&&o<=32767}let n=t.split(":");if(n.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(n[o]))return!1;return/^0*1$/.test(n[7])}return!1},L9e=t=>t?npr.has(t)||M9e(t)?!0:ipr(t):!1,spr={http:80,https:443,ws:80,wss:443,ftp:21},opr=t=>{let e=t,r=0;if(e.charAt(0)==="["){let s=e.indexOf("]");if(s!==-1){let c=e.slice(1,s),u=e.slice(s+1);return u.charAt(0)===":"&&/^\d+$/.test(u.slice(1))&&(r=Number.parseInt(u.slice(1),10)),[c,r]}}let n=e.indexOf(":"),o=e.lastIndexOf(":");return n!==-1&&n===o&&/^\d+$/.test(e.slice(o+1))&&(r=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,r]},apr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,cpr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,upr=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(apr);if(e)return e[1];let r=t.match(cpr);if(r){let n=parseInt(r[1],16),o=parseInt(r[2],16);return`${n>>8}.${n&255}.${o>>8}.${o&255}`}return t},j9e=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),upr(t.replace(/\.+$/,"")));function tde(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||spr[e.protocol.split(":",1)[0]]||0,o=j9e(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(s=>{if(!s)return!1;let[c,u]=opr(s);return c=j9e(c),!c||u&&u!==n?!1:(c.charAt(0)==="*"&&(c=c.slice(1)),c.charAt(0)==="."?o.endsWith(c):o===c||L9e(o)&&L9e(c))})}function lpr(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,s=0,c;return e=e!==void 0?e:1e3,function(p){let f=Date.now(),h=n[s];c||(c=f),r[o]=p,n[o]=f;let g=s,y=0;for(;g!==o;)y+=r[g++],g=g%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),f-c<e)return;let v=h&&f-h;return v?Math.round(y*1e3/v):void 0}}var Q9e=lpr;function ppr(t,e){let r=0,n=1e3/e,o,s,c=(f,h=Date.now())=>{r=h,o=null,s&&(clearTimeout(s),s=null),t(...f)};return[(...f)=>{let h=Date.now(),g=h-r;g>=n?c(f,h):(o=f,s||(s=setTimeout(()=>{s=null,c(o)},n-g)))},()=>o&&c(o)]}var q9e=ppr;var rC=(t,e,r=3)=>{let n=0,o=Q9e(50,250);return q9e(s=>{if(!s||typeof s.loaded!="number")return;let c=s.loaded,u=s.lengthComputable?s.total:void 0,p=u!=null?Math.min(c,u):c,f=Math.max(0,p-n),h=o(f);n=Math.max(n,p);let g={loaded:p,total:u,progress:u?p/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u?(u-p)/h:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(g)},r)},WF=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},YF=t=>(...e)=>lt.asap(()=>t(...e));function Kq(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let c=n.length,u=n.length;for(let v=0;v<u;v++)if(n.charCodeAt(v)===37&&v+2<u){let A=n.charCodeAt(v+1),S=n.charCodeAt(v+2);(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(c-=2,v+=2)}let p=0,f=u-1,h=v=>v>=2&&n.charCodeAt(v-2)===37&&n.charCodeAt(v-1)===51&&(n.charCodeAt(v)===68||n.charCodeAt(v)===100);f>=0&&(n.charCodeAt(f)===61?(p++,f--):h(f)&&(p++,f-=3)),p===1&&f>=0&&(n.charCodeAt(f)===61||h(f))&&p++;let y=Math.floor(c/4)*3-(p||0);return y>0?y:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let c=0,u=n.length;c<u;c++){let p=n.charCodeAt(c);if(p<128)s+=1;else if(p<2048)s+=2;else if(p>=55296&&p<=56319&&c+1<u){let f=n.charCodeAt(c+1);f>=56320&&f<=57343?(s+=4,c++):s+=3}else s+=3}return s}var U9e={flush:ry.default.constants.Z_SYNC_FLUSH,finishFlush:ry.default.constants.Z_SYNC_FLUSH},fpr={flush:ry.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ry.default.constants.BROTLI_OPERATION_FLUSH},dpr={flush:ry.default.constants.ZSTD_e_flush,finishFlush:ry.default.constants.ZSTD_e_flush},t7e=lt.isFunction(ry.default.createBrotliDecompress),r7e=lt.isFunction(ry.default.createZstdDecompress),n7e="gzip, compress, deflate"+(t7e?", br":""),hpr=n7e+(r7e?", zstd":""),{http:mpr,https:gpr}=Z9e.default,i7e=/https:?/,Apr=["content-type","content-length"];function ypr(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{Apr.includes(n.toLowerCase())&&t.set(n,o)})}var $9e=Symbol("axios.http.socketListener"),mW=Symbol("axios.http.currentReq"),s7e=Symbol("axios.http.installedTunnel"),vpr=new Map,z9e=new WeakMap;function xpr(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?z9e.get(e)||z9e.set(e,new Map).get(e):vpr,o=n.get(r);if(o)return o;let s=e&&e.options?{...e.options,...t}:t;if(o=new nde.default(s),e&&e.options){let c={...e.options},u=o.callback;o.callback=function(f,h){return u.call(this,f,{...c,...h})}}return o[s7e]=!0,n.set(r,o),o}var H9e=Va.protocols.map(t=>t+":"),V9e=t=>{if(!lt.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},G9e=(t,[e,r])=>(t.on("end",r).on("error",r),e),bpr=new O9e;function Epr(t,e,r){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,r)}function o7e(t,e,r,n,o){let s=e;if(!s&&s!==!1){let c=n9e(r);c&&(tde(r)||(s=new URL(c)))}if(n&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(n&&t.agent&&t.agent[s7e]&&(t.agent=void 0),s){let c=s instanceof URL,u=y=>c||lt.hasOwnProp(s,y)?s[y]:void 0,p=u("username"),f=u("password"),h=lt.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(h=(p||"")+":"+(f||"")),h){let y=typeof h=="object",v=y&<.hasOwnProp(h,"username")?h.username:void 0,A=y&<.hasOwnProp(h,"password")?h.password:void 0;if(!!(v||A))h=(v||"")+":"+(A||"");else if(y)throw new Jr("Invalid proxy authorization",Jr.ERR_BAD_OPTION,{proxy:s})}if(i7e.test(t.protocol)){if(!(o instanceof nde.default)){let y=u("hostname")||u("host"),v=u("port"),A=u("protocol"),S=A?A.includes(":")?A:`${A}:`:"http:",E=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,k=new URL(`${S}//${E}${v?":"+v:""}`),P={protocol:k.protocol,hostname:k.hostname.replace(/^\[|\]$/g,""),port:k.port,auth:h&&typeof h=="string"?h:void 0};k.protocol==="https:"&&(P.ALPNProtocols=["http/1.1"]);let j=xpr(P,o);t.agent=j,t.agents&&(t.agents.https=j)}}else{if(h){let S=Buffer.from(h,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+S}let y=!1;for(let S of Object.keys(t.headers))if(S.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let v=u("hostname")||u("host");t.hostname=v,t.host=v,t.port=u("port"),t.path=r;let A=u("protocol");A&&(t.protocol=A.includes(":")?A:`${A}:`)}}t.beforeRedirects.proxy=function(u){o7e(u,e,u.href,!0,o)}}var wpr=typeof process<"u"&<.kindOf(process)==="process",_pr=t=>new Promise((e,r)=>{let n,o,s=(p,f)=>{o||(o=!0,n&&n(p,f))},c=p=>{s(p),e(p)},u=p=>{s(p,!0),r(p)};t(c,u,p=>n=p).catch(u)}),Spr=({address:t,family:e})=>{if(!lt.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},W9e=(t,e)=>Spr(lt.isObject(t)?t:{address:t,family:e}),Cpr={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:o}=t,s=bpr.getSession(r,n),{HTTP2_HEADER_SCHEME:c,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:p,HTTP2_HEADER_STATUS:f}=K9e.default.constants,h={[c]:t.protocol.replace(":",""),[u]:t.method,[p]:t.path};lt.forEach(o,(y,v)=>{v.charAt(0)!==":"&&(h[v]=y)});let g=s.request(h);return g.once("response",y=>{let v=g;y=Object.assign({},y);let A=y[f];delete y[f],v.headers=y,v.statusCode=+A,e(v)}),g}},a7e=wpr&&function(e){return _pr(async function(n,o,s){let c=Et=>lt.hasOwnProp(e,Et)?e[Et]:void 0,u=c("transitional")||ok,p=c("data"),f=c("lookup"),h=c("family"),g=c("httpVersion");g===void 0&&(g=1);let y=c("http2Options"),v=c("responseType"),A=c("responseEncoding"),S=e.method.toUpperCase(),E,k=!1,P,j;if(g=+g,Number.isNaN(g))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(g!==1&&g!==2)throw TypeError(`Unsupported protocol version '${g}'`);let L=g===2;if(f){let Et=F9e(f,gt=>lt.isArray(gt)?gt:[gt]);f=(gt,ft,B)=>{Et(gt,ft,(Ye,ct,Ce)=>{if(Ye)return B(Ye);let we=lt.isArray(ct)?ct.map(We=>W9e(We)):[W9e(ct,Ce)];ft.all?B(Ye,we):B(Ye,we[0].address,we[0].family)})}}let z=new e7e.EventEmitter;function re(Et){try{z.emit("abort",!Et||Et.type?new ty(null,e,P):Et)}catch{}}function Y(){j&&(clearTimeout(j),j=null)}function me(){let Et=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";return e.timeoutErrorMessage&&(Et=e.timeoutErrorMessage),new Jr(Et,u.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,e,P)}z.once("abort",o);let ne=()=>{Y(),e.cancelToken&&e.cancelToken.unsubscribe(re),e.signal&&e.signal.removeEventListener("abort",re),z.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(re),e.signal&&(e.signal.aborted?re():e.signal.addEventListener("abort",re))),s((Et,gt)=>{if(E=!0,Y(),gt){k=!0,ne();return}let{data:ft}=Et;if(ft instanceof Pv.default.Readable||ft instanceof Pv.default.Duplex){let B=Pv.default.finished(ft,()=>{B(),ne()})}else ne()});let ce=ND(e.baseURL,e.url,e.allowAbsoluteUrls),ee=new URL(ce,Va.hasBrowserEnv?Va.origin:void 0),ge=ee.protocol||H9e[0];if(ge==="data:"){if(e.maxContentLength>-1){let gt=String(e.url||ce||"");if(Kq(gt)>e.maxContentLength)return o(new Jr("maxContentLength size of "+e.maxContentLength+" exceeded",Jr.ERR_BAD_RESPONSE,e))}let Et;if(S!=="GET")return Hw(n,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{Et=Wfe(e.url,v==="blob",{Blob:e.env&&e.env.Blob})}catch(gt){throw Jr.from(gt,Jr.ERR_BAD_REQUEST,e)}return v==="text"?(Et=Et.toString(A),(!A||A==="utf8")&&(Et=lt.stripBOM(Et))):v==="stream"&&(Et=Pv.default.Readable.from(Et)),Hw(n,o,{data:Et,status:200,statusText:"OK",headers:new Mu,config:e})}if(H9e.indexOf(ge)===-1)return o(new Jr("Unsupported protocol "+ge,Jr.ERR_BAD_REQUEST,e));let J=Mu.from(e.headers).normalize();J.set("User-Agent","axios/"+tC,!1);let{onUploadProgress:U,onDownloadProgress:de}=e,Fe=e.maxRate,ye,be;if(lt.isSpecCompliantForm(p)){let Et=J.getContentType(/boundary=([-_\w\d]{10,70})/i);p=B9e(p,gt=>{J.set(gt)},{tag:`axios-${tC}-boundary`,boundary:Et&&Et[1]||void 0})}else if(lt.isFormData(p)&<.isFunction(p.getHeaders)&&p.getHeaders!==Object.prototype.getHeaders){if(ypr(J,p.getHeaders(),c("formDataHeaderPolicy")),!J.hasContentLength())try{let Et=await X9e.default.promisify(p.getLength).call(p);Number.isFinite(Et)&&Et>=0&&J.setContentLength(Et)}catch{}}else if(lt.isBlob(p)||lt.isFile(p))p.size&&J.setContentType(p.type||"application/octet-stream"),J.setContentLength(p.size||0),p=Pv.default.Readable.from(hW(p));else if(p&&!lt.isStream(p)){if(!Buffer.isBuffer(p))if(lt.isArrayBuffer(p))p=Buffer.from(new Uint8Array(p));else if(lt.isString(p))p=Buffer.from(p,"utf-8");else return o(new Jr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Jr.ERR_BAD_REQUEST,e));if(J.setContentLength(p.length,!1),e.maxBodyLength>-1&&p.length>e.maxBodyLength)return o(new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,e))}let Ne=lt.toFiniteNumber(J.getContentLength());lt.isArray(Fe)?(ye=Fe[0],be=Fe[1]):ye=be=Fe,p&&(U||ye)&&(lt.isStream(p)||(p=Pv.default.Readable.from(p,{objectMode:!1})),p=Pv.default.pipeline([p,new Kfe({maxRate:lt.toFiniteNumber(ye)})],lt.noop),U&&p.on("progress",G9e(p,WF(Ne,rC(YF(U),!1,3)))));let He,St=c("auth");if(St){let Et=St.username||"",gt=St.password||"";He=Et+":"+gt}if(!He&&(ee.username||ee.password)){let Et=V9e(ee.username),gt=V9e(ee.password);He=Et+":"+gt}He&&J.delete("authorization");let It;try{It=RD(ee.pathname+ee.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(Et){let gt=new Error(Et.message);return gt.config=e,gt.url=e.url,gt.exists=!0,o(gt)}J.set("Accept-Encoding",lt.hasOwnProp(u,"advertiseZstdAcceptEncoding")&&u.advertiseZstdAcceptEncoding===!0?hpr:n7e,!1);let Xe=Object.assign(Object.create(null),{path:It,method:S,headers:FF(J),agents:{http:e.httpAgent,https:e.httpsAgent},auth:He,protocol:ge,family:h,beforeRedirect:Epr,beforeRedirects:Object.create(null),http2Options:y});!lt.isUndefined(f)&&(Xe.lookup=f);let Ke=c("socketPath");if(Ke){if(typeof Ke!="string")return o(new Jr("socketPath must be a string",Jr.ERR_BAD_OPTION_VALUE,e));let Et=c("allowedSocketPaths");if(Et!=null){let gt=Array.isArray(Et)?Et:[Et],ft=(0,rde.resolve)(Ke);if(!gt.some(Ye=>typeof Ye=="string"&&(0,rde.resolve)(Ye)===ft))return o(new Jr(`socketPath "${Ke}" is not permitted by allowedSocketPaths`,Jr.ERR_BAD_OPTION_VALUE,e))}Xe.socketPath=Ke}else Xe.hostname=ee.hostname.startsWith("[")?ee.hostname.slice(1,-1):ee.hostname,Xe.port=ee.port,o7e(Xe,e.proxy,ge+"//"+ee.hostname+(ee.port?":"+ee.port:"")+Xe.path,!1,e.httpsAgent);let Me,et=!1,At=i7e.test(Xe.protocol);if(Xe.agent==null&&(Xe.agent=At?e.httpsAgent:e.httpAgent),L)Me=Cpr;else{let Et=c("transport");if(Et)Me=Et;else if(e.maxRedirects===0)Me=At?J9e.default:Y9e.default,et=!0;else{e.maxRedirects&&(Xe.maxRedirects=e.maxRedirects);let gt=c("beforeRedirect");if(gt&&(Xe.beforeRedirects.config=gt),He){let ft=ee.origin,B=He;Xe.beforeRedirects.auth=function(ct){try{new URL(ct.href).origin===ft&&(ct.auth=B)}catch{}}}Me=At?gpr:mpr}}e.maxBodyLength>-1?Xe.maxBodyLength=e.maxBodyLength:Xe.maxBodyLength=1/0,Xe.insecureHTTPParser=!!c("insecureHTTPParser"),P=Me.request(Xe,function(gt){if(Y(),P.destroyed)return;let ft=[gt],B=lt.toFiniteNumber(gt.headers["content-length"]);if(de||be){let we=new Kfe({maxRate:lt.toFiniteNumber(be)});de&&we.on("progress",G9e(we,WF(B,rC(YF(de),!0,3)))),ft.push(we)}let Ye=gt,ct=gt.req||P;if(e.decompress!==!1&>.headers["content-encoding"])switch((S==="HEAD"||gt.statusCode===204)&&delete gt.headers["content-encoding"],(gt.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":ft.push(ry.default.createUnzip(U9e)),delete gt.headers["content-encoding"];break;case"deflate":ft.push(new P9e),ft.push(ry.default.createUnzip(U9e)),delete gt.headers["content-encoding"];break;case"br":t7e&&(ft.push(ry.default.createBrotliDecompress(fpr)),delete gt.headers["content-encoding"]);break;case"zstd":r7e&&(ft.push(ry.default.createZstdDecompress(dpr)),delete gt.headers["content-encoding"]);break}Ye=ft.length>1?Pv.default.pipeline(ft,lt.noop):ft[0];let Ce={status:gt.statusCode,statusText:gt.statusMessage,headers:new Mu(gt.headers),config:e,request:ct};if(v==="stream"){if(e.maxContentLength>-1){let we=e.maxContentLength,We=Ye;async function*rt(){let pe=0;for await(let Je of We){if(pe+=Je.length,pe>we)throw new Jr("maxContentLength size of "+we+" exceeded",Jr.ERR_BAD_RESPONSE,e,ct);yield Je}}Ye=Pv.default.Readable.from(rt(),{objectMode:!1})}Ce.data=Ye,Hw(n,o,Ce)}else{let we=[],We=0;Ye.on("data",function(pe){we.push(pe),We+=pe.length,e.maxContentLength>-1&&We>e.maxContentLength&&(k=!0,Ye.destroy(),re(new Jr("maxContentLength size of "+e.maxContentLength+" exceeded",Jr.ERR_BAD_RESPONSE,e,ct)))}),Ye.on("aborted",function(){if(k)return;let pe=new Jr("stream has been aborted",Jr.ERR_BAD_RESPONSE,e,ct,Ce);Ye.destroy(pe),o(pe)}),Ye.on("error",function(pe){k||o(Jr.from(pe,null,e,ct,Ce))}),Ye.on("end",function(){try{let pe=we.length===1?we[0]:Buffer.concat(we);v!=="arraybuffer"&&(pe=pe.toString(A),(!A||A==="utf8")&&(pe=lt.stripBOM(pe))),Ce.data=pe}catch(pe){return o(Jr.from(pe,null,e,Ce.request,Ce))}Hw(n,o,Ce)})}z.once("abort",we=>{Ye.destroyed||(Ye.emit("error",we),Ye.destroy())})}),z.once("abort",Et=>{P.close?P.close():P.destroy(Et)}),P.on("error",function(gt){o(Jr.from(gt,null,e,P))});let Nt=new Set;if(P.on("socket",function(gt){gt.setKeepAlive(!0,1e3*60),gt[$9e]||(gt.on("error",function(B){let Ye=gt[mW];Ye&&!Ye.destroyed&&Ye.destroy(B)}),gt[$9e]=!0),gt[mW]=P,Nt.add(gt)}),P.once("close",function(){Y();for(let gt of Nt)gt[mW]===P&&(gt[mW]=null);Nt.clear()}),e.timeout){let Et=parseInt(e.timeout,10);if(Number.isNaN(Et)){re(new Jr("error trying to parse `config.timeout` to int",Jr.ERR_BAD_OPTION_VALUE,e,P));return}let gt=function(){E||re(me())};et&&Et>0&&(j=setTimeout(gt,Et)),P.setTimeout(Et,gt)}else P.setTimeout(0);if(lt.isStream(p)){let Et=!1,gt=!1;p.on("end",()=>{Et=!0}),p.once("error",B=>{gt=!0,P.destroy(B)}),p.on("close",()=>{!Et&&!gt&&re(new ty("Request stream has been aborted",e,P))});let ft=p;if(e.maxBodyLength>-1&&e.maxRedirects===0){let B=e.maxBodyLength,Ye=0;ft=Pv.default.pipeline([p,new Pv.default.Transform({transform(ct,Ce,we){if(Ye+=ct.length,Ye>B)return we(new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,e,P));we(null,ct)}})],lt.noop),ft.on("error",ct=>{P.destroyed||P.destroy(ct)})}ft.pipe(P)}else p&&P.write(p),P.end()})};var c7e=Va.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Va.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Va.origin),Va.navigator&&/(msie|trident)/i.test(Va.navigator.userAgent)):()=>!0;var u7e=Va.hasStandardBrowserEnv?{write(t,e,r,n,o,s,c){if(typeof document>"u")return;let u=[`${t}=${encodeURIComponent(e)}`];lt.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),lt.isString(n)&&u.push(`path=${n}`),lt.isString(o)&&u.push(`domain=${o}`),s===!0&&u.push("secure"),lt.isString(c)&&u.push(`SameSite=${c}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let r=0;r<e.length;r++){let n=e[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===t)return decodeURIComponent(n.slice(o+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var l7e=t=>t instanceof Mu?{...t}:t;function kb(t,e){e=e||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(f,h,g,y){return lt.isPlainObject(f)&<.isPlainObject(h)?lt.merge.call({caseless:y},f,h):lt.isPlainObject(h)?lt.merge({},h):lt.isArray(h)?h.slice():h}function o(f,h,g,y){if(lt.isUndefined(h)){if(!lt.isUndefined(f))return n(void 0,f,g,y)}else return n(f,h,g,y)}function s(f,h){if(!lt.isUndefined(h))return n(void 0,h)}function c(f,h){if(lt.isUndefined(h)){if(!lt.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}function u(f,h,g){if(lt.hasOwnProp(e,g))return n(f,h);if(lt.hasOwnProp(t,g))return n(void 0,f)}let p={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,allowedSocketPaths:c,responseEncoding:c,validateStatus:u,headers:(f,h,g)=>o(l7e(f),l7e(h),g,!0)};return lt.forEach(Object.keys({...t,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;let g=lt.hasOwnProp(p,h)?p[h]:o,y=lt.hasOwnProp(t,h)?t[h]:void 0,v=lt.hasOwnProp(e,h)?e[h]:void 0,A=g(y,v,h);lt.isUndefined(A)&&g!==u||(r[h]=A)}),r}var Ipr=["content-type","content-length"];function kpr(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{Ipr.includes(n.toLowerCase())&&t.set(n,o)})}var Tpr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function Bpr(t){let e=kb({},t),r=y=>lt.hasOwnProp(e,y)?e[y]:void 0,n=r("data"),o=r("withXSRFToken"),s=r("xsrfHeaderName"),c=r("xsrfCookieName"),u=r("headers"),p=r("auth"),f=r("baseURL"),h=r("allowAbsoluteUrls"),g=r("url");if(e.headers=u=Mu.from(u),e.url=RD(ND(f,g,h),r("params"),r("paramsSerializer")),p&&u.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?Tpr(p.password):""))),lt.isFormData(n)&&(Va.hasStandardBrowserEnv||Va.hasStandardBrowserWebWorkerEnv||lt.isReactNative(n)?u.setContentType(void 0):lt.isFunction(n.getHeaders)&&kpr(u,n.getHeaders(),r("formDataHeaderPolicy"))),Va.hasStandardBrowserEnv&&(lt.isFunction(o)&&(o=o(e)),o===!0||o==null&&c7e(e.url))){let v=s&&c&&u7e.read(c);v&&u.set(s,v)}return e}var gW=Bpr;var Dpr=typeof XMLHttpRequest<"u",p7e=Dpr&&function(t){return new Promise(function(r,n){let o=gW(t),s=o.data,c=Mu.from(o.headers).normalize(),{responseType:u,onUploadProgress:p,onDownloadProgress:f}=o,h,g,y,v,A;function S(){v&&v(),A&&A(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function k(){if(!E)return;let j=Mu.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),z={data:!u||u==="text"||u==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:j,config:t,request:E};Hw(function(Y){r(Y),S()},function(Y){n(Y),S()},z),E=null}"onloadend"in E?E.onloadend=k:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(k)},E.onabort=function(){E&&(n(new Jr("Request aborted",Jr.ECONNABORTED,t,E)),S(),E=null)},E.onerror=function(L){let z=L&&L.message?L.message:"Network Error",re=new Jr(z,Jr.ERR_NETWORK,t,E);re.event=L||null,n(re),S(),E=null},E.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",z=o.transitional||ok;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),n(new Jr(L,z.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,t,E)),S(),E=null},s===void 0&&c.setContentType(null),"setRequestHeader"in E&<.forEach(FF(c),function(L,z){E.setRequestHeader(z,L)}),lt.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),u&&u!=="json"&&(E.responseType=o.responseType),f&&([y,A]=rC(f,!0),E.addEventListener("progress",y)),p&&E.upload&&([g,v]=rC(p),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(h=j=>{E&&(n(!j||j.type?new ty(null,t,E):j),E.abort(),S(),E=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));let P=Yq(o.url);if(P&&!Va.protocols.includes(P)){n(new Jr("Unsupported protocol "+P+":",Jr.ERR_BAD_REQUEST,t));return}E.send(s||null)})};var Ppr=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let r=new AbortController,n=!1,o=function(p){if(!n){n=!0,c();let f=p instanceof Error?p:this.reason;r.abort(f instanceof Jr?f:new ty(f instanceof Error?f.message:f))}},s=e&&setTimeout(()=>{s=null,o(new Jr(`timeout of ${e}ms exceeded`,Jr.ETIMEDOUT))},e),c=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(p=>{p.unsubscribe?p.unsubscribe(o):p.removeEventListener("abort",o)}),t=null)};t.forEach(p=>p.addEventListener("abort",o));let{signal:u}=r;return u.unsubscribe=()=>lt.asap(c),u},f7e=Ppr;var Rpr=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},Npr=async function*(t,e){for await(let r of Opr(t))yield*Rpr(r,e)},Opr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},ide=(t,e,r,n)=>{let o=Npr(t,e),s=0,c,u=p=>{c||(c=!0,n&&n(p))};return new ReadableStream({async pull(p){try{let{done:f,value:h}=await o.next();if(f){u(),p.close();return}let g=h.byteLength;if(r){let y=s+=g;r(y)}p.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(p){return u(p),o.return()}},{highWaterMark:2})};var d7e=64*1024,{isFunction:AW}=lt,Fpr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),h7e=t=>{if(!lt.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},m7e=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Lpr=t=>{let e=t.indexOf("://"),r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},jpr=t=>{let e=lt.global!==void 0&<.global!==null?lt.global:globalThis,{ReadableStream:r,TextEncoder:n}=e;t=lt.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:s,Response:c}=t,u=o?AW(o):typeof fetch=="function",p=AW(s),f=AW(c);if(!u)return!1;let h=u&&AW(r),g=u&&(typeof n=="function"?(k=>P=>k.encode(P))(new n):async k=>new Uint8Array(await new s(k).arrayBuffer())),y=p&&h&&m7e(()=>{let k=!1,P=new s(Va.origin,{body:new r,method:"POST",get duplex(){return k=!0,"half"}}),j=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),k&&!j}),v=f&&h&&m7e(()=>lt.isReadableStream(new c("").body)),A={stream:v&&(k=>k.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!A[k]&&(A[k]=(P,j)=>{let L=P&&P[k];if(L)return L.call(P);throw new Jr(`Response type '${k}' is not supported`,Jr.ERR_NOT_SUPPORT,j)})});let S=async k=>{if(k==null)return 0;if(lt.isBlob(k))return k.size;if(lt.isSpecCompliantForm(k))return(await new s(Va.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(lt.isArrayBufferView(k)||lt.isArrayBuffer(k))return k.byteLength;if(lt.isURLSearchParams(k)&&(k=k+""),lt.isString(k))return(await g(k)).byteLength},E=async(k,P)=>{let j=lt.toFiniteNumber(k.getContentLength());return j==null?S(P):j};return async k=>{let{url:P,method:j,data:L,signal:z,cancelToken:re,timeout:Y,onDownloadProgress:me,onUploadProgress:ne,responseType:ce,headers:ee,withCredentials:ge="same-origin",fetchOptions:J,maxContentLength:U,maxBodyLength:de}=gW(k),Fe=lt.isNumber(U)&&U>-1,ye=lt.isNumber(de)&&de>-1,be=Ke=>lt.hasOwnProp(k,Ke)?k[Ke]:void 0,Ne=o||fetch;ce=ce?(ce+"").toLowerCase():"text";let He=f7e([z,re&&re.toAbortSignal()],Y),St=null,It=He&&He.unsubscribe&&(()=>{He.unsubscribe()}),Xe;try{let Ke,Me=be("auth");if(Me){let ft=Me.username||"",B=Me.password||"";Ke={username:ft,password:B}}if(Lpr(P)){let ft=new URL(P,Va.origin);if(!Ke&&(ft.username||ft.password)){let B=h7e(ft.username),Ye=h7e(ft.password);Ke={username:B,password:Ye}}(ft.username||ft.password)&&(ft.username="",ft.password="",P=ft.href)}if(Ke&&(ee.delete("authorization"),ee.set("Authorization","Basic "+btoa(Fpr((Ke.username||"")+":"+(Ke.password||""))))),Fe&&typeof P=="string"&&P.startsWith("data:")&&Kq(P)>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,St);if(ye&&j!=="get"&&j!=="head"){let ft=await E(ee,L);if(typeof ft=="number"&&isFinite(ft)&&ft>de)throw new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,k,St)}if(ne&&y&&j!=="get"&&j!=="head"&&(Xe=await E(ee,L))!==0){let ft=new s(P,{method:"POST",body:L,duplex:"half"}),B;if(lt.isFormData(L)&&(B=ft.headers.get("content-type"))&&ee.setContentType(B),ft.body){let[Ye,ct]=WF(Xe,rC(YF(ne)));L=ide(ft.body,d7e,Ye,ct)}}lt.isString(ge)||(ge=ge?"include":"omit");let et=p&&"credentials"in s.prototype;if(lt.isFormData(L)){let ft=ee.getContentType();ft&&/^multipart\/form-data/i.test(ft)&&!/boundary=/i.test(ft)&&ee.delete("content-type")}ee.set("User-Agent","axios/"+tC,!1);let At={...J,signal:He,method:j.toUpperCase(),headers:FF(ee.normalize()),body:L,duplex:"half",credentials:et?ge:void 0};St=p&&new s(P,At);let Nt=await(p?Ne(St,J):Ne(P,At));if(Fe){let ft=lt.toFiniteNumber(Nt.headers.get("content-length"));if(ft!=null&&ft>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,St)}let Et=v&&(ce==="stream"||ce==="response");if(v&&Nt.body&&(me||Fe||Et&&It)){let ft={};["status","statusText","headers"].forEach(We=>{ft[We]=Nt[We]});let B=lt.toFiniteNumber(Nt.headers.get("content-length")),[Ye,ct]=me&&WF(B,rC(YF(me),!0))||[],Ce=0,we=We=>{if(Fe&&(Ce=We,Ce>U))throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,St);Ye&&Ye(We)};Nt=new c(ide(Nt.body,d7e,we,()=>{ct&&ct(),It&&It()}),ft)}ce=ce||"text";let gt=await A[lt.findKey(A,ce)||"text"](Nt,k);if(Fe&&!v&&!Et){let ft;if(gt!=null&&(typeof gt.byteLength=="number"?ft=gt.byteLength:typeof gt.size=="number"?ft=gt.size:typeof gt=="string"&&(ft=typeof n=="function"?new n().encode(gt).byteLength:gt.length)),typeof ft=="number"&&ft>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,St)}return!Et&&It&&It(),await new Promise((ft,B)=>{Hw(ft,B,{data:gt,headers:Mu.from(Nt.headers),status:Nt.status,statusText:Nt.statusText,config:k,request:St})})}catch(Ke){if(It&&It(),He&&He.aborted&&He.reason instanceof Jr){let Me=He.reason;throw Me.config=k,St&&(Me.request=St),Ke!==Me&&(Me.cause=Ke),Me}throw Ke&&Ke.name==="TypeError"&&/Load failed|fetch/i.test(Ke.message)?Object.assign(new Jr("Network Error",Jr.ERR_NETWORK,k,St,Ke&&Ke.response),{cause:Ke.cause||Ke}):Jr.from(Ke,Ke&&Ke.code,k,St,Ke&&Ke.response)}}},Mpr=new Map,sde=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:o}=e,s=[n,o,r],c=s.length,u=c,p,f,h=Mpr;for(;u--;)p=s[u],f=h.get(p),f===void 0&&h.set(p,f=u?new Map:jpr(e)),h=f;return f},tmi=sde();var ode={http:a7e,xhr:p7e,fetch:{get:sde}};lt.forEach(ode,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var g7e=t=>`- ${t}`,qpr=t=>lt.isFunction(t)||t===null||t===!1;function Upr(t,e){t=lt.isArray(t)?t:[t];let{length:r}=t,n,o,s={};for(let c=0;c<r;c++){n=t[c];let u;if(o=n,!qpr(n)&&(o=ode[(u=String(n)).toLowerCase()],o===void 0))throw new Jr(`Unknown adapter '${u}'`);if(o&&(lt.isFunction(o)||(o=o.get(e))))break;s[u||"#"+c]=o}if(!o){let c=Object.entries(s).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=r?c.length>1?`since :
|
|
@@ -575,19 +575,17 @@ ${A.join(`
|
|
|
575
575
|
`);return c===-1?"":o.stack.slice(c+1)})();try{if(!n.stack)n.stack=s;else if(s){let c=s.indexOf(`
|
|
576
576
|
`),u=c===-1?-1:s.indexOf(`
|
|
577
577
|
`,c+1),p=u===-1?"":s.slice(u+1);String(n.stack).endsWith(p)||(n.stack+=`
|
|
578
|
-
`+s)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=kb(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Xq.assertOptions(n,{silentJSONParsing:M0.transitional(M0.boolean),forcedJSONParsing:M0.transitional(M0.boolean),clarifyTimeoutError:M0.transitional(M0.boolean),legacyInterceptorReqResOrdering:M0.transitional(M0.boolean),advertiseZstdAcceptEncoding:M0.transitional(M0.boolean)},!1),o!=null&&(lt.isFunction(o)?r.paramsSerializer={serialize:o}:Xq.assertOptions(o,{encode:M0.function,serialize:M0.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xq.assertOptions(r,{baseUrl:M0.spelling("baseURL"),withXsrfToken:M0.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=s&<.merge(s.common,s[r.method]);s&<.forEach(["delete","get","head","post","put","patch","query","common"],A=>{delete s[A]}),r.headers=Mu.concat(c,s);let u=[],p=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(r)===!1)return;p=p&&S.synchronous;let E=r.transitional||ok;E&&E.legacyInterceptorReqResOrdering?u.unshift(S.fulfilled,S.rejected):u.push(S.fulfilled,S.rejected)});let f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let h,g=0,y;if(!p){let A=[vW.bind(this),void 0];for(A.unshift(...u),A.push(...f),y=A.length,h=Promise.resolve(r);g<y;)h=h.then(A[g++],A[g++]);return h}y=u.length;let v=r;for(;g<y;){let A=u[g++],S=u[g++];try{v=A(v)}catch(E){S.call(this,E);break}}try{h=vW.call(this,v)}catch(A){return Promise.reject(A)}for(g=0,y=f.length;g<y;)h=h.then(f[g++],f[g++]);return h}getUri(e){e=kb(this.defaults,e);let r=ND(e.baseURL,e.url,e.allowAbsoluteUrls);return RD(r,e.params,e.paramsSerializer)}};lt.forEach(["delete","get","head","options"],function(e){JF.prototype[e]=function(r,n){return this.request(kb(n||{},{method:e,url:r,data:(n||{}).data}))}});lt.forEach(["post","put","patch","query"],function(e){function r(n){return function(s,c,u){return this.request(kb(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}JF.prototype[e]=r(),e!=="query"&&(JF.prototype[e+"Form"]=r(!0))});var Zq=JF;var cde=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s,c=new Promise(u=>{n.subscribe(u),s=u}).then(o);return c.cancel=function(){n.unsubscribe(s)},c},e(function(s,c,u){n.reason||(n.reason=new ty(s,c,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},y7e=cde;function ude(t){return function(r){return t.apply(null,r)}}function lde(t){return lt.isObject(t)&&t.isAxiosError===!0}var pde={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pde).forEach(([t,e])=>{pde[e]=t});var v7e=pde;function x7e(t){let e=new Zq(t),r=Dq(Zq.prototype.request,e);return lt.extend(r,Zq.prototype,e,{allOwnKeys:!0}),lt.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return x7e(kb(t,o))},r}var Zp=x7e($F);Zp.Axios=Zq;Zp.CanceledError=ty;Zp.CancelToken=y7e;Zp.isCancel=Qq;Zp.VERSION=tC;Zp.toFormData=sk;Zp.AxiosError=Jr;Zp.Cancel=Zp.CanceledError;Zp.all=function(e){return Promise.all(e)};Zp.spread=ude;Zp.isAxiosError=lde;Zp.mergeConfig=kb;Zp.AxiosHeaders=Mu;Zp.formToJSON=t=>cW(lt.isHTMLForm(t)?new FormData(t):t);Zp.getAdapter=yW.getAdapter;Zp.HttpStatusCode=v7e;Zp.default=Zp;var nC=Zp;var{Axios:Xmi,AxiosError:Zmi,CanceledError:egi,isCancel:tgi,CancelToken:rgi,VERSION:ngi,all:igi,Cancel:sgi,isAxiosError:ogi,spread:agi,toFormData:cgi,AxiosHeaders:ugi,HttpStatusCode:lgi,formToJSON:pgi,getAdapter:fgi,mergeConfig:dgi,create:hgi}=nC;Nf();Ks();Nf();var Ide=Pt(require("os"));var hr={COMMAND:"command",REQUEST:"request",LOCAL_FLOW:"local_flow",EXIT:"exit"},pr={SUCCESS:"success",FAIL:"fail",START:"start"},i6={SUCCESS:"success",FAIL:"fail",SIGINT:"sigint",SIGTERM:"sigterm",TIMEOUT:"timeout",UNCAUGHT_EXCEPTION:"uncaught_exception",UNHANDLED_REJECTION:"unhandled_rejection",USER_CANCEL:"user_cancel",UNKNOWN:"unknown"},_fr=`cli-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;function Sfr(){var t,e;return{run_id:_fr,cli_version:(e=(t=Ab)==null?void 0:t.version)!=null?e:"unknown",node_version:process.version,os_platform:Ide.default.platform(),os_arch:Ide.default.arch(),app_type:"cli",app_id:process.env.AppId||void 0,uin:process.env.Uin||void 0,instance_id:process.env.ProjectId||void 0,is_ci:process.env.CI==="true"}}function Cfr(t,e){try{if(typeof process.send!="function")return;process.send(JSON.stringify({name:t,value:JSON.stringify(e)}))}catch{}}function mr(t){var r;let e={...Sfr(),...t};Cfr((r=e.event_name)!=null?r:"unknown",e)}var tL=(t,e)=>{mr({event_name:t,event_scope:hr.COMMAND,event_result:pr.SUCCESS,message:e})},sg=(t,e)=>{let r=Si(e);mr({event_name:"error",event_scope:hr.COMMAND,event_result:pr.FAIL,error_message:`${t} ${r.message}`.trim(),error_stack:r.stack})},Cde=500,Ifr=2e3;function Si(t){if(t==null)return{message:"unknown error",stack:""};if(typeof t=="string")return{message:CW(t,Cde),stack:""};if(typeof t=="object"){let e=t,r=CW(typeof e.message=="string"?e.message:String(e),Cde),n=CW(typeof e.stack=="string"?e.stack:"",Ifr);return{message:r,stack:n}}return{message:CW(String(t),Cde),stack:""}}function CW(t,e){return t.length>e?t.slice(0,e)+"\u2026[truncated]":t}var kfr=new Set(["region","framework","mode","env","e","area","a","debug","external"]),Tfr=new Set(["token","t","secret","key","cookie","authorization","blobCredential","sandboxCredential"]),Bfr=new Set(["path","name","n","projectName","proxyHost","proxyUuid","file","f","directoryOrZip"]);function Y7e(t){let e={};for(let[r,n]of Object.entries(t))if(!(r==="_"||r==="$0")){if(typeof n=="boolean"){e[r]=n;continue}if(Tfr.has(r)){e[`has_${r}`]=n!=null&&n!==""&&n!==!1;continue}if(kfr.has(r)){e[r]=String(n!=null?n:"");continue}if(Bfr.has(r)){e[`${r}_kind`]=Dfr(n);continue}e[`has_${r}`]=n!=null&&n!==""&&n!==!1}return e}function Dfr(t){return t==null||t===""?"absent":typeof t!="string"?"present":t.startsWith("/")?"absolute":t.startsWith("./")||t.startsWith("../")?"relative":t.startsWith("~")?"home_relative":"present"}Ks();var Pb={global:"https://pages-api.edgeone.ai/v1",china:"https://pages-api.cloud.tencent.com/v1"},Rv={global:"https://pre-api.edgeone.ai/v1",china:"https://pre-api.edgeone.ai/v1"};var IW={global:"ap-singapore",china:"ap-guangzhou"},s6={global:"https://edgeone.tencentcloud.com",china:"https://edgeone.cloud.tencent.com"},kde={global:"https://edgeone.ai/login",china:"https://cloud.tencent.com/login"},Tde="/makers/cli-login",Bde={"ap-guangzhou":"china","ap-singapore":"global"};var Fgi=require("fs"),Lgi=require("path"),Pfr=["china","global"];function Rfr(t){return Rv[t]||Rv.china}async function Nfr(t){var e,r,n;for(let o of Pfr)try{let s=Rfr(o),c=await nC.post(s,JSON.stringify({Action:"DescribePagesProjects",PageNumber:1,PageSize:10,Region:IW[o]}),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},timeout:15e3}),u=((r=(e=c==null?void 0:c.data)==null?void 0:e.Data)==null?void 0:r.Response)||(c==null?void 0:c.data);if((u==null?void 0:u.Code)!=null||((n=u==null?void 0:u.Error)==null?void 0:n.Code)!=null)continue;if(u&&Array.isArray(u.Projects))return o}catch{}return null}async function xd(){if(process.env.EDGEONE_PAGES_API_REGION)return process.env.EDGEONE_PAGES_API_REGION;let t=XF();if(t!=null&&t.region)return t.region;if(t!=null&&t.token){let e=await Nfr(t.token);if(e){try{KF({token:t.token,region:e})}catch{}return e}}return await sC("login_region")}Nf();Ks();var Ofr=async()=>{{let r=await xd();return Rv[r]||Rv.china}let t=await xd(),e=Pb[t];if(e)return e;ar(`Invalid region: ${t}`)},Ww=async()=>{if(process.env.EDGEONE_PAGES_API_TOKEN)return process.env.EDGEONE_PAGES_API_TOKEN;let t=XF();if(t!=null&&t.token)return t.token;try{return(await sC("eo_token")).Token}catch{return}},J7e=async()=>{try{let t=await sC("eo_token");return!t||typeof t!="object"?void 0:{loginType:t.loginType,corpId:t.corpId,corpName:t.corpName,openId:t.openId}}catch{return}},o6=async(t,e)=>{var c,u;let r=e||await Ofr(),o={"Content-Type":"application/json",Authorization:`Bearer ${await Ww()}`};{let p=await xd();o["x-site"]=p==="global"?"en":"zh"}let s=await nC.post(r,JSON.stringify(t),{headers:o,timeout:15e3});return((u=(c=s.data)==null?void 0:c.Data)==null?void 0:u.Response)||s.data},K7e=async t=>{var n,o,s,c,u,p;let e=await xd(),r=Pb[e]||Pb.china;if(!r)throw new Error("Login get token failed, invalid login region.");try{let f=await nC.post(r,JSON.stringify({Action:"CreateOrDescribeTokenByMCP",Name:"edgeone-cli-auto-generated"}),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}),h=(s=(o=(n=f==null?void 0:f.data)==null?void 0:n.Data)==null?void 0:o.Response)==null?void 0:s.TokenData;if(!(h!=null&&h.Token)){let g=(c=f==null?void 0:f.data)==null?void 0:c.Code,y=(u=f==null?void 0:f.data)==null?void 0:u.Message,v=(p=f==null?void 0:f.data)==null?void 0:p.RequestId,A=g!=null?`server Code=${g}, Message=${y}, RequestId=${v}`:`unexpected response shape from ${r}`;throw new Error(`Token exchange returned an empty result. ${A}`)}return h}catch(f){let h=f instanceof Error?f.message:"Unknown error";throw new Error(`Login get token failed, please try again. ${h}`)}};Nf();Ks();function X7e(t){var o,s,c,u,p,f;let e=Si(t),r=(o=t==null?void 0:t.response)!=null&&o.status?String(t.response.status):"";return{error_code:((f=(p=(u=(c=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:c.Data)==null?void 0:u.Response)==null?void 0:p.Error)==null?void 0:f.Code)||(t==null?void 0:t.errorCode)||"",error_message:e.message,http_status:r}}async function Z7e(t,e,r){let n=Bde[e]||"unknown";return await o6({Action:t,...r}).catch(s=>{var p,f,h,g;if(s.errorCode==="UnsupportedRegion")return;let c=X7e(s);mr({event_name:"Request:Error",event_scope:hr.REQUEST,event_result:pr.FAIL,event_phase:"request",action:t,region:n,...c});let u=(s==null?void 0:s.requestId)||((g=(h=(f=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:f.Data)==null?void 0:h.Response)==null?void 0:g.RequestId)||"";ar(`A request error occurred, please try again, but if the problem persists, contact us.(${u?u+": ":""}${c.error_message})`),process.env.DEBUG&&console.log("request error",t,Si(s).message),(s.errorCode==="AuthFailure.SignatureFailure"||s.errorCode==="AuthFailure.SecretIdNotFound")&&ny()}).then(s=>s,s=>{var p,f,h,g;let c=X7e(s);mr({event_name:"Request:Failed",event_scope:hr.REQUEST,event_result:pr.FAIL,event_phase:"request",action:t,region:n,...c});let u=(s==null?void 0:s.requestId)||((g=(h=(f=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:f.Data)==null?void 0:h.Response)==null?void 0:g.RequestId)||"";throw ar(`Request Failed: ${t}${u?", RequestId: "+u:""}: ${c.error_message}`),s})}var a6={china:"ap-guangzhou",global:"ap-singapore"},Q0=async()=>{let t=async r=>{let n=Bde[r],o;return o=Rv[n]||Rv.china,{success:!!(await o6({Action:"DescribePagesProjects",PageNumber:1,PageSize:10,Region:r},o)).Projects}},e=["ap-guangzhou","ap-singapore"];try{for(let r of e)(await t(r)).success&&(r==="ap-guangzhou"?process.env.EDGEONE_PAGES_API_REGION="china":r==="ap-singapore"&&(process.env.EDGEONE_PAGES_API_REGION="global"))}catch(r){ar(`check and set region failed: ${r}`)}process.env.EDGEONE_PAGES_API_REGION||(process.env.DEBUG&&console.log("[debug] checkAndSetRegion: no region detected, defaulting to china"),process.env.EDGEONE_PAGES_API_REGION="china")};async function tf(t,e){var n;let r=await xd();if(!r){let o=!!((n=XF())!=null&&n.token);process.env.EDGEONE_PAGES_API_TOKEN||o?(process.env.DEBUG&&console.log("[debug] pagesCapi: token set but no region, defaulting to china"),r="china"):(await ny(),r=await xd())}return r&&a6[r]?(e$e(a6[r]),await Z7e(t,a6[r],e)):(e$e(a6.china),await Z7e(t,a6.china,e))}function e$e(t="ap-guangzhou"){let e=t==="ap-guangzhou";process.send&&process.send(JSON.stringify({isDomestic:e}))}var m$e=Pt(require("open")),g$e=require("crypto");var l$e=Pt(require("http"));Nf();var Ffr="/pages/connect",t$e=t=>t==="global"?"https://console.tencentcloud.com/edgeone/makers":"https://console.cloud.tencent.com/edgeone/makers",r$e=t=>t==="global"?"https://edgeone.tencentcloud.com/logo/BlackHeadLogo.svg":"https://edgeone.cloud.tencent.com/logo/BlackHeadLogo.svg",n$e=t=>{let e=t==="global";return{lang:e?"en":"zh-CN",successTitle:e?"Login successful, please return to the original app to continue":"\u767B\u5F55\u6210\u529F\uFF0C\u8BF7\u8FD4\u56DE\u539F\u5E94\u7528\u7EE7\u7EED\u4F7F\u7528",successDescription:e?"You will be redirected to the Makers console in 5 seconds":"5\u79D2\u540E\u81EA\u52A8\u8DF3\u8F6C\u5230 Makers \u63A7\u5236\u53F0",successButtonText:e?"Go Console":"\u56DE\u5230\u63A7\u5236\u53F0",errorTitle:e?"Login failed. Please return to the original app and try again":"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u539F\u5E94\u7528\u91CD\u8BD5",copyright:`Copyright \xA9 2013-${new Date().getFullYear()} Tencent Cloud. All Rights Reserved.`}},i$e=t=>t==="global"?`
|
|
578
|
+
`+s)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=kb(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Xq.assertOptions(n,{silentJSONParsing:M0.transitional(M0.boolean),forcedJSONParsing:M0.transitional(M0.boolean),clarifyTimeoutError:M0.transitional(M0.boolean),legacyInterceptorReqResOrdering:M0.transitional(M0.boolean),advertiseZstdAcceptEncoding:M0.transitional(M0.boolean)},!1),o!=null&&(lt.isFunction(o)?r.paramsSerializer={serialize:o}:Xq.assertOptions(o,{encode:M0.function,serialize:M0.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xq.assertOptions(r,{baseUrl:M0.spelling("baseURL"),withXsrfToken:M0.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=s&<.merge(s.common,s[r.method]);s&<.forEach(["delete","get","head","post","put","patch","query","common"],A=>{delete s[A]}),r.headers=Mu.concat(c,s);let u=[],p=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(r)===!1)return;p=p&&S.synchronous;let E=r.transitional||ok;E&&E.legacyInterceptorReqResOrdering?u.unshift(S.fulfilled,S.rejected):u.push(S.fulfilled,S.rejected)});let f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let h,g=0,y;if(!p){let A=[vW.bind(this),void 0];for(A.unshift(...u),A.push(...f),y=A.length,h=Promise.resolve(r);g<y;)h=h.then(A[g++],A[g++]);return h}y=u.length;let v=r;for(;g<y;){let A=u[g++],S=u[g++];try{v=A(v)}catch(E){S.call(this,E);break}}try{h=vW.call(this,v)}catch(A){return Promise.reject(A)}for(g=0,y=f.length;g<y;)h=h.then(f[g++],f[g++]);return h}getUri(e){e=kb(this.defaults,e);let r=ND(e.baseURL,e.url,e.allowAbsoluteUrls);return RD(r,e.params,e.paramsSerializer)}};lt.forEach(["delete","get","head","options"],function(e){JF.prototype[e]=function(r,n){return this.request(kb(n||{},{method:e,url:r,data:(n||{}).data}))}});lt.forEach(["post","put","patch","query"],function(e){function r(n){return function(s,c,u){return this.request(kb(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}JF.prototype[e]=r(),e!=="query"&&(JF.prototype[e+"Form"]=r(!0))});var Zq=JF;var cde=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s,c=new Promise(u=>{n.subscribe(u),s=u}).then(o);return c.cancel=function(){n.unsubscribe(s)},c},e(function(s,c,u){n.reason||(n.reason=new ty(s,c,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},y7e=cde;function ude(t){return function(r){return t.apply(null,r)}}function lde(t){return lt.isObject(t)&&t.isAxiosError===!0}var pde={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pde).forEach(([t,e])=>{pde[e]=t});var v7e=pde;function x7e(t){let e=new Zq(t),r=Dq(Zq.prototype.request,e);return lt.extend(r,Zq.prototype,e,{allOwnKeys:!0}),lt.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return x7e(kb(t,o))},r}var Zp=x7e($F);Zp.Axios=Zq;Zp.CanceledError=ty;Zp.CancelToken=y7e;Zp.isCancel=Qq;Zp.VERSION=tC;Zp.toFormData=sk;Zp.AxiosError=Jr;Zp.Cancel=Zp.CanceledError;Zp.all=function(e){return Promise.all(e)};Zp.spread=ude;Zp.isAxiosError=lde;Zp.mergeConfig=kb;Zp.AxiosHeaders=Mu;Zp.formToJSON=t=>cW(lt.isHTMLForm(t)?new FormData(t):t);Zp.getAdapter=yW.getAdapter;Zp.HttpStatusCode=v7e;Zp.default=Zp;var nC=Zp;var{Axios:Xmi,AxiosError:Zmi,CanceledError:egi,isCancel:tgi,CancelToken:rgi,VERSION:ngi,all:igi,Cancel:sgi,isAxiosError:ogi,spread:agi,toFormData:cgi,AxiosHeaders:ugi,HttpStatusCode:lgi,formToJSON:pgi,getAdapter:fgi,mergeConfig:dgi,create:hgi}=nC;Nf();Ks();Nf();var Ide=Pt(require("os"));var hr={COMMAND:"command",REQUEST:"request",LOCAL_FLOW:"local_flow",EXIT:"exit"},pr={SUCCESS:"success",FAIL:"fail",START:"start"},i6={SUCCESS:"success",FAIL:"fail",SIGINT:"sigint",SIGTERM:"sigterm",TIMEOUT:"timeout",UNCAUGHT_EXCEPTION:"uncaught_exception",UNHANDLED_REJECTION:"unhandled_rejection",USER_CANCEL:"user_cancel",UNKNOWN:"unknown"},_fr=`cli-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;function Sfr(){var t,e;return{run_id:_fr,cli_version:(e=(t=Ab)==null?void 0:t.version)!=null?e:"unknown",node_version:process.version,os_platform:Ide.default.platform(),os_arch:Ide.default.arch(),app_type:"cli",app_id:process.env.AppId||void 0,uin:process.env.Uin||void 0,instance_id:process.env.ProjectId||void 0,is_ci:process.env.CI==="true"}}function Cfr(t,e){try{if(typeof process.send!="function")return;process.send(JSON.stringify({name:t,value:JSON.stringify(e)}))}catch{}}function mr(t){var r;let e={...Sfr(),...t};Cfr((r=e.event_name)!=null?r:"unknown",e)}var tL=(t,e)=>{mr({event_name:t,event_scope:hr.COMMAND,event_result:pr.SUCCESS,message:e})},sg=(t,e)=>{let r=Si(e);mr({event_name:"error",event_scope:hr.COMMAND,event_result:pr.FAIL,error_message:`${t} ${r.message}`.trim(),error_stack:r.stack})},Cde=500,Ifr=2e3;function Si(t){if(t==null)return{message:"unknown error",stack:""};if(typeof t=="string")return{message:CW(t,Cde),stack:""};if(typeof t=="object"){let e=t,r=CW(typeof e.message=="string"?e.message:String(e),Cde),n=CW(typeof e.stack=="string"?e.stack:"",Ifr);return{message:r,stack:n}}return{message:CW(String(t),Cde),stack:""}}function CW(t,e){return t.length>e?t.slice(0,e)+"\u2026[truncated]":t}var kfr=new Set(["region","framework","mode","env","e","area","a","debug","external"]),Tfr=new Set(["token","t","secret","key","cookie","authorization","blobCredential","sandboxCredential"]),Bfr=new Set(["path","name","n","projectName","proxyHost","proxyUuid","file","f","directoryOrZip"]);function Y7e(t){let e={};for(let[r,n]of Object.entries(t))if(!(r==="_"||r==="$0")){if(typeof n=="boolean"){e[r]=n;continue}if(Tfr.has(r)){e[`has_${r}`]=n!=null&&n!==""&&n!==!1;continue}if(kfr.has(r)){e[r]=String(n!=null?n:"");continue}if(Bfr.has(r)){e[`${r}_kind`]=Dfr(n);continue}e[`has_${r}`]=n!=null&&n!==""&&n!==!1}return e}function Dfr(t){return t==null||t===""?"absent":typeof t!="string"?"present":t.startsWith("/")?"absolute":t.startsWith("./")||t.startsWith("../")?"relative":t.startsWith("~")?"home_relative":"present"}Ks();var Pb={global:"https://pages-api.edgeone.ai/v1",china:"https://pages-api.cloud.tencent.com/v1"},Rv={global:"https://pre-api.edgeone.ai/v1",china:"https://pre-api.edgeone.ai/v1"};var IW={global:"ap-singapore",china:"ap-guangzhou"},s6={global:"https://edgeone.tencentcloud.com",china:"https://edgeone.cloud.tencent.com"},kde={global:"https://edgeone.ai/login",china:"https://cloud.tencent.com/login"},Tde="/makers/cli-login",Bde={"ap-guangzhou":"china","ap-singapore":"global"};var Fgi=require("fs"),Lgi=require("path"),Pfr=["china","global"];function Rfr(t){return Rv[t]||Rv.china}async function Nfr(t){var e,r,n;for(let o of Pfr)try{let s=Rfr(o),c=await nC.post(s,JSON.stringify({Action:"DescribePagesProjects",PageNumber:1,PageSize:10,Region:IW[o]}),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},timeout:15e3}),u=((r=(e=c==null?void 0:c.data)==null?void 0:e.Data)==null?void 0:r.Response)||(c==null?void 0:c.data);if((u==null?void 0:u.Code)!=null||((n=u==null?void 0:u.Error)==null?void 0:n.Code)!=null)continue;if(u&&Array.isArray(u.Projects))return o}catch{}return null}async function xd(){if(process.env.EDGEONE_PAGES_API_REGION)return process.env.EDGEONE_PAGES_API_REGION;let t=XF();if(t!=null&&t.region)return t.region;if(t!=null&&t.token){let e=await Nfr(t.token);if(e){try{KF({token:t.token,region:e})}catch{}return e}}return await sC("login_region")}Nf();Ks();var Ofr=async()=>{{let r=await xd();return Rv[r]||Rv.china}let t=await xd(),e=Pb[t];if(e)return e;ar(`Invalid region: ${t}`)},Ww=async()=>{if(process.env.EDGEONE_PAGES_API_TOKEN)return process.env.EDGEONE_PAGES_API_TOKEN;let t=XF();if(t!=null&&t.token)return t.token;try{return(await sC("eo_token")).Token}catch{return}},J7e=async()=>{try{let t=await sC("eo_token");return!t||typeof t!="object"?void 0:{loginType:t.loginType,corpId:t.corpId,corpName:t.corpName,openId:t.openId}}catch{return}},o6=async(t,e)=>{var c,u;let r=e||await Ofr(),o={"Content-Type":"application/json",Authorization:`Bearer ${await Ww()}`};{let p=await xd();o["x-site"]=p==="global"?"en":"zh"}let s=await nC.post(r,JSON.stringify(t),{headers:o,timeout:15e3});return((u=(c=s.data)==null?void 0:c.Data)==null?void 0:u.Response)||s.data},K7e=async t=>{var n,o,s,c,u,p;let e=await xd(),r=Pb[e]||Pb.china;if(!r)throw new Error("Login get token failed, invalid login region.");try{let f=await nC.post(r,JSON.stringify({Action:"CreateOrDescribeTokenByMCP",Name:"edgeone-cli-auto-generated"}),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}),h=(s=(o=(n=f==null?void 0:f.data)==null?void 0:n.Data)==null?void 0:o.Response)==null?void 0:s.TokenData;if(!(h!=null&&h.Token)){let g=(c=f==null?void 0:f.data)==null?void 0:c.Code,y=(u=f==null?void 0:f.data)==null?void 0:u.Message,v=(p=f==null?void 0:f.data)==null?void 0:p.RequestId,A=g!=null?`server Code=${g}, Message=${y}, RequestId=${v}`:`unexpected response shape from ${r}`;throw new Error(`Token exchange returned an empty result. ${A}`)}return h}catch(f){let h=f instanceof Error?f.message:"Unknown error";throw new Error(`Login get token failed, please try again. ${h}`)}};Nf();Ks();function X7e(t){var o,s,c,u,p,f;let e=Si(t),r=(o=t==null?void 0:t.response)!=null&&o.status?String(t.response.status):"";return{error_code:((f=(p=(u=(c=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:c.Data)==null?void 0:u.Response)==null?void 0:p.Error)==null?void 0:f.Code)||(t==null?void 0:t.errorCode)||"",error_message:e.message,http_status:r}}async function Z7e(t,e,r){let n=Bde[e]||"unknown";return await o6({Action:t,...r}).catch(s=>{var p,f,h,g;if(s.errorCode==="UnsupportedRegion")return;let c=X7e(s);mr({event_name:"Request:Error",event_scope:hr.REQUEST,event_result:pr.FAIL,event_phase:"request",action:t,region:n,...c});let u=(s==null?void 0:s.requestId)||((g=(h=(f=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:f.Data)==null?void 0:h.Response)==null?void 0:g.RequestId)||"";ar(`A request error occurred, please try again, but if the problem persists, contact us.(${u?u+": ":""}${c.error_message})`),process.env.DEBUG&&console.log("request error",t,Si(s).message),(s.errorCode==="AuthFailure.SignatureFailure"||s.errorCode==="AuthFailure.SecretIdNotFound")&&ny()}).then(s=>s,s=>{var p,f,h,g;let c=X7e(s);mr({event_name:"Request:Failed",event_scope:hr.REQUEST,event_result:pr.FAIL,event_phase:"request",action:t,region:n,...c});let u=(s==null?void 0:s.requestId)||((g=(h=(f=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:f.Data)==null?void 0:h.Response)==null?void 0:g.RequestId)||"";throw ar(`Request Failed: ${t}${u?", RequestId: "+u:""}: ${c.error_message}`),s})}var a6={china:"ap-guangzhou",global:"ap-singapore"},Q0=async()=>{let t=async r=>{let n=Bde[r],o;return o=Rv[n]||Rv.china,{success:!!(await o6({Action:"DescribePagesProjects",PageNumber:1,PageSize:10,Region:r},o)).Projects}},e=["ap-guangzhou","ap-singapore"];try{for(let r of e)(await t(r)).success&&(r==="ap-guangzhou"?process.env.EDGEONE_PAGES_API_REGION="china":r==="ap-singapore"&&(process.env.EDGEONE_PAGES_API_REGION="global"))}catch(r){ar(`check and set region failed: ${r}`)}process.env.EDGEONE_PAGES_API_REGION||(process.env.DEBUG&&console.log("[debug] checkAndSetRegion: no region detected, defaulting to china"),process.env.EDGEONE_PAGES_API_REGION="china")};async function tf(t,e){var n;let r=await xd();if(!r){let o=!!((n=XF())!=null&&n.token);process.env.EDGEONE_PAGES_API_TOKEN||o?(process.env.DEBUG&&console.log("[debug] pagesCapi: token set but no region, defaulting to china"),r="china"):(await ny(),r=await xd())}return r&&a6[r]?(e$e(a6[r]),await Z7e(t,a6[r],e)):(e$e(a6.china),await Z7e(t,a6.china,e))}function e$e(t="ap-guangzhou"){let e=t==="ap-guangzhou";process.send&&process.send(JSON.stringify({isDomestic:e}))}var m$e=Pt(require("open")),g$e=require("crypto");var l$e=Pt(require("http"));Nf();var Ffr="/pages/connect",t$e=t=>t==="global"?"https://console.tencentcloud.com/edgeone/makers":"https://console.cloud.tencent.com/edgeone/makers",r$e=t=>t==="global"?"https://edgeone.tencentcloud.com/logo/BlackHeadLogo.svg":"https://edgeone.cloud.tencent.com/logo/BlackHeadLogo.svg",n$e=t=>{let e=t==="global";return{lang:e?"en":"zh-CN",successTitle:e?"Login successful, please return to the original app to continue":"\u767B\u5F55\u6210\u529F\uFF0C\u8BF7\u8FD4\u56DE\u539F\u5E94\u7528\u7EE7\u7EED\u4F7F\u7528",successDescription:e?"You will be redirected to the Makers console in 5 seconds":"5 \u79D2\u540E\u81EA\u52A8\u8DF3\u8F6C\u5230 Makers \u63A7\u5236\u53F0",successButtonText:e?"Go Console":"\u56DE\u5230\u63A7\u5236\u53F0",errorTitle:e?"Login failed. Please return to the original app and try again":"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u539F\u5E94\u7528\u91CD\u8BD5"}},i$e=t=>t==="global"?`
|
|
579
579
|
<ol class="footer-links">
|
|
580
|
+
<li><a href="https://www.tencentcloud.com/document/product/301/9248?s_url=https%3A%2F%2Fedgeone.ai" target="_blank" rel="noreferrer">Terms of Service</a></li>
|
|
581
|
+
<li class="footer-separator">\xB7</li>
|
|
580
582
|
<li><a href="https://edgeone.ai/document/46315" target="_blank" rel="noreferrer">Privacy Policy</a></li>
|
|
581
|
-
<li class="footer-line"></li>
|
|
582
|
-
<li><a href="https://www.tencentcloud.com/document/product/301/9248?s_url=https%3A%2F%2Fedgeone.ai" target="_blank" rel="noreferrer">Legal</a></li>
|
|
583
|
-
<li class="footer-line"></li>
|
|
584
|
-
<li><a href="https://www.tencentcloud.com/document/product/301/17346?s_url=https%3A%2F%2Fedgeone.ai" target="_blank" rel="noreferrer">Cookie Policy</a></li>
|
|
585
583
|
</ol>
|
|
586
584
|
`:`
|
|
587
585
|
<ol class="footer-links">
|
|
588
|
-
<li><a href="https://cloud.tencent.com/document/product/301/11470" target="_blank" rel="nofollow noreferrer">\u9690\u79C1\u6761\u6B3E</a></li>
|
|
589
|
-
<li class="footer-line"></li>
|
|
590
586
|
<li><a href="https://cloud.tencent.com/document/product/301/1967" target="_blank" rel="nofollow noreferrer">\u670D\u52A1\u6761\u6B3E</a></li>
|
|
587
|
+
<li class="footer-separator">\xB7</li>
|
|
588
|
+
<li><a href="https://cloud.tencent.com/document/product/301/11470" target="_blank" rel="nofollow noreferrer">\u9690\u79C1\u653F\u7B56</a></li>
|
|
591
589
|
</ol>
|
|
592
590
|
`,s$e=`
|
|
593
591
|
:root {
|
|
@@ -602,7 +600,7 @@ ${A.join(`
|
|
|
602
600
|
}
|
|
603
601
|
body {
|
|
604
602
|
margin: 0;
|
|
605
|
-
background: #
|
|
603
|
+
background: #fafafa;
|
|
606
604
|
color: #1f2329;
|
|
607
605
|
}
|
|
608
606
|
a {
|
|
@@ -618,34 +616,29 @@ ${A.join(`
|
|
|
618
616
|
flex-direction: column;
|
|
619
617
|
}
|
|
620
618
|
.header-shell {
|
|
621
|
-
height:
|
|
619
|
+
height: 64px;
|
|
622
620
|
}
|
|
623
621
|
.header {
|
|
624
|
-
box-shadow: 0 1px 0 0 #e4e8ee;
|
|
625
622
|
position: fixed;
|
|
626
623
|
left: 0;
|
|
627
624
|
right: 0;
|
|
628
625
|
top: 0;
|
|
629
626
|
z-index: 800;
|
|
630
|
-
background: #
|
|
627
|
+
background: #fafafa;
|
|
631
628
|
}
|
|
632
629
|
.header-content {
|
|
633
630
|
position: relative;
|
|
634
|
-
height:
|
|
635
|
-
width:
|
|
636
|
-
|
|
637
|
-
padding: 0;
|
|
638
|
-
margin: auto;
|
|
631
|
+
height: 64px;
|
|
632
|
+
width: 100%;
|
|
633
|
+
padding: 0 18px;
|
|
639
634
|
display: flex;
|
|
640
635
|
align-items: center;
|
|
641
636
|
}
|
|
642
637
|
.head-menu {
|
|
643
638
|
width: 100%;
|
|
644
|
-
height:
|
|
639
|
+
height: 64px;
|
|
645
640
|
display: flex;
|
|
646
641
|
align-items: center;
|
|
647
|
-
background: #fff;
|
|
648
|
-
padding-left: 24px;
|
|
649
642
|
}
|
|
650
643
|
.logo-wrap {
|
|
651
644
|
line-height: 0;
|
|
@@ -659,13 +652,15 @@ ${A.join(`
|
|
|
659
652
|
}
|
|
660
653
|
main {
|
|
661
654
|
flex: 1;
|
|
655
|
+
display: flex;
|
|
662
656
|
}
|
|
663
657
|
.content {
|
|
658
|
+
flex: 1;
|
|
664
659
|
display: flex;
|
|
665
660
|
align-items: center;
|
|
666
661
|
justify-content: center;
|
|
667
662
|
flex-direction: column;
|
|
668
|
-
padding:
|
|
663
|
+
padding: 24px 20px 96px;
|
|
669
664
|
text-align: center;
|
|
670
665
|
}
|
|
671
666
|
.text.hidden,
|
|
@@ -678,7 +673,7 @@ ${A.join(`
|
|
|
678
673
|
font-size: 16px;
|
|
679
674
|
font-weight: 700;
|
|
680
675
|
line-height: 24px;
|
|
681
|
-
margin
|
|
676
|
+
margin: 0;
|
|
682
677
|
display: flex;
|
|
683
678
|
align-items: center;
|
|
684
679
|
justify-content: center;
|
|
@@ -722,66 +717,59 @@ ${A.join(`
|
|
|
722
717
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
723
718
|
}
|
|
724
719
|
.action-button:hover {
|
|
725
|
-
background: #
|
|
726
|
-
border-color: #
|
|
720
|
+
background: #366ef4;
|
|
721
|
+
border-color: #366ef4;
|
|
727
722
|
}
|
|
728
723
|
.footer {
|
|
729
|
-
|
|
730
|
-
|
|
724
|
+
height: 56px;
|
|
725
|
+
display: flex;
|
|
726
|
+
align-items: center;
|
|
727
|
+
justify-content: center;
|
|
728
|
+
flex: none;
|
|
731
729
|
}
|
|
732
730
|
.footer-content {
|
|
733
|
-
max-width: 1180px;
|
|
734
|
-
margin: auto;
|
|
735
|
-
padding: 32px 0 60px;
|
|
736
731
|
display: flex;
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
.copyright {
|
|
741
|
-
font-weight: 400;
|
|
742
|
-
font-size: 12px;
|
|
743
|
-
line-height: 20px;
|
|
744
|
-
color: #6a7384;
|
|
745
|
-
padding-top: 8px;
|
|
732
|
+
align-items: center;
|
|
733
|
+
justify-content: center;
|
|
746
734
|
}
|
|
747
735
|
.footer-links {
|
|
748
736
|
display: flex;
|
|
749
737
|
align-items: center;
|
|
750
|
-
justify-content:
|
|
738
|
+
justify-content: center;
|
|
751
739
|
list-style: none;
|
|
752
740
|
font-weight: 400;
|
|
753
741
|
font-size: 12px;
|
|
754
|
-
color: #
|
|
742
|
+
color: #969ba5;
|
|
755
743
|
padding: 0;
|
|
756
744
|
margin: 0;
|
|
757
745
|
}
|
|
758
|
-
.footer-
|
|
759
|
-
|
|
760
|
-
height: 14px;
|
|
761
|
-
background: #a1a3a5;
|
|
762
|
-
margin: 0 10px;
|
|
746
|
+
.footer-links a {
|
|
747
|
+
color: inherit;
|
|
763
748
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
749
|
+
.footer-links a:hover {
|
|
750
|
+
color: #4d5157;
|
|
751
|
+
}
|
|
752
|
+
.footer-separator {
|
|
753
|
+
margin: 0 8px;
|
|
768
754
|
}
|
|
769
755
|
@media only screen and (max-width: 768px) {
|
|
756
|
+
.header-shell,
|
|
757
|
+
.header-content,
|
|
758
|
+
.head-menu {
|
|
759
|
+
height: 56px;
|
|
760
|
+
}
|
|
770
761
|
.logo {
|
|
771
762
|
width: auto;
|
|
772
|
-
height:
|
|
763
|
+
height: 20px;
|
|
773
764
|
}
|
|
774
765
|
.content {
|
|
775
|
-
padding:
|
|
766
|
+
padding: 24px 20px 72px;
|
|
776
767
|
}
|
|
777
|
-
.footer
|
|
778
|
-
|
|
779
|
-
align-items: center;
|
|
780
|
-
text-align: center;
|
|
768
|
+
.footer {
|
|
769
|
+
height: 56px;
|
|
781
770
|
}
|
|
782
771
|
.footer-links {
|
|
783
772
|
justify-content: center;
|
|
784
|
-
padding-top: 8px;
|
|
785
773
|
flex-wrap: wrap;
|
|
786
774
|
}
|
|
787
775
|
}`,o$e=t=>`
|
|
@@ -795,25 +783,15 @@ ${A.join(`
|
|
|
795
783
|
</div>
|
|
796
784
|
</div>
|
|
797
785
|
</div>
|
|
798
|
-
</header>`,a$e=
|
|
799
|
-
<footer>
|
|
800
|
-
<div class="footer">
|
|
801
|
-
<div class="footer-content">
|
|
802
|
-
<div>
|
|
803
|
-
<img class="logo" src="${t}" alt="edgeone Logo" referrerpolicy="no-referrer" onerror="this.style.visibility='hidden'" />
|
|
804
|
-
<div class="copyright">${e}</div>
|
|
805
|
-
</div>
|
|
806
|
-
<div>${r}</div>
|
|
807
|
-
</div>
|
|
808
|
-
</div>
|
|
786
|
+
</header>`,a$e=t=>`
|
|
787
|
+
<footer class="footer">
|
|
788
|
+
<div class="footer-content">${t}</div>
|
|
809
789
|
</footer>`,c$e=`
|
|
810
|
-
<svg id="successIcon" class="status-icon hidden" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
811
|
-
<
|
|
812
|
-
<path d="M7.5 12.5L10.5 15.5L16.5 9.5" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
790
|
+
<svg id="successIcon" class="status-icon hidden" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="color: green;">
|
|
791
|
+
<path fill="currentColor" d="M12 21a9 9 0 100-18 9 9 0 000 18zm11-9a11 11 0 11-22 0 11 11 0 0122 0zm-12.5 4.41L6.09 12l1.41-1.41 3 3 6-6L17.91 9l-7.41 7.41z" />
|
|
813
792
|
</svg>
|
|
814
|
-
<svg id="errorIcon" class="status-icon hidden" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
815
|
-
<
|
|
816
|
-
<path d="M9 9L15 15M15 9L9 15" stroke="#fff" stroke-width="2" stroke-linecap="round" />
|
|
793
|
+
<svg id="errorIcon" class="status-icon hidden" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="color: red;">
|
|
794
|
+
<path fill="currentColor" d="M12 3a9 9 0 100 18 9 9 0 000-18zM1 12a11 11 0 1122 0 11 11 0 01-22 0zm12-5.5V14h-2V6.5h2zm-2 9h2v2h-2v-2z" />
|
|
817
795
|
</svg>`,Dde=Ffr,Yw=t=>JSON.stringify(t).replace(/</g,"\\u003c"),u$e=({region:t})=>{let e=n$e(t),r=t$e(t),n=r$e(t),o=i$e(t);return`<!DOCTYPE html>
|
|
818
796
|
<html lang="${e.lang}">
|
|
819
797
|
<head>
|
|
@@ -835,7 +813,7 @@ ${A.join(`
|
|
|
835
813
|
<button id="actionButton" class="action-button hidden" type="button">${e.successButtonText}</button>
|
|
836
814
|
<p id="detail" class="detail hidden"></p>
|
|
837
815
|
</div>
|
|
838
|
-
</main>${a$e(
|
|
816
|
+
</main>${a$e(o)}
|
|
839
817
|
</div>
|
|
840
818
|
<script>
|
|
841
819
|
const connectPath = ${Yw(Dde)};
|
|
@@ -919,7 +897,7 @@ ${A.join(`
|
|
|
919
897
|
<button id="actionButton" class="action-button hidden" type="button">${n.successButtonText}</button>
|
|
920
898
|
<p id="detail" class="detail hidden"></p>
|
|
921
899
|
</div>
|
|
922
|
-
</main>${a$e(
|
|
900
|
+
</main>${a$e(c)}
|
|
923
901
|
</div>
|
|
924
902
|
<script>
|
|
925
903
|
const consoleUrl = ${Yw(o)};
|