shopify 3.93.1 → 3.93.2

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.
Files changed (39) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +64 -0
  2. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  3. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +6 -3
  4. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  5. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  6. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  7. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  8. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  9. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  10. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  11. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  12. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/package.json +5 -5
  14. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  15. package/dist/assets/hydrogen/starter/vite.config.ts +1 -1
  16. package/dist/assets/hydrogen/vite/vite.config.js +1 -1
  17. package/dist/{chunk-WOERFYNW.js → chunk-4QL77VYJ.js} +2 -2
  18. package/dist/{chunk-TCRHJ3ZH.js → chunk-4VZV4LQX.js} +2 -2
  19. package/dist/{chunk-SVYSLNQH.js → chunk-5FCKEHCK.js} +177 -181
  20. package/dist/{chunk-VLDSGLBP.js → chunk-DDTYWTF2.js} +1 -1
  21. package/dist/{chunk-XV44IQDO.js → chunk-FYQIRCLV.js} +1 -1
  22. package/dist/{chunk-T57REQVZ.js → chunk-IG47ZDRU.js} +1 -1
  23. package/dist/{chunk-PB3UDYWH.js → chunk-MX6WWR5F.js} +1 -1
  24. package/dist/{chunk-P3ASN7B5.js → chunk-XVFYDYZA.js} +1 -1
  25. package/dist/{error-handler-54XVSWV5.js → error-handler-GZ2I7BG5.js} +1 -1
  26. package/dist/hooks/postrun.js +1 -1
  27. package/dist/hooks/prerun.js +1 -1
  28. package/dist/{http-proxy-node16-KBILO6A6.js → http-proxy-node16-DSQMBVDI.js} +1 -1
  29. package/dist/index.js +753 -753
  30. package/dist/{lib-EN3PX6IK.js → lib-GGVLMXY5.js} +1 -1
  31. package/dist/{local-JCUIPKND.js → local-WHQ3ZS4K.js} +1 -1
  32. package/dist/{node-package-manager-P7JQBCHZ.js → node-package-manager-6XMPTNUI.js} +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/{ui-XTVYPIVY.js → ui-GZ7DOSHP.js} +1 -1
  35. package/dist/{workerd-3GJRSBJN.js → workerd-LJU6AVMQ.js} +1 -1
  36. package/oclif.manifest.json +2 -3
  37. package/package.json +7 -7
  38. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  39. /package/dist/{morph-6DCXNO2H.js → morph-Q32V442A.js} +0 -0
@@ -1,198 +1,194 @@
1
- import{c as lh,i as hh,o as Wv}from"./chunk-KADPE3PY.js";import{a as uh,b as ch}from"./chunk-T57REQVZ.js";import{I as Sn,Na as Vl,Qa as Yl,X as Il,Z as Nl,_ as Rl,b as kl,pa as Ml,y as Pl,ya as Ul}from"./chunk-TCRHJ3ZH.js";import{F as Bl,G as jl,I as $l,Q as Ko,U as ql,W as Hl}from"./chunk-PB3UDYWH.js";import{$a as An,Ad as ah,Ba as z,Bc as th,Bd as dt,Da as Cn,Db as Xl,Dc as jr,Eb as Kl,Ed as K,Fa as Dn,Fb as Ql,Ja as Xo,Jc as F,Ka as Mr,Lc as On,Xc as rh,Ya as $,_c as ih,a as Cl,ad as nh,bb as _n,ca as Al,fa as _l,gc as Zl,ha as Sl,hc as eh,ic as V,ja as Fl,ka as Tl,nb as Ll,oc as Je,qd as sh,sc as nt,tb as Pv,tc as Br,uc as Ee,va as U,wb as Fn,wc as Tn,wd as X,xc as ht,xd as oh,ya as Rr,yc as ft,yd as ie}from"./chunk-WOERFYNW.js";import{b as zl,d as Jl,e as Qo,f as Lr,g as Rv,h as Zo,i as Mv,j as Lv,k as Gl,l as ea,n as jv,o as $v,p as ta,q as qv,r as Uv,s as zv}from"./chunk-P3ASN7B5.js";import{a as Nv,c as Wl}from"./chunk-XV44IQDO.js";import{c as Bv,e as Hv}from"./chunk-QJEBL3WX.js";import{b as Iv}from"./chunk-EENHXSWU.js";import{b as N,d as G,e as $t,g as me,h as qt,i as bn,k as Dl,n as Fi}from"./chunk-NOSKVZWJ.js";import{a as kv,b as Ol}from"./chunk-T4M5CWAO.js";import{a as S,c as w,e as At,g as y}from"./chunk-VPRTJUIN.js";var xh=w((PN,yh)=>{"use strict";y();var or=class e extends Error{constructor(t,r,i){super("[ParserError] "+t,r,i),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Pn=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Oi=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Pn(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new or("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,r){r&&this.next(r),this.stack.push(this.state),this.state=new Pn(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new or("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new or("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new or("Must declare a parseStart method")}};Oi.END=1114112;Oi.Error=or;yh.exports=Oi});var wh=w((NN,vh)=>{"use strict";y();vh.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var In=w((MN,Eh)=>{"use strict";y();Eh.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var Ch=w((BN,bh)=>{"use strict";y();var qr=In(),sa=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${qr(2,this.getUTCMonth()+1)}-${qr(2,this.getUTCDate())}`,r=`${qr(2,this.getUTCHours())}:${qr(2,this.getUTCMinutes())}:${qr(2,this.getUTCSeconds())}.${qr(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};bh.exports=e=>{let t=new sa(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var _h=w(($N,Ah)=>{"use strict";y();var Dh=In(),ew=global.Date,oa=class extends ew{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Dh(2,this.getUTCMonth()+1)}-${Dh(2,this.getUTCDate())}`}};Ah.exports=e=>{let t=new oa(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Fh=w((HN,Sh)=>{"use strict";y();var Nn=In(),aa=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${Nn(2,this.getUTCHours())}:${Nn(2,this.getUTCMinutes())}:${Nn(2,this.getUTCSeconds())}.${Nn(3,this.getUTCMilliseconds())}`}};Sh.exports=e=>{let t=new aa(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Rn=w((exports,module)=>{"use strict";y();module.exports=makeParserClass(xh());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=wh(),createDateTimeFloat=Ch(),createDate=_h(),createTime=Fh(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
2
- `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let n=this.ctx,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(i){return this.state.resultTable?this.state.resultTable.push(i):this.state.resultTable=[i],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(i){return this.returnNow({key:this.state.resultTable,value:i})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)&&(!isTable(this.ctx[i])||this.ctx[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[i]=this.ctx[i]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)||(this.ctx[i]=List()),isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[i])){let n=Table();this.ctx[i].push(n),this.ctx=n}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else{if(isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(i){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(i){return this.returnNow(i)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let i="\\u00";return this.char<16&&(i+="0"),i+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${i} instead`))}recordMultiEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(i){try{let n=parseInt(i,16);if(n>=SURROGATE_FIRST&&n<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(n))}catch(n){throw this.error(TomlError.wrap(n))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(i){if(this.state.resultArr){let n=this.state.resultArr[_contentType],o=tomlType(i);if(n!==o)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${n} and ${o}`))}else this.state.resultArr=InlineList(tomlType(i));return isFloat(i)||isInteger(i)?this.state.resultArr.push(i.valueOf()):this.state.resultArr.push(i),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(i){let n=this.state.resultTable,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Mn=w((WN,Th)=>{"use strict";y();Th.exports=tw;function tw(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
1
+ import{c as ah,i as uh,o as Jv}from"./chunk-KADPE3PY.js";import{a as sh,b as oh}from"./chunk-IG47ZDRU.js";import{I as Fn,Na as zl,Qa as Jl,X as kl,Z as Pl,_ as Il,b as Tl,pa as Nl,y as Ol,ya as ql}from"./chunk-4VZV4LQX.js";import{F as Ml,G as Ll,I as Bl,Q as Xo,U as jl,W as $l}from"./chunk-MX6WWR5F.js";import{$a as _n,Ad as nh,Ba as W,Bc as Ql,Bd as ht,Da as Dn,Db as Gl,Dc as Br,Eb as Vl,Ed as K,Fa as An,Fb as Xl,Ja as Vo,Jc as T,Ka as Rr,Lc as kn,Xc as Zl,Ya as $,_c as eh,a as El,ad as th,bb as Sn,ca as Cl,fa as Dl,gc as Yl,ha as Al,hc as Kl,ic as V,ja as _l,ka as Sl,nb as Rl,oc as We,qd as rh,sc as rt,tb as Nv,tc as Lr,uc as we,va as U,wb as Tn,wc as On,wd as Y,xc as ct,xd as ih,ya as Nr,yc as lt,yd as ie}from"./chunk-4QL77VYJ.js";import{b as Hl,d as Ul,e as Yo,f as Mr,g as Lv,h as Ko,i as Bv,j as jv,k as Wl,l as Qo,n as qv,o as Hv,p as Zo,q as Uv,r as Wv,s as zv}from"./chunk-XVFYDYZA.js";import{b as Mv,c as ut}from"./chunk-FYQIRCLV.js";import{c as $v}from"./chunk-QJEBL3WX.js";import{b as Rv}from"./chunk-EENHXSWU.js";import{b as N,d as G,e as Bt,g as me,h as jt,i as Cn,k as bl,n as Fi}from"./chunk-NOSKVZWJ.js";import{a as Iv,b as Fl}from"./chunk-T4M5CWAO.js";import{a as S,c as w,e as Ct,g as y}from"./chunk-VPRTJUIN.js";var mh=w((LN,dh)=>{"use strict";y();var nr=class e extends Error{constructor(t,r,i){super("[ParserError] "+t,r,i),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},In=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Oi=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new In(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new nr("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,r){r&&this.next(r),this.stack.push(this.state),this.state=new In(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new nr("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new nr("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new nr("Must declare a parseStart method")}};Oi.END=1114112;Oi.Error=nr;dh.exports=Oi});var yh=w((jN,gh)=>{"use strict";y();gh.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Nn=w((qN,xh)=>{"use strict";y();xh.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var wh=w((UN,vh)=>{"use strict";y();var $r=Nn(),ia=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${$r(2,this.getUTCMonth()+1)}-${$r(2,this.getUTCDate())}`,r=`${$r(2,this.getUTCHours())}:${$r(2,this.getUTCMinutes())}:${$r(2,this.getUTCSeconds())}.${$r(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};vh.exports=e=>{let t=new ia(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ch=w((zN,bh)=>{"use strict";y();var Eh=Nn(),tw=global.Date,na=class extends tw{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Eh(2,this.getUTCMonth()+1)}-${Eh(2,this.getUTCDate())}`}};bh.exports=e=>{let t=new na(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ah=w((GN,Dh)=>{"use strict";y();var Rn=Nn(),sa=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${Rn(2,this.getUTCHours())}:${Rn(2,this.getUTCMinutes())}:${Rn(2,this.getUTCSeconds())}.${Rn(3,this.getUTCMilliseconds())}`}};Dh.exports=e=>{let t=new sa(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Mn=w((exports,module)=>{"use strict";y();module.exports=makeParserClass(mh());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=yh(),createDateTimeFloat=wh(),createDate=Ch(),createTime=Ah(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
2
+ `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let n=this.ctx,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(i){return this.state.resultTable?this.state.resultTable.push(i):this.state.resultTable=[i],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(i){return this.returnNow({key:this.state.resultTable,value:i})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)&&(!isTable(this.ctx[i])||this.ctx[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[i]=this.ctx[i]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)||(this.ctx[i]=List()),isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[i])){let n=Table();this.ctx[i].push(n),this.ctx=n}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else{if(isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(i){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(i){return this.returnNow(i)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let i="\\u00";return this.char<16&&(i+="0"),i+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${i} instead`))}recordMultiEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(i){try{let n=parseInt(i,16);if(n>=SURROGATE_FIRST&&n<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(n))}catch(n){throw this.error(TomlError.wrap(n))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(i){if(this.state.resultArr){let n=this.state.resultArr[_contentType],o=tomlType(i);if(n!==o)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${n} and ${o}`))}else this.state.resultArr=InlineList(tomlType(i));return isFloat(i)||isInteger(i)?this.state.resultArr.push(i.valueOf()):this.state.resultArr.push(i),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(i){let n=this.state.resultTable,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Ln=w((YN,_h)=>{"use strict";y();_h.exports=rw;function rw(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
3
3
  `,t&&t.split){let i=t.split(/\n/),n=String(Math.min(i.length,e.line+3)).length,o=" ";for(;o.length<n;)o+=" ";for(let s=Math.max(0,e.line-1);s<Math.min(i.length,e.line+2);++s){let u=String(s+1);if(u.length<n&&(u=" "+u),e.line===s){r+=u+"> "+i[s]+`
4
4
  `,r+=o+" ";for(let l=0;l<e.col;++l)r+=" ";r+=`^
5
5
  `}else r+=u+": "+i[s]+`
6
6
  `}}return e.message=r+`
7
- `,e}});var kh=w((GN,Oh)=>{"use strict";y();Oh.exports=nw;var rw=Rn(),iw=Mn();function nw(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new rw;try{return t.parse(e),t.finish()}catch(r){throw iw(r,e)}}});var Nh=w((YN,Ih)=>{"use strict";y();Ih.exports=ow;var sw=Rn(),Ph=Mn();function ow(e,t){t||(t={});let r=0,i=t.blocksize||40960,n=new sw;return new Promise((s,u)=>{setImmediate(o,r,i,s,u)});function o(s,u,l,m){if(s>=e.length)try{return l(n.finish())}catch(d){return m(Ph(d,e))}try{n.parse(e.slice(s,s+u)),setImmediate(o,s+u,u,l,m)}catch(d){m(Ph(d,e))}}}});var Lh=w((KN,Mh)=>{"use strict";y();Mh.exports=uw;var aw=S("stream"),Rh=Rn();function uw(e){return e?cw(e):lw(e)}function cw(e){let t=new Rh;return e.setEncoding("utf8"),new Promise((r,i)=>{let n,o=!1,s=!1;function u(){if(o=!0,!n)try{r(t.finish())}catch(d){i(d)}}function l(d){s=!0,i(d)}e.once("end",u),e.once("error",l),m();function m(){n=!0;let d;for(;(d=e.read())!==null;)try{t.parse(d)}catch(f){return l(f)}if(n=!1,o)return u();s||e.once("readable",m)}})}function lw(){let e=new Rh;return new aw.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r))}catch(n){this.emit("error",n)}i()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}});var Bh=w((ZN,ki)=>{"use strict";y();ki.exports=kh();ki.exports.async=Nh();ki.exports.stream=Lh();ki.exports.prettyError=Mn()});var Jh=w((tR,la)=>{"use strict";y();la.exports=hw;la.exports.value=ca;function hw(e){if(e===null)throw ar("null");if(e===void 0)throw ar("undefined");if(typeof e!="object")throw ar(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=ke(e);if(t!=="table")throw ar(t);return ua("","",e)}function ar(e){return new Error("Can only stringify objects, not "+e)}function fw(){return new Error("Array values can't have mixed types")}function jh(e){return Object.keys(e).filter(t=>$h(e[t]))}function dw(e){return Object.keys(e).filter(t=>!$h(e[t]))}function Ln(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&typeof e[r].toJSON=="function"&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function ua(e,t,r){r=Ln(r);var i,n;i=jh(r),n=dw(r);var o=[],s=t||"";i.forEach(l=>{var m=ke(r[l]);m!=="undefined"&&m!=="null"&&o.push(s+Bn(l)+" = "+Uh(r[l],!0))}),o.length>0&&o.push("");var u=e&&i.length>0?t+" ":"";return n.forEach(l=>{o.push(Dw(e,u,l,r[l]))}),o.join(`
8
- `)}function $h(e){switch(ke(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||ke(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function ke(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function Bn(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:qh(t)}function qh(e){return'"'+Hh(e).replace(/"/g,'\\"')+'"'}function pw(e){return"'"+e+"'"}function mw(e,t){for(;t.length<e;)t="0"+t;return t}function Hh(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+mw(4,t.codePointAt(0).toString(16)))}function gw(e){let t=e.split(/\n/).map(r=>Hh(r).replace(/"(?="")/g,'\\"')).join(`
7
+ `,e}});var Fh=w((QN,Sh)=>{"use strict";y();Sh.exports=sw;var iw=Mn(),nw=Ln();function sw(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new iw;try{return t.parse(e),t.finish()}catch(r){throw nw(r,e)}}});var kh=w((eR,Oh)=>{"use strict";y();Oh.exports=aw;var ow=Mn(),Th=Ln();function aw(e,t){t||(t={});let r=0,i=t.blocksize||40960,n=new ow;return new Promise((s,u)=>{setImmediate(o,r,i,s,u)});function o(s,u,l,m){if(s>=e.length)try{return l(n.finish())}catch(p){return m(Th(p,e))}try{n.parse(e.slice(s,s+u)),setImmediate(o,s+u,u,l,m)}catch(p){m(Th(p,e))}}}});var Nh=w((rR,Ih)=>{"use strict";y();Ih.exports=cw;var uw=S("stream"),Ph=Mn();function cw(e){return e?lw(e):hw(e)}function lw(e){let t=new Ph;return e.setEncoding("utf8"),new Promise((r,i)=>{let n,o=!1,s=!1;function u(){if(o=!0,!n)try{r(t.finish())}catch(p){i(p)}}function l(p){s=!0,i(p)}e.once("end",u),e.once("error",l),m();function m(){n=!0;let p;for(;(p=e.read())!==null;)try{t.parse(p)}catch(f){return l(f)}if(n=!1,o)return u();s||e.once("readable",m)}})}function hw(){let e=new Ph;return new uw.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r))}catch(n){this.emit("error",n)}i()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}});var Rh=w((nR,ki)=>{"use strict";y();ki.exports=Fh();ki.exports.async=kh();ki.exports.stream=Nh();ki.exports.prettyError=Ln()});var Uh=w((oR,ua)=>{"use strict";y();ua.exports=fw;ua.exports.value=aa;function fw(e){if(e===null)throw sr("null");if(e===void 0)throw sr("undefined");if(typeof e!="object")throw sr(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=Oe(e);if(t!=="table")throw sr(t);return oa("","",e)}function sr(e){return new Error("Can only stringify objects, not "+e)}function pw(){return new Error("Array values can't have mixed types")}function Mh(e){return Object.keys(e).filter(t=>Lh(e[t]))}function dw(e){return Object.keys(e).filter(t=>!Lh(e[t]))}function Bn(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&typeof e[r].toJSON=="function"&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function oa(e,t,r){r=Bn(r);var i,n;i=Mh(r),n=dw(r);var o=[],s=t||"";i.forEach(l=>{var m=Oe(r[l]);m!=="undefined"&&m!=="null"&&o.push(s+jn(l)+" = "+$h(r[l],!0))}),o.length>0&&o.push("");var u=e&&i.length>0?t+" ":"";return n.forEach(l=>{o.push(Aw(e,u,l,r[l]))}),o.join(`
8
+ `)}function Lh(e){switch(Oe(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||Oe(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function Oe(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function jn(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:Bh(t)}function Bh(e){return'"'+jh(e).replace(/"/g,'\\"')+'"'}function mw(e){return"'"+e+"'"}function gw(e,t){for(;t.length<e;)t="0"+t;return t}function jh(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+gw(4,t.codePointAt(0).toString(16)))}function yw(e){let t=e.split(/\n/).map(r=>jh(r).replace(/"(?="")/g,'\\"')).join(`
9
9
  `);return t.slice(-1)==='"'&&(t+=`\\
10
10
  `),`"""
11
- `+t+'"""'}function Uh(e,t){let r=ke(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),ca(e,r)}function ca(e,t){switch(t||(t=ke(e)),t){case"string-multiline":return gw(e);case"string":return qh(e);case"string-literal":return pw(e);case"integer":return zh(e);case"float":return yw(e);case"boolean":return xw(e);case"datetime":return vw(e);case"array":return bw(e.filter(r=>ke(r)!=="null"&&ke(r)!=="undefined"&&ke(r)!=="nan"));case"table":return Cw(e);default:throw ar(t)}}function zh(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function yw(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],i=t[1]||0;return zh(r)+"."+i}function xw(e){return String(e)}function vw(e){return e.toISOString()}function ww(e){return e==="float"||e==="integer"}function Ew(e){var t=ke(e[0]);return e.every(r=>ke(r)===t)?t:e.every(r=>ww(ke(r)))?"float":"mixed"}function Wh(e){let t=Ew(e);if(t==="mixed")throw fw();return t}function bw(e){e=Ln(e);let t=Wh(e);var r="[",i=e.map(n=>ca(n,t));return i.join(", ").length>60||/\n/.test(i)?r+=`
11
+ `+t+'"""'}function $h(e,t){let r=Oe(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),aa(e,r)}function aa(e,t){switch(t||(t=Oe(e)),t){case"string-multiline":return yw(e);case"string":return Bh(e);case"string-literal":return mw(e);case"integer":return qh(e);case"float":return xw(e);case"boolean":return vw(e);case"datetime":return ww(e);case"array":return Cw(e.filter(r=>Oe(r)!=="null"&&Oe(r)!=="undefined"&&Oe(r)!=="nan"));case"table":return Dw(e);default:throw sr(t)}}function qh(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function xw(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],i=t[1]||0;return qh(r)+"."+i}function vw(e){return String(e)}function ww(e){return e.toISOString()}function Ew(e){return e==="float"||e==="integer"}function bw(e){var t=Oe(e[0]);return e.every(r=>Oe(r)===t)?t:e.every(r=>Ew(Oe(r)))?"float":"mixed"}function Hh(e){let t=bw(e);if(t==="mixed")throw pw();return t}function Cw(e){e=Bn(e);let t=Hh(e);var r="[",i=e.map(n=>aa(n,t));return i.join(", ").length>60||/\n/.test(i)?r+=`
12
12
  `+i.join(`,
13
13
  `)+`
14
- `:r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}function Cw(e){e=Ln(e);var t=[];return Object.keys(e).forEach(r=>{t.push(Bn(r)+" = "+Uh(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function Dw(e,t,r,i){var n=ke(i);if(n==="array")return Aw(e,t,r,i);if(n==="table")return _w(e,t,r,i);throw ar(n)}function Aw(e,t,r,i){i=Ln(i),Wh(i);var n=ke(i[0]);if(n!=="table")throw ar(n);var o=e+Bn(r),s="";return i.forEach(u=>{s.length>0&&(s+=`
14
+ `:r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}function Dw(e){e=Bn(e);var t=[];return Object.keys(e).forEach(r=>{t.push(jn(r)+" = "+$h(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function Aw(e,t,r,i){var n=Oe(i);if(n==="array")return _w(e,t,r,i);if(n==="table")return Sw(e,t,r,i);throw sr(n)}function _w(e,t,r,i){i=Bn(i),Hh(i);var n=Oe(i[0]);if(n!=="table")throw sr(n);var o=e+jn(r),s="";return i.forEach(u=>{s.length>0&&(s+=`
15
15
  `),s+=t+"[["+o+`]]
16
- `,s+=ua(o+".",t,u)}),s}function _w(e,t,r,i){var n=e+Bn(r),o="";return jh(i).length>0&&(o+=t+"["+n+`]
17
- `),o+ua(n+".",t,i)}});var Gh=w(ha=>{"use strict";y();ha.parse=Bh();ha.stringify=Jh()});var Zh=w((aR,be)=>{y();var Xh={};Xh.__wbindgen_placeholder__=be.exports;var ce,{TextEncoder:Sw,TextDecoder:Fw}=S("util");function fa(e){return e==null}var Hr=null;function Un(){return(Hr===null||Hr.buffer.detached===!0||Hr.buffer.detached===void 0&&Hr.buffer!==ce.memory.buffer)&&(Hr=new DataView(ce.memory.buffer)),Hr}var Pi=0,$n=null;function qn(){return($n===null||$n.byteLength===0)&&($n=new Uint8Array(ce.memory.buffer)),$n}var Hn=new Sw("utf-8"),Tw=typeof Hn.encodeInto=="function"?function(e,t){return Hn.encodeInto(e,t)}:function(e,t){let r=Hn.encode(e);return t.set(r),{read:e.length,written:r.length}};function da(e,t,r){if(r===void 0){let u=Hn.encode(e),l=t(u.length,1)>>>0;return qn().subarray(l,l+u.length).set(u),Pi=u.length,l}let i=e.length,n=t(i,1)>>>0,o=qn(),s=0;for(;s<i;s++){let u=e.charCodeAt(s);if(u>127)break;o[n+s]=u}if(s!==i){s!==0&&(e=e.slice(s)),n=r(n,i,i=s+e.length*3,1)>>>0;let u=qn().subarray(n+s,n+i),l=Tw(e,u);s+=l.written,n=r(n,i,s,1)>>>0}return Pi=s,n}var Kh=new Fw("utf-8",{ignoreBOM:!0,fatal:!0});Kh.decode();function zn(e,t){return e=e>>>0,Kh.decode(qn().subarray(e,e+t))}function Qh(e){let t=ce.__wbindgen_export_0.get(e);return ce.__externref_table_dealloc(e),t}be.exports.echoToml=function(e){let t,r;try{let o=da(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),s=Pi,u=ce.echoToml(o,s);var i=u[0],n=u[1];if(u[3])throw i=0,n=0,Qh(u[2]);return t=i,r=n,zn(i,n)}finally{ce.__wbindgen_free(t,r,1)}};be.exports.updateTomlValues=function(e,t){let r,i;try{let s=da(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),u=Pi,l=ce.updateTomlValues(s,u,t);var n=l[0],o=l[1];if(l[3])throw n=0,o=0,Qh(l[2]);return r=n,i=o,zn(n,o)}finally{ce.__wbindgen_free(r,i,1)}};be.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};be.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};be.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};be.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};be.exports.__wbindgen_init_externref_table=function(){let e=ce.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};be.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};be.exports.__wbindgen_is_undefined=function(e){return e===void 0};be.exports.__wbindgen_number_get=function(e,t){let r=t,i=typeof r=="number"?r:void 0;Un().setFloat64(e+8,fa(i)?0:i,!0),Un().setInt32(e+0,!fa(i),!0)};be.exports.__wbindgen_string_get=function(e,t){let r=t,i=typeof r=="string"?r:void 0;var n=fa(i)?0:da(i,ce.__wbindgen_malloc,ce.__wbindgen_realloc),o=Pi;Un().setInt32(e+4,o,!0),Un().setInt32(e+0,n,!0)};be.exports.__wbindgen_string_new=function(e,t){return zn(e,t)};be.exports.__wbindgen_throw=function(e,t){throw new Error(zn(e,t))};var Ow=S("path").join(__dirname,"toml_patch_bg.wasm"),kw=S("fs").readFileSync(Ow),Pw=new WebAssembly.Module(kw),Iw=new WebAssembly.Instance(Pw,Xh);ce=Iw.exports;be.exports.__wasm=ce;ce.__wbindgen_start()});var Ht=w(xa=>{"use strict";y();Object.defineProperty(xa,"__esModule",{value:!0});var jw=e=>{process.stdout.write(e)},$w=e=>{process.stderr.write(e)};xa.default={stderr:$w,stdout:jw}});var _t=w(Pe=>{"use strict";y();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.existsSync=Pe.safeReadJson=Pe.readJsonSync=Pe.readJson=Pe.fileExists=Pe.dirExists=void 0;var rf=S("node:fs"),va=S("node:fs/promises"),qw=async e=>{let t;try{t=await(0,va.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Pe.dirExists=qw;var Hw=async e=>{let t;try{t=await(0,va.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Pe.fileExists=Hw;async function nf(e){let t=await(0,va.readFile)(e,"utf8");return JSON.parse(t)}Pe.readJson=nf;function Uw(e,t=!0){let r=(0,rf.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Pe.readJsonSync=Uw;async function zw(e){try{return await nf(e)}catch{}}Pe.safeReadJson=zw;function Ww(e){return(0,rf.existsSync)(e)}Pe.existsSync=Ww});var le=w(H=>{"use strict";y();Object.defineProperty(H,"__esModule",{value:!0});H.mergeNestedObjects=H.mapValues=H.uniq=H.isNotFalsy=H.isTruthy=H.capitalize=H.sumBy=H.maxBy=H.isProd=H.castArray=H.sortBy=H.last=H.uniqBy=H.compact=H.pickBy=void 0;function Jw(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}H.pickBy=Jw;function Gw(e){return e.filter(t=>!!t)}H.compact=Gw;function Vw(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}H.uniqBy=Vw;function Yw(e){if(e)return e.at(-1)}H.last=Yw;function wa(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=wa(e[0],t[0]);return r!==0?r:wa(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Xw(e,t){return e.sort((r,i)=>wa(t(r),t(i)))}H.sortBy=Xw;function Kw(e){return e===void 0?[]:Array.isArray(e)?e:[e]}H.castArray=Kw;function Qw(){return!["development","test"].includes(process.env.NODE_ENV??"")}H.isProd=Qw;function Zw(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}H.maxBy=Zw;function eE(e,t){return e.reduce((r,i)=>r+t(i),0)}H.sumBy=eE;function tE(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}H.capitalize=tE;function rE(e){return["1","true","y","yes"].includes(e.toLowerCase())}H.isTruthy=rE;function iE(e){return!["0","false","n","no"].includes(e.toLowerCase())}H.isNotFalsy=iE;function nE(e){return[...new Set(e)].sort()}H.uniq=nE;function sE(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}H.mapValues=sE;function oE(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function aE(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(oE(r,t)??{})).reverse())}H.mergeNestedObjects=aE});var of=w(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.string=Ce.url=Ce.file=Ce.directory=Ce.integer=Ce.boolean=Ce.custom=void 0;var uE=S("node:url"),sf=_t(),cE=le();function ur(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}Ce.custom=ur;Ce.boolean=ur({parse:async e=>!!e&&(0,cE.isNotFalsy)(e)});Ce.integer=ur({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Ce.directory=ur({async parse(e,t,r){return r.exists?(0,sf.dirExists)(e):e}});Ce.file=ur({async parse(e,t,r){return r.exists?(0,sf.fileExists)(e):e}});Ce.url=ur({async parse(e){try{return new uE.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var lE=ur({});Ce.string=lE});var af=w((UR,hE)=>{hE.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var st=w(ba=>{"use strict";y();Object.defineProperty(ba,"__esModule",{value:!0});var fE=S("node:fs"),dE=S("node:path"),Ea=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:af().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,fE.readFileSync)((0,dE.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};ba.default=Ea});var Ut=w(Xn=>{"use strict";y();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.settings=void 0;global.oclif||(global.oclif={});Xn.settings=global.oclif});var cr=w(Ur=>{"use strict";y();Object.defineProperty(Ur,"__esModule",{value:!0});Ur.errtermwidth=Ur.stdtermwidth=void 0;var pE=Ut();function uf(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var cf=Number.parseInt(process.env.OCLIF_COLUMNS,10)||pE.settings.columns;Ur.stdtermwidth=cf||uf(process.stdout);Ur.errtermwidth=cf||uf(process.stderr)});var Aa=w(Kn=>{"use strict";y();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.Logger=void 0;var lf=S("node:fs/promises"),mE=S("node:path"),gE=Lr(),yE=()=>new Date().toISOString(),Ca,xE=e=>new Promise(t=>{Ca&&Ca.unref(),Ca=setTimeout(()=>t(null),e)});function vE(e){return e.endsWith(`
18
- `)?e.replace(/\n$/,""):e}var Da=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await xE(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,lf.mkdir)((0,mE.dirname)(this.file),{recursive:!0}),await(0,lf.appendFile)(this.file,r.join(`
16
+ `,s+=oa(o+".",t,u)}),s}function Sw(e,t,r,i){var n=e+jn(r),o="";return Mh(i).length>0&&(o+=t+"["+n+`]
17
+ `),o+oa(n+".",t,i)}});var Wh=w(ca=>{"use strict";y();ca.parse=Rh();ca.stringify=Uh()});var Yh=w((fR,Ee)=>{y();var Gh={};Gh.__wbindgen_placeholder__=Ee.exports;var ce,{TextEncoder:Fw,TextDecoder:Tw}=S("util");function la(e){return e==null}var qr=null;function Wn(){return(qr===null||qr.buffer.detached===!0||qr.buffer.detached===void 0&&qr.buffer!==ce.memory.buffer)&&(qr=new DataView(ce.memory.buffer)),qr}var Pi=0,qn=null;function Hn(){return(qn===null||qn.byteLength===0)&&(qn=new Uint8Array(ce.memory.buffer)),qn}var Un=new Fw("utf-8"),Ow=typeof Un.encodeInto=="function"?function(e,t){return Un.encodeInto(e,t)}:function(e,t){let r=Un.encode(e);return t.set(r),{read:e.length,written:r.length}};function ha(e,t,r){if(r===void 0){let u=Un.encode(e),l=t(u.length,1)>>>0;return Hn().subarray(l,l+u.length).set(u),Pi=u.length,l}let i=e.length,n=t(i,1)>>>0,o=Hn(),s=0;for(;s<i;s++){let u=e.charCodeAt(s);if(u>127)break;o[n+s]=u}if(s!==i){s!==0&&(e=e.slice(s)),n=r(n,i,i=s+e.length*3,1)>>>0;let u=Hn().subarray(n+s,n+i),l=Ow(e,u);s+=l.written,n=r(n,i,s,1)>>>0}return Pi=s,n}var Vh=new Tw("utf-8",{ignoreBOM:!0,fatal:!0});Vh.decode();function zn(e,t){return e=e>>>0,Vh.decode(Hn().subarray(e,e+t))}function Xh(e){let t=ce.__wbindgen_export_0.get(e);return ce.__externref_table_dealloc(e),t}Ee.exports.echoToml=function(e){let t,r;try{let o=ha(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),s=Pi,u=ce.echoToml(o,s);var i=u[0],n=u[1];if(u[3])throw i=0,n=0,Xh(u[2]);return t=i,r=n,zn(i,n)}finally{ce.__wbindgen_free(t,r,1)}};Ee.exports.updateTomlValues=function(e,t){let r,i;try{let s=ha(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),u=Pi,l=ce.updateTomlValues(s,u,t);var n=l[0],o=l[1];if(l[3])throw n=0,o=0,Xh(l[2]);return r=n,i=o,zn(n,o)}finally{ce.__wbindgen_free(r,i,1)}};Ee.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};Ee.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};Ee.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};Ee.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};Ee.exports.__wbindgen_init_externref_table=function(){let e=ce.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};Ee.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};Ee.exports.__wbindgen_is_undefined=function(e){return e===void 0};Ee.exports.__wbindgen_number_get=function(e,t){let r=t,i=typeof r=="number"?r:void 0;Wn().setFloat64(e+8,la(i)?0:i,!0),Wn().setInt32(e+0,!la(i),!0)};Ee.exports.__wbindgen_string_get=function(e,t){let r=t,i=typeof r=="string"?r:void 0;var n=la(i)?0:ha(i,ce.__wbindgen_malloc,ce.__wbindgen_realloc),o=Pi;Wn().setInt32(e+4,o,!0),Wn().setInt32(e+0,n,!0)};Ee.exports.__wbindgen_string_new=function(e,t){return zn(e,t)};Ee.exports.__wbindgen_throw=function(e,t){throw new Error(zn(e,t))};var kw=S("path").join(__dirname,"toml_patch_bg.wasm"),Pw=S("fs").readFileSync(kw),Iw=new WebAssembly.Module(Pw),Nw=new WebAssembly.Instance(Iw,Gh);ce=Nw.exports;Ee.exports.__wasm=ce;ce.__wbindgen_start()});var $t=w(ga=>{"use strict";y();Object.defineProperty(ga,"__esModule",{value:!0});var $w=e=>{process.stdout.write(e)},qw=e=>{process.stderr.write(e)};ga.default={stderr:qw,stdout:$w}});var Dt=w(ke=>{"use strict";y();Object.defineProperty(ke,"__esModule",{value:!0});ke.existsSync=ke.safeReadJson=ke.readJsonSync=ke.readJson=ke.fileExists=ke.dirExists=void 0;var Zh=S("node:fs"),ya=S("node:fs/promises"),Hw=async e=>{let t;try{t=await(0,ya.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};ke.dirExists=Hw;var Uw=async e=>{let t;try{t=await(0,ya.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};ke.fileExists=Uw;async function ef(e){let t=await(0,ya.readFile)(e,"utf8");return JSON.parse(t)}ke.readJson=ef;function Ww(e,t=!0){let r=(0,Zh.readFileSync)(e,"utf8");return t?JSON.parse(r):r}ke.readJsonSync=Ww;async function zw(e){try{return await ef(e)}catch{}}ke.safeReadJson=zw;function Jw(e){return(0,Zh.existsSync)(e)}ke.existsSync=Jw});var le=w(H=>{"use strict";y();Object.defineProperty(H,"__esModule",{value:!0});H.mergeNestedObjects=H.mapValues=H.uniq=H.isNotFalsy=H.isTruthy=H.capitalize=H.sumBy=H.maxBy=H.isProd=H.castArray=H.sortBy=H.last=H.uniqBy=H.compact=H.pickBy=void 0;function Gw(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}H.pickBy=Gw;function Vw(e){return e.filter(t=>!!t)}H.compact=Vw;function Xw(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}H.uniqBy=Xw;function Yw(e){if(e)return e.at(-1)}H.last=Yw;function xa(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=xa(e[0],t[0]);return r!==0?r:xa(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Kw(e,t){return e.sort((r,i)=>xa(t(r),t(i)))}H.sortBy=Kw;function Qw(e){return e===void 0?[]:Array.isArray(e)?e:[e]}H.castArray=Qw;function Zw(){return!["development","test"].includes(process.env.NODE_ENV??"")}H.isProd=Zw;function eE(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}H.maxBy=eE;function tE(e,t){return e.reduce((r,i)=>r+t(i),0)}H.sumBy=tE;function rE(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}H.capitalize=rE;function iE(e){return["1","true","y","yes"].includes(e.toLowerCase())}H.isTruthy=iE;function nE(e){return!["0","false","n","no"].includes(e.toLowerCase())}H.isNotFalsy=nE;function sE(e){return[...new Set(e)].sort()}H.uniq=sE;function oE(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}H.mapValues=oE;function aE(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function uE(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(aE(r,t)??{})).reverse())}H.mergeNestedObjects=uE});var rf=w(be=>{"use strict";y();Object.defineProperty(be,"__esModule",{value:!0});be.string=be.url=be.file=be.directory=be.integer=be.boolean=be.custom=void 0;var cE=S("node:url"),tf=Dt(),lE=le();function or(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}be.custom=or;be.boolean=or({parse:async e=>!!e&&(0,lE.isNotFalsy)(e)});be.integer=or({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});be.directory=or({async parse(e,t,r){return r.exists?(0,tf.dirExists)(e):e}});be.file=or({async parse(e,t,r){return r.exists?(0,tf.fileExists)(e):e}});be.url=or({async parse(e){try{return new cE.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var hE=or({});be.string=hE});var nf=w((VR,fE)=>{fE.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var it=w(wa=>{"use strict";y();Object.defineProperty(wa,"__esModule",{value:!0});var pE=S("node:fs"),dE=S("node:path"),va=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:nf().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,pE.readFileSync)((0,dE.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};wa.default=va});var qt=w(Kn=>{"use strict";y();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.settings=void 0;global.oclif||(global.oclif={});Kn.settings=global.oclif});var ar=w(Hr=>{"use strict";y();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.errtermwidth=Hr.stdtermwidth=void 0;var mE=qt();function sf(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var of=Number.parseInt(process.env.OCLIF_COLUMNS,10)||mE.settings.columns;Hr.stdtermwidth=of||sf(process.stdout);Hr.errtermwidth=of||sf(process.stderr)});var Ca=w(Qn=>{"use strict";y();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.Logger=void 0;var af=S("node:fs/promises"),gE=S("node:path"),yE=Mr(),xE=()=>new Date().toISOString(),Ea,vE=e=>new Promise(t=>{Ea&&Ea.unref(),Ea=setTimeout(()=>t(null),e)});function wE(e){return e.endsWith(`
18
+ `)?e.replace(/\n$/,""):e}var ba=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await vE(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,af.mkdir)((0,gE.dirname)(this.file),{recursive:!0}),await(0,af.appendFile)(this.file,r.join(`
19
19
  `)+`
20
- `)}),await this.flushing}log(t){t=gE(vE(t));let r=t.split(`
21
- `).map(i=>`${yE()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};Kn.Logger=Da});var lr=w(Qn=>{"use strict";y();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.config=void 0;var Ii=Ut(),wE=Aa();function EE(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}Qn.config={get debug(){return!!Ii.settings.debug},set debug(e){Ii.settings.debug=e,e&&EE()},get errlog(){return Ii.settings.errlog},set errlog(e){e?(this.errorLogger=new wE.Logger(e),Ii.settings.errlog=e):(delete this.errorLogger,delete Ii.settings.errlog)},errorLogger:void 0}});var hr=w(St=>{"use strict";y();var Ri=St&&St.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(St,"__esModule",{value:!0});St.CLIError=St.addOclifExitCode=void 0;var hf=Ri(Je()),bE=Ri(Jl()),_a=Ri(Qo()),CE=Ri(ea()),DE=Ri(st()),AE=cr(),_E=lr();function ff(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?DE.default.getInstance().get("exitCodes")?.default??2:t.exit,e}St.addOclifExitCode=ff;var Ni=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),ff(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return hf.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,bE.default)(super.stack,{pretty:!0})}render(){if(_E.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,CE.default)(t,AE.errtermwidth-6,{hard:!0,trim:!1}),t=(0,_a.default)(t,3),t=(0,_a.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,_a.default)(t,1),t}};St.CLIError=Ni;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return hf.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(Ni||(St.CLIError=Ni={}))});var es=w(Zn=>{"use strict";y();Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ExitError=void 0;var SE=hr(),Sa=class extends SE.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};Zn.ExitError=Sa});var rs=w(fr=>{"use strict";y();var df=fr&&fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fr,"__esModule",{value:!0});fr.applyPrettyPrintOptions=void 0;var ts=df(Qo()),FE=df(ea()),TE=cr(),OE=lr();function kE(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}fr.applyPrettyPrintOptions=kE;var PE=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
20
+ `)}),await this.flushing}log(t){t=yE(wE(t));let r=t.split(`
21
+ `).map(i=>`${xE()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};Qn.Logger=ba});var ur=w(Zn=>{"use strict";y();Object.defineProperty(Zn,"__esModule",{value:!0});Zn.config=void 0;var Ii=qt(),EE=Ca();function bE(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}Zn.config={get debug(){return!!Ii.settings.debug},set debug(e){Ii.settings.debug=e,e&&bE()},get errlog(){return Ii.settings.errlog},set errlog(e){e?(this.errorLogger=new EE.Logger(e),Ii.settings.errlog=e):(delete this.errorLogger,delete Ii.settings.errlog)},errorLogger:void 0}});var cr=w(At=>{"use strict";y();var Ri=At&&At.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(At,"__esModule",{value:!0});At.CLIError=At.addOclifExitCode=void 0;var uf=Ri(We()),CE=Ri(Ul()),Da=Ri(Yo()),DE=Ri(Qo()),AE=Ri(it()),_E=ar(),SE=ur();function cf(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?AE.default.getInstance().get("exitCodes")?.default??2:t.exit,e}At.addOclifExitCode=cf;var Ni=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),cf(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return uf.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,CE.default)(super.stack,{pretty:!0})}render(){if(SE.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,DE.default)(t,_E.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Da.default)(t,3),t=(0,Da.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Da.default)(t,1),t}};At.CLIError=Ni;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return uf.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(Ni||(At.CLIError=Ni={}))});var ts=w(es=>{"use strict";y();Object.defineProperty(es,"__esModule",{value:!0});es.ExitError=void 0;var FE=cr(),Aa=class extends FE.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};es.ExitError=Aa});var is=w(lr=>{"use strict";y();var lf=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lr,"__esModule",{value:!0});lr.applyPrettyPrintOptions=void 0;var rs=lf(Yo()),TE=lf(Qo()),OE=ar(),kE=ur();function PE(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}lr.applyPrettyPrintOptions=PE;var IE=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
22
22
  `);return`${t}
23
- ${(0,ts.default)(r,2)}`};function IE(e){if(OE.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,u=i?`${n||"Error"}: ${i}`:void 0,l=r?`Code: ${r}`:void 0,m=PE(s),d=o?`Reference: ${o}`:void 0,f=[u,l,m,d].filter(Boolean).join(`
24
- `),p=(0,FE.default)(f,TE.errtermwidth-6,{hard:!0,trim:!1});return p=(0,ts.default)(p,3),p=(0,ts.default)(p,1,{includeEmptyLines:!0,indent:t||""}),p=(0,ts.default)(p,1),p}fr.default=IE});var Fa=w($e=>{"use strict";y();var NE=$e&&$e.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RE=$e&&$e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ME=$e&&$e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&NE(t,e,r);return RE(t,e),t},LE=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});$e.error=void 0;var BE=LE(Ht()),pf=lr(),mf=hr(),gf=ME(rs());function yf(e,t={}){let r;if(typeof e=="string")r=new mf.CLIError(e,t);else if(e instanceof Error)r=(0,mf.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,gf.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,gf.default)(r);i&&BE.default.stderr(i+`
25
- `),pf.config.errorLogger&&pf.config.errorLogger.log(r?.stack??"")}else throw r}$e.error=yf;$e.default=yf});var Oa=w(is=>{"use strict";y();Object.defineProperty(is,"__esModule",{value:!0});is.ModuleLoadError=void 0;var jE=hr(),Ta=class extends jE.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};is.ModuleLoadError=Ta});var vf=w((l2,xf)=>{y();xf.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var bf=w((f2,Ef)=>{"use strict";y();var $E=vf(),qE=Array.prototype.concat,HE=Array.prototype.slice,wf=Ef.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];$E(o)?r=qE.call(r,HE.call(o)):r.push(o)}return r};wf.wrap=function(e){return function(){return e(wf(arguments))}}});var _f=w((p2,Af)=>{y();var Mi=Mv(),Li=bf(),Cf=Object.hasOwnProperty,Df=Object.create(null);for(ns in Mi)Cf.call(Mi,ns)&&(Df[Mi[ns]]=ns);var ns,qe=Af.exports={to:{},get:{}};qe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=qe.get.hsl(e),i="hsl";break;case"hwb":r=qe.get.hwb(e),i="hwb";break;default:r=qe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};qe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],u,l,m;if(u=e.match(r)){for(m=u[2],u=u[1],l=0;l<3;l++){var d=l*2;s[l]=parseInt(u.slice(d,d+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(u=e.match(t)){for(u=u[1],m=u[3],l=0;l<3;l++)s[l]=parseInt(u[l]+u[l],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(u=e.match(i)){for(l=0;l<3;l++)s[l]=parseInt(u[l+1],0);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else if(u=e.match(n)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(u[l+1])*2.55);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else return(u=e.match(o))?u[1]==="transparent"?[0,0,0,0]:Cf.call(Mi,u[1])?(s=Mi[u[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=zt(s[l],0,255);return s[3]=zt(s[3],0,1),s};qe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=zt(parseFloat(r[2]),0,100),s=zt(parseFloat(r[3]),0,100),u=zt(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};qe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=zt(parseFloat(r[2]),0,100),s=zt(parseFloat(r[3]),0,100),u=zt(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};qe.to.hex=function(){var e=Li(arguments);return"#"+ss(e[0])+ss(e[1])+ss(e[2])+(e[3]<1?ss(Math.round(e[3]*255)):"")};qe.to.rgb=function(){var e=Li(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};qe.to.rgb.percent=function(){var e=Li(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};qe.to.hsl=function(){var e=Li(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};qe.to.hwb=function(){var e=Li(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};qe.to.keyword=function(e){return Df[e.slice(0,3)]};function zt(e,t,r){return Math.min(Math.max(t,e),r)}function ss(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var Tf=w((g2,Ff)=>{y();var zr=_f(),He=Lv(),Sf=["keyword","gray","hex"],ka={};for(let e of Object.keys(He))ka[[...He[e].labels].sort().join("")]=e;var os={};function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(t&&t in Sf&&(t=null),t&&!(t in He))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ge)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=zr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=He[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=He[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=Pa(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in ka))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=ka[o];let{labels:s}=He[this.model],u=[];for(r=0;r<s.length;r++)u.push(e[s[r]]);this.color=Pa(u)}if(os[this.model])for(i=He[this.model].channels,r=0;r<i;r++){let n=os[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ge.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in zr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return zr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return zr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=He[this.model],{labels:r}=He[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new ge([...this.color.map(zE(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new ge([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Q("rgb",0,he(255)),green:Q("rgb",1,he(255)),blue:Q("rgb",2,he(255)),hue:Q(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Q("hsl",1,he(100)),lightness:Q("hsl",2,he(100)),saturationv:Q("hsv",1,he(100)),value:Q("hsv",2,he(100)),chroma:Q("hcg",1,he(100)),gray:Q("hcg",2,he(100)),white:Q("hwb",1,he(100)),wblack:Q("hwb",2,he(100)),cyan:Q("cmyk",0,he(100)),magenta:Q("cmyk",1,he(100)),yellow:Q("cmyk",2,he(100)),black:Q("cmyk",3,he(100)),x:Q("xyz",0,he(95.047)),y:Q("xyz",1,he(100)),z:Q("xyz",2,he(108.833)),l:Q("lab",0,he(100)),a:Q("lab",1),b:Q("lab",2),keyword(e){return e!==void 0?new ge(e):He[this.model].keyword(this.color)},hex(e){return e!==void 0?new ge(e):zr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new ge(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),zr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return ge.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),u=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-u;return ge.rgb(u*r.red()+l*i.red(),u*r.green()+l*i.green(),u*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(He)){if(Sf.includes(e))continue;let{channels:t}=He[e];ge.prototype[e]=function(...r){return this.model===e?new ge(this):r.length>0?new ge(r,e):new ge([...WE(He[this.model][e].raw(this.color)),this.valpha],e)},ge[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=Pa(r,t)),new ge(i,e)}}function UE(e,t){return Number(e.toFixed(t))}function zE(e){return function(t){return UE(t,e)}}function Q(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(os[i]||(os[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function he(e){return function(t){return Math.max(0,Math.min(e,t))}}function WE(e){return Array.isArray(e)?e:[e]}function Pa(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}Ff.exports=ge});var Of=w(Wr=>{"use strict";y();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.THEME_KEYS=Wr.STANDARD_CHALK=void 0;Wr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];Wr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var dr=w(De=>{"use strict";y();var JE=De&&De.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),GE=De&&De.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),VE=De&&De.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&JE(t,e,r);return GE(t,e),t},YE=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(De,"__esModule",{value:!0});De.getColor=De.parseTheme=De.colorize=void 0;var kf=YE(Je()),XE=VE(Tf()),KE=Of();function Pf(e){return KE.STANDARD_CHALK.includes(e)}function QE(e,t){return Pf(e)?kf.default[e](t):e?kf.default.hex(e)(t):t}De.colorize=QE;function ZE(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,If(r)]).filter(([t,r])=>r))}De.parseTheme=ZE;function If(e){try{return Pf(e)?e:new XE.default(e).hex()}catch{}}De.getColor=If});var as=w(Ft=>{"use strict";y();var Lf=Ft&&Ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.memoizedWarn=Ft.warn=void 0;var eb=Lf(Ht()),Nf=lr(),Rf=hr(),tb=Lf(rs());function Ia(e){let t;if(typeof e=="string")t=new Rf.CLIError.Warn(e);else if(e instanceof Error)t=(0,Rf.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,tb.default)(t);r&&eb.default.stderr(r+`
26
- `),Nf.config.errorLogger&&Nf.config.errorLogger.log(t?.stack??"")}Ft.warn=Ia;var Mf=new Set;function rb(e){Mf.has(e)||Ia(e),Mf.add(e)}Ft.memoizedWarn=rb;Ft.default=Ia});var Na=w((D2,Bf)=>{y();function ib(e){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=n,r.enabled=u,r.humanize=Nv(),r.destroy=m,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let f=0;for(let p=0;p<d.length;p++)f=(f<<5)-f+d.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(d){let f,p=null,a,c;function h(...g){if(!h.enabled)return;let x=h,v=Number(new Date),E=v-(f||v);x.diff=E,x.prev=f,x.curr=v,f=v,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let C=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(O,P)=>{if(O==="%%")return"%";C++;let L=r.formatters[P];if(typeof L=="function"){let j=g[C];O=L.call(x,j),g.splice(C,1),C--}return O}),r.formatArgs.call(x,g),(x.log||r.log).apply(x,g)}return h.namespace=d,h.useColors=r.useColors(),h.color=r.selectColor(d),h.extend=i,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(a!==r.namespaces&&(a=r.namespaces,c=r.enabled(d)),c),set:g=>{p=g}}),typeof r.init=="function"&&r.init(h),h}function i(d,f){let p=r(this.namespace+(typeof f>"u"?":":f)+d);return p.log=this.log,p}function n(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let f=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(d,f){let p=0,a=0,c=-1,h=0;for(;p<d.length;)if(a<f.length&&(f[a]===d[p]||f[a]==="*"))f[a]==="*"?(c=a,h=p,a++):(p++,a++);else if(c!==-1)a=c+1,h++,p=h;else return!1;for(;a<f.length&&f[a]==="*";)a++;return a===f.length}function s(){let d=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),d}function u(d){for(let f of r.skips)if(o(d,f))return!1;for(let f of r.names)if(o(d,f))return!0;return!1}function l(d){return d instanceof Error?d.stack||d.message:d}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Bf.exports=ib});var jf=w((Ie,us)=>{y();Ie.formatArgs=sb;Ie.save=ob;Ie.load=ab;Ie.useColors=nb;Ie.storage=ub();Ie.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ie.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function nb(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function sb(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+us.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),e.splice(i,0,t)}Ie.log=console.debug||console.log||(()=>{});function ob(e){try{e?Ie.storage.setItem("debug",e):Ie.storage.removeItem("debug")}catch{}}function ab(){let e;try{e=Ie.storage.getItem("debug")||Ie.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ub(){try{return localStorage}catch{}}us.exports=Na()(Ie);var{formatters:cb}=us.exports;cb.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var qf=w((ye,ls)=>{y();var lb=S("tty"),cs=S("util");ye.init=yb;ye.log=pb;ye.formatArgs=fb;ye.save=mb;ye.load=gb;ye.useColors=hb;ye.destroy=cs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ye.colors=[6,2,3,4,5,1];try{let e=Wl();e&&(e.stderr||e).level>=2&&(ye.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ye.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(n,o)=>o.toUpperCase()),i=process.env[t];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),e[r]=i,e},{});function hb(){return"colors"in ye.inspectOpts?!!ye.inspectOpts.colors:lb.isatty(process.stderr.fd)}function fb(e){let{namespace:t,useColors:r}=this;if(r){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),o=` ${n};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
27
- `).join(`
28
- `+o),e.push(n+"m+"+ls.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=db()+t+" "+e[0]}function db(){return ye.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pb(...e){return process.stderr.write(cs.formatWithOptions(ye.inspectOpts,...e)+`
29
- `)}function mb(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function gb(){return process.env.DEBUG}function yb(e){e.inspectOpts={};let t=Object.keys(ye.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ye.inspectOpts[t[r]]}ls.exports=Na()(ye);var{formatters:$f}=ls.exports;$f.o=function(e){return this.inspectOpts.colors=this.useColors,cs.inspect(e,this.inspectOpts).split(`
30
- `).map(t=>t.trim()).join(" ")};$f.O=function(e){return this.inspectOpts.colors=this.useColors,cs.inspect(e,this.inspectOpts)}});var ot=w((F2,Ra)=>{y();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ra.exports=jf():Ra.exports=qf()});var Gf=w(Jr=>{"use strict";y();var xb=Jr&&Jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.readTSConfig=void 0;var vb=xb(ot()),Hf=S("node:fs/promises"),Wf=S("node:path"),wb=as(),Uf=le(),Eb=(0,vb.default)("read-tsconfig");function zf(e,t){try{return S.resolve(t,{paths:[e]})}catch{}}async function Jf(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Wf.dirname)(e);if(i!==e)return Jf(i,t)}async function bb(e,t="tsconfig.json"){let r=[],i;try{i=jv()}catch{try{i=S(e+"/node_modules/typescript")}catch{}}if(!i){(0,wb.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await Jf(o,async u=>(await(0,Hf.readdir)(u)).includes("package.json"));if(s)try{let u=await(0,Hf.readFile)(o,"utf8"),l=i?.parseConfigFileTextToJson(o,u).config;if(r.push(l),l.extends){if(l.extends.startsWith(".")){let d=zf(s,l.extends);return d?n(d):void 0}let m=zf(s,l.extends);if(m)return n(m)}return l}catch(u){Eb(u)}};return await n((0,Wf.join)(e,t)),{compilerOptions:(0,Uf.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Uf.mergeNestedObjects)(r,"ts-node")}}Jr.readTSConfig=bb});var Gr=w(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.collectUsableIds=pt.getCommandIdPermutations=pt.getPermutations=pt.Debug=void 0;var Vf=ot();function Cb(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Db(...e){if(!Vf)return(...r)=>{};let t=Vf(["config",...e].join(":"));return t.enabled&&Cb(),(...r)=>t(...r)}pt.Debug=Db;function Ma(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Ma(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let u=0,l=s.length;u<=l;u++){let m=s.slice(0,u),d=s.slice(u),f=[...m,i,...d];t.push(f)}}return t}pt.getPermutations=Ma;function Ab(e){return Ma(e.split(":")).flatMap(t=>t.join(":"))}pt.getCommandIdPermutations=Ab;var _b=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));pt.collectUsableIds=_b});var Vr=w(Ge=>{"use strict";y();var Sb=Ge&&Ge.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.tsPath=Ge.TS_CONFIGS=void 0;var Yf=S("node:fs/promises"),Ne=S("node:path"),Fb=Sb(st()),Bi=as(),Xf=Ut(),Tb=_t(),Ob=Gf(),Qf=le(),kb=Gr(),ne=(0,kb.Debug)("ts-path");Ge.TS_CONFIGS={};var Kf=new Set;function Pb(){return process.execPath.split(Ne.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Ne.sep).includes("ts-node")||process.execArgv[0].split(Ne.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Ne.sep).includes("tsx")?"tsx":"node"}var hs=Pb();function Ib(e){return"code"in e&&e.code==="ENOENT"}async function Nb(e){try{if(Ge.TS_CONFIGS[e])return Ge.TS_CONFIGS[e];let t=await(0,Ob.readTSConfig)(e);return t?(ne("tsconfig: %O",t),Ge.TS_CONFIGS[e]=t,Ge.TS_CONFIGS[e]):void 0}catch(t){if(Ib(t))return;ne(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,Bi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Rb(e,t){if(Kf.has(e))return;ne("registering ts-node at",e);let r=S.resolve("ts-node",{paths:[e,__dirname]});ne("ts-node path:",r);let i;try{i=S(r)}catch{ne(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,Bi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Ne.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Ne.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Ne.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Ne.join)(e,t.compilerOptions.baseUrl)):o.push((0,Ne.join)(e,"src"));let{baseUrl:s,rootDir:u,...l}=t.compilerOptions,m={compilerOptions:{...l,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};ne("ts-node options: %O",m),i.register(m),Kf.add(e)}function Mb(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Lb(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return hs==="ts-node"&&i>=20}async function Bb(e,t){let r=await Nb(e);if(!r)return t;ne(`Determining path for ${t}`),hs==="tsx"||hs==="bun"?ne(`Skipping ts-node registration for ${e} because the runtime is: ${hs}`):await Rb(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,u=o??(s??[])[0]??i;if(!u)return ne(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return ne(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let l=(0,Ne.join)(e,n),m=(0,Ne.join)(e,u),d=(0,Ne.relative)(l,t),f=(0,Ne.join)(m,d).replace(/\.js$/,"");return ne(`lib dir: ${l}`),ne(`src dir: ${m}`),ne(`src directory to find: ${f}`),(0,Tb.existsSync)(f)?(ne(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Yf.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Yf.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(ne(`Found source file for ${t} at ${f}`),f):(ne(`No source file found. Returning default path ${t}`),(0,Qf.isProd)()||(0,Bi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function jb(e,t,r){let i=r?.options.isRoot?r:Fb.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Ne.join)(e,t);let n=Xf.settings.enableAutoTranspile??Xf.settings.tsnodeEnabled;if(n===!1)return ne(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Qf.isProd)();if(n===void 0&&o&&r?.type!=="link")return ne(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Mb(i,r,o))return ne(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,Bi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Lb(e,r,o))return ne(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,Bi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Bb(e,t)}catch(s){return ne(s),t}}Ge.tsPath=jb});var ji=w(mt=>{"use strict";y();Object.defineProperty(mt,"__esModule",{value:!0});mt.isPathModule=mt.loadWithDataFromManifest=mt.loadWithData=mt.load=void 0;var $b=S("node:fs"),fs=S("node:path"),ja=S("node:url"),Zf=Vr(),La=Oa(),td=_t(),qb=$v(),Hb=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],Ub=e=>e.type!==void 0;function $a(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new La.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function zb(e,t){let r,i;try{return{filePath:r,isESM:i}=await rd(e,t),i?await import((0,ja.pathToFileURL)(r).href):S(r)}catch(n){$a(n,i,r??t)}}mt.load=zb;async function Wb(e,t){let r,i;try{({filePath:r,isESM:i}=await rd(e,t));let n=i?await import((0,ja.pathToFileURL)(r).href):S(r);return{filePath:r,isESM:i,module:n}}catch(n){$a(n,i,r??t)}}mt.loadWithData=Wb;async function Jb(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new La.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new La.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,fs.join)(t,n.join(fs.sep));try{let s=i?await import((0,ja.pathToFileURL)(o).href):S(o);return{filePath:o,isESM:i,module:s}}catch(s){$a(s,i,o??t)}}mt.loadWithDataFromManifest=Jb;function Ba(e){switch((0,fs.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return qb.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}mt.isPathModule=Ba;async function rd(e,t){let r,i;try{i=S.resolve(t),r=Ba(i)}catch{i=(Ub(e)?await(0,Zf.tsPath)(e.root,t,e):await(0,Zf.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,td.existsSync)(i)){n=!0;try{(0,$b.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=ed(i);!s&&o&&(s=ed((0,fs.join)(i,"index"))),s&&(i=s)}r=Ba(i)}return{filePath:i,isESM:r}}function ed(e){for(let t of Hb){let r=`${e}${t}`;if((0,td.existsSync)(r))return r}return null}});var ps=w(ds=>{"use strict";y();Object.defineProperty(ds,"__esModule",{value:!0});ds.SINGLE_COMMAND_CLI_SYMBOL=void 0;ds.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var qa=w(ms=>{"use strict";y();Object.defineProperty(ms,"__esModule",{value:!0});ms.cacheDefaultValue=void 0;var Gb=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};ms.cacheDefaultValue=Gb});var Xr=w(Yr=>{"use strict";y();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.toConfiguredId=Yr.toStandardizedId=void 0;function Vb(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Yr.toStandardizedId=Vb;function Yb(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Yr.toConfiguredId=Yb});var ys=w(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.ensureArgObject=void 0;function Xb(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}gs.ensureArgObject=Xb});var id=w(xs=>{"use strict";y();Object.defineProperty(xs,"__esModule",{value:!0});xs.DocOpts=void 0;var Kb=ys(),Ha=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,Kb.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,u)=>s||this.flagMap[u]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let u=`${s}${o}`;t[n.name]=u,i.push(u)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};xs.DocOpts=Ha});var Kr=w(oe=>{"use strict";y();var Qb=oe&&oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Zb=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eC=oe&&oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Qb(t,e,r);return Zb(t,e),t};Object.defineProperty(oe,"__esModule",{value:!0});oe.normalizeArgv=oe.formatCommandDeprecationWarning=oe.formatFlagDeprecationWarning=oe.getHelpFlagAdditions=oe.standardizeIDFromArgv=oe.template=void 0;var tC=eC(zl()),rC=Gr(),iC=Xr();function nC(e){function t(r){return tC.render(r,e)}return t}oe.template=nC;var sC=e=>e.startsWith("-"),oC=e=>e.includes("=");function aC(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,rC.collectUsableIds)(t.commandIDs),s=[],u=d=>o.has(d),l=d=>(d?[...s,d]:s).filter(Boolean).join(":"),m=()=>{let d=l();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(u(l(d)))s.push(d);else{if(oC(d)||sC(d)||m())break;s.push(d)}return l()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function nd(e,t){return e.length===0||(t.topicSeparator===" "?e=aC(e,t):t.topicSeparator!==":"&&(e[0]=(0,iC.toStandardizedId)(e[0],t))),e}oe.standardizeIDFromArgv=nd;function uC(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}oe.getHelpFlagAdditions=uC;function cC(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}oe.formatFlagDeprecationWarning=cC;function lC(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}oe.formatCommandDeprecationWarning=lC;function hC(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=nd(t,e)),t}oe.normalizeArgv=hC});var vs=w(Qr=>{"use strict";y();var Zr=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.HelpFormatter=void 0;var fC=Zr(Je()),dC=Zr(Qo()),pC=Zr(Zo()),$i=Zr(Lr()),mC=Zr(qv()),gC=Zr(ea()),sd=dr(),yC=cr(),xC=Kr(),Ua=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:yC.stdtermwidth,...r},this.render=(0,xC.template)(this)}indent(t,r=this.indentSpacing){return(0,dC.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let l="";for(let[m,d]of t)!m&&!d||(m&&(r.stripAnsi&&(m=(0,$i.default)(m)),l+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,$i.default)(d)),l+=`
31
- `,l+=this.indent(this.wrap(d.trim(),r.indentation+2),4)),l+=`
23
+ ${(0,rs.default)(r,2)}`};function NE(e){if(kE.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,u=i?`${n||"Error"}: ${i}`:void 0,l=r?`Code: ${r}`:void 0,m=IE(s),p=o?`Reference: ${o}`:void 0,f=[u,l,m,p].filter(Boolean).join(`
24
+ `),d=(0,TE.default)(f,OE.errtermwidth-6,{hard:!0,trim:!1});return d=(0,rs.default)(d,3),d=(0,rs.default)(d,1,{includeEmptyLines:!0,indent:t||""}),d=(0,rs.default)(d,1),d}lr.default=NE});var _a=w(Be=>{"use strict";y();var RE=Be&&Be.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),ME=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LE=Be&&Be.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&RE(t,e,r);return ME(t,e),t},BE=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Be,"__esModule",{value:!0});Be.error=void 0;var jE=BE($t()),hf=ur(),ff=cr(),pf=LE(is());function df(e,t={}){let r;if(typeof e=="string")r=new ff.CLIError(e,t);else if(e instanceof Error)r=(0,ff.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,pf.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,pf.default)(r);i&&jE.default.stderr(i+`
25
+ `),hf.config.errorLogger&&hf.config.errorLogger.log(r?.stack??"")}else throw r}Be.error=df;Be.default=df});var Fa=w(ns=>{"use strict";y();Object.defineProperty(ns,"__esModule",{value:!0});ns.ModuleLoadError=void 0;var $E=cr(),Sa=class extends $E.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};ns.ModuleLoadError=Sa});var gf=w((m2,mf)=>{y();mf.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var vf=w((y2,xf)=>{"use strict";y();var qE=gf(),HE=Array.prototype.concat,UE=Array.prototype.slice,yf=xf.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];qE(o)?r=HE.call(r,UE.call(o)):r.push(o)}return r};yf.wrap=function(e){return function(){return e(yf(arguments))}}});var Cf=w((v2,bf)=>{y();var Mi=Bv(),Li=vf(),wf=Object.hasOwnProperty,Ef=Object.create(null);for(ss in Mi)wf.call(Mi,ss)&&(Ef[Mi[ss]]=ss);var ss,je=bf.exports={to:{},get:{}};je.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=je.get.hsl(e),i="hsl";break;case"hwb":r=je.get.hwb(e),i="hwb";break;default:r=je.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};je.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],u,l,m;if(u=e.match(r)){for(m=u[2],u=u[1],l=0;l<3;l++){var p=l*2;s[l]=parseInt(u.slice(p,p+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(u=e.match(t)){for(u=u[1],m=u[3],l=0;l<3;l++)s[l]=parseInt(u[l]+u[l],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(u=e.match(i)){for(l=0;l<3;l++)s[l]=parseInt(u[l+1],0);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else if(u=e.match(n)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(u[l+1])*2.55);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else return(u=e.match(o))?u[1]==="transparent"?[0,0,0,0]:wf.call(Mi,u[1])?(s=Mi[u[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=Ht(s[l],0,255);return s[3]=Ht(s[3],0,1),s};je.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.to.hex=function(){var e=Li(arguments);return"#"+os(e[0])+os(e[1])+os(e[2])+(e[3]<1?os(Math.round(e[3]*255)):"")};je.to.rgb=function(){var e=Li(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};je.to.rgb.percent=function(){var e=Li(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};je.to.hsl=function(){var e=Li(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};je.to.hwb=function(){var e=Li(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};je.to.keyword=function(e){return Ef[e.slice(0,3)]};function Ht(e,t,r){return Math.min(Math.max(t,e),r)}function os(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var _f=w((E2,Af)=>{y();var Ur=Cf(),$e=jv(),Df=["keyword","gray","hex"],Ta={};for(let e of Object.keys($e))Ta[[...$e[e].labels].sort().join("")]=e;var as={};function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(t&&t in Df&&(t=null),t&&!(t in $e))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ge)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Ur.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=$e[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=$e[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=Oa(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Ta))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ta[o];let{labels:s}=$e[this.model],u=[];for(r=0;r<s.length;r++)u.push(e[s[r]]);this.color=Oa(u)}if(as[this.model])for(i=$e[this.model].channels,r=0;r<i;r++){let n=as[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ge.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Ur.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Ur.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Ur.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=$e[this.model],{labels:r}=$e[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new ge([...this.color.map(zE(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new ge([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Q("rgb",0,he(255)),green:Q("rgb",1,he(255)),blue:Q("rgb",2,he(255)),hue:Q(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Q("hsl",1,he(100)),lightness:Q("hsl",2,he(100)),saturationv:Q("hsv",1,he(100)),value:Q("hsv",2,he(100)),chroma:Q("hcg",1,he(100)),gray:Q("hcg",2,he(100)),white:Q("hwb",1,he(100)),wblack:Q("hwb",2,he(100)),cyan:Q("cmyk",0,he(100)),magenta:Q("cmyk",1,he(100)),yellow:Q("cmyk",2,he(100)),black:Q("cmyk",3,he(100)),x:Q("xyz",0,he(95.047)),y:Q("xyz",1,he(100)),z:Q("xyz",2,he(108.833)),l:Q("lab",0,he(100)),a:Q("lab",1),b:Q("lab",2),keyword(e){return e!==void 0?new ge(e):$e[this.model].keyword(this.color)},hex(e){return e!==void 0?new ge(e):Ur.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new ge(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Ur.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return ge.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),u=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-u;return ge.rgb(u*r.red()+l*i.red(),u*r.green()+l*i.green(),u*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys($e)){if(Df.includes(e))continue;let{channels:t}=$e[e];ge.prototype[e]=function(...r){return this.model===e?new ge(this):r.length>0?new ge(r,e):new ge([...JE($e[this.model][e].raw(this.color)),this.valpha],e)},ge[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=Oa(r,t)),new ge(i,e)}}function WE(e,t){return Number(e.toFixed(t))}function zE(e){return function(t){return WE(t,e)}}function Q(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(as[i]||(as[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function he(e){return function(t){return Math.max(0,Math.min(e,t))}}function JE(e){return Array.isArray(e)?e:[e]}function Oa(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}Af.exports=ge});var Sf=w(Wr=>{"use strict";y();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.THEME_KEYS=Wr.STANDARD_CHALK=void 0;Wr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];Wr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var hr=w(Ce=>{"use strict";y();var GE=Ce&&Ce.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),VE=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),XE=Ce&&Ce.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&GE(t,e,r);return VE(t,e),t},YE=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getColor=Ce.parseTheme=Ce.colorize=void 0;var Ff=YE(We()),KE=XE(_f()),QE=Sf();function Tf(e){return QE.STANDARD_CHALK.includes(e)}function ZE(e,t){return Tf(e)?Ff.default[e](t):e?Ff.default.hex(e)(t):t}Ce.colorize=ZE;function eb(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Of(r)]).filter(([t,r])=>r))}Ce.parseTheme=eb;function Of(e){try{return Tf(e)?e:new KE.default(e).hex()}catch{}}Ce.getColor=Of});var us=w(_t=>{"use strict";y();var Nf=_t&&_t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_t,"__esModule",{value:!0});_t.memoizedWarn=_t.warn=void 0;var tb=Nf($t()),kf=ur(),Pf=cr(),rb=Nf(is());function ka(e){let t;if(typeof e=="string")t=new Pf.CLIError.Warn(e);else if(e instanceof Error)t=(0,Pf.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,rb.default)(t);r&&tb.default.stderr(r+`
26
+ `),kf.config.errorLogger&&kf.config.errorLogger.log(t?.stack??"")}_t.warn=ka;var If=new Set;function ib(e){If.has(e)||ka(e),If.add(e)}_t.memoizedWarn=ib;_t.default=ka});var $f=w(zr=>{"use strict";y();var nb=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});zr.readTSConfig=void 0;var sb=nb(ut()),Rf=S("node:fs/promises"),Bf=S("node:path"),ob=us(),Mf=le(),ab=(0,sb.default)("read-tsconfig");function Lf(e,t){try{return S.resolve(t,{paths:[e]})}catch{}}async function jf(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Bf.dirname)(e);if(i!==e)return jf(i,t)}async function ub(e,t="tsconfig.json"){let r=[],i;try{i=qv()}catch{try{i=S(e+"/node_modules/typescript")}catch{}}if(!i){(0,ob.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await jf(o,async u=>(await(0,Rf.readdir)(u)).includes("package.json"));if(s)try{let u=await(0,Rf.readFile)(o,"utf8"),l=i?.parseConfigFileTextToJson(o,u).config;if(r.push(l),l.extends){if(l.extends.startsWith(".")){let p=Lf(s,l.extends);return p?n(p):void 0}let m=Lf(s,l.extends);if(m)return n(m)}return l}catch(u){ab(u)}};return await n((0,Bf.join)(e,t)),{compilerOptions:(0,Mf.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Mf.mergeNestedObjects)(r,"ts-node")}}zr.readTSConfig=ub});var Jr=w(ft=>{"use strict";y();Object.defineProperty(ft,"__esModule",{value:!0});ft.collectUsableIds=ft.getCommandIdPermutations=ft.getPermutations=ft.Debug=void 0;var qf=ut();function cb(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function lb(...e){if(!qf)return(...r)=>{};let t=qf(["config",...e].join(":"));return t.enabled&&cb(),(...r)=>t(...r)}ft.Debug=lb;function Pa(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Pa(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let u=0,l=s.length;u<=l;u++){let m=s.slice(0,u),p=s.slice(u),f=[...m,i,...p];t.push(f)}}return t}ft.getPermutations=Pa;function hb(e){return Pa(e.split(":")).flatMap(t=>t.join(":"))}ft.getCommandIdPermutations=hb;var fb=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));ft.collectUsableIds=fb});var Gr=w(ze=>{"use strict";y();var pb=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.tsPath=ze.TS_CONFIGS=void 0;var Hf=S("node:fs/promises"),Pe=S("node:path"),db=pb(it()),Bi=us(),Uf=qt(),mb=Dt(),gb=$f(),zf=le(),yb=Jr(),ne=(0,yb.Debug)("ts-path");ze.TS_CONFIGS={};var Wf=new Set;function xb(){return process.execPath.split(Pe.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("ts-node")||process.execArgv[0].split(Pe.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("tsx")?"tsx":"node"}var cs=xb();function vb(e){return"code"in e&&e.code==="ENOENT"}async function wb(e){try{if(ze.TS_CONFIGS[e])return ze.TS_CONFIGS[e];let t=await(0,gb.readTSConfig)(e);return t?(ne("tsconfig: %O",t),ze.TS_CONFIGS[e]=t,ze.TS_CONFIGS[e]):void 0}catch(t){if(vb(t))return;ne(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,Bi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Eb(e,t){if(Wf.has(e))return;ne("registering ts-node at",e);let r=S.resolve("ts-node",{paths:[e,__dirname]});ne("ts-node path:",r);let i;try{i=S(r)}catch{ne(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,Bi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Pe.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let p of t.compilerOptions.rootDirs)o.push((0,Pe.join)(e,p));else t.compilerOptions.rootDir?o.push((0,Pe.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Pe.join)(e,t.compilerOptions.baseUrl)):o.push((0,Pe.join)(e,"src"));let{baseUrl:s,rootDir:u,...l}=t.compilerOptions,m={compilerOptions:{...l,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};ne("ts-node options: %O",m),i.register(m),Wf.add(e)}function bb(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Cb(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return cs==="ts-node"&&i>=20}async function Db(e,t){let r=await wb(e);if(!r)return t;ne(`Determining path for ${t}`),cs==="tsx"||cs==="bun"?ne(`Skipping ts-node registration for ${e} because the runtime is: ${cs}`):await Eb(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,u=o??(s??[])[0]??i;if(!u)return ne(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return ne(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let l=(0,Pe.join)(e,n),m=(0,Pe.join)(e,u),p=(0,Pe.relative)(l,t),f=(0,Pe.join)(m,p).replace(/\.js$/,"");return ne(`lib dir: ${l}`),ne(`src dir: ${m}`),ne(`src directory to find: ${f}`),(0,mb.existsSync)(f)?(ne(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Hf.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Hf.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(ne(`Found source file for ${t} at ${f}`),f):(ne(`No source file found. Returning default path ${t}`),(0,zf.isProd)()||(0,Bi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Ab(e,t,r){let i=r?.options.isRoot?r:db.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Pe.join)(e,t);let n=Uf.settings.enableAutoTranspile??Uf.settings.tsnodeEnabled;if(n===!1)return ne(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,zf.isProd)();if(n===void 0&&o&&r?.type!=="link")return ne(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(bb(i,r,o))return ne(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,Bi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Cb(e,r,o))return ne(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,Bi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Db(e,t)}catch(s){return ne(s),t}}ze.tsPath=Ab});var ji=w(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.isPathModule=pt.loadWithDataFromManifest=pt.loadWithData=pt.load=void 0;var _b=S("node:fs"),ls=S("node:path"),Ra=S("node:url"),Jf=Gr(),Ia=Fa(),Vf=Dt(),Sb=Hv(),Fb=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],Tb=e=>e.type!==void 0;function Ma(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Ia.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function Ob(e,t){let r,i;try{return{filePath:r,isESM:i}=await Xf(e,t),i?await import((0,Ra.pathToFileURL)(r).href):S(r)}catch(n){Ma(n,i,r??t)}}pt.load=Ob;async function kb(e,t){let r,i;try{({filePath:r,isESM:i}=await Xf(e,t));let n=i?await import((0,Ra.pathToFileURL)(r).href):S(r);return{filePath:r,isESM:i,module:n}}catch(n){Ma(n,i,r??t)}}pt.loadWithData=kb;async function Pb(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Ia.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Ia.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,ls.join)(t,n.join(ls.sep));try{let s=i?await import((0,Ra.pathToFileURL)(o).href):S(o);return{filePath:o,isESM:i,module:s}}catch(s){Ma(s,i,o??t)}}pt.loadWithDataFromManifest=Pb;function Na(e){switch((0,ls.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return Sb.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}pt.isPathModule=Na;async function Xf(e,t){let r,i;try{i=S.resolve(t),r=Na(i)}catch{i=(Tb(e)?await(0,Jf.tsPath)(e.root,t,e):await(0,Jf.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Vf.existsSync)(i)){n=!0;try{(0,_b.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Gf(i);!s&&o&&(s=Gf((0,ls.join)(i,"index"))),s&&(i=s)}r=Na(i)}return{filePath:i,isESM:r}}function Gf(e){for(let t of Fb){let r=`${e}${t}`;if((0,Vf.existsSync)(r))return r}return null}});var fs=w(hs=>{"use strict";y();Object.defineProperty(hs,"__esModule",{value:!0});hs.SINGLE_COMMAND_CLI_SYMBOL=void 0;hs.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var La=w(ps=>{"use strict";y();Object.defineProperty(ps,"__esModule",{value:!0});ps.cacheDefaultValue=void 0;var Ib=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};ps.cacheDefaultValue=Ib});var Xr=w(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.toConfiguredId=Vr.toStandardizedId=void 0;function Nb(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Vr.toStandardizedId=Nb;function Rb(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Vr.toConfiguredId=Rb});var ms=w(ds=>{"use strict";y();Object.defineProperty(ds,"__esModule",{value:!0});ds.ensureArgObject=void 0;function Mb(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}ds.ensureArgObject=Mb});var Yf=w(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.DocOpts=void 0;var Lb=ms(),Ba=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,Lb.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,u)=>s||this.flagMap[u]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let u=`${s}${o}`;t[n.name]=u,i.push(u)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};gs.DocOpts=Ba});var Yr=w(oe=>{"use strict";y();var Bb=oe&&oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),jb=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$b=oe&&oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bb(t,e,r);return jb(t,e),t};Object.defineProperty(oe,"__esModule",{value:!0});oe.normalizeArgv=oe.formatCommandDeprecationWarning=oe.formatFlagDeprecationWarning=oe.getHelpFlagAdditions=oe.standardizeIDFromArgv=oe.template=void 0;var qb=$b(Hl()),Hb=Jr(),Ub=Xr();function Wb(e){function t(r){return qb.render(r,e)}return t}oe.template=Wb;var zb=e=>e.startsWith("-"),Jb=e=>e.includes("=");function Gb(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,Hb.collectUsableIds)(t.commandIDs),s=[],u=p=>o.has(p),l=p=>(p?[...s,p]:s).filter(Boolean).join(":"),m=()=>{let p=l();if(!p)return!1;let f=t.findCommand(p);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let p of n)if(u(l(p)))s.push(p);else{if(Jb(p)||zb(p)||m())break;s.push(p)}return l()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function Kf(e,t){return e.length===0||(t.topicSeparator===" "?e=Gb(e,t):t.topicSeparator!==":"&&(e[0]=(0,Ub.toStandardizedId)(e[0],t))),e}oe.standardizeIDFromArgv=Kf;function Vb(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}oe.getHelpFlagAdditions=Vb;function Xb(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}oe.formatFlagDeprecationWarning=Xb;function Yb(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}oe.formatCommandDeprecationWarning=Yb;function Kb(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=Kf(t,e)),t}oe.normalizeArgv=Kb});var ys=w(Kr=>{"use strict";y();var Qr=Kr&&Kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.HelpFormatter=void 0;var Qb=Qr(We()),Zb=Qr(Yo()),eC=Qr(Ko()),$i=Qr(Mr()),tC=Qr(Uv()),rC=Qr(Qo()),Qf=hr(),iC=ar(),nC=Yr(),ja=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:iC.stdtermwidth,...r},this.render=(0,nC.template)(this)}indent(t,r=this.indentSpacing){return(0,Zb.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let l="";for(let[m,p]of t)!m&&!p||(m&&(r.stripAnsi&&(m=(0,$i.default)(m)),l+=this.wrap(m.trim(),r.indentation)),p&&(r.stripAnsi&&(p=(0,$i.default)(p)),l+=`
27
+ `,l+=this.indent(this.wrap(p.trim(),r.indentation+2),4)),l+=`
32
28
 
33
- `);return l.trim()};if(r.multiline)return i();let n=(0,mC.default)(t.map(l=>l[0]).join(`
29
+ `);return l.trim()};if(r.multiline)return i();let n=(0,tC.default)(t.map(l=>l[0]).join(`
34
30
  `)),o="",s=r.spacer||`
35
- `,u="";for(let[l,m]of t){let d=m;if(u&&(o+=s,o+=u),u=l||"",r.stripAnsi&&(u=(0,$i.default)(u)),!d){u=u.trim();continue}r.stripAnsi&&(d=(0,$i.default)(d)),d=this.wrap(d.trim(),r.indentation+n+2);let[f,...p]=d.split(`
36
- `).map(a=>a.trim());if(u+=" ".repeat(n-(0,pC.default)(u)+2),u+=f,p.length!==0){if(p.length>4)return i();r.spacer||(s=`
31
+ `,u="";for(let[l,m]of t){let p=m;if(u&&(o+=s,o+=u),u=l||"",r.stripAnsi&&(u=(0,$i.default)(u)),!p){u=u.trim();continue}r.stripAnsi&&(p=(0,$i.default)(p)),p=this.wrap(p.trim(),r.indentation+n+2);let[f,...d]=p.split(`
32
+ `).map(a=>a.trim());if(u+=" ".repeat(n-(0,eC.default)(u)+2),u+=f,d.length!==0){if(d.length>4)return i();r.spacer||(s=`
37
33
  `),u+=`
38
- `,u+=this.indent(p.join(`
39
- `),n+2)}}return u&&(o+=s,o+=u),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let l=o;return[this.render(l.name),this.render(l.description)]}let[s,u]=o;return[this.render(s),u&&this.render(u)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,sd.colorize)(this.config?.theme?.sectionHeader,fC.default.bold(t)),(0,sd.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
40
- `);return this.opts.stripAnsi?(0,$i.default)(n):n}wrap(t,r=this.indentSpacing){return(0,gC.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};Qr.HelpFormatter=Ua});var za=w(pr=>{"use strict";y();var ad=pr&&pr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pr,"__esModule",{value:!0});pr.CommandHelp=void 0;var vC=ad(Je()),wC=ad(Lr()),fe=dr(),EC=ys(),od=Xr(),ei=le(),bC=id(),CC=vs(),ti=/\r\n|\n/;function DC(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var ws=class extends CC.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),(0,fe.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
41
- `)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,fe.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,fe.colorize)(this.config?.theme?.flag,i),n?(0,fe.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?bC.DocOpts.generate(this.command):(0,ei.compact)([this.command.id,Object.values(this.command.args??{})?.filter(t=>!t.hidden).map(t=>this.arg(t)).join(" ")]).join(" ")}description(){let t=this.command,r;if(this.opts.hideCommandSummaryInDescription)r=(t.description||"").split(ti).slice(1);else if(t.description){let i=t.summary?`${t.summary}
42
- `:null;r=i?[...i.split(ti),...(t.description||"").split(ti)]:(t.description||"").split(ti)}if(r)return this.wrap(r.join(`
43
- `))}examples(t){return!t||t.length===0?void 0:(0,ei.castArray)(t).map(i=>{let n,o;if(typeof i=="string"){let m=i.split(ti).filter(Boolean);if(m.length>=2&&!this.isCommand(m[0])&&m.slice(1).every(d=>this.isCommand(d)))n=m[0],o=m.slice(1);else return m.map(d=>this.formatIfCommand(d)).join(`
44
- `)}else n=i.description,o=[i.command];let s=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",u=this.indentSpacing*2,l=o.map(m=>this.indent(this.wrap(this.formatIfCommand(m),u+4)).split(ti).join(` ${s}
34
+ `,u+=this.indent(d.join(`
35
+ `),n+2)}}return u&&(o+=s,o+=u),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let l=o;return[this.render(l.name),this.render(l.description)]}let[s,u]=o;return[this.render(s),u&&this.render(u)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,Qf.colorize)(this.config?.theme?.sectionHeader,Qb.default.bold(t)),(0,Qf.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
36
+ `);return this.opts.stripAnsi?(0,$i.default)(n):n}wrap(t,r=this.indentSpacing){return(0,rC.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};Kr.HelpFormatter=ja});var $a=w(fr=>{"use strict";y();var ep=fr&&fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fr,"__esModule",{value:!0});fr.CommandHelp=void 0;var sC=ep(We()),oC=ep(Mr()),fe=hr(),aC=ms(),Zf=Xr(),Zr=le(),uC=Yf(),cC=ys(),ei=/\r\n|\n/;function lC(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var xs=class extends cC.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),(0,fe.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
37
+ `)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,fe.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,fe.colorize)(this.config?.theme?.flag,i),n?(0,fe.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?uC.DocOpts.generate(this.command):(0,Zr.compact)([this.command.id,Object.values(this.command.args??{})?.filter(t=>!t.hidden).map(t=>this.arg(t)).join(" ")]).join(" ")}description(){let t=this.command,r;if(this.opts.hideCommandSummaryInDescription)r=(t.description||"").split(ei).slice(1);else if(t.description){let i=t.summary?`${t.summary}
38
+ `:null;r=i?[...i.split(ei),...(t.description||"").split(ei)]:(t.description||"").split(ei)}if(r)return this.wrap(r.join(`
39
+ `))}examples(t){return!t||t.length===0?void 0:(0,Zr.castArray)(t).map(i=>{let n,o;if(typeof i=="string"){let m=i.split(ei).filter(Boolean);if(m.length>=2&&!this.isCommand(m[0])&&m.slice(1).every(p=>this.isCommand(p)))n=m[0],o=m.slice(1);else return m.map(p=>this.formatIfCommand(p)).join(`
40
+ `)}else n=i.description,o=[i.command];let s=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",u=this.indentSpacing*2,l=o.map(m=>this.indent(this.wrap(this.formatIfCommand(m),u+4)).split(ei).join(` ${s}
45
41
  `)).join(`
46
42
  `);return`${this.wrap(n,u)}
47
43
 
48
44
  ${l}`}).join(`
49
45
 
50
- `)}flagHelpLabel(t,r=!1){let i=t.helpLabel;if(!i){let n=[];n.push(t.char?`-${t.char[0]}`:" "),t.name&&(t.type==="boolean"&&t.allowNo?n.push(`--[no-]${t.name.trim()}`):n.push(`--${t.name.trim()}`)),i=n.join(t.char?(0,fe.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(t.type==="option"){let n=t.helpValue||(this.opts.showFlagNameInTitle?t.name:"<value>");!t.helpValue&&t.options&&(n=r||this.opts.showFlagOptionsInTitle?`${t.options.join("|")}`:"<option>"),t.multiple&&(n+="..."),n.includes("|")||(n=vC.default.underline(n)),i+=`=${n}`}return(0,fe.colorize)(this.config.theme?.flag,i)}flags(t){if(t.length===0)return;let r=t.reduce((i,n)=>i&&n.char===void 0,!0);return t.map(i=>{let n=this.flagHelpLabel(i);r&&(n=n.replace(" ",""));let o=i.summary||i.description||"";return i.type==="option"&&i.default&&(o=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${i.default}]`)} ${o}`),i.required&&(o=`${(0,fe.colorize)(this.config?.theme?.flagRequired,"(required)")} ${o}`),i.type==="option"&&i.options&&!i.helpValue&&!this.opts.showFlagOptionsInTitle&&(o+=(0,fe.colorize)(this.config?.theme?.flagOptions,`
46
+ `)}flagHelpLabel(t,r=!1){let i=t.helpLabel;if(!i){let n=[];n.push(t.char?`-${t.char[0]}`:" "),t.name&&(t.type==="boolean"&&t.allowNo?n.push(`--[no-]${t.name.trim()}`):n.push(`--${t.name.trim()}`)),i=n.join(t.char?(0,fe.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(t.type==="option"){let n=t.helpValue||(this.opts.showFlagNameInTitle?t.name:"<value>");!t.helpValue&&t.options&&(n=r||this.opts.showFlagOptionsInTitle?`${t.options.join("|")}`:"<option>"),t.multiple&&(n+="..."),n.includes("|")||(n=sC.default.underline(n)),i+=`=${n}`}return(0,fe.colorize)(this.config.theme?.flag,i)}flags(t){if(t.length===0)return;let r=t.reduce((i,n)=>i&&n.char===void 0,!0);return t.map(i=>{let n=this.flagHelpLabel(i);r&&(n=n.replace(" ",""));let o=i.summary||i.description||"";return i.type==="option"&&i.default&&(o=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${i.default}]`)} ${o}`),i.required&&(o=`${(0,fe.colorize)(this.config?.theme?.flagRequired,"(required)")} ${o}`),i.type==="option"&&i.options&&!i.helpValue&&!this.opts.showFlagOptionsInTitle&&(o+=(0,fe.colorize)(this.config?.theme?.flagOptions,`
51
47
  <options: ${i.options.join("|")}>`)),[n,(0,fe.colorize)(this.config?.theme?.sectionDescription,o.trim())]})}flagsDescriptions(t){let r=t.filter(n=>n.summary&&n.description);return r.length===0?void 0:r.map(n=>{let o=n.summary||"",s=this.flagHelpLabel(n,!0);return n.char||(s=s.replace(" ","")),s+=s.length+o.length+2<this.opts.maxWidth?" "+o:`
52
48
 
53
49
  `+this.indent(this.wrap(o,this.indentSpacing*2)),`${s}
54
50
 
55
51
  ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
56
52
 
57
- `)}generate(){let t=this.command,r=Object.entries(t.flags||{}).filter(([,s])=>!s.hidden).map(([s,u])=>(u.name=s,u)),i=DC(this.opts.flagSortOrder)==="alphabetical"?(0,ei.sortBy)(r,s=>[!s.char,s.char,s.name]):r,n=Object.values((0,EC.ensureArgObject)(t.args)).filter(s=>!s.hidden);return(0,ei.compact)(this.sections().map(({generate:s,header:u})=>{let l=s({args:n,cmd:t,flags:i},u);return Array.isArray(l)?l.map(m=>m&&m.body&&this.section(m.header,m.body)).join(`
53
+ `)}generate(){let t=this.command,r=Object.entries(t.flags||{}).filter(([,s])=>!s.hidden).map(([s,u])=>(u.name=s,u)),i=lC(this.opts.flagSortOrder)==="alphabetical"?(0,Zr.sortBy)(r,s=>[!s.char,s.char,s.name]):r,n=Object.values((0,aC.ensureArgObject)(t.args)).filter(s=>!s.hidden);return(0,Zr.compact)(this.sections().map(({generate:s,header:u})=>{let l=s({args:n,cmd:t,flags:i},u);return Array.isArray(l)?l.map(m=>m&&m.body&&this.section(m.header,m.body)).join(`
58
54
 
59
55
  `):l&&this.section(u,l)})).join(`
60
56
 
61
- `)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),u=[],l=this.flags(s);l&&u.push({body:l,header:n});for(let[m,d]of Object.entries(o)){let f=this.flags(d);f&&u.push({body:f,header:`${m.toUpperCase()} ${n}`})}return(0,ei.compact)(u)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let n=i.examples||i.example;return this.examples(n)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],r=this.opts.sections?.map(i=>i.toLowerCase());return t.filter(({header:i})=>!r||r.includes(i.toLowerCase()))}usage(){let{id:t,usage:r}=this.command,i=(0,od.toStandardizedId)(t,this.config),n=(0,od.toConfiguredId)(t,this.config);return(r?(0,ei.castArray)(r):[this.defaultUsage()]).map(s=>{let u=this.opts.maxWidth-this.indentSpacing,l=(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),m=(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),d=(0,fe.colorize)(this.config?.theme?.command,"<%= command.id %>"),f=(0,fe.colorize)(this.config?.theme?.sectionDescription,s.replace("<%= command.id %>","").replace(i,"").replace(n,"").trim()),p=`${l} ${m} ${d} ${f}`.trim();if(p.length>u){let a=p.slice(0,Math.max(0,u)).lastIndexOf(" ");return p.slice(0,Math.max(0,a))+`
62
- `+this.indent(this.wrap(p.slice(Math.max(0,a)),this.indentSpacing*2))}return this.wrap(p)}).join(`
63
- `)}formatIfCommand(t){t=this.render(t);let r=(0,fe.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,wC.default)(this.formatIfCommand(t)).startsWith(`${(0,fe.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};pr.CommandHelp=ws;pr.default=ws});var ud=w(qi=>{"use strict";y();var AC=qi&&qi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qi,"__esModule",{value:!0});var _C=AC(Lr()),ri=dr(),SC=le(),FC=vs(),Wa=class extends FC.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
57
+ `)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),u=[],l=this.flags(s);l&&u.push({body:l,header:n});for(let[m,p]of Object.entries(o)){let f=this.flags(p);f&&u.push({body:f,header:`${m.toUpperCase()} ${n}`})}return(0,Zr.compact)(u)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let n=i.examples||i.example;return this.examples(n)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],r=this.opts.sections?.map(i=>i.toLowerCase());return t.filter(({header:i})=>!r||r.includes(i.toLowerCase()))}usage(){let{id:t,usage:r}=this.command,i=(0,Zf.toStandardizedId)(t,this.config),n=(0,Zf.toConfiguredId)(t,this.config);return(r?(0,Zr.castArray)(r):[this.defaultUsage()]).map(s=>{let u=this.opts.maxWidth-this.indentSpacing,l=(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),m=(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),p=(0,fe.colorize)(this.config?.theme?.command,"<%= command.id %>"),f=(0,fe.colorize)(this.config?.theme?.sectionDescription,s.replace("<%= command.id %>","").replace(i,"").replace(n,"").trim()),d=`${l} ${m} ${p} ${f}`.trim();if(d.length>u){let a=d.slice(0,Math.max(0,u)).lastIndexOf(" ");return d.slice(0,Math.max(0,a))+`
58
+ `+this.indent(this.wrap(d.slice(Math.max(0,a)),this.indentSpacing*2))}return this.wrap(d)}).join(`
59
+ `)}formatIfCommand(t){t=this.render(t);let r=(0,fe.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,oC.default)(this.formatIfCommand(t)).startsWith(`${(0,fe.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};fr.CommandHelp=xs;fr.default=xs});var tp=w(qi=>{"use strict";y();var hC=qi&&qi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qi,"__esModule",{value:!0});var fC=hC(Mr()),ti=hr(),pC=le(),dC=ys(),qa=class extends dC.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
64
60
  `).slice(1).join(`
65
- `),!!t)return this.section("DESCRIPTION",this.wrap((0,ri.colorize)(this.config?.theme?.sectionDescription,t)))}root(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";t=this.render(t),t=t.split(`
66
- `)[0];let r=(0,SC.compact)([(0,ri.colorize)(this.config?.theme?.commandSummary,t),this.version(),this.usage(),this.description()]).join(`
61
+ `),!!t)return this.section("DESCRIPTION",this.wrap((0,ti.colorize)(this.config?.theme?.sectionDescription,t)))}root(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";t=this.render(t),t=t.split(`
62
+ `)[0];let r=(0,pC.compact)([(0,ti.colorize)(this.config?.theme?.commandSummary,t),this.version(),this.usage(),this.description()]).join(`
67
63
 
68
- `);return this.opts.stripAnsi&&(r=(0,_C.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,ri.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ri.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,ri.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,ri.colorize)(this.config?.theme?.version,this.config.userAgent)))}};qi.default=Wa});var zi=w(xe=>{"use strict";y();var Ja=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0});xe.loadHelpClass=xe.Help=xe.HelpBase=xe.standardizeIDFromArgv=xe.normalizeArgv=xe.getHelpFlagAdditions=xe.CommandHelp=void 0;var cd=S("node:util"),ld=Ja(Lr()),gt=dr(),hd=Ja(Ht()),TC=Vr(),OC=Fa(),kC=ji(),fd=ps(),PC=qa(),dd=Xr(),Hi=le(),IC=za(),NC=vs(),RC=Ja(ud()),Ui=Kr(),MC=za();Object.defineProperty(xe,"CommandHelp",{enumerable:!0,get:function(){return MC.CommandHelp}});var Ga=Kr();Object.defineProperty(xe,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Ga.getHelpFlagAdditions}});Object.defineProperty(xe,"normalizeArgv",{enumerable:!0,get:function(){return Ga.normalizeArgv}});Object.defineProperty(xe,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Ga.standardizeIDFromArgv}});function LC(e,t){let r=(0,Ui.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Es=class extends NC.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};xe.HelpBase=Es;var bs=class extends Es{CommandHelpClass=IC.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Hi.sortBy)(t,r=>r.id),t=(0,Hi.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Hi.sortBy)(t,r=>r.name),t=(0,Hi.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
64
+ `);return this.opts.stripAnsi&&(r=(0,fC.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,ti.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ti.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,ti.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,ti.colorize)(this.config?.theme?.version,this.config.userAgent)))}};qi.default=qa});var Wi=w(ye=>{"use strict";y();var Ha=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.loadHelpClass=ye.Help=ye.HelpBase=ye.standardizeIDFromArgv=ye.normalizeArgv=ye.getHelpFlagAdditions=ye.CommandHelp=void 0;var rp=S("node:util"),ip=Ha(Mr()),dt=hr(),np=Ha($t()),mC=Gr(),gC=_a(),yC=ji(),sp=fs(),xC=La(),op=Xr(),Hi=le(),vC=$a(),wC=ys(),EC=Ha(tp()),Ui=Yr(),bC=$a();Object.defineProperty(ye,"CommandHelp",{enumerable:!0,get:function(){return bC.CommandHelp}});var Ua=Yr();Object.defineProperty(ye,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Ua.getHelpFlagAdditions}});Object.defineProperty(ye,"normalizeArgv",{enumerable:!0,get:function(){return Ua.normalizeArgv}});Object.defineProperty(ye,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Ua.standardizeIDFromArgv}});function CC(e,t){let r=(0,Ui.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var vs=class extends wC.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};ye.HelpBase=vs;var ws=class extends vs{CommandHelpClass=vC.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Hi.sortBy)(t,r=>r.id),t=(0,Hi.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Hi.sortBy)(t,r=>r.name),t=(0,Hi.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
69
65
  `).slice(1).join(`
70
- `)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,gt.colorize)(this.config?.theme?.command,i.id),n&&(0,gt.colorize)(this.config?.theme?.sectionDescription,(0,ld.default)(n))]}),{indentation:2,spacer:`
71
- `,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new RC.default(this.config,this.opts).root()}formatTopic(t){let r=this.render(t.description||""),i=r.split(`
66
+ `)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,dt.colorize)(this.config?.theme?.command,i.id),n&&(0,dt.colorize)(this.config?.theme?.sectionDescription,(0,ip.default)(n))]}),{indentation:2,spacer:`
67
+ `,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new EC.default(this.config,this.opts).root()}formatTopic(t){let r=this.render(t.description||""),i=r.split(`
72
68
  `)[0];r=r.split(`
73
69
  `).slice(1).join(`
74
- `);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,Hi.compact)([(0,gt.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,gt.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,gt.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,gt.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
70
+ `);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,Hi.compact)([(0,dt.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,dt.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,dt.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,dt.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
75
71
 
76
- `);return this.opts.stripAnsi&&(o=(0,ld.default)(o)),o+`
77
- `}formatTopics(t){if(t.length===0)return"";let r=this.renderList(t.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,gt.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,gt.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
72
+ `);return this.opts.stripAnsi&&(o=(0,ip.default)(o)),o+`
73
+ `}formatTopics(t){if(t.length===0)return"";let r=this.renderList(t.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,dt.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,dt.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
78
74
  `)[0]))])),{indentation:2,spacer:`
79
- `,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?hd.default.stderr(cd.format.apply(this,t)+`
80
- `):hd.default.stdout(cd.format.apply(this,t)+`
81
- `)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),u=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(u&&this.log(u==="deprecated"?`${(0,Ui.formatCommandDeprecationWarning)((0,dd.toConfiguredId)(r,this.config),t.deprecationOptions)}
75
+ `,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?np.default.stderr(rp.format.apply(this,t)+`
76
+ `):np.default.stdout(rp.format.apply(this,t)+`
77
+ `)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),u=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(u&&this.log(u==="deprecated"?`${(0,Ui.formatCommandDeprecationWarning)((0,op.toConfiguredId)(r,this.config),t.deprecationOptions)}
82
78
  `:`This command is in ${u}.
83
- `),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),d={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,Ui.formatCommandDeprecationWarning)((0,dd.toConfiguredId)(r,this.config),d)}
79
+ `),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),p={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,Ui.formatCommandDeprecationWarning)((0,op.toConfiguredId)(r,this.config),p)}
84
80
  `)}let l=this.summary(t);if(l&&this.log(l+`
85
- `),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],d=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(d)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,Ui.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,Ui.standardizeIDFromArgv)(t,this.config));let i=LC(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(fd.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===fd.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[u,l]of Object.entries(s.flags??{}))l.type!=="boolean"&&(n.flags[u].default=await(0,PC.cacheDefaultValue)(l,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(l=>!i.split(":").includes(l)),id:i,matches:s})).successes.length>0)return}(0,OC.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
81
+ `),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],p=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(p)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,Ui.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,Ui.standardizeIDFromArgv)(t,this.config));let i=CC(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(sp.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===sp.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[u,l]of Object.entries(s.flags??{}))l.type!=="boolean"&&(n.flags[u].default=await(0,xC.cacheDefaultValue)(l,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(l=>!i.split(":").includes(l)),id:i,matches:s})).successes.length>0)return}(0,gC.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
86
82
  `),this.log(this.formatRoot()),this.log(""),this.opts.all||(t=t.filter(n=>!n.name.includes(":")),r=r.filter(n=>!n.id.includes(":"))),t.length>0&&(this.log(this.formatTopics(t)),this.log("")),r.length>0&&(r=r.filter(n=>n.id),this.log(this.formatCommands(r)),this.log(""))}async showTopicHelp(t){let{name:r}=t,i=r.split(":").length,n=this.sortedTopics.filter(u=>u.name.startsWith(r+":")&&u.name.split(":").length===i+1),o=this.sortedCommands.filter(u=>u.id.startsWith(r+":")&&u.id.split(":").length===i+1),s=this.config.pjson?.oclif?.state;s&&this.log(`This topic is in ${s}.
87
- `),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,gt.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
88
- `)[0])):t.description&&(0,gt.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
89
- `)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};xe.Help=bs;function BC(e){return e&&e.default?e.default:e}async function jC(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,TC.tsPath)(e.root,r)??r,n=await(0,kC.load)(e,i);return BC(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
90
- ${i.message}`)}return bs}xe.loadHelpClass=jC});var Cs=w(Ve=>{"use strict";y();var Ya=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.handle=Ve.Exit=void 0;var $C=Ya(Jl()),qC=Ya(st()),HC=zi(),Va=lr(),UC=hr(),zC=es(),WC=Ya(rs());Ve.Exit={exit(e=0){process.exit(e)}};async function JC(e){try{e||(e=new UC.CLIError("no error?")),e.message==="SIGINT"&&Ve.Exit.exit(1);let t=!(e instanceof zC.ExitError)&&!e.skipOclifErrorHandling,r=(0,WC.default)(e),i=(0,$C.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=qC.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},u=new HC.Help(o,s);console.error(),await u.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;Va.config.errorLogger&&e.code!=="EEXIT"?(i&&Va.config.errorLogger.log(i),await Va.config.errorLogger.flush().then(()=>Ve.Exit.exit(n)).catch(console.error)):Ve.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Ve.Exit.exit(1)}}Ve.handle=JC});var Ye=w(ae=>{"use strict";y();Object.defineProperty(ae,"__esModule",{value:!0});ae.warn=ae.exit=ae.Logger=ae.handle=ae.ModuleLoadError=ae.ExitError=ae.CLIError=ae.error=ae.config=void 0;var GC=es(),VC=lr();Object.defineProperty(ae,"config",{enumerable:!0,get:function(){return VC.config}});var YC=Fa();Object.defineProperty(ae,"error",{enumerable:!0,get:function(){return YC.error}});var XC=hr();Object.defineProperty(ae,"CLIError",{enumerable:!0,get:function(){return XC.CLIError}});var KC=es();Object.defineProperty(ae,"ExitError",{enumerable:!0,get:function(){return KC.ExitError}});var QC=Oa();Object.defineProperty(ae,"ModuleLoadError",{enumerable:!0,get:function(){return QC.ModuleLoadError}});var ZC=Cs();Object.defineProperty(ae,"handle",{enumerable:!0,get:function(){return ZC.handle}});var eD=Aa();Object.defineProperty(ae,"Logger",{enumerable:!0,get:function(){return eD.Logger}});function tD(e=0){throw new GC.ExitError(e)}ae.exit=tD;var rD=as();Object.defineProperty(ae,"warn",{enumerable:!0,get:function(){return rD.warn}})});var As=w(Ds=>{"use strict";y();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.ActionBase=void 0;var pd=S("node:util"),md=le(),Xa=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
83
+ `),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,dt.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
84
+ `)[0])):t.description&&(0,dt.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
85
+ `)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};ye.Help=ws;function DC(e){return e&&e.default?e.default:e}async function AC(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,mC.tsPath)(e.root,r)??r,n=await(0,yC.load)(e,i);return DC(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
86
+ ${i.message}`)}return ws}ye.loadHelpClass=AC});var Es=w(Je=>{"use strict";y();var za=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Je,"__esModule",{value:!0});Je.handle=Je.Exit=void 0;var _C=za(Ul()),SC=za(it()),FC=Wi(),Wa=ur(),TC=cr(),OC=ts(),kC=za(is());Je.Exit={exit(e=0){process.exit(e)}};async function PC(e){try{e||(e=new TC.CLIError("no error?")),e.message==="SIGINT"&&Je.Exit.exit(1);let t=!(e instanceof OC.ExitError)&&!e.skipOclifErrorHandling,r=(0,kC.default)(e),i=(0,_C.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=SC.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},u=new FC.Help(o,s);console.error(),await u.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;Wa.config.errorLogger&&e.code!=="EEXIT"?(i&&Wa.config.errorLogger.log(i),await Wa.config.errorLogger.flush().then(()=>Je.Exit.exit(n)).catch(console.error)):Je.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Je.Exit.exit(1)}}Je.handle=PC});var Ge=w(ae=>{"use strict";y();Object.defineProperty(ae,"__esModule",{value:!0});ae.warn=ae.exit=ae.Logger=ae.handle=ae.ModuleLoadError=ae.ExitError=ae.CLIError=ae.error=ae.config=void 0;var IC=ts(),NC=ur();Object.defineProperty(ae,"config",{enumerable:!0,get:function(){return NC.config}});var RC=_a();Object.defineProperty(ae,"error",{enumerable:!0,get:function(){return RC.error}});var MC=cr();Object.defineProperty(ae,"CLIError",{enumerable:!0,get:function(){return MC.CLIError}});var LC=ts();Object.defineProperty(ae,"ExitError",{enumerable:!0,get:function(){return LC.ExitError}});var BC=Fa();Object.defineProperty(ae,"ModuleLoadError",{enumerable:!0,get:function(){return BC.ModuleLoadError}});var jC=Es();Object.defineProperty(ae,"handle",{enumerable:!0,get:function(){return jC.handle}});var $C=Ca();Object.defineProperty(ae,"Logger",{enumerable:!0,get:function(){return $C.Logger}});function qC(e=0){throw new IC.ExitError(e)}ae.exit=qC;var HC=us();Object.defineProperty(ae,"warn",{enumerable:!0,get:function(){return HC.warn}})});var Cs=w(bs=>{"use strict";y();Object.defineProperty(bs,"__esModule",{value:!0});bs.ActionBase=void 0;var ap=S("node:util"),up=le(),Ja=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
91
87
  `&&this._write(r,`
92
- `)}catch(t){this._write("stderr",(0,pd.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,pd.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,md.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,md.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};Ds.ActionBase=Xa});var gd=w(Qa=>{"use strict";y();Object.defineProperty(Qa,"__esModule",{value:!0});var iD=As(),Ka=class extends iD.ActionBase{type="simple";_flush(){this._write(this.std,`
93
- `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Qa.default=Ka});var yd=w(Za=>{"use strict";y();Object.defineProperty(Za,"__esModule",{value:!0});Za.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var vd=w(at=>{"use strict";y();var nD=at&&at.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),sD=at&&at.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oD=at&&at.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&nD(t,e,r);return sD(t,e),t},_s=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});var aD=_s(Gl()),uD=_s(Je()),cD=_s(Lr()),eu=oD(Wl()),lD=cr(),hD=As(),xd=_s(yd()),tu=ta();function fD(e){return eu?(eu.stdout?eu.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${aD.default.reset.open}`:uD.default.magenta(e):e}var ru=class extends hD.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,fD(t)}_lines(t){return(0,cD.default)(t).split(`
94
- `).map(r=>Math.ceil(r.length/lD.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
95
- `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,tu.cursorLeft+tu.cursorUp(t)+tu.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?xd.default[t.style].frames:xd.default[process.platform==="win32"?"line":"dots2"].frames}};at.default=ru});var Fs=w(yt=>{"use strict";y();var iu=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});yt.config=yt.Config=void 0;var dD=iu(st()),pD=iu(gd()),mD=iu(vd()),wd=global,Wt=wd.ux||(wd.ux={}),gD=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",yD=gD==="spinner"?mD.default:pD.default,Ss=class{action=new yD;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Wt.context||{}}set context(t){Wt.context=t}get debug(){return Wt.debug||process.env.DEBUG==="*"}set debug(t){Wt.debug=t}};yt.Config=Ss;function xD(){let t=dD.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Wt[t]||(Wt[t]=new Ss),Wt[t]}yt.config=xD();yt.default=yt.config});var Os=w(Ts=>{"use strict";y();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.flush=void 0;var vD=Ye();function wD(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,vD.error)("timed out"))])}async function ED(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function bD(e=1e4){await wD(ED(),e)}Ts.flush=bD});var Cd=w((CM,bd)=>{"use strict";y();var Jt=process.stdin,xt=process.stderr,ks={hide:(e,t={})=>ks.raw(e,!1,t),mask:(e,t={})=>ks.raw(e,!0,t),raw:(e,t,r={})=>!Jt.setRawMode||process.env.TERM==="dumb"?ks.notty(e):new Promise(function(i,n){let o=ta(),s="";xt.write(o.eraseLine),xt.write(o.cursorLeft),xt.write(e),Jt.resume(),Jt.setRawMode(!0);function u(){t?xt.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
96
- `+o.cursorShow):xt.write(`
97
- `),Jt.removeListener("data",p),Jt.setRawMode(!1),Jt.pause()}function l(){r.required&&s.length===0||(u(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function m(){n(new Error("SIGINT")),u()}function d(){s.length!==0&&(s=s.substr(0,s.length-1),xt.write(o.cursorBackward(1)),xt.write(o.eraseEndLine))}function f(a){s+=a,xt.write(t?a:"*".repeat(a.length))}let p=function(a){switch(a){case"":case"\r":case`
98
- `:return l();case"":return m();default:return a.charCodeAt(0)===127?d():f(a)}};Jt.on("data",p)}),notty:e=>new Promise((t,r)=>{let i=Pv();xt.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(xt.write(`
99
- `),n.error)return r(n.error);t(n.stdout.trim())})};function Ed(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Jt.setEncoding("utf8"),ks[t.method](e,t).then(r=>r||(t.required?Ed(e):""))}bd.exports=Ed});var Td=w(Ae=>{"use strict";y();var CD=Ae&&Ae.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),DD=Ae&&Ae.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),AD=Ae&&Ae.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&CD(t,e,r);return DD(t,e),t},_D=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.anykey=Ae.confirm=Ae.prompt=void 0;var Wi=_D(Je()),Dd=AD(Ye()),_d=Fs();function nu(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(nu(e,t-1)):r(s||e.default)})})}function Ad(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+Wi.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function SD(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await nu(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function FD(e){let t=ta();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function Sd(e,t={}){let r=Ad(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=Cd();switch(i.type){case"normal":return nu(i);case"single":return SD(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(FD(Ad(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function Fd(e,t={}){return _d.config.action.pauseAsync(()=>Sd(e,t),Wi.default.cyan("?"))}Ae.prompt=Fd;function TD(e){return _d.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await Sd(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},Wi.default.cyan("?"))}Ae.confirm=TD;async function OD(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${Wi.default.yellow("q")} to exit`:`Press enter to continue or ${Wi.default.yellow("q")} to exit`);let r=await Fd(e,{required:!1,type:"single"});return t&&process.stderr.write(`
100
- `),r==="q"&&Dd.error("quit"),r===""&&Dd.error("ctrl-c"),r}Ae.anykey=OD});var kd=w(Ji=>{"use strict";y();var kD=Ji&&Ji.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ji,"__esModule",{value:!0});var PD=kD(Je()),Od=S("node:util");function ID(e,t){let r=[],i=Object.keys(e).map(u=>u.toString().length),n=Math.max(...i)+2;function o(u){return typeof u=="string"||typeof u=="number"?u:typeof u=="object"?Object.keys(u).map(l=>l+": "+(0,Od.inspect)(u[l])).join(", "):(0,Od.inspect)(u)}let s=(u,l)=>`${PD.default.blue(u)}:`+" ".repeat(n-u.length-1)+o(l);for(let u of t||Object.keys(e).sort()){let l=e[u];if(Array.isArray(l)){if(l.length>0){r.push(s(u,l[0]));for(let m of l.slice(1))r.push(" ".repeat(n)+o(m))}}else l!=null&&r.push(s(u,l))}return r.join(`
101
- `)}Ji.default=ID});var Id=w((TM,Pd)=>{y();var su=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let u=Math.ceil(t/s/1e3);isNaN(u)?this.eta="NULL":isFinite(u)?u>1e7?this.eta="INF":u<0?this.eta=0:this.eta=u:this.eta="INF"}};Pd.exports=su});var au=w((kM,Nd)=>{y();var mr=S("readline"),ou=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&mr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,mr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(mr.moveCursor(this.stream,0,-this.dy),mr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&mr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&mr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&mr.clearScreenDown(this.stream)}newline(){this.stream.write(`
102
- `),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Nd.exports=ou});var uu=w((IM,Rd)=>{y();Rd.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var cu=w((RM,Md)=>{y();Md.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var lu=w((LM,Ld)=>{y();Ld.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var hu=w((jM,Bd)=>{y();var ND=Zo(),RD=uu(),MD=cu(),LD=lu();Bd.exports=function(t,r,i){let n=t.format,o=t.formatTime||LD,s=t.formatValue||RD,u=t.formatBar||MD,l=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),d=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:u(r.progress,t),percentage:s(l,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(d,t,"duration"),duration_formatted:o(d,t,1)});n=n.replace(/\{(\w+)\}/g,function(c,h){return typeof f[h]<"u"?f[h]:c});let p=Math.max(0,r.maxWidth-ND(n)-2),a=Math.floor(p/2);switch(t.align){case"right":n=p>0?" ".repeat(p)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Ps=w((qM,jd)=>{y();function W(e,t){return typeof e>"u"||e===null?t:e}jd.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/W(n.fps,10),i.stream=W(n.stream,process.stderr),i.terminal=W(n.terminal,null),i.clearOnComplete=W(n.clearOnComplete,!1),i.stopOnComplete=W(n.stopOnComplete,!1),i.barsize=W(n.barsize,40),i.align=W(n.align,"left"),i.hideCursor=W(n.hideCursor,!1),i.linewrap=W(n.linewrap,!1),i.barGlue=W(n.barGlue,""),i.barCompleteChar=W(n.barCompleteChar,"="),i.barIncompleteChar=W(n.barIncompleteChar,"-"),i.format=W(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=W(n.formatTime,null),i.formatValue=W(n.formatValue,null),i.formatBar=W(n.formatBar,null),i.etaBufferLength=W(n.etaBuffer,10),i.etaAsynchronousUpdate=W(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=W(n.progressCalculationRelative,!1),i.synchronousUpdate=W(n.synchronousUpdate,!0),i.noTTYOutput=W(n.noTTYOutput,!1),i.notTTYSchedule=W(n.notTTYSchedule,2e3),i.emptyOnZero=W(n.emptyOnZero,!1),i.forceRedraw=W(n.forceRedraw,!1),i.autopadding=W(n.autopadding,!1),i.gracefulExit=W(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?W(t.autopaddingChar," "):"",t}}});var fu=w((zM,qd)=>{y();var $d=Id(),BD=au(),jD=hu(),$D=Ps(),qD=S("events");qd.exports=class extends qD{constructor(t){super(),this.options=$D.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new BD(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new $d(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:jD}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new $d(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Ud=w((GM,Hd)=>{y();var HD=fu(),UD=Ps();Hd.exports=class extends HD{constructor(t,r){super(UD.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Wd=w((XM,zd)=>{y();var zD=au(),WD=fu(),JD=Ps(),GD=S("events");zd.exports=class extends GD{constructor(t,r){super(),this.bars=[],this.options=JD.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new zD(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new WD(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Gd=w((QM,Jd)=>{y();Jd.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Yd=w((eL,Vd)=>{y();Vd.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Kd=w((rL,Xd)=>{y();Xd.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Zd=w((nL,Qd)=>{y();Qd.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var tp=w((oL,ep)=>{y();var VD=Gd(),YD=Yd(),XD=Kd(),KD=Zd();ep.exports={legacy:VD,shades_classic:YD,shades_grey:XD,rect:KD}});var np=w((uL,ip)=>{y();var rp=Ud(),QD=Wd(),ZD=tp(),eA=hu(),tA=uu(),rA=cu(),iA=lu();ip.exports={Bar:rp,SingleBar:rp,MultiBar:QD,Presets:ZD,Format:{Formatter:eA,BarFormat:rA,ValueFormat:tA,TimeFormat:iA}}});var sp=w(du=>{"use strict";y();Object.defineProperty(du,"__esModule",{value:!0});var nA=np();function sA(e={}){return new nA.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}du.default=sA});var yr=w((fL,gr)=>{"use strict";y();function op(e){return typeof e>"u"||e===null}function oA(e){return typeof e=="object"&&e!==null}function aA(e){return Array.isArray(e)?e:op(e)?[]:[e]}function uA(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function cA(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function lA(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}gr.exports.isNothing=op;gr.exports.isObject=oA;gr.exports.toArray=aA;gr.exports.repeat=cA;gr.exports.isNegativeZero=lA;gr.exports.extend=uA});var ii=w((pL,ap)=>{"use strict";y();function Gi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Gi.prototype=Object.create(Error.prototype);Gi.prototype.constructor=Gi;Gi.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};ap.exports=Gi});var lp=w((gL,cp)=>{"use strict";y();var up=yr();function pu(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}pu.prototype.getSnippet=function(t,r){var i,n,o,s,u;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
88
+ `)}catch(t){this._write("stderr",(0,ap.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,ap.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,up.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,up.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};bs.ActionBase=Ja});var cp=w(Va=>{"use strict";y();Object.defineProperty(Va,"__esModule",{value:!0});var UC=Cs(),Ga=class extends UC.ActionBase{type="simple";_flush(){this._write(this.std,`
89
+ `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Va.default=Ga});var lp=w(Xa=>{"use strict";y();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var fp=w(nt=>{"use strict";y();var WC=nt&&nt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),zC=nt&&nt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JC=nt&&nt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&WC(t,e,r);return zC(t,e),t},Ds=nt&&nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nt,"__esModule",{value:!0});var GC=Ds(Wl()),VC=Ds(We()),XC=Ds(Mr()),Ya=JC(Mv()),YC=ar(),KC=Cs(),hp=Ds(lp()),Ka=Zo();function QC(e){return Ya?(Ya.stdout?Ya.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${GC.default.reset.open}`:VC.default.magenta(e):e}var Qa=class extends KC.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,QC(t)}_lines(t){return(0,XC.default)(t).split(`
90
+ `).map(r=>Math.ceil(r.length/YC.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
91
+ `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Ka.cursorLeft+Ka.cursorUp(t)+Ka.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?hp.default[t.style].frames:hp.default[process.platform==="win32"?"line":"dots2"].frames}};nt.default=Qa});var _s=w(mt=>{"use strict";y();var Za=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.config=mt.Config=void 0;var ZC=Za(it()),eD=Za(cp()),tD=Za(fp()),pp=global,Ut=pp.ux||(pp.ux={}),rD=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",iD=rD==="spinner"?tD.default:eD.default,As=class{action=new iD;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Ut.context||{}}set context(t){Ut.context=t}get debug(){return Ut.debug||process.env.DEBUG==="*"}set debug(t){Ut.debug=t}};mt.Config=As;function nD(){let t=ZC.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Ut[t]||(Ut[t]=new As),Ut[t]}mt.config=nD();mt.default=mt.config});var Fs=w(Ss=>{"use strict";y();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.flush=void 0;var sD=Ge();function oD(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,sD.error)("timed out"))])}async function aD(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function uD(e=1e4){await oD(aD(),e)}Ss.flush=uD});var gp=w((bM,mp)=>{"use strict";y();var Wt=process.stdin,gt=process.stderr,Ts={hide:(e,t={})=>Ts.raw(e,!1,t),mask:(e,t={})=>Ts.raw(e,!0,t),raw:(e,t,r={})=>!Wt.setRawMode||process.env.TERM==="dumb"?Ts.notty(e):new Promise(function(i,n){let o=Zo(),s="";gt.write(o.eraseLine),gt.write(o.cursorLeft),gt.write(e),Wt.resume(),Wt.setRawMode(!0);function u(){t?gt.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
92
+ `+o.cursorShow):gt.write(`
93
+ `),Wt.removeListener("data",d),Wt.setRawMode(!1),Wt.pause()}function l(){r.required&&s.length===0||(u(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function m(){n(new Error("SIGINT")),u()}function p(){s.length!==0&&(s=s.substr(0,s.length-1),gt.write(o.cursorBackward(1)),gt.write(o.eraseEndLine))}function f(a){s+=a,gt.write(t?a:"*".repeat(a.length))}let d=function(a){switch(a){case"":case"\r":case`
94
+ `:return l();case"":return m();default:return a.charCodeAt(0)===127?p():f(a)}};Wt.on("data",d)}),notty:e=>new Promise((t,r)=>{let i=Nv();gt.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(gt.write(`
95
+ `),n.error)return r(n.error);t(n.stdout.trim())})};function dp(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Wt.setEncoding("utf8"),Ts[t.method](e,t).then(r=>r||(t.required?dp(e):""))}mp.exports=dp});var bp=w(De=>{"use strict";y();var cD=De&&De.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),lD=De&&De.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hD=De&&De.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&cD(t,e,r);return lD(t,e),t},fD=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(De,"__esModule",{value:!0});De.anykey=De.confirm=De.prompt=void 0;var zi=fD(We()),yp=hD(Ge()),vp=_s();function eu(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(eu(e,t-1)):r(s||e.default)})})}function xp(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+zi.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function pD(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await eu(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function dD(e){let t=Zo();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function wp(e,t={}){let r=xp(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=gp();switch(i.type){case"normal":return eu(i);case"single":return pD(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(dD(xp(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function Ep(e,t={}){return vp.config.action.pauseAsync(()=>wp(e,t),zi.default.cyan("?"))}De.prompt=Ep;function mD(e){return vp.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await wp(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},zi.default.cyan("?"))}De.confirm=mD;async function gD(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${zi.default.yellow("q")} to exit`:`Press enter to continue or ${zi.default.yellow("q")} to exit`);let r=await Ep(e,{required:!1,type:"single"});return t&&process.stderr.write(`
96
+ `),r==="q"&&yp.error("quit"),r===""&&yp.error("ctrl-c"),r}De.anykey=gD});var Dp=w(Ji=>{"use strict";y();var yD=Ji&&Ji.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ji,"__esModule",{value:!0});var xD=yD(We()),Cp=S("node:util");function vD(e,t){let r=[],i=Object.keys(e).map(u=>u.toString().length),n=Math.max(...i)+2;function o(u){return typeof u=="string"||typeof u=="number"?u:typeof u=="object"?Object.keys(u).map(l=>l+": "+(0,Cp.inspect)(u[l])).join(", "):(0,Cp.inspect)(u)}let s=(u,l)=>`${xD.default.blue(u)}:`+" ".repeat(n-u.length-1)+o(l);for(let u of t||Object.keys(e).sort()){let l=e[u];if(Array.isArray(l)){if(l.length>0){r.push(s(u,l[0]));for(let m of l.slice(1))r.push(" ".repeat(n)+o(m))}}else l!=null&&r.push(s(u,l))}return r.join(`
97
+ `)}Ji.default=vD});var _p=w((FM,Ap)=>{y();var tu=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let u=Math.ceil(t/s/1e3);isNaN(u)?this.eta="NULL":isFinite(u)?u>1e7?this.eta="INF":u<0?this.eta=0:this.eta=u:this.eta="INF"}};Ap.exports=tu});var iu=w((OM,Sp)=>{y();var pr=S("readline"),ru=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&pr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,pr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(pr.moveCursor(this.stream,0,-this.dy),pr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&pr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&pr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&pr.clearScreenDown(this.stream)}newline(){this.stream.write(`
98
+ `),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Sp.exports=ru});var nu=w((PM,Fp)=>{y();Fp.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var su=w((NM,Tp)=>{y();Tp.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var ou=w((MM,Op)=>{y();Op.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var au=w((BM,kp)=>{y();var wD=Ko(),ED=nu(),bD=su(),CD=ou();kp.exports=function(t,r,i){let n=t.format,o=t.formatTime||CD,s=t.formatValue||ED,u=t.formatBar||bD,l=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),p=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:u(r.progress,t),percentage:s(l,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(p,t,"duration"),duration_formatted:o(p,t,1)});n=n.replace(/\{(\w+)\}/g,function(c,h){return typeof f[h]<"u"?f[h]:c});let d=Math.max(0,r.maxWidth-wD(n)-2),a=Math.floor(d/2);switch(t.align){case"right":n=d>0?" ".repeat(d)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Os=w(($M,Pp)=>{y();function z(e,t){return typeof e>"u"||e===null?t:e}Pp.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/z(n.fps,10),i.stream=z(n.stream,process.stderr),i.terminal=z(n.terminal,null),i.clearOnComplete=z(n.clearOnComplete,!1),i.stopOnComplete=z(n.stopOnComplete,!1),i.barsize=z(n.barsize,40),i.align=z(n.align,"left"),i.hideCursor=z(n.hideCursor,!1),i.linewrap=z(n.linewrap,!1),i.barGlue=z(n.barGlue,""),i.barCompleteChar=z(n.barCompleteChar,"="),i.barIncompleteChar=z(n.barIncompleteChar,"-"),i.format=z(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=z(n.formatTime,null),i.formatValue=z(n.formatValue,null),i.formatBar=z(n.formatBar,null),i.etaBufferLength=z(n.etaBuffer,10),i.etaAsynchronousUpdate=z(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=z(n.progressCalculationRelative,!1),i.synchronousUpdate=z(n.synchronousUpdate,!0),i.noTTYOutput=z(n.noTTYOutput,!1),i.notTTYSchedule=z(n.notTTYSchedule,2e3),i.emptyOnZero=z(n.emptyOnZero,!1),i.forceRedraw=z(n.forceRedraw,!1),i.autopadding=z(n.autopadding,!1),i.gracefulExit=z(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?z(t.autopaddingChar," "):"",t}}});var uu=w((UM,Np)=>{y();var Ip=_p(),DD=iu(),AD=au(),_D=Os(),SD=S("events");Np.exports=class extends SD{constructor(t){super(),this.options=_D.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new DD(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Ip(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:AD}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Ip(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Mp=w((JM,Rp)=>{y();var FD=uu(),TD=Os();Rp.exports=class extends FD{constructor(t,r){super(TD.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Bp=w((XM,Lp)=>{y();var OD=iu(),kD=uu(),PD=Os(),ID=S("events");Lp.exports=class extends ID{constructor(t,r){super(),this.bars=[],this.options=PD.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new OD(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new kD(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var $p=w((KM,jp)=>{y();jp.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Hp=w((ZM,qp)=>{y();qp.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Wp=w((tL,Up)=>{y();Up.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Jp=w((iL,zp)=>{y();zp.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Vp=w((sL,Gp)=>{y();var ND=$p(),RD=Hp(),MD=Wp(),LD=Jp();Gp.exports={legacy:ND,shades_classic:RD,shades_grey:MD,rect:LD}});var Kp=w((aL,Yp)=>{y();var Xp=Mp(),BD=Bp(),jD=Vp(),$D=au(),qD=nu(),HD=su(),UD=ou();Yp.exports={Bar:Xp,SingleBar:Xp,MultiBar:BD,Presets:jD,Format:{Formatter:$D,BarFormat:HD,ValueFormat:qD,TimeFormat:UD}}});var Qp=w(cu=>{"use strict";y();Object.defineProperty(cu,"__esModule",{value:!0});var WD=Kp();function zD(e={}){return new WD.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}cu.default=zD});var mr=w((hL,dr)=>{"use strict";y();function Zp(e){return typeof e>"u"||e===null}function JD(e){return typeof e=="object"&&e!==null}function GD(e){return Array.isArray(e)?e:Zp(e)?[]:[e]}function VD(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function XD(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function YD(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}dr.exports.isNothing=Zp;dr.exports.isObject=JD;dr.exports.toArray=GD;dr.exports.repeat=XD;dr.exports.isNegativeZero=YD;dr.exports.extend=VD});var ri=w((pL,ed)=>{"use strict";y();function Gi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Gi.prototype=Object.create(Error.prototype);Gi.prototype.constructor=Gi;Gi.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};ed.exports=Gi});var id=w((mL,rd)=>{"use strict";y();var td=mr();function lu(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}lu.prototype.getSnippet=function(t,r){var i,n,o,s,u;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
103
99
  \x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
104
- \x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return u=this.buffer.slice(n,s),up.repeat(" ",t)+i+u+o+`
105
- `+up.repeat(" ",t+this.position-n+i.length)+"^"};pu.prototype.toString=function(t){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(i+=`:
106
- `+r)),i};cp.exports=pu});var de=w((xL,fp)=>{"use strict";y();var hp=ii(),hA=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],fA=["scalar","sequence","mapping"];function dA(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function pA(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(hA.indexOf(r)===-1)throw new hp('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=dA(t.styleAliases||null),fA.indexOf(this.kind)===-1)throw new hp('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}fp.exports=pA});var xr=w((wL,pp)=>{"use strict";y();var dp=yr(),Is=ii(),mA=de();function mu(e,t,r){var i=[];return e.include.forEach(function(n){r=mu(n,t,r)}),e[t].forEach(function(n){r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&i.push(s)}),r.push(n)}),r.filter(function(n,o){return i.indexOf(o)===-1})}function gA(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function i(n){e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function ni(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Is("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=mu(this,"implicit",[]),this.compiledExplicit=mu(this,"explicit",[]),this.compiledTypeMap=gA(this.compiledImplicit,this.compiledExplicit)}ni.DEFAULT=null;ni.create=function(){var t,r;switch(arguments.length){case 1:t=ni.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new Is("Wrong number of arguments for Schema.create function")}if(t=dp.toArray(t),r=dp.toArray(r),!t.every(function(i){return i instanceof ni}))throw new Is("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof mA}))throw new Is("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ni({include:t,explicit:r})};pp.exports=ni});var gp=w((bL,mp)=>{"use strict";y();var yA=de();mp.exports=new yA("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var xp=w((DL,yp)=>{"use strict";y();var xA=de();yp.exports=new xA("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var wp=w((_L,vp)=>{"use strict";y();var vA=de();vp.exports=new vA("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ns=w((FL,Ep)=>{"use strict";y();var wA=xr();Ep.exports=new wA({explicit:[gp(),xp(),wp()]})});var Cp=w((OL,bp)=>{"use strict";y();var EA=de();function bA(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function CA(){return null}function DA(e){return e===null}bp.exports=new EA("tag:yaml.org,2002:null",{kind:"scalar",resolve:bA,construct:CA,predicate:DA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Ap=w((PL,Dp)=>{"use strict";y();var AA=de();function _A(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function SA(e){return e==="true"||e==="True"||e==="TRUE"}function FA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}Dp.exports=new AA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_A,construct:SA,predicate:FA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var Sp=w((NL,_p)=>{"use strict";y();var TA=yr(),OA=de();function kA(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function PA(e){return 48<=e&&e<=55}function IA(e){return 48<=e&&e<=57}function NA(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!kA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}for(;r<t;r++)if(n=e[r],n!=="_"){if(!PA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(n===":")break;if(!IA(e.charCodeAt(r)))return!1;i=!0}return!i||n==="_"?!1:n!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function RA(e){var t=e,r=1,i,n,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,n=1,o.forEach(function(s){t+=s*n,n*=60}),r*t):r*parseInt(t,10)}function MA(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!TA.isNegativeZero(e)}_p.exports=new OA("tag:yaml.org,2002:int",{kind:"scalar",resolve:NA,construct:RA,predicate:MA,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Op=w((ML,Tp)=>{"use strict";y();var Fp=yr(),LA=de(),BA=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function jA(e){return!(e===null||!BA.test(e)||e[e.length-1]==="_")}function $A(e){var t,r,i,n;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){n.unshift(parseFloat(o,10))}),t=0,i=1,n.forEach(function(o){t+=o*i,i*=60}),r*t):r*parseFloat(t,10)}var qA=/^[-+]?[0-9]+e/;function HA(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fp.isNegativeZero(e))return"-0.0";return r=e.toString(10),qA.test(r)?r.replace("e",".e"):r}function UA(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Fp.isNegativeZero(e))}Tp.exports=new LA("tag:yaml.org,2002:float",{kind:"scalar",resolve:jA,construct:$A,predicate:UA,represent:HA,defaultStyle:"lowercase"})});var gu=w((BL,kp)=>{"use strict";y();var zA=xr();kp.exports=new zA({include:[Ns()],implicit:[Cp(),Ap(),Sp(),Op()]})});var yu=w(($L,Pp)=>{"use strict";y();var WA=xr();Pp.exports=new WA({include:[gu()]})});var Mp=w((HL,Rp)=>{"use strict";y();var JA=de(),Ip=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Np=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function GA(e){return e===null?!1:Ip.exec(e)!==null||Np.exec(e)!==null}function VA(e){var t,r,i,n,o,s,u,l=0,m=null,d,f,p;if(t=Ip.exec(e),t===null&&(t=Np.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(d=+t[10],f=+(t[11]||0),m=(d*60+f)*6e4,t[9]==="-"&&(m=-m)),p=new Date(Date.UTC(r,i,n,o,s,u,l)),m&&p.setTime(p.getTime()-m),p}function YA(e){return e.toISOString()}Rp.exports=new JA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:GA,construct:VA,instanceOf:Date,represent:YA})});var Bp=w((zL,Lp)=>{"use strict";y();var XA=de();function KA(e){return e==="<<"||e===null}Lp.exports=new XA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:KA})});var qp=w((JL,$p)=>{"use strict";y();var vr;try{jp=S,vr=jp("buffer").Buffer}catch{}var jp,QA=de(),xu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
107
- \r`;function ZA(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=xu;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function e_(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=xu,s=0,u=[];for(t=0;t<n;t++)t%4===0&&t&&(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)):r===18?(u.push(s>>10&255),u.push(s>>2&255)):r===12&&u.push(s>>4&255),vr?vr.from?vr.from(u):new vr(u):u}function t_(e){var t="",r=0,i,n,o=e.length,s=xu;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function r_(e){return vr&&vr.isBuffer(e)}$p.exports=new QA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ZA,construct:e_,predicate:r_,represent:t_})});var Up=w((YL,Hp)=>{"use strict";y();var i_=de(),n_=Object.prototype.hasOwnProperty,s_=Object.prototype.toString;function o_(e){if(e===null)return!0;var t=[],r,i,n,o,s,u=e;for(r=0,i=u.length;r<i;r+=1){if(n=u[r],s=!1,s_.call(n)!=="[object Object]")return!1;for(o in n)if(n_.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function a_(e){return e!==null?e:[]}Hp.exports=new i_("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o_,construct:a_})});var Wp=w((KL,zp)=>{"use strict";y();var u_=de(),c_=Object.prototype.toString;function l_(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],c_.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function h_(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}zp.exports=new u_("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:l_,construct:h_})});var Gp=w((ZL,Jp)=>{"use strict";y();var f_=de(),d_=Object.prototype.hasOwnProperty;function p_(e){if(e===null)return!0;var t,r=e;for(t in r)if(d_.call(r,t)&&r[t]!==null)return!1;return!0}function m_(e){return e!==null?e:{}}Jp.exports=new f_("tag:yaml.org,2002:set",{kind:"mapping",resolve:p_,construct:m_})});var si=w((tB,Vp)=>{"use strict";y();var g_=xr();Vp.exports=new g_({include:[yu()],implicit:[Mp(),Bp()],explicit:[qp(),Up(),Wp(),Gp()]})});var Xp=w((iB,Yp)=>{"use strict";y();var y_=de();function x_(){return!0}function v_(){}function w_(){return""}function E_(e){return typeof e>"u"}Yp.exports=new y_("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:x_,construct:v_,predicate:E_,represent:w_})});var Qp=w((sB,Kp)=>{"use strict";y();var b_=de();function C_(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function D_(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function A_(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function __(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Kp.exports=new b_("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:C_,construct:D_,predicate:__,represent:A_})});var tm=w((aB,em)=>{"use strict";y();var Rs;try{Zp=S,Rs=Zp("esprima")}catch{typeof window<"u"&&(Rs=window.esprima)}var Zp,S_=de();function F_(e){if(e===null)return!1;try{var t="("+e+")",r=Rs.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function T_(e){var t="("+e+")",r=Rs.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function O_(e){return e.toString()}function k_(e){return Object.prototype.toString.call(e)==="[object Function]"}em.exports=new S_("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:F_,construct:T_,predicate:k_,represent:O_})});var Vi=w((lB,im)=>{"use strict";y();var rm=xr();im.exports=rm.DEFAULT=new rm({include:[si()],explicit:[Xp(),Qp(),tm()]})});var Cm=w((fB,Yi)=>{"use strict";y();var Tt=yr(),lm=ii(),P_=lp(),hm=si(),I_=Vi(),Vt=Object.prototype.hasOwnProperty,Ms=1,fm=2,dm=3,Ls=4,vu=1,N_=2,nm=3,R_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M_=/[\x85\u2028\u2029]/,L_=/[,\[\]\{\}]/,pm=/^(?:!|!!|![a-z\-]+!)$/i,mm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sm(e){return Object.prototype.toString.call(e)}function vt(e){return e===10||e===13}function Er(e){return e===9||e===32}function Re(e){return e===9||e===32||e===10||e===13}function oi(e){return e===44||e===91||e===93||e===123||e===125}function B_(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function j_(e){return e===120?2:e===117?4:e===85?8:0}function $_(e){return 48<=e&&e<=57?e-48:-1}function om(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
108
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function q_(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function gm(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var ym=new Array(256),xm=new Array(256);for(wr=0;wr<256;wr++)ym[wr]=om(wr)?1:0,xm[wr]=om(wr);var wr;function H_(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||I_,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function vm(e,t){return new lm(t,new P_(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,t){throw vm(e,t)}function Bs(e,t){e.onWarning&&e.onWarning.call(null,vm(e,t))}var am={YAML:function(t,r,i){var n,o,s;t.version!==null&&R(t,"duplication of %YAML directive"),i.length!==1&&R(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&R(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&R(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Bs(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&R(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],pm.test(n)||R(t,"ill-formed tag handle (first argument) of the TAG directive"),Vt.call(t.tagMap,n)&&R(t,'there is a previously declared suffix for "'+n+'" tag handle'),mm.test(o)||R(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function Gt(e,t,r,i){var n,o,s,u;if(t<r){if(u=e.input.slice(t,r),i)for(n=0,o=u.length;n<o;n+=1)s=u.charCodeAt(n),s===9||32<=s&&s<=1114111||R(e,"expected valid JSON character");else R_.test(u)&&R(e,"the stream contains non-printable characters");e.result+=u}}function um(e,t,r,i){var n,o,s,u;for(Tt.isObject(r)||R(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,u=n.length;s<u;s+=1)o=n[s],Vt.call(t,o)||(gm(t,o,r[o]),i[o]=!0)}function ai(e,t,r,i,n,o,s,u){var l,m;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,m=n.length;l<m;l+=1)Array.isArray(n[l])&&R(e,"nested arrays are not supported inside keys"),typeof n=="object"&&sm(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&sm(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,m=o.length;l<m;l+=1)um(e,t,o[l],r);else um(e,t,o,r);else!e.json&&!Vt.call(r,n)&&Vt.call(t,n)&&(e.line=s||e.line,e.position=u||e.position,R(e,"duplicated mapping key")),gm(t,n,o),delete r[n];return t}function wu(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):R(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function ue(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Er(n);)n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(vt(n))for(wu(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Bs(e,"deficient indentation"),i}function js(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Re(r)))}function Eu(e,t){t===1?e.result+=" ":t>1&&(e.result+=Tt.repeat(`
109
- `,t-1))}function U_(e,t,r){var i,n,o,s,u,l,m,d,f=e.kind,p=e.result,a;if(a=e.input.charCodeAt(e.position),Re(a)||oi(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(n=e.input.charCodeAt(e.position+1),Re(n)||r&&oi(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,u=!1;a!==0;){if(a===58){if(n=e.input.charCodeAt(e.position+1),Re(n)||r&&oi(n))break}else if(a===35){if(i=e.input.charCodeAt(e.position-1),Re(i))break}else{if(e.position===e.lineStart&&js(e)||r&&oi(a))break;if(vt(a))if(l=e.line,m=e.lineStart,d=e.lineIndent,ue(e,!1,-1),e.lineIndent>=t){u=!0,a=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=m,e.lineIndent=d;break}}u&&(Gt(e,o,s,!1),Eu(e,e.line-l),o=s=e.position,u=!1),Er(a)||(s=e.position+1),a=e.input.charCodeAt(++e.position)}return Gt(e,o,s,!1),e.result?!0:(e.kind=f,e.result=p,!1)}function z_(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Gt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else vt(r)?(Gt(e,i,n,!0),Eu(e,ue(e,!1,t)),i=n=e.position):e.position===e.lineStart&&js(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function W_(e,t){var r,i,n,o,s,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return Gt(e,r,e.position,!0),e.position++,!0;if(u===92){if(Gt(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),vt(u))ue(e,!1,t);else if(u<256&&ym[u])e.result+=xm[u],e.position++;else if((s=j_(u))>0){for(n=s,o=0;n>0;n--)u=e.input.charCodeAt(++e.position),(s=B_(u))>=0?o=(o<<4)+s:R(e,"expected hexadecimal character");e.result+=q_(o),e.position++}else R(e,"unknown escape sequence");r=i=e.position}else vt(u)?(Gt(e,r,i,!0),Eu(e,ue(e,!1,t)),r=i=e.position):e.position===e.lineStart&&js(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function J_(e,t){var r=!0,i,n=e.tag,o,s=e.anchor,u,l,m,d,f,p={},a,c,h,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,f=!1,o=[];else if(g===123)l=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(ue(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=n,e.anchor=s,e.kind=f?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),c=a=h=null,m=d=!1,g===63&&(u=e.input.charCodeAt(e.position+1),Re(u)&&(m=d=!0,e.position++,ue(e,!0,t))),i=e.line,ui(e,t,Ms,!1,!0),c=e.tag,a=e.result,ue(e,!0,t),g=e.input.charCodeAt(e.position),(d||e.line===i)&&g===58&&(m=!0,g=e.input.charCodeAt(++e.position),ue(e,!0,t),ui(e,t,Ms,!1,!0),h=e.result),f?ai(e,o,p,c,a,h):m?o.push(ai(e,null,p,c,a,h)):o.push(a),ue(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(r=!0,g=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function G_(e,t){var r,i,n=vu,o=!1,s=!1,u=t,l=0,m=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)vu===n?n=f===43?nm:N_:R(e,"repeat of a chomping mode identifier");else if((d=$_(f))>=0)d===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?R(e,"repeat of an indentation width identifier"):(u=t+d-1,s=!0);else break;if(Er(f)){do f=e.input.charCodeAt(++e.position);while(Er(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!vt(f)&&f!==0)}for(;f!==0;){for(wu(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<u)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>u&&(u=e.lineIndent),vt(f)){l++;continue}if(e.lineIndent<u){n===nm?e.result+=Tt.repeat(`
110
- `,o?1+l:l):n===vu&&o&&(e.result+=`
111
- `);break}for(i?Er(f)?(m=!0,e.result+=Tt.repeat(`
112
- `,o?1+l:l)):m?(m=!1,e.result+=Tt.repeat(`
113
- `,l+1)):l===0?o&&(e.result+=" "):e.result+=Tt.repeat(`
114
- `,l):e.result+=Tt.repeat(`
115
- `,o?1+l:l),o=!0,s=!0,l=0,r=e.position;!vt(f)&&f!==0;)f=e.input.charCodeAt(++e.position);Gt(e,r,e.position,!1)}return!0}function cm(e,t){var r,i=e.tag,n=e.anchor,o=[],s,u=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Re(s)));){if(u=!0,e.position++,ue(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ui(e,t,dm,!1,!0),o.push(e.result),ue(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function V_(e,t,r){var i,n,o,s,u=e.tag,l=e.anchor,m={},d={},f=null,p=null,a=null,c=!1,h=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),g=e.input.charCodeAt(e.position);g!==0;){if(i=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Re(i))g===63?(c&&(ai(e,m,d,f,p,null),f=p=a=null),h=!0,c=!0,n=!0):c?(c=!1,n=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=i;else if(ui(e,r,fm,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);Er(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Re(g)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),c&&(ai(e,m,d,f,p,null),f=p=a=null),h=!0,c=!1,n=!1,f=e.tag,p=e.result;else if(h)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=l,!0}else if(h)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(ui(e,t,Ls,!0,n)&&(c?p=e.result:a=e.result),c||(ai(e,m,d,f,p,a,o,s),f=p=a=null),ue(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return c&&ai(e,m,d,f,p,null),h&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=m),h}function Y_(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Re(s);)s===33&&(i?R(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),pm.test(n)||R(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),L_.test(o)&&R(e,"tag suffix cannot contain flow indicator characters")}return o&&!mm.test(o)&&R(e,"tag name cannot contain such characters: "+o),r?e.tag=o:Vt.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:R(e,'undeclared tag handle "'+n+'"'),!0}function X_(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Re(r)&&!oi(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function K_(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Re(i)&&!oi(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Vt.call(e.anchorMap,r)||R(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ue(e,!0,-1),!0}function ui(e,t,r,i,n){var o,s,u,l=1,m=!1,d=!1,f,p,a,c,h;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=u=Ls===r||dm===r,i&&ue(e,!0,-1)&&(m=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Y_(e)||X_(e);)ue(e,!0,-1)?(m=!0,u=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):u=!1;if(u&&(u=m||n),(l===1||Ls===r)&&(Ms===r||fm===r?c=t:c=t+1,h=e.position-e.lineStart,l===1?u&&(cm(e,h)||V_(e,h,c))||J_(e,c)?d=!0:(s&&G_(e,c)||z_(e,c)||W_(e,c)?d=!0:K_(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&R(e,"alias node should not have any properties")):U_(e,c,Ms===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(d=u&&cm(e,h))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&R(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,p=e.implicitTypes.length;f<p;f+=1)if(a=e.implicitTypes[f],a.resolve(e.result)){e.result=a.construct(e.result),e.tag=a.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Vt.call(e.typeMap[e.kind||"fallback"],e.tag)?(a=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&a.kind!==e.kind&&R(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+a.kind+'", not "'+e.kind+'"'),a.resolve(e.result)?(e.result=a.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function Q_(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(ue(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Re(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&R(e,"directive name must not be less than one character in length");s!==0;){for(;Er(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!vt(s));break}if(vt(s))break;for(r=e.position;s!==0&&!Re(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&wu(e),Vt.call(am,i)?am[i](e,i,n):Bs(e,'unknown document directive "'+i+'"')}if(ue(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ue(e,!0,-1)):o&&R(e,"directives end mark is expected"),ui(e,e.lineIndent-1,Ls,!1,!0),ue(e,!0,-1),e.checkLineBreaks&&M_.test(e.input.slice(t,e.position))&&Bs(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&js(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ue(e,!0,-1));return}if(e.position<e.length-1)R(e,"end of the stream or a document separator is expected");else return}function wm(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
116
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new H_(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,R(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Q_(r);return r.documents}function Em(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=wm(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function bm(e,t){var r=wm(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new lm("expected a single document in the stream, but found more")}}function Z_(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),Em(e,t,Tt.extend({schema:hm},r))}function eS(e,t){return bm(e,Tt.extend({schema:hm},t))}Yi.exports.loadAll=Em;Yi.exports.load=bm;Yi.exports.safeLoadAll=Z_;Yi.exports.safeLoad=eS});var Jm=w((pB,Au)=>{"use strict";y();var Ki=yr(),Qi=ii(),tS=Vi(),rS=si(),km=Object.prototype.toString,Pm=Object.prototype.hasOwnProperty,iS=9,Xi=10,nS=13,sS=32,oS=33,aS=34,Im=35,uS=37,cS=38,lS=39,hS=42,Nm=44,fS=45,Rm=58,dS=61,pS=62,mS=63,gS=64,Mm=91,Lm=93,yS=96,Bm=123,xS=124,jm=125,_e={};_e[0]="\\0";_e[7]="\\a";_e[8]="\\b";_e[9]="\\t";_e[10]="\\n";_e[11]="\\v";_e[12]="\\f";_e[13]="\\r";_e[27]="\\e";_e[34]='\\"';_e[92]="\\\\";_e[133]="\\N";_e[160]="\\_";_e[8232]="\\L";_e[8233]="\\P";var vS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function wS(e,t){var r,i,n,o,s,u,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],u=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Pm.call(l.styleAliases,u)&&(u=l.styleAliases[u]),r[s]=u;return r}function Dm(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Qi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ki.repeat("0",i-t.length)+t}function ES(e){this.schema=e.schema||tS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ki.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=wS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Am(e,t){for(var r=Ki.repeat(" ",t),i=0,n=-1,o="",s,u=e.length;i<u;)n=e.indexOf(`
100
+ \x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return u=this.buffer.slice(n,s),td.repeat(" ",t)+i+u+o+`
101
+ `+td.repeat(" ",t+this.position-n+i.length)+"^"};lu.prototype.toString=function(t){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(i+=`:
102
+ `+r)),i};rd.exports=lu});var pe=w((yL,sd)=>{"use strict";y();var nd=ri(),KD=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],QD=["scalar","sequence","mapping"];function ZD(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function eA(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(KD.indexOf(r)===-1)throw new nd('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=ZD(t.styleAliases||null),QD.indexOf(this.kind)===-1)throw new nd('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}sd.exports=eA});var gr=w((vL,ad)=>{"use strict";y();var od=mr(),ks=ri(),tA=pe();function hu(e,t,r){var i=[];return e.include.forEach(function(n){r=hu(n,t,r)}),e[t].forEach(function(n){r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&i.push(s)}),r.push(n)}),r.filter(function(n,o){return i.indexOf(o)===-1})}function rA(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function i(n){e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function ii(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new ks("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=hu(this,"implicit",[]),this.compiledExplicit=hu(this,"explicit",[]),this.compiledTypeMap=rA(this.compiledImplicit,this.compiledExplicit)}ii.DEFAULT=null;ii.create=function(){var t,r;switch(arguments.length){case 1:t=ii.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new ks("Wrong number of arguments for Schema.create function")}if(t=od.toArray(t),r=od.toArray(r),!t.every(function(i){return i instanceof ii}))throw new ks("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof tA}))throw new ks("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ii({include:t,explicit:r})};ad.exports=ii});var cd=w((EL,ud)=>{"use strict";y();var iA=pe();ud.exports=new iA("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var hd=w((CL,ld)=>{"use strict";y();var nA=pe();ld.exports=new nA("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var pd=w((AL,fd)=>{"use strict";y();var sA=pe();fd.exports=new sA("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ps=w((SL,dd)=>{"use strict";y();var oA=gr();dd.exports=new oA({explicit:[cd(),hd(),pd()]})});var gd=w((TL,md)=>{"use strict";y();var aA=pe();function uA(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function cA(){return null}function lA(e){return e===null}md.exports=new aA("tag:yaml.org,2002:null",{kind:"scalar",resolve:uA,construct:cA,predicate:lA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var xd=w((kL,yd)=>{"use strict";y();var hA=pe();function fA(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function pA(e){return e==="true"||e==="True"||e==="TRUE"}function dA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}yd.exports=new hA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:fA,construct:pA,predicate:dA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var wd=w((IL,vd)=>{"use strict";y();var mA=mr(),gA=pe();function yA(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function xA(e){return 48<=e&&e<=55}function vA(e){return 48<=e&&e<=57}function wA(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!yA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}for(;r<t;r++)if(n=e[r],n!=="_"){if(!xA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(n===":")break;if(!vA(e.charCodeAt(r)))return!1;i=!0}return!i||n==="_"?!1:n!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function EA(e){var t=e,r=1,i,n,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,n=1,o.forEach(function(s){t+=s*n,n*=60}),r*t):r*parseInt(t,10)}function bA(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!mA.isNegativeZero(e)}vd.exports=new gA("tag:yaml.org,2002:int",{kind:"scalar",resolve:wA,construct:EA,predicate:bA,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Cd=w((RL,bd)=>{"use strict";y();var Ed=mr(),CA=pe(),DA=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function AA(e){return!(e===null||!DA.test(e)||e[e.length-1]==="_")}function _A(e){var t,r,i,n;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){n.unshift(parseFloat(o,10))}),t=0,i=1,n.forEach(function(o){t+=o*i,i*=60}),r*t):r*parseFloat(t,10)}var SA=/^[-+]?[0-9]+e/;function FA(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ed.isNegativeZero(e))return"-0.0";return r=e.toString(10),SA.test(r)?r.replace("e",".e"):r}function TA(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ed.isNegativeZero(e))}bd.exports=new CA("tag:yaml.org,2002:float",{kind:"scalar",resolve:AA,construct:_A,predicate:TA,represent:FA,defaultStyle:"lowercase"})});var fu=w((LL,Dd)=>{"use strict";y();var OA=gr();Dd.exports=new OA({include:[Ps()],implicit:[gd(),xd(),wd(),Cd()]})});var pu=w((jL,Ad)=>{"use strict";y();var kA=gr();Ad.exports=new kA({include:[fu()]})});var Td=w((qL,Fd)=>{"use strict";y();var PA=pe(),_d=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function IA(e){return e===null?!1:_d.exec(e)!==null||Sd.exec(e)!==null}function NA(e){var t,r,i,n,o,s,u,l=0,m=null,p,f,d;if(t=_d.exec(e),t===null&&(t=Sd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(p=+t[10],f=+(t[11]||0),m=(p*60+f)*6e4,t[9]==="-"&&(m=-m)),d=new Date(Date.UTC(r,i,n,o,s,u,l)),m&&d.setTime(d.getTime()-m),d}function RA(e){return e.toISOString()}Fd.exports=new PA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:IA,construct:NA,instanceOf:Date,represent:RA})});var kd=w((UL,Od)=>{"use strict";y();var MA=pe();function LA(e){return e==="<<"||e===null}Od.exports=new MA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:LA})});var Nd=w((zL,Id)=>{"use strict";y();var yr;try{Pd=S,yr=Pd("buffer").Buffer}catch{}var Pd,BA=pe(),du=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
103
+ \r`;function jA(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=du;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function $A(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=du,s=0,u=[];for(t=0;t<n;t++)t%4===0&&t&&(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)):r===18?(u.push(s>>10&255),u.push(s>>2&255)):r===12&&u.push(s>>4&255),yr?yr.from?yr.from(u):new yr(u):u}function qA(e){var t="",r=0,i,n,o=e.length,s=du;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function HA(e){return yr&&yr.isBuffer(e)}Id.exports=new BA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:jA,construct:$A,predicate:HA,represent:qA})});var Md=w((VL,Rd)=>{"use strict";y();var UA=pe(),WA=Object.prototype.hasOwnProperty,zA=Object.prototype.toString;function JA(e){if(e===null)return!0;var t=[],r,i,n,o,s,u=e;for(r=0,i=u.length;r<i;r+=1){if(n=u[r],s=!1,zA.call(n)!=="[object Object]")return!1;for(o in n)if(WA.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function GA(e){return e!==null?e:[]}Rd.exports=new UA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:JA,construct:GA})});var Bd=w((YL,Ld)=>{"use strict";y();var VA=pe(),XA=Object.prototype.toString;function YA(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],XA.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function KA(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}Ld.exports=new VA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:YA,construct:KA})});var $d=w((QL,jd)=>{"use strict";y();var QA=pe(),ZA=Object.prototype.hasOwnProperty;function e_(e){if(e===null)return!0;var t,r=e;for(t in r)if(ZA.call(r,t)&&r[t]!==null)return!1;return!0}function t_(e){return e!==null?e:{}}jd.exports=new QA("tag:yaml.org,2002:set",{kind:"mapping",resolve:e_,construct:t_})});var ni=w((eB,qd)=>{"use strict";y();var r_=gr();qd.exports=new r_({include:[pu()],implicit:[Td(),kd()],explicit:[Nd(),Md(),Bd(),$d()]})});var Ud=w((rB,Hd)=>{"use strict";y();var i_=pe();function n_(){return!0}function s_(){}function o_(){return""}function a_(e){return typeof e>"u"}Hd.exports=new i_("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n_,construct:s_,predicate:a_,represent:o_})});var zd=w((nB,Wd)=>{"use strict";y();var u_=pe();function c_(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function l_(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function h_(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function f_(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Wd.exports=new u_("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:c_,construct:l_,predicate:f_,represent:h_})});var Vd=w((oB,Gd)=>{"use strict";y();var Is;try{Jd=S,Is=Jd("esprima")}catch{typeof window<"u"&&(Is=window.esprima)}var Jd,p_=pe();function d_(e){if(e===null)return!1;try{var t="("+e+")",r=Is.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function m_(e){var t="("+e+")",r=Is.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function g_(e){return e.toString()}function y_(e){return Object.prototype.toString.call(e)==="[object Function]"}Gd.exports=new p_("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:d_,construct:m_,predicate:y_,represent:g_})});var Vi=w((cB,Yd)=>{"use strict";y();var Xd=gr();Yd.exports=Xd.DEFAULT=new Xd({include:[ni()],explicit:[Ud(),zd(),Vd()]})});var gm=w((hB,Xi)=>{"use strict";y();var St=mr(),im=ri(),x_=id(),nm=ni(),v_=Vi(),Jt=Object.prototype.hasOwnProperty,Ns=1,sm=2,om=3,Rs=4,mu=1,w_=2,Kd=3,E_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b_=/[\x85\u2028\u2029]/,C_=/[,\[\]\{\}]/,am=/^(?:!|!!|![a-z\-]+!)$/i,um=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qd(e){return Object.prototype.toString.call(e)}function yt(e){return e===10||e===13}function vr(e){return e===9||e===32}function Ie(e){return e===9||e===32||e===10||e===13}function si(e){return e===44||e===91||e===93||e===123||e===125}function D_(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function A_(e){return e===120?2:e===117?4:e===85?8:0}function __(e){return 48<=e&&e<=57?e-48:-1}function Zd(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
104
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function S_(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function cm(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var lm=new Array(256),hm=new Array(256);for(xr=0;xr<256;xr++)lm[xr]=Zd(xr)?1:0,hm[xr]=Zd(xr);var xr;function F_(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||v_,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function fm(e,t){return new im(t,new x_(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,t){throw fm(e,t)}function Ms(e,t){e.onWarning&&e.onWarning.call(null,fm(e,t))}var em={YAML:function(t,r,i){var n,o,s;t.version!==null&&R(t,"duplication of %YAML directive"),i.length!==1&&R(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&R(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&R(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Ms(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&R(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],am.test(n)||R(t,"ill-formed tag handle (first argument) of the TAG directive"),Jt.call(t.tagMap,n)&&R(t,'there is a previously declared suffix for "'+n+'" tag handle'),um.test(o)||R(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function zt(e,t,r,i){var n,o,s,u;if(t<r){if(u=e.input.slice(t,r),i)for(n=0,o=u.length;n<o;n+=1)s=u.charCodeAt(n),s===9||32<=s&&s<=1114111||R(e,"expected valid JSON character");else E_.test(u)&&R(e,"the stream contains non-printable characters");e.result+=u}}function tm(e,t,r,i){var n,o,s,u;for(St.isObject(r)||R(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,u=n.length;s<u;s+=1)o=n[s],Jt.call(t,o)||(cm(t,o,r[o]),i[o]=!0)}function oi(e,t,r,i,n,o,s,u){var l,m;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,m=n.length;l<m;l+=1)Array.isArray(n[l])&&R(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Qd(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Qd(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,m=o.length;l<m;l+=1)tm(e,t,o[l],r);else tm(e,t,o,r);else!e.json&&!Jt.call(r,n)&&Jt.call(t,n)&&(e.line=s||e.line,e.position=u||e.position,R(e,"duplicated mapping key")),cm(t,n,o),delete r[n];return t}function gu(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):R(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function ue(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;vr(n);)n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(yt(n))for(gu(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ms(e,"deficient indentation"),i}function Ls(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ie(r)))}function yu(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
105
+ `,t-1))}function T_(e,t,r){var i,n,o,s,u,l,m,p,f=e.kind,d=e.result,a;if(a=e.input.charCodeAt(e.position),Ie(a)||si(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(n=e.input.charCodeAt(e.position+1),Ie(n)||r&&si(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,u=!1;a!==0;){if(a===58){if(n=e.input.charCodeAt(e.position+1),Ie(n)||r&&si(n))break}else if(a===35){if(i=e.input.charCodeAt(e.position-1),Ie(i))break}else{if(e.position===e.lineStart&&Ls(e)||r&&si(a))break;if(yt(a))if(l=e.line,m=e.lineStart,p=e.lineIndent,ue(e,!1,-1),e.lineIndent>=t){u=!0,a=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=m,e.lineIndent=p;break}}u&&(zt(e,o,s,!1),yu(e,e.line-l),o=s=e.position,u=!1),vr(a)||(s=e.position+1),a=e.input.charCodeAt(++e.position)}return zt(e,o,s,!1),e.result?!0:(e.kind=f,e.result=d,!1)}function O_(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(zt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else yt(r)?(zt(e,i,n,!0),yu(e,ue(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ls(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function k_(e,t){var r,i,n,o,s,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return zt(e,r,e.position,!0),e.position++,!0;if(u===92){if(zt(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),yt(u))ue(e,!1,t);else if(u<256&&lm[u])e.result+=hm[u],e.position++;else if((s=A_(u))>0){for(n=s,o=0;n>0;n--)u=e.input.charCodeAt(++e.position),(s=D_(u))>=0?o=(o<<4)+s:R(e,"expected hexadecimal character");e.result+=S_(o),e.position++}else R(e,"unknown escape sequence");r=i=e.position}else yt(u)?(zt(e,r,i,!0),yu(e,ue(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ls(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function P_(e,t){var r=!0,i,n=e.tag,o,s=e.anchor,u,l,m,p,f,d={},a,c,h,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,f=!1,o=[];else if(g===123)l=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(ue(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=n,e.anchor=s,e.kind=f?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),c=a=h=null,m=p=!1,g===63&&(u=e.input.charCodeAt(e.position+1),Ie(u)&&(m=p=!0,e.position++,ue(e,!0,t))),i=e.line,ai(e,t,Ns,!1,!0),c=e.tag,a=e.result,ue(e,!0,t),g=e.input.charCodeAt(e.position),(p||e.line===i)&&g===58&&(m=!0,g=e.input.charCodeAt(++e.position),ue(e,!0,t),ai(e,t,Ns,!1,!0),h=e.result),f?oi(e,o,d,c,a,h):m?o.push(oi(e,null,d,c,a,h)):o.push(a),ue(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(r=!0,g=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function I_(e,t){var r,i,n=mu,o=!1,s=!1,u=t,l=0,m=!1,p,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)mu===n?n=f===43?Kd:w_:R(e,"repeat of a chomping mode identifier");else if((p=__(f))>=0)p===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?R(e,"repeat of an indentation width identifier"):(u=t+p-1,s=!0);else break;if(vr(f)){do f=e.input.charCodeAt(++e.position);while(vr(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!yt(f)&&f!==0)}for(;f!==0;){for(gu(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<u)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>u&&(u=e.lineIndent),yt(f)){l++;continue}if(e.lineIndent<u){n===Kd?e.result+=St.repeat(`
106
+ `,o?1+l:l):n===mu&&o&&(e.result+=`
107
+ `);break}for(i?vr(f)?(m=!0,e.result+=St.repeat(`
108
+ `,o?1+l:l)):m?(m=!1,e.result+=St.repeat(`
109
+ `,l+1)):l===0?o&&(e.result+=" "):e.result+=St.repeat(`
110
+ `,l):e.result+=St.repeat(`
111
+ `,o?1+l:l),o=!0,s=!0,l=0,r=e.position;!yt(f)&&f!==0;)f=e.input.charCodeAt(++e.position);zt(e,r,e.position,!1)}return!0}function rm(e,t){var r,i=e.tag,n=e.anchor,o=[],s,u=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Ie(s)));){if(u=!0,e.position++,ue(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ai(e,t,om,!1,!0),o.push(e.result),ue(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function N_(e,t,r){var i,n,o,s,u=e.tag,l=e.anchor,m={},p={},f=null,d=null,a=null,c=!1,h=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),g=e.input.charCodeAt(e.position);g!==0;){if(i=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Ie(i))g===63?(c&&(oi(e,m,p,f,d,null),f=d=a=null),h=!0,c=!0,n=!0):c?(c=!1,n=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=i;else if(ai(e,r,sm,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);vr(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Ie(g)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),c&&(oi(e,m,p,f,d,null),f=d=a=null),h=!0,c=!1,n=!1,f=e.tag,d=e.result;else if(h)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=l,!0}else if(h)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(ai(e,t,Rs,!0,n)&&(c?d=e.result:a=e.result),c||(oi(e,m,p,f,d,a,o,s),f=d=a=null),ue(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return c&&oi(e,m,p,f,d,null),h&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=m),h}function R_(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ie(s);)s===33&&(i?R(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),am.test(n)||R(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),C_.test(o)&&R(e,"tag suffix cannot contain flow indicator characters")}return o&&!um.test(o)&&R(e,"tag name cannot contain such characters: "+o),r?e.tag=o:Jt.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:R(e,'undeclared tag handle "'+n+'"'),!0}function M_(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ie(r)&&!si(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function L_(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Ie(i)&&!si(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Jt.call(e.anchorMap,r)||R(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ue(e,!0,-1),!0}function ai(e,t,r,i,n){var o,s,u,l=1,m=!1,p=!1,f,d,a,c,h;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=u=Rs===r||om===r,i&&ue(e,!0,-1)&&(m=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;R_(e)||M_(e);)ue(e,!0,-1)?(m=!0,u=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):u=!1;if(u&&(u=m||n),(l===1||Rs===r)&&(Ns===r||sm===r?c=t:c=t+1,h=e.position-e.lineStart,l===1?u&&(rm(e,h)||N_(e,h,c))||P_(e,c)?p=!0:(s&&I_(e,c)||O_(e,c)||k_(e,c)?p=!0:L_(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&R(e,"alias node should not have any properties")):T_(e,c,Ns===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(p=u&&rm(e,h))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&R(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,d=e.implicitTypes.length;f<d;f+=1)if(a=e.implicitTypes[f],a.resolve(e.result)){e.result=a.construct(e.result),e.tag=a.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Jt.call(e.typeMap[e.kind||"fallback"],e.tag)?(a=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&a.kind!==e.kind&&R(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+a.kind+'", not "'+e.kind+'"'),a.resolve(e.result)?(e.result=a.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function B_(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(ue(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Ie(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&R(e,"directive name must not be less than one character in length");s!==0;){for(;vr(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!yt(s));break}if(yt(s))break;for(r=e.position;s!==0&&!Ie(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&gu(e),Jt.call(em,i)?em[i](e,i,n):Ms(e,'unknown document directive "'+i+'"')}if(ue(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ue(e,!0,-1)):o&&R(e,"directives end mark is expected"),ai(e,e.lineIndent-1,Rs,!1,!0),ue(e,!0,-1),e.checkLineBreaks&&b_.test(e.input.slice(t,e.position))&&Ms(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ls(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ue(e,!0,-1));return}if(e.position<e.length-1)R(e,"end of the stream or a document separator is expected");else return}function pm(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
112
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new F_(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,R(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)B_(r);return r.documents}function dm(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=pm(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function mm(e,t){var r=pm(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new im("expected a single document in the stream, but found more")}}function j_(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),dm(e,t,St.extend({schema:nm},r))}function $_(e,t){return mm(e,St.extend({schema:nm},t))}Xi.exports.loadAll=dm;Xi.exports.load=mm;Xi.exports.safeLoadAll=j_;Xi.exports.safeLoad=$_});var jm=w((pB,Eu)=>{"use strict";y();var Ki=mr(),Qi=ri(),q_=Vi(),H_=ni(),Dm=Object.prototype.toString,Am=Object.prototype.hasOwnProperty,U_=9,Yi=10,W_=13,z_=32,J_=33,G_=34,_m=35,V_=37,X_=38,Y_=39,K_=42,Sm=44,Q_=45,Fm=58,Z_=61,eS=62,tS=63,rS=64,Tm=91,Om=93,iS=96,km=123,nS=124,Pm=125,Ae={};Ae[0]="\\0";Ae[7]="\\a";Ae[8]="\\b";Ae[9]="\\t";Ae[10]="\\n";Ae[11]="\\v";Ae[12]="\\f";Ae[13]="\\r";Ae[27]="\\e";Ae[34]='\\"';Ae[92]="\\\\";Ae[133]="\\N";Ae[160]="\\_";Ae[8232]="\\L";Ae[8233]="\\P";var sS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function oS(e,t){var r,i,n,o,s,u,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],u=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Am.call(l.styleAliases,u)&&(u=l.styleAliases[u]),r[s]=u;return r}function ym(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Qi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ki.repeat("0",i-t.length)+t}function aS(e){this.schema=e.schema||q_,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ki.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=oS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function xm(e,t){for(var r=Ki.repeat(" ",t),i=0,n=-1,o="",s,u=e.length;i<u;)n=e.indexOf(`
117
113
  `,i),n===-1?(s=e.slice(i),i=u):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
118
- `&&(o+=r),o+=s;return o}function bu(e,t){return`
119
- `+Ki.repeat(" ",e.indent*t)}function bS(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Du(e){return e===sS||e===iS}function ci(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function CS(e){return ci(e)&&!Du(e)&&e!==65279&&e!==nS&&e!==Xi}function _m(e,t){return ci(e)&&e!==65279&&e!==Nm&&e!==Mm&&e!==Lm&&e!==Bm&&e!==jm&&e!==Rm&&(e!==Im||t&&CS(t))}function DS(e){return ci(e)&&e!==65279&&!Du(e)&&e!==fS&&e!==mS&&e!==Rm&&e!==Nm&&e!==Mm&&e!==Lm&&e!==Bm&&e!==jm&&e!==Im&&e!==cS&&e!==hS&&e!==oS&&e!==xS&&e!==dS&&e!==pS&&e!==lS&&e!==aS&&e!==uS&&e!==gS&&e!==yS}function $m(e){var t=/^\n* /;return t.test(e)}var qm=1,Hm=2,Um=3,zm=4,$s=5;function AS(e,t,r,i,n){var o,s,u,l=!1,m=!1,d=i!==-1,f=-1,p=DS(e.charCodeAt(0))&&!Du(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!ci(s))return $s;u=o>0?e.charCodeAt(o-1):null,p=p&&_m(s,u)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Xi)l=!0,d&&(m=m||o-f-1>i&&e[f+1]!==" ",f=o);else if(!ci(s))return $s;u=o>0?e.charCodeAt(o-1):null,p=p&&_m(s,u)}m=m||d&&o-f-1>i&&e[f+1]!==" "}return!l&&!m?p&&!n(e)?qm:Hm:r>9&&$m(e)?$s:m?zm:Um}function _S(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&vS.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return bS(e,l)}switch(AS(t,s,e.indent,o,u)){case qm:return t;case Hm:return"'"+t.replace(/'/g,"''")+"'";case Um:return"|"+Sm(t,e.indent)+Fm(Am(t,n));case zm:return">"+Sm(t,e.indent)+Fm(Am(SS(t,o),n));case $s:return'"'+FS(t,o)+'"';default:throw new Qi("impossible error: invalid scalar style")}})()}function Sm(e,t){var r=$m(e)?String(t):"",i=e[e.length-1]===`
114
+ `&&(o+=r),o+=s;return o}function xu(e,t){return`
115
+ `+Ki.repeat(" ",e.indent*t)}function uS(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function wu(e){return e===z_||e===U_}function ui(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function cS(e){return ui(e)&&!wu(e)&&e!==65279&&e!==W_&&e!==Yi}function vm(e,t){return ui(e)&&e!==65279&&e!==Sm&&e!==Tm&&e!==Om&&e!==km&&e!==Pm&&e!==Fm&&(e!==_m||t&&cS(t))}function lS(e){return ui(e)&&e!==65279&&!wu(e)&&e!==Q_&&e!==tS&&e!==Fm&&e!==Sm&&e!==Tm&&e!==Om&&e!==km&&e!==Pm&&e!==_m&&e!==X_&&e!==K_&&e!==J_&&e!==nS&&e!==Z_&&e!==eS&&e!==Y_&&e!==G_&&e!==V_&&e!==rS&&e!==iS}function Im(e){var t=/^\n* /;return t.test(e)}var Nm=1,Rm=2,Mm=3,Lm=4,Bs=5;function hS(e,t,r,i,n){var o,s,u,l=!1,m=!1,p=i!==-1,f=-1,d=lS(e.charCodeAt(0))&&!wu(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!ui(s))return Bs;u=o>0?e.charCodeAt(o-1):null,d=d&&vm(s,u)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Yi)l=!0,p&&(m=m||o-f-1>i&&e[f+1]!==" ",f=o);else if(!ui(s))return Bs;u=o>0?e.charCodeAt(o-1):null,d=d&&vm(s,u)}m=m||p&&o-f-1>i&&e[f+1]!==" "}return!l&&!m?d&&!n(e)?Nm:Rm:r>9&&Im(e)?Bs:m?Lm:Mm}function fS(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&sS.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return uS(e,l)}switch(hS(t,s,e.indent,o,u)){case Nm:return t;case Rm:return"'"+t.replace(/'/g,"''")+"'";case Mm:return"|"+wm(t,e.indent)+Em(xm(t,n));case Lm:return">"+wm(t,e.indent)+Em(xm(pS(t,o),n));case Bs:return'"'+dS(t,o)+'"';default:throw new Qi("impossible error: invalid scalar style")}})()}function wm(e,t){var r=Im(e)?String(t):"",i=e[e.length-1]===`
120
116
  `,n=i&&(e[e.length-2]===`
121
117
  `||e===`
122
118
  `),o=n?"+":i?"":"-";return r+o+`
123
- `}function Fm(e){return e[e.length-1]===`
124
- `?e.slice(0,-1):e}function SS(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var m=e.indexOf(`
125
- `);return m=m!==-1?m:e.length,r.lastIndex=m,Tm(e.slice(0,m),t)})(),n=e[0]===`
119
+ `}function Em(e){return e[e.length-1]===`
120
+ `?e.slice(0,-1):e}function pS(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var m=e.indexOf(`
121
+ `);return m=m!==-1?m:e.length,r.lastIndex=m,bm(e.slice(0,m),t)})(),n=e[0]===`
126
122
  `||e[0]===" ",o,s;s=r.exec(e);){var u=s[1],l=s[2];o=l[0]===" ",i+=u+(!n&&!o&&l!==""?`
127
- `:"")+Tm(l,t),n=o}return i}function Tm(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,u=0,l="";i=r.exec(e);)u=i.index,u-n>t&&(o=s>n?s:u,l+=`
123
+ `:"")+bm(l,t),n=o}return i}function bm(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,u=0,l="";i=r.exec(e);)u=i.index,u-n>t&&(o=s>n?s:u,l+=`
128
124
  `+e.slice(n,o),n=o+1),s=u;return l+=`
129
125
  `,e.length-n>t&&s>n?l+=e.slice(n,s)+`
130
- `+e.slice(s+1):l+=e.slice(n),l.slice(1)}function FS(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=Dm((r-55296)*1024+i-56320+65536),o++;continue}n=_e[r],t+=!n&&ci(r)?e[o]:n||Dm(r)}return t}function TS(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)br(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function OS(e,t,r,i){var n="",o=e.tag,s,u;for(s=0,u=r.length;s<u;s+=1)br(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=bu(e,t)),e.dump&&Xi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function kS(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,u,l,m,d;for(s=0,u=o.length;s<u;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),l=o[s],m=r[l],br(e,t,l,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),br(e,t,m,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function PS(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),u,l,m,d,f,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Qi("sortKeys must be a boolean or a function");for(u=0,l=s.length;u<l;u+=1)p="",(!i||u!==0)&&(p+=bu(e,t)),m=s[u],d=r[m],br(e,t+1,m,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Xi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=bu(e,t)),br(e,t+1,d,!0,f)&&(e.dump&&Xi===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=o,e.dump=n||"{}"}function Om(e,t,r){var i,n,o,s,u,l;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(u=n[o],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=r?u.tag:"?",u.represent){if(l=e.styleMap[u.tag]||u.defaultStyle,km.call(u.represent)==="[object Function]")i=u.represent(t,l);else if(Pm.call(u.represent,l))i=u.represent[l](t,l);else throw new Qi("!<"+u.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function br(e,t,r,i,n,o){e.tag=null,e.dump=r,Om(e,r,!1)||Om(e,r,!0);var s=km.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",l,m;if(u&&(l=e.duplicates.indexOf(r),m=l!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(u&&m&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(PS(e,t,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(kS(e,t,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(OS(e,d,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(TS(e,d,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&_S(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Qi("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function IS(e,t){var r=[],i=[],n,o;for(Cu(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function Cu(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)Cu(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)Cu(e[i[n]],t,r)}function Wm(e,t){t=t||{};var r=new ES(t);return r.noRefs||IS(e,r),br(r,0,e,!0,!0)?r.dump+`
131
- `:""}function NS(e,t){return Wm(e,Ki.extend({schema:rS},t))}Au.exports.dump=Wm;Au.exports.safeDump=NS});var Vm=w((gB,Z)=>{"use strict";y();var qs=Cm(),Gm=Jm();function Hs(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Z.exports.Type=de();Z.exports.Schema=xr();Z.exports.FAILSAFE_SCHEMA=Ns();Z.exports.JSON_SCHEMA=gu();Z.exports.CORE_SCHEMA=yu();Z.exports.DEFAULT_SAFE_SCHEMA=si();Z.exports.DEFAULT_FULL_SCHEMA=Vi();Z.exports.load=qs.load;Z.exports.loadAll=qs.loadAll;Z.exports.safeLoad=qs.safeLoad;Z.exports.safeLoadAll=qs.safeLoadAll;Z.exports.dump=Gm.dump;Z.exports.safeDump=Gm.safeDump;Z.exports.YAMLException=ii();Z.exports.MINIMAL_SCHEMA=Ns();Z.exports.SAFE_SCHEMA=si();Z.exports.DEFAULT_SCHEMA=Vi();Z.exports.scan=Hs("scan");Z.exports.parse=Hs("parse");Z.exports.compose=Hs("compose");Z.exports.addConstructor=Hs("addConstructor")});var Xm=w((xB,Ym)=>{"use strict";y();var RS=Vm();Ym.exports=RS});var ng=w(Us=>{"use strict";y();Object.defineProperty(Us,"__esModule",{value:!0});var eg=function(t,r){return t<r?-1:t>r?1:0},MS=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,tg=/^\s+|\s+$/g,LS=/\s+/g,BS=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,jS=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,$S=/^0+[1-9]{1}[0-9]*$/,qS=/[^\x00-\x80]/,HS=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Km=function(t,r){return t<r?-1:t>r?1:0},US=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var u=t[s],l=r[s];if(u.normalizedString!==l.normalizedString){if(u.normalizedString===""!=(l.normalizedString===""))return u.normalizedString===""?-1:1;if(u.parsedNumber!==void 0&&l.parsedNumber!==void 0){var m=eg(u.parsedNumber,l.parsedNumber);return m===0?Km(u.normalizedString,l.normalizedString):m}else return u.parsedNumber!==void 0||l.parsedNumber!==void 0?u.parsedNumber!==void 0?-1:1:qS.test(u.normalizedString+l.normalizedString)&&u.normalizedString.localeCompare?HS(u.normalizedString,l.normalizedString):Km(u.normalizedString,l.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},zS=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},rg=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?eg(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?US(t.chunks,r.chunks):zS(t,r)},WS=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,u=r.values,l=o.length,m=i.length,d=0;d<l;d++){var f=d<m?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,u[d].value);if(p)return p}else{var a=rg(o[d],u[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},JS=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},GS=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(tg,""):""},ig=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},VS=function(t){if(jS.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},YS=function(t){var r=ig(t);return r!==void 0?r:VS(t)},XS=function(t){return t.replace(MS,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},KS=function(t){return t.replace(LS," ").replace(tg,"")},QS=function(t,r,i){if(BS.test(t)&&(!$S.test(t)||r===0||i[r-1]!=="."))return ig(t)||0},ZS=function(t,r,i){return{parsedNumber:QS(t,r,i),normalizedString:KS(t)}},e1=function(t){var r=XS(t).map(ZS);return r},t1=function(t){return typeof t=="function"},Qm=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},r1=function(t){return t===null},i1=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},n1=function(t){return typeof t=="symbol"},s1=function(t){return t===void 0},_u=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!Qm(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=GS(t),i=YS(r),n=e1(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:t1(t),isNaN:Qm(t),isNull:r1(t),isObject:i1(t),isSymbol:n1(t),isUndefined:s1(t),value:t}},o1=function(t,r){return r(t)},a1=function(t,r){return t[r]},u1=function(t,r,i){var n=r.length?r.map(JS):[function(s){return s}],o=t.map(function(s,u){var l=n.map(function(m){return o1(s,m)}).map(_u);return{index:u,values:l}});return o.sort(function(s,u){return WS(s,u,i)}),o.map(function(s){return a1(t,s.index)})},c1=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},l1=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function h1(e,t,r){if(!e||!Array.isArray(e))return[];var i=c1(t),n=l1(r);return u1(e,i,n)}var f1=function(t){return function(r,i){var n=_u(r),o=_u(i),s=rg(n,o);return s*(t.order==="desc"?-1:1)}},Zm=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},d1=function(t){var r="asc";return typeof t=="string"&&Zm(t)?r=t:t&&typeof t=="object"&&t.order&&Zm(t.order)&&(r=t.order),{order:r}};function p1(e){var t=d1(e);return f1(t)}Us.orderBy=h1;Us.compare=p1});var ag=w((bB,og)=>{"use strict";y();var sg="[\uD800-\uDBFF][\uDC00-\uDFFF]",m1=e=>e&&e.exact?new RegExp(`^${sg}$`):new RegExp(sg,"g");og.exports=m1});var fg=w((DB,hg)=>{"use strict";y();var g1=Rv(),y1=ag(),ug=Gl(),lg=["\x1B","\x9B"],zs=e=>`${lg[0]}[${e}m`,cg=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=ug.codes.get(Number.parseInt(n,10));if(s){let u=e.indexOf(s.toString());u===-1?i.push(zs(t?s:o)):e.splice(u,1)}else if(t){i.push(zs(0));break}else i.push(zs(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=zs(ug.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};hg.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,u,l=0,m="";for(let[d,f]of i.entries()){let p=!1;if(lg.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));u=a&&a.length>0?a[0]:void 0,l<o&&(s=!0,u!==void 0&&n.push(u))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&l++,!y1({exact:!0}).test(f)&&g1(f.codePointAt())&&(l++,typeof r!="number"&&o++),l>t&&l<=o)m+=f;else if(l===t&&!s&&u!==void 0)m=cg(n);else if(l>=o){m+=cg(n,!0,u);break}}return m}});var Js=w(ee=>{"use strict";y();Object.defineProperty(ee,"__esModule",{value:!0});ee.option=ee.help=ee.version=ee.string=ee.url=ee.file=ee.directory=ee.integer=ee.boolean=ee.custom=void 0;var x1=S("node:url"),Ws=Ye(),v1=zi(),dg=_t();function li(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}ee.custom=li;function Su(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}ee.boolean=Su;ee.integer=li({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Ws.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Ws.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Ws.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ee.directory=li({async parse(e,t,r){return r.exists?(0,dg.dirExists)(e):e}});ee.file=li({async parse(e,t,r){return r.exists?(0,dg.fileExists)(e):e}});ee.url=li({async parse(e){try{return new x1.URL(e)}catch{throw new Ws.CLIError(`Expected a valid url but received: ${e}`)}}});ee.string=li();var w1=(e={})=>Su({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});ee.version=w1;var E1=(e={})=>Su({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,v1.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});ee.help=E1;function b1(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}ee.option=b1});var mg=w(Ue=>{"use strict";y();var C1=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),D1=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),A1=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&C1(t,e,r);return D1(t,e),t},Gs=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.table=void 0;var pg=Gs(Je()),_1=Xm(),S1=ng(),F1=S("node:util"),T1=Gs(fg()),Cr=Gs(Zo()),Yt=A1(Js()),O1=cr(),Fu=le(),k1=Gs(Ht()),Tu=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],c=a.extended??!1,h=a.get??(v=>v[p]??""),g=typeof a.header=="string"?a.header:(0,Fu.capitalize)(p.replaceAll("_"," ")),x=Math.max(a.minWidth??0,(0,Cr.default)(g)+1);return{extended:c,get:h,header:g,key:p,minWidth:x}});let{columns:n,csv:o,extended:s,filter:u,output:l,printLine:m,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:u,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":l,printLine:m??(p=>k1.default.stdout(p+`
132
- `)),rowStart:" ",sort:d,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,F1.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let u=new RegExp(i),m=s[o.key].match(u);return n?!m:m})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>u=>u[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,S1.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
126
+ `+e.slice(s+1):l+=e.slice(n),l.slice(1)}function dS(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=ym((r-55296)*1024+i-56320+65536),o++;continue}n=Ae[r],t+=!n&&ui(r)?e[o]:n||ym(r)}return t}function mS(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)wr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function gS(e,t,r,i){var n="",o=e.tag,s,u;for(s=0,u=r.length;s<u;s+=1)wr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=xu(e,t)),e.dump&&Yi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function yS(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,u,l,m,p;for(s=0,u=o.length;s<u;s+=1)p="",s!==0&&(p+=", "),e.condenseFlow&&(p+='"'),l=o[s],m=r[l],wr(e,t,l,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wr(e,t,m,!1,!1)&&(p+=e.dump,i+=p));e.tag=n,e.dump="{"+i+"}"}function xS(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),u,l,m,p,f,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Qi("sortKeys must be a boolean or a function");for(u=0,l=s.length;u<l;u+=1)d="",(!i||u!==0)&&(d+=xu(e,t)),m=s[u],p=r[m],wr(e,t+1,m,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Yi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,f&&(d+=xu(e,t)),wr(e,t+1,p,!0,f)&&(e.dump&&Yi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=o,e.dump=n||"{}"}function Cm(e,t,r){var i,n,o,s,u,l;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(u=n[o],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=r?u.tag:"?",u.represent){if(l=e.styleMap[u.tag]||u.defaultStyle,Dm.call(u.represent)==="[object Function]")i=u.represent(t,l);else if(Am.call(u.represent,l))i=u.represent[l](t,l);else throw new Qi("!<"+u.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function wr(e,t,r,i,n,o){e.tag=null,e.dump=r,Cm(e,r,!1)||Cm(e,r,!0);var s=Dm.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",l,m;if(u&&(l=e.duplicates.indexOf(r),m=l!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(u&&m&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(xS(e,t,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(yS(e,t,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var p=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(gS(e,p,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(mS(e,p,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&fS(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Qi("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function vS(e,t){var r=[],i=[],n,o;for(vu(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function vu(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)vu(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)vu(e[i[n]],t,r)}function Bm(e,t){t=t||{};var r=new aS(t);return r.noRefs||vS(e,r),wr(r,0,e,!0,!0)?r.dump+`
127
+ `:""}function wS(e,t){return Bm(e,Ki.extend({schema:H_},t))}Eu.exports.dump=Bm;Eu.exports.safeDump=wS});var qm=w((mB,Z)=>{"use strict";y();var js=gm(),$m=jm();function $s(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Z.exports.Type=pe();Z.exports.Schema=gr();Z.exports.FAILSAFE_SCHEMA=Ps();Z.exports.JSON_SCHEMA=fu();Z.exports.CORE_SCHEMA=pu();Z.exports.DEFAULT_SAFE_SCHEMA=ni();Z.exports.DEFAULT_FULL_SCHEMA=Vi();Z.exports.load=js.load;Z.exports.loadAll=js.loadAll;Z.exports.safeLoad=js.safeLoad;Z.exports.safeLoadAll=js.safeLoadAll;Z.exports.dump=$m.dump;Z.exports.safeDump=$m.safeDump;Z.exports.YAMLException=ri();Z.exports.MINIMAL_SCHEMA=Ps();Z.exports.SAFE_SCHEMA=ni();Z.exports.DEFAULT_SCHEMA=Vi();Z.exports.scan=$s("scan");Z.exports.parse=$s("parse");Z.exports.compose=$s("compose");Z.exports.addConstructor=$s("addConstructor")});var Um=w((yB,Hm)=>{"use strict";y();var ES=qm();Hm.exports=ES});var Km=w(qs=>{"use strict";y();Object.defineProperty(qs,"__esModule",{value:!0});var Gm=function(t,r){return t<r?-1:t>r?1:0},bS=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Vm=/^\s+|\s+$/g,CS=/\s+/g,DS=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,AS=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,_S=/^0+[1-9]{1}[0-9]*$/,SS=/[^\x00-\x80]/,FS=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Wm=function(t,r){return t<r?-1:t>r?1:0},TS=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var u=t[s],l=r[s];if(u.normalizedString!==l.normalizedString){if(u.normalizedString===""!=(l.normalizedString===""))return u.normalizedString===""?-1:1;if(u.parsedNumber!==void 0&&l.parsedNumber!==void 0){var m=Gm(u.parsedNumber,l.parsedNumber);return m===0?Wm(u.normalizedString,l.normalizedString):m}else return u.parsedNumber!==void 0||l.parsedNumber!==void 0?u.parsedNumber!==void 0?-1:1:SS.test(u.normalizedString+l.normalizedString)&&u.normalizedString.localeCompare?FS(u.normalizedString,l.normalizedString):Wm(u.normalizedString,l.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},OS=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Xm=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Gm(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?TS(t.chunks,r.chunks):OS(t,r)},kS=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,u=r.values,l=o.length,m=i.length,p=0;p<l;p++){var f=p<m?i[p]:null;if(f&&typeof f=="function"){var d=f(o[p].value,u[p].value);if(d)return d}else{var a=Xm(o[p],u[p]);if(a)return a*(f==="desc"?-1:1)}}return n-s},PS=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},IS=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Vm,""):""},Ym=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},NS=function(t){if(AS.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},RS=function(t){var r=Ym(t);return r!==void 0?r:NS(t)},MS=function(t){return t.replace(bS,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},LS=function(t){return t.replace(CS," ").replace(Vm,"")},BS=function(t,r,i){if(DS.test(t)&&(!_S.test(t)||r===0||i[r-1]!=="."))return Ym(t)||0},jS=function(t,r,i){return{parsedNumber:BS(t,r,i),normalizedString:LS(t)}},$S=function(t){var r=MS(t).map(jS);return r},qS=function(t){return typeof t=="function"},zm=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},HS=function(t){return t===null},US=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},WS=function(t){return typeof t=="symbol"},zS=function(t){return t===void 0},bu=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!zm(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=IS(t),i=RS(r),n=$S(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:qS(t),isNaN:zm(t),isNull:HS(t),isObject:US(t),isSymbol:WS(t),isUndefined:zS(t),value:t}},JS=function(t,r){return r(t)},GS=function(t,r){return t[r]},VS=function(t,r,i){var n=r.length?r.map(PS):[function(s){return s}],o=t.map(function(s,u){var l=n.map(function(m){return JS(s,m)}).map(bu);return{index:u,values:l}});return o.sort(function(s,u){return kS(s,u,i)}),o.map(function(s){return GS(t,s.index)})},XS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},YS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function KS(e,t,r){if(!e||!Array.isArray(e))return[];var i=XS(t),n=YS(r);return VS(e,i,n)}var QS=function(t){return function(r,i){var n=bu(r),o=bu(i),s=Xm(n,o);return s*(t.order==="desc"?-1:1)}},Jm=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},ZS=function(t){var r="asc";return typeof t=="string"&&Jm(t)?r=t:t&&typeof t=="object"&&t.order&&Jm(t.order)&&(r=t.order),{order:r}};function e1(e){var t=ZS(e);return QS(t)}qs.orderBy=KS;qs.compare=e1});var eg=w((EB,Zm)=>{"use strict";y();var Qm="[\uD800-\uDBFF][\uDC00-\uDFFF]",t1=e=>e&&e.exact?new RegExp(`^${Qm}$`):new RegExp(Qm,"g");Zm.exports=t1});var sg=w((CB,ng)=>{"use strict";y();var r1=Lv(),i1=eg(),tg=Wl(),ig=["\x1B","\x9B"],Hs=e=>`${ig[0]}[${e}m`,rg=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=tg.codes.get(Number.parseInt(n,10));if(s){let u=e.indexOf(s.toString());u===-1?i.push(Hs(t?s:o)):e.splice(u,1)}else if(t){i.push(Hs(0));break}else i.push(Hs(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=Hs(tg.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};ng.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,u,l=0,m="";for(let[p,f]of i.entries()){let d=!1;if(ig.includes(f)){let a=/\d[^m]*/.exec(e.slice(p,p+18));u=a&&a.length>0?a[0]:void 0,l<o&&(s=!0,u!==void 0&&n.push(u))}else s&&f==="m"&&(s=!1,d=!0);if(!s&&!d&&l++,!i1({exact:!0}).test(f)&&r1(f.codePointAt())&&(l++,typeof r!="number"&&o++),l>t&&l<=o)m+=f;else if(l===t&&!s&&u!==void 0)m=rg(n);else if(l>=o){m+=rg(n,!0,u);break}}return m}});var Ws=w(ee=>{"use strict";y();Object.defineProperty(ee,"__esModule",{value:!0});ee.option=ee.help=ee.version=ee.string=ee.url=ee.file=ee.directory=ee.integer=ee.boolean=ee.custom=void 0;var n1=S("node:url"),Us=Ge(),s1=Wi(),og=Dt();function ci(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}ee.custom=ci;function Cu(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}ee.boolean=Cu;ee.integer=ci({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Us.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Us.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Us.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ee.directory=ci({async parse(e,t,r){return r.exists?(0,og.dirExists)(e):e}});ee.file=ci({async parse(e,t,r){return r.exists?(0,og.fileExists)(e):e}});ee.url=ci({async parse(e){try{return new n1.URL(e)}catch{throw new Us.CLIError(`Expected a valid url but received: ${e}`)}}});ee.string=ci();var o1=(e={})=>Cu({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});ee.version=o1;var a1=(e={})=>Cu({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,s1.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});ee.help=a1;function u1(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}ee.option=u1});var ug=w(qe=>{"use strict";y();var c1=qe&&qe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),l1=qe&&qe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),h1=qe&&qe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&c1(t,e,r);return l1(t,e),t},zs=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0});qe.table=void 0;var ag=zs(We()),f1=Um(),p1=Km(),d1=S("node:util"),m1=zs(sg()),Er=zs(Ko()),Gt=h1(Ws()),g1=ar(),Du=le(),y1=zs($t()),Au=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(d=>{let a=r[d],c=a.extended??!1,h=a.get??(v=>v[d]??""),g=typeof a.header=="string"?a.header:(0,Du.capitalize)(d.replaceAll("_"," ")),x=Math.max(a.minWidth??0,(0,Er.default)(g)+1);return{extended:c,get:h,header:g,key:d,minWidth:x}});let{columns:n,csv:o,extended:s,filter:u,output:l,printLine:m,sort:p,title:f}=i;this.options={columns:n,extended:s,filter:u,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":l,printLine:m??(d=>y1.default.stdout(d+`
128
+ `)),rowStart:" ",sort:p,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,d1.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let u=new RegExp(i),m=s[o.key].match(u);return n?!m:m})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>u=>u[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,p1.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
133
129
  `)||n.includes(`\r
134
- `)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let u=Math.max((0,Cr.default)(".".padEnd(s.minWidth-1)),(0,Cr.default)(s.header),P1(t,s.key))+1;return{...s,maxWidth:u,width:u}}),n=O1.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Fu.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let l=(0,Fu.sumBy)(i,f=>f.minWidth);if(l>=n)return;let m=n-l,d=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,p)=>f.needs-p.needs);for(let{key:f,needs:p}of d){if(!p)continue;let a=i.find(c=>f===c.key);a&&(m>p?(a.width=a.width+p,m-=p):m&&(a.width=a.width+m,m=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,u)=>s+u.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let l of i){let m=l.header;s+=m.padEnd(l.width)}r.printLine(pg.default.bold(s));let u=r.rowStart;for(let l of i){let m="".padEnd(l.width-1,"\u2500")+" ";u+=m.padEnd(l.width)}r.printLine(pg.default.bold(u))}for(let s of t){let u=1;for(let m of i){let f=s[m.key].split(`
135
- `).length;f>u&&(u=f)}let l=[...new Array(u).keys()];for(let m of l){let d=r.rowStart;for(let f of i){let p=f.width,a=s[f.key];a=a.split(`
136
- `)[m]||"";let c=(0,Cr.default)(a),h=a.length-c,g=a.padEnd(p+h);(g.length-h>p||c===p)&&(g=(0,T1.default)(g,0,p-2)+"\u2026 ",g+=" ".repeat(p-(0,Cr.default)(g))),d+=g}r.printLine(d)}}}outputYAML(){this.options.printLine((0,_1.safeDump)(this.resolveColumnsToObjectArray()))}resolveColumnsToObjectArray(){let{columns:t,data:r}=this;return r.map(i=>Object.fromEntries(t.map(n=>[n.key,i[n.key]??""])))}};function Ou(e,t,r={}){new Tu(e,t,r).display()}Ue.table=Ou;(function(e){e.Flags={columns:Yt.string({description:"only show provided columns (comma-separated)",exclusive:["extended"]}),csv:Yt.boolean({description:"output is csv format [alias: --output=csv]",exclusive:["no-truncate"]}),extended:Yt.boolean({char:"x",description:"show extra columns",exclusive:["columns"]}),filter:Yt.string({description:"filter property by partial string matching, ex: name=foo"}),"no-header":Yt.boolean({description:"hide table header from output",exclusive:["csv"]}),"no-truncate":Yt.boolean({description:"do not truncate output to fit screen",exclusive:["csv"]}),output:Yt.string({description:"output in a more machine friendly format",exclusive:["no-truncate","csv"],options:["csv","json","yaml"]}),sort:Yt.string({description:"property to sort by (prepend '-' for descending)"})};function t(r){if(r){let i={},n=(r.only&&typeof r.only=="string"?[r.only]:r.only)||Object.keys(e.Flags),o=(r.except&&typeof r.except=="string"?[r.except]:r.except)||[];for(let s of n)o.includes(s)||(i[s]=e.Flags[s]);return i}return e.Flags}e.flags=t})(Ou||(Ue.table=Ou={}));var P1=(e,t)=>e.reduce((r,i)=>{let n=i[t],o=n.split(`
137
- `);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,Cr.default)(s))):(0,Cr.default)(n))},0)});var yg=w((OB,gg)=>{"use strict";y();var Dr=console.assert,I1=e=>{let t={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",sortFn:null,...e};return Dr(Object.keys(t).length===6,"Unexpected Option(s) provided"),Dr(typeof t.joined=="boolean",'Option "joined" has invalid format'),Dr(typeof t.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),Dr(typeof t.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),Dr(typeof t.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),Dr(typeof t.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),Dr(typeof t.sortFn=="function"||t.sortFn===null,'Option "sortFn" has invalid format'),t};gg.exports=(e,t={})=>{let r=I1(t),i=[],n=l=>r.sortFn===null?l.reverse():l.sort((m,d)=>r.sortFn(d,m)),o=[],s=n(Object.keys(e)).map(l=>[l]),u=[e];for(;s.length!==0;){let l=s.pop(),m=u[l.length-1][l[l.length-1]];o[l.length-1]=s.length!==0&&s[s.length-1].length===l.length,i.push([o.slice(0,l.length-1).map(d=>d?r.spacerNeighbour:r.spacerNoNeighbour).join(""),o[l.length-1]?r.keyNeighbour:r.keyNoNeighbour,l[l.length-1],["boolean","string","number"].includes(typeof m)?`: ${m}`:""].join("")),m instanceof Object&&!Array.isArray(m)&&(s.push(...n(Object.keys(m)).map(d=>l.concat(d))),u[l.length]=m)}return r.joined===!0?i.join(`
138
- `):i}});var xg=w(Zi=>{"use strict";y();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.Tree=void 0;var N1=yg(),Vs=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(N1(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Zi.Tree=Vs;function R1(){return new Vs}Zi.default=R1});var Pu=w(ve=>{"use strict";y();var M1=ve&&ve.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),L1=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),B1=ve&&ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&M1(t,e,r);return L1(t,e),t},ku=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.tree=ve.Table=ve.progress=ve.styledObject=void 0;var j1=kd();Object.defineProperty(ve,"styledObject",{enumerable:!0,get:function(){return ku(j1).default}});var $1=sp();Object.defineProperty(ve,"progress",{enumerable:!0,get:function(){return ku($1).default}});ve.Table=B1(mg());var q1=xg();Object.defineProperty(ve,"tree",{enumerable:!0,get:function(){return ku(q1).default}})});var vg=w(Iu=>{"use strict";y();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var Eg=w((BB,wg)=>{"use strict";y();wg.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var bg=w((en,Nu)=>{y();(function(t,r){typeof en=="object"&&typeof Nu=="object"?Nu.exports=r():typeof define=="function"&&define.amd?define([],r):typeof en=="object"?en.esprima=r():t.esprima=r()})(en,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function u(p,a,c){var h=null,g=function(L,j){c&&c(L,j),h&&h.visit(L,j)},x=typeof c=="function"?g:null,v=!1;if(a){v=typeof a.comment=="boolean"&&a.comment;var E=typeof a.attachComment=="boolean"&&a.attachComment;(v||E)&&(h=new i.CommentHandler,h.attach=E,a.comment=!0,x=g)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var A;a&&typeof a.jsx=="boolean"&&a.jsx?A=new n.JSXParser(p,a,x):A=new o.Parser(p,a,x);var O=C?A.parseModule():A.parseScript(),P=O;return v&&h&&(P.comments=h.comments),A.config.tokens&&(P.tokens=A.tokens),A.config.tolerant&&(P.errors=A.errorHandler.errors),P}t.parse=u;function l(p,a,c){var h=a||{};return h.sourceType="module",u(p,h,c)}t.parseModule=l;function m(p,a,c){var h=a||{};return h.sourceType="script",u(p,h,c)}t.parseScript=m;function d(p,a,c){var h=new s.Tokenizer(p,a),g;g=[];try{for(;;){var x=h.getNextToken();if(!x)break;c&&(x=c(x)),g.push(x)}}catch(v){h.errorHandler.tolerate(v)}return h.errorHandler.tolerant&&(g.errors=h.errors()),g}t.tokenize=d;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,u){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var l=[],m=this.leading.length-1;m>=0;--m){var d=this.leading[m];u.end.offset>=d.start&&(l.unshift(d.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}l.length&&(s.innerComments=l)}},o.prototype.findTrailingComments=function(s){var u=[];if(this.trailing.length>0){for(var l=this.trailing.length-1;l>=0;--l){var m=this.trailing[l];m.start>=s.end.offset&&u.unshift(m.comment)}return this.trailing.length=0,u}var d=this.stack[this.stack.length-1];if(d&&d.node.trailingComments){var f=d.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(u=d.node.trailingComments,delete d.node.trailingComments)}return u},o.prototype.findLeadingComments=function(s){for(var u=[],l;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)l=m.node,this.stack.pop();else break}if(l){for(var d=l.leadingComments?l.leadingComments.length:0,f=d-1;f>=0;--f){var p=l.leadingComments[f];p.range[1]<=s.start.offset&&(u.unshift(p),l.leadingComments.splice(f,1))}return l.leadingComments&&l.leadingComments.length===0&&delete l.leadingComments,u}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(u.unshift(m.comment),this.leading.splice(f,1))}return u},o.prototype.visitNode=function(s,u){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,u);var l=this.findTrailingComments(u),m=this.findLeadingComments(u);m.length>0&&(s.leadingComments=m),l.length>0&&(s.trailingComments=l),this.stack.push({node:s,start:u.start.offset})}},o.prototype.visitComment=function(s,u){var l=s.type[0]==="L"?"Line":"Block",m={type:l,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var d={comment:{type:l,value:s.value,range:[u.start.offset,u.end.offset]},start:u.start.offset};s.loc&&(d.comment.loc=s.loc),s.type=l,this.leading.push(d),this.trailing.push(d)}},o.prototype.visit=function(s,u){s.type==="LineComment"?this.visitComment(s,u):s.type==="BlockComment"?this.visitComment(s,u):this.attach&&this.visitNode(s,u)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var g in h)h.hasOwnProperty(g)&&(c[g]=h[g])};return function(c,h){a(c,h);function g(){this.constructor=c}c.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),u=r(7),l=r(8),m=r(13),d=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var c;switch(a.type){case s.JSXSyntax.JSXIdentifier:var h=a;c=h.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;c=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var x=a;c=f(x.object)+"."+f(x.property);break;default:break}return c}var p=(function(a){i(c,a);function c(h,g,x){return a.call(this,h,g,x)||this}return c.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},c.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},c.prototype.finishJSX=function(){this.nextToken()},c.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},c.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.scanXHTMLEntity=function(h){for(var g="&",x=!0,v=!1,E=!1,C=!1;!this.scanner.eof()&&x&&!v;){var A=this.scanner.source[this.scanner.index];if(A===h)break;if(v=A===";",g+=A,++this.scanner.index,!v)switch(g.length){case 2:E=A==="#";break;case 3:E&&(C=A==="x",x=C||n.Character.isDecimalDigit(A.charCodeAt(0)),E=E&&!C);break;default:x=x&&!(E&&!n.Character.isDecimalDigit(A.charCodeAt(0))),x=x&&!(C&&!n.Character.isHexDigit(A.charCodeAt(0)));break}}if(x&&v&&g.length>2){var O=g.substr(1,g.length-2);E&&O.length>1?g=String.fromCharCode(parseInt(O.substr(1),10)):C&&O.length>2?g=String.fromCharCode(parseInt("0"+O.substr(1),16)):!E&&!C&&d.XHTMLEntities[O]&&(g=d.XHTMLEntities[O])}return g},c.prototype.lexJSX=function(){var h=this.scanner.source.charCodeAt(this.scanner.index);if(h===60||h===62||h===47||h===58||h===61||h===123||h===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(h===34||h===39){for(var x=this.scanner.index,v=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===v)break;C==="&"?E+=this.scanXHTMLEntity(v):E+=C}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===46){var A=this.scanner.source.charCodeAt(this.scanner.index+1),O=this.scanner.source.charCodeAt(this.scanner.index+2),g=A===46&&O===46?"...":".",x=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(h)&&h!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},c.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var h=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(h)),h},c.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var h=this.scanner.index,g="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,g+=x,n.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
139
- `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var v={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:h,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(v)),v},c.prototype.peekJSXToken=function(){var h=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(h),g},c.prototype.expectJSX=function(h){var g=this.nextJSXToken();(g.type!==7||g.value!==h)&&this.throwUnexpectedToken(g)},c.prototype.matchJSX=function(h){var g=this.peekJSXToken();return g.type===7&&g.value===h},c.prototype.parseJSXIdentifier=function(){var h=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(h,new o.JSXIdentifier(g.value))},c.prototype.parseJSXElementName=function(){var h=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=g;this.expectJSX(":");var v=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(x,v))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=g;this.expectJSX(".");var C=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXMemberExpression(E,C))}return g},c.prototype.parseJSXAttributeName=function(){var h=this.createJSXNode(),g,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=x;this.expectJSX(":");var E=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(v,E))}else g=x;return g},c.prototype.parseJSXStringLiteralAttribute=function(){var h=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var x=this.getTokenRaw(g);return this.finalize(h,new u.Literal(g.value,x))},c.prototype.parseJSXExpressionAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},c.prototype.parseJSXNameValueAttribute=function(){var h=this.createJSXNode(),g=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(h,new o.JSXAttribute(g,x))},c.prototype.parseJSXSpreadAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXSpreadAttribute(g))},c.prototype.parseJSXAttributes=function(){for(var h=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();h.push(g)}return h},c.prototype.parseJSXOpeningElement=function(){var h=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),x=this.parseJSXAttributes(),v=this.matchJSX("/");return v&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(g,v,x))},c.prototype.parseJSXBoundaryElement=function(){var h=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(h,new o.JSXClosingElement(g))}var x=this.parseJSXElementName(),v=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(x,E,v))},c.prototype.parseJSXEmptyExpression=function(){var h=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(h,new o.JSXEmptyExpression)},c.prototype.parseJSXExpressionContainer=function(){var h=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXChildren=function(){for(var h=[];!this.scanner.eof();){var g=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var v=this.getTokenRaw(x),E=this.finalize(g,new o.JSXText(x.value,v));h.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();h.push(C)}else break}return h},c.prototype.parseComplexJSXElement=function(h){for(var g=[];!this.scanner.eof();){h.children=h.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),v=this.parseJSXBoundaryElement();if(v.type===s.JSXSyntax.JSXOpeningElement){var E=v;if(E.selfClosing){var C=this.finalize(x,new o.JSXElement(E,[],null));h.children.push(C)}else g.push(h),h={node:x,opening:E,closing:null,children:[]}}if(v.type===s.JSXSyntax.JSXClosingElement){h.closing=v;var A=f(h.opening.name),O=f(h.closing.name);if(A!==O&&this.tolerateError("Expected corresponding JSX closing tag for %0",A),g.length>0){var C=this.finalize(h.node,new o.JSXElement(h.opening,h.children,h.closing));h=g[g.length-1],h.children.push(C),g.pop()}else break}}return h},c.prototype.parseJSXElement=function(){var h=this.createJSXNode(),g=this.parseJSXOpeningElement(),x=[],v=null;if(!g.selfClosing){var E=this.parseComplexJSXElement({node:h,opening:g,closing:v,children:x});x=E.children,v=E.closing}return this.finalize(h,new o.JSXElement(g,x,v))},c.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var h=this.parseJSXElement();return this.finishJSX(),h},c.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},c})(l.Parser);t.JSXParser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function h(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return h})();t.JSXClosingElement=n;var o=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=x,this.closingElement=v}return h})();t.JSXElement=o;var s=(function(){function h(){this.type=i.JSXSyntax.JSXEmptyExpression}return h})();t.JSXEmptyExpression=s;var u=(function(){function h(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return h})();t.JSXExpressionContainer=u;var l=(function(){function h(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return h})();t.JSXIdentifier=l;var m=(function(){function h(g,x){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=x}return h})();t.JSXMemberExpression=m;var d=(function(){function h(g,x){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=x}return h})();t.JSXAttribute=d;var f=(function(){function h(g,x){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=x}return h})();t.JSXNamespacedName=f;var p=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=x,this.attributes=v}return h})();t.JSXOpeningElement=p;var a=(function(){function h(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return h})();t.JSXSpreadAttribute=a;var c=(function(){function h(g,x){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=x}return h})();t.JSXText=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!1}return b})();t.ArrowFunctionExpression=s;var u=(function(){function b(D,_,B){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=_,this.right=B}return b})();t.AssignmentExpression=u;var l=(function(){function b(D,_){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=_}return b})();t.AssignmentPattern=l;var m=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var d=(function(){function b(D,_,B){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=d;var f=(function(){function b(D,_,B){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var p=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=p;var a=(function(){function b(D,_,B){var je=D==="||"||D==="&&";this.type=je?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=_,this.right=B}return b})();t.BinaryExpression=a;var c=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=c;var h=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=h;var g=(function(){function b(D,_){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=_}return b})();t.CallExpression=g;var x=(function(){function b(D,_){this.type=i.Syntax.CatchClause,this.param=D,this.body=_}return b})();t.CatchClause=x;var v=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=v;var E=(function(){function b(D,_,B){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassDeclaration=E;var C=(function(){function b(D,_,B){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassExpression=C;var A=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=_}return b})();t.ComputedMemberExpression=A;var O=(function(){function b(D,_,B){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=_,this.alternate=B}return b})();t.ConditionalExpression=O;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var L=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=L;var j=(function(){function b(D,_){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=_}return b})();t.Directive=j;var J=(function(){function b(D,_){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=_}return b})();t.DoWhileStatement=J;var Y=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=Y;var we=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=we;var Bt=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=Bt;var Ir=(function(){function b(D,_,B){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=_,this.source=B}return b})();t.ExportNamedDeclaration=Ir;var ir=(function(){function b(D,_){this.type=i.Syntax.ExportSpecifier,this.exported=_,this.local=D}return b})();t.ExportSpecifier=ir;var Go=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=Go;var Vo=(function(){function b(D,_,B){this.type=i.Syntax.ForInStatement,this.left=D,this.right=_,this.body=B,this.each=!1}return b})();t.ForInStatement=Vo;var Si=(function(){function b(D,_,B){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=_,this.body=B}return b})();t.ForOfStatement=Si;var nr=(function(){function b(D,_,B,je){this.type=i.Syntax.ForStatement,this.init=D,this.test=_,this.update=B,this.body=je}return b})();t.ForStatement=nr;var Ct=(function(){function b(D,_,B,je){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=je,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=Ct;var Dt=(function(){function b(D,_,B,je){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=je,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=Dt;var En=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=En;var Nr=(function(){function b(D,_,B){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=_,this.alternate=B}return b})();t.IfStatement=Nr;var sr=(function(){function b(D,_){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=_}return b})();t.ImportDeclaration=sr;var se=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=se;var Oe=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=Oe;var rt=(function(){function b(D,_){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=_}return b})();t.ImportSpecifier=rt;var We=(function(){function b(D,_){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=_}return b})();t.LabeledStatement=We;var it=(function(){function b(D,_){this.type=i.Syntax.Literal,this.value=D,this.raw=_}return b})();t.Literal=it;var jt=(function(){function b(D,_){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=_}return b})();t.MetaProperty=jt;var tv=(function(){function b(D,_,B,je,Yo){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=_,this.value=B,this.kind=je,this.static=Yo}return b})();t.MethodDefinition=tv;var rv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=rv;var iv=(function(){function b(D,_){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=_}return b})();t.NewExpression=iv;var nv=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=nv;var sv=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=sv;var ov=(function(){function b(D,_,B,je,Yo,Ov){this.type=i.Syntax.Property,this.key=_,this.computed=B,this.value=je,this.kind=D,this.method=Yo,this.shorthand=Ov}return b})();t.Property=ov;var av=(function(){function b(D,_,B,je){this.type=i.Syntax.Literal,this.value=D,this.raw=_,this.regex={pattern:B,flags:je}}return b})();t.RegexLiteral=av;var uv=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=uv;var cv=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=cv;var lv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=lv;var hv=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=hv;var fv=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=fv;var dv=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=_}return b})();t.StaticMemberExpression=dv;var pv=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=pv;var mv=(function(){function b(D,_){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=_}return b})();t.SwitchCase=mv;var gv=(function(){function b(D,_){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=_}return b})();t.SwitchStatement=gv;var yv=(function(){function b(D,_){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=_}return b})();t.TaggedTemplateExpression=yv;var xv=(function(){function b(D,_){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=_}return b})();t.TemplateElement=xv;var vv=(function(){function b(D,_){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=_}return b})();t.TemplateLiteral=vv;var wv=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=wv;var Ev=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=Ev;var bv=(function(){function b(D,_,B){this.type=i.Syntax.TryStatement,this.block=D,this.handler=_,this.finalizer=B}return b})();t.TryStatement=bv;var Cv=(function(){function b(D,_){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=_,this.prefix=!0}return b})();t.UnaryExpression=Cv;var Dv=(function(){function b(D,_,B){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=_,this.prefix=B}return b})();t.UpdateExpression=Dv;var Av=(function(){function b(D,_){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=_}return b})();t.VariableDeclaration=Av;var _v=(function(){function b(D,_){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=_}return b})();t.VariableDeclarator=_v;var Sv=(function(){function b(D,_){this.type=i.Syntax.WhileStatement,this.test=D,this.body=_}return b})();t.WhileStatement=Sv;var Fv=(function(){function b(D,_){this.type=i.Syntax.WithStatement,this.object=D,this.body=_}return b})();t.WithStatement=Fv;var Tv=(function(){function b(D,_){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=_}return b})();t.YieldExpression=Tv},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),u=r(12),l=r(2),m=r(13),d="ArrowParameterPlaceHolder",f=(function(){function p(a,c,h){c===void 0&&(c={}),this.config={range:typeof c.range=="boolean"&&c.range,loc:typeof c.loc=="boolean"&&c.loc,source:null,tokens:typeof c.tokens=="boolean"&&c.tokens,comment:typeof c.comment=="boolean"&&c.comment,tolerant:typeof c.tolerant=="boolean"&&c.tolerant},this.config.loc&&c.source&&c.source!==null&&(this.config.source=String(c.source)),this.delegate=h,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new u.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return p.prototype.throwError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(v,E,C,x)},p.prototype.tolerateError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(v,E,C,x)},p.prototype.unexpectedTokenError=function(a,c){var h=c||o.Messages.UnexpectedToken,g;if(a?(c||(h=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?h=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(h=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",h=h.replace("%0",g),a&&typeof a.lineNumber=="number"){var x=a.start,v=a.lineNumber,E=this.lastMarker.index-this.lastMarker.column,C=a.start-E+1;return this.errorHandler.createError(x,v,C,h)}else{var x=this.lastMarker.index,v=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(x,v,C,h)}},p.prototype.throwUnexpectedToken=function(a,c){throw this.unexpectedTokenError(a,c)},p.prototype.tolerateUnexpectedToken=function(a,c){this.errorHandler.tolerate(this.unexpectedTokenError(a,c))},p.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var c=0;c<a.length;++c){var h=a[c],g=void 0;g={type:h.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(h.slice[0],h.slice[1])},this.config.range&&(g.range=h.range),this.config.loc&&(g.loc=h.loc);var x={start:{line:h.loc.start.line,column:h.loc.start.column,offset:h.range[0]},end:{line:h.loc.end.line,column:h.loc.end.column,offset:h.range[1]}};this.delegate(g,x)}}},p.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},p.prototype.convertToken=function(a){var c={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(c.range=[a.start,a.end]),this.config.loc&&(c.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var h=a.pattern,g=a.flags;c.regex={pattern:h,flags:g}}return c},p.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var c=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==c.lineNumber,c&&this.context.strict&&c.type===3&&this.scanner.isStrictModeReservedWord(c.value)&&(c.type=4),this.lookahead=c,this.config.tokens&&c.type!==2&&this.tokens.push(this.convertToken(c)),a},p.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},p.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},p.prototype.startNode=function(a,c){c===void 0&&(c=0);var h=a.start-a.lineStart,g=a.lineNumber;return h<0&&(h+=c,g--),{index:a.start,line:g,column:h}},p.prototype.finalize=function(a,c){if(this.config.range&&(c.range=[a.index,this.lastMarker.index]),this.config.loc&&(c.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(c.loc.source=this.config.source)),this.delegate){var h={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(c,h)}return c},p.prototype.expect=function(a){var c=this.nextToken();(c.type!==7||c.value!==a)&&this.throwUnexpectedToken(c)},p.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},p.prototype.expectKeyword=function(a){var c=this.nextToken();(c.type!==4||c.value!==a)&&this.throwUnexpectedToken(c)},p.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},p.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},p.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},p.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},p.prototype.isolateCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=c,this.context.isAssignmentTarget=h,this.context.firstCoverInitializedNameError=g,x},p.prototype.inheritCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&c,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&h,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,x},p.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},p.prototype.parsePrimaryExpression=function(){var a=this.createNode(),c,h,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),c=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(null,g));break;case 10:c=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,c=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":c=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":c=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,h=this.nextRegexToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.RegexLiteral(h.regex,g,h.pattern,h.flags));break;default:c=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?c=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?c=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?c=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),c=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?c=this.parseClassExpression():c=this.throwUnexpectedToken(this.nextToken()));break;default:c=this.throwUnexpectedToken(this.nextToken())}return c},p.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var c=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(c))},p.prototype.parseArrayInitializer=function(){var a=this.createNode(),c=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),c.push(null);else if(this.match("...")){var h=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),c.push(h)}else c.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(c))},p.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=c,this.context.allowStrictDirective=h,g},p.prototype.parsePropertyMethodFunction=function(){var a=!1,c=this.createNode(),h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(c,new s.FunctionExpression(null,g.params,x,a))},p.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),c=this.context.allowYield,h=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=c,this.context.await=h,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,x))},p.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),c=this.nextToken(),h;switch(c.type){case 8:case 6:this.context.strict&&c.octal&&this.tolerateUnexpectedToken(c,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(c);h=this.finalize(a,new s.Literal(c.value,g));break;case 3:case 1:case 5:case 4:h=this.finalize(a,new s.Identifier(c.value));break;case 7:c.value==="["?(h=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):h=this.throwUnexpectedToken(c);break;default:h=this.throwUnexpectedToken(c)}return h},p.prototype.isPropertyKey=function(a,c){return a.type===l.Syntax.Identifier&&a.name===c||a.type===l.Syntax.Literal&&a.value===c},p.prototype.parseObjectProperty=function(a){var c=this.createNode(),h=this.lookahead,g,x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(h.type===3){var P=h.value;this.nextToken(),E=this.match("["),O=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=O?this.parseObjectPropertyKey():this.finalize(c,new s.Identifier(P))}else this.match("*")?this.nextToken():(E=this.match("["),x=this.parseObjectPropertyKey());var L=this.qualifiedPropertyName(this.lookahead);if(h.type===3&&!O&&h.value==="get"&&L)g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod();else if(h.type===3&&!O&&h.value==="set"&&L)g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod();else if(h.type===7&&h.value==="*"&&L)g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0;else if(x||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!O)!E&&this.isPropertyKey(x,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),v=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(h.type===3){var P=this.finalize(c,new s.Identifier(h.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),A=!0;var j=this.isolateCoverGrammar(this.parseAssignmentExpression);v=this.finalize(c,new s.AssignmentPattern(P,j))}else A=!0,v=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(c,new s.Property(g,x,E,v,C,A))},p.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var c=[],h={value:!1};!this.match("}");)c.push(this.parseObjectProperty(h)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(c))},p.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},p.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},p.prototype.parseTemplateLiteral=function(){var a=this.createNode(),c=[],h=[],g=this.parseTemplateHead();for(h.push(g);!g.tail;)c.push(this.parseExpression()),g=this.parseTemplateElement(),h.push(g);return this.finalize(a,new s.TemplateLiteral(h,c))},p.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:a.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case l.Syntax.ArrayExpression:a.type=l.Syntax.ArrayPattern;for(var c=0;c<a.elements.length;c++)a.elements[c]!==null&&this.reinterpretExpressionAsPattern(a.elements[c]);break;case l.Syntax.ObjectExpression:a.type=l.Syntax.ObjectPattern;for(var c=0;c<a.properties.length;c++)this.reinterpretExpressionAsPattern(a.properties[c].value);break;case l.Syntax.AssignmentExpression:a.type=l.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},p.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:d,params:[],async:!1};else{var c=this.lookahead,h=[];if(this.match("..."))a=this.parseRestElement(h),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:d,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:d,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(h)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:d,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(c),new s.SequenceExpression(x)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===l.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:d,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===l.Syntax.SequenceExpression)for(var v=0;v<a.expressions.length;v++)this.reinterpretExpressionAsPattern(a.expressions[v]);else this.reinterpretExpressionAsPattern(a);var E=a.type===l.Syntax.SequenceExpression?a.expressions:[a];a={type:d,params:E,async:!1}}this.context.isBindingElement=!1}}}return a},p.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},p.prototype.parseIdentifierName=function(){var a=this.createNode(),c=this.nextToken();return this.isIdentifierName(c)||this.throwUnexpectedToken(c),this.finalize(a,new s.Identifier(c.value))},p.prototype.parseNewExpression=function(){var a=this.createNode(),c=this.parseIdentifierName();i.assert(c.name==="new","New expression must start with `new`");var h;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();h=new s.MetaProperty(c,g)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),v=this.match("(")?this.parseArguments():[];h=new s.NewExpression(x,v),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,h)},p.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},p.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,c=this.matchContextualKeyword("async"),h=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,x))}else if(this.match("(")){var v=c&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=v?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,E)),v&&this.match("=>")){for(var C=0;C<E.length;++C)this.reinterpretExpressionAsPattern(E[C]);g={type:d,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,x))}else if(this.lookahead.type===10&&this.lookahead.head){var A=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,A))}else break;return this.context.allowIn=h,g},p.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},p.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),c=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var h=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),c=this.finalize(a,new s.ComputedMemberExpression(c,h))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var h=this.parseIdentifierName();c=this.finalize(a,new s.StaticMemberExpression(c,h))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();c=this.finalize(a,new s.TaggedTemplateExpression(c,g))}else break;return c},p.prototype.parseUpdateExpression=function(){var a,c=this.lookahead;if(this.match("++")||this.match("--")){var h=this.startNode(c),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var x=!0;a=this.finalize(h,new s.UpdateExpression(g.value,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=this.nextToken().value,x=!1;a=this.finalize(this.startNode(c),new s.UpdateExpression(v,a,x))}return a},p.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var c=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(c))},p.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var c=this.startNode(this.lookahead),h=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(c,new s.UnaryExpression(h.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},p.prototype.parseExponentiationExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseUnaryExpression);if(c.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var h=c,g=this.isolateCoverGrammar(this.parseExponentiationExpression);c=this.finalize(this.startNode(a),new s.BinaryExpression("**",h,g))}return c},p.prototype.binaryPrecedence=function(a){var c=a.value,h;return a.type===7?h=this.operatorPrecedence[c]||0:a.type===4?h=c==="instanceof"||this.context.allowIn&&c==="in"?7:0:h=0,h},p.prototype.parseBinaryExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseExponentiationExpression),h=this.lookahead,g=this.binaryPrecedence(h);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[a,this.lookahead],v=c,E=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[v,h.value,E],A=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;C.length>2&&g<=A[A.length-1];){E=C.pop();var O=C.pop();A.pop(),v=C.pop(),x.pop();var P=this.startNode(x[x.length-1]);C.push(this.finalize(P,new s.BinaryExpression(O,v,E)))}C.push(this.nextToken().value),A.push(g),x.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var L=C.length-1;c=C[L];for(var j=x.pop();L>1;){var J=x.pop(),Y=j&&j.lineStart,P=this.startNode(J,Y),O=C[L-1];c=this.finalize(P,new s.BinaryExpression(O,C[L-2],c)),L-=2,j=J}}return c},p.prototype.parseConditionalExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var h=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=h,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(this.startNode(a),new s.ConditionalExpression(c,g,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return c},p.prototype.checkPatternParam=function(a,c){switch(c.type){case l.Syntax.Identifier:this.validateParam(a,c,c.name);break;case l.Syntax.RestElement:this.checkPatternParam(a,c.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(a,c.left);break;case l.Syntax.ArrayPattern:for(var h=0;h<c.elements.length;h++)c.elements[h]!==null&&this.checkPatternParam(a,c.elements[h]);break;case l.Syntax.ObjectPattern:for(var h=0;h<c.properties.length;h++)this.checkPatternParam(a,c.properties[h].value);break;default:break}a.simple=a.simple&&c instanceof s.Identifier},p.prototype.reinterpretAsCoverFormalsList=function(a){var c=[a],h,g=!1;switch(a.type){case l.Syntax.Identifier:break;case d:c=a.params,g=a.async;break;default:return null}h={simple:!0,paramSet:{}};for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.AssignmentPattern?v.right.type===l.Syntax.YieldExpression&&(v.right.argument&&this.throwUnexpectedToken(this.lookahead),v.right.type=l.Syntax.Identifier,v.right.name="yield",delete v.right.argument,delete v.right.delegate):g&&v.type===l.Syntax.Identifier&&v.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(h,v),c[x]=v}if(this.context.strict||!this.context.allowYield)for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(h.message===o.Messages.StrictParamDupe){var E=this.context.strict?h.stricted:h.firstRestricted;this.throwUnexpectedToken(E,h.message)}return{simple:h.simple,params:c,stricted:h.stricted,firstRestricted:h.firstRestricted,message:h.message}},p.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var c=this.lookahead,h=c;if(a=this.parseConditionalExpression(),h.type===3&&h.lineNumber===this.lookahead.lineNumber&&h.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:d,params:[g],async:!0}}if(a.type===d||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=a.async,v=this.reinterpretAsCoverFormalsList(a);if(v){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=v.simple;var A=this.context.allowYield,O=this.context.await;this.context.allowYield=!0,this.context.await=x;var P=this.startNode(c);this.expect("=>");var L=void 0;if(this.match("{")){var j=this.context.allowIn;this.context.allowIn=!0,L=this.parseFunctionSourceElements(),this.context.allowIn=j}else L=this.isolateCoverGrammar(this.parseAssignmentExpression);var J=L.type!==l.Syntax.BlockStatement;this.context.strict&&v.firstRestricted&&this.throwUnexpectedToken(v.firstRestricted,v.message),this.context.strict&&v.stricted&&this.tolerateUnexpectedToken(v.stricted,v.message),a=x?this.finalize(P,new s.AsyncArrowFunctionExpression(v.params,L,J)):this.finalize(P,new s.ArrowFunctionExpression(v.params,L,J)),this.context.strict=E,this.context.allowStrictDirective=C,this.context.allowYield=A,this.context.await=O}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===l.Syntax.Identifier){var Y=a;this.scanner.isRestrictedWord(Y.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(Y.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),h=this.nextToken();var we=h.value,Bt=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(c),new s.AssignmentExpression(we,a,Bt)),this.context.firstCoverInitializedNameError=null}}return a},p.prototype.parseExpression=function(){var a=this.lookahead,c=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var h=[];for(h.push(c);this.lookahead.type!==2&&this.match(",");)this.nextToken(),h.push(this.isolateCoverGrammar(this.parseAssignmentExpression));c=this.finalize(this.startNode(a),new s.SequenceExpression(h))}return c},p.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},p.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var c=[];!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(c))},p.prototype.parseLexicalBinding=function(a,c){var h=this.createNode(),g=[],x=this.parsePattern(g,a);this.context.strict&&x.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!c.inFor&&x.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),v=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(h,new s.VariableDeclarator(x,v))},p.prototype.parseBindingList=function(a,c){for(var h=[this.parseLexicalBinding(a,c)];this.match(",");)this.nextToken(),h.push(this.parseLexicalBinding(a,c));return h},p.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var c=this.scanner.lex();return this.scanner.restoreState(a),c.type===3||c.type===7&&c.value==="["||c.type===7&&c.value==="{"||c.type===4&&c.value==="let"||c.type===4&&c.value==="yield"},p.prototype.parseLexicalDeclaration=function(a){var c=this.createNode(),h=this.nextToken().value;i.assert(h==="let"||h==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(h,a);return this.consumeSemicolon(),this.finalize(c,new s.VariableDeclaration(g,h))},p.prototype.parseBindingRestElement=function(a,c){var h=this.createNode();this.expect("...");var g=this.parsePattern(a,c);return this.finalize(h,new s.RestElement(g))},p.prototype.parseArrayPattern=function(a,c){var h=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,c));break}else g.push(this.parsePatternWithDefault(a,c));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(h,new s.ArrayPattern(g))},p.prototype.parsePropertyPattern=function(a,c){var h=this.createNode(),g=!1,x=!1,v=!1,E,C;if(this.lookahead.type===3){var A=this.lookahead;E=this.parseVariableIdentifier();var O=this.finalize(h,new s.Identifier(A.value));if(this.match("=")){a.push(A),x=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(A),new s.AssignmentPattern(O,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,c)):(a.push(A),x=!0,C=O)}else g=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,c);return this.finalize(h,new s.Property("init",E,g,C,v,x))},p.prototype.parseObjectPattern=function(a,c){var h=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,c)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(h,new s.ObjectPattern(g))},p.prototype.parsePattern=function(a,c){var h;return this.match("[")?h=this.parseArrayPattern(a,c):this.match("{")?h=this.parseObjectPattern(a,c):(this.matchKeyword("let")&&(c==="const"||c==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),h=this.parseVariableIdentifier(c)),h},p.prototype.parsePatternWithDefault=function(a,c){var h=this.lookahead,g=this.parsePattern(a,c);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,g=this.finalize(this.startNode(h),new s.AssignmentPattern(g,v))}return g},p.prototype.parseVariableIdentifier=function(a){var c=this.createNode(),h=this.nextToken();return h.type===4&&h.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(h):h.type!==3?this.context.strict&&h.type===4&&this.scanner.isStrictModeReservedWord(h.value)?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):(this.context.strict||h.value!=="let"||a!=="var")&&this.throwUnexpectedToken(h):(this.context.isModule||this.context.await)&&h.type===3&&h.value==="await"&&this.tolerateUnexpectedToken(h),this.finalize(c,new s.Identifier(h.value))},p.prototype.parseVariableDeclaration=function(a){var c=this.createNode(),h=[],g=this.parsePattern(h,"var");this.context.strict&&g.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==l.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(c,new s.VariableDeclarator(g,x))},p.prototype.parseVariableDeclarationList=function(a){var c={inFor:a.inFor},h=[];for(h.push(this.parseVariableDeclaration(c));this.match(",");)this.nextToken(),h.push(this.parseVariableDeclaration(c));return h},p.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var c=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(c,"var"))},p.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},p.prototype.parseExpressionStatement=function(){var a=this.createNode(),c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(c))},p.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},p.prototype.parseIfStatement=function(){var a=this.createNode(),c,h=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),h=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,c,h))},p.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var c=this.context.inIteration;this.context.inIteration=!0;var h=this.parseStatement();this.context.inIteration=c,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(h,g))},p.prototype.parseWhileStatement=function(){var a=this.createNode(),c;this.expectKeyword("while"),this.expect("(");var h=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,c=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(h,c))},p.prototype.parseForStatement=function(){var a=null,c=null,h=null,g=!0,x,v,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,A.length===1&&this.matchKeyword("in")){var O=A[0];O.init&&(O.id.type===l.Syntax.ArrayPattern||O.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseExpression(),a=null}else A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),x=a,v=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,A.length===1&&A[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseExpression(),a=null):A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(A,P)))}}else{var L=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var j=[a];this.match(",");)this.nextToken(),j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(L),new s.SequenceExpression(j))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(c=this.parseExpression()),this.expect(";"),this.match(")")||(h=this.parseExpression()));var J;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),J=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var Y=this.context.inIteration;this.context.inIteration=!0,J=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=Y}return typeof x>"u"?this.finalize(E,new s.ForStatement(a,c,h,J)):g?this.finalize(E,new s.ForInStatement(x,v,J)):this.finalize(E,new s.ForOfStatement(x,v,J))},p.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier();c=h;var g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name)}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(c))},p.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier(),g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name),c=h}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(c))},p.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var c=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,h=c?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(h))},p.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),c;this.expectKeyword("with"),this.expect("(");var h=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseStatement()),this.finalize(a,new s.WithStatement(h,c))},p.prototype.parseSwitchCase=function(){var a=this.createNode(),c;this.matchKeyword("default")?(this.nextToken(),c=null):(this.expectKeyword("case"),c=this.parseExpression()),this.expect(":");for(var h=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)h.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(c,h))},p.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var c=this.parseExpression();this.expect(")");var h=this.context.inSwitch;this.context.inSwitch=!0;var g=[],x=!1;for(this.expect("{");!this.match("}");){var v=this.parseSwitchCase();v.test===null&&(x&&this.throwError(o.Messages.MultipleDefaultsInSwitch),x=!0),g.push(v)}return this.expect("}"),this.context.inSwitch=h,this.finalize(a,new s.SwitchStatement(c,g))},p.prototype.parseLabelledStatement=function(){var a=this.createNode(),c=this.parseExpression(),h;if(c.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var g=c,x="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[x]=!0;var v=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),v=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),v=C}else v=this.parseStatement();delete this.context.labelSet[x],h=new s.LabeledStatement(g,v)}else this.consumeSemicolon(),h=new s.ExpressionStatement(c);return this.finalize(a,h)},p.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(c))},p.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var c=[],h=this.parsePattern(c),g={},x=0;x<c.length;x++){var v="$"+c[x].value;Object.prototype.hasOwnProperty.call(g,v)&&this.tolerateError(o.Messages.DuplicateBinding,c[x].value),g[v]=!0}this.context.strict&&h.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(h.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(a,new s.CatchClause(h,E))},p.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},p.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var c=this.parseBlock(),h=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!h&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(c,h,g))},p.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},p.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var c=this.lookahead.value;c==="{"?a=this.parseBlock():c==="("?a=this.parseExpressionStatement():c===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},p.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var c=this.parseDirectivePrologues(),h=this.context.labelSet,g=this.context.inIteration,x=this.context.inSwitch,v=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=h,this.context.inIteration=g,this.context.inSwitch=x,this.context.inFunctionBody=v,this.finalize(a,new s.BlockStatement(c))},p.prototype.validateParam=function(a,c,h){var g="$"+h;this.context.strict?(this.scanner.isRestrictedWord(h)&&(a.stricted=c,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},p.prototype.parseRestElement=function(a){var c=this.createNode();this.expect("...");var h=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(c,new s.RestElement(h))},p.prototype.parseFormalParameter=function(a){for(var c=[],h=this.match("...")?this.parseRestElement(c):this.parsePatternWithDefault(c),g=0;g<c.length;g++)this.validateParam(a,c[g],c[g].value);a.simple=a.simple&&h instanceof s.Identifier,a.params.push(h)},p.prototype.parseFormalParameters=function(a){var c;if(c={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(c.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(c),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:c.simple,params:c.params,stricted:c.stricted,firstRestricted:c.firstRestricted,message:c.message}},p.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var c=this.scanner.saveState();this.scanner.scanComments();var h=this.scanner.lex();this.scanner.restoreState(c),a=c.lineNumber===h.lineNumber&&h.type===4&&h.value==="function"}return a},p.prototype.parseFunctionDeclaration=function(a){var c=this.createNode(),h=this.matchContextualKeyword("async");h&&this.nextToken(),this.expectKeyword("function");var g=h?!1:this.match("*");g&&this.nextToken();var x,v=null,E=null;if(!a||!this.match("(")){var C=this.lookahead;v=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(E=C,x=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(E=C,x=o.Messages.StrictReservedWord)}var A=this.context.await,O=this.context.allowYield;this.context.await=h,this.context.allowYield=!g;var P=this.parseFormalParameters(E),L=P.params,j=P.stricted;E=P.firstRestricted,P.message&&(x=P.message);var J=this.context.strict,Y=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var we=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,x),this.context.strict&&j&&this.tolerateUnexpectedToken(j,x),this.context.strict=J,this.context.allowStrictDirective=Y,this.context.await=A,this.context.allowYield=O,h?this.finalize(c,new s.AsyncFunctionDeclaration(v,L,we)):this.finalize(c,new s.FunctionDeclaration(v,L,we,g))},p.prototype.parseFunctionExpression=function(){var a=this.createNode(),c=this.matchContextualKeyword("async");c&&this.nextToken(),this.expectKeyword("function");var h=c?!1:this.match("*");h&&this.nextToken();var g,x=null,v,E=this.context.await,C=this.context.allowYield;if(this.context.await=c,this.context.allowYield=!h,!this.match("(")){var A=this.lookahead;x=!this.context.strict&&!h&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(A.value)&&this.tolerateUnexpectedToken(A,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(A.value)?(v=A,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(A.value)&&(v=A,g=o.Messages.StrictReservedWord)}var O=this.parseFormalParameters(v),P=O.params,L=O.stricted;v=O.firstRestricted,O.message&&(g=O.message);var j=this.context.strict,J=this.context.allowStrictDirective;this.context.allowStrictDirective=O.simple;var Y=this.parseFunctionSourceElements();return this.context.strict&&v&&this.throwUnexpectedToken(v,g),this.context.strict&&L&&this.tolerateUnexpectedToken(L,g),this.context.strict=j,this.context.allowStrictDirective=J,this.context.await=E,this.context.allowYield=C,c?this.finalize(a,new s.AsyncFunctionExpression(x,P,Y)):this.finalize(a,new s.FunctionExpression(x,P,Y,h))},p.prototype.parseDirective=function(){var a=this.lookahead,c=this.createNode(),h=this.parseExpression(),g=h.type===l.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(c,g?new s.Directive(h,g):new s.ExpressionStatement(h))},p.prototype.parseDirectivePrologues=function(){for(var a=null,c=[];;){var h=this.lookahead;if(h.type!==8)break;var g=this.parseDirective();c.push(g);var x=g.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(h,o.Messages.IllegalLanguageModeDirective)):!a&&h.octal&&(a=h)}return c},p.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},p.prototype.parseGetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},p.prototype.parseSetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},p.prototype.parseGeneratorMethod=function(){var a=this.createNode(),c=!0,h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},p.prototype.isStartOfExpression=function(){var a=!0,c=this.lookahead.value;switch(this.lookahead.type){case 7:a=c==="["||c==="("||c==="{"||c==="+"||c==="-"||c==="!"||c==="~"||c==="++"||c==="--"||c==="/"||c==="/=";break;case 4:a=c==="class"||c==="delete"||c==="function"||c==="let"||c==="new"||c==="super"||c==="this"||c==="typeof"||c==="void"||c==="yield";break;default:break}return a},p.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var c=null,h=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,h=this.match("*"),h?(this.nextToken(),c=this.parseAssignmentExpression()):this.isStartOfExpression()&&(c=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(c,h))},p.prototype.parseClassElement=function(a){var c=this.lookahead,h=this.createNode(),g="",x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),x=this.parseObjectPropertyKey();var P=x;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(c=this.lookahead,A=!0,E=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),c.type===3&&!this.hasLineTerminator&&c.value==="async"){var L=this.lookahead.value;L!==":"&&L!=="("&&L!=="*"&&(O=!0,c=this.lookahead,x=this.parseObjectPropertyKey(),c.type===3&&c.value==="constructor"&&this.tolerateUnexpectedToken(c,o.Messages.ConstructorIsAsync))}}var j=this.qualifiedPropertyName(this.lookahead);return c.type===3?c.value==="get"&&j?(g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod()):c.value==="set"&&j&&(g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod()):c.type===7&&c.value==="*"&&j&&(g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0),!g&&x&&this.match("(")&&(g="init",v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),E||(A&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(c,o.Messages.StaticPrototype),!A&&this.isPropertyKey(x,"constructor")&&((g!=="method"||!C||v&&v.generator)&&this.throwUnexpectedToken(c,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(c,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(h,new s.MethodDefinition(x,E,v,g,A))},p.prototype.parseClassElementList=function(){var a=[],c={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(c));return this.expect("}"),a},p.prototype.parseClassBody=function(){var a=this.createNode(),c=this.parseClassElementList();return this.finalize(a,new s.ClassBody(c))},p.prototype.parseClassDeclaration=function(a){var c=this.createNode(),h=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=h,this.finalize(c,new s.ClassDeclaration(g,x,v))},p.prototype.parseClassExpression=function(){var a=this.createNode(),c=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var h=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=c,this.finalize(a,new s.ClassExpression(h,g,x))},p.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Module(c))},p.prototype.parseScript=function(){for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Script(c))},p.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var c=this.nextToken(),h=this.getTokenRaw(c);return this.finalize(a,new s.Literal(c.value,h))},p.prototype.parseImportSpecifier=function(){var a=this.createNode(),c,h;return this.lookahead.type===3?(c=this.parseVariableIdentifier(),h=c,this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseVariableIdentifier())):(c=this.parseIdentifierName(),h=c,this.matchContextualKeyword("as")?(this.nextToken(),h=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(h,c))},p.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},p.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(c))},p.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var c=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(c))},p.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var c,h=[];if(this.lookahead.type===8)c=this.parseModuleSpecifier();else{if(this.match("{")?h=h.concat(this.parseNamedImports()):this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(h.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.match("{")?h=h.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),c=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(h,c))},p.prototype.parseExportSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName(),h=c;return this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(c,h))},p.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var c;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var h=this.parseFunctionDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchKeyword("class")){var h=this.parseClassDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchContextualKeyword("async")){var h=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var h=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),c=this.finalize(a,new s.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var h=void 0;switch(this.lookahead.value){case"let":case"const":h=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":h=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else if(this.matchAsyncFunction()){var h=this.parseFunctionDeclaration();c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else{var v=[],E=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),v.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();c=this.finalize(a,new s.ExportNamedDeclaration(null,v,E))}return c},p})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(u){Object.create&&Object.defineProperty&&(s=Object.create(u),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,u){var l="Line "+o+": "+u,m=this.constructError(l,s);return m.index=n,m.lineNumber=o,m.description=u,m},i.prototype.throwError=function(n,o,s,u){throw this.createError(n,o,s,u)},i.prototype.tolerateError=function(n,o,s,u){var l=this.createError(n,o,s,u);if(this.tolerant)this.recordError(l);else throw l},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function u(m){return"01234567".indexOf(m)}var l=(function(){function m(d,f){this.source=d,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=d.length,this.index=0,this.lineNumber=d.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(d){this.index=d.index,this.lineNumber=d.lineNumber,this.lineStart=d.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(d){return d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.tolerateUnexpectedToken=function(d){d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.skipSingleLineComment=function(d){var f=[],p,a;for(this.trackComment&&(f=[],p=this.index-d,a={start:{line:this.lineNumber,column:this.index-this.lineStart-d},end:{}});!this.eof();){var c=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(c)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var h={multiLine:!1,slice:[p+d,this.index-1],range:[p,this.index-1],loc:a};f.push(h)}return c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var h={multiLine:!1,slice:[p+d,this.index],range:[p,this.index],loc:a};f.push(h)}return f},m.prototype.skipMultiLineComment=function(){var d=[],f,p;for(this.trackComment&&(d=[],f=this.index-2,p={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:p};d.push(c)}return d}++this.index}else++this.index}if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:p};d.push(c)}return this.tolerateUnexpectedToken(),d},m.prototype.scanComments=function(){var d;this.trackComment&&(d=[]);for(var f=this.index===0;!this.eof();){var p=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(p))++this.index;else if(n.Character.isLineTerminator(p))++this.index,p===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(p===47)if(p=this.source.charCodeAt(this.index+1),p===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(d=d.concat(a)),f=!0}else if(p===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(d=d.concat(a))}else break;else if(f&&p===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(d=d.concat(a))}else break;else if(p===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(d=d.concat(a))}else break;else break}return d},m.prototype.isFutureReservedWord=function(d){switch(d){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(d){switch(d){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(d){return d==="eval"||d==="arguments"},m.prototype.isKeyword=function(d){switch(d.length){case 2:return d==="if"||d==="in"||d==="do";case 3:return d==="var"||d==="for"||d==="new"||d==="try"||d==="let";case 4:return d==="this"||d==="else"||d==="case"||d==="void"||d==="with"||d==="enum";case 5:return d==="while"||d==="break"||d==="catch"||d==="throw"||d==="const"||d==="yield"||d==="class"||d==="super";case 6:return d==="return"||d==="typeof"||d==="delete"||d==="switch"||d==="export"||d==="import";case 7:return d==="default"||d==="finally"||d==="extends";case 8:return d==="function"||d==="continue"||d==="debugger";case 10:return d==="instanceof";default:return!1}},m.prototype.codePointAt=function(d){var f=this.source.charCodeAt(d);if(f>=55296&&f<=56319){var p=this.source.charCodeAt(d+1);if(p>=56320&&p<=57343){var a=f;f=(a-55296)*1024+p-56320+65536}}return f},m.prototype.scanHexEscape=function(d){for(var f=d==="u"?4:2,p=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))p=p*16+s(this.source[this.index++]);else return null;return String.fromCharCode(p)},m.prototype.scanUnicodeCodePointEscape=function(){var d=this.source[this.index],f=0;for(d==="}"&&this.throwUnexpectedToken();!this.eof()&&(d=this.source[this.index++],!!n.Character.isHexDigit(d.charCodeAt(0)));)f=f*16+s(d);return(f>1114111||d!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var d=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=d,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=d,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(d,this.index)},m.prototype.getComplexIdentifier=function(){var d=this.codePointAt(this.index),f=n.Character.fromCodePoint(d);this.index+=f.length;var p;for(d===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierStart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f=p);!this.eof()&&(d=this.codePointAt(this.index),!!n.Character.isIdentifierPart(d));)p=n.Character.fromCodePoint(d),f+=p,this.index+=p.length,d===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierPart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=p);return f},m.prototype.octalToDecimal=function(d){var f=d!=="0",p=u(d);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,p=p*8+u(this.source[this.index++]),"0123".indexOf(d)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(p=p*8+u(this.source[this.index++]))),{code:p,octal:f}},m.prototype.scanIdentifier=function(){var d,f=this.index,p=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(p.length===1?d=3:this.isKeyword(p)?d=4:p==="null"?d=5:p==="true"||p==="false"?d=1:d=3,d!==3&&f+p.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:d,value:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var d=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===d&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanHexLiteral=function(d){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanBinaryLiteral=function(d){for(var f="",p;!this.eof()&&(p=this.source[this.index],!(p!=="0"&&p!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(p=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(p)||n.Character.isDecimalDigit(p))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanOctalLiteral=function(d,f){var p="",a=!1;for(n.Character.isOctalDigit(d.charCodeAt(0))?(a=!0,p="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];return!a&&p.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(p,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var d=this.index+1;d<this.length;++d){var f=this.source[d];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var d=this.index,f=this.source[d];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var p="";if(f!=="."){if(p=this.source[this.index++],f=this.source[this.index],p==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(d);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(d);if(f==="o"||f==="O")return this.scanOctalLiteral(f,d);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,d)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(p+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(p+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(p+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(p),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanStringLiteral=function(){var d=this.index,f=this.source[d];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var p=!1,a="";!this.eof();){var c=this.source[this.index++];if(c===f){f="";break}else if(c==="\\")if(c=this.source[this.index++],!c||!n.Character.isLineTerminator(c.charCodeAt(0)))switch(c){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var h=this.scanHexEscape(c);h===null&&this.throwUnexpectedToken(),a+=h}break;case"x":var g=this.scanHexEscape(c);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
140
- `;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=c,this.tolerateUnexpectedToken();break;default:if(c&&n.Character.isOctalDigit(c.charCodeAt(0))){var x=this.octalToDecimal(c);p=x.octal||p,a+=String.fromCharCode(x.code)}else a+=c;break}else++this.lineNumber,c==="\r"&&this.source[this.index]===`
141
- `&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(c.charCodeAt(0)))break;a+=c}}return f!==""&&(this.index=d,this.throwUnexpectedToken()),{type:8,value:a,octal:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanTemplate=function(){var d="",f=!1,p=this.index,a=this.source[p]==="`",c=!1,h=2;for(++this.index;!this.eof();){var g=this.source[this.index++];if(g==="`"){h=1,c=!0,f=!0;break}else if(g==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,f=!0;break}d+=g}else if(g==="\\")if(g=this.source[this.index++],n.Character.isLineTerminator(g.charCodeAt(0)))++this.lineNumber,g==="\r"&&this.source[this.index]===`
142
- `&&++this.index,this.lineStart=this.index;else switch(g){case"n":d+=`
143
- `;break;case"r":d+="\r";break;case"t":d+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,d+=this.scanUnicodeCodePointEscape();else{var x=this.index,v=this.scanHexEscape(g);v!==null?d+=v:(this.index=x,d+=g)}break;case"x":var E=this.scanHexEscape(g);E===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),d+=E;break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:g==="0"?(n.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),d+="\0"):n.Character.isOctalDigit(g.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):d+=g;break}else n.Character.isLineTerminator(g.charCodeAt(0))?(++this.lineNumber,g==="\r"&&this.source[this.index]===`
144
- `&&++this.index,this.lineStart=this.index,d+=`
145
- `):d+=g}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(p+1,this.index-h),cooked:d,head:a,tail:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.testRegExp=function(d,f){var p="\uFFFF",a=d,c=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(h,g,x){var v=parseInt(g||x,16);return v>1114111&&c.throwUnexpectedToken(o.Messages.InvalidRegExp),v<=65535?String.fromCharCode(v):p}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(d,f)}catch{return null}},m.prototype.scanRegExpBody=function(){var d=this.source[this.index];i.assert(d==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],p=!1,a=!1;!this.eof();)if(d=this.source[this.index++],f+=d,d==="\\")d=this.source[this.index++],n.Character.isLineTerminator(d.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=d;else if(n.Character.isLineTerminator(d.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(p)d==="]"&&(p=!1);else if(d==="/"){a=!0;break}else d==="["&&(p=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},m.prototype.scanRegExpFlags=function(){for(var d="",f="";!this.eof();){var p=this.source[this.index];if(!n.Character.isIdentifierPart(p.charCodeAt(0)))break;if(++this.index,p==="\\"&&!this.eof())if(p=this.source[this.index],p==="u"){++this.index;var a=this.index,c=this.scanHexEscape("u");if(c!==null)for(f+=c,d+="\\u";a<this.index;++a)d+=this.source[a];else this.index=a,f+="u",d+="\\u";this.tolerateUnexpectedToken()}else d+="\\",this.tolerateUnexpectedToken();else f+=p,d+=p}return f},m.prototype.scanRegExp=function(){var d=this.index,f=this.scanRegExpBody(),p=this.scanRegExpFlags(),a=this.testRegExp(f,p);return{type:9,value:"",pattern:f,flags:p,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var d=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(d)?this.scanIdentifier():d===40||d===41||d===59?this.scanPunctuator():d===39||d===34?this.scanStringLiteral():d===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(d)?this.scanNumericLiteral():d===96||d===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():d>=55296&&d<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m})();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function l(){this.values=[],this.curly=this.paren=-1}return l.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},l.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],d=m!==null;switch(m){case"this":case"]":d=!1;break;case")":var f=this.values[this.paren-1];d=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(d=!1,this.values[this.curly-3]==="function"){var p=this.values[this.curly-4];d=p?!this.beforeFunctionExpression(p):!1}else if(this.values[this.curly-4]==="function"){var p=this.values[this.curly-5];d=p?!this.beforeFunctionExpression(p):!0}break;default:break}return d},l.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},l})(),u=(function(){function l(m,d){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=d?typeof d.tolerant=="boolean"&&d.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=d?typeof d.comment=="boolean"&&d.comment:!1,this.trackRange=d?typeof d.range=="boolean"&&d.range:!1,this.trackLoc=d?typeof d.loc=="boolean"&&d.loc:!1,this.buffer=[],this.reader=new s}return l.prototype.errors=function(){return this.errorHandler.errors},l.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var d=0;d<m.length;++d){var f=m[d],p=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:p};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var c=void 0;this.trackLoc&&(c={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var h=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),g=h?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(g);var x={type:o.TokenName[g.type],value:this.scanner.source.slice(g.start,g.end)};if(this.trackRange&&(x.range=[g.start,g.end]),this.trackLoc&&(c.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=c),g.type===9){var v=g.pattern,E=g.flags;x.regex={pattern:v,flags:E}}this.buffer.push(x)}}return this.buffer.shift()},l})();t.Tokenizer=u}])})});var Cg=w((qB,Ys)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof Ys=="object"&&typeof Ys.exports=="object"&&typeof S=="function"?(e=bg(),t=function(n){Ys.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(x){return r.call(x)==="[object Function]"}function u(x){return r.call(x)==="[object String]"}function l(x){return r.call(x)==="[object Object]"}function m(x,v){return function(E){return x+E+v}}function d(x){return x!=="_parent"}function f(x){var v=x.split(":");if(v.length===0||v.length>2)throw new Error("illegal string config: "+x+`
146
- Should be of format "before:after"`);return v.length===1||v[1].length===0?v.indexOf(":")<0?{_before:v[0]}:{_after:v[0]}:{_before:v[0],_after:v[1]}}function p(x){function v(C,A){if(C._parent){if(C._parent._default&&C._parent._default[A])return C._parent._default[A];var O=C._parent._parent;if(O)return O._default?O._default[A]:void 0}}function E(C){var A=x[C];if(A&&!s(A)){if(u(A)&&(x[C]=A=f(A)),A._parent=x,l(A)){if(!A._before&&!A._after)return p(A);A._before=A._before||v(A,"_before"),A._after=A._after||v(A,"_after");return}throw new Error("nodes need to be either {String}, {Object} or {Function}."+A+" is neither.")}}x._default&&E("_default"),Object.keys(x).filter(function(C){return d(C)&&x.hasOwnProperty(C)&&C!=="_before"&&C!=="_after"&&C!=="_default"}).forEach(E)}function a(x){Object.keys(x).filter(function(v){return d(v)&&x.hasOwnProperty(v)}).forEach(function(v){var E=x[v];if(!s(E)&&l(E)){if(!E._before&&!E._after)return a(E);var C=E._before||"",A=E._after||"";return x[v]=m(C,A),x[v]}})}function c(x){p(x),a(x)}function h(x,v){var E={};function C(A){E[A.range[0]]=A}return x.forEach(C),v.forEach(C),Object.keys(E).map(function(A){return E[A]})}function g(x,v,E){E=E||{};var C=E.parser||n,A=!!E.jsx,O=A||!!E.buildAst,P="",L,j,J,Y=0,we=[],Bt,Ir,ir;x[0]==="#"&&x[1]==="!"&&(P=x.substr(0,x.indexOf(`
130
+ `)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let u=Math.max((0,Er.default)(".".padEnd(s.minWidth-1)),(0,Er.default)(s.header),x1(t,s.key))+1;return{...s,maxWidth:u,width:u}}),n=g1.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Du.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let l=(0,Du.sumBy)(i,f=>f.minWidth);if(l>=n)return;let m=n-l,p=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,d)=>f.needs-d.needs);for(let{key:f,needs:d}of p){if(!d)continue;let a=i.find(c=>f===c.key);a&&(m>d?(a.width=a.width+d,m-=d):m&&(a.width=a.width+m,m=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,u)=>s+u.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let l of i){let m=l.header;s+=m.padEnd(l.width)}r.printLine(ag.default.bold(s));let u=r.rowStart;for(let l of i){let m="".padEnd(l.width-1,"\u2500")+" ";u+=m.padEnd(l.width)}r.printLine(ag.default.bold(u))}for(let s of t){let u=1;for(let m of i){let f=s[m.key].split(`
131
+ `).length;f>u&&(u=f)}let l=[...new Array(u).keys()];for(let m of l){let p=r.rowStart;for(let f of i){let d=f.width,a=s[f.key];a=a.split(`
132
+ `)[m]||"";let c=(0,Er.default)(a),h=a.length-c,g=a.padEnd(d+h);(g.length-h>d||c===d)&&(g=(0,m1.default)(g,0,d-2)+"\u2026 ",g+=" ".repeat(d-(0,Er.default)(g))),p+=g}r.printLine(p)}}}outputYAML(){this.options.printLine((0,f1.safeDump)(this.resolveColumnsToObjectArray()))}resolveColumnsToObjectArray(){let{columns:t,data:r}=this;return r.map(i=>Object.fromEntries(t.map(n=>[n.key,i[n.key]??""])))}};function _u(e,t,r={}){new Au(e,t,r).display()}qe.table=_u;(function(e){e.Flags={columns:Gt.string({description:"only show provided columns (comma-separated)",exclusive:["extended"]}),csv:Gt.boolean({description:"output is csv format [alias: --output=csv]",exclusive:["no-truncate"]}),extended:Gt.boolean({char:"x",description:"show extra columns",exclusive:["columns"]}),filter:Gt.string({description:"filter property by partial string matching, ex: name=foo"}),"no-header":Gt.boolean({description:"hide table header from output",exclusive:["csv"]}),"no-truncate":Gt.boolean({description:"do not truncate output to fit screen",exclusive:["csv"]}),output:Gt.string({description:"output in a more machine friendly format",exclusive:["no-truncate","csv"],options:["csv","json","yaml"]}),sort:Gt.string({description:"property to sort by (prepend '-' for descending)"})};function t(r){if(r){let i={},n=(r.only&&typeof r.only=="string"?[r.only]:r.only)||Object.keys(e.Flags),o=(r.except&&typeof r.except=="string"?[r.except]:r.except)||[];for(let s of n)o.includes(s)||(i[s]=e.Flags[s]);return i}return e.Flags}e.flags=t})(_u||(qe.table=_u={}));var x1=(e,t)=>e.reduce((r,i)=>{let n=i[t],o=n.split(`
133
+ `);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,Er.default)(s))):(0,Er.default)(n))},0)});var lg=w((TB,cg)=>{"use strict";y();var br=console.assert,v1=e=>{let t={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",sortFn:null,...e};return br(Object.keys(t).length===6,"Unexpected Option(s) provided"),br(typeof t.joined=="boolean",'Option "joined" has invalid format'),br(typeof t.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),br(typeof t.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),br(typeof t.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),br(typeof t.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),br(typeof t.sortFn=="function"||t.sortFn===null,'Option "sortFn" has invalid format'),t};cg.exports=(e,t={})=>{let r=v1(t),i=[],n=l=>r.sortFn===null?l.reverse():l.sort((m,p)=>r.sortFn(p,m)),o=[],s=n(Object.keys(e)).map(l=>[l]),u=[e];for(;s.length!==0;){let l=s.pop(),m=u[l.length-1][l[l.length-1]];o[l.length-1]=s.length!==0&&s[s.length-1].length===l.length,i.push([o.slice(0,l.length-1).map(p=>p?r.spacerNeighbour:r.spacerNoNeighbour).join(""),o[l.length-1]?r.keyNeighbour:r.keyNoNeighbour,l[l.length-1],["boolean","string","number"].includes(typeof m)?`: ${m}`:""].join("")),m instanceof Object&&!Array.isArray(m)&&(s.push(...n(Object.keys(m)).map(p=>l.concat(p))),u[l.length]=m)}return r.joined===!0?i.join(`
134
+ `):i}});var hg=w(Zi=>{"use strict";y();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.Tree=void 0;var w1=lg(),Js=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(w1(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Zi.Tree=Js;function E1(){return new Js}Zi.default=E1});var Fu=w(xe=>{"use strict";y();var b1=xe&&xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),C1=xe&&xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),D1=xe&&xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&b1(t,e,r);return C1(t,e),t},Su=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0});xe.tree=xe.Table=xe.progress=xe.styledObject=void 0;var A1=Dp();Object.defineProperty(xe,"styledObject",{enumerable:!0,get:function(){return Su(A1).default}});var _1=Qp();Object.defineProperty(xe,"progress",{enumerable:!0,get:function(){return Su(_1).default}});xe.Table=D1(ug());var S1=hg();Object.defineProperty(xe,"tree",{enumerable:!0,get:function(){return Su(S1).default}})});var fg=w(Tu=>{"use strict";y();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var dg=w((LB,pg)=>{"use strict";y();pg.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var mg=w((en,Ou)=>{y();(function(t,r){typeof en=="object"&&typeof Ou=="object"?Ou.exports=r():typeof define=="function"&&define.amd?define([],r):typeof en=="object"?en.esprima=r():t.esprima=r()})(en,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function u(d,a,c){var h=null,g=function(L,j){c&&c(L,j),h&&h.visit(L,j)},x=typeof c=="function"?g:null,v=!1;if(a){v=typeof a.comment=="boolean"&&a.comment;var E=typeof a.attachComment=="boolean"&&a.attachComment;(v||E)&&(h=new i.CommentHandler,h.attach=E,a.comment=!0,x=g)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var A;a&&typeof a.jsx=="boolean"&&a.jsx?A=new n.JSXParser(d,a,x):A=new o.Parser(d,a,x);var O=C?A.parseModule():A.parseScript(),P=O;return v&&h&&(P.comments=h.comments),A.config.tokens&&(P.tokens=A.tokens),A.config.tolerant&&(P.errors=A.errorHandler.errors),P}t.parse=u;function l(d,a,c){var h=a||{};return h.sourceType="module",u(d,h,c)}t.parseModule=l;function m(d,a,c){var h=a||{};return h.sourceType="script",u(d,h,c)}t.parseScript=m;function p(d,a,c){var h=new s.Tokenizer(d,a),g;g=[];try{for(;;){var x=h.getNextToken();if(!x)break;c&&(x=c(x)),g.push(x)}}catch(v){h.errorHandler.tolerate(v)}return h.errorHandler.tolerant&&(g.errors=h.errors()),g}t.tokenize=p;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,u){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var l=[],m=this.leading.length-1;m>=0;--m){var p=this.leading[m];u.end.offset>=p.start&&(l.unshift(p.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}l.length&&(s.innerComments=l)}},o.prototype.findTrailingComments=function(s){var u=[];if(this.trailing.length>0){for(var l=this.trailing.length-1;l>=0;--l){var m=this.trailing[l];m.start>=s.end.offset&&u.unshift(m.comment)}return this.trailing.length=0,u}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var f=p.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(u=p.node.trailingComments,delete p.node.trailingComments)}return u},o.prototype.findLeadingComments=function(s){for(var u=[],l;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)l=m.node,this.stack.pop();else break}if(l){for(var p=l.leadingComments?l.leadingComments.length:0,f=p-1;f>=0;--f){var d=l.leadingComments[f];d.range[1]<=s.start.offset&&(u.unshift(d),l.leadingComments.splice(f,1))}return l.leadingComments&&l.leadingComments.length===0&&delete l.leadingComments,u}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(u.unshift(m.comment),this.leading.splice(f,1))}return u},o.prototype.visitNode=function(s,u){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,u);var l=this.findTrailingComments(u),m=this.findLeadingComments(u);m.length>0&&(s.leadingComments=m),l.length>0&&(s.trailingComments=l),this.stack.push({node:s,start:u.start.offset})}},o.prototype.visitComment=function(s,u){var l=s.type[0]==="L"?"Line":"Block",m={type:l,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var p={comment:{type:l,value:s.value,range:[u.start.offset,u.end.offset]},start:u.start.offset};s.loc&&(p.comment.loc=s.loc),s.type=l,this.leading.push(p),this.trailing.push(p)}},o.prototype.visit=function(s,u){s.type==="LineComment"?this.visitComment(s,u):s.type==="BlockComment"?this.visitComment(s,u):this.attach&&this.visitNode(s,u)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var g in h)h.hasOwnProperty(g)&&(c[g]=h[g])};return function(c,h){a(c,h);function g(){this.constructor=c}c.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),u=r(7),l=r(8),m=r(13),p=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var c;switch(a.type){case s.JSXSyntax.JSXIdentifier:var h=a;c=h.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;c=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var x=a;c=f(x.object)+"."+f(x.property);break;default:break}return c}var d=(function(a){i(c,a);function c(h,g,x){return a.call(this,h,g,x)||this}return c.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},c.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},c.prototype.finishJSX=function(){this.nextToken()},c.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},c.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.scanXHTMLEntity=function(h){for(var g="&",x=!0,v=!1,E=!1,C=!1;!this.scanner.eof()&&x&&!v;){var A=this.scanner.source[this.scanner.index];if(A===h)break;if(v=A===";",g+=A,++this.scanner.index,!v)switch(g.length){case 2:E=A==="#";break;case 3:E&&(C=A==="x",x=C||n.Character.isDecimalDigit(A.charCodeAt(0)),E=E&&!C);break;default:x=x&&!(E&&!n.Character.isDecimalDigit(A.charCodeAt(0))),x=x&&!(C&&!n.Character.isHexDigit(A.charCodeAt(0)));break}}if(x&&v&&g.length>2){var O=g.substr(1,g.length-2);E&&O.length>1?g=String.fromCharCode(parseInt(O.substr(1),10)):C&&O.length>2?g=String.fromCharCode(parseInt("0"+O.substr(1),16)):!E&&!C&&p.XHTMLEntities[O]&&(g=p.XHTMLEntities[O])}return g},c.prototype.lexJSX=function(){var h=this.scanner.source.charCodeAt(this.scanner.index);if(h===60||h===62||h===47||h===58||h===61||h===123||h===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(h===34||h===39){for(var x=this.scanner.index,v=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===v)break;C==="&"?E+=this.scanXHTMLEntity(v):E+=C}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===46){var A=this.scanner.source.charCodeAt(this.scanner.index+1),O=this.scanner.source.charCodeAt(this.scanner.index+2),g=A===46&&O===46?"...":".",x=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(h)&&h!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},c.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var h=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(h)),h},c.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var h=this.scanner.index,g="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,g+=x,n.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
135
+ `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var v={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:h,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(v)),v},c.prototype.peekJSXToken=function(){var h=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(h),g},c.prototype.expectJSX=function(h){var g=this.nextJSXToken();(g.type!==7||g.value!==h)&&this.throwUnexpectedToken(g)},c.prototype.matchJSX=function(h){var g=this.peekJSXToken();return g.type===7&&g.value===h},c.prototype.parseJSXIdentifier=function(){var h=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(h,new o.JSXIdentifier(g.value))},c.prototype.parseJSXElementName=function(){var h=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=g;this.expectJSX(":");var v=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(x,v))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=g;this.expectJSX(".");var C=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXMemberExpression(E,C))}return g},c.prototype.parseJSXAttributeName=function(){var h=this.createJSXNode(),g,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=x;this.expectJSX(":");var E=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(v,E))}else g=x;return g},c.prototype.parseJSXStringLiteralAttribute=function(){var h=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var x=this.getTokenRaw(g);return this.finalize(h,new u.Literal(g.value,x))},c.prototype.parseJSXExpressionAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},c.prototype.parseJSXNameValueAttribute=function(){var h=this.createJSXNode(),g=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(h,new o.JSXAttribute(g,x))},c.prototype.parseJSXSpreadAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXSpreadAttribute(g))},c.prototype.parseJSXAttributes=function(){for(var h=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();h.push(g)}return h},c.prototype.parseJSXOpeningElement=function(){var h=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),x=this.parseJSXAttributes(),v=this.matchJSX("/");return v&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(g,v,x))},c.prototype.parseJSXBoundaryElement=function(){var h=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(h,new o.JSXClosingElement(g))}var x=this.parseJSXElementName(),v=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(x,E,v))},c.prototype.parseJSXEmptyExpression=function(){var h=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(h,new o.JSXEmptyExpression)},c.prototype.parseJSXExpressionContainer=function(){var h=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXChildren=function(){for(var h=[];!this.scanner.eof();){var g=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var v=this.getTokenRaw(x),E=this.finalize(g,new o.JSXText(x.value,v));h.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();h.push(C)}else break}return h},c.prototype.parseComplexJSXElement=function(h){for(var g=[];!this.scanner.eof();){h.children=h.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),v=this.parseJSXBoundaryElement();if(v.type===s.JSXSyntax.JSXOpeningElement){var E=v;if(E.selfClosing){var C=this.finalize(x,new o.JSXElement(E,[],null));h.children.push(C)}else g.push(h),h={node:x,opening:E,closing:null,children:[]}}if(v.type===s.JSXSyntax.JSXClosingElement){h.closing=v;var A=f(h.opening.name),O=f(h.closing.name);if(A!==O&&this.tolerateError("Expected corresponding JSX closing tag for %0",A),g.length>0){var C=this.finalize(h.node,new o.JSXElement(h.opening,h.children,h.closing));h=g[g.length-1],h.children.push(C),g.pop()}else break}}return h},c.prototype.parseJSXElement=function(){var h=this.createJSXNode(),g=this.parseJSXOpeningElement(),x=[],v=null;if(!g.selfClosing){var E=this.parseComplexJSXElement({node:h,opening:g,closing:v,children:x});x=E.children,v=E.closing}return this.finalize(h,new o.JSXElement(g,x,v))},c.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var h=this.parseJSXElement();return this.finishJSX(),h},c.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},c})(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function h(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return h})();t.JSXClosingElement=n;var o=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=x,this.closingElement=v}return h})();t.JSXElement=o;var s=(function(){function h(){this.type=i.JSXSyntax.JSXEmptyExpression}return h})();t.JSXEmptyExpression=s;var u=(function(){function h(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return h})();t.JSXExpressionContainer=u;var l=(function(){function h(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return h})();t.JSXIdentifier=l;var m=(function(){function h(g,x){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=x}return h})();t.JSXMemberExpression=m;var p=(function(){function h(g,x){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=x}return h})();t.JSXAttribute=p;var f=(function(){function h(g,x){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=x}return h})();t.JSXNamespacedName=f;var d=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=x,this.attributes=v}return h})();t.JSXOpeningElement=d;var a=(function(){function h(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return h})();t.JSXSpreadAttribute=a;var c=(function(){function h(g,x){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=x}return h})();t.JSXText=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!1}return b})();t.ArrowFunctionExpression=s;var u=(function(){function b(D,_,B){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=_,this.right=B}return b})();t.AssignmentExpression=u;var l=(function(){function b(D,_){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=_}return b})();t.AssignmentPattern=l;var m=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var p=(function(){function b(D,_,B){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=p;var f=(function(){function b(D,_,B){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var d=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=d;var a=(function(){function b(D,_,B){var Le=D==="||"||D==="&&";this.type=Le?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=_,this.right=B}return b})();t.BinaryExpression=a;var c=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=c;var h=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=h;var g=(function(){function b(D,_){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=_}return b})();t.CallExpression=g;var x=(function(){function b(D,_){this.type=i.Syntax.CatchClause,this.param=D,this.body=_}return b})();t.CatchClause=x;var v=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=v;var E=(function(){function b(D,_,B){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassDeclaration=E;var C=(function(){function b(D,_,B){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassExpression=C;var A=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=_}return b})();t.ComputedMemberExpression=A;var O=(function(){function b(D,_,B){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=_,this.alternate=B}return b})();t.ConditionalExpression=O;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var L=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=L;var j=(function(){function b(D,_){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=_}return b})();t.Directive=j;var J=(function(){function b(D,_){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=_}return b})();t.DoWhileStatement=J;var X=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=X;var ve=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=ve;var Mt=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=Mt;var Pr=(function(){function b(D,_,B){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=_,this.source=B}return b})();t.ExportNamedDeclaration=Pr;var tr=(function(){function b(D,_){this.type=i.Syntax.ExportSpecifier,this.exported=_,this.local=D}return b})();t.ExportSpecifier=tr;var zo=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=zo;var Jo=(function(){function b(D,_,B){this.type=i.Syntax.ForInStatement,this.left=D,this.right=_,this.body=B,this.each=!1}return b})();t.ForInStatement=Jo;var Si=(function(){function b(D,_,B){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=_,this.body=B}return b})();t.ForOfStatement=Si;var rr=(function(){function b(D,_,B,Le){this.type=i.Syntax.ForStatement,this.init=D,this.test=_,this.update=B,this.body=Le}return b})();t.ForStatement=rr;var Et=(function(){function b(D,_,B,Le){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=Et;var bt=(function(){function b(D,_,B,Le){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=bt;var bn=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=bn;var Ir=(function(){function b(D,_,B){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=_,this.alternate=B}return b})();t.IfStatement=Ir;var ir=(function(){function b(D,_){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=_}return b})();t.ImportDeclaration=ir;var se=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=se;var Te=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=Te;var et=(function(){function b(D,_){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=_}return b})();t.ImportSpecifier=et;var Ue=(function(){function b(D,_){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=_}return b})();t.LabeledStatement=Ue;var tt=(function(){function b(D,_){this.type=i.Syntax.Literal,this.value=D,this.raw=_}return b})();t.Literal=tt;var Lt=(function(){function b(D,_){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=_}return b})();t.MetaProperty=Lt;var iv=(function(){function b(D,_,B,Le,Go){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=_,this.value=B,this.kind=Le,this.static=Go}return b})();t.MethodDefinition=iv;var nv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=nv;var sv=(function(){function b(D,_){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=_}return b})();t.NewExpression=sv;var ov=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=ov;var av=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=av;var uv=(function(){function b(D,_,B,Le,Go,Pv){this.type=i.Syntax.Property,this.key=_,this.computed=B,this.value=Le,this.kind=D,this.method=Go,this.shorthand=Pv}return b})();t.Property=uv;var cv=(function(){function b(D,_,B,Le){this.type=i.Syntax.Literal,this.value=D,this.raw=_,this.regex={pattern:B,flags:Le}}return b})();t.RegexLiteral=cv;var lv=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=lv;var hv=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=hv;var fv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=fv;var pv=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=pv;var dv=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=dv;var mv=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=_}return b})();t.StaticMemberExpression=mv;var gv=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=gv;var yv=(function(){function b(D,_){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=_}return b})();t.SwitchCase=yv;var xv=(function(){function b(D,_){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=_}return b})();t.SwitchStatement=xv;var vv=(function(){function b(D,_){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=_}return b})();t.TaggedTemplateExpression=vv;var wv=(function(){function b(D,_){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=_}return b})();t.TemplateElement=wv;var Ev=(function(){function b(D,_){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=_}return b})();t.TemplateLiteral=Ev;var bv=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=bv;var Cv=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=Cv;var Dv=(function(){function b(D,_,B){this.type=i.Syntax.TryStatement,this.block=D,this.handler=_,this.finalizer=B}return b})();t.TryStatement=Dv;var Av=(function(){function b(D,_){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=_,this.prefix=!0}return b})();t.UnaryExpression=Av;var _v=(function(){function b(D,_,B){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=_,this.prefix=B}return b})();t.UpdateExpression=_v;var Sv=(function(){function b(D,_){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=_}return b})();t.VariableDeclaration=Sv;var Fv=(function(){function b(D,_){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=_}return b})();t.VariableDeclarator=Fv;var Tv=(function(){function b(D,_){this.type=i.Syntax.WhileStatement,this.test=D,this.body=_}return b})();t.WhileStatement=Tv;var Ov=(function(){function b(D,_){this.type=i.Syntax.WithStatement,this.object=D,this.body=_}return b})();t.WithStatement=Ov;var kv=(function(){function b(D,_){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=_}return b})();t.YieldExpression=kv},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),u=r(12),l=r(2),m=r(13),p="ArrowParameterPlaceHolder",f=(function(){function d(a,c,h){c===void 0&&(c={}),this.config={range:typeof c.range=="boolean"&&c.range,loc:typeof c.loc=="boolean"&&c.loc,source:null,tokens:typeof c.tokens=="boolean"&&c.tokens,comment:typeof c.comment=="boolean"&&c.comment,tolerant:typeof c.tolerant=="boolean"&&c.tolerant},this.config.loc&&c.source&&c.source!==null&&(this.config.source=String(c.source)),this.delegate=h,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new u.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return d.prototype.throwError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(v,E,C,x)},d.prototype.tolerateError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(v,E,C,x)},d.prototype.unexpectedTokenError=function(a,c){var h=c||o.Messages.UnexpectedToken,g;if(a?(c||(h=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?h=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(h=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",h=h.replace("%0",g),a&&typeof a.lineNumber=="number"){var x=a.start,v=a.lineNumber,E=this.lastMarker.index-this.lastMarker.column,C=a.start-E+1;return this.errorHandler.createError(x,v,C,h)}else{var x=this.lastMarker.index,v=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(x,v,C,h)}},d.prototype.throwUnexpectedToken=function(a,c){throw this.unexpectedTokenError(a,c)},d.prototype.tolerateUnexpectedToken=function(a,c){this.errorHandler.tolerate(this.unexpectedTokenError(a,c))},d.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var c=0;c<a.length;++c){var h=a[c],g=void 0;g={type:h.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(h.slice[0],h.slice[1])},this.config.range&&(g.range=h.range),this.config.loc&&(g.loc=h.loc);var x={start:{line:h.loc.start.line,column:h.loc.start.column,offset:h.range[0]},end:{line:h.loc.end.line,column:h.loc.end.column,offset:h.range[1]}};this.delegate(g,x)}}},d.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},d.prototype.convertToken=function(a){var c={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(c.range=[a.start,a.end]),this.config.loc&&(c.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var h=a.pattern,g=a.flags;c.regex={pattern:h,flags:g}}return c},d.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var c=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==c.lineNumber,c&&this.context.strict&&c.type===3&&this.scanner.isStrictModeReservedWord(c.value)&&(c.type=4),this.lookahead=c,this.config.tokens&&c.type!==2&&this.tokens.push(this.convertToken(c)),a},d.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},d.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},d.prototype.startNode=function(a,c){c===void 0&&(c=0);var h=a.start-a.lineStart,g=a.lineNumber;return h<0&&(h+=c,g--),{index:a.start,line:g,column:h}},d.prototype.finalize=function(a,c){if(this.config.range&&(c.range=[a.index,this.lastMarker.index]),this.config.loc&&(c.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(c.loc.source=this.config.source)),this.delegate){var h={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(c,h)}return c},d.prototype.expect=function(a){var c=this.nextToken();(c.type!==7||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},d.prototype.expectKeyword=function(a){var c=this.nextToken();(c.type!==4||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},d.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},d.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},d.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},d.prototype.isolateCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=c,this.context.isAssignmentTarget=h,this.context.firstCoverInitializedNameError=g,x},d.prototype.inheritCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&c,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&h,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,x},d.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},d.prototype.parsePrimaryExpression=function(){var a=this.createNode(),c,h,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),c=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(null,g));break;case 10:c=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,c=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":c=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":c=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,h=this.nextRegexToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.RegexLiteral(h.regex,g,h.pattern,h.flags));break;default:c=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?c=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?c=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?c=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),c=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?c=this.parseClassExpression():c=this.throwUnexpectedToken(this.nextToken()));break;default:c=this.throwUnexpectedToken(this.nextToken())}return c},d.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var c=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(c))},d.prototype.parseArrayInitializer=function(){var a=this.createNode(),c=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),c.push(null);else if(this.match("...")){var h=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),c.push(h)}else c.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(c))},d.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=c,this.context.allowStrictDirective=h,g},d.prototype.parsePropertyMethodFunction=function(){var a=!1,c=this.createNode(),h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(c,new s.FunctionExpression(null,g.params,x,a))},d.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),c=this.context.allowYield,h=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=c,this.context.await=h,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,x))},d.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),c=this.nextToken(),h;switch(c.type){case 8:case 6:this.context.strict&&c.octal&&this.tolerateUnexpectedToken(c,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(c);h=this.finalize(a,new s.Literal(c.value,g));break;case 3:case 1:case 5:case 4:h=this.finalize(a,new s.Identifier(c.value));break;case 7:c.value==="["?(h=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):h=this.throwUnexpectedToken(c);break;default:h=this.throwUnexpectedToken(c)}return h},d.prototype.isPropertyKey=function(a,c){return a.type===l.Syntax.Identifier&&a.name===c||a.type===l.Syntax.Literal&&a.value===c},d.prototype.parseObjectProperty=function(a){var c=this.createNode(),h=this.lookahead,g,x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(h.type===3){var P=h.value;this.nextToken(),E=this.match("["),O=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=O?this.parseObjectPropertyKey():this.finalize(c,new s.Identifier(P))}else this.match("*")?this.nextToken():(E=this.match("["),x=this.parseObjectPropertyKey());var L=this.qualifiedPropertyName(this.lookahead);if(h.type===3&&!O&&h.value==="get"&&L)g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod();else if(h.type===3&&!O&&h.value==="set"&&L)g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod();else if(h.type===7&&h.value==="*"&&L)g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0;else if(x||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!O)!E&&this.isPropertyKey(x,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),v=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(h.type===3){var P=this.finalize(c,new s.Identifier(h.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),A=!0;var j=this.isolateCoverGrammar(this.parseAssignmentExpression);v=this.finalize(c,new s.AssignmentPattern(P,j))}else A=!0,v=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(c,new s.Property(g,x,E,v,C,A))},d.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var c=[],h={value:!1};!this.match("}");)c.push(this.parseObjectProperty(h)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(c))},d.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateLiteral=function(){var a=this.createNode(),c=[],h=[],g=this.parseTemplateHead();for(h.push(g);!g.tail;)c.push(this.parseExpression()),g=this.parseTemplateElement(),h.push(g);return this.finalize(a,new s.TemplateLiteral(h,c))},d.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:a.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case l.Syntax.ArrayExpression:a.type=l.Syntax.ArrayPattern;for(var c=0;c<a.elements.length;c++)a.elements[c]!==null&&this.reinterpretExpressionAsPattern(a.elements[c]);break;case l.Syntax.ObjectExpression:a.type=l.Syntax.ObjectPattern;for(var c=0;c<a.properties.length;c++)this.reinterpretExpressionAsPattern(a.properties[c].value);break;case l.Syntax.AssignmentExpression:a.type=l.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},d.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:p,params:[],async:!1};else{var c=this.lookahead,h=[];if(this.match("..."))a=this.parseRestElement(h),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:p,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(h)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(c),new s.SequenceExpression(x)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===l.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:p,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===l.Syntax.SequenceExpression)for(var v=0;v<a.expressions.length;v++)this.reinterpretExpressionAsPattern(a.expressions[v]);else this.reinterpretExpressionAsPattern(a);var E=a.type===l.Syntax.SequenceExpression?a.expressions:[a];a={type:p,params:E,async:!1}}this.context.isBindingElement=!1}}}return a},d.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},d.prototype.parseIdentifierName=function(){var a=this.createNode(),c=this.nextToken();return this.isIdentifierName(c)||this.throwUnexpectedToken(c),this.finalize(a,new s.Identifier(c.value))},d.prototype.parseNewExpression=function(){var a=this.createNode(),c=this.parseIdentifierName();i.assert(c.name==="new","New expression must start with `new`");var h;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();h=new s.MetaProperty(c,g)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),v=this.match("(")?this.parseArguments():[];h=new s.NewExpression(x,v),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,h)},d.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},d.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,c=this.matchContextualKeyword("async"),h=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,x))}else if(this.match("(")){var v=c&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=v?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,E)),v&&this.match("=>")){for(var C=0;C<E.length;++C)this.reinterpretExpressionAsPattern(E[C]);g={type:p,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,x))}else if(this.lookahead.type===10&&this.lookahead.head){var A=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,A))}else break;return this.context.allowIn=h,g},d.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},d.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),c=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var h=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),c=this.finalize(a,new s.ComputedMemberExpression(c,h))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var h=this.parseIdentifierName();c=this.finalize(a,new s.StaticMemberExpression(c,h))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();c=this.finalize(a,new s.TaggedTemplateExpression(c,g))}else break;return c},d.prototype.parseUpdateExpression=function(){var a,c=this.lookahead;if(this.match("++")||this.match("--")){var h=this.startNode(c),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var x=!0;a=this.finalize(h,new s.UpdateExpression(g.value,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=this.nextToken().value,x=!1;a=this.finalize(this.startNode(c),new s.UpdateExpression(v,a,x))}return a},d.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var c=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(c))},d.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var c=this.startNode(this.lookahead),h=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(c,new s.UnaryExpression(h.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},d.prototype.parseExponentiationExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseUnaryExpression);if(c.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var h=c,g=this.isolateCoverGrammar(this.parseExponentiationExpression);c=this.finalize(this.startNode(a),new s.BinaryExpression("**",h,g))}return c},d.prototype.binaryPrecedence=function(a){var c=a.value,h;return a.type===7?h=this.operatorPrecedence[c]||0:a.type===4?h=c==="instanceof"||this.context.allowIn&&c==="in"?7:0:h=0,h},d.prototype.parseBinaryExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseExponentiationExpression),h=this.lookahead,g=this.binaryPrecedence(h);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[a,this.lookahead],v=c,E=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[v,h.value,E],A=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;C.length>2&&g<=A[A.length-1];){E=C.pop();var O=C.pop();A.pop(),v=C.pop(),x.pop();var P=this.startNode(x[x.length-1]);C.push(this.finalize(P,new s.BinaryExpression(O,v,E)))}C.push(this.nextToken().value),A.push(g),x.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var L=C.length-1;c=C[L];for(var j=x.pop();L>1;){var J=x.pop(),X=j&&j.lineStart,P=this.startNode(J,X),O=C[L-1];c=this.finalize(P,new s.BinaryExpression(O,C[L-2],c)),L-=2,j=J}}return c},d.prototype.parseConditionalExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var h=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=h,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(this.startNode(a),new s.ConditionalExpression(c,g,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return c},d.prototype.checkPatternParam=function(a,c){switch(c.type){case l.Syntax.Identifier:this.validateParam(a,c,c.name);break;case l.Syntax.RestElement:this.checkPatternParam(a,c.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(a,c.left);break;case l.Syntax.ArrayPattern:for(var h=0;h<c.elements.length;h++)c.elements[h]!==null&&this.checkPatternParam(a,c.elements[h]);break;case l.Syntax.ObjectPattern:for(var h=0;h<c.properties.length;h++)this.checkPatternParam(a,c.properties[h].value);break;default:break}a.simple=a.simple&&c instanceof s.Identifier},d.prototype.reinterpretAsCoverFormalsList=function(a){var c=[a],h,g=!1;switch(a.type){case l.Syntax.Identifier:break;case p:c=a.params,g=a.async;break;default:return null}h={simple:!0,paramSet:{}};for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.AssignmentPattern?v.right.type===l.Syntax.YieldExpression&&(v.right.argument&&this.throwUnexpectedToken(this.lookahead),v.right.type=l.Syntax.Identifier,v.right.name="yield",delete v.right.argument,delete v.right.delegate):g&&v.type===l.Syntax.Identifier&&v.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(h,v),c[x]=v}if(this.context.strict||!this.context.allowYield)for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(h.message===o.Messages.StrictParamDupe){var E=this.context.strict?h.stricted:h.firstRestricted;this.throwUnexpectedToken(E,h.message)}return{simple:h.simple,params:c,stricted:h.stricted,firstRestricted:h.firstRestricted,message:h.message}},d.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var c=this.lookahead,h=c;if(a=this.parseConditionalExpression(),h.type===3&&h.lineNumber===this.lookahead.lineNumber&&h.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:p,params:[g],async:!0}}if(a.type===p||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=a.async,v=this.reinterpretAsCoverFormalsList(a);if(v){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=v.simple;var A=this.context.allowYield,O=this.context.await;this.context.allowYield=!0,this.context.await=x;var P=this.startNode(c);this.expect("=>");var L=void 0;if(this.match("{")){var j=this.context.allowIn;this.context.allowIn=!0,L=this.parseFunctionSourceElements(),this.context.allowIn=j}else L=this.isolateCoverGrammar(this.parseAssignmentExpression);var J=L.type!==l.Syntax.BlockStatement;this.context.strict&&v.firstRestricted&&this.throwUnexpectedToken(v.firstRestricted,v.message),this.context.strict&&v.stricted&&this.tolerateUnexpectedToken(v.stricted,v.message),a=x?this.finalize(P,new s.AsyncArrowFunctionExpression(v.params,L,J)):this.finalize(P,new s.ArrowFunctionExpression(v.params,L,J)),this.context.strict=E,this.context.allowStrictDirective=C,this.context.allowYield=A,this.context.await=O}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===l.Syntax.Identifier){var X=a;this.scanner.isRestrictedWord(X.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(X.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),h=this.nextToken();var ve=h.value,Mt=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(c),new s.AssignmentExpression(ve,a,Mt)),this.context.firstCoverInitializedNameError=null}}return a},d.prototype.parseExpression=function(){var a=this.lookahead,c=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var h=[];for(h.push(c);this.lookahead.type!==2&&this.match(",");)this.nextToken(),h.push(this.isolateCoverGrammar(this.parseAssignmentExpression));c=this.finalize(this.startNode(a),new s.SequenceExpression(h))}return c},d.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},d.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var c=[];!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(c))},d.prototype.parseLexicalBinding=function(a,c){var h=this.createNode(),g=[],x=this.parsePattern(g,a);this.context.strict&&x.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!c.inFor&&x.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),v=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(h,new s.VariableDeclarator(x,v))},d.prototype.parseBindingList=function(a,c){for(var h=[this.parseLexicalBinding(a,c)];this.match(",");)this.nextToken(),h.push(this.parseLexicalBinding(a,c));return h},d.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var c=this.scanner.lex();return this.scanner.restoreState(a),c.type===3||c.type===7&&c.value==="["||c.type===7&&c.value==="{"||c.type===4&&c.value==="let"||c.type===4&&c.value==="yield"},d.prototype.parseLexicalDeclaration=function(a){var c=this.createNode(),h=this.nextToken().value;i.assert(h==="let"||h==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(h,a);return this.consumeSemicolon(),this.finalize(c,new s.VariableDeclaration(g,h))},d.prototype.parseBindingRestElement=function(a,c){var h=this.createNode();this.expect("...");var g=this.parsePattern(a,c);return this.finalize(h,new s.RestElement(g))},d.prototype.parseArrayPattern=function(a,c){var h=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,c));break}else g.push(this.parsePatternWithDefault(a,c));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(h,new s.ArrayPattern(g))},d.prototype.parsePropertyPattern=function(a,c){var h=this.createNode(),g=!1,x=!1,v=!1,E,C;if(this.lookahead.type===3){var A=this.lookahead;E=this.parseVariableIdentifier();var O=this.finalize(h,new s.Identifier(A.value));if(this.match("=")){a.push(A),x=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(A),new s.AssignmentPattern(O,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,c)):(a.push(A),x=!0,C=O)}else g=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,c);return this.finalize(h,new s.Property("init",E,g,C,v,x))},d.prototype.parseObjectPattern=function(a,c){var h=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,c)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(h,new s.ObjectPattern(g))},d.prototype.parsePattern=function(a,c){var h;return this.match("[")?h=this.parseArrayPattern(a,c):this.match("{")?h=this.parseObjectPattern(a,c):(this.matchKeyword("let")&&(c==="const"||c==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),h=this.parseVariableIdentifier(c)),h},d.prototype.parsePatternWithDefault=function(a,c){var h=this.lookahead,g=this.parsePattern(a,c);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,g=this.finalize(this.startNode(h),new s.AssignmentPattern(g,v))}return g},d.prototype.parseVariableIdentifier=function(a){var c=this.createNode(),h=this.nextToken();return h.type===4&&h.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(h):h.type!==3?this.context.strict&&h.type===4&&this.scanner.isStrictModeReservedWord(h.value)?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):(this.context.strict||h.value!=="let"||a!=="var")&&this.throwUnexpectedToken(h):(this.context.isModule||this.context.await)&&h.type===3&&h.value==="await"&&this.tolerateUnexpectedToken(h),this.finalize(c,new s.Identifier(h.value))},d.prototype.parseVariableDeclaration=function(a){var c=this.createNode(),h=[],g=this.parsePattern(h,"var");this.context.strict&&g.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==l.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(c,new s.VariableDeclarator(g,x))},d.prototype.parseVariableDeclarationList=function(a){var c={inFor:a.inFor},h=[];for(h.push(this.parseVariableDeclaration(c));this.match(",");)this.nextToken(),h.push(this.parseVariableDeclaration(c));return h},d.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var c=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(c,"var"))},d.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},d.prototype.parseExpressionStatement=function(){var a=this.createNode(),c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(c))},d.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},d.prototype.parseIfStatement=function(){var a=this.createNode(),c,h=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),h=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,c,h))},d.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var c=this.context.inIteration;this.context.inIteration=!0;var h=this.parseStatement();this.context.inIteration=c,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(h,g))},d.prototype.parseWhileStatement=function(){var a=this.createNode(),c;this.expectKeyword("while"),this.expect("(");var h=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,c=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(h,c))},d.prototype.parseForStatement=function(){var a=null,c=null,h=null,g=!0,x,v,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,A.length===1&&this.matchKeyword("in")){var O=A[0];O.init&&(O.id.type===l.Syntax.ArrayPattern||O.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseExpression(),a=null}else A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),x=a,v=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,A.length===1&&A[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseExpression(),a=null):A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(A,P)))}}else{var L=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var j=[a];this.match(",");)this.nextToken(),j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(L),new s.SequenceExpression(j))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(c=this.parseExpression()),this.expect(";"),this.match(")")||(h=this.parseExpression()));var J;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),J=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var X=this.context.inIteration;this.context.inIteration=!0,J=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=X}return typeof x>"u"?this.finalize(E,new s.ForStatement(a,c,h,J)):g?this.finalize(E,new s.ForInStatement(x,v,J)):this.finalize(E,new s.ForOfStatement(x,v,J))},d.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier();c=h;var g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name)}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(c))},d.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier(),g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name),c=h}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(c))},d.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var c=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,h=c?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(h))},d.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),c;this.expectKeyword("with"),this.expect("(");var h=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseStatement()),this.finalize(a,new s.WithStatement(h,c))},d.prototype.parseSwitchCase=function(){var a=this.createNode(),c;this.matchKeyword("default")?(this.nextToken(),c=null):(this.expectKeyword("case"),c=this.parseExpression()),this.expect(":");for(var h=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)h.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(c,h))},d.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var c=this.parseExpression();this.expect(")");var h=this.context.inSwitch;this.context.inSwitch=!0;var g=[],x=!1;for(this.expect("{");!this.match("}");){var v=this.parseSwitchCase();v.test===null&&(x&&this.throwError(o.Messages.MultipleDefaultsInSwitch),x=!0),g.push(v)}return this.expect("}"),this.context.inSwitch=h,this.finalize(a,new s.SwitchStatement(c,g))},d.prototype.parseLabelledStatement=function(){var a=this.createNode(),c=this.parseExpression(),h;if(c.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var g=c,x="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[x]=!0;var v=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),v=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),v=C}else v=this.parseStatement();delete this.context.labelSet[x],h=new s.LabeledStatement(g,v)}else this.consumeSemicolon(),h=new s.ExpressionStatement(c);return this.finalize(a,h)},d.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(c))},d.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var c=[],h=this.parsePattern(c),g={},x=0;x<c.length;x++){var v="$"+c[x].value;Object.prototype.hasOwnProperty.call(g,v)&&this.tolerateError(o.Messages.DuplicateBinding,c[x].value),g[v]=!0}this.context.strict&&h.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(h.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(a,new s.CatchClause(h,E))},d.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},d.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var c=this.parseBlock(),h=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!h&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(c,h,g))},d.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},d.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var c=this.lookahead.value;c==="{"?a=this.parseBlock():c==="("?a=this.parseExpressionStatement():c===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},d.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var c=this.parseDirectivePrologues(),h=this.context.labelSet,g=this.context.inIteration,x=this.context.inSwitch,v=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=h,this.context.inIteration=g,this.context.inSwitch=x,this.context.inFunctionBody=v,this.finalize(a,new s.BlockStatement(c))},d.prototype.validateParam=function(a,c,h){var g="$"+h;this.context.strict?(this.scanner.isRestrictedWord(h)&&(a.stricted=c,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},d.prototype.parseRestElement=function(a){var c=this.createNode();this.expect("...");var h=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(c,new s.RestElement(h))},d.prototype.parseFormalParameter=function(a){for(var c=[],h=this.match("...")?this.parseRestElement(c):this.parsePatternWithDefault(c),g=0;g<c.length;g++)this.validateParam(a,c[g],c[g].value);a.simple=a.simple&&h instanceof s.Identifier,a.params.push(h)},d.prototype.parseFormalParameters=function(a){var c;if(c={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(c.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(c),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:c.simple,params:c.params,stricted:c.stricted,firstRestricted:c.firstRestricted,message:c.message}},d.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var c=this.scanner.saveState();this.scanner.scanComments();var h=this.scanner.lex();this.scanner.restoreState(c),a=c.lineNumber===h.lineNumber&&h.type===4&&h.value==="function"}return a},d.prototype.parseFunctionDeclaration=function(a){var c=this.createNode(),h=this.matchContextualKeyword("async");h&&this.nextToken(),this.expectKeyword("function");var g=h?!1:this.match("*");g&&this.nextToken();var x,v=null,E=null;if(!a||!this.match("(")){var C=this.lookahead;v=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(E=C,x=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(E=C,x=o.Messages.StrictReservedWord)}var A=this.context.await,O=this.context.allowYield;this.context.await=h,this.context.allowYield=!g;var P=this.parseFormalParameters(E),L=P.params,j=P.stricted;E=P.firstRestricted,P.message&&(x=P.message);var J=this.context.strict,X=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var ve=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,x),this.context.strict&&j&&this.tolerateUnexpectedToken(j,x),this.context.strict=J,this.context.allowStrictDirective=X,this.context.await=A,this.context.allowYield=O,h?this.finalize(c,new s.AsyncFunctionDeclaration(v,L,ve)):this.finalize(c,new s.FunctionDeclaration(v,L,ve,g))},d.prototype.parseFunctionExpression=function(){var a=this.createNode(),c=this.matchContextualKeyword("async");c&&this.nextToken(),this.expectKeyword("function");var h=c?!1:this.match("*");h&&this.nextToken();var g,x=null,v,E=this.context.await,C=this.context.allowYield;if(this.context.await=c,this.context.allowYield=!h,!this.match("(")){var A=this.lookahead;x=!this.context.strict&&!h&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(A.value)&&this.tolerateUnexpectedToken(A,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(A.value)?(v=A,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(A.value)&&(v=A,g=o.Messages.StrictReservedWord)}var O=this.parseFormalParameters(v),P=O.params,L=O.stricted;v=O.firstRestricted,O.message&&(g=O.message);var j=this.context.strict,J=this.context.allowStrictDirective;this.context.allowStrictDirective=O.simple;var X=this.parseFunctionSourceElements();return this.context.strict&&v&&this.throwUnexpectedToken(v,g),this.context.strict&&L&&this.tolerateUnexpectedToken(L,g),this.context.strict=j,this.context.allowStrictDirective=J,this.context.await=E,this.context.allowYield=C,c?this.finalize(a,new s.AsyncFunctionExpression(x,P,X)):this.finalize(a,new s.FunctionExpression(x,P,X,h))},d.prototype.parseDirective=function(){var a=this.lookahead,c=this.createNode(),h=this.parseExpression(),g=h.type===l.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(c,g?new s.Directive(h,g):new s.ExpressionStatement(h))},d.prototype.parseDirectivePrologues=function(){for(var a=null,c=[];;){var h=this.lookahead;if(h.type!==8)break;var g=this.parseDirective();c.push(g);var x=g.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(h,o.Messages.IllegalLanguageModeDirective)):!a&&h.octal&&(a=h)}return c},d.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},d.prototype.parseGetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseSetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseGeneratorMethod=function(){var a=this.createNode(),c=!0,h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.isStartOfExpression=function(){var a=!0,c=this.lookahead.value;switch(this.lookahead.type){case 7:a=c==="["||c==="("||c==="{"||c==="+"||c==="-"||c==="!"||c==="~"||c==="++"||c==="--"||c==="/"||c==="/=";break;case 4:a=c==="class"||c==="delete"||c==="function"||c==="let"||c==="new"||c==="super"||c==="this"||c==="typeof"||c==="void"||c==="yield";break;default:break}return a},d.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var c=null,h=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,h=this.match("*"),h?(this.nextToken(),c=this.parseAssignmentExpression()):this.isStartOfExpression()&&(c=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(c,h))},d.prototype.parseClassElement=function(a){var c=this.lookahead,h=this.createNode(),g="",x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),x=this.parseObjectPropertyKey();var P=x;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(c=this.lookahead,A=!0,E=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),c.type===3&&!this.hasLineTerminator&&c.value==="async"){var L=this.lookahead.value;L!==":"&&L!=="("&&L!=="*"&&(O=!0,c=this.lookahead,x=this.parseObjectPropertyKey(),c.type===3&&c.value==="constructor"&&this.tolerateUnexpectedToken(c,o.Messages.ConstructorIsAsync))}}var j=this.qualifiedPropertyName(this.lookahead);return c.type===3?c.value==="get"&&j?(g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod()):c.value==="set"&&j&&(g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod()):c.type===7&&c.value==="*"&&j&&(g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0),!g&&x&&this.match("(")&&(g="init",v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),E||(A&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(c,o.Messages.StaticPrototype),!A&&this.isPropertyKey(x,"constructor")&&((g!=="method"||!C||v&&v.generator)&&this.throwUnexpectedToken(c,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(c,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(h,new s.MethodDefinition(x,E,v,g,A))},d.prototype.parseClassElementList=function(){var a=[],c={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(c));return this.expect("}"),a},d.prototype.parseClassBody=function(){var a=this.createNode(),c=this.parseClassElementList();return this.finalize(a,new s.ClassBody(c))},d.prototype.parseClassDeclaration=function(a){var c=this.createNode(),h=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=h,this.finalize(c,new s.ClassDeclaration(g,x,v))},d.prototype.parseClassExpression=function(){var a=this.createNode(),c=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var h=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=c,this.finalize(a,new s.ClassExpression(h,g,x))},d.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Module(c))},d.prototype.parseScript=function(){for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Script(c))},d.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var c=this.nextToken(),h=this.getTokenRaw(c);return this.finalize(a,new s.Literal(c.value,h))},d.prototype.parseImportSpecifier=function(){var a=this.createNode(),c,h;return this.lookahead.type===3?(c=this.parseVariableIdentifier(),h=c,this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseVariableIdentifier())):(c=this.parseIdentifierName(),h=c,this.matchContextualKeyword("as")?(this.nextToken(),h=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(h,c))},d.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},d.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(c))},d.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var c=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(c))},d.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var c,h=[];if(this.lookahead.type===8)c=this.parseModuleSpecifier();else{if(this.match("{")?h=h.concat(this.parseNamedImports()):this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(h.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.match("{")?h=h.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),c=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(h,c))},d.prototype.parseExportSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName(),h=c;return this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(c,h))},d.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var c;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var h=this.parseFunctionDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchKeyword("class")){var h=this.parseClassDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchContextualKeyword("async")){var h=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var h=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),c=this.finalize(a,new s.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var h=void 0;switch(this.lookahead.value){case"let":case"const":h=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":h=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else if(this.matchAsyncFunction()){var h=this.parseFunctionDeclaration();c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else{var v=[],E=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),v.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();c=this.finalize(a,new s.ExportNamedDeclaration(null,v,E))}return c},d})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(u){Object.create&&Object.defineProperty&&(s=Object.create(u),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,u){var l="Line "+o+": "+u,m=this.constructError(l,s);return m.index=n,m.lineNumber=o,m.description=u,m},i.prototype.throwError=function(n,o,s,u){throw this.createError(n,o,s,u)},i.prototype.tolerateError=function(n,o,s,u){var l=this.createError(n,o,s,u);if(this.tolerant)this.recordError(l);else throw l},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function u(m){return"01234567".indexOf(m)}var l=(function(){function m(p,f){this.source=p,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.skipSingleLineComment=function(p){var f=[],d,a;for(this.trackComment&&(f=[],d=this.index-p,a={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var c=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(c)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var h={multiLine:!1,slice:[d+p,this.index-1],range:[d,this.index-1],loc:a};f.push(h)}return c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var h={multiLine:!1,slice:[d+p,this.index],range:[d,this.index],loc:a};f.push(h)}return f},m.prototype.skipMultiLineComment=function(){var p=[],f,d;for(this.trackComment&&(p=[],f=this.index-2,d={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:d};p.push(c)}return p}++this.index}else++this.index}if(this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:d};p.push(c)}return this.tolerateUnexpectedToken(),p},m.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var f=this.index===0;!this.eof();){var d=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(d))++this.index;else if(n.Character.isLineTerminator(d))++this.index,d===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(d===47)if(d=this.source.charCodeAt(this.index+1),d===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(a)),f=!0}else if(d===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(p=p.concat(a))}else break;else if(f&&d===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(a))}else break;else if(d===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(a))}else break;else break}return p},m.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},m.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},m.prototype.codePointAt=function(p){var f=this.source.charCodeAt(p);if(f>=55296&&f<=56319){var d=this.source.charCodeAt(p+1);if(d>=56320&&d<=57343){var a=f;f=(a-55296)*1024+d-56320+65536}}return f},m.prototype.scanHexEscape=function(p){for(var f=p==="u"?4:2,d=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))d=d*16+s(this.source[this.index++]);else return null;return String.fromCharCode(d)},m.prototype.scanUnicodeCodePointEscape=function(){var p=this.source[this.index],f=0;for(p==="}"&&this.throwUnexpectedToken();!this.eof()&&(p=this.source[this.index++],!!n.Character.isHexDigit(p.charCodeAt(0)));)f=f*16+s(p);return(f>1114111||p!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=p,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=p,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(p,this.index)},m.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),f=n.Character.fromCodePoint(p);this.index+=f.length;var d;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierStart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f=d);!this.eof()&&(p=this.codePointAt(this.index),!!n.Character.isIdentifierPart(p));)d=n.Character.fromCodePoint(p),f+=d,this.index+=d.length,p===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierPart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=d);return f},m.prototype.octalToDecimal=function(p){var f=p!=="0",d=u(p);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,d=d*8+u(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=d*8+u(this.source[this.index++]))),{code:d,octal:f}},m.prototype.scanIdentifier=function(){var p,f=this.index,d=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(d.length===1?p=3:this.isKeyword(d)?p=4:d==="null"?p=5:d==="true"||d==="false"?p=1:p=3,p!==3&&f+d.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:p,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var p=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanHexLiteral=function(p){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanBinaryLiteral=function(p){for(var f="",d;!this.eof()&&(d=this.source[this.index],!(d!=="0"&&d!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(d=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(d)||n.Character.isDecimalDigit(d))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanOctalLiteral=function(p,f){var d="",a=!1;for(n.Character.isOctalDigit(p.charCodeAt(0))?(a=!0,d="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return!a&&d.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(d,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p<this.length;++p){var f=this.source[p];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var p=this.index,f=this.source[p];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var d="";if(f!=="."){if(d=this.source[this.index++],f=this.source[this.index],d==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(p);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(p);if(f==="o"||f==="O")return this.scanOctalLiteral(f,p);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,p)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(d+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(d+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(d+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(d),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanStringLiteral=function(){var p=this.index,f=this.source[p];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var d=!1,a="";!this.eof();){var c=this.source[this.index++];if(c===f){f="";break}else if(c==="\\")if(c=this.source[this.index++],!c||!n.Character.isLineTerminator(c.charCodeAt(0)))switch(c){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var h=this.scanHexEscape(c);h===null&&this.throwUnexpectedToken(),a+=h}break;case"x":var g=this.scanHexEscape(c);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
136
+ `;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=c,this.tolerateUnexpectedToken();break;default:if(c&&n.Character.isOctalDigit(c.charCodeAt(0))){var x=this.octalToDecimal(c);d=x.octal||d,a+=String.fromCharCode(x.code)}else a+=c;break}else++this.lineNumber,c==="\r"&&this.source[this.index]===`
137
+ `&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(c.charCodeAt(0)))break;a+=c}}return f!==""&&(this.index=p,this.throwUnexpectedToken()),{type:8,value:a,octal:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanTemplate=function(){var p="",f=!1,d=this.index,a=this.source[d]==="`",c=!1,h=2;for(++this.index;!this.eof();){var g=this.source[this.index++];if(g==="`"){h=1,c=!0,f=!0;break}else if(g==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,f=!0;break}p+=g}else if(g==="\\")if(g=this.source[this.index++],n.Character.isLineTerminator(g.charCodeAt(0)))++this.lineNumber,g==="\r"&&this.source[this.index]===`
138
+ `&&++this.index,this.lineStart=this.index;else switch(g){case"n":p+=`
139
+ `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,v=this.scanHexEscape(g);v!==null?p+=v:(this.index=x,p+=g)}break;case"x":var E=this.scanHexEscape(g);E===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),p+=E;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:g==="0"?(n.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),p+="\0"):n.Character.isOctalDigit(g.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):p+=g;break}else n.Character.isLineTerminator(g.charCodeAt(0))?(++this.lineNumber,g==="\r"&&this.source[this.index]===`
140
+ `&&++this.index,this.lineStart=this.index,p+=`
141
+ `):p+=g}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(d+1,this.index-h),cooked:p,head:a,tail:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.testRegExp=function(p,f){var d="\uFFFF",a=p,c=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(h,g,x){var v=parseInt(g||x,16);return v>1114111&&c.throwUnexpectedToken(o.Messages.InvalidRegExp),v<=65535?String.fromCharCode(v):d}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(p,f)}catch{return null}},m.prototype.scanRegExpBody=function(){var p=this.source[this.index];i.assert(p==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],d=!1,a=!1;!this.eof();)if(p=this.source[this.index++],f+=p,p==="\\")p=this.source[this.index++],n.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=p;else if(n.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(d)p==="]"&&(d=!1);else if(p==="/"){a=!0;break}else p==="["&&(d=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},m.prototype.scanRegExpFlags=function(){for(var p="",f="";!this.eof();){var d=this.source[this.index];if(!n.Character.isIdentifierPart(d.charCodeAt(0)))break;if(++this.index,d==="\\"&&!this.eof())if(d=this.source[this.index],d==="u"){++this.index;var a=this.index,c=this.scanHexEscape("u");if(c!==null)for(f+=c,p+="\\u";a<this.index;++a)p+=this.source[a];else this.index=a,f+="u",p+="\\u";this.tolerateUnexpectedToken()}else p+="\\",this.tolerateUnexpectedToken();else f+=d,p+=d}return f},m.prototype.scanRegExp=function(){var p=this.index,f=this.scanRegExpBody(),d=this.scanRegExpFlags(),a=this.testRegExp(f,d);return{type:9,value:"",pattern:f,flags:d,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var p=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(p)?this.scanIdentifier():p===40||p===41||p===59?this.scanPunctuator():p===39||p===34?this.scanStringLiteral():p===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(p)?this.scanNumericLiteral():p===96||p===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():p>=55296&&p<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m})();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function l(){this.values=[],this.curly=this.paren=-1}return l.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},l.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],p=m!==null;switch(m){case"this":case"]":p=!1;break;case")":var f=this.values[this.paren-1];p=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var d=this.values[this.curly-4];p=d?!this.beforeFunctionExpression(d):!1}else if(this.values[this.curly-4]==="function"){var d=this.values[this.curly-5];p=d?!this.beforeFunctionExpression(d):!0}break;default:break}return p},l.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},l})(),u=(function(){function l(m,p){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new s}return l.prototype.errors=function(){return this.errorHandler.errors},l.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p<m.length;++p){var f=m[p],d=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:d};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var c=void 0;this.trackLoc&&(c={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var h=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),g=h?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(g);var x={type:o.TokenName[g.type],value:this.scanner.source.slice(g.start,g.end)};if(this.trackRange&&(x.range=[g.start,g.end]),this.trackLoc&&(c.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=c),g.type===9){var v=g.pattern,E=g.flags;x.regex={pattern:v,flags:E}}this.buffer.push(x)}}return this.buffer.shift()},l})();t.Tokenizer=u}])})});var gg=w(($B,Gs)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof Gs=="object"&&typeof Gs.exports=="object"&&typeof S=="function"?(e=mg(),t=function(n){Gs.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(x){return r.call(x)==="[object Function]"}function u(x){return r.call(x)==="[object String]"}function l(x){return r.call(x)==="[object Object]"}function m(x,v){return function(E){return x+E+v}}function p(x){return x!=="_parent"}function f(x){var v=x.split(":");if(v.length===0||v.length>2)throw new Error("illegal string config: "+x+`
142
+ Should be of format "before:after"`);return v.length===1||v[1].length===0?v.indexOf(":")<0?{_before:v[0]}:{_after:v[0]}:{_before:v[0],_after:v[1]}}function d(x){function v(C,A){if(C._parent){if(C._parent._default&&C._parent._default[A])return C._parent._default[A];var O=C._parent._parent;if(O)return O._default?O._default[A]:void 0}}function E(C){var A=x[C];if(A&&!s(A)){if(u(A)&&(x[C]=A=f(A)),A._parent=x,l(A)){if(!A._before&&!A._after)return d(A);A._before=A._before||v(A,"_before"),A._after=A._after||v(A,"_after");return}throw new Error("nodes need to be either {String}, {Object} or {Function}."+A+" is neither.")}}x._default&&E("_default"),Object.keys(x).filter(function(C){return p(C)&&x.hasOwnProperty(C)&&C!=="_before"&&C!=="_after"&&C!=="_default"}).forEach(E)}function a(x){Object.keys(x).filter(function(v){return p(v)&&x.hasOwnProperty(v)}).forEach(function(v){var E=x[v];if(!s(E)&&l(E)){if(!E._before&&!E._after)return a(E);var C=E._before||"",A=E._after||"";return x[v]=m(C,A),x[v]}})}function c(x){d(x),a(x)}function h(x,v){var E={};function C(A){E[A.range[0]]=A}return x.forEach(C),v.forEach(C),Object.keys(E).map(function(A){return E[A]})}function g(x,v,E){E=E||{};var C=E.parser||n,A=!!E.jsx,O=A||!!E.buildAst,P="",L,j,J,X=0,ve=[],Mt,Pr,tr;x[0]==="#"&&x[1]==="!"&&(P=x.substr(0,x.indexOf(`
147
143
  `)+1),x=Array.apply(0,Array(P.length)).join(" ")+`
148
- `+x.substr(P.length)),O?(L=C.parse(x,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),j=L.tokens,J=L.comments):(j=[],J=[],C.tokenize(x,{range:!0,loc:!0,comment:!0},function(se){se.type==="LineComment"?(se.type="Line",J.push(se)):se.type==="BlockComment"?(se.type="Block",J.push(se)):(se.type==="Identifier"&&se.value==="static"&&(se.type="Keyword"),j.push(se))})),c(v);function Go(se,Oe,rt){var We,it=Oe.range[0];for(We=rt;We<se.length;We++)if(se[We].range[0]===it)return We;throw new Error("Token %s not found at or after index: %d",Oe,rt)}function Vo(se){var Oe,rt,We,it=0,jt;return Oe=se(x.slice(Nr,sr),ir),l(Oe)?(we.push(Oe.replacement),rt=ir.tokenIndex,We=Go(ir.tokens,Oe.skipPastToken,rt),it=We-rt,jt=it>0?j[We-1].range[1]:sr):(we.push(Oe),jt=sr),{skip:it,splitEnd:jt}}function Si(se,Oe,rt,We){var it,jt=0;if(!(se>=Oe))return rt?(it=Vo(rt),jt=it.skip,Y=it.splitEnd):(we.push(x.slice(se,Oe)),Y=Oe),jt}Ir=h(j,J);for(var nr=0;nr<Ir.length;nr++){var Ct=Ir[nr],Dt=v[Ct.type],En,Nr,sr;Dt&&(En=Dt&&Dt.hasOwnProperty(Ct.value)&&Dt[Ct.value]&&s(Dt[Ct.value])?Dt[Ct.value]:Dt._default,Nr=Ct.range[0],sr=Ct.range[1],Si(Y,Nr),ir={tokenIndex:nr,tokens:Ir,ast:L,code:x},nr+=Si(Nr,sr,En,ir))}return Y<x.length&&Si(Y,x.length),E.nojoin||(Bt=we.join(""),P.length>0&&(Bt=P+Bt.substr(P.length))),{ast:L,tokens:j,comments:J,splits:we,code:Bt}}return o?o(g):g}})()});var Xs=w((zB,_g)=>{"use strict";y();var Dg={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},Ag={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Ru={},Mu={},tn={};Object.keys(Dg).forEach(function(e){var t=Ru[e]="\x1B["+Dg[e]+"m",r=Mu[e]="\x1B[39m";tn[e]=function(i){return t+i+r}});Object.keys(Ag).forEach(function(e){var t=Ru[e]="\x1B["+Ag[e]+"m",r=Mu[e]="\x1B[49m";tn[e]=function(i){return t+i+r}});_g.exports=tn;tn.open=Ru;tn.close=Mu});var Fg=w((JB,Sg)=>{y();var M=Xs();Sg.exports={Boolean:{true:void 0,false:void 0,_default:M.brightRed},Identifier:{undefined:M.brightBlack,self:M.brightRed,console:M.blue,log:M.blue,warn:M.red,error:M.brightRed,_default:M.white},Null:{_default:M.brightBlack},Numeric:{_default:M.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?M.green(e):M.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:M.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:M.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:M.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:M.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:M.red,static:void 0,super:void 0,switch:void 0,this:M.brightRed,throw:void 0,try:M.cyan,typeof:void 0,var:M.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:M.brightBlue},Punctuator:{";":M.brightBlack,".":M.green,",":M.green,"{":M.yellow,"}":M.yellow,"(":M.brightBlack,")":M.brightBlack,"[":M.yellow,"]":M.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:M.brightYellow},Line:{_default:M.brightBlack},Block:{_default:M.brightBlack},JSXAttribute:{_default:M.magenta},JSXClosingElement:{_default:M.magenta},JSXElement:{_default:M.magenta},JSXEmptyExpression:{_default:M.magenta},JSXExpressionContainer:{_default:M.magenta},JSXIdentifier:{className:M.blue,_default:M.magenta},JSXMemberExpression:{_default:M.magenta},JSXNamespacedName:{_default:M.magenta},JSXOpeningElement:{_default:M.magenta},JSXSpreadAttribute:{_default:M.magenta},JSXText:{_default:M.brightGreen},_default:void 0}});var Ks=w((VB,Tg)=>{"use strict";y();var H1=Cg(),U1=Fg(),z1=Xs(),W1=z1.brightBlack,J1="\x1B[39m";function G1(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function V1(e,t){var r=e.split(`
149
- `);G1(r);var i=r.length,n=[],o,s;function u(d){return d<10?1:d<100?2:d<1e3?3:d<1e4?4:5}function l(d,f){var p=f-u(d);switch(p){case 0:return""+d;case 1:return" "+d;case 2:return" "+d;case 3:return" "+d;case 4:return" "+d;case 5:return" "+d}}o=u(i+t-1);for(var m=0;m<i;m++)s=W1(l(m+t,o)+": ").replace(J1,""),n.push(s+r[m]);return n.join(`
150
- `)}Tg.exports=function(t,r){r=r||{};try{var i=H1(t,r.theme||U1,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?V1(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var kg=w((XB,Og)=>{"use strict";y();var Y1=S("fs"),X1=Ks();function K1(e){return toString.call(e)==="[object Function]"}Og.exports=function(t,r,i){K1(r)&&(i=r,r={}),r=r||{},Y1.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,X1(o,r))}catch(s){i(s)}})}});var Ig=w((QB,Pg)=>{"use strict";y();var Q1=S("fs"),Z1=Ks();Pg.exports=function(t,r){var i=Q1.readFileSync(t,"utf-8");return r=r||{},Z1(i,r)}});var Rg=w((ej,Ng)=>{"use strict";y();Ng.exports={highlight:Ks(),highlightFile:kg(),highlightFileSync:Ig()}});var Lg=w((rj,Mg)=>{y();var q=Xs();Mg.exports={Boolean:{true:void 0,false:void 0,_default:q.brightRed},Identifier:{undefined:q.brightBlack,self:q.brightRed,console:q.blue,log:q.blue,warn:q.red,error:q.brightRed,_default:q.white},Null:{_default:q.brightBlack},Numeric:{_default:q.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?q.brightBlue(e):q.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:q.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:q.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:q.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:q.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:q.red,static:void 0,super:void 0,switch:void 0,this:q.brightRed,throw:void 0,try:q.cyan,typeof:void 0,var:q.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:q.brightBlue},Punctuator:{";":q.brightBlack,".":q.green,",":q.green,"{":q.brightWhite,"}":q.brightWhite,"(":q.brightBlack,")":q.brightBlack,"[":q.brightWhite,"]":q.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:q.brightYellow},Line:{_default:q.brightBlack},Block:{_default:q.brightBlack},_default:void 0}});var Bg=w(Qs=>{"use strict";y();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.ExitError=void 0;var Lu=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};Qs.ExitError=Lu});var nn=w(T=>{"use strict";y();var eF=T&&T.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),tF=T&&T.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qu=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&eF(t,e,r);return tF(t,e),t},to=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(T,"__esModule",{value:!0});T.write=T.colorize=T.Table=T.ExitError=T.config=T.Config=T.ActionBase=T.warn=T.wait=T.url=T.tree=T.trace=T.table=T.styledObject=T.styledJSON=T.styledHeader=T.prompt=T.progress=T.logToStderr=T.log=T.info=T.flush=T.exit=T.error=T.done=T.debug=T.confirm=T.anykey=T.annotation=T.action=T.ux=void 0;var Bu=to(Je()),Zs=S("node:util"),rF=qu(Ye()),ju=Fs(),iF=Os(),$u=qu(Td()),eo=qu(Pu()),nF=to(vg()),jg=to(Ht()),sF=Eg(),rn=class{static config=ju.config;static get action(){return ju.config.action}static annotation(t,r){eh().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return $u.anykey}static get confirm(){return $u.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,Zs.format)(t,...r)+`
151
- `)}static async done(){ju.config.action.stop()}static async flush(t=1e4){await(0,iF.flush)(t)}static info(t,...r){jg.default.stdout((0,Zs.format)(t,...r)+`
152
- `)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){jg.default.stderr((0,Zs.format)(t,...r)+`
153
- `)}static get progress(){return eo.progress}static get prompt(){return $u.prompt}static styledHeader(t){this.info(Bu.default.dim("=== ")+Bu.default.bold(t)+`
154
- `)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Bu.default.level){this.info(r);return}let i=Rg(),n=Lg();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(eo.styledObject(t,r))}static get table(){return eo.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,Zs.format)(t,...r)+`
155
- `)}static get tree(){return eo.tree}static url(t,r,i={}){eh().stdout?this.log(sF(t,r,i)):this.log(r)}static get wait(){return nF.default}};T.ux=rn;var{action:oF,annotation:aF,anykey:uF,confirm:cF,debug:lF,done:hF,flush:fF,info:dF,log:pF,logToStderr:mF,progress:gF,prompt:yF,styledHeader:xF,styledJSON:vF,styledObject:wF,table:EF,trace:bF,tree:CF,url:DF,wait:AF}=rn;T.action=oF;T.annotation=aF;T.anykey=uF;T.confirm=cF;T.debug=lF;T.done=hF;T.flush=fF;T.info=dF;T.log=pF;T.logToStderr=mF;T.progress=gF;T.prompt=yF;T.styledHeader=xF;T.styledJSON=vF;T.styledObject=wF;T.table=EF;T.trace=bF;T.tree=CF;T.url=DF;T.wait=AF;var{error:_F,exit:SF,warn:FF}=rF;T.error=_F;T.exit=SF;T.warn=FF;var $g=async()=>{try{await rn.done()}catch(e){console.error(e),process.exitCode=1}},TF=process.listeners("exit").find(e=>e.name===$g.name);TF||process.once("exit",$g);var OF=As();Object.defineProperty(T,"ActionBase",{enumerable:!0,get:function(){return OF.ActionBase}});var qg=Fs();Object.defineProperty(T,"Config",{enumerable:!0,get:function(){return qg.Config}});Object.defineProperty(T,"config",{enumerable:!0,get:function(){return qg.config}});var kF=Bg();Object.defineProperty(T,"ExitError",{enumerable:!0,get:function(){return kF.ExitError}});var PF=Pu();Object.defineProperty(T,"Table",{enumerable:!0,get:function(){return PF.Table}});var IF=dr();Object.defineProperty(T,"colorize",{enumerable:!0,get:function(){return IF.colorize}});var NF=Ht();Object.defineProperty(T,"write",{enumerable:!0,get:function(){return to(NF).default}})});var Hg=w(hi=>{"use strict";y();Object.defineProperty(hi,"__esModule",{value:!0});hi.stderr=hi.stdout=void 0;var ro=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};hi.stdout=new ro("stdout");hi.stderr=new ro("stderr")});var fi=w(Fe=>{"use strict";y();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.Performance=Fe.OCLIF_MARKER_OWNER=void 0;var sn=S("node:perf_hooks"),RF=Ut();Fe.OCLIF_MARKER_OWNER="@oclif/core";var Hu=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,u]=n.split(".");this.module=s,this.method=u,this.scope=o,sn.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){sn.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,sn.performance.mark(this.stopMarker)}},Uu=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new sn.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},c=e._results.get(p.owner)??[];e._results.set(p.owner,[...c,a])}}let o=e._results.get(Fe.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),u=s?e.getResult(Fe.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,l=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let c=p.scope;f[c]||(f[c]={}),f[c].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":u,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Fe.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Fe.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Fe.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:l},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}sn.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=ot()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Fe.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Fe.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Fe.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[u,l]of Object.entries(s))t(` ${u}: ${l.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=ot()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let u of s)i(` ${u.name}: ${u.duration.toFixed(4)}ms`)}}}static get enabled(){return RF.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Hu(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Fe.OCLIF_MARKER_OWNER)):new Map}};Fe.Performance=Uu});var zg=w(di=>{"use strict";y();Object.defineProperty(di,"__esModule",{value:!0});di.getPlatform=di.getHomeDir=void 0;var Ug=S("node:os");function MF(){return(0,Ug.homedir)()}di.getHomeDir=MF;function LF(){return(0,Ug.platform)()}di.getPlatform=LF});var Wg=w(io=>{"use strict";y();Object.defineProperty(io,"__esModule",{value:!0});io.assertValidPattern=void 0;var BF=1024*64,jF=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>BF)throw new TypeError("pattern is too long")};io.assertValidPattern=jF});var Gg=w(no=>{"use strict";y();Object.defineProperty(no,"__esModule",{value:!0});no.parseClass=void 0;var $F={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},on=e=>e.replace(/[[\]\\-]/g,"\\$&"),qF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Jg=e=>e.join(""),HF=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,u=!1,l=!1,m=!1,d=r,f="";e:for(;o<e.length;){let h=e.charAt(o);if((h==="!"||h==="^")&&o===r+1){m=!0,o++;continue}if(h==="]"&&s&&!l){d=o+1;break}if(s=!0,h==="\\"&&!l){l=!0,o++;continue}if(h==="["&&!l){for(let[g,[x,v,E]]of Object.entries($F))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,E?n.push(x):i.push(x),u=u||v;continue e}}if(l=!1,f){h>f?i.push(on(f)+"-"+on(h)):h===f&&i.push(on(h)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(on(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=h,o+=2;continue}i.push(on(h)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let h=i[0].length===2?i[0].slice(-1):i[0];return[qF(h),!1,d-r,!1]}let p="["+(m?"^":"")+Jg(i)+"]",a="["+(m?"":"^")+Jg(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,u,d-r,!0]};no.parseClass=HF});var oo=w(so=>{"use strict";y();Object.defineProperty(so,"__esModule",{value:!0});so.unescape=void 0;var UF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");so.unescape=UF});var Ju=w(lo=>{"use strict";y();var Me;Object.defineProperty(lo,"__esModule",{value:!0});lo.AST=void 0;var zF=Gg(),ao=oo(),WF=new Set(["!","?","+","*","@"]),zu=e=>WF.has(e),Vg=e=>zu(e.type),JF=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),GF=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),VF=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Yg=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),YF="(?!(?:^|/)\\.\\.?(?:$|/))",uo="(?!\\.)",XF=new Set(["[","."]),KF=new Set(["..","."]),QF=new Set("().*{}+?[]^$\\!"),ZF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wu="[^/]",Xg=Wu+"*?",Kg=Wu+"+?",co=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Me&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof Me&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Me(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,u=!1,l=!1,m=-1,d=!1;if(r.type===null){let h=i,g="";for(;h<t.length;){let x=t.charAt(h++);if(u||x==="\\"){u=!u,g+=x;continue}if(l){h===m+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(h===m+2&&d)&&(l=!1),g+=x;continue}else if(x==="["){l=!0,m=h,d=!1,g+=x;continue}if(!n.noext&&zu(x)&&t.charAt(h)==="("&&o<=s){r.push(g),g="";let E=new Me(x,r);h=Me.#h(t,E,h,n,o+1),r.push(E);continue}g+=x}return r.push(g),h}let f=i+1,p=new Me(null,r),a=[],c="";for(;f<t.length;){let h=t.charAt(f++);if(u||h==="\\"){u=!u,c+=h;continue}if(l){f===m+1?(h==="^"||h==="!")&&(d=!0):h==="]"&&!(f===m+2&&d)&&(l=!1),c+=h;continue}else if(h==="["){l=!0,m=f,d=!1,c+=h;continue}if(zu(h)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(h))){let x=r&&r.#f(h)?0:1;p.push(c),c="";let v=new Me(h,p);p.push(v),f=Me.#h(t,v,f,n,o+x);continue}if(h==="|"){p.push(c),c="",a.push(p),p=new Me(null,r);continue}if(h===")")return c===""&&r.#e.length===0&&(r.#l=!0),p.push(c),c="",r.push(...a,p),f;c+=h}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#x(t){return this.#p(t,GF)}#p(t,r=JF){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=VF){return!!r.get(this.type)?.includes(t)}#v(t,r){let i=t.#e[0],n=new Me(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Yg.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Yg.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Vg(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#x(n)?(r=!1,this.#v(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new Me(null,void 0,r);return Me.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let u=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Vg(this)){let l=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[c,h,g,x]=typeof a=="string"?Me.#C(a,this.#i,l):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||x,c}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&KF.has(this.#e[0]))){let c=XF,h=r&&c.has(m.charAt(0))||m.startsWith("\\.")&&c.has(m.charAt(2))||m.startsWith("\\.\\.")&&c.has(m.charAt(4)),g=!r&&!t&&c.has(m.charAt(0));d=h?YF:g?uo:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+m+f,(0,ao.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let l=this.toString(),m=this;return m.#e=[l],m.type=null,m.#i=void 0,[l,(0,ao.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!uo?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!r?uo:"")+Kg;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?uo:"")+Xg+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=n+o+l}return[u,(0,ao.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#C(t,r,i=!1){let n=!1,o="",s=!1,u=!1;for(let l=0;l<t.length;l++){let m=t.charAt(l);if(n){n=!1,o+=(QF.has(m)?"\\":"")+m,u=!1;continue}if(m==="\\"){l===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[d,f,p,a]=(0,zF.parseClass)(t,l);if(p){o+=d,s=s||f,l+=p-1,r=r||a,u=!1;continue}}if(m==="*"){if(u)continue;u=!0,o+=i&&/^[*]+$/.test(t)?Kg:Xg,r=!0;continue}else u=!1;if(m==="?"){o+=Wu,r=!0;continue}o+=ZF(m)}return[o,(0,ao.unescape)(t),!!r,s]}};lo.AST=co;Me=co});var Gu=w(ho=>{"use strict";y();Object.defineProperty(ho,"__esModule",{value:!0});ho.escape=void 0;var eT=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");ho.escape=eT});var n0=w(k=>{"use strict";y();var tT=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var rT=tT(Hv()),fo=Wg(),e0=Ju(),iT=Gu(),nT=oo(),sT=(e,t,r={})=>((0,fo.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Ar(t,r).match(e));k.minimatch=sT;var oT=/^\*+([^+@!?\*\[\(]*)$/,aT=e=>t=>!t.startsWith(".")&&t.endsWith(e),uT=e=>t=>t.endsWith(e),cT=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),lT=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),hT=/^\*+\.\*+$/,fT=e=>!e.startsWith(".")&&e.includes("."),dT=e=>e!=="."&&e!==".."&&e.includes("."),pT=/^\.\*+$/,mT=e=>e!=="."&&e!==".."&&e.startsWith("."),gT=/^\*+$/,yT=e=>e.length!==0&&!e.startsWith("."),xT=e=>e.length!==0&&e!=="."&&e!=="..",vT=/^\?+([^+@!?\*\[\(]*)?$/,wT=([e,t=""])=>{let r=t0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},ET=([e,t=""])=>{let r=r0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},bT=([e,t=""])=>{let r=r0([e]);return t?i=>r(i)&&i.endsWith(t):r},CT=([e,t=""])=>{let r=t0([e]);return t?i=>r(i)&&i.endsWith(t):r},t0=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},r0=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},i0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Qg={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=i0==="win32"?Qg.win32.sep:Qg.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var DT="[^/]",AT=DT+"*?",_T="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ST="(?:(?!(?:\\/|^)\\.).)*?",FT=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=FT;k.minimatch.filter=k.filter;var Xe=(e,t={})=>Object.assign({},e,t),TT=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,Xe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,Xe(e,o))}static defaults(n){return t.defaults(Xe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,Xe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,Xe(e,o))}},unescape:(i,n={})=>t.unescape(i,Xe(e,n)),escape:(i,n={})=>t.escape(i,Xe(e,n)),filter:(i,n={})=>t.filter(i,Xe(e,n)),defaults:i=>t.defaults(Xe(e,i)),makeRe:(i,n={})=>t.makeRe(i,Xe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,Xe(e,n)),match:(i,n,o={})=>t.match(i,n,Xe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=TT;k.minimatch.defaults=k.defaults;var OT=(e,t={})=>((0,fo.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,rT.default)(e));k.braceExpand=OT;k.minimatch.braceExpand=k.braceExpand;var kT=(e,t={})=>new Ar(e,t).makeRe();k.makeRe=kT;k.minimatch.makeRe=k.makeRe;var PT=(e,t,r={})=>{let i=new Ar(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=PT;k.minimatch.match=k.match;var Zg=/[?*]|[+@!]\(.*?\)|\[|\]/,IT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ar=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,fo.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||i0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!Zg.test(o[2]))&&!Zg.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(m)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let u=i[n+1],l=i[n+2],m=i[n+3];if(u!==".."||!l||l==="."||l===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let u=i[s];s===1&&u===""&&i[0]===""||(u==="."||u==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let l=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...l),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],u="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(u==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="a")return!1;u="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:u?0:void 0,p=d?3:m?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,c]=[t[f],r[p]];a.toLowerCase()===c.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),u=r.lastIndexOf(k.GLOBSTAR),[l,m,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,u),r.slice(u+1)];if(l.length){let v=t.slice(n,n+l.length);if(!this.#n(v,l,i,0,0))return!1;n+=l.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let v=t.length-d.length;if(this.#n(t,d,i,v,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(v--,!this.#n(t,d,i,v,0)))return!1;f=d.length+1}}if(!m.length){let v=!!f;for(let E=n;E<t.length-f;E++){let C=String(t[E]);if(v=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||v}let p=[[[],0]],a=p[0],c=0,h=[0];for(let v of m)v===k.GLOBSTAR?(h.push(c),a=[[],0],p.push(a)):(a[0].push(v),c++);let g=p.length-1,x=t.length-f;for(let v of p)v[1]=x-(h[g--]+v[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,u){let l=r[n];if(!l){for(let f=i;f<t.length;f++){u=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return u}let[m,d]=l;for(;i<=d;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,u);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,u,l,m;for(s=n,u=o,m=t.length,l=r.length;s<m&&u<l;s++,u++){this.debug("matchOne loop");let d=r[u],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===m&&u===l)return!0;if(s===m)return i;if(u===l)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,fo.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(gT))?n=r.dot?xT:yT:(i=t.match(oT))?n=(r.nocase?r.dot?lT:cT:r.dot?uT:aT)(i[1]):(i=t.match(vT))?n=(r.nocase?r.dot?ET:wT:r.dot?bT:CT)(i):(i=t.match(hT))?n=r.dot?dT:fT:(i=t.match(pT))&&(n=mT);let o=e0.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?AT:r.dot?_T:ST,n=new Set(r.nocase?["i"]:[]),o=t.map(l=>{let m=l.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?IT(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return m.forEach((d,f)=>{let p=m[f+1],a=m[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+p:m[f]=i:p===void 0?m[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,m[f+1]=k.GLOBSTAR))}),m.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let u=n.length-2;!s&&u>=0;u--)s=n[u];for(let u=0;u<o.length;u++){let l=o[u],m=n;if(i.matchBase&&l.length===1&&(m=[s]),this.matchOne(m,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=Ar;var NT=Ju();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return NT.AST}});var RT=Gu();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return RT.escape}});var MT=oo();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return MT.unescape}});k.minimatch.AST=e0.AST;k.minimatch.Minimatch=Ar;k.minimatch.escape=iT.escape;k.minimatch.unescape=nT.unescape});var o0=w((Fj,s0)=>{"use strict";y();s0.exports=(...e)=>[...new Set([].concat(...e))]});var u0=w(_r=>{"use strict";y();var{promisify:LT}=S("util"),a0=S("fs");async function Vu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await LT(a0[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Yu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return a0[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}_r.isFile=Vu.bind(null,"stat","isFile");_r.isDirectory=Vu.bind(null,"stat","isDirectory");_r.isSymlink=Vu.bind(null,"lstat","isSymbolicLink");_r.isFileSync=Yu.bind(null,"statSync","isFile");_r.isDirectorySync=Yu.bind(null,"statSync","isDirectory");_r.isSymlinkSync=Yu.bind(null,"lstatSync","isSymbolicLink")});var d0=w((Pj,Xu)=>{"use strict";y();var Sr=S("path"),c0=u0(),l0=e=>e.length>1?`{${e.join(",")}}`:e[0],h0=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return Sr.isAbsolute(r)?r:Sr.join(t,r)},BT=(e,t)=>Sr.extname(e)?`**/${e}`:`**/${e}.${l0(t)}`,f0=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>Sr.posix.join(e,BT(r,t.extensions))):t.files?t.files.map(r=>Sr.posix.join(e,`**/${r}`)):t.extensions?[Sr.posix.join(e,`**/*.${l0(t.extensions)}`)]:[Sr.posix.join(e,"**")]};Xu.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await c0.isDirectory(h0(i,t.cwd))?f0(i,t):i));return[].concat.apply([],r)};Xu.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>c0.isDirectorySync(h0(i,t.cwd))?f0(i,t):i);return[].concat.apply([],r)}});var b0=w((Nj,E0)=>{y();function p0(e){return Array.isArray(e)?e:[e]}var Zu="",m0=" ",Ku="\\",jT=/^\s+$/,$T=/(?:[^\\]|^)\\$/,qT=/^\\!/,HT=/^\\#/,UT=/\r?\n/g,zT=/^\.*\/|^\.+$/,Qu="/",x0="node-ignore";typeof Symbol<"u"&&(x0=Symbol.for("node-ignore"));var g0=x0,WT=(e,t,r)=>Object.defineProperty(e,t,{value:r}),JT=/([0-z])-([0-z])/g,v0=()=>!1,GT=e=>e.replace(JT,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Zu),VT=e=>{let{length:t}=e;return e.slice(0,t-t%2)},YT=[[/^\uFEFF/,()=>Zu],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?m0:Zu)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+m0}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Ku],[/\\\\/g,()=>Ku],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Ku?`\\[${r}${VT(i)}${n}`:n==="]"&&i.length%2===0?`[${GT(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],y0=Object.create(null),XT=(e,t)=>{let r=y0[e];return r||(r=YT.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),y0[e]=r),t?new RegExp(r,"i"):new RegExp(r)},rc=e=>typeof e=="string",KT=e=>e&&rc(e)&&!jT.test(e)&&!$T.test(e)&&e.indexOf("#")!==0,QT=e=>e.split(UT),ec=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},ZT=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(qT,"!").replace(HT,"#");let n=XT(e,t);return new ec(r,e,i,n)},eO=(e,t)=>{throw new t(e)},Ot=(e,t,r)=>rc(e)?e?Ot.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),w0=e=>zT.test(e);Ot.isNotRelative=w0;Ot.convert=e=>e;var tc=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){WT(this,g0,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[g0]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(KT(t)){let r=ZT(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,p0(rc(t)?QT(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Ot.convert(t);return Ot(o,t,this._allowRelativePaths?v0:eO),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Qu)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Qu)+Qu,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return p0(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},po=e=>new tc(e),tO=e=>Ot(e&&Ot.convert(e),e,v0);po.isPathValid=tO;po.default=po;E0.exports=po;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Ot.convert=e;let t=/^[a-z]:\//i;Ot.isNotRelative=r=>t.test(r)||w0(r)}});var D0=w((Mj,C0)=>{"use strict";y();C0.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var k0=w((Bj,ic)=>{"use strict";y();var{promisify:rO}=S("util"),A0=S("fs"),kt=S("path"),_0=Ol(),iO=b0(),an=D0(),S0=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],nO=rO(A0.readFile),sO=e=>t=>t.startsWith("!")?"!"+kt.posix.join(e,t.slice(1)):kt.posix.join(e,t),oO=(e,t)=>{let r=an(kt.relative(t.cwd,kt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(sO(r))},F0=e=>{let t=iO();for(let r of e)t.add(oO(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},aO=(e,t)=>{if(e=an(e),kt.isAbsolute(t)){if(an(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return kt.join(e,t)},T0=(e,t)=>r=>e.ignores(an(kt.relative(t,aO(t,r.path||r)))),uO=async(e,t)=>{let r=kt.join(t,e),i=await nO(r,"utf8");return{cwd:t,filePath:r,content:i}},cO=(e,t)=>{let r=kt.join(t,e),i=A0.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},O0=({ignore:e=[],cwd:t=an(process.cwd())}={})=>({ignore:e,cwd:t});ic.exports=async e=>{e=O0(e);let t=await _0("**/.gitignore",{ignore:S0.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>uO(n,e.cwd))),i=F0(r);return T0(i,e.cwd)};ic.exports.sync=e=>{e=O0(e);let r=_0.sync("**/.gitignore",{ignore:S0.concat(e.ignore),cwd:e.cwd}).map(n=>cO(n,e.cwd)),i=F0(r);return T0(i,e.cwd)}});var I0=w(($j,P0)=>{"use strict";y();var{Transform:lO}=S("stream"),mo=class extends lO{constructor(){super({objectMode:!0})}},nc=class extends mo{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},sc=class extends mo{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};P0.exports={FilterStream:nc,UniqueStream:sc}});var B0=w((Hj,Fr)=>{"use strict";y();var R0=S("fs"),go=o0(),hO=kv(),yo=Ol(),xo=d0(),oc=k0(),{FilterStream:fO,UniqueStream:dO}=I0(),M0=()=>!1,N0=e=>e[0]==="!",pO=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},mO=(e={})=>{if(!e.cwd)return;let t;try{t=R0.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},gO=e=>e.stats instanceof R0.Stats?e.path:e,vo=(e,t)=>{e=go([].concat(e)),pO(e),mO(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(N0(n))continue;let o=e.slice(i).filter(u=>N0(u)).map(u=>u.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},yO=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ac=(e,t)=>e.options.expandDirectories?yO(e,t):[e.pattern],L0=e=>e&&e.gitignore?oc.sync({cwd:e.cwd,ignore:e.ignore}):M0,uc=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=xo.sync(r.ignore)),{pattern:t,options:r}};Fr.exports=async(e,t)=>{let r=vo(e,t),i=async()=>t&&t.gitignore?oc({cwd:t.cwd,ignore:t.ignore}):M0,n=async()=>{let l=await Promise.all(r.map(async m=>{let d=await ac(m,xo);return Promise.all(d.map(uc(m)))}));return go(...l)},[o,s]=await Promise.all([i(),n()]),u=await Promise.all(s.map(l=>yo(l.pattern,l.options)));return go(...u).filter(l=>!o(gO(l)))};Fr.exports.sync=(e,t)=>{let r=vo(e,t),i=[];for(let s of r){let u=ac(s,xo.sync).map(uc(s));i.push(...u)}let n=L0(t),o=[];for(let s of i)o=go(o,yo.sync(s.pattern,s.options));return o.filter(s=>!n(s))};Fr.exports.stream=(e,t)=>{let r=vo(e,t),i=[];for(let u of r){let l=ac(u,xo.sync).map(uc(u));i.push(...l)}let n=L0(t),o=new fO(u=>!n(u)),s=new dO;return hO(i.map(u=>yo.stream(u.pattern,u.options))).pipe(o).pipe(s)};Fr.exports.generateGlobTasks=vo;Fr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>yo.isDynamicPattern(r,t));Fr.exports.gitignore=oc});var cc=w(wo=>{"use strict";y();Object.defineProperty(wo,"__esModule",{value:!0});wo.aggregateFlags=void 0;var xO=Js(),vO=(0,xO.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function wO(e,t,r){let i={...t,...e};return r?{json:vO,...i}:i}wo.aggregateFlags=wO});var q0=w(Eo=>{"use strict";y();Object.defineProperty(Eo,"__esModule",{value:!0});Eo.cacheCommand=void 0;var EO=cc(),j0=qa(),bO=ys(),CO=le();function $0(e,t){let r=Object.getPrototypeOf(t),i=(0,CO.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?$0({...i,...e},r):e}async function DO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,j0.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function AO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,j0.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function _O(e,t,r=!1){let i=$0(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,u]=await Promise.all([await DO((0,EO.aggregateFlags)(n,o,i.enableJsonFlag),r),await AO((0,bO.ensureArgObject)(i.args),r)]),l={aliases:i.aliases??[],args:u,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(l),...m]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...l,...p}}Eo.cacheCommand=_O});var U0=w(pi=>{"use strict";y();var SO=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});pi.findRoot=void 0;var FO=SO(ot()),Le=S("node:path"),bo=_t(),ze=(0,FO.default)("find-root");function*lc(e){for(;(0,Le.dirname)(e)!==e;)yield e,e=(0,Le.dirname)(e);yield e}async function H0(e,t){if(ze.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of lc(e))if(r.endsWith((0,Le.basename)(t)))return ze.extend(t)("Found root based on plugin name!"),r}for(let r of lc(e))if(!((0,Le.basename)((0,Le.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Le.basename)(r))))try{let i=(0,Le.join)(r,"package.json");if(ze.extend(t??"root-plugin")(`Checking ${i}`),await(0,bo.safeReadJson)(i))return ze.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Le.dirname)(i)}catch{}}async function TO(e,t){ze.extend(e??"root-plugin")("Finding root using legacy method");for(let r of lc(t)){let i;if(e){if(i=(0,Le.join)(r,"node_modules",e,"package.json"),await(0,bo.safeReadJson)(i))return(0,Le.dirname)(i);if((await(0,bo.safeReadJson)((0,Le.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Le.join)(r,"package.json"),await(0,bo.safeReadJson)(i))return(0,Le.dirname)(i)}}var Xt;function OO(e){if(Xt)return Xt;try{return Xt=S(S.resolve("pnpapi",{paths:[e]})),Xt}catch{}}var hc=e=>JSON.stringify(e),kO=(e,t,r)=>hc(e?.packageDependencies.get(r))===hc(t?.packageDependencies.get(r));function PO(e,t){if(OO(t),!Xt)return;ze.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=hc(n);if(r.has(s))return;let u=Xt.getPackageInformation(n);if(n.name===e)return u.packageLocation;r.add(s);for(let[l,m]of u.packageDependencies){if(m===null||o!==null&&kO(u,o,l))continue;let d=Xt.getLocator(l,m),f=i(d,u);if(f)return f}r.delete(s)};for(let n of Xt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function IO(e,t){if(e){ze.extend(e)(`Finding root using ${t}`);let i;try{i=S.resolve(e,{paths:[t]}),ze.extend(e)("Found starting point with require.resolve")}catch{ze.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await H0((0,Le.dirname)(i),e);if(o)return ze.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?PO(e,t):await TO(e,t);return ze.extend(e)(n?`Found root at ${n}`:"No root found!"),n}ze.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await H0(t);return ze.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}pi.findRoot=IO});var mc=w(yi=>{"use strict";y();var X0=yi&&yi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yi,"__esModule",{value:!0});yi.Plugin=void 0;var NO=X0(B0()),gi=S("node:path"),z0=S("node:util"),RO=X0(st()),un=Ye(),Co=ji(),mi=fi(),K0=ps(),MO=q0(),LO=U0(),W0=_t(),J0=le(),fc=Vr(),Do=Gr(),G0=RO.default.getInstance().get("@oclif/core");function dc(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>dc(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...dc(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var BO=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),V0=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Y0=e=>{if(e&&typeof e.run=="function")return e},Q0=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function jO(e){return e.map(t=>{let r=(0,gi.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?K0.SINGLE_COMMAND_CLI_SYMBOL:o})}function $O(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:Q0,strategy:"pattern",target:e};if(!e.target)throw new un.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new un.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function qO(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var pc=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${G0.name}@${G0.version}`;_debug=(0,Do.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return dc(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let u,l,m;try{({filePath:m,isESM:l,module:u}=BO(this.manifest,t)?await(0,Co.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Co.loadWithData)(this,(0,gi.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(l?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=V0(u);return d?(d.id=t,d.plugin=this,d.isESM=l,d.relativePath=(0,gi.relative)(this.root,m||"").split(gi.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),u=Y0(s?.[t]);return u?(u.id=t,u.plugin=this,u):void 0}})();return!o&&r.must&&(0,un.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,LO.findRoot)(this.options.name,this.options.root);if(!t)throw new un.CLIError(`could not find package.json with ${(0,z0.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,W0.readJson)((0,gi.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new un.CLIError(`no name in package.json (${t})`);this._debug=(0,Do.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,J0.castArray)(i).map(n=>qO(n))])),this.commandDiscoveryOpts=$O(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(u=!1)=>{try{let l=(0,gi.join)(this.root,`${u?".":""}oclif.manifest.json`),m=await(0,W0.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
156
- This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,m}catch(l){if(l.code==="ENOENT"){if(!u)return n(!0)}else this.warn(l,"readManifest")}},o=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let u=await n();if(u)return o?.addDetails({commandCount:Object.keys(u.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(u.commands),u}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async u=>{try{let l=await this.findCommand(u,{must:!0}),m=await(0,MO.cacheCommand)(l,this,i);if(m.id=u,this.flexibleTaxonomy){let d=(0,Do.getCommandIdPermutations)(u),f=m.aliases.flatMap(p=>(0,Do.getCommandIdPermutations)(p));return[u,{...m,aliasPermutations:f,permutations:d}]}return[u,m]}catch(l){let m=`findCommand (${u})`;if(!r)this.warn(l,m);else throw this.addErrorScope(l,m)}}))).filter(u=>!!u).reduce((u,[l,m])=>(u[l]=m,u),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,z0.inspect)(t).trim(),t.detail=(0,J0.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
157
- `),t}async getCommandIDs(){let t=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,NO.default)(this.commandDiscoveryOpts?.globPatterns??Q0,{cwd:t});return jO(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Y0(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,fc.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,fc.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Co.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,fc.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Co.load)(this,t);return this.commandCache={[K0.SINGLE_COMMAND_CLI_SYMBOL]:V0(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};yi.Plugin=pc});var ty=w(Pt=>{"use strict";y();var HO=Pt&&Pt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),UO=Pt&&Pt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zO=Pt&&Pt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&HO(t,e,r);return UO(t,e),t};Object.defineProperty(Pt,"__esModule",{value:!0});var WO=n0(),gc=S("node:path"),xi=fi(),yc=_t(),JO=le(),Z0=zO(mc()),GO=Gr(),ey=(0,GO.Debug)();function Tr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,WO.minimatch)(r,i)))}var xc=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,"plugin.load#root");r=new Z0.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=Tr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,yc.readJson)((0,gc.join)(n,"package.json")),s=Tr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=Tr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,JO.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Tr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,yc.readJson)((0,gc.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},u=Tr(s??{},i);await this.loadPlugins(n,"dev",u)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Tr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);ey("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let u=typeof s=="string"?s:s.name,l={name:u,root:t,type:r};if(typeof s!="string"&&(l.tag=s.tag||l.tag,l.root=s.root||l.root,l.url=s.url),n&&(l.parent=n),this.plugins.has(u))return;let m=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`plugin.load#${u}`),d=new Z0.Plugin(l);if(await d.load(),m?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),m?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=Tr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(u){this.errors.push(u)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,gc.join)(t.dataDir,"package.json");ey("reading user plugins pjson %s",r);let i=await(0,yc.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Pt.default=xc});var uy=w((Ke,ay)=>{"use strict";y();var VO=Ke&&Ke.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),YO=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),XO=Ke&&Ke.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&VO(t,e,r);return YO(t,e),t},bc=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Config=void 0;var KO=XO(zl()),QO=bc(Iv()),vi=S("node:os"),It=S("node:path"),ry=S("node:url"),oy=bc(st()),ZO=nn(),ek=dr(),wi=Ye(),tk=Kr(),rk=ji(),Se=fi(),vc=Ut(),iy=_t(),ny=zg(),Ao=le(),ik=bc(ty()),nk=Vr(),ln=Gr(),cn=(0,ln.Debug)(),sy=oy.default.getInstance().get("@oclif/core"),wc=`${sy.name}@${sy.version}`,sk=new Set(["preparse"]);function ok(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function ak(e){return e&&!!e._base}var _o=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,ln.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},Ec=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=wc;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new _o;pluginLoader;rootPlugin;topicPermutations=new _o;constructor(t){this.options=t}static async load(t=ay.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,ry.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),ak(t)){if(wc!==t._base){cn(`reloading config from ${t._base} to ${wc}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Ao.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,vi.type)()} ${(0,vi.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,It.join)(this.home,t==="data"?".local/share":"."+t);return(0,It.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,wi.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,tk.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let u=Object.entries(s.flags).flatMap(([l,m])=>m.char?[m.char,l]:[l]);return i.every(l=>u.includes(l))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){vc.settings.performanceEnabled=(vc.settings.performanceEnabled===void 0?this.options.enablePerf:vc.settings.performanceEnabled)??!1;let t=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new ik.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=oy.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||ok(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,vi.arch)()==="ia32"?"x86":(0,vi.arch)(),this.platform=QO.default?"wsl":(0,ny.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,ny.getHomeDir)()||(0,vi.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,It.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),cn("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,It.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,It.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,iy.safeReadJson)(t):void 0,await(0,iy.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,ek.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,It.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);cn("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let l=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:l}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new wi.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let l=o.pluginName,m=this.pjson.oclif.jitPlugins[l],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:l,pluginVersion:m});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new wi.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let u=await s.run(r,this);if(o.id==="plugins:uninstall")for(let l of r)this.plugins.delete(l);return await this.runHook("postrun",{Command:s,argv:r,result:u}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),u}async runHook(t,r,i,n){let o=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,`config.runHook#${t}`);cn("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),u=async(f,p)=>{let a,c=new Promise((h,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,c]).then(h=>(clearTimeout(a),h))},l={failures:[],successes:[]},d=(sk.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=ot()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(h,g={}){(0,wi.error)(h,g)},exit(h=0){(0,wi.exit)(h)},log(h,...g){ZO.ux.info(h,...g)},warn(h){(0,wi.warn)(h)}},c=f.hooks[t]||[];for(let h of c){let g=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${h.target})`);try{let{filePath:x,isESM:v,module:E}=await(0,rk.loadWithData)(f,await(0,nk.tsPath)(f.root,h.target,f));p("start",v?"(import)":"(require)",x);let C=E[h.identifier]??(h.identifier==="default"?s(E):void 0);if(!C){p("No hook found for hook definition:",h);continue}let A=i?await u(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});l.successes.push({plugin:f,result:A}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(A),p("done")}catch(x){if(l.failures.push({error:x,plugin:f}),p(x),!n&&x.oclif?.exit!==void 0&&x.oclif?.exit!==0&&x.code!=="MODULE_NOT_FOUND")throw x}g?.addDetails({event:t,hook:h.target,plugin:f.name}),g?.stop()}});return await Promise.all(d),cn("%s hook done",t),o?.stop(),l}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return KO.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new ry.URL(r);return i.pathname=(0,It.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Ao.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
158
- `),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Ao.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
159
- `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,It.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=ot()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,vi.userInfo)().shell?.split(It.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",u=o.pluginAlias??"B-Cannot-Find-This",l=r.indexOf(s),m=r.indexOf(u);return n.pluginType==="core"&&o.pluginType==="core"?l-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,ln.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,u=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:u,id:s});let l=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,ln.getCommandIdPermutations)(s):i.permutations??[s];for(let m of l)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=Se.Performance.mark(Se.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Ao.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,ln.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ke.Config=Ec});var So=w(Kt=>{"use strict";y();Object.defineProperty(Kt,"__esModule",{value:!0});Kt.tsPath=Kt.Plugin=Kt.Config=void 0;var uk=uy();Object.defineProperty(Kt,"Config",{enumerable:!0,get:function(){return uk.Config}});var ck=mc();Object.defineProperty(Kt,"Plugin",{enumerable:!0,get:function(){return ck.Plugin}});var lk=Vr();Object.defineProperty(Kt,"tsPath",{enumerable:!0,get:function(){return lk.tsPath}})});var cy=w(Fo=>{"use strict";y();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.renderList=void 0;var hk=cr(),fk=le(),dk=Uv();function pk(e,t){return dk(e,hk.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function mk(e){if(e.length===0)return"";let t=(0,fk.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=pk(t+2,o),`${n} ${o}`):n}).join(`
160
- `)}Fo.renderList=mk});var Oc=w(te=>{"use strict";y();var ly=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0});te.FailedFlagValidationError=te.ArgInvalidOptionError=te.FlagInvalidOptionError=te.NonExistentFlagsError=te.UnexpectedArgsError=te.RequiredArgsError=te.InvalidArgsSpecError=te.CLIParseError=te.CLIError=void 0;var gk=ly(Je()),hn=ly(st()),hy=cy(),yk=Ye(),xk=le(),vk=Ye();Object.defineProperty(te,"CLIError",{enumerable:!0,get:function(){return vk.CLIError}});var wt=class extends yk.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
161
- See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};te.CLIParseError=wt;var Cc=class extends wt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,hy.renderList)(o.map(u=>[`${u.name} (${u.required?"required":"optional"})`,u.description]));n+=`:
162
- ${s}`}super({exit:hn.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};te.InvalidArgsSpecError=Cc;var Dc=class extends wt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(u=>u.name);if(s.length>0){let u=(0,hy.renderList)(s.map(l=>{let m=l.options?`(${l.options.join("|")}) ${l.description}`:l.description;return[l.name,m]}));o+=`:
144
+ `+x.substr(P.length)),O?(L=C.parse(x,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),j=L.tokens,J=L.comments):(j=[],J=[],C.tokenize(x,{range:!0,loc:!0,comment:!0},function(se){se.type==="LineComment"?(se.type="Line",J.push(se)):se.type==="BlockComment"?(se.type="Block",J.push(se)):(se.type==="Identifier"&&se.value==="static"&&(se.type="Keyword"),j.push(se))})),c(v);function zo(se,Te,et){var Ue,tt=Te.range[0];for(Ue=et;Ue<se.length;Ue++)if(se[Ue].range[0]===tt)return Ue;throw new Error("Token %s not found at or after index: %d",Te,et)}function Jo(se){var Te,et,Ue,tt=0,Lt;return Te=se(x.slice(Ir,ir),tr),l(Te)?(ve.push(Te.replacement),et=tr.tokenIndex,Ue=zo(tr.tokens,Te.skipPastToken,et),tt=Ue-et,Lt=tt>0?j[Ue-1].range[1]:ir):(ve.push(Te),Lt=ir),{skip:tt,splitEnd:Lt}}function Si(se,Te,et,Ue){var tt,Lt=0;if(!(se>=Te))return et?(tt=Jo(et),Lt=tt.skip,X=tt.splitEnd):(ve.push(x.slice(se,Te)),X=Te),Lt}Pr=h(j,J);for(var rr=0;rr<Pr.length;rr++){var Et=Pr[rr],bt=v[Et.type],bn,Ir,ir;bt&&(bn=bt&&bt.hasOwnProperty(Et.value)&&bt[Et.value]&&s(bt[Et.value])?bt[Et.value]:bt._default,Ir=Et.range[0],ir=Et.range[1],Si(X,Ir),tr={tokenIndex:rr,tokens:Pr,ast:L,code:x},rr+=Si(Ir,ir,bn,tr))}return X<x.length&&Si(X,x.length),E.nojoin||(Mt=ve.join(""),P.length>0&&(Mt=P+Mt.substr(P.length))),{ast:L,tokens:j,comments:J,splits:ve,code:Mt}}return o?o(g):g}})()});var Vs=w((UB,vg)=>{"use strict";y();var yg={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},xg={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},ku={},Pu={},tn={};Object.keys(yg).forEach(function(e){var t=ku[e]="\x1B["+yg[e]+"m",r=Pu[e]="\x1B[39m";tn[e]=function(i){return t+i+r}});Object.keys(xg).forEach(function(e){var t=ku[e]="\x1B["+xg[e]+"m",r=Pu[e]="\x1B[49m";tn[e]=function(i){return t+i+r}});vg.exports=tn;tn.open=ku;tn.close=Pu});var Eg=w((zB,wg)=>{y();var M=Vs();wg.exports={Boolean:{true:void 0,false:void 0,_default:M.brightRed},Identifier:{undefined:M.brightBlack,self:M.brightRed,console:M.blue,log:M.blue,warn:M.red,error:M.brightRed,_default:M.white},Null:{_default:M.brightBlack},Numeric:{_default:M.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?M.green(e):M.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:M.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:M.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:M.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:M.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:M.red,static:void 0,super:void 0,switch:void 0,this:M.brightRed,throw:void 0,try:M.cyan,typeof:void 0,var:M.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:M.brightBlue},Punctuator:{";":M.brightBlack,".":M.green,",":M.green,"{":M.yellow,"}":M.yellow,"(":M.brightBlack,")":M.brightBlack,"[":M.yellow,"]":M.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:M.brightYellow},Line:{_default:M.brightBlack},Block:{_default:M.brightBlack},JSXAttribute:{_default:M.magenta},JSXClosingElement:{_default:M.magenta},JSXElement:{_default:M.magenta},JSXEmptyExpression:{_default:M.magenta},JSXExpressionContainer:{_default:M.magenta},JSXIdentifier:{className:M.blue,_default:M.magenta},JSXMemberExpression:{_default:M.magenta},JSXNamespacedName:{_default:M.magenta},JSXOpeningElement:{_default:M.magenta},JSXSpreadAttribute:{_default:M.magenta},JSXText:{_default:M.brightGreen},_default:void 0}});var Xs=w((GB,bg)=>{"use strict";y();var F1=gg(),T1=Eg(),O1=Vs(),k1=O1.brightBlack,P1="\x1B[39m";function I1(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function N1(e,t){var r=e.split(`
145
+ `);I1(r);var i=r.length,n=[],o,s;function u(p){return p<10?1:p<100?2:p<1e3?3:p<1e4?4:5}function l(p,f){var d=f-u(p);switch(d){case 0:return""+p;case 1:return" "+p;case 2:return" "+p;case 3:return" "+p;case 4:return" "+p;case 5:return" "+p}}o=u(i+t-1);for(var m=0;m<i;m++)s=k1(l(m+t,o)+": ").replace(P1,""),n.push(s+r[m]);return n.join(`
146
+ `)}bg.exports=function(t,r){r=r||{};try{var i=F1(t,r.theme||T1,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?N1(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var Dg=w((XB,Cg)=>{"use strict";y();var R1=S("fs"),M1=Xs();function L1(e){return toString.call(e)==="[object Function]"}Cg.exports=function(t,r,i){L1(r)&&(i=r,r={}),r=r||{},R1.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,M1(o,r))}catch(s){i(s)}})}});var _g=w((KB,Ag)=>{"use strict";y();var B1=S("fs"),j1=Xs();Ag.exports=function(t,r){var i=B1.readFileSync(t,"utf-8");return r=r||{},j1(i,r)}});var Fg=w((ZB,Sg)=>{"use strict";y();Sg.exports={highlight:Xs(),highlightFile:Dg(),highlightFileSync:_g()}});var Og=w((tj,Tg)=>{y();var q=Vs();Tg.exports={Boolean:{true:void 0,false:void 0,_default:q.brightRed},Identifier:{undefined:q.brightBlack,self:q.brightRed,console:q.blue,log:q.blue,warn:q.red,error:q.brightRed,_default:q.white},Null:{_default:q.brightBlack},Numeric:{_default:q.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?q.brightBlue(e):q.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:q.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:q.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:q.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:q.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:q.red,static:void 0,super:void 0,switch:void 0,this:q.brightRed,throw:void 0,try:q.cyan,typeof:void 0,var:q.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:q.brightBlue},Punctuator:{";":q.brightBlack,".":q.green,",":q.green,"{":q.brightWhite,"}":q.brightWhite,"(":q.brightBlack,")":q.brightBlack,"[":q.brightWhite,"]":q.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:q.brightYellow},Line:{_default:q.brightBlack},Block:{_default:q.brightBlack},_default:void 0}});var kg=w(Ys=>{"use strict";y();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.ExitError=void 0;var Iu=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};Ys.ExitError=Iu});var nn=w(F=>{"use strict";y();var $1=F&&F.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),q1=F&&F.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lu=F&&F.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&$1(t,e,r);return q1(t,e),t},Zs=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(F,"__esModule",{value:!0});F.write=F.colorize=F.Table=F.ExitError=F.config=F.Config=F.ActionBase=F.warn=F.wait=F.url=F.tree=F.trace=F.table=F.styledObject=F.styledJSON=F.styledHeader=F.prompt=F.progress=F.logToStderr=F.log=F.info=F.flush=F.exit=F.error=F.done=F.debug=F.confirm=F.anykey=F.annotation=F.action=F.ux=void 0;var Nu=Zs(We()),Ks=S("node:util"),H1=Lu(Ge()),Ru=_s(),U1=Fs(),Mu=Lu(bp()),Qs=Lu(Fu()),W1=Zs(fg()),Pg=Zs($t()),z1=dg(),rn=class{static config=Ru.config;static get action(){return Ru.config.action}static annotation(t,r){Kl().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Mu.anykey}static get confirm(){return Mu.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,Ks.format)(t,...r)+`
147
+ `)}static async done(){Ru.config.action.stop()}static async flush(t=1e4){await(0,U1.flush)(t)}static info(t,...r){Pg.default.stdout((0,Ks.format)(t,...r)+`
148
+ `)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){Pg.default.stderr((0,Ks.format)(t,...r)+`
149
+ `)}static get progress(){return Qs.progress}static get prompt(){return Mu.prompt}static styledHeader(t){this.info(Nu.default.dim("=== ")+Nu.default.bold(t)+`
150
+ `)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Nu.default.level){this.info(r);return}let i=Fg(),n=Og();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(Qs.styledObject(t,r))}static get table(){return Qs.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,Ks.format)(t,...r)+`
151
+ `)}static get tree(){return Qs.tree}static url(t,r,i={}){Kl().stdout?this.log(z1(t,r,i)):this.log(r)}static get wait(){return W1.default}};F.ux=rn;var{action:J1,annotation:G1,anykey:V1,confirm:X1,debug:Y1,done:K1,flush:Q1,info:Z1,log:eF,logToStderr:tF,progress:rF,prompt:iF,styledHeader:nF,styledJSON:sF,styledObject:oF,table:aF,trace:uF,tree:cF,url:lF,wait:hF}=rn;F.action=J1;F.annotation=G1;F.anykey=V1;F.confirm=X1;F.debug=Y1;F.done=K1;F.flush=Q1;F.info=Z1;F.log=eF;F.logToStderr=tF;F.progress=rF;F.prompt=iF;F.styledHeader=nF;F.styledJSON=sF;F.styledObject=oF;F.table=aF;F.trace=uF;F.tree=cF;F.url=lF;F.wait=hF;var{error:fF,exit:pF,warn:dF}=H1;F.error=fF;F.exit=pF;F.warn=dF;var Ig=async()=>{try{await rn.done()}catch(e){console.error(e),process.exitCode=1}},mF=process.listeners("exit").find(e=>e.name===Ig.name);mF||process.once("exit",Ig);var gF=Cs();Object.defineProperty(F,"ActionBase",{enumerable:!0,get:function(){return gF.ActionBase}});var Ng=_s();Object.defineProperty(F,"Config",{enumerable:!0,get:function(){return Ng.Config}});Object.defineProperty(F,"config",{enumerable:!0,get:function(){return Ng.config}});var yF=kg();Object.defineProperty(F,"ExitError",{enumerable:!0,get:function(){return yF.ExitError}});var xF=Fu();Object.defineProperty(F,"Table",{enumerable:!0,get:function(){return xF.Table}});var vF=hr();Object.defineProperty(F,"colorize",{enumerable:!0,get:function(){return vF.colorize}});var wF=$t();Object.defineProperty(F,"write",{enumerable:!0,get:function(){return Zs(wF).default}})});var Rg=w(li=>{"use strict";y();Object.defineProperty(li,"__esModule",{value:!0});li.stderr=li.stdout=void 0;var eo=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};li.stdout=new eo("stdout");li.stderr=new eo("stderr")});var hi=w(Se=>{"use strict";y();Object.defineProperty(Se,"__esModule",{value:!0});Se.Performance=Se.OCLIF_MARKER_OWNER=void 0;var sn=S("node:perf_hooks"),EF=qt();Se.OCLIF_MARKER_OWNER="@oclif/core";var Bu=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,u]=n.split(".");this.module=s,this.method=u,this.scope=o,sn.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){sn.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,sn.performance.mark(this.stopMarker)}},ju=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new sn.PerformanceObserver(n=>{for(let f of n.getEntries()){let d=e.markers.get(f.name);if(d){let a={details:d.details,duration:f.duration,method:d.method,module:d.module,name:f.name,scope:d.scope},c=e._results.get(d.owner)??[];e._results.set(d.owner,[...c,a])}}let o=e._results.get(Se.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),u=s?e.getResult(Se.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,l=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,d)=>d.duration-f.duration).map(({details:f,duration:d,scope:a})=>[a,{details:f,duration:d}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,d)=>{let a=d.details.event;if(a)f[a]||(f[a]={}),f[a][d.scope]=d.duration;else{let c=d.scope;f[c]||(f[c]={}),f[c].total=d.duration}return f},{}),p=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,d)=>d.duration-f.duration).map(({duration:f,scope:d})=>[d,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":u,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Se.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":p.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":p.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":p.user??0,pluginLoadTimes:l},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}sn.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=ut()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[u,l]of Object.entries(s))t(` ${u}: ${l.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=ut()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let u of s)i(` ${u.name}: ${u.duration.toFixed(4)}ms`)}}}static get enabled(){return EF.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Bu(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Se.OCLIF_MARKER_OWNER)):new Map}};Se.Performance=ju});var Lg=w(fi=>{"use strict";y();Object.defineProperty(fi,"__esModule",{value:!0});fi.getPlatform=fi.getHomeDir=void 0;var Mg=S("node:os");function bF(){return(0,Mg.homedir)()}fi.getHomeDir=bF;function CF(){return(0,Mg.platform)()}fi.getPlatform=CF});var jg=w(Cr=>{"use strict";y();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.range=Cr.balanced=void 0;var DF=(e,t,r)=>{let i=e instanceof RegExp?Bg(e,r):e,n=t instanceof RegExp?Bg(t,r):t,o=i!==null&&n!=null&&(0,Cr.range)(i,n,r);return o&&{start:o[0],end:o[1],pre:r.slice(0,o[0]),body:r.slice(o[0]+i.length,o[1]),post:r.slice(o[1]+n.length)}};Cr.balanced=DF;var Bg=(e,t)=>{let r=t.match(e);return r?r[0]:null},AF=(e,t,r)=>{let i,n,o,s,u,l=r.indexOf(e),m=r.indexOf(t,l+1),p=l;if(l>=0&&m>0){if(e===t)return[l,m];for(i=[],o=r.length;p>=0&&!u;){if(p===l)i.push(p),l=r.indexOf(e,p+1);else if(i.length===1){let f=i.pop();f!==void 0&&(u=[f,m])}else n=i.pop(),n!==void 0&&n<o&&(o=n,s=m),m=r.indexOf(t,p+1);p=l<m&&l>=0?l:m}i.length&&s!==void 0&&(u=[o,s])}return u};Cr.range=AF});var Jg=w(pi=>{"use strict";y();Object.defineProperty(pi,"__esModule",{value:!0});pi.EXPANSION_MAX=void 0;pi.expand=BF;var $g=jg(),qg="\0SLASH"+Math.random()+"\0",Hg="\0OPEN"+Math.random()+"\0",qu="\0CLOSE"+Math.random()+"\0",Ug="\0COMMA"+Math.random()+"\0",Wg="\0PERIOD"+Math.random()+"\0",_F=new RegExp(qg,"g"),SF=new RegExp(Hg,"g"),FF=new RegExp(qu,"g"),TF=new RegExp(Ug,"g"),OF=new RegExp(Wg,"g"),kF=/\\\\/g,PF=/\\{/g,IF=/\\}/g,NF=/\\,/g,RF=/\\./g;pi.EXPANSION_MAX=1e5;function $u(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function MF(e){return e.replace(kF,qg).replace(PF,Hg).replace(IF,qu).replace(NF,Ug).replace(RF,Wg)}function LF(e){return e.replace(_F,"\\").replace(SF,"{").replace(FF,"}").replace(TF,",").replace(OF,".")}function zg(e){if(!e)return[""];let t=[],r=(0,$g.balanced)("{","}",e);if(!r)return e.split(",");let{pre:i,body:n,post:o}=r,s=i.split(",");s[s.length-1]+="{"+n+"}";let u=zg(o);return o.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function BF(e,t={}){if(!e)return[];let{max:r=pi.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),on(MF(e),r,!0).map(LF)}function jF(e){return"{"+e+"}"}function $F(e){return/^-?0\d/.test(e)}function qF(e,t){return e<=t}function HF(e,t){return e>=t}function on(e,t,r){let i=[],n=(0,$g.balanced)("{","}",e);if(!n)return[e];let o=n.pre,s=n.post.length?on(n.post,t,!1):[""];if(/\$$/.test(n.pre))for(let u=0;u<s.length&&u<t;u++){let l=o+"{"+n.body+"}"+s[u];i.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),m=u||l,p=n.body.indexOf(",")>=0;if(!m&&!p)return n.post.match(/,(?!,).*\}/)?(e=n.pre+"{"+n.body+qu+n.post,on(e,t,!0)):[e];let f;if(m)f=n.body.split(/\.\./);else if(f=zg(n.body),f.length===1&&f[0]!==void 0&&(f=on(f[0],t,!1).map(jF),f.length===1))return s.map(a=>n.pre+f[0]+a);let d;if(m&&f[0]!==void 0&&f[1]!==void 0){let a=$u(f[0]),c=$u(f[1]),h=Math.max(f[0].length,f[1].length),g=f.length===3&&f[2]!==void 0?Math.abs($u(f[2])):1,x=qF;c<a&&(g*=-1,x=HF);let E=f.some($F);d=[];for(let C=a;x(C,c);C+=g){let A;if(l)A=String.fromCharCode(C),A==="\\"&&(A="");else if(A=String(C),E){let O=h-A.length;if(O>0){let P=new Array(O+1).join("0");C<0?A="-"+P+A.slice(1):A=P+A}}d.push(A)}}else{d=[];for(let a=0;a<f.length;a++)d.push.apply(d,on(f[a],t,!1))}for(let a=0;a<d.length;a++)for(let c=0;c<s.length&&i.length<t;c++){let h=o+d[a]+s[c];(!r||m||h)&&i.push(h)}}return i}});var Gg=w(to=>{"use strict";y();Object.defineProperty(to,"__esModule",{value:!0});to.assertValidPattern=void 0;var UF=1024*64,WF=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>UF)throw new TypeError("pattern is too long")};to.assertValidPattern=WF});var Xg=w(ro=>{"use strict";y();Object.defineProperty(ro,"__esModule",{value:!0});ro.parseClass=void 0;var zF={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},an=e=>e.replace(/[[\]\\-]/g,"\\$&"),JF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vg=e=>e.join(""),GF=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,u=!1,l=!1,m=!1,p=r,f="";e:for(;o<e.length;){let h=e.charAt(o);if((h==="!"||h==="^")&&o===r+1){m=!0,o++;continue}if(h==="]"&&s&&!l){p=o+1;break}if(s=!0,h==="\\"&&!l){l=!0,o++;continue}if(h==="["&&!l){for(let[g,[x,v,E]]of Object.entries(zF))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,E?n.push(x):i.push(x),u=u||v;continue e}}if(l=!1,f){h>f?i.push(an(f)+"-"+an(h)):h===f&&i.push(an(h)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(an(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=h,o+=2;continue}i.push(an(h)),o++}if(p<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let h=i[0].length===2?i[0].slice(-1):i[0];return[JF(h),!1,p-r,!1]}let d="["+(m?"^":"")+Vg(i)+"]",a="["+(m?"":"^")+Vg(n)+"]";return[i.length&&n.length?"("+d+"|"+a+")":i.length?d:a,u,p-r,!0]};ro.parseClass=GF});var no=w(io=>{"use strict";y();Object.defineProperty(io,"__esModule",{value:!0});io.unescape=void 0;var VF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");io.unescape=VF});var Wu=w(uo=>{"use strict";y();var Ne;Object.defineProperty(uo,"__esModule",{value:!0});uo.AST=void 0;var XF=Xg(),so=no(),YF=new Set(["!","?","+","*","@"]),Hu=e=>YF.has(e),Yg=e=>Hu(e.type),KF=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),QF=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ZF=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Kg=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),eT="(?!(?:^|/)\\.\\.?(?:$|/))",oo="(?!\\.)",tT=new Set(["[","."]),rT=new Set(["..","."]),iT=new Set("().*{}+?[]^$\\!"),nT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Uu="[^/]",Qg=Uu+"*?",Zg=Uu+"+?",ao=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Ne&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof Ne&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Ne(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,u=!1,l=!1,m=-1,p=!1;if(r.type===null){let h=i,g="";for(;h<t.length;){let x=t.charAt(h++);if(u||x==="\\"){u=!u,g+=x;continue}if(l){h===m+1?(x==="^"||x==="!")&&(p=!0):x==="]"&&!(h===m+2&&p)&&(l=!1),g+=x;continue}else if(x==="["){l=!0,m=h,p=!1,g+=x;continue}if(!n.noext&&Hu(x)&&t.charAt(h)==="("&&o<=s){r.push(g),g="";let E=new Ne(x,r);h=Ne.#h(t,E,h,n,o+1),r.push(E);continue}g+=x}return r.push(g),h}let f=i+1,d=new Ne(null,r),a=[],c="";for(;f<t.length;){let h=t.charAt(f++);if(u||h==="\\"){u=!u,c+=h;continue}if(l){f===m+1?(h==="^"||h==="!")&&(p=!0):h==="]"&&!(f===m+2&&p)&&(l=!1),c+=h;continue}else if(h==="["){l=!0,m=f,p=!1,c+=h;continue}if(Hu(h)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(h))){let x=r&&r.#f(h)?0:1;d.push(c),c="";let v=new Ne(h,d);d.push(v),f=Ne.#h(t,v,f,n,o+x);continue}if(h==="|"){d.push(c),c="",a.push(d),d=new Ne(null,r);continue}if(h===")")return c===""&&r.#e.length===0&&(r.#l=!0),d.push(c),c="",r.push(...a,d),f;c+=h}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#x(t){return this.#d(t,QF)}#d(t,r=KF){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=ZF){return!!r.get(this.type)?.includes(t)}#v(t,r){let i=t.#e[0],n=new Ne(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Kg.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Kg.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#p(){if(Yg(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#p(),this.#d(n)?(r=!1,this.#m(n,i)):this.#x(n)?(r=!1,this.#v(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#p();this.#o=void 0}static fromGlob(t,r={}){let i=new Ne(null,void 0,r);return Ne.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let u=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#p(),this.#y()),!Yg(this)){let l=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[c,h,g,x]=typeof a=="string"?Ne.#C(a,this.#i,l):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||x,c}).join(""),p="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&rT.has(this.#e[0]))){let c=tT,h=r&&c.has(m.charAt(0))||m.startsWith("\\.")&&c.has(m.charAt(2))||m.startsWith("\\.\\.")&&c.has(m.charAt(4)),g=!r&&!t&&c.has(m.charAt(0));p=h?eT:g?oo:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[p+m+f,(0,so.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let l=this.toString(),m=this;return m.#e=[l],m.type=null,m.#i=void 0,[l,(0,so.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!oo?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!r?oo:"")+Zg;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?oo:"")+Qg+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=n+o+l}return[u,(0,so.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#C(t,r,i=!1){let n=!1,o="",s=!1,u=!1;for(let l=0;l<t.length;l++){let m=t.charAt(l);if(n){n=!1,o+=(iT.has(m)?"\\":"")+m,u=!1;continue}if(m==="\\"){l===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[p,f,d,a]=(0,XF.parseClass)(t,l);if(d){o+=p,s=s||f,l+=d-1,r=r||a,u=!1;continue}}if(m==="*"){if(u)continue;u=!0,o+=i&&/^[*]+$/.test(t)?Zg:Qg,r=!0;continue}else u=!1;if(m==="?"){o+=Uu,r=!0;continue}o+=nT(m)}return[o,(0,so.unescape)(t),!!r,s]}};uo.AST=ao;Ne=ao});var zu=w(co=>{"use strict";y();Object.defineProperty(co,"__esModule",{value:!0});co.escape=void 0;var sT=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");co.escape=sT});var o0=w(k=>{"use strict";y();Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var oT=Jg(),lo=Gg(),r0=Wu(),aT=zu(),uT=no(),cT=(e,t,r={})=>((0,lo.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Dr(t,r).match(e));k.minimatch=cT;var lT=/^\*+([^+@!?\*\[\(]*)$/,hT=e=>t=>!t.startsWith(".")&&t.endsWith(e),fT=e=>t=>t.endsWith(e),pT=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),dT=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),mT=/^\*+\.\*+$/,gT=e=>!e.startsWith(".")&&e.includes("."),yT=e=>e!=="."&&e!==".."&&e.includes("."),xT=/^\.\*+$/,vT=e=>e!=="."&&e!==".."&&e.startsWith("."),wT=/^\*+$/,ET=e=>e.length!==0&&!e.startsWith("."),bT=e=>e.length!==0&&e!=="."&&e!=="..",CT=/^\?+([^+@!?\*\[\(]*)?$/,DT=([e,t=""])=>{let r=i0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},AT=([e,t=""])=>{let r=n0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},_T=([e,t=""])=>{let r=n0([e]);return t?i=>r(i)&&i.endsWith(t):r},ST=([e,t=""])=>{let r=i0([e]);return t?i=>r(i)&&i.endsWith(t):r},i0=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},n0=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},s0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",e0={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=s0==="win32"?e0.win32.sep:e0.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var FT="[^/]",TT=FT+"*?",OT="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",kT="(?:(?!(?:\\/|^)\\.).)*?",PT=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=PT;k.minimatch.filter=k.filter;var Ve=(e,t={})=>Object.assign({},e,t),IT=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,Ve(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,Ve(e,o))}static defaults(n){return t.defaults(Ve(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,Ve(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,Ve(e,o))}},unescape:(i,n={})=>t.unescape(i,Ve(e,n)),escape:(i,n={})=>t.escape(i,Ve(e,n)),filter:(i,n={})=>t.filter(i,Ve(e,n)),defaults:i=>t.defaults(Ve(e,i)),makeRe:(i,n={})=>t.makeRe(i,Ve(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,Ve(e,n)),match:(i,n,o={})=>t.match(i,n,Ve(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=IT;k.minimatch.defaults=k.defaults;var NT=(e,t={})=>((0,lo.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,oT.expand)(e));k.braceExpand=NT;k.minimatch.braceExpand=k.braceExpand;var RT=(e,t={})=>new Dr(e,t).makeRe();k.makeRe=RT;k.minimatch.makeRe=k.makeRe;var MT=(e,t,r={})=>{let i=new Dr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=MT;k.minimatch.match=k.match;var t0=/[?*]|[+@!]\(.*?\)|\[|\]/,LT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Dr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,lo.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||s0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!t0.test(o[2]))&&!t0.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(p=>this.parse(p))];if(m)return[o[0],...o.slice(1).map(p=>this.parse(p))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let u=i[n+1],l=i[n+2],m=i[n+3];if(u!==".."||!l||l==="."||l===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let p=i.slice(0);p[n]="**",t.push(p),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let u=i[s];s===1&&u===""&&i[0]===""||(u==="."||u==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let l=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...l),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],u="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(u==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="a")return!1;u="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),p=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:u?0:void 0,d=p?3:m?0:void 0;if(typeof f=="number"&&typeof d=="number"){let[a,c]=[t[f],r[d]];a.toLowerCase()===c.toLowerCase()&&(r[d]=a,o=d,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),u=r.lastIndexOf(k.GLOBSTAR),[l,m,p]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,u),r.slice(u+1)];if(l.length){let v=t.slice(n,n+l.length);if(!this.#n(v,l,i,0,0))return!1;n+=l.length}let f=0;if(p.length){if(p.length+n>t.length)return!1;let v=t.length-p.length;if(this.#n(t,p,i,v,0))f=p.length;else{if(t[t.length-1]!==""||n+p.length===t.length||(v--,!this.#n(t,p,i,v,0)))return!1;f=p.length+1}}if(!m.length){let v=!!f;for(let E=n;E<t.length-f;E++){let C=String(t[E]);if(v=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||v}let d=[[[],0]],a=d[0],c=0,h=[0];for(let v of m)v===k.GLOBSTAR?(h.push(c),a=[[],0],d.push(a)):(a[0].push(v),c++);let g=d.length-1,x=t.length-f;for(let v of d)v[1]=x-(h[g--]+v[0].length);return!!this.#i(t,d,n,0,i,0,!!f)}#i(t,r,i,n,o,s,u){let l=r[n];if(!l){for(let f=i;f<t.length;f++){u=!0;let d=t[f];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return u}let[m,p]=l;for(;i<=p;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,u);if(a!==!1)return a}let d=t[i];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,u,l,m;for(s=n,u=o,m=t.length,l=r.length;s<m&&u<l;s++,u++){this.debug("matchOne loop");let p=r[u],f=t[s];if(this.debug(r,p,f),p===!1||p===k.GLOBSTAR)return!1;let d;if(typeof p=="string"?(d=f===p,this.debug("string match",p,f,d)):(d=p.test(f),this.debug("pattern match",p,f,d)),!d)return!1}if(s===m&&u===l)return!0;if(s===m)return i;if(u===l)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,lo.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(wT))?n=r.dot?bT:ET:(i=t.match(lT))?n=(r.nocase?r.dot?dT:pT:r.dot?fT:hT)(i[1]):(i=t.match(CT))?n=(r.nocase?r.dot?AT:DT:r.dot?_T:ST)(i):(i=t.match(mT))?n=r.dot?yT:gT:(i=t.match(xT))&&(n=vT);let o=r0.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?TT:r.dot?OT:kT,n=new Set(r.nocase?["i"]:[]),o=t.map(l=>{let m=l.map(p=>{if(p instanceof RegExp)for(let f of p.flags.split(""))n.add(f);return typeof p=="string"?LT(p):p===k.GLOBSTAR?k.GLOBSTAR:p._src});return m.forEach((p,f)=>{let d=m[f+1],a=m[f-1];p!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?d!==void 0&&d!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+d:m[f]=i:d===void 0?m[f-1]=a+"(?:\\/|"+i+")?":d!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+d,m[f+1]=k.GLOBSTAR))}),m.filter(p=>p!==k.GLOBSTAR).join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let u=n.length-2;!s&&u>=0;u--)s=n[u];for(let u=0;u<o.length;u++){let l=o[u],m=n;if(i.matchBase&&l.length===1&&(m=[s]),this.matchOne(m,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=Dr;var BT=Wu();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return BT.AST}});var jT=zu();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return jT.escape}});var $T=no();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return $T.unescape}});k.minimatch.AST=r0.AST;k.minimatch.Minimatch=Dr;k.minimatch.escape=aT.escape;k.minimatch.unescape=uT.unescape});var u0=w((kj,a0)=>{"use strict";y();a0.exports=(...e)=>[...new Set([].concat(...e))]});var l0=w(Ar=>{"use strict";y();var{promisify:qT}=S("util"),c0=S("fs");async function Ju(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await qT(c0[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Gu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return c0[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}Ar.isFile=Ju.bind(null,"stat","isFile");Ar.isDirectory=Ju.bind(null,"stat","isDirectory");Ar.isSymlink=Ju.bind(null,"lstat","isSymbolicLink");Ar.isFileSync=Gu.bind(null,"statSync","isFile");Ar.isDirectorySync=Gu.bind(null,"statSync","isDirectory");Ar.isSymlinkSync=Gu.bind(null,"lstatSync","isSymbolicLink")});var m0=w((Rj,Vu)=>{"use strict";y();var _r=S("path"),h0=l0(),f0=e=>e.length>1?`{${e.join(",")}}`:e[0],p0=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return _r.isAbsolute(r)?r:_r.join(t,r)},HT=(e,t)=>_r.extname(e)?`**/${e}`:`**/${e}.${f0(t)}`,d0=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>_r.posix.join(e,HT(r,t.extensions))):t.files?t.files.map(r=>_r.posix.join(e,`**/${r}`)):t.extensions?[_r.posix.join(e,`**/*.${f0(t.extensions)}`)]:[_r.posix.join(e,"**")]};Vu.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await h0.isDirectory(p0(i,t.cwd))?d0(i,t):i));return[].concat.apply([],r)};Vu.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>h0.isDirectorySync(p0(i,t.cwd))?d0(i,t):i);return[].concat.apply([],r)}});var D0=w((Lj,C0)=>{y();function g0(e){return Array.isArray(e)?e:[e]}var Ku="",y0=" ",Xu="\\",UT=/^\s+$/,WT=/(?:[^\\]|^)\\$/,zT=/^\\!/,JT=/^\\#/,GT=/\r?\n/g,VT=/^\.*\/|^\.+$/,Yu="/",w0="node-ignore";typeof Symbol<"u"&&(w0=Symbol.for("node-ignore"));var x0=w0,XT=(e,t,r)=>Object.defineProperty(e,t,{value:r}),YT=/([0-z])-([0-z])/g,E0=()=>!1,KT=e=>e.replace(YT,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Ku),QT=e=>{let{length:t}=e;return e.slice(0,t-t%2)},ZT=[[/^\uFEFF/,()=>Ku],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?y0:Ku)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+y0}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Xu],[/\\\\/g,()=>Xu],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Xu?`\\[${r}${QT(i)}${n}`:n==="]"&&i.length%2===0?`[${KT(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],v0=Object.create(null),eO=(e,t)=>{let r=v0[e];return r||(r=ZT.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),v0[e]=r),t?new RegExp(r,"i"):new RegExp(r)},ec=e=>typeof e=="string",tO=e=>e&&ec(e)&&!UT.test(e)&&!WT.test(e)&&e.indexOf("#")!==0,rO=e=>e.split(GT),Qu=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},iO=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(zT,"!").replace(JT,"#");let n=eO(e,t);return new Qu(r,e,i,n)},nO=(e,t)=>{throw new t(e)},Ft=(e,t,r)=>ec(e)?e?Ft.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),b0=e=>VT.test(e);Ft.isNotRelative=b0;Ft.convert=e=>e;var Zu=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){XT(this,x0,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[x0]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(tO(t)){let r=iO(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,g0(ec(t)?rO(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Ft.convert(t);return Ft(o,t,this._allowRelativePaths?E0:nO),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Yu)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Yu)+Yu,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return g0(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},ho=e=>new Zu(e),sO=e=>Ft(e&&Ft.convert(e),e,E0);ho.isPathValid=sO;ho.default=ho;C0.exports=ho;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Ft.convert=e;let t=/^[a-z]:\//i;Ft.isNotRelative=r=>t.test(r)||b0(r)}});var _0=w((jj,A0)=>{"use strict";y();A0.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var I0=w((qj,tc)=>{"use strict";y();var{promisify:oO}=S("util"),S0=S("fs"),Tt=S("path"),F0=Fl(),aO=D0(),un=_0(),T0=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],uO=oO(S0.readFile),cO=e=>t=>t.startsWith("!")?"!"+Tt.posix.join(e,t.slice(1)):Tt.posix.join(e,t),lO=(e,t)=>{let r=un(Tt.relative(t.cwd,Tt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(cO(r))},O0=e=>{let t=aO();for(let r of e)t.add(lO(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},hO=(e,t)=>{if(e=un(e),Tt.isAbsolute(t)){if(un(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return Tt.join(e,t)},k0=(e,t)=>r=>e.ignores(un(Tt.relative(t,hO(t,r.path||r)))),fO=async(e,t)=>{let r=Tt.join(t,e),i=await uO(r,"utf8");return{cwd:t,filePath:r,content:i}},pO=(e,t)=>{let r=Tt.join(t,e),i=S0.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},P0=({ignore:e=[],cwd:t=un(process.cwd())}={})=>({ignore:e,cwd:t});tc.exports=async e=>{e=P0(e);let t=await F0("**/.gitignore",{ignore:T0.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>fO(n,e.cwd))),i=O0(r);return k0(i,e.cwd)};tc.exports.sync=e=>{e=P0(e);let r=F0.sync("**/.gitignore",{ignore:T0.concat(e.ignore),cwd:e.cwd}).map(n=>pO(n,e.cwd)),i=O0(r);return k0(i,e.cwd)}});var R0=w((Uj,N0)=>{"use strict";y();var{Transform:dO}=S("stream"),fo=class extends dO{constructor(){super({objectMode:!0})}},rc=class extends fo{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},ic=class extends fo{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};N0.exports={FilterStream:rc,UniqueStream:ic}});var $0=w((zj,Sr)=>{"use strict";y();var L0=S("fs"),po=u0(),mO=Iv(),mo=Fl(),go=m0(),nc=I0(),{FilterStream:gO,UniqueStream:yO}=R0(),B0=()=>!1,M0=e=>e[0]==="!",xO=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},vO=(e={})=>{if(!e.cwd)return;let t;try{t=L0.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},wO=e=>e.stats instanceof L0.Stats?e.path:e,yo=(e,t)=>{e=po([].concat(e)),xO(e),vO(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(M0(n))continue;let o=e.slice(i).filter(u=>M0(u)).map(u=>u.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},EO=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},sc=(e,t)=>e.options.expandDirectories?EO(e,t):[e.pattern],j0=e=>e&&e.gitignore?nc.sync({cwd:e.cwd,ignore:e.ignore}):B0,oc=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=go.sync(r.ignore)),{pattern:t,options:r}};Sr.exports=async(e,t)=>{let r=yo(e,t),i=async()=>t&&t.gitignore?nc({cwd:t.cwd,ignore:t.ignore}):B0,n=async()=>{let l=await Promise.all(r.map(async m=>{let p=await sc(m,go);return Promise.all(p.map(oc(m)))}));return po(...l)},[o,s]=await Promise.all([i(),n()]),u=await Promise.all(s.map(l=>mo(l.pattern,l.options)));return po(...u).filter(l=>!o(wO(l)))};Sr.exports.sync=(e,t)=>{let r=yo(e,t),i=[];for(let s of r){let u=sc(s,go.sync).map(oc(s));i.push(...u)}let n=j0(t),o=[];for(let s of i)o=po(o,mo.sync(s.pattern,s.options));return o.filter(s=>!n(s))};Sr.exports.stream=(e,t)=>{let r=yo(e,t),i=[];for(let u of r){let l=sc(u,go.sync).map(oc(u));i.push(...l)}let n=j0(t),o=new gO(u=>!n(u)),s=new yO;return mO(i.map(u=>mo.stream(u.pattern,u.options))).pipe(o).pipe(s)};Sr.exports.generateGlobTasks=yo;Sr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>mo.isDynamicPattern(r,t));Sr.exports.gitignore=nc});var ac=w(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});xo.aggregateFlags=void 0;var bO=Ws(),CO=(0,bO.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function DO(e,t,r){let i={...t,...e};return r?{json:CO,...i}:i}xo.aggregateFlags=DO});var U0=w(vo=>{"use strict";y();Object.defineProperty(vo,"__esModule",{value:!0});vo.cacheCommand=void 0;var AO=ac(),q0=La(),_O=ms(),SO=le();function H0(e,t){let r=Object.getPrototypeOf(t),i=(0,SO.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?H0({...i,...e},r):e}async function FO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,q0.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function TO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,q0.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function OO(e,t,r=!1){let i=H0(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,u]=await Promise.all([await FO((0,AO.aggregateFlags)(n,o,i.enableJsonFlag),r),await TO((0,_O.ensureArgObject)(i.args),r)]),l={aliases:i.aliases??[],args:u,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],p=new Set([...Object.keys(l),...m]),f=Object.keys(i).filter(a=>!p.has(a)),d=Object.fromEntries(f.map(a=>[a,i[a]]));return{...l,...d}}vo.cacheCommand=OO});var z0=w(di=>{"use strict";y();var kO=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.findRoot=void 0;var PO=kO(ut()),Re=S("node:path"),wo=Dt(),He=(0,PO.default)("find-root");function*uc(e){for(;(0,Re.dirname)(e)!==e;)yield e,e=(0,Re.dirname)(e);yield e}async function W0(e,t){if(He.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of uc(e))if(r.endsWith((0,Re.basename)(t)))return He.extend(t)("Found root based on plugin name!"),r}for(let r of uc(e))if(!((0,Re.basename)((0,Re.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Re.basename)(r))))try{let i=(0,Re.join)(r,"package.json");if(He.extend(t??"root-plugin")(`Checking ${i}`),await(0,wo.safeReadJson)(i))return He.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Re.dirname)(i)}catch{}}async function IO(e,t){He.extend(e??"root-plugin")("Finding root using legacy method");for(let r of uc(t)){let i;if(e){if(i=(0,Re.join)(r,"node_modules",e,"package.json"),await(0,wo.safeReadJson)(i))return(0,Re.dirname)(i);if((await(0,wo.safeReadJson)((0,Re.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Re.join)(r,"package.json"),await(0,wo.safeReadJson)(i))return(0,Re.dirname)(i)}}var Vt;function NO(e){if(Vt)return Vt;try{return Vt=S(S.resolve("pnpapi",{paths:[e]})),Vt}catch{}}var cc=e=>JSON.stringify(e),RO=(e,t,r)=>cc(e?.packageDependencies.get(r))===cc(t?.packageDependencies.get(r));function MO(e,t){if(NO(t),!Vt)return;He.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=cc(n);if(r.has(s))return;let u=Vt.getPackageInformation(n);if(n.name===e)return u.packageLocation;r.add(s);for(let[l,m]of u.packageDependencies){if(m===null||o!==null&&RO(u,o,l))continue;let p=Vt.getLocator(l,m),f=i(p,u);if(f)return f}r.delete(s)};for(let n of Vt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function LO(e,t){if(e){He.extend(e)(`Finding root using ${t}`);let i;try{i=S.resolve(e,{paths:[t]}),He.extend(e)("Found starting point with require.resolve")}catch{He.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await W0((0,Re.dirname)(i),e);if(o)return He.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?MO(e,t):await IO(e,t);return He.extend(e)(n?`Found root at ${n}`:"No root found!"),n}He.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await W0(t);return He.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}di.findRoot=LO});var pc=w(yi=>{"use strict";y();var Q0=yi&&yi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yi,"__esModule",{value:!0});yi.Plugin=void 0;var BO=Q0($0()),gi=S("node:path"),J0=S("node:util"),jO=Q0(it()),cn=Ge(),Eo=ji(),mi=hi(),Z0=fs(),$O=U0(),qO=z0(),G0=Dt(),V0=le(),lc=Gr(),bo=Jr(),X0=jO.default.getInstance().get("@oclif/core");function hc(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>hc(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...hc(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var HO=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Y0=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),K0=e=>{if(e&&typeof e.run=="function")return e},ey=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function UO(e){return e.map(t=>{let r=(0,gi.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Z0.SINGLE_COMMAND_CLI_SYMBOL:o})}function WO(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:ey,strategy:"pattern",target:e};if(!e.target)throw new cn.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new cn.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function zO(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var fc=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${X0.name}@${X0.version}`;_debug=(0,bo.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return hc(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let u,l,m;try{({filePath:m,isESM:l,module:u}=HO(this.manifest,t)?await(0,Eo.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Eo.loadWithData)(this,(0,gi.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(l?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let p=Y0(u);return p?(p.id=t,p.plugin=this,p.isESM=l,p.relativePath=(0,gi.relative)(this.root,m||"").split(gi.sep),p):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),u=K0(s?.[t]);return u?(u.id=t,u.plugin=this,u):void 0}})();return!o&&r.must&&(0,cn.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,qO.findRoot)(this.options.name,this.options.root);if(!t)throw new cn.CLIError(`could not find package.json with ${(0,J0.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,G0.readJson)((0,gi.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new cn.CLIError(`no name in package.json (${t})`);this._debug=(0,bo.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,V0.castArray)(i).map(n=>zO(n))])),this.commandDiscoveryOpts=WO(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(u=!1)=>{try{let l=(0,gi.join)(this.root,`${u?".":""}oclif.manifest.json`),m=await(0,G0.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
152
+ This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,m}catch(l){if(l.code==="ENOENT"){if(!u)return n(!0)}else this.warn(l,"readManifest")}},o=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let u=await n();if(u)return o?.addDetails({commandCount:Object.keys(u.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(u.commands),u}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async u=>{try{let l=await this.findCommand(u,{must:!0}),m=await(0,$O.cacheCommand)(l,this,i);if(m.id=u,this.flexibleTaxonomy){let p=(0,bo.getCommandIdPermutations)(u),f=m.aliases.flatMap(d=>(0,bo.getCommandIdPermutations)(d));return[u,{...m,aliasPermutations:f,permutations:p}]}return[u,m]}catch(l){let m=`findCommand (${u})`;if(!r)this.warn(l,m);else throw this.addErrorScope(l,m)}}))).filter(u=>!!u).reduce((u,[l,m])=>(u[l]=m,u),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,J0.inspect)(t).trim(),t.detail=(0,V0.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
153
+ `),t}async getCommandIDs(){let t=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,BO.default)(this.commandDiscoveryOpts?.globPatterns??ey,{cwd:t});return UO(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>K0(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Eo.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Eo.load)(this,t);return this.commandCache={[Z0.SINGLE_COMMAND_CLI_SYMBOL]:Y0(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};yi.Plugin=fc});var iy=w(Ot=>{"use strict";y();var JO=Ot&&Ot.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),GO=Ot&&Ot.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),VO=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&JO(t,e,r);return GO(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});var XO=o0(),dc=S("node:path"),xi=hi(),mc=Dt(),YO=le(),ty=VO(pc()),KO=Jr(),ry=(0,KO.Debug)();function Fr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,XO.minimatch)(r,i)))}var gc=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,"plugin.load#root");r=new ty.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=Fr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,mc.readJson)((0,dc.join)(n,"package.json")),s=Fr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=Fr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,YO.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Fr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,mc.readJson)((0,dc.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},u=Fr(s??{},i);await this.loadPlugins(n,"dev",u)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Fr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);ry("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let u=typeof s=="string"?s:s.name,l={name:u,root:t,type:r};if(typeof s!="string"&&(l.tag=s.tag||l.tag,l.root=s.root||l.root,l.url=s.url),n&&(l.parent=n),this.plugins.has(u))return;let m=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`plugin.load#${u}`),p=new ty.Plugin(l);if(await p.load(),m?.addDetails({commandCount:p.commands.length,hasManifest:p.hasManifest,name:p.name,topicCount:p.topics.length,type:p.type,usesMain:!!p.pjson.main}),m?.stop(),this.plugins.set(p.name,p),n&&(p.parent=n,n.children||(n.children=[]),n.children.push(p)),p.pjson.oclif.plugins){let f=r==="dev"?{...p.pjson.dependencies,...p.pjson.devDependencies}:p.pjson.dependencies,d=Fr(f??{},p.pjson.oclif.plugins);await this.loadPlugins(p.root,r,d,p)}}catch(u){this.errors.push(u)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,dc.join)(t.dataDir,"package.json");ry("reading user plugins pjson %s",r);let i=await(0,mc.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Ot.default=gc});var ly=w((Xe,cy)=>{"use strict";y();var QO=Xe&&Xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),ZO=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ek=Xe&&Xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&QO(t,e,r);return ZO(t,e),t},wc=Xe&&Xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.Config=void 0;var tk=ek(Hl()),rk=wc(Rv()),vi=S("node:os"),kt=S("node:path"),ny=S("node:url"),uy=wc(it()),ik=nn(),nk=hr(),wi=Ge(),sk=Yr(),ok=ji(),_e=hi(),yc=qt(),sy=Dt(),oy=Lg(),Co=le(),ak=wc(iy()),uk=Gr(),hn=Jr(),ln=(0,hn.Debug)(),ay=uy.default.getInstance().get("@oclif/core"),xc=`${ay.name}@${ay.version}`,ck=new Set(["preparse"]);function lk(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function hk(e){return e&&!!e._base}var Do=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,hn.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},vc=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=xc;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Do;pluginLoader;rootPlugin;topicPermutations=new Do;constructor(t){this.options=t}static async load(t=cy.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,ny.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),hk(t)){if(xc!==t._base){ln(`reloading config from ${t._base} to ${xc}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Co.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,vi.type)()} ${(0,vi.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,kt.join)(this.home,t==="data"?".local/share":"."+t);return(0,kt.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,wi.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,sk.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let u=Object.entries(s.flags).flatMap(([l,m])=>m.char?[m.char,l]:[l]);return i.every(l=>u.includes(l))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){yc.settings.performanceEnabled=(yc.settings.performanceEnabled===void 0?this.options.enablePerf:yc.settings.performanceEnabled)??!1;let t=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new ak.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=uy.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||lk(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,vi.arch)()==="ia32"?"x86":(0,vi.arch)(),this.platform=rk.default?"wsl":(0,oy.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,oy.getHomeDir)()||(0,vi.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,kt.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),ln("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,kt.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,kt.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,sy.safeReadJson)(t):void 0,await(0,sy.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,nk.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,kt.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);ln("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let l=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:l}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new wi.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let l=o.pluginName,m=this.pjson.oclif.jitPlugins[l],p=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:l,pluginVersion:m});if(p.failures[0])throw p.failures[0].error;if(p.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new wi.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let u=await s.run(r,this);if(o.id==="plugins:uninstall")for(let l of r)this.plugins.delete(l);return await this.runHook("postrun",{Command:s,argv:r,result:u}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),u}async runHook(t,r,i,n){let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${t}`);ln("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(d=>typeof d=="function"),u=async(f,d)=>{let a,c=new Promise((h,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([d,c]).then(h=>(clearTimeout(a),h))},l={failures:[],successes:[]},p=(ck.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let d=ut()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:d,error(h,g={}){(0,wi.error)(h,g)},exit(h=0){(0,wi.exit)(h)},log(h,...g){ik.ux.info(h,...g)},warn(h){(0,wi.warn)(h)}},c=f.hooks[t]||[];for(let h of c){let g=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${h.target})`);try{let{filePath:x,isESM:v,module:E}=await(0,ok.loadWithData)(f,await(0,uk.tsPath)(f.root,h.target,f));d("start",v?"(import)":"(require)",x);let C=E[h.identifier]??(h.identifier==="default"?s(E):void 0);if(!C){d("No hook found for hook definition:",h);continue}let A=i?await u(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});l.successes.push({plugin:f,result:A}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(A),d("done")}catch(x){if(l.failures.push({error:x,plugin:f}),d(x),!n&&x.oclif?.exit!==void 0&&x.oclif?.exit!==0&&x.code!=="MODULE_NOT_FOUND")throw x}g?.addDetails({event:t,hook:h.target,plugin:f.name}),g?.stop()}});return await Promise.all(p),ln("%s hook done",t),o?.stop(),l}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return tk.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new ny.URL(r);return i.pathname=(0,kt.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Co.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
154
+ `),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Co.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
155
+ `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,kt.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=ut()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,vi.userInfo)().shell?.split(kt.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",u=o.pluginAlias??"B-Cannot-Find-This",l=r.indexOf(s),m=r.indexOf(u);return n.pluginType==="core"&&o.pluginType==="core"?l-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,hn.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,u=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:u,id:s});let l=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,hn.getCommandIdPermutations)(s):i.permutations??[s];for(let m of l)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Co.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,hn.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Xe.Config=vc});var Ao=w(Xt=>{"use strict";y();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.tsPath=Xt.Plugin=Xt.Config=void 0;var fk=ly();Object.defineProperty(Xt,"Config",{enumerable:!0,get:function(){return fk.Config}});var pk=pc();Object.defineProperty(Xt,"Plugin",{enumerable:!0,get:function(){return pk.Plugin}});var dk=Gr();Object.defineProperty(Xt,"tsPath",{enumerable:!0,get:function(){return dk.tsPath}})});var hy=w(_o=>{"use strict";y();Object.defineProperty(_o,"__esModule",{value:!0});_o.renderList=void 0;var mk=ar(),gk=le(),yk=Wv();function xk(e,t){return yk(e,mk.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function vk(e){if(e.length===0)return"";let t=(0,gk.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=xk(t+2,o),`${n} ${o}`):n}).join(`
156
+ `)}_o.renderList=vk});var Fc=w(te=>{"use strict";y();var fy=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0});te.FailedFlagValidationError=te.ArgInvalidOptionError=te.FlagInvalidOptionError=te.NonExistentFlagsError=te.UnexpectedArgsError=te.RequiredArgsError=te.InvalidArgsSpecError=te.CLIParseError=te.CLIError=void 0;var wk=fy(We()),fn=fy(it()),py=hy(),Ek=Ge(),bk=le(),Ck=Ge();Object.defineProperty(te,"CLIError",{enumerable:!0,get:function(){return Ck.CLIError}});var xt=class extends Ek.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
157
+ See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};te.CLIParseError=xt;var Ec=class extends xt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,py.renderList)(o.map(u=>[`${u.name} (${u.required?"required":"optional"})`,u.description]));n+=`:
158
+ ${s}`}super({exit:fn.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};te.InvalidArgsSpecError=Ec;var bc=class extends xt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(u=>u.name);if(s.length>0){let u=(0,py.renderList)(s.map(l=>{let m=l.options?`(${l.options.join("|")}) ${l.description}`:l.description;return[l.name,m]}));o+=`:
163
159
  ${u}`}if(i?.length){let u=i.map(l=>`--${l}`).join(", ");o+=`
164
160
 
165
161
  Note: ${u} allow${i.length===1?"s":""} multiple values. Because of this you need to provide all arguments before providing ${i.length===1?"that flag":"those flags"}.`,o+=`
166
- Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:hn.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};te.RequiredArgsError=Dc;var Ac=class extends wt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:hn.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};te.UnexpectedArgsError=Ac;var _c=class extends wt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:hn.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};te.NonExistentFlagsError=_c;var Sc=class extends wt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.FlagInvalidOptionError=Sc;var Fc=class extends wt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.ArgInvalidOptionError=Fc;var Tc=class extends wt{constructor({exit:t,failed:r,parse:i}){let n=r.map(l=>l.reason),o=(0,xk.uniq)(n),u=`The following ${o.length===1?"error":"errors"} occurred:
167
- ${gk.default.dim(o.join(`
168
- `))}`;super({exit:hn.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:u,parse:i})}};te.FailedFlagValidationError=Tc});var dy=w(Et=>{"use strict";y();var wk=Et&&Et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Et,"__esModule",{value:!0});Et.Parser=Et.readStdin=void 0;var Ek=S("node:readline"),fy=wk(st()),Qt=le(),Or=Oc(),ut;try{ut=process.env.CLI_FLAGS_DEBUG==="1"?ot()("../parser"):()=>{}}catch{ut=()=>{}}var bk=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(ut("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),u=(0,Ek.createInterface)({input:e,output:t,terminal:!1});u.on("line",l=>{i+=l}),u.once("close",()=>{clearTimeout(s),ut("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{ut("stdin aborted"),clearTimeout(s),u.close(),r(null)},{once:!0})})};Et.readStdin=bk;function Ck(e){return/^-\d/g.test(e)}var To=(e,t)=>{if(e.options&&!e.options.includes(t))throw new Or.FlagInvalidOptionError(e,t);return t},kc=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,Qt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:p,name:a}=this.findFlag(f);if(!a){let h=f.indexOf("=");if(h!==-1){let g=f.slice(h+1);this.argv.unshift(g);let x=await t(f.slice(0,h));return x||this.argv.shift(),x}return!1}let c=this.input.flags[a];if(c.type==="option"){if(!c.multiple&&this.raw.some(g=>g.type==="flag"&&g.flag===a))throw new Or.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=c;let h=p||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(c.allowStdin==="only"&&h!=="-"&&h!==void 0&&!this.findFlag(h).name)throw new Or.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(c.allowStdin&&h==="-"||c.allowStdin==="only"){let g=await(0,Et.readStdin)();g&&(h=g.trim())}if(typeof h!="string"||this.findFlag(h).name)throw c.options?new Or.CLIError(`Flag --${a} expects one of these values: ${c.options.join(", ")}`):new Or.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:c.name,input:h,type:"flag"})}else this.raw.push({flag:c.name,input:f,type:"flag"}),!p&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!Ck(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let p=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:p,input:f,type:"arg"})}let[{args:s,argv:u},{flags:l,metadata:m}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(u,s,l);let d=n?[...u,...i,"--"]:[...u,...i];return{args:s,argv:d.sort((f,p)=>o.indexOf(f)-o.indexOf(p)),flags:l,metadata:m,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,u]of Object.entries(this.input.args)){let l=i.find(m=>m.arg===s);if(o.token=l,l){if(u.options&&!u.options.includes(l.input))throw new Or.ArgInvalidOptionError(u,l.input);let m=await u.parse(l.input,o,u);t.push(m),r[l.arg]=m}else if(!u.ignoreStdin&&!n){let m=await(0,Et.readStdin)();if(m){m=m.trim();let d=await u.parse(m,o,u);t.push(d),r[s]=d}n=!0}if(!r[s]&&(u.default||u.default===!1))if(typeof u.default=="function"){let m=await u.default();t.push(m),r[s]=m}else t.push(u.default),r[s]=u.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){ut("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&ut("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&ut("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&ut("argv: %o",i),Object.keys(t).length>0&&ut("args: %o",t),Object.keys(r).length>0&&ut("flags: %o",r)}async _flags(){let t=async(f,p,a,c)=>{if(!p.parse)return f;let h={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:c,warn:a?.warn};try{return p.type==="boolean"?await p.parse(f,h,p):await p.parse(f,h,p)}catch(g){throw g.message=`Parsing --${p.name}
162
+ Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:fn.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};te.RequiredArgsError=bc;var Cc=class extends xt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:fn.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};te.UnexpectedArgsError=Cc;var Dc=class extends xt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:fn.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};te.NonExistentFlagsError=Dc;var Ac=class extends xt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.FlagInvalidOptionError=Ac;var _c=class extends xt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.ArgInvalidOptionError=_c;var Sc=class extends xt{constructor({exit:t,failed:r,parse:i}){let n=r.map(l=>l.reason),o=(0,bk.uniq)(n),u=`The following ${o.length===1?"error":"errors"} occurred:
163
+ ${wk.default.dim(o.join(`
164
+ `))}`;super({exit:fn.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:u,parse:i})}};te.FailedFlagValidationError=Sc});var my=w(vt=>{"use strict";y();var Dk=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.Parser=vt.readStdin=void 0;var Ak=S("node:readline"),dy=Dk(it()),Yt=le(),Tr=Fc(),st;try{st=process.env.CLI_FLAGS_DEBUG==="1"?ut()("../parser"):()=>{}}catch{st=()=>{}}var _k=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(st("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),u=(0,Ak.createInterface)({input:e,output:t,terminal:!1});u.on("line",l=>{i+=l}),u.once("close",()=>{clearTimeout(s),st("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{st("stdin aborted"),clearTimeout(s),u.close(),r(null)},{once:!0})})};vt.readStdin=_k;function Sk(e){return/^-\d/g.test(e)}var So=(e,t)=>{if(e.options&&!e.options.includes(t))throw new Tr.FlagInvalidOptionError(e,t);return t},Tc=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,Yt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:d,name:a}=this.findFlag(f);if(!a){let h=f.indexOf("=");if(h!==-1){let g=f.slice(h+1);this.argv.unshift(g);let x=await t(f.slice(0,h));return x||this.argv.shift(),x}return!1}let c=this.input.flags[a];if(c.type==="option"){if(!c.multiple&&this.raw.some(g=>g.type==="flag"&&g.flag===a))throw new Tr.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=c;let h=d||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(c.allowStdin==="only"&&h!=="-"&&h!==void 0&&!this.findFlag(h).name)throw new Tr.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(c.allowStdin&&h==="-"||c.allowStdin==="only"){let g=await(0,vt.readStdin)();g&&(h=g.trim())}if(typeof h!="string"||this.findFlag(h).name)throw c.options?new Tr.CLIError(`Flag --${a} expects one of these values: ${c.options.join(", ")}`):new Tr.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:c.name,input:h,type:"flag"})}else this.raw.push({flag:c.name,input:f,type:"flag"}),!d&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!Sk(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let d=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:d,input:f,type:"arg"})}let[{args:s,argv:u},{flags:l,metadata:m}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(u,s,l);let p=n?[...u,...i,"--"]:[...u,...i];return{args:s,argv:p.sort((f,d)=>o.indexOf(f)-o.indexOf(d)),flags:l,metadata:m,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,u]of Object.entries(this.input.args)){let l=i.find(m=>m.arg===s);if(o.token=l,l){if(u.options&&!u.options.includes(l.input))throw new Tr.ArgInvalidOptionError(u,l.input);let m=await u.parse(l.input,o,u);t.push(m),r[l.arg]=m}else if(!u.ignoreStdin&&!n){let m=await(0,vt.readStdin)();if(m){m=m.trim();let p=await u.parse(m,o,u);t.push(p),r[s]=p}n=!0}if(!r[s]&&(u.default||u.default===!1))if(typeof u.default=="function"){let m=await u.default();t.push(m),r[s]=m}else t.push(u.default),r[s]=u.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){st("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&st("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&st("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&st("argv: %o",i),Object.keys(t).length>0&&st("args: %o",t),Object.keys(r).length>0&&st("flags: %o",r)}async _flags(){let t=async(f,d,a,c)=>{if(!d.parse)return f;let h={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:c,warn:a?.warn};try{return d.type==="boolean"?await d.parse(f,h,d):await d.parse(f,h,d)}catch(g){throw g.message=`Parsing --${d.name}
169
165
  ${g.message}
170
- See more help with --help`,fy.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:fy.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,Qt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,Qt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,Qt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(c=>c.input.split(a.inputFlag.flag.delimiter??",")).map(c=>c.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async c=>t(c,a.inputFlag.flag,this.context,{...(0,Qt.last)(a.tokens),input:c})))).map(c=>To(a.inputFlag.flag,c))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(c=>t(To(a.inputFlag.flag,c.input),a.inputFlag.flag,this.context,c)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(To(a.inputFlag.flag,(0,Qt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,Qt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async c=>t(To(c.inputFlag.flag,a),c.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async c=>(0,Qt.isTruthy)(process.env[c.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,c={})=>f.inputFlag.flag.default({flags:c,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(p,a,...c)=>p.inputFlag.flag.defaultHelp({flags:a,options:p.inputFlag},...c):p=>p.inputFlag.flag.defaultHelp}:f,n=async f=>{let p=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,p,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),s=this.mapAndValidateFlags(),u=await Promise.all(Object.entries(this.input.flags).filter(([f,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||s.has(f)).map(([f,p])=>({inputFlag:{flag:p,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),l=o(u.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(u.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,l)}:f)),d=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(d),metadata:{flags:Object.fromEntries(d.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new Or.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};Et.Parser=kc});var py=w(Oo=>{"use strict";y();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.validate=void 0;var Dk=le(),fn=Oc();async function Ak(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new fn.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let p=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>p){let h=e.output.argv.slice(p);throw new fn.UnexpectedArgsError({args:h,parse:e})}let a=[],c=!1;for(let[h,g]of Object.entries(e.input.args)){if(!g.required)c=!0;else if(c)throw new fn.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[h]===void 0&&a.push(g)}if(a.length>0){let h=Object.entries(e.input.flags).filter(([g,x])=>x.type==="option"&&!!x.multiple).map(([g])=>g);throw new fn.RequiredArgsError({args:a,flagsWithMultiple:h,parse:e})}}async function i(){let p=Object.entries(e.input.flags).flatMap(([h,g])=>e.output.flags[h]!==void 0?[...g.relationships?f(h,g):[],...g.dependsOn?[m(h,g.dependsOn)]:[],...g.exclusive?[u(h,g.exclusive)]:[],...g.exactlyOne?[l(h,g.exactlyOne)]:[]]:g.required?[{name:h,reason:`Missing required flag ${h}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),c=(await Promise.all(p)).filter(h=>h.status==="failed");if(c.length>0)throw new fn.FailedFlagValidationError({failed:c,parse:e})}async function n(p){if(t)return t;let a=p.map(async h=>typeof h=="string"?[h,e.output.flags[h]]:await h.when(e.output.flags)?[h.name,e.output.flags[h.name]]:null),c=await Promise.all(a);return t=Object.fromEntries(c.filter(h=>h!==null)),t}let o=p=>Object.keys(p).filter(a=>a!==void 0);function s(p){let a={name:p.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(h=>h[0]).filter(h=>e.output.flags[h]!==void 0).filter(h=>p.exactlyOne&&p.exactlyOne.includes(h)).length===0){let g=`Exactly one of the following must be provided: ${(0,Dk.uniq)(p.exactlyOne?.map(x=>`--${x}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function u(p,a){let c={name:p,validationFn:"validateExclusive"},h=await n(a),g=o(h);for(let x of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[x]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[p]?.setFromDefault)&&e.output.flags[x]!==void 0){let v=e.output.metadata.flags?.[x]?.defaultHelp??e.output.flags[x];return{...c,reason:`--${x}=${v} cannot also be provided when using --${p}`,status:"failed"}}return{...c,status:"success"}}async function l(p,a){let c={name:p,validationFn:"validateExactlyOne"},h=await n(a),g=o(h);for(let x of g)if(x!==p&&e.output.flags[x]!==void 0)return{...c,reason:`--${x} cannot also be provided when using --${p}`,status:"failed"};return{...c,status:"success"}}async function m(p,a){let c={name:p,validationFn:"validateDependsOn"},h=await n(a);if(!Object.values(h).every(x=>x!==void 0)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`All of the following must be provided when using --${p}: ${x}`,status:"failed"}}return{...c,status:"success"}}async function d(p,a){let c={name:p,validationFn:"validateSome"},h=await n(a);if(!Object.values(h).some(Boolean)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`One of the following must be provided when using --${p}: ${x}`,status:"failed"}}return{...c,status:"success"}}function f(p,a){return(a.relationships??[]).map(c=>{switch(c.type){case"all":return m(p,c.flags);case"some":return d(p,c.flags);case"none":return u(p,c.flags);default:throw new Error(`Unknown relationship type: ${c.type}`)}})}return r(),i()}Oo.validate=Ak});var gy=w(Zt=>{"use strict";y();var _k=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.flagUsages=Zt.flagUsage=void 0;var Sk=_k(Je()),Fk=le();function my(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?Sk.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Zt.flagUsage=my;function Tk(e,t={}){return e.length===0?[]:(0,Fk.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>my(r,t))}Zt.flagUsages=Tk});var Pc=w(Ei=>{"use strict";y();Object.defineProperty(Ei,"__esModule",{value:!0});Ei.parse=Ei.flagUsages=void 0;var Ok=dy(),kk=py(),Pk=gy();Object.defineProperty(Ei,"flagUsages",{enumerable:!0,get:function(){return Pk.flagUsages}});async function Ik(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new Ok.Parser(r).parse();return await(0,kk.validate)({input:r,output:n}),n}Ei.parse=Ik});var Cy=w(Qe=>{"use strict";y();var Nk=Qe&&Qe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Rk=Qe&&Qe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wy=Qe&&Qe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Nk(t,e,r);return Rk(t,e),t},Ey=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.Command=void 0;var Mk=Ey(Je()),Lk=S("node:url"),yy=S("node:util"),by=Ey(st()),ko=nn(),Bk=So(),bi=wy(Ye()),dn=Kr(),jk=wy(Pc()),xy=cc(),Ic=Xr(),$k=le(),vy=by.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var Nc=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${vy.name}@${vy.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=ot()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,Lk.fileURLToPath)(r));let i=await Bk.Config.load(r||S.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{ko.ux.action.stop(Mk.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return bi.error(t,r)}exit(t=0){bi.exit(t)}async finally(t){try{let{config:r}=bi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(bi.config.debug=!0),this.config.errlog&&(bi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,yy.inspect)(t),ko.ux.info(t,...r))}logJson(t){ko.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,yy.inspect)(t),ko.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,xy.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(u=>u.plugin.root===by.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await jk.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||bi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,dn.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,Ic.toConfiguredId)(this.ctor.id,this.config),i=(0,Ic.toConfiguredId)(t,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,Ic.toConfiguredId)(this.ctor.id,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,xy.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,dn.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let u=(0,$k.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(u.length===0)return;let l=u.filter(m=>this.argv.some(d=>d.startsWith(m)));for(let m of l){let d=`--${n?.name}`;n?.char&&(d+=` | -${n?.char}`),this.warn((0,dn.formatFlagDeprecationWarning)(m,{to:d}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};Qe.Command=Nc});var Lc=w(Ze=>{"use strict";y();var qk=Ze&&Ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.run=Ze.versionAddition=Ze.helpAddition=void 0;var Dy=S("node:url"),Hk=qk(st()),Uk=nn(),zk=So(),Mc=zi(),Ci=fi(),Wk=ps(),Rc=ot()("oclif:main"),Jk=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Mc.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};Ze.helpAddition=Jk;var Gk=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};Ze.versionAddition=Gk;async function Vk(e,t){let r=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run"),i=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await Ci.Performance.collect(),Ci.Performance.debug()},o=async d=>{let f=await(0,Mc.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(d)};Rc(`process.execPath: ${process.execPath}`),Rc(`process.execArgv: ${process.execArgv}`),Rc("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof Dy.URL)&&(t=(0,Dy.fileURLToPath)(t));let s=await zk.Config.load(t??S.main?.filename??__dirname);Hk.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[Wk.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[u,...l]=(0,Mc.normalizeArgv)(s,e);if(await s.runHook("init",{argv:l,id:u}),(0,Ze.versionAddition)(e,s)){Uk.ux.log(s.userAgent),await n();return}if((0,Ze.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(u);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(u))){await o([u]),await n();return}i?.stop();try{return await s.runCommand(u,l,m)}finally{await n()}}Ze.run=Vk});var Ay=w(Po=>{"use strict";y();Object.defineProperty(Po,"__esModule",{value:!0});Po.execute=void 0;var Yk=Os(),Xk=Ye(),Kk=Cs(),Qk=Lc(),Zk=Ut();async function eP(e){if(!e.dir&&!e.loadOptions)throw new Xk.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",Zk.settings.debug=!0),(0,Qk.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,Yk.flush)(),t)).catch(async t=>(0,Kk.handle)(t))}Po.execute=eP});var Sy=w(_y=>{"use strict";y();Object.defineProperty(_y,"__esModule",{value:!0})});var No=w(I=>{"use strict";y();var tP=I&&I.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),rP=I&&I.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kr=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&tP(t,e,r);return rP(t,e),t},iP=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.toStandardizedId=I.toConfiguredId=I.settings=I.Performance=I.Parser=I.ModuleLoader=I.run=I.Interfaces=I.loadHelpClass=I.HelpBase=I.Help=I.CommandHelp=I.Flags=I.execute=I.handle=I.Errors=I.Plugin=I.Config=I.Command=I.stdout=I.stderr=I.flush=I.ux=I.Args=void 0;var nP=iP(Ht());function sP(){try{process.cwd()}catch(e){e.code==="ENOENT"&&nP.default.stderr(`WARNING: current directory does not exist
171
- `)}}sP();I.Args=kr(of());I.ux=kr(nn());var oP=Os();Object.defineProperty(I,"flush",{enumerable:!0,get:function(){return oP.flush}});var Fy=Hg();Object.defineProperty(I,"stderr",{enumerable:!0,get:function(){return Fy.stderr}});Object.defineProperty(I,"stdout",{enumerable:!0,get:function(){return Fy.stdout}});var aP=Cy();Object.defineProperty(I,"Command",{enumerable:!0,get:function(){return aP.Command}});var Ty=So();Object.defineProperty(I,"Config",{enumerable:!0,get:function(){return Ty.Config}});Object.defineProperty(I,"Plugin",{enumerable:!0,get:function(){return Ty.Plugin}});I.Errors=kr(Ye());var uP=Cs();Object.defineProperty(I,"handle",{enumerable:!0,get:function(){return uP.handle}});var cP=Ay();Object.defineProperty(I,"execute",{enumerable:!0,get:function(){return cP.execute}});I.Flags=kr(Js());var Io=zi();Object.defineProperty(I,"CommandHelp",{enumerable:!0,get:function(){return Io.CommandHelp}});Object.defineProperty(I,"Help",{enumerable:!0,get:function(){return Io.Help}});Object.defineProperty(I,"HelpBase",{enumerable:!0,get:function(){return Io.HelpBase}});Object.defineProperty(I,"loadHelpClass",{enumerable:!0,get:function(){return Io.loadHelpClass}});I.Interfaces=kr(Sy());var lP=Lc();Object.defineProperty(I,"run",{enumerable:!0,get:function(){return lP.run}});I.ModuleLoader=kr(ji());I.Parser=kr(Pc());var hP=fi();Object.defineProperty(I,"Performance",{enumerable:!0,get:function(){return hP.Performance}});var fP=Ut();Object.defineProperty(I,"settings",{enumerable:!0,get:function(){return fP.settings}});var Oy=Xr();Object.defineProperty(I,"toConfiguredId",{enumerable:!0,get:function(){return Oy.toConfiguredId}});Object.defineProperty(I,"toStandardizedId",{enumerable:!0,get:function(){return Oy.toStandardizedId}})});var bx=w((SH,Ex)=>{y();function px(e){return Array.isArray(e)?e:[e]}var rl="",mx=" ",el="\\",JP=/^\s+$/,GP=/(?:[^\\]|^)\\$/,VP=/^\\!/,YP=/^\\#/,XP=/\r?\n/g,KP=/^\.*\/|^\.+$/,tl="/",xx="node-ignore";typeof Symbol<"u"&&(xx=Symbol.for("node-ignore"));var gx=xx,QP=(e,t,r)=>Object.defineProperty(e,t,{value:r}),ZP=/([0-z])-([0-z])/g,vx=()=>!1,eI=e=>e.replace(ZP,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:rl),tI=e=>{let{length:t}=e;return e.slice(0,t-t%2)},rI=[[/^\uFEFF/,()=>rl],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?mx:rl)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+mx}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>el],[/\\\\/g,()=>el],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===el?`\\[${r}${tI(i)}${n}`:n==="]"&&i.length%2===0?`[${eI(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],yx=Object.create(null),iI=(e,t)=>{let r=yx[e];return r||(r=rI.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),yx[e]=r),t?new RegExp(r,"i"):new RegExp(r)},sl=e=>typeof e=="string",nI=e=>e&&sl(e)&&!JP.test(e)&&!GP.test(e)&&e.indexOf("#")!==0,sI=e=>e.split(XP),il=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},oI=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(VP,"!").replace(YP,"#");let n=iI(e,t);return new il(r,e,i,n)},aI=(e,t)=>{throw new t(e)},Mt=(e,t,r)=>sl(e)?e?Mt.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),wx=e=>KP.test(e);Mt.isNotRelative=wx;Mt.convert=e=>e;var nl=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){QP(this,gx,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[gx]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(nI(t)){let r=oI(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,px(sl(t)?sI(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Mt.convert(t);return Mt(o,t,this._allowRelativePaths?vx:aI),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(tl)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(tl)+tl,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return px(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Uo=e=>new nl(e),uI=e=>Mt(e&&Mt.convert(e),e,vx);Uo.isPathValid=uI;Uo.default=Uo;Ex.exports=Uo;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Mt.convert=e;let t=/^[a-z]:\//i;Mt.isNotRelative=r=>t.test(r)||wx(r)}});var $x=w((GU,$I)=>{$I.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var zx=w((VU,Lt)=>{y();var vl=S("fs"),wl=S("path"),qI=S("os"),HI=S("crypto"),UI=$x(),El=UI.version,zI=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function WI(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
172
- `);let i;for(;(i=zI.exec(r))!=null;){let n=i[1],o=i[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
173
- `),o=o.replace(/\\r/g,"\r")),t[n]=o}return t}function JI(e){let t=Ux(e),r=pe.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let i=Hx(e).split(","),n=i.length,o;for(let s=0;s<n;s++)try{let u=i[s].trim(),l=YI(r,u);o=pe.decrypt(l.ciphertext,l.key);break}catch(u){if(s+1>=n)throw u}return pe.parse(o)}function GI(e){console.log(`[dotenv@${El}][INFO] ${e}`)}function VI(e){console.log(`[dotenv@${El}][WARN] ${e}`)}function Wo(e){console.log(`[dotenv@${El}][DEBUG] ${e}`)}function Hx(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function YI(e,t){let r;try{r=new URL(t)}catch(u){if(u.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw u}let i=r.password;if(!i){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let n=r.searchParams.get("environment");if(!n){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let o=`DOTENV_VAULT_${n.toUpperCase()}`,s=e.parsed[o];if(!s){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:s,key:i}}function Ux(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)vl.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=wl.resolve(process.cwd(),".env.vault");return vl.existsSync(t)?t:null}function qx(e){return e[0]==="~"?wl.join(qI.homedir(),e.slice(1)):e}function XI(e){GI("Loading env from encrypted .env.vault");let t=pe._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),pe.populate(r,t,e),{parsed:t}}function KI(e){let t=wl.resolve(process.cwd(),".env"),r="utf8",i=!!(e&&e.debug);e&&e.encoding?r=e.encoding:i&&Wo("No encoding is specified. UTF-8 is used by default");let n=[t];if(e&&e.path)if(!Array.isArray(e.path))n=[qx(e.path)];else{n=[];for(let l of e.path)n.push(qx(l))}let o,s={};for(let l of n)try{let m=pe.parse(vl.readFileSync(l,{encoding:r}));pe.populate(s,m,e)}catch(m){i&&Wo(`Failed to load ${l} ${m.message}`),o=m}let u=process.env;return e&&e.processEnv!=null&&(u=e.processEnv),pe.populate(u,s,e),o?{parsed:s,error:o}:{parsed:s}}function QI(e){if(Hx(e).length===0)return pe.configDotenv(e);let t=Ux(e);return t?pe._configVault(e):(VI(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),pe.configDotenv(e))}function ZI(e,t){let r=Buffer.from(t.slice(-64),"hex"),i=Buffer.from(e,"base64"),n=i.subarray(0,12),o=i.subarray(-16);i=i.subarray(12,-16);try{let s=HI.createDecipheriv("aes-256-gcm",r,n);return s.setAuthTag(o),`${s.update(i)}${s.final()}`}catch(s){let u=s instanceof RangeError,l=s.message==="Invalid key length",m=s.message==="Unsupported state or unable to authenticate data";if(u||l){let d=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw d.code="INVALID_DOTENV_KEY",d}else if(m){let d=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw d.code="DECRYPTION_FAILED",d}else throw s}}function eN(e,t,r={}){let i=!!(r&&r.debug),n=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(n===!0&&(e[o]=t[o]),i&&Wo(n===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var pe={configDotenv:KI,_configVault:XI,_parseVault:JI,config:QI,decrypt:ZI,parse:WI,populate:eN};Lt.exports.configDotenv=pe.configDotenv;Lt.exports._configVault=pe._configVault;Lt.exports._parseVault=pe._parseVault;Lt.exports.config=pe.config;Lt.exports.decrypt=pe.decrypt;Lt.exports.parse=pe.parse;Lt.exports.populate=pe.populate;Lt.exports=pe});y();import{createRequire as Jv}from"node:module";import{pathToFileURL as fh}from"node:url";var dh=Jv(import.meta.url);async function ph(e){let t=dh.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]}),r=await ql(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(me(r.path),i);return import(fh(n).href)}function Gv(e,t){let r=dh.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(fh(r).href)}y();import ra from"node:path";import{EventEmitter as Vv}from"node:events";import{ReadableStream as Yv}from"node:stream/web";y();function $r({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var mh=At(Bv(),1),yN="H2O_LOG_EVENT",gh;function xN(e){gh=e.Response}var na=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Xv={request:"Request",subrequest:"Sub request"};async function Kv(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var ia=new Vv,Ti=[];function kn(e="ok",t){return new gh(e,t)}function Qv(e){return Ti.length=0,kn()}function vN(e){return async function(r){let i=new URL(r.url);if(na.has(i.pathname))return kn();let{url:n,displayName:o,eventType:s,purpose:u,graphql:l,stackInfo:m,...d}=await Kv(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||l?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,l&&(f=$r({graphql:l})));let c=null,h=null;if(m?.file){e?.transformLocation&&(m.file=e.transformLocation(m.file));let{source:x,line:v,column:E}=(0,mh.mapSourcePosition)({source:m.file,line:m.line??0,column:m.column??0});c=`${x}:${v}:${E+1}`,h=`vscode://${ra.join("file",c)}`,c=c.split(ra.sep+"app"+ra.sep)[1]??c,m.func&&(c=`${m.func.replace(/\d+$/,"")} (${c})`)}let g={event:Xv[s]||s,data:JSON.stringify({...d,displayName:a,url:`${u} ${p}`.trim(),graphiqlLink:f,stackLine:c,stackLink:h})};return Ti.push(g),Ti.length>100&&Ti.shift(),ia.emit("request",g),kn()}}function Zv(e){let t=new Yv({start(r){let i=new TextEncoder,n=({event:u="message",data:l})=>{r.enqueue(i.encode(`event: ${u}
166
+ See more help with --help`,dy.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:dy.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,Yt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,Yt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,Yt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(c=>c.input.split(a.inputFlag.flag.delimiter??",")).map(c=>c.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async c=>t(c,a.inputFlag.flag,this.context,{...(0,Yt.last)(a.tokens),input:c})))).map(c=>So(a.inputFlag.flag,c))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(c=>t(So(a.inputFlag.flag,c.input),a.inputFlag.flag,this.context,c)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(So(a.inputFlag.flag,(0,Yt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,Yt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async c=>t(So(c.inputFlag.flag,a),c.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async c=>(0,Yt.isTruthy)(process.env[c.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,c={})=>f.inputFlag.flag.default({flags:c,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(d,a,...c)=>d.inputFlag.flag.defaultHelp({flags:a,options:d.inputFlag},...c):d=>d.inputFlag.flag.defaultHelp}:f,n=async f=>{let d=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,d,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(d=>d.value!==void 0).map(d=>[d.inputFlag.name,d.value])),s=this.mapAndValidateFlags(),u=await Promise.all(Object.entries(this.input.flags).filter(([f,d])=>d.type==="boolean"||d.env||d.default!==void 0||"defaultHelp"in d||s.has(f)).map(([f,d])=>({inputFlag:{flag:d,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),l=o(u.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(u.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,l)}:f)),p=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(p),metadata:{flags:Object.fromEntries(p.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new Tr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};vt.Parser=Tc});var gy=w(Fo=>{"use strict";y();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.validate=void 0;var Fk=le(),pn=Fc();async function Tk(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new pn.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let d=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>d){let h=e.output.argv.slice(d);throw new pn.UnexpectedArgsError({args:h,parse:e})}let a=[],c=!1;for(let[h,g]of Object.entries(e.input.args)){if(!g.required)c=!0;else if(c)throw new pn.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[h]===void 0&&a.push(g)}if(a.length>0){let h=Object.entries(e.input.flags).filter(([g,x])=>x.type==="option"&&!!x.multiple).map(([g])=>g);throw new pn.RequiredArgsError({args:a,flagsWithMultiple:h,parse:e})}}async function i(){let d=Object.entries(e.input.flags).flatMap(([h,g])=>e.output.flags[h]!==void 0?[...g.relationships?f(h,g):[],...g.dependsOn?[m(h,g.dependsOn)]:[],...g.exclusive?[u(h,g.exclusive)]:[],...g.exactlyOne?[l(h,g.exactlyOne)]:[]]:g.required?[{name:h,reason:`Missing required flag ${h}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),c=(await Promise.all(d)).filter(h=>h.status==="failed");if(c.length>0)throw new pn.FailedFlagValidationError({failed:c,parse:e})}async function n(d){if(t)return t;let a=d.map(async h=>typeof h=="string"?[h,e.output.flags[h]]:await h.when(e.output.flags)?[h.name,e.output.flags[h.name]]:null),c=await Promise.all(a);return t=Object.fromEntries(c.filter(h=>h!==null)),t}let o=d=>Object.keys(d).filter(a=>a!==void 0);function s(d){let a={name:d.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(h=>h[0]).filter(h=>e.output.flags[h]!==void 0).filter(h=>d.exactlyOne&&d.exactlyOne.includes(h)).length===0){let g=`Exactly one of the following must be provided: ${(0,Fk.uniq)(d.exactlyOne?.map(x=>`--${x}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function u(d,a){let c={name:d,validationFn:"validateExclusive"},h=await n(a),g=o(h);for(let x of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[x]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[d]?.setFromDefault)&&e.output.flags[x]!==void 0){let v=e.output.metadata.flags?.[x]?.defaultHelp??e.output.flags[x];return{...c,reason:`--${x}=${v} cannot also be provided when using --${d}`,status:"failed"}}return{...c,status:"success"}}async function l(d,a){let c={name:d,validationFn:"validateExactlyOne"},h=await n(a),g=o(h);for(let x of g)if(x!==d&&e.output.flags[x]!==void 0)return{...c,reason:`--${x} cannot also be provided when using --${d}`,status:"failed"};return{...c,status:"success"}}async function m(d,a){let c={name:d,validationFn:"validateDependsOn"},h=await n(a);if(!Object.values(h).every(x=>x!==void 0)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`All of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}async function p(d,a){let c={name:d,validationFn:"validateSome"},h=await n(a);if(!Object.values(h).some(Boolean)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`One of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}function f(d,a){return(a.relationships??[]).map(c=>{switch(c.type){case"all":return m(d,c.flags);case"some":return p(d,c.flags);case"none":return u(d,c.flags);default:throw new Error(`Unknown relationship type: ${c.type}`)}})}return r(),i()}Fo.validate=Tk});var xy=w(Kt=>{"use strict";y();var Ok=Kt&&Kt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.flagUsages=Kt.flagUsage=void 0;var kk=Ok(We()),Pk=le();function yy(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?kk.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Kt.flagUsage=yy;function Ik(e,t={}){return e.length===0?[]:(0,Pk.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>yy(r,t))}Kt.flagUsages=Ik});var Oc=w(Ei=>{"use strict";y();Object.defineProperty(Ei,"__esModule",{value:!0});Ei.parse=Ei.flagUsages=void 0;var Nk=my(),Rk=gy(),Mk=xy();Object.defineProperty(Ei,"flagUsages",{enumerable:!0,get:function(){return Mk.flagUsages}});async function Lk(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new Nk.Parser(r).parse();return await(0,Rk.validate)({input:r,output:n}),n}Ei.parse=Lk});var Ay=w(Ye=>{"use strict";y();var Bk=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),jk=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),by=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bk(t,e,r);return jk(t,e),t},Cy=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Command=void 0;var $k=Cy(We()),qk=S("node:url"),vy=S("node:util"),Dy=Cy(it()),To=nn(),Hk=Ao(),bi=by(Ge()),dn=Yr(),Uk=by(Oc()),wy=ac(),kc=Xr(),Wk=le(),Ey=Dy.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var Pc=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${Ey.name}@${Ey.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=ut()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,qk.fileURLToPath)(r));let i=await Hk.Config.load(r||S.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{To.ux.action.stop($k.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return bi.error(t,r)}exit(t=0){bi.exit(t)}async finally(t){try{let{config:r}=bi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(bi.config.debug=!0),this.config.errlog&&(bi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,vy.inspect)(t),To.ux.info(t,...r))}logJson(t){To.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,vy.inspect)(t),To.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,wy.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(u=>u.plugin.root===Dy.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await Uk.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||bi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,dn.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,kc.toConfiguredId)(this.ctor.id,this.config),i=(0,kc.toConfiguredId)(t,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,kc.toConfiguredId)(this.ctor.id,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,wy.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,dn.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let u=(0,Wk.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(u.length===0)return;let l=u.filter(m=>this.argv.some(p=>p.startsWith(m)));for(let m of l){let p=`--${n?.name}`;n?.char&&(p+=` | -${n?.char}`),this.warn((0,dn.formatFlagDeprecationWarning)(m,{to:p}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};Ye.Command=Pc});var Rc=w(Ke=>{"use strict";y();var zk=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.run=Ke.versionAddition=Ke.helpAddition=void 0;var _y=S("node:url"),Jk=zk(it()),Gk=nn(),Vk=Ao(),Nc=Wi(),Ci=hi(),Xk=fs(),Ic=ut()("oclif:main"),Yk=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Nc.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};Ke.helpAddition=Yk;var Kk=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};Ke.versionAddition=Kk;async function Qk(e,t){let r=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run"),i=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await Ci.Performance.collect(),Ci.Performance.debug()},o=async p=>{let f=await(0,Nc.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(p)};Ic(`process.execPath: ${process.execPath}`),Ic(`process.execArgv: ${process.execArgv}`),Ic("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof _y.URL)&&(t=(0,_y.fileURLToPath)(t));let s=await Vk.Config.load(t??S.main?.filename??__dirname);Jk.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[Xk.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[u,...l]=(0,Nc.normalizeArgv)(s,e);if(await s.runHook("init",{argv:l,id:u}),(0,Ke.versionAddition)(e,s)){Gk.ux.log(s.userAgent),await n();return}if((0,Ke.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(u);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(u))){await o([u]),await n();return}i?.stop();try{return await s.runCommand(u,l,m)}finally{await n()}}Ke.run=Qk});var Sy=w(Oo=>{"use strict";y();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.execute=void 0;var Zk=Fs(),eP=Ge(),tP=Es(),rP=Rc(),iP=qt();async function nP(e){if(!e.dir&&!e.loadOptions)throw new eP.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",iP.settings.debug=!0),(0,rP.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,Zk.flush)(),t)).catch(async t=>(0,tP.handle)(t))}Oo.execute=nP});var Ty=w(Fy=>{"use strict";y();Object.defineProperty(Fy,"__esModule",{value:!0})});var Po=w(I=>{"use strict";y();var sP=I&&I.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),oP=I&&I.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Or=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&sP(t,e,r);return oP(t,e),t},aP=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.toStandardizedId=I.toConfiguredId=I.settings=I.Performance=I.Parser=I.ModuleLoader=I.run=I.Interfaces=I.loadHelpClass=I.HelpBase=I.Help=I.CommandHelp=I.Flags=I.execute=I.handle=I.Errors=I.Plugin=I.Config=I.Command=I.stdout=I.stderr=I.flush=I.ux=I.Args=void 0;var uP=aP($t());function cP(){try{process.cwd()}catch(e){e.code==="ENOENT"&&uP.default.stderr(`WARNING: current directory does not exist
167
+ `)}}cP();I.Args=Or(rf());I.ux=Or(nn());var lP=Fs();Object.defineProperty(I,"flush",{enumerable:!0,get:function(){return lP.flush}});var Oy=Rg();Object.defineProperty(I,"stderr",{enumerable:!0,get:function(){return Oy.stderr}});Object.defineProperty(I,"stdout",{enumerable:!0,get:function(){return Oy.stdout}});var hP=Ay();Object.defineProperty(I,"Command",{enumerable:!0,get:function(){return hP.Command}});var ky=Ao();Object.defineProperty(I,"Config",{enumerable:!0,get:function(){return ky.Config}});Object.defineProperty(I,"Plugin",{enumerable:!0,get:function(){return ky.Plugin}});I.Errors=Or(Ge());var fP=Es();Object.defineProperty(I,"handle",{enumerable:!0,get:function(){return fP.handle}});var pP=Sy();Object.defineProperty(I,"execute",{enumerable:!0,get:function(){return pP.execute}});I.Flags=Or(Ws());var ko=Wi();Object.defineProperty(I,"CommandHelp",{enumerable:!0,get:function(){return ko.CommandHelp}});Object.defineProperty(I,"Help",{enumerable:!0,get:function(){return ko.Help}});Object.defineProperty(I,"HelpBase",{enumerable:!0,get:function(){return ko.HelpBase}});Object.defineProperty(I,"loadHelpClass",{enumerable:!0,get:function(){return ko.loadHelpClass}});I.Interfaces=Or(Ty());var dP=Rc();Object.defineProperty(I,"run",{enumerable:!0,get:function(){return dP.run}});I.ModuleLoader=Or(ji());I.Parser=Or(Oc());var mP=hi();Object.defineProperty(I,"Performance",{enumerable:!0,get:function(){return mP.Performance}});var gP=qt();Object.defineProperty(I,"settings",{enumerable:!0,get:function(){return gP.settings}});var Py=Xr();Object.defineProperty(I,"toConfiguredId",{enumerable:!0,get:function(){return Py.toConfiguredId}});Object.defineProperty(I,"toStandardizedId",{enumerable:!0,get:function(){return Py.toStandardizedId}})});var Dx=w((OH,Cx)=>{y();function gx(e){return Array.isArray(e)?e:[e]}var el="",yx=" ",Qc="\\",KP=/^\s+$/,QP=/(?:[^\\]|^)\\$/,ZP=/^\\!/,eI=/^\\#/,tI=/\r?\n/g,rI=/^\.*\/|^\.+$/,Zc="/",wx="node-ignore";typeof Symbol<"u"&&(wx=Symbol.for("node-ignore"));var xx=wx,iI=(e,t,r)=>Object.defineProperty(e,t,{value:r}),nI=/([0-z])-([0-z])/g,Ex=()=>!1,sI=e=>e.replace(nI,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:el),oI=e=>{let{length:t}=e;return e.slice(0,t-t%2)},aI=[[/^\uFEFF/,()=>el],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?yx:el)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+yx}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Qc],[/\\\\/g,()=>Qc],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Qc?`\\[${r}${oI(i)}${n}`:n==="]"&&i.length%2===0?`[${sI(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],vx=Object.create(null),uI=(e,t)=>{let r=vx[e];return r||(r=aI.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),vx[e]=r),t?new RegExp(r,"i"):new RegExp(r)},il=e=>typeof e=="string",cI=e=>e&&il(e)&&!KP.test(e)&&!QP.test(e)&&e.indexOf("#")!==0,lI=e=>e.split(tI),tl=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},hI=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(ZP,"!").replace(eI,"#");let n=uI(e,t);return new tl(r,e,i,n)},fI=(e,t)=>{throw new t(e)},Nt=(e,t,r)=>il(e)?e?Nt.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),bx=e=>rI.test(e);Nt.isNotRelative=bx;Nt.convert=e=>e;var rl=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){iI(this,xx,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[xx]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(cI(t)){let r=hI(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,gx(il(t)?lI(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Nt.convert(t);return Nt(o,t,this._allowRelativePaths?Ex:fI),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Zc)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Zc)+Zc,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return gx(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},qo=e=>new rl(e),pI=e=>Nt(e&&Nt.convert(e),e,Ex);qo.isPathValid=pI;qo.default=qo;Cx.exports=qo;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Nt.convert=e;let t=/^[a-z]:\//i;Nt.isNotRelative=r=>t.test(r)||bx(r)}});var Hx=w((YU,zI)=>{zI.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Jx=w((KU,Rt)=>{y();var yl=S("fs"),xl=S("path"),JI=S("os"),GI=S("crypto"),VI=Hx(),vl=VI.version,XI=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function YI(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
168
+ `);let i;for(;(i=XI.exec(r))!=null;){let n=i[1],o=i[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
169
+ `),o=o.replace(/\\r/g,"\r")),t[n]=o}return t}function KI(e){let t=zx(e),r=de.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let i=Wx(e).split(","),n=i.length,o;for(let s=0;s<n;s++)try{let u=i[s].trim(),l=eN(r,u);o=de.decrypt(l.ciphertext,l.key);break}catch(u){if(s+1>=n)throw u}return de.parse(o)}function QI(e){console.log(`[dotenv@${vl}][INFO] ${e}`)}function ZI(e){console.log(`[dotenv@${vl}][WARN] ${e}`)}function Uo(e){console.log(`[dotenv@${vl}][DEBUG] ${e}`)}function Wx(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function eN(e,t){let r;try{r=new URL(t)}catch(u){if(u.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw u}let i=r.password;if(!i){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let n=r.searchParams.get("environment");if(!n){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let o=`DOTENV_VAULT_${n.toUpperCase()}`,s=e.parsed[o];if(!s){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:s,key:i}}function zx(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)yl.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=xl.resolve(process.cwd(),".env.vault");return yl.existsSync(t)?t:null}function Ux(e){return e[0]==="~"?xl.join(JI.homedir(),e.slice(1)):e}function tN(e){QI("Loading env from encrypted .env.vault");let t=de._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),de.populate(r,t,e),{parsed:t}}function rN(e){let t=xl.resolve(process.cwd(),".env"),r="utf8",i=!!(e&&e.debug);e&&e.encoding?r=e.encoding:i&&Uo("No encoding is specified. UTF-8 is used by default");let n=[t];if(e&&e.path)if(!Array.isArray(e.path))n=[Ux(e.path)];else{n=[];for(let l of e.path)n.push(Ux(l))}let o,s={};for(let l of n)try{let m=de.parse(yl.readFileSync(l,{encoding:r}));de.populate(s,m,e)}catch(m){i&&Uo(`Failed to load ${l} ${m.message}`),o=m}let u=process.env;return e&&e.processEnv!=null&&(u=e.processEnv),de.populate(u,s,e),o?{parsed:s,error:o}:{parsed:s}}function iN(e){if(Wx(e).length===0)return de.configDotenv(e);let t=zx(e);return t?de._configVault(e):(ZI(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),de.configDotenv(e))}function nN(e,t){let r=Buffer.from(t.slice(-64),"hex"),i=Buffer.from(e,"base64"),n=i.subarray(0,12),o=i.subarray(-16);i=i.subarray(12,-16);try{let s=GI.createDecipheriv("aes-256-gcm",r,n);return s.setAuthTag(o),`${s.update(i)}${s.final()}`}catch(s){let u=s instanceof RangeError,l=s.message==="Invalid key length",m=s.message==="Unsupported state or unable to authenticate data";if(u||l){let p=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw p.code="INVALID_DOTENV_KEY",p}else if(m){let p=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw p.code="DECRYPTION_FAILED",p}else throw s}}function sN(e,t,r={}){let i=!!(r&&r.debug),n=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(n===!0&&(e[o]=t[o]),i&&Uo(n===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var de={configDotenv:rN,_configVault:tN,_parseVault:KI,config:iN,decrypt:nN,parse:YI,populate:sN};Rt.exports.configDotenv=de.configDotenv;Rt.exports._configVault=de._configVault;Rt.exports._parseVault=de._parseVault;Rt.exports.config=de.config;Rt.exports.decrypt=de.decrypt;Rt.exports.parse=de.parse;Rt.exports.populate=de.populate;Rt.exports=de});y();import{createRequire as Gv}from"node:module";import{pathToFileURL as ch}from"node:url";var lh=Gv(import.meta.url);async function hh(e){let t=lh.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]}),r=await jl(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(me(r.path),i);return import(ch(n).href)}function Vv(e,t){let r=lh.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(ch(r).href)}y();import ea from"node:path";import{EventEmitter as Xv}from"node:events";import{ReadableStream as Yv}from"node:stream/web";y();function jr({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var fh=Ct($v(),1),bN="H2O_LOG_EVENT",ph;function CN(e){ph=e.Response}var ra=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Kv={request:"Request",subrequest:"Sub request"};async function Qv(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var ta=new Xv,Ti=[];function Pn(e="ok",t){return new ph(e,t)}function Zv(e){return Ti.length=0,Pn()}function DN(e){return async function(r){let i=new URL(r.url);if(ra.has(i.pathname))return Pn();let{url:n,displayName:o,eventType:s,purpose:u,graphql:l,stackInfo:m,...p}=await Qv(r),f="",d=r.url,a=o;s==="subrequest"&&(a=a||l?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),d=n||r.url,l&&(f=jr({graphql:l})));let c=null,h=null;if(m?.file){e?.transformLocation&&(m.file=e.transformLocation(m.file));let{source:x,line:v,column:E}=(0,fh.mapSourcePosition)({source:m.file,line:m.line??0,column:m.column??0});c=`${x}:${v}:${E+1}`,h=`vscode://${ea.join("file",c)}`,c=c.split(ea.sep+"app"+ea.sep)[1]??c,m.func&&(c=`${m.func.replace(/\d+$/,"")} (${c})`)}let g={event:Kv[s]||s,data:JSON.stringify({...p,displayName:a,url:`${u} ${d}`.trim(),graphiqlLink:f,stackLine:c,stackLink:h})};return Ti.push(g),Ti.length>100&&Ti.shift(),ta.emit("request",g),Pn()}}function ew(e){let t=new Yv({start(r){let i=new TextEncoder,n=({event:u="message",data:l})=>{r.enqueue(i.encode(`event: ${u}
174
170
  `)),r.enqueue(i.encode(`data: ${l}
175
171
 
176
- `))};Ti.forEach(n),ia.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),ia.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return kn(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function wN(e){return e.method==="DELETE"?Qv():Zv(e)}y();var SN="/debug-network-server";function FN(){throw new F("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function TN({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),na.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",u="render";if(n){u=e.method==="GET"?"loader":"action";let m=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${m}]`}let l=t.status<300?X.green:t.status<400?X.cyan:X.errorText;dt(ie`${e.method.padStart(6)} ${l(String(t.status))} ${X.italic(u.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?V.dim(` ${r.durationMs}ms`):""}${s?" "+V.dim(s):""}${e.headers.purpose==="prefetch"?V.italic(V.dim(" prefetch")):""}`)}catch{e&&t?.status&&dt(`${e.method} ${t.status} ${e.url}`)}}y();y();y();y();y();y();var jn=At(Gh(),1);function Vh(e){let t=e.replace(/\r\n$/g,`
177
- `);return jn.parse(t)}function Yh(e){return jn.stringify(e)}var pa=At(Zh(),1),Wn=class extends Error{constructor(t,r){super(r),this.name="TomlFileError",this.path=t}},Jn=class e{static async read(t){if(!await $(t))throw new Wn(t,`TOML file not found: ${t}`);let r=await U(t),i=new e(t,{});return i.content=i.decode(r),i}constructor(t,r){this.errors=[],this.path=t,this.content=r}async patch(t){let r=ef(t),i=await U(this.path),n=(0,pa.updateTomlValues)(i,r),o=this.decode(n);await z(this.path,n),this.content=o}async remove(t){let r=t.split("."),i=await U(this.path),n=(0,pa.updateTomlValues)(i,[[r,void 0]]),o=this.decode(n);await z(this.path,n),this.content=o}async replace(t){let r=Yh(t);this.decode(r),await z(this.path,r),this.content=t}async transformRaw(t){let r=await U(this.path),i=t(r),n=this.decode(i);await z(this.path,i),this.content=n}decode(t){try{return Vh(t)}catch(r){if(r.line!==void 0&&r.col!==void 0){let i=String(r.message).split(`
178
- `)[0]??"Invalid TOML";throw new Wn(this.path,`${i} at row ${r.line}, col ${r.col}`)}throw r}}};function ef(e,t=[]){let r=[];for(let[i,n]of Object.entries(e)){let o=[...t,i];n!==null&&typeof n=="object"&&!Array.isArray(n)?r.push(...ef(n,o)):r.push([o,n])}return r}function ma(e,t){t||Ee(e)}async function ga(e,t,r){let i=await ya(t,r);if(!i){ma({body:"Environment file not found."},r?.silent);return}let s=(await Jn.read(i)).content.environments;if(!s){ma({body:["No environments found in",{command:i},{char:"."}]},r?.silent);return}let u=s[e];if(!u){ma({body:["Environment",{command:e},"not found."]},r?.silent);return}return await Kl(()=>({environmentFlags:JSON.stringify(u)})),u}async function ya(e,t){let r=t?.from&&t.from!=="."?t.from:Fi();return _n(e,{cwd:r,type:"file"})}var Vn=At(zv()),Gn=class extends Vn.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(t){return t.skipOclifErrorHandling=!0,await Vl(t,this.config),Vn.Errors.handle(t)}async init(){return this.exitWithTimestampWhenEnvVariablePresent(),uh(this.id??""),nh()||await Yl(this.config),await Bw(this.config),this.showNpmFlagWarning(),await ch(),super.init()}showNpmFlagWarning(){let t=this.constructor;Object.keys(t.flags||{}).map(n=>`npm_config_${Tl(n).replace(/^no_/,"")}`).some(n=>process.env[n]!==void 0)&&Ee({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})}exitWithTimestampWhenEnvVariablePresent(){Cl(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(ah(`
172
+ `))};Ti.forEach(n),ta.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),ta.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return Pn(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function AN(e){return e.method==="DELETE"?Zv():ew(e)}y();var PN="/debug-network-server";function IN(){throw new T("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function NN({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),ra.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",u="render";if(n){u=e.method==="GET"?"loader":"action";let m=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${m}]`}let l=t.status<300?Y.green:t.status<400?Y.cyan:Y.errorText;ht(ie`${e.method.padStart(6)} ${l(String(t.status))} ${Y.italic(u.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?V.dim(` ${r.durationMs}ms`):""}${s?" "+V.dim(s):""}${e.headers.purpose==="prefetch"?V.italic(V.dim(" prefetch")):""}`)}catch{e&&t?.status&&ht(`${e.method} ${t.status} ${e.url}`)}}y();y();y();y();y();y();var $n=Ct(Wh(),1);function zh(e){let t=e.replace(/\r\n$/g,`
173
+ `);return $n.parse(t)}function Jh(e){return $n.stringify(e)}var fa=Ct(Yh(),1),Jn=class extends Error{constructor(t,r){super(r),this.name="TomlFileError",this.path=t}},Gn=class e{static async read(t){if(!await $(t))throw new Jn(t,`TOML file not found: ${t}`);let r=await U(t),i=new e(t,{});return i.content=i.decode(r),i}constructor(t,r){this.errors=[],this.path=t,this.content=r}async patch(t){let r=Kh(t),i=await U(this.path),n=(0,fa.updateTomlValues)(i,r),o=this.decode(n);await W(this.path,n),this.content=o}async remove(t){let r=t.split("."),i=await U(this.path),n=(0,fa.updateTomlValues)(i,[[r,void 0]]),o=this.decode(n);await W(this.path,n),this.content=o}async replace(t){let r=Jh(t);this.decode(r),await W(this.path,r),this.content=t}async transformRaw(t){let r=await U(this.path),i=t(r),n=this.decode(i);await W(this.path,i),this.content=n}decode(t){try{return zh(t)}catch(r){if(r.line!==void 0&&r.col!==void 0){let i=String(r.message).split(`
174
+ `)[0]??"Invalid TOML";throw new Jn(this.path,`${i} at row ${r.line}, col ${r.col}`)}throw r}}};function Kh(e,t=[]){let r=[];for(let[i,n]of Object.entries(e)){let o=[...t,i];n!==null&&typeof n=="object"&&!Array.isArray(n)?r.push(...Kh(n,o)):r.push([o,n])}return r}function pa(e,t){t||we(e)}async function da(e,t,r){let i=await ma(t,r);if(!i){pa({body:"Environment file not found."},r?.silent);return}let s=(await Gn.read(i)).content.environments;if(!s){pa({body:["No environments found in",{command:i},{char:"."}]},r?.silent);return}let u=s[e];if(!u){pa({body:["Environment",{command:e},"not found."]},r?.silent);return}return await Vl(()=>({environmentFlags:JSON.stringify(u)})),u}async function ma(e,t){let r=t?.from&&t.from!=="."?t.from:Fi();return Sn(e,{cwd:r,type:"file"})}var Xn=Ct(zv()),Vn=class extends Xn.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(t){return t.skipOclifErrorHandling=!0,await zl(t,this.config),Xn.Errors.handle(t)}async init(){return this.exitWithTimestampWhenEnvVariablePresent(),sh(this.id??""),th()||await Jl(this.config),await jw(this.config),this.showNpmFlagWarning(),await oh(),super.init()}showNpmFlagWarning(){let t=this.constructor;Object.keys(t.flags||{}).map(n=>`npm_config_${Sl(n).replace(/^no_/,"")}`).some(n=>process.env[n]!==void 0)&&we({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})}exitWithTimestampWhenEnvVariablePresent(){El(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(nh(`
179
175
  SHOPIFY_CLI_TIMESTAMP_START
180
176
  { "timestamp": ${Date.now()} }
181
177
  SHOPIFY_CLI_TIMESTAMP_END
182
- `),process.exit(0))}async parse(t,r){let i=await super.parse(t,r);return i=await this.resultWithEnvironment(i,t,r),await Nw(i.flags),{...i,argv:i.argv}}environmentsFilename(){}failMissingNonTTYFlags(t,r){rh()||r.forEach(i=>{if(!(i in t))throw new F(ie`Flag not specified:
178
+ `),process.exit(0))}async parse(t,r){let i=await super.parse(t,r);return i=await this.resultWithEnvironment(i,t,r),await Rw(i.flags),{...i,argv:i.argv}}environmentsFilename(){}failMissingNonTTYFlags(t,r){Zl()||r.forEach(i=>{if(!(i in t))throw new T(ie`Flag not specified:
183
179
 
184
- ${X.cyan(i)}
180
+ ${Y.cyan(i)}
185
181
 
186
- This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(t,r,i){let n=t.flags,o=this.environmentsFilename();if(!o)return t;let s=await ya(o,{from:n.path}),u=[];n.environment&&(u=Array.isArray(n.environment)?n.environment:[n.environment]);let l=u.length>0;if(!s&&!l||l&&u.length>1)return t;let{environment:m,isDefaultEnvironment:d}=await this.loadEnvironmentForCommand(n.path,o,u[0]);if(!m||d&&!tf(r?.flags,"environment"))return t;let f=await super.parse(Mw(r),i),p=await super.parse(r,[...i??this.argv,...Lw(m,r,f),...d?["--environment","default"]:[]]);return Rw(f.flags,p.flags,d?"default":u[0],m),p}async loadEnvironmentForCommand(t,r,i){return i?{environment:await ga(i,r,{from:t}),isDefaultEnvironment:!1}:{environment:await ga("default",r,{from:t,silent:!0}),isDefaultEnvironment:!0}}};Gn.baseFlags={};async function Nw(e){await Xl(()=>({cmd_all_verbose:e.verbose,cmd_all_path_override:e.path!==void 0,cmd_all_path_override_hash:e.path===void 0?void 0:kl(e.path)}))}function Rw(e,t,r,i){let n={};for(let[s,u]of Object.entries(t)){let l=Object.prototype.hasOwnProperty.call(e,s),m=Object.prototype.hasOwnProperty.call(i,s);if(!l&&m){let d=s==="password"?`********${u.substr(-4)}`:u;n[s]=d}}if(Object.keys(n).length===0)return;let o=Object.entries(n).map(([s,u])=>`${s}: ${u}`);nt({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:o}}]})}function Mw(e){return e?.flags?{...e,flags:Object.fromEntries(Object.entries(e.flags).map(([t,r])=>{let i={...r};return delete i.default,[t,i]}))}:e}function Lw(e,t,r){let i=[];for(let[n,o]of Object.entries(e)){let s=tf(t?.flags,n),u=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,n);if(s&&!u)if(typeof o=="boolean")if(o)i.push(`--${n}`);else throw new F(ie`Environments can only specify true for boolean flags. Attempted to set ${X.yellow(n)} to false.`);else Array.isArray(o)?o.forEach(l=>i.push(`--${n}`,`${l}`)):i.push(`--${n}`,`${o}`)}return i}function tf(e,t){return!!e&&Object.prototype.hasOwnProperty.call(e,t)}async function Bw(e){let t=Array.from(e.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],i=t.filter(o=>r.includes(o.name));if(i.length>0){let o=i.map(s=>` - shopify plugins remove ${s.name}`).join(`
187
- `);Ee({headline:`Unsupported plugins detected: ${i.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
188
- ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.name,o]))}var Yn=Gn;var wn=At(No(),1);y();var Bx=At(No(),1);y();var re=At(No(),1);y();y();y();import{fileURLToPath as ky}from"node:url";import{existsSync as mP}from"node:fs";y();import{exec as dP}from"node:child_process";import{promisify as pP}from"node:util";var ct=pP(dP);function O3(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var jc=new URL("../../..",import.meta.url).pathname,pn=(()=>{try{let e=N(me(jc),"templates","skeleton");return mP(e)}catch{return!1}})(),j3=pn?jc:void 0,gP="assets/hydrogen",yP="starter",er="routes",Bc;async function xP(){if(Bc??=await _n("package.json",{cwd:ky(import.meta.url),type:"file"}),!Bc)throw new F("Could not find assets directory","Please report this error.");return Bc}async function lt(e,...t){return N(me(await xP()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${gP}`,e??"",...t)}async function mn(e,t){t??=await $c();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?ky(r):r.toString()}function $c(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Ro():lt(yP)}function Ro(){if(!pn)throw new F("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(me(jc),"templates","skeleton")}function vP(){return N(Ro(),"node_modules")}async function Py(){if(pn)return vP();let{stdout:e}=await ct("npm root");return e.trim()}var qc=["tailwind","vanilla-extract","css-modules","postcss"];async function Iy(e,t,r,i=(n,o)=>n){let n=await lt(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let u=await U(N(n,o));await z(N(r,s),i(u,o))}))}async function Ny(e,t,r){let i=Object.values(e).map(o=>$(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await ft({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as wP}from"node:fs/promises";y();Wv();import*as Ry from"fs/promises";import*as My from"path";var Hc={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function bt(e=process.cwd()){let t=(await Ry.lstat(e)).isFile()?e:My.resolve(e,"prettier.file");try{return await lh(t)||Hc}catch{return Hc}}async function tr(e,t=Hc,r=""){let i=bn(r);return hh(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function Di(e,t,r){let i=await r(await U(e));if(typeof i=="string")return t&&(i=await tr(i,t,e)),z(e,i)}var EP=["tsx","ts","jsx","js","mjs","cjs"];async function Te(e,t,r=EP){let i=await wP(e);if(i.includes(t)){let n=G(e,t);if(!await Mr(n))return{filepath:n};for(let o of["ts","js"]){let s=G(e,`${t}/index.${o}`);if(await $(G(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:G(e,o),extension:n,astType:s}}}return{}}var Ly=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Mo(e,t,r){let i=await Ko(N(t,"package.json")),n=await Ko(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(l=>!Ly.includes(l));for(let l of s){if(o.has(l))continue;let m=n[l],d=i[l],f=Array.isArray(m)&&Array.isArray(d)?[...d,...m]:typeof m=="object"&&typeof d=="object"?{...d,...m}:m;i[l]=f}let u=Object.entries(i.dependencies||{}).find(([l])=>l.startsWith("@remix-run/"))?.[1];for(let l of Ly)o.has(l)||n[l]&&(i[l]=[...new Set([...Object.keys(i[l]??{}),...Object.keys(n[l]??{})])].sort().reduce((m,d)=>{let f=n[l]?.[d]??i[l]?.[d];return d.startsWith("@remix-run/")&&u&&(f=u),m[d]=f,m},{}));await Hl(t,r?.onResult?.(i)??i)}y();y();async function gn(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function By(e,t,r){let{filepath:i,astType:n}=await Te(e,"root");if(!i||!n)throw new F(`Could not find root file in ${e}`);await Di(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let l=(await gn(n)).parse(o).root(),m=l.findAll({rule:{kind:"import_statement"}}).reverse(),d=m.find(h=>h.text().includes(".css"))||m.shift(),f=l.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new F('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),c=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
182
+ This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(t,r,i){let n=t.flags,o=this.environmentsFilename();if(!o)return t;let s=await ma(o,{from:n.path}),u=[];n.environment&&(u=Array.isArray(n.environment)?n.environment:[n.environment]);let l=u.length>0;if(!s&&!l||l&&u.length>1)return t;let{environment:m,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(n.path,o,u[0]);if(!m||p&&!Qh(r?.flags,"environment"))return t;let f=await super.parse(Lw(r),i),d=await super.parse(r,[...i??this.argv,...Bw(m,r,f),...p?["--environment","default"]:[]]);return Mw(f.flags,d.flags,p?"default":u[0],m),d}async loadEnvironmentForCommand(t,r,i){return i?{environment:await da(i,r,{from:t}),isDefaultEnvironment:!1}:{environment:await da("default",r,{from:t,silent:!0}),isDefaultEnvironment:!0}}};Vn.baseFlags={};async function Rw(e){await Gl(()=>({cmd_all_verbose:e.verbose,cmd_all_path_override:e.path!==void 0,cmd_all_path_override_hash:e.path===void 0?void 0:Tl(e.path)}))}function Mw(e,t,r,i){let n={};for(let[s,u]of Object.entries(t)){let l=Object.prototype.hasOwnProperty.call(e,s),m=Object.prototype.hasOwnProperty.call(i,s);if(!l&&m){let p=s==="password"?`********${u.substr(-4)}`:u;n[s]=p}}if(Object.keys(n).length===0)return;let o=Object.entries(n).map(([s,u])=>`${s}: ${u}`);rt({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:o}}]})}function Lw(e){return e?.flags?{...e,flags:Object.fromEntries(Object.entries(e.flags).map(([t,r])=>{let i={...r};return delete i.default,[t,i]}))}:e}function Bw(e,t,r){let i=[];for(let[n,o]of Object.entries(e)){let s=Qh(t?.flags,n),u=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,n);if(s&&!u)if(typeof o=="boolean")if(o)i.push(`--${n}`);else throw new T(ie`Environments can only specify true for boolean flags. Attempted to set ${Y.yellow(n)} to false.`);else Array.isArray(o)?o.forEach(l=>i.push(`--${n}`,`${l}`)):i.push(`--${n}`,`${o}`)}return i}function Qh(e,t){return!!e&&Object.prototype.hasOwnProperty.call(e,t)}async function jw(e){let t=Array.from(e.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],i=t.filter(o=>r.includes(o.name));if(i.length>0){let o=i.map(s=>` - shopify plugins remove ${s.name}`).join(`
183
+ `);we({headline:`Unsupported plugins detected: ${i.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
184
+ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.name,o]))}var Yn=Vn;var En=Ct(Po(),1);y();var $x=Ct(Po(),1);y();var re=Ct(Po(),1);y();y();y();import{fileURLToPath as Iy}from"node:url";import{existsSync as vP}from"node:fs";y();import{exec as yP}from"node:child_process";import{promisify as xP}from"node:util";var ot=xP(yP);function I$(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Lc=new URL("../../..",import.meta.url).pathname,mn=(()=>{try{let e=N(me(Lc),"templates","skeleton");return vP(e)}catch{return!1}})(),H$=mn?Lc:void 0,wP="assets/hydrogen",EP="starter",Qt="routes",Mc;async function bP(){if(Mc??=await Sn("package.json",{cwd:Iy(import.meta.url),type:"file"}),!Mc)throw new T("Could not find assets directory","Please report this error.");return Mc}async function at(e,...t){return N(me(await bP()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${wP}`,e??"",...t)}async function gn(e,t){t??=await Bc();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?Iy(r):r.toString()}function Bc(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Io():at(EP)}function Io(){if(!mn)throw new T("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(me(Lc),"templates","skeleton")}function CP(){return N(Io(),"node_modules")}async function Ny(){if(mn)return CP();let{stdout:e}=await ot("npm root");return e.trim()}var jc=["tailwind","vanilla-extract","css-modules","postcss"];async function Ry(e,t,r,i=(n,o)=>n){let n=await at(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let u=await U(N(n,o));await W(N(r,s),i(u,o))}))}async function My(e,t,r){let i=Object.values(e).map(o=>$(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await lt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as DP}from"node:fs/promises";y();Jv();import*as Ly from"fs/promises";import*as By from"path";var $c={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function wt(e=process.cwd()){let t=(await Ly.lstat(e)).isFile()?e:By.resolve(e,"prettier.file");try{return await ah(t)||$c}catch{return $c}}async function Zt(e,t=$c,r=""){let i=Cn(r);return uh(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function Di(e,t,r){let i=await r(await U(e));if(typeof i=="string")return t&&(i=await Zt(i,t,e)),W(e,i)}var AP=["tsx","ts","jsx","js","mjs","cjs"];async function Fe(e,t,r=AP){let i=await DP(e);if(i.includes(t)){let n=G(e,t);if(!await Rr(n))return{filepath:n};for(let o of["ts","js"]){let s=G(e,`${t}/index.${o}`);if(await $(G(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:G(e,o),extension:n,astType:s}}}return{}}var jy=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function No(e,t,r){let i=await Xo(N(t,"package.json")),n=await Xo(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(l=>!jy.includes(l));for(let l of s){if(o.has(l))continue;let m=n[l],p=i[l],f=Array.isArray(m)&&Array.isArray(p)?[...p,...m]:typeof m=="object"&&typeof p=="object"?{...p,...m}:m;i[l]=f}let u=Object.entries(i.dependencies||{}).find(([l])=>l.startsWith("@remix-run/"))?.[1];for(let l of jy)o.has(l)||n[l]&&(i[l]=[...new Set([...Object.keys(i[l]??{}),...Object.keys(n[l]??{})])].sort().reduce((m,p)=>{let f=n[l]?.[p]??i[l]?.[p];return p.startsWith("@remix-run/")&&u&&(f=u),m[p]=f,m},{}));await $l(t,r?.onResult?.(i)??i)}y();y();async function yn(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function $y(e,t,r){let{filepath:i,astType:n}=await Fe(e,"root");if(!i||!n)throw new T(`Could not find root file in ${e}`);await Di(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let l=(await yn(n)).parse(o).root(),m=l.findAll({rule:{kind:"import_statement"}}).reverse(),p=m.find(h=>h.text().includes(".css"))||m.shift(),f=l.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!p||!f)throw new T('Could not find a "links" export in root file. Please add one and try again.');let d=p.text(),a=f.text(),c=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(d,d+`
189
185
  `+s).replace(a,c+`
190
- `+a)})}async function Lo(e,t,r,i){let{filepath:n,astType:o}=await Te(e,"vite.config");if(!n||!o)throw new F(`Could not find vite.config file in ${e}`);await Di(n,t,async s=>{let u=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await gn(o)).parse(s).root(),d=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(bP);if(!d||!f)throw new F('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),c=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
191
- `+u).replace(a,a.replace("[",`[${c},`))})}var bP={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var jy="styles/tailwind.css";async function $y({rootDirectory:e,appDirectory:t},r=!1){let i=$t(e,t),n={"tailwind.css":N(i,jy)};if(!await Ny(n,t,r)){dt("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Mo(await lt("tailwind"),e),Iy("tailwind",n,e),bt(e).then(s=>Promise.all([By(t,s,{name:"tailwindCss",path:`${jy}?url`,isDefault:!0}),Lo(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function qy({rootDirectory:e}){return{workPromise:Promise.all([Mo(await lt("vanilla-extract"),e),bt(e).then(r=>Lo(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Uc=[...qc,"none"],zc={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},k$={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Hy(e,t,r){switch(e){case"tailwind":return $y(t,r);case"vanilla-extract":return qy(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Uy(e){let t=Object.entries({...zc,...e?.extraChoices});return ht({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function rr(e,t,r=!0){let{transpileTs:i}=await import("./morph-6DCXNO2H.js");return i(e,t,r)}y();var zy={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},CP=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(zy)]);function DP(e,t=!1){let r={compilerOptions:{...zy}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of CP)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Wc(e,t=!0){let r=N(e,"app/routes.ts");if(await $(r)){let s=(await U(r)).replace("./layout.tsx","./layout.jsx");await z(r,s)}let i=await An("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await bt();for(let o of i){if(o.endsWith(".d.ts")){t||await Dn(o);continue}let s=await U(o),u=await tr(await rr(s,o,t),n);await Dn(o),await z(o.replace(/\.ts(x?)$/,".js$1"),u)}try{let o=N(e,"remix.config.js"),s=await U(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await z(o,s)}catch(o){K(`Could not change TS extensions in remix.config.js:
192
- `+o.stack)}try{let o=N(e,"tsconfig.json"),s=await U(o),u=DP(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await Dn(o),await z(N(e,"jsconfig.json"),JSON.stringify(u,null,2))}catch(o){K(`Could not transpile tsconfig.json:
193
- `+o.stack)}try{let o=JSON.parse(await U(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[u,l]of Object.entries(o.scripts||{}))typeof l=="string"&&l.includes("react-router typegen")&&(o.scripts[u]=l.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let l of Object.keys(o.devDependencies))l.startsWith("@types/")&&delete o.devDependencies[l];let u=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(u,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(u,""))}await z(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){K(`Could not remove TS dependencies from package.json:
194
- `+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await Te(e,".eslintrc",["cjs","js"]),s=await U(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await z(o,await tr(s,n))}catch(o){K(`Could not remove TS rules from .eslintrc:
195
- `+o.stack)}}async function Wy({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await _P({rootDirectory:e,contextCreate:t}),u=await U(i),l=await AP({rootDirectory:e,contextCreate:t},r,i);await Di(o,r,async m=>{let f=(await gn(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",c=u.match(/^(export )?function (\w+)/m)?.[2];if(!c)throw new Error("Could not find the i18n function name");let h=`${c}(${a})`,g="@shopify/hydrogen",x="createHydrogenContext",v=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${x}`}}}),[E,C]=v?.text().split(/\s+as\s+/)||[];if(E=C??E,!E)throw new F(`Could not find a Hydrogen import in ${t}`,`Please import "${x}" from "${g}"`);let A=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:E}}}}});if(!A)throw new F(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${E}({...})`);let P=A.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(c))throw new F("An i18n strategy is already set up.",`Remove the existing i18n property in the ${E}({...}) call to set up a new one.`);let{start:Y,end:we}=P.range();m=m.slice(0,Y.index)+h+m.slice(we.index)}else{let{end:Y}=A.range(),we=m.slice(0,Y.index-1);m=we+((/,\s*$/.test(we)?"":",")+`i18n: ${h}`)+m.slice(Y.index-1)}let j=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},J=N("~",$t(N(e,"app"),l.slice(0,-bn(l).length)));return m=m.slice(0,j.end.index)+`import {getLocaleFromRequest} from "${J}";`+m.slice(j.end.index),m})}async function AP({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,me(t),n?"i18n.js":"i18n.ts");if(await $(o))throw new F(`${o} already exist. Renamed or remove the existing file before continue.`);return await Rr(i,o),await Di(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await rr(s,i)),s)),o}async function _P({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:G(e,t),astType:r}:await Te(e,N(t));if(!i||!n)throw new F(`Could not find a context create file at ${G(e,t)}`);return{filepath:i,astType:n}}var SP=["subfolders","domains","subdomains"],Jc={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},Gc=[...SP,"none"];async function Jy(e,t){let r=await lt("i18n",`${e}.ts`);if(!await $(r))throw new Error("Unknown strategy");let i=await bt(t.rootDirectory);await Wy(t,i,r)}async function Gy(e){let t=Object.entries({...Jc,...e?.extraChoices});return ht({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var FP=3e3,TP=9229,yn={path:{path:re.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:re.Flags.integer({description:`The port to run the server on. Defaults to ${FP}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:re.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:re.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>Sn(e)})},installDeps:{"install-deps":re.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:re.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":re.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":re.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:re.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:re.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":re.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:re.Flags.string({description:`Sets the styling strategy to use. One of ${Uc.map(e=>`\`${e}\``).join(", ")}.`,choices:Uc,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:re.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${Gc.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:Gc,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:re.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:re.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":re.Flags.integer({description:`The port where the inspector is available. Defaults to ${TP}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:re.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":re.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":re.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":re.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:re.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Vc(e){return Object.entries(e).reduce((t,[r,i])=>(t[Sl(r)]=i,t),{})}function gq(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let u=o.replace(/^\-{1,2}/,""),l=!s||s.startsWith("-")?!0:s;l===!0&&u.startsWith("no-")&&(l=!1,u=u.replace("no-","")),i[t[u]||u]=l}}return Vc(i)}function yq(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();async function et(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Ml({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;throw s?.some?.(u=>u.message.includes("app is not installed"))?new F("Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"):s?.some?.(u=>u.message.includes("Access denied for hydrogenStorefrontCreate field"))?new F("Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]):o}}y();var OP=/gid:\/\/shopify\/\w*\/(\d+)/;function Vy(e){let t=OP.exec(e);if(t&&t[1]!==void 0)return t[1];throw new F(`Invalid Global ID: ${e}`)}var kP=`#graphql
186
+ `+a)})}async function Ro(e,t,r,i){let{filepath:n,astType:o}=await Fe(e,"vite.config");if(!n||!o)throw new T(`Could not find vite.config file in ${e}`);await Di(n,t,async s=>{let u=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await yn(o)).parse(s).root(),p=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(_P);if(!p||!f)throw new T('Could not find a "plugins" key in Vite config file. Please add one and try again.');let d=p.text(),a=f.text(),c=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(d,d+`
187
+ `+u).replace(a,a.replace("[",`[${c},`))})}var _P={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var qy="styles/tailwind.css";async function Hy({rootDirectory:e,appDirectory:t},r=!1){let i=Bt(e,t),n={"tailwind.css":N(i,qy)};if(!await My(n,t,r)){ht("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([No(await at("tailwind"),e),Ry("tailwind",n,e),wt(e).then(s=>Promise.all([$y(t,s,{name:"tailwindCss",path:`${qy}?url`,isDefault:!0}),Ro(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Uy({rootDirectory:e}){return{workPromise:Promise.all([No(await at("vanilla-extract"),e),wt(e).then(r=>Ro(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var qc=[...jc,"none"],Hc={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},N3={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Wy(e,t,r){switch(e){case"tailwind":return Hy(t,r);case"vanilla-extract":return Uy(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function zy(e){let t=Object.entries({...Hc,...e?.extraChoices});return ct({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function er(e,t,r=!0){let{transpileTs:i}=await import("./morph-Q32V442A.js");return i(e,t,r)}y();var Jy={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},SP=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Jy)]);function FP(e,t=!1){let r={compilerOptions:{...Jy}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of SP)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Uc(e,t=!0){let r=N(e,"app/routes.ts");if(await $(r)){let s=(await U(r)).replace("./layout.tsx","./layout.jsx");await W(r,s)}let i=await _n("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await wt();for(let o of i){if(o.endsWith(".d.ts")){t||await An(o);continue}let s=await U(o),u=await Zt(await er(s,o,t),n);await An(o),await W(o.replace(/\.ts(x?)$/,".js$1"),u)}try{let o=N(e,"remix.config.js"),s=await U(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await W(o,s)}catch(o){K(`Could not change TS extensions in remix.config.js:
188
+ `+o.stack)}try{let o=N(e,"tsconfig.json"),s=await U(o),u=FP(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await An(o),await W(N(e,"jsconfig.json"),JSON.stringify(u,null,2))}catch(o){K(`Could not transpile tsconfig.json:
189
+ `+o.stack)}try{let o=JSON.parse(await U(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[u,l]of Object.entries(o.scripts||{}))typeof l=="string"&&l.includes("react-router typegen")&&(o.scripts[u]=l.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let l of Object.keys(o.devDependencies))l.startsWith("@types/")&&delete o.devDependencies[l];let u=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(u,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(u,""))}await W(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){K(`Could not remove TS dependencies from package.json:
190
+ `+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await Fe(e,".eslintrc",["cjs","js"]),s=await U(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await W(o,await Zt(s,n))}catch(o){K(`Could not remove TS rules from .eslintrc:
191
+ `+o.stack)}}async function Gy({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await OP({rootDirectory:e,contextCreate:t}),u=await U(i),l=await TP({rootDirectory:e,contextCreate:t},r,i);await Di(o,r,async m=>{let f=(await yn(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",c=u.match(/^(export )?function (\w+)/m)?.[2];if(!c)throw new Error("Could not find the i18n function name");let h=`${c}(${a})`,g="@shopify/hydrogen",x="createHydrogenContext",v=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${x}`}}}),[E,C]=v?.text().split(/\s+as\s+/)||[];if(E=C??E,!E)throw new T(`Could not find a Hydrogen import in ${t}`,`Please import "${x}" from "${g}"`);let A=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:E}}}}});if(!A)throw new T(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${E}({...})`);let P=A.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(c))throw new T("An i18n strategy is already set up.",`Remove the existing i18n property in the ${E}({...}) call to set up a new one.`);let{start:X,end:ve}=P.range();m=m.slice(0,X.index)+h+m.slice(ve.index)}else{let{end:X}=A.range(),ve=m.slice(0,X.index-1);m=ve+((/,\s*$/.test(ve)?"":",")+`i18n: ${h}`)+m.slice(X.index-1)}let j=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},J=N("~",Bt(N(e,"app"),l.slice(0,-Cn(l).length)));return m=m.slice(0,j.end.index)+`import {getLocaleFromRequest} from "${J}";`+m.slice(j.end.index),m})}async function TP({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,me(t),n?"i18n.js":"i18n.ts");if(await $(o))throw new T(`${o} already exist. Renamed or remove the existing file before continue.`);return await Nr(i,o),await Di(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await er(s,i)),s)),o}async function OP({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:G(e,t),astType:r}:await Fe(e,N(t));if(!i||!n)throw new T(`Could not find a context create file at ${G(e,t)}`);return{filepath:i,astType:n}}var kP=["subfolders","domains","subdomains"],Wc={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},zc=[...kP,"none"];async function Vy(e,t){let r=await at("i18n",`${e}.ts`);if(!await $(r))throw new Error("Unknown strategy");let i=await wt(t.rootDirectory);await Gy(t,i,r)}async function Xy(e){let t=Object.entries({...Wc,...e?.extraChoices});return ct({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var PP=3e3,IP=9229,xn={path:{path:re.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:re.Flags.integer({description:`The port to run the server on. Defaults to ${PP}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:re.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:re.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>Fn(e)})},installDeps:{"install-deps":re.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:re.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":re.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":re.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:re.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:re.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":re.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:re.Flags.string({description:`Sets the styling strategy to use. One of ${qc.map(e=>`\`${e}\``).join(", ")}.`,choices:qc,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:re.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${zc.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:zc,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:re.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:re.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":re.Flags.integer({description:`The port where the inspector is available. Defaults to ${IP}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:re.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":re.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":re.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":re.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:re.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Jc(e){return Object.entries(e).reduce((t,[r,i])=>(t[Al(r)]=i,t),{})}function vq(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let u=o.replace(/^\-{1,2}/,""),l=!s||s.startsWith("-")?!0:s;l===!0&&u.startsWith("no-")&&(l=!1,u=u.replace("no-","")),i[t[u]||u]=l}}return Jc(i)}function wq(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();var NP=[{pattern:"app is not installed",abort:["Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"]},{pattern:"Access denied for hydrogenStorefrontCreate field",abort:["Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]]},{pattern:"Access denied for hydrogenStorefronts field",abort:["Couldn't access Hydrogen storefronts",["Common reasons for this error include:",{list:{items:["You don't have full access to apps or access to the Hydrogen channel.","The Hydrogen sales channel isn't installed on the store."]}}]]}];async function Qe(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Nl({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;for(let{pattern:u,abort:l}of NP)if(s?.some?.(m=>m.message.includes(u)))throw new T(...l);throw o}}y();var RP=/gid:\/\/shopify\/\w*\/(\d+)/;function Yy(e){let t=RP.exec(e);if(t&&t[1]!==void 0)return t[1];throw new T(`Invalid Global ID: ${e}`)}var MP=`#graphql
196
192
  query LinkStorefront {
197
193
  hydrogenStorefronts {
198
194
  id
@@ -200,9 +196,9 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
200
196
  productionUrl
201
197
  }
202
198
  }
203
- `;async function Bo(e){let{hydrogenStorefronts:t}=await et(kP,e);return t.map(r=>({...r,parsedId:Vy(r.id)}))}y();var Pr=".shopify",Ai="project.json";async function Yy(e){let t=G(e,Pr,Ai);await $(t)&&await z(t,JSON.stringify({}))}async function _i(e){let t=G(e,Pr,Ai);return await $(t)?JSON.parse(await U(t)):{}}async function Xy(e,{shop:t,shopName:r,email:i}){let n=G(e,Pr,Ai),o={};await $(n)?o=JSON.parse(await U(n)):await Cn(me(n));let s={...o,shop:t,shopName:r,email:i};return await z(n,JSON.stringify(s)),await jo(e),s}async function Ky(e,{id:t,title:r}){try{let i=G(e,Pr,Ai),o={...JSON.parse(await U(i)),storefront:{id:t,title:r}};return await z(i,JSON.stringify(o)),await jo(e),o}catch{throw new F("Project configuration could not be found.")}}async function Nq(e){try{let t=G(e,Pr,Ai),i={...JSON.parse(await U(t)),storefront:void 0};return await z(t,JSON.stringify(i)),await jo(e),i}catch{throw new F("Project configuration could not be found.")}}async function jo(e){try{let t=G(e,".gitignore"),r=await $(t)?await U(t):"";return r.includes(".shopify")?!1:(r.length>0&&(r+=`
204
- `),r+=`${Pr}\r
205
- `,await z(t,r),!0)}catch{return!1}}async function Qy(e,t){try{let r=G(e,Pr,Ai),i=JSON.parse(await U(r)),n={...i,storefront:{...i.storefront,customerAccountConfig:t}};return await z(r,JSON.stringify(n)),await jo(e),n}catch{throw new F("Project configuration could not be found.")}}y();var PP=`#graphql
199
+ `;async function Mo(e){let{hydrogenStorefronts:t}=await Qe(MP,e);return t.map(r=>({...r,parsedId:Yy(r.id)}))}y();var kr=".shopify",Ai="project.json";async function Ky(e){let t=G(e,kr,Ai);await $(t)&&await W(t,JSON.stringify({}))}async function _i(e){let t=G(e,kr,Ai);return await $(t)?JSON.parse(await U(t)):{}}async function Qy(e,{shop:t,shopName:r,email:i}){let n=G(e,kr,Ai),o={};await $(n)?o=JSON.parse(await U(n)):await Dn(me(n));let s={...o,shop:t,shopName:r,email:i};return await W(n,JSON.stringify(s)),await Lo(e),s}async function Zy(e,{id:t,title:r}){try{let i=G(e,kr,Ai),o={...JSON.parse(await U(i)),storefront:{id:t,title:r}};return await W(i,JSON.stringify(o)),await Lo(e),o}catch{throw new T("Project configuration could not be found.")}}async function Lq(e){try{let t=G(e,kr,Ai),i={...JSON.parse(await U(t)),storefront:void 0};return await W(t,JSON.stringify(i)),await Lo(e),i}catch{throw new T("Project configuration could not be found.")}}async function Lo(e){try{let t=G(e,".gitignore"),r=await $(t)?await U(t):"";return r.includes(".shopify")?!1:(r.length>0&&(r+=`
200
+ `),r+=`${kr}\r
201
+ `,await W(t,r),!0)}catch{return!1}}async function ex(e,t){try{let r=G(e,kr,Ai),i=JSON.parse(await U(r)),n={...i,storefront:{...i.storefront,customerAccountConfig:t}};return await W(r,JSON.stringify(n)),await Lo(e),n}catch{throw new T("Project configuration could not be found.")}}y();var LP=`#graphql
206
202
  mutation CreateStorefront($title: String!) {
207
203
  hydrogenStorefrontCreate(title: $title) {
208
204
  hydrogenStorefront {
@@ -218,7 +214,7 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
218
214
  jobId
219
215
  }
220
216
  }
221
- `;async function Zy(e,t){let{hydrogenStorefrontCreate:{hydrogenStorefront:r,userErrors:i,jobId:n}}=await et(PP,e,{title:t});if(!r||!n||i.length>0){let o=i.map(({message:s})=>s).join(", ");throw new F("Could not create storefront. "+o)}return{jobId:n,storefront:r}}y();var IP=`#graphql
217
+ `;async function tx(e,t){let{hydrogenStorefrontCreate:{hydrogenStorefront:r,userErrors:i,jobId:n}}=await Qe(LP,e,{title:t});if(!r||!n||i.length>0){let o=i.map(({message:s})=>s).join(", ");throw new T("Could not create storefront. "+o)}return{jobId:n,storefront:r}}y();var BP=`#graphql
222
218
  query FetchJob($id: ID!) {
223
219
  hydrogenStorefrontJob(id: $id) {
224
220
  id
@@ -229,27 +225,27 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
229
225
  }
230
226
  }
231
227
  }
232
- `;async function NP(e,t){let{hydrogenStorefrontJob:r}=await et(IP,e,{id:t});return r}function ex(e,t){return new Promise((r,i)=>{let n=setInterval(async()=>{let o=await NP(e,t);if(o.errors.length>0)return clearInterval(n),i();if(o.done)return clearInterval(n),r()},500)})}y();function $o(e=""){return e.replace(/[\W_]+/g," ").split(" ").filter(t=>t.length>0).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}y();import Xc from"node:os";var Be="h2",Kc=()=>Xc.platform()==="win32",nx=()=>!!process.env.MINGW_PREFIX;function Qc(e){return e[0]==="~"?N(Xc.homedir(),e.slice(1)):e}function RP(e){try{return $(Qc(e))}catch{return!1}}async function MP(e){try{return await ct(`which ${e}`),!0}catch{return!1}}function sx(e){return e==="bash"?"~/.bashrc":e==="zsh"?"~/.zshrc":`~/.config/fish/functions/${Be}.fish`}async function ox(e,t){let r=sx(t);try{return t==="fish"?await RP(r):!!(await ct(`grep 'alias ${e}' ${Qc(r)}`)).stdout}catch{return!1}}async function LP(e,t,r=!1){let i=sx(e);t=`"${t}"`,t=t.replaceAll(`
233
- `,"\\n"),Kc()||(t=t.replaceAll("$","\\$"));try{return await ct(`printf ${t} ${r?">>":">"} ${Qc(i)}`),!0}catch(n){return K(`Could not create or modify ${i}:
234
- `+n.stack),!1}}async function Yc(e,t,r){return await MP(e)?await ox(t,e)?!0:await LP(e,r,e!=="fish"):!1}async function tx(e,t){try{return await ct(e,{shell:t}),!0}catch(r){return K(`Could not run shell script for ${t}:
235
- `+r.stack),!1}}function BP(e){return["zsh","bash","fish"].includes(e)}async function jP(){try{if(Kc()&&!nx())await ct(`Get-Alias -Name ${Be}`);else{let e=Xc.userInfo().shell?.split("/").pop()??"bash";return BP(e)?await ox(Be,e):!1}return!0}catch{return!1}}async function ax(){return Kc()&&!nx()?await UP():await qP()}var rx=`
228
+ `;async function jP(e,t){let{hydrogenStorefrontJob:r}=await Qe(BP,e,{id:t});return r}function rx(e,t){return new Promise((r,i)=>{let n=setInterval(async()=>{let o=await jP(e,t);if(o.errors.length>0)return clearInterval(n),i();if(o.done)return clearInterval(n),r()},500)})}y();function Bo(e=""){return e.replace(/[\W_]+/g," ").split(" ").filter(t=>t.length>0).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}y();import Vc from"node:os";var Me="h2",Xc=()=>Vc.platform()==="win32",ox=()=>!!process.env.MINGW_PREFIX;function Yc(e){return e[0]==="~"?N(Vc.homedir(),e.slice(1)):e}function $P(e){try{return $(Yc(e))}catch{return!1}}async function qP(e){try{return await ot(`which ${e}`),!0}catch{return!1}}function ax(e){return e==="bash"?"~/.bashrc":e==="zsh"?"~/.zshrc":`~/.config/fish/functions/${Me}.fish`}async function ux(e,t){let r=ax(t);try{return t==="fish"?await $P(r):!!(await ot(`grep 'alias ${e}' ${Yc(r)}`)).stdout}catch{return!1}}async function HP(e,t,r=!1){let i=ax(e);t=`"${t}"`,t=t.replaceAll(`
229
+ `,"\\n"),Xc()||(t=t.replaceAll("$","\\$"));try{return await ot(`printf ${t} ${r?">>":">"} ${Yc(i)}`),!0}catch(n){return K(`Could not create or modify ${i}:
230
+ `+n.stack),!1}}async function Gc(e,t,r){return await qP(e)?await ux(t,e)?!0:await HP(e,r,e!=="fish"):!1}async function ix(e,t){try{return await ot(e,{shell:t}),!0}catch(r){return K(`Could not run shell script for ${t}:
231
+ `+r.stack),!1}}function UP(e){return["zsh","bash","fish"].includes(e)}async function WP(){try{if(Xc()&&!ox())await ot(`Get-Alias -Name ${Me}`);else{let e=Vc.userInfo().shell?.split("/").pop()??"bash";return UP(e)?await ux(Me,e):!1}return!0}catch{return!1}}async function cx(){return Xc()&&!ox()?await VP():await JP()}var nx=`
236
232
  # Shopify Hydrogen alias to local projects
237
- alias ${Be}='$(npm prefix -s)/node_modules/.bin/shopify hydrogen'
238
- `,$P=`
239
- function ${Be} --wraps='shopify hydrogen' --description 'Shortcut for the Hydrogen CLI'
233
+ alias ${Me}='$(npm prefix -s)/node_modules/.bin/shopify hydrogen'
234
+ `,zP=`
235
+ function ${Me} --wraps='shopify hydrogen' --description 'Shortcut for the Hydrogen CLI'
240
236
  set npmPrefix (npm prefix -s)
241
237
  $npmPrefix/node_modules/.bin/shopify hydrogen $argv
242
238
  end
243
- `;async function qP(){let e=[];return await Yc("zsh",Be,rx)&&e.push("zsh"),await Yc("bash",Be,rx)&&e.push("bash"),await Yc("fish",Be,$P)&&e.push("fish"),e}var HP=`function Invoke-Local-H2 {$npmPrefix = npm prefix -s; Invoke-Expression "$npmPrefix\\node_modules\\.bin\\shopify.ps1 hydrogen $Args"}; Set-Alias -Name ${Be} -Value Invoke-Local-H2`,ix=`
239
+ `;async function JP(){let e=[];return await Gc("zsh",Me,nx)&&e.push("zsh"),await Gc("bash",Me,nx)&&e.push("bash"),await Gc("fish",Me,zP)&&e.push("fish"),e}var GP=`function Invoke-Local-H2 {$npmPrefix = npm prefix -s; Invoke-Expression "$npmPrefix\\node_modules\\.bin\\shopify.ps1 hydrogen $Args"}; Set-Alias -Name ${Me} -Value Invoke-Local-H2`,sx=`
244
240
  if (!(Test-Path -Path $PROFILE)) {
245
241
  New-Item -ItemType File -Path $PROFILE -Force
246
242
  }
247
243
 
248
244
  $profileContent = Get-Content -Path $PROFILE
249
245
  if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
250
- Add-Content -Path $PROFILE -Value '${HP}'
246
+ Add-Content -Path $PROFILE -Value '${GP}'
251
247
  }
252
- `;async function UP(){let e=[];return await tx(ix,"powershell.exe")&&e.push("PowerShell"),await tx(ix,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function qo(e=process.cwd(),t){if(await jP())return Be;let r="npx",i=t??await jl(e).catch(()=>null);return(i==="bun"||i==="pnpm"||i==="yarn")&&(r=i),`${r} shopify hydrogen`}y();y();var zP=`#graphql
248
+ `;async function VP(){let e=[];return await ix(sx,"powershell.exe")&&e.push("PowerShell"),await ix(sx,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function jo(e=process.cwd(),t){if(await WP())return Me;let r="npx",i=t??await Ll(e).catch(()=>null);return(i==="bun"||i==="pnpm"||i==="yarn")&&(r=i),`${r} shopify hydrogen`}y();y();var XP=`#graphql
253
249
  query currentUserAccount {
254
250
  currentUserAccount {
255
251
  email
@@ -301,21 +297,21 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
301
297
  status
302
298
  webUrl
303
299
  }
304
- `;async function ux(e){let{currentUserAccount:t}=await Ul(zP,e);if(!t)throw new F("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();var cx={...console},lx=new Set,hx=new Set,fx=[];function xn(e,...t){hx.has(e)||(hx.add(e),fx.push(...t))}var Zc=new Set;function WP(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Zc.has(r)?!0:(Zc.add(r),t!==!0&&setTimeout(()=>Zc.delete(r),t??1e3),!1)}function vn([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function Nt(e,t){lx.has(e)||(lx.add(e),console[e]=(...r)=>{if(t!==!1&&WP(r,t?.(r)))return;let i=fx.reduce((o,[s,u])=>(s(r,o.length)&&o.push(u),o),[]);if(i.length===0)return cx[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return cx[e](...n)})}function hH({workerReload:e}={}){Nt("log"),Nt("error"),Nt("warn",vn),Nt("debug",!1);let t=!0;xn("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let u=s[0];if(e!==!1&&u.includes("Worker reloaded")){if(t){t=!1;return}return[u.replace("[mf:inf] ","\u{1F504} ")+`
305
- `,...s.slice(1)]}u.includes("[mf:err]")}]),xn("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return typeof u=="string"&&/^Network connection lost/i.test(u)},()=>{}]);let r=!1,i=!1;xn("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return/virtual-routes/.test(u)&&/(Failed to load url|Could not resolve module for file)/i.test(u)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],u)=>{if(u===0&&typeof s=="string"){let l=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(l&&!i||!l&&i)&&process.stdout.write(`
306
- `),i=l,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function Ho(e=!1){Nt("log",vn),xn("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(Zl.eraseLines(e?5:6))}])}function fH(e){Nt("error"),Nt("warn",vn),Nt("log",vn),Nt("info",vn),xn("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,u]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!u)return t;let l=`In Hydrogen's \`${s.trim()}\`:
300
+ `;async function lx(e){let{currentUserAccount:t}=await ql(XP,e);if(!t)throw new T("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();var hx={...console},fx=new Set,px=new Set,dx=[];function vn(e,...t){px.has(e)||(px.add(e),dx.push(...t))}var Kc=new Set;function YP(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Kc.has(r)?!0:(Kc.add(r),t!==!0&&setTimeout(()=>Kc.delete(r),t??1e3),!1)}function wn([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function Pt(e,t){fx.has(e)||(fx.add(e),console[e]=(...r)=>{if(t!==!1&&YP(r,t?.(r)))return;let i=dx.reduce((o,[s,u])=>(s(r,o.length)&&o.push(u),o),[]);if(i.length===0)return hx[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return hx[e](...n)})}function dH({workerReload:e}={}){Pt("log"),Pt("error"),Pt("warn",wn),Pt("debug",!1);let t=!0;vn("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let u=s[0];if(e!==!1&&u.includes("Worker reloaded")){if(t){t=!1;return}return[u.replace("[mf:inf] ","\u{1F504} ")+`
301
+ `,...s.slice(1)]}u.includes("[mf:err]")}]),vn("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return typeof u=="string"&&/^Network connection lost/i.test(u)},()=>{}]);let r=!1,i=!1;vn("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return/virtual-routes/.test(u)&&/(Failed to load url|Could not resolve module for file)/i.test(u)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],u)=>{if(u===0&&typeof s=="string"){let l=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(l&&!i||!l&&i)&&process.stdout.write(`
302
+ `),i=l,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function $o(e=!1){Pt("log",wn),vn("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(Yl.eraseLines(e?5:6))}])}function mH(e){Pt("error"),Pt("warn",wn),Pt("log",wn),Pt("info",wn),vn("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,u]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!u)return t;let l=`In Hydrogen's \`${s.trim()}\`:
307
303
 
308
304
  `,m=u.split(`
309
- `),d=m.at(-1)??"",f=/https?:\/\//.test(d),p=/`h2 [^`]+`/.test(d);if(p&&d&&(d=d.replace(/`(h2) ([^`]+)`/g,V.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||p)&&m.pop(),o==="error"||i){let h=f||p?d:void 0,g=i?.stack,x=i?.cause;if(typeof x=="string")try{x=JSON.parse(x)}catch{}if(typeof x!="string"&&x?.graphql?.query){let P=$r({host:e.host,graphql:x.graphql}),[,L,j]=x.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];h=(h?`${h}
305
+ `),p=m.at(-1)??"",f=/https?:\/\//.test(p),d=/`h2 [^`]+`/.test(p);if(d&&p&&(p=p.replace(/`(h2) ([^`]+)`/g,V.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||d)&&m.pop(),o==="error"||i){let h=f||d?p:void 0,g=i?.stack,x=i?.cause;if(typeof x=="string")try{x=JSON.parse(x)}catch{}if(typeof x!="string"&&x?.graphql?.query){let P=jr({host:e.host,graphql:x.graphql}),[,L,j]=x.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];h=(h?`${h}
310
306
 
311
- `:"")+ie`To debug the ${L||"query"}${j?` \`${V.whiteBright(j)}\``:""}, try it in ${X.link(V.bold("GraphiQL"),P)}.`.value}let v=g?.split(`
307
+ `:"")+ie`To debug the ${L||"query"}${j?` \`${V.whiteBright(j)}\``:""}, try it in ${Y.link(V.bold("GraphiQL"),P)}.`.value}let v=g?.split(`
312
308
  `)??[],E=P=>P.includes(e.rootDirectory)&&!P.includes("node_modules"),C=v.findIndex(E),A=v.length-[...v].reverse().findIndex(E);C>0&&A>C&&(g=[v[0],...v.slice(C,A)].join(`
313
- `).trim()||void 0);let O=new On(l+V.bold(m.join(`
309
+ `).trim()||void 0);let O=new kn(l+V.bold(m.join(`
314
310
  `).replace(" - Request",`
315
- Request`)),h);O.cause=x,O.stack=g,Tn(O);return}let a;if(f){a=[];for(let h of d.matchAll(/https?:\/\/[^\s]+/g))a.push(h[0])}(o==="warn"?Ee:nt)({body:l+V.bold(m.join(`
316
- `)),reference:a,nextSteps:p?[d]:void 0})}])}function dH(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function pH(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function DH(e){await Rl(),await Yy(e)}async function Rt(e,t){Ho(!1);let r=t===!0,i=e?await _i(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await Sn(t)),!t||!o||!n||r||t!==i.shop){let l=await Nl().catch(()=>{throw new F("Unable to authenticate with Shopify. Please report this issue.")}),m=await ux(l),f=!r&&t&&m.activeShops.find(({fqdn:p})=>t===p)||await ht({message:"Select a shop to log in to",choices:m.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await Il(t).catch(()=>{throw new F("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),u=e?await Xy(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:u}}function dx(e){Br({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as OI,readdir as kI}from"node:fs/promises";y();var cI=At(bx());async function tt(e,t){try{return(await Fn("git",e,{cwd:t})).stdout}catch(r){if(r instanceof Error){let i=new F(r.message);throw i.stack=r.stack,"exitCode"in r&&Object.assign(i,{exitCode:r.exitCode}),i}throw r}}async function Cx(e,t="main"){K(ie`Initializing git repository at ${X.path(e)}...`),await ul(),await tt(["init"],e),await tt(["checkout","-b",t],e)}async function qH(e,t){try{return(await tt(["check-ignore",...t],e)).split(`
317
- `).filter(Boolean)}catch(r){if(r instanceof F&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function HH(e){return Ql("cmd_all_timing_network_ms")(async()=>{let{repoUrl:t,destination:r,shallow:i,latestTag:n}=e;if(K(ie`Git-cloning repository ${t} into ${X.path(r)}...`),await ul(),await $(r)){if(!await Mr(r))throw new F(ie`Can't clone to ${X.path(r)}`,"The path exists but isn't a directory.");if((await An(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new F(ie`Directory ${X.path(r)} already exists and is not empty`,ie`Choose a different name or remove the existing directory first.`)}let[o,s]=t.split("#");if(s&&n)throw new F("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&n)throw new F("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];s&&u.push("--branch",s),i&&u.push("--depth","1"),ih()||u.push("-c","core.askpass=true"),u.push(o,r);try{if(await Fn("git",u),n){let l=await lI(r,t);await tt(["checkout",l],r)}}catch(l){if(l instanceof F)throw l;if(l instanceof Error){let m=new F(l.message);throw m.stack=l.stack,m}throw l}})}async function lI(e,t){let i=(await tt(["describe","--tags","--abbrev=0"],e)).trim();if(!i)throw new F(`Couldn't obtain the most recent tag of the repository ${t}`);return i}async function UH(e){let r=await tt(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],e);if(!r.trim())throw new F("Must have at least one commit to run command",ie`Run ${X.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=r.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Dx(e){await tt(["add","--all"],e)}async function Ax(e,t){let r=["commit","-m",e];return t?.author&&r.push("--author",t.author),await tt(r,t?.directory),(await tt(["rev-parse","HEAD"],t?.directory)).trim()}async function ul(){if(!await sh())throw new F("Git is necessary in the environment to continue",ie`Install ${X.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var ol=class extends F{};async function zH(e){if(!await hI(e))throw new ol(`${X.path(e??Fi())} is not a Git directory`)}async function hI(e){try{return await Fn("git",["rev-parse","--git-dir"],{cwd:e}),!0}catch(t){if(t instanceof Error&&"exitCode"in t&&t.exitCode===128)return!1;throw t}}var al=class extends F{};async function WH(e){if(!await fI(e))throw new al(`${X.path(e??Fi())} is not a clean Git directory`)}async function fI(e){return(await tt(["status","--porcelain"],e)).trim()===""}async function JH(e,t="origin"){if(K(ie`Removing git remote ${t} from ${X.path(e)}...`),await ul(),!(await tt(["remote"],e)).split(`
318
- `).filter(Boolean).includes(t)){K(ie`Remote ${t} does not exist, no action needed`);return}await tt(["remote","remove",t],e)}y();import{readdir as Px}from"node:fs/promises";y();import{createRequire as dI}from"module";function _x(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function XH(){try{return dI(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as vI}from"node:module";import zo from"node:path";y();y();var Sx="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function pI(e){return!!(await Te(e,"vite.config")).filepath}async function ll(e){let t=await pI(e);return t&&await cl(e)&&Ee({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function Fx(e,t){let r=await ph(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:u,serverBuildFile:l,routes:m}=mI(s),d=s.build.outDir,f=d.replace(/server$/,"client"),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},c=N(d,typeof a=="string"?a:l??"index.js"),h=t??s.build.ssr,g=G(s.root,typeof h=="string"?h:"server");return{clientOutDir:f,serverOutDir:d,serverOutFile:c,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:m??{},appDirectory:u??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await Te(me(g),qt(g))).filepath||g}}}function mI(e){try{return gI(e)}catch{return yI(e)}}function gI(e){if(!e.__reactRouterPluginContext)throw new Error("Could not resolve React Router config");let{appDirectory:t,serverBuildFile:r,routes:i}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,serverBuildFile:r,routes:i}}function yI(e){let{remixConfig:t}=xI(e)?.api?.getPluginOptions()??{};return t?{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}:{}}function Tx(e,t){return e.plugins.find(r=>r.name===t)}function xI(e){return Tx(e,"hydrogen:main")}function a8(e){return Tx(e,"oxygen:main")}async function cl(e){return!!(await Te(e,"remix.config")).filepath}async function x8(e){return await ll(e)?!1:cl(e)}var wI="dist",EI="client",bI="worker";function v8(e){let t=e??process.cwd(),r=zo.join(t,"public"),i=zo.join(t,wI),n=zo.join(i,EI),o=zo.join(i,bI,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function w8(e){return Te(e,"remix.config").then(({filepath:t})=>{if(!t)throw new F("No remix.config.js file found.");return vI(import.meta.url)(t)})}async function Ox(e,t=process.env.NODE_ENV){if(!await ll(e))throw new F(Sx);return(await Fx(e)).remixConfig}var CI=[/robots\.txt/],fl={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"],tokenlessApi:"api.$version.[graphql.json]"},hl=[];async function kx(e=Object.keys(fl)){hl.length===0&&(hl=(await Px(await mn(er))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=fl[i];if(!n)throw new F(`No route found for ${i}. Try one of ${DI.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let u=s.replace("*","");t[i].push(...hl.filter(l=>l.startsWith(u)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var DI=[...Object.keys(fl),"all"];async function Ix(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await kx():await kx([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await Ox(e.directory),s=i.flatMap(p=>er+"/"+p),u=await bt(n),l=N(o,er),m=await AI(l,e),d=!!(e.typescript??await $(N(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await dl(p,{...e,typescript:d,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:u}));return m&&await FI({typescript:d,localePrefix:m,routesDirectory:l,formatOptions:u,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:u}}async function AI(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await Px(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(u=>o.test(u));if(s)return s.match(o)?.[1]}async function dl(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:u,localePrefix:l,v1RouteConvention:m=!1,signal:d,overwriteFileDeps:f=!0}){s??=await $c();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=N(r,_I(e,l,{v1RouteConvention:m})+(i?p:p.replace(".ts",".js"))),c={operation:"created",sourceRoute:e,destinationRoute:Dl(a,t)};if(!n&&await $(a)){if(!await ft({message:`The file ${c.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...c,operation:"skipped"};c.operation="replaced"}let h=await mn(e+p,s),g=await SI(h,await mn("",s));for(let x of g){let E=x.startsWith(er+"/")?a:N(r,x.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await $(E))continue;await $(me(E))||await Cn(me(E));let C=await mn(x,s);if(!/\.[jt]sx?$/.test(x)){await Rr(C,E);continue}let A=await U(C);i||(A=await rr(A,C)),o&&(A=Nx(A,o)),A=await tr(A,u,E),await z(E,A)}return c}function Nx(e,t){return e.replace(/@shopify\/remix-oxygen/g,t)}function _I(e,t,r){let i=e.replace(er+"/",""),n=t&&!CI.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return er+"/"+n+(r.v1RouteConvention?_x(i):i)}async function SI(e,t){let r=new Set([e]),i=new Set([$t(t,e)]);for(let n of r){let o=(await U(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",$t(me(n),t)||"."),s.includes("/+types/")))continue;let u=G(me(n),s),l=(await Te(me(u),qt(u))).filepath||u;l.includes(`/${er}/`)||(i.add($t(t,l)),/\.[jt]sx?$/.test(l)&&r.add(l))}}return[...i]}function FI({typescript:e,localePrefix:t,...r}){return TI({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function TI({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await $(s))return;let u=await lt("routes",e);if(!await $(u))throw new Error("Unknown strategy");let l=await U(u);o&&(l=Nx(l,o)),n||(l=await rr(l,u)),l=await tr(l,i,s),await z(s,l)}var PI={js:"JavaScript",ts:"TypeScript"};async function nU(e,t,r){let i=r??await Gy({abortSignal:e.signal,extraChoices:{none:"Set up later "+V.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Jy(n,o)}}}function sU(e){return{setupRoutes:async(t,r,i)=>(await Ix({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function oU(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>dl(t,e)))}async function aU(e,t,r){return t===Be?{}:r??await ft({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:Be},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await ax()).length>0}catch(n){return K("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>nt({body:`You'll need to restart your terminal session to make \`${Be}\` alias available.`})}:{}}async function uU(e){Ho(!0);let{session:t,config:r}=await Rt();dx(r);let i=await Bo(t),n=await pl(i),o;return n?o=n.title:o=await jr({message:"New storefront name",defaultValue:$o(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function pl(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await ht({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function cU({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&Fl(e.title),o=i??n??await jr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=G(process.cwd(),o);if(await Rx(s)){if(!r&&n&&(o=await jr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=G(process.cwd(),o),await Rx(s)||(r=!0)),!r&&!await ft({message:`The directory ${V.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){nt({body:`Destination path ${V.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await Xo(s,{force:!0})}return{name:qt(o),location:o,directory:s,storefrontTitle:e?.title}}async function lU(e,t,r){let i=r??await ht({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await Wc(e)}}}async function hU(e,t,r){let i=r??await Uy({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Hy(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function fU(e,t,r,i){let n=r??Bl(),o="npm";if(i!==!1)if(n==="unknown"){let s=await ht({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0&&(o=n,i=await ft({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal}));return pn&&(await Rr(N(Ro(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await OI(await Py(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await $l({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var II=`
311
+ Request`)),h);O.cause=x,O.stack=g,On(O);return}let a;if(f){a=[];for(let h of p.matchAll(/https?:\/\/[^\s]+/g))a.push(h[0])}(o==="warn"?we:rt)({body:l+V.bold(m.join(`
312
+ `)),reference:a,nextSteps:d?[p]:void 0})}])}function gH(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function yH(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function SH(e){await Il(),await Ky(e)}async function It(e,t){$o(!1);let r=t===!0,i=e?await _i(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await Fn(t)),!t||!o||!n||r||t!==i.shop){let l=await Pl().catch(()=>{throw new T("Unable to authenticate with Shopify. Please report this issue.")}),m=await lx(l),f=!r&&t&&m.activeShops.find(({fqdn:d})=>t===d)||await ct({message:"Select a shop to log in to",choices:m.activeShops.map(({name:d,fqdn:a})=>({label:`${d} (${a})`,value:{name:d,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await kl(t).catch(()=>{throw new T("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),u=e?await Qy(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:u}}function mx(e){Lr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as RI,readdir as MI}from"node:fs/promises";y();var dI=Ct(Dx());async function Ze(e,t){try{return(await Tn("git",e,{cwd:t})).stdout}catch(r){if(r instanceof Error){let i=new T(r.message);throw i.stack=r.stack,"exitCode"in r&&Object.assign(i,{exitCode:r.exitCode}),i}throw r}}async function Ax(e,t="main"){K(ie`Initializing git repository at ${Y.path(e)}...`),await ol(),await Ze(["init"],e),await Ze(["checkout","-b",t],e)}async function WH(e,t){try{return(await Ze(["check-ignore",...t],e)).split(`
313
+ `).filter(Boolean)}catch(r){if(r instanceof T&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function zH(e){return Xl("cmd_all_timing_network_ms")(async()=>{let{repoUrl:t,destination:r,shallow:i,latestTag:n}=e;if(K(ie`Git-cloning repository ${t} into ${Y.path(r)}...`),await ol(),await $(r)){if(!await Rr(r))throw new T(ie`Can't clone to ${Y.path(r)}`,"The path exists but isn't a directory.");if((await _n(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new T(ie`Directory ${Y.path(r)} already exists and is not empty`,ie`Choose a different name or remove the existing directory first.`)}let[o,s]=t.split("#");if(s&&n)throw new T("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&n)throw new T("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];s&&u.push("--branch",s),i&&u.push("--depth","1"),eh()||u.push("-c","core.askpass=true"),u.push(o,r);try{if(await Tn("git",u),n){let l=await mI(r,t);await Ze(["checkout",l],r)}}catch(l){if(l instanceof T)throw l;if(l instanceof Error){let m=new T(l.message);throw m.stack=l.stack,m}throw l}})}async function mI(e,t){let i=(await Ze(["describe","--tags","--abbrev=0"],e)).trim();if(!i)throw new T(`Couldn't obtain the most recent tag of the repository ${t}`);return i}async function JH(e){let r=await Ze(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],e);if(!r.trim())throw new T("Must have at least one commit to run command",ie`Run ${Y.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=r.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function _x(e){await Ze(["add","--all"],e)}async function Sx(e,t){let r=["commit","-m",e];return t?.author&&r.push("--author",t.author),await Ze(r,t?.directory),(await Ze(["rev-parse","HEAD"],t?.directory)).trim()}async function ol(){if(!await rh())throw new T("Git is necessary in the environment to continue",ie`Install ${Y.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var nl=class extends T{};async function GH(e){if(!await gI(e))throw new nl(`${Y.path(e??Fi())} is not a Git directory`)}async function gI(e){try{return await Tn("git",["rev-parse","--git-dir"],{cwd:e}),!0}catch(t){if(t instanceof Error&&"exitCode"in t&&t.exitCode===128)return!1;throw t}}var sl=class extends T{};async function VH(e){if(!await yI(e))throw new sl(`${Y.path(e??Fi())} is not a clean Git directory`)}async function yI(e){return(await Ze(["status","--porcelain"],e)).trim()===""}async function XH(e,t="origin"){if(K(ie`Removing git remote ${t} from ${Y.path(e)}...`),await ol(),!(await Ze(["remote"],e)).split(`
314
+ `).filter(Boolean).includes(t)){K(ie`Remote ${t} does not exist, no action needed`);return}await Ze(["remote","remove",t],e)}y();import{readdir as Nx}from"node:fs/promises";y();import{createRequire as xI}from"module";function Fx(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function ZH(){try{return xI(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as DI}from"node:module";import Ho from"node:path";y();y();var Tx="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function vI(e){return!!(await Fe(e,"vite.config")).filepath}async function ul(e){let t=await vI(e);return t&&await al(e)&&we({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function Ox(e,t){let r=await hh(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:u,serverBuildFile:l,routes:m}=wI(s),p=s.build.outDir,f=p.replace(/server$/,"client"),d=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(d)?d[0]:d)??{},c=N(p,typeof a=="string"?a:l??"index.js"),h=t??s.build.ssr,g=G(s.root,typeof h=="string"?h:"server");return{clientOutDir:f,serverOutDir:p,serverOutFile:c,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:m??{},appDirectory:u??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await Fe(me(g),jt(g))).filepath||g}}}function wI(e){try{return EI(e)}catch{return bI(e)}}function EI(e){if(!e.__reactRouterPluginContext)throw new Error("Could not resolve React Router config");let{appDirectory:t,serverBuildFile:r,routes:i}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,serverBuildFile:r,routes:i}}function bI(e){let{remixConfig:t}=CI(e)?.api?.getPluginOptions()??{};return t?{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}:{}}function kx(e,t){return e.plugins.find(r=>r.name===t)}function CI(e){return kx(e,"hydrogen:main")}function l8(e){return kx(e,"oxygen:main")}async function al(e){return!!(await Fe(e,"remix.config")).filepath}async function E8(e){return await ul(e)?!1:al(e)}var AI="dist",_I="client",SI="worker";function b8(e){let t=e??process.cwd(),r=Ho.join(t,"public"),i=Ho.join(t,AI),n=Ho.join(i,_I),o=Ho.join(i,SI,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function C8(e){return Fe(e,"remix.config").then(({filepath:t})=>{if(!t)throw new T("No remix.config.js file found.");return DI(import.meta.url)(t)})}async function Px(e,t=process.env.NODE_ENV){if(!await ul(e))throw new T(Tx);return(await Ox(e)).remixConfig}var FI=[/robots\.txt/],ll={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},cl=[];async function Ix(e=Object.keys(ll)){cl.length===0&&(cl=(await Nx(await gn(Qt))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=ll[i];if(!n)throw new T(`No route found for ${i}. Try one of ${TI.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let u=s.replace("*","");t[i].push(...cl.filter(l=>l.startsWith(u)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var TI=[...Object.keys(ll),"all"];async function Rx(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await Ix():await Ix([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await Px(e.directory),s=i.flatMap(d=>Qt+"/"+d),u=await wt(n),l=N(o,Qt),m=await OI(l,e),p=!!(e.typescript??await $(N(n,"tsconfig.json"))),f=[];for(let d of s)f.push(await hl(d,{...e,typescript:p,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:u}));return m&&await II({typescript:p,localePrefix:m,routesDirectory:l,formatOptions:u,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:p,formatOptions:u}}async function OI(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await Nx(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(u=>o.test(u));if(s)return s.match(o)?.[1]}async function hl(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:u,localePrefix:l,v1RouteConvention:m=!1,signal:p,overwriteFileDeps:f=!0}){s??=await Bc();let d=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(d,"");let a=N(r,kI(e,l,{v1RouteConvention:m})+(i?d:d.replace(".ts",".js"))),c={operation:"created",sourceRoute:e,destinationRoute:bl(a,t)};if(!n&&await $(a)){if(!await lt({message:`The file ${c.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:p}))return{...c,operation:"skipped"};c.operation="replaced"}let h=await gn(e+d,s),g=await PI(h,await gn("",s));for(let x of g){let E=x.startsWith(Qt+"/")?a:N(r,x.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await $(E))continue;await $(me(E))||await Dn(me(E));let C=await gn(x,s);if(!/\.[jt]sx?$/.test(x)){await Nr(C,E);continue}let A=await U(C);i||(A=await er(A,C)),o&&(A=Mx(A,o)),A=await Zt(A,u,E),await W(E,A)}return c}function Mx(e,t){return e.replace(/@shopify\/remix-oxygen/g,t)}function kI(e,t,r){let i=e.replace(Qt+"/",""),n=t&&!FI.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Qt+"/"+n+(r.v1RouteConvention?Fx(i):i)}async function PI(e,t){let r=new Set([e]),i=new Set([Bt(t,e)]);for(let n of r){let o=(await U(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",Bt(me(n),t)||"."),s.includes("/+types/")))continue;let u=G(me(n),s),l=(await Fe(me(u),jt(u))).filepath||u;l.includes(`/${Qt}/`)||(i.add(Bt(t,l)),/\.[jt]sx?$/.test(l)&&r.add(l))}}return[...i]}function II({typescript:e,localePrefix:t,...r}){return NI({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function NI({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await $(s))return;let u=await at("routes",e);if(!await $(u))throw new Error("Unknown strategy");let l=await U(u);o&&(l=Mx(l,o)),n||(l=await er(l,u)),l=await Zt(l,i,s),await W(s,l)}var LI={js:"JavaScript",ts:"TypeScript"};async function aU(e,t,r){let i=r??await Xy({abortSignal:e.signal,extraChoices:{none:"Set up later "+V.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Vy(n,o)}}}function uU(e){return{setupRoutes:async(t,r,i)=>(await Rx({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function cU(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>hl(t,e)))}async function lU(e,t,r){return t===Me?{}:r??await lt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:Me},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await cx()).length>0}catch(n){return K("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>rt({body:`You'll need to restart your terminal session to make \`${Me}\` alias available.`})}:{}}async function hU(e){$o(!0);let{session:t,config:r}=await It();mx(r);let i=await Mo(t),n=await fl(i),o;return n?o=n.title:o=await Br({message:"New storefront name",defaultValue:Bo(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function fl(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await ct({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function fU({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&_l(e.title),o=i??n??await Br({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=G(process.cwd(),o);if(await Lx(s)){if(!r&&n&&(o=await Br({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=G(process.cwd(),o),await Lx(s)||(r=!0)),!r&&!await lt({message:`The directory ${V.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){rt({body:`Destination path ${V.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await Vo(s,{force:!0})}return{name:jt(o),location:o,directory:s,storefrontTitle:e?.title}}async function pU(e,t,r){let i=r??await ct({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await Uc(e)}}}async function dU(e,t,r){let i=r??await zy({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Wy(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function mU(e,t,r,i){let n=r??Ml(),o="npm";if(i!==!1)if(n==="unknown"){let s=await ct({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await lt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return mn&&(await Nr(N(Io(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await RI(await Ny(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Bl({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var BI=`
319
315
  node_modules
320
316
  /.cache
321
317
  /build
@@ -325,17 +321,17 @@ node_modules
325
321
  .env
326
322
  .shopify
327
323
  .react-router
328
- `.slice(1);async function dU(e){try{return await Cx(e),await z(N(e,".gitignore"),II),process.env.NODE_ENV==="test"&&process.env.CI&&(await ct('git config --global user.name "hydrogen"'),await ct('git config --global user.email "hydrogen@shopify.com"')),NI(e,"Scaffold Storefront")}catch(t){K(`Failed to initialize Git.
329
- `+(t?.stack??t?.message??t))}}async function NI(e,t){try{await Dx(e),await Ax(t,{directory:e})}catch(r){K(`Failed to commit code.
330
- `+(r?.stack??r?.message??r))}}async function pU(e,{language:t,packageManager:r,depsInstalled:i,cssStrategy:n,cliCommand:o,routes:s,i18n:u,depsError:l,i18nError:m,routesError:d}){let f=!!(l||m||d),p=[];e.storefrontTitle&&p.push(["Shopify",e.storefrontTitle]),t&&p.push(["Language",PI[t]]),n&&p.push(["Styling",zc[n]]),!m&&u&&p.push(["Markets",Jc[u].split(" (")[0]]);let a="";if(!d&&s&&Object.keys(s).length){p.push(["Routes",""]);for(let[g,x]of Object.entries(s)){x=Array.isArray(x)?x:[x];let v=[...new Set(x.map(E=>"/"+RI(E)))].sort();v.length>2&&(v=[...new Set(v.map(C=>C.split("/")[1]??""))].map(C=>"/"+C+"/*")),a+=`
331
- \u2022 ${Al(g)} ${V.dim("("+v.join(" & ")+")")}`}}let c=1+p.reduce((g,[x])=>Math.max(g,x.length),0);(f?Ee:Br)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:p.map(([g,x])=>` ${(g+":").padEnd(c," ")} ${V.dim(x)}`).join(`
324
+ `.slice(1);async function gU(e){try{return await Ax(e),await W(N(e,".gitignore"),BI),process.env.NODE_ENV==="test"&&process.env.CI&&(await ot('git config --global user.name "hydrogen"'),await ot('git config --global user.email "hydrogen@shopify.com"')),jI(e,"Scaffold Storefront")}catch(t){K(`Failed to initialize Git.
325
+ `+(t?.stack??t?.message??t))}}async function jI(e,t){try{await _x(e),await Sx(t,{directory:e})}catch(r){K(`Failed to commit code.
326
+ `+(r?.stack??r?.message??r))}}async function yU(e,{language:t,packageManager:r,depsInstalled:i,cssStrategy:n,cliCommand:o,routes:s,i18n:u,depsError:l,i18nError:m,routesError:p}){let f=!!(l||m||p),d=[];e.storefrontTitle&&d.push(["Shopify",e.storefrontTitle]),t&&d.push(["Language",LI[t]]),n&&d.push(["Styling",Hc[n]]),!m&&u&&d.push(["Markets",Wc[u].split(" (")[0]]);let a="";if(!p&&s&&Object.keys(s).length){d.push(["Routes",""]);for(let[g,x]of Object.entries(s)){x=Array.isArray(x)?x:[x];let v=[...new Set(x.map(E=>"/"+$I(E)))].sort();v.length>2&&(v=[...new Set(v.map(C=>C.split("/")[1]??""))].map(C=>"/"+C+"/*")),a+=`
327
+ \u2022 ${Cl(g)} ${V.dim("("+v.join(" & ")+")")}`}}let c=1+d.reduce((g,[x])=>Math.max(g,x.length),0);(f?we:Lr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:d.map(([g,x])=>` ${(g+":").padEnd(c," ")} ${V.dim(x)}`).join(`
332
328
  `)+a,customSections:[f&&{title:`Warnings
333
- `,body:[{list:{items:[l&&["Failed to install dependencies:",{subdued:l.message}],m&&["Failed to scaffold Markets:",{subdued:m.message}],d&&["Failed to scaffold routes:",{subdued:d.message}]].filter(g=>!!g)}}]},{title:`Next steps
334
- `,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Ll()?"npm run dev":oh(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function mU(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await Xo(t.directory,{force:!0}).catch(()=>{}),Tn(new F("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function Rx(e){return await $(e)&&await Mr(e)&&(await kI(e)).length>0}function RI(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function Mx(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var Lx=class e extends Yn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
329
+ `,body:[{list:{items:[l&&["Failed to install dependencies:",{subdued:l.message}],m&&["Failed to scaffold Markets:",{subdued:m.message}],p&&["Failed to scaffold routes:",{subdued:p.message}]].filter(g=>!!g)}}]},{title:`Next steps
330
+ `,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Rl()?"npm run dev":ih(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function xU(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await Vo(t.directory,{force:!0}).catch(()=>{}),On(new T("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function Lx(e){return await $(e)&&await Rr(e)&&(await MI(e)).length>0}function $I(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function Bx(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var jx=class e extends Yn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
335
331
 
336
332
  Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.
337
333
 
338
- After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...yn.force,...yn.path,storefront:Bx.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT"})};async run(){let{flags:t}=await this.parse(e);await MI(t)}};async function MI({force:e,path:t=process.cwd(),storefront:r}){let[{session:i,config:n},o]=await Promise.all([Rt(t),qo()]),s=await ml(t,i,n,{force:e,flagStorefront:r,cliCommand:o});s&&Br({body:[{userInput:s.title},"is now linked"],nextSteps:[["Run",{command:`${o} dev`},"to start your local development server and start building"]]})}async function ml(e,t,r,{force:i=!1,flagStorefront:n,cliCommand:o,storefronts:s}){if(!r.shop)throw new F("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await ft({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;s||(s=await Bo(t));let u;if(n){if(u=s.find(({title:l})=>l===n),!u){Ee({headline:`Couldn't find ${n}`,body:["There's no storefront matching",{userInput:n},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${o} list`}]});return}}else u=await pl(s),u||(u=await LI(e,t,s));return await Ky(e,u),u}async function LI(e,t,r){let i=qt(e),n=$o(i);r.some(({title:m})=>m===n)&&(n=Mx());let s=await jr({message:"New storefront name",defaultValue:n}),u,l;if(await th([{title:"Creating storefront",task:async()=>{let m=await Zy(t,s);u=m.storefront,l=m.jobId}},{title:"Creating API tokens",task:async()=>{try{await ex(t,l)}catch{u=void 0}},skip:()=>!l}]),!u)throw new F("Unknown error ocurred. Please try again or contact support if the error persists.");return u}y();var BI=`#graphql
334
+ After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...xn.force,...xn.path,storefront:$x.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT"})};async run(){let{flags:t}=await this.parse(e);await qI(t)}};async function qI({force:e,path:t=process.cwd(),storefront:r}){let[{session:i,config:n},o]=await Promise.all([It(t),jo()]),s=await pl(t,i,n,{force:e,flagStorefront:r,cliCommand:o});s&&Lr({body:[{userInput:s.title},"is now linked"],nextSteps:[["Run",{command:`${o} dev`},"to start your local development server and start building"]]})}async function pl(e,t,r,{force:i=!1,flagStorefront:n,cliCommand:o,storefronts:s}){if(!r.shop)throw new T("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await lt({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;s||(s=await Mo(t));let u;if(n){if(u=s.find(({title:l})=>l===n),!u){we({headline:`Couldn't find ${n}`,body:["There's no storefront matching",{userInput:n},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${o} list`}]});return}}else u=await fl(s),u||(u=await HI(e,t,s));return await Zy(e,u),u}async function HI(e,t,r){let i=jt(e),n=Bo(i);r.some(({title:m})=>m===n)&&(n=Bx());let s=await Br({message:"New storefront name",defaultValue:n}),u,l;if(await Ql([{title:"Creating storefront",task:async()=>{let m=await tx(t,s);u=m.storefront,l=m.jobId}},{title:"Creating API tokens",task:async()=>{try{await rx(t,l)}catch{u=void 0}},skip:()=>!l}]),!u)throw new T("Unknown error ocurred. Please try again or contact support if the error persists.");return u}y();var UI=`#graphql
339
335
  mutation CustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) {
340
336
  hydrogenStorefrontCustomerApplicationUrlsReplace(
341
337
  storefrontId: $storefrontId,
@@ -349,15 +345,15 @@ node_modules
349
345
  }
350
346
  }
351
347
  }
352
- `;async function gl(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await et(BI,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var jx=class e extends Yn{static description="Push project configuration to admin";static flags={...yn.path,"storefront-id":wn.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":wn.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":wn.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":wn.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await yl({...Vc(t)})}};async function yl({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await xl(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,u=r,l=n?new URL(n,r).toString():r;if(!s&&!u&&!l)return;let{session:m,config:d}=await Rt(e),f=d?.storefront?.customerAccountConfig,{success:p,userErrors:a}=await gl(m,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:u?[u]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:l?[l]:void 0,removeRegex:f?.logoutUri}});if(!p||a.length){let c=new Error("Customer Account Application setup update fail.");throw c.userErrors=a,c}return await Qy(e,{redirectUri:s,javascriptOrigin:u,logoutUri:l}),()=>jI(m,o,{redirectUri:s,javascriptOrigin:u,logoutUri:l})}catch(s){let u=!1,l=s?.userErrors?.length?s.userErrors.map(d=>(/Javascript origin is not allowed for this application type/i.test(d.message)&&(u=!0),`${d.field}: ${d.message}`)):s.message?[s.message]:[],m=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw u&&m.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new F("Customer Account Application setup update fail.",l.length?[{list:{title:"The following error occurs during update:",items:l.map((d,f)=>`${f!=0?`
348
+ `;async function dl(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await Qe(UI,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var qx=class e extends Yn{static description="Push project configuration to admin";static flags={...xn.path,"storefront-id":En.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":En.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":En.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":En.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await ml({...Jc(t)})}};async function ml({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await gl(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,u=r,l=n?new URL(n,r).toString():r;if(!s&&!u&&!l)return;let{session:m,config:p}=await It(e),f=p?.storefront?.customerAccountConfig,{success:d,userErrors:a}=await dl(m,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:u?[u]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:l?[l]:void 0,removeRegex:f?.logoutUri}});if(!d||a.length){let c=new Error("Customer Account Application setup update fail.");throw c.userErrors=a,c}return await ex(e,{redirectUri:s,javascriptOrigin:u,logoutUri:l}),()=>WI(m,o,{redirectUri:s,javascriptOrigin:u,logoutUri:l})}catch(s){let u=!1,l=s?.userErrors?.length?s.userErrors.map(p=>(/Javascript origin is not allowed for this application type/i.test(p.message)&&(u=!0),`${p.field}: ${p.message}`)):s.message?[s.message]:[],m=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw u&&m.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new T("Customer Account Application setup update fail.",l.length?[{list:{title:"The following error occurs during update:",items:l.map((p,f)=>`${f!=0?`
353
349
 
354
- `:""}${d}`)}}]:void 0,m)}}async function jI(e,t,r={}){Object.values(r).some(Boolean)&&(K(`Cleaning up Customer Application url "${r.redirectUri}"`),await gl(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{K(`Failed to clean up Customer Application url "${r.redirectUri}":
355
- ${i?.message}`)}))}async function xl(e,t){if(t)return t;let{session:r,config:i}=await Rt(e);if(i.storefront?.id)return i.storefront.id;let n=await qo();return await ml(e,r,i,{cliCommand:n})?(await _i(e)).storefront?.id:void 0}y();y();var Wx=At(zx());async function Jx(e){if(K(ie`Reading the .env file at ${X.path(e)}`),!await $(e))throw new F(`The environment file at ${e} does not exist.`);let t=await U(e);return{path:e,variables:(0,Wx.parse)(t)}}function ZU(e,t){let r=[],i=e===null?[]:e.split(`
356
- `),n=[],o;for(let s of i){if(o){if(s.endsWith(o.quote)){let m=Jo(o.key,o.value+s.slice(0,-1),o.quote),d=t[o.key];d&&(n.push(o.key),m=Jo(o.key,d)),r.push(m),o=void 0}else o.value+=`${s}
357
- `;continue}let u=s.match(/^([^=:#]+?)[=:](.*)/),l=s;if(u){let m=u[1].trim(),d=(u[2]??"").trim();if(/^["'`]/.test(d)&&!d.endsWith(d[0])){o={key:m,value:`${d.slice(1)}
358
- `,quote:d[0]};continue}let f=t[m];f&&(n.push(m),l=Jo(m,f))}r.push(l)}if(o)throw new F(`Multi-line environment variable '${o.key}' is not properly enclosed.`);for(let[s,u]of Object.entries(t))n.includes(s)||r.push(Jo(s,u));return r.join(`
359
- `)}function Jo(e,t,r){if(r)return`${e}=${r}${t}${r}`;if(t?.includes(`
360
- `)){let i=['"',"'","`"].find(n=>!t.includes(n));if(!i)throw new F(`The environment file patch has an env value that can't be surrounded by quotes: ${t}`);return`${e}=${i}${t}${i}`}return`${e}=${t}`}y();var tN=`#graphql
350
+ `:""}${p}`)}}]:void 0,m)}}async function WI(e,t,r={}){Object.values(r).some(Boolean)&&(K(`Cleaning up Customer Application url "${r.redirectUri}"`),await dl(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{K(`Failed to clean up Customer Application url "${r.redirectUri}":
351
+ ${i?.message}`)}))}async function gl(e,t){if(t)return t;let{session:r,config:i}=await It(e);if(i.storefront?.id)return i.storefront.id;let n=await jo();return await pl(e,r,i,{cliCommand:n})?(await _i(e)).storefront?.id:void 0}y();y();var Gx=Ct(Jx());async function Vx(e){if(K(ie`Reading the .env file at ${Y.path(e)}`),!await $(e))throw new T(`The environment file at ${e} does not exist.`);let t=await U(e);return{path:e,variables:(0,Gx.parse)(t)}}function r6(e,t){let r=[],i=e===null?[]:e.split(`
352
+ `),n=[],o;for(let s of i){if(o){if(s.endsWith(o.quote)){let m=Wo(o.key,o.value+s.slice(0,-1),o.quote),p=t[o.key];p&&(n.push(o.key),m=Wo(o.key,p)),r.push(m),o=void 0}else o.value+=`${s}
353
+ `;continue}let u=s.match(/^([^=:#]+?)[=:](.*)/),l=s;if(u){let m=u[1].trim(),p=(u[2]??"").trim();if(/^["'`]/.test(p)&&!p.endsWith(p[0])){o={key:m,value:`${p.slice(1)}
354
+ `,quote:p[0]};continue}let f=t[m];f&&(n.push(m),l=Wo(m,f))}r.push(l)}if(o)throw new T(`Multi-line environment variable '${o.key}' is not properly enclosed.`);for(let[s,u]of Object.entries(t))n.includes(s)||r.push(Wo(s,u));return r.join(`
355
+ `)}function Wo(e,t,r){if(r)return`${e}=${r}${t}${r}`;if(t?.includes(`
356
+ `)){let i=['"',"'","`"].find(n=>!t.includes(n));if(!i)throw new T(`The environment file patch has an env value that can't be surrounded by quotes: ${t}`);return`${e}=${i}${t}${i}`}return`${e}=${t}`}y();var oN=`#graphql
361
357
  query PullVariables($id: ID!, $handle: String) {
362
358
  hydrogenStorefront(id: $id) {
363
359
  id
@@ -370,7 +366,7 @@ ${i?.message}`)}))}async function xl(e,t){if(t)return t;let{session:r,config:i}=
370
366
  }
371
367
  }
372
368
  }
373
- `;async function Gx(e,t,r){let{hydrogenStorefront:i}=await et(tN,e,{id:t,handle:r});return i}y();var rN=`#graphql
369
+ `;async function Xx(e,t,r){let{hydrogenStorefront:i}=await Qe(oN,e,{id:t,handle:r});return i}y();var aN=`#graphql
374
370
  query ListStorefronts($id: ID!) {
375
371
  hydrogenStorefront(id: $id) {
376
372
  id
@@ -386,15 +382,15 @@ ${i?.message}`)}))}async function xl(e,t){if(t)return t;let{session:r,config:i}=
386
382
  }
387
383
  }
388
384
  }
389
- `;async function Vx(e,t){let{hydrogenStorefront:r}=await et(rN,e,{id:t});return r}y();function l6(e){return[...e.filter(t=>t.type==="PREVIEW"),...e.filter(t=>t.type==="CUSTOM"),...e.filter(t=>t.type==="PRODUCTION")]}function h6(e,t,r){let i=Object.entries({handle:t,branch:r}).reduce((n,[o,s])=>(s&&n.push(`${o}: ${s}`),n),[]).join(", ");return`${e} ${V.dim(`(${i})`)}`}function f6(e,t){let r=e.find(({handle:i})=>i===t);if(!r)throw Xx("handle",t);return r}function Yx(e,t){let r=e.find(({branch:i})=>i===t);if(!r)throw Xx("branch",t);return r}function Xx(e,t){return new F("Environment not found",`We could not find an environment matching the ${e} '${t}'.`,[["Run",{command:"env list"},"to view a list of available environments."]])}var Kx=()=>({remoteVariables:{},remoteSecrets:{}});async function _6({root:e,envHandle:t,envBranch:r,envFile:i,fetchRemote:n=!0,localVariables:o}){let[{remoteVariables:s,remoteSecrets:u},{variables:l}]=await Promise.all([n?iN(e,t,r).catch(a=>(Ee({headline:"Failed to load environment variables from Shopify. The development server will still start, but the following error occurred:",body:[a.message,a.tryMessage,a.nextSteps].filter(Boolean).join(`
385
+ `;async function Yx(e,t){let{hydrogenStorefront:r}=await Qe(aN,e,{id:t});return r}y();function p6(e){return[...e.filter(t=>t.type==="PREVIEW"),...e.filter(t=>t.type==="CUSTOM"),...e.filter(t=>t.type==="PRODUCTION")]}function d6(e,t,r){let i=Object.entries({handle:t,branch:r}).reduce((n,[o,s])=>(s&&n.push(`${o}: ${s}`),n),[]).join(", ");return`${e} ${V.dim(`(${i})`)}`}function m6(e,t){let r=e.find(({handle:i})=>i===t);if(!r)throw Qx("handle",t);return r}function Kx(e,t){let r=e.find(({branch:i})=>i===t);if(!r)throw Qx("branch",t);return r}function Qx(e,t){return new T("Environment not found",`We could not find an environment matching the ${e} '${t}'.`,[["Run",{command:"env list"},"to view a list of available environments."]])}var Zx=()=>({remoteVariables:{},remoteSecrets:{}});async function T6({root:e,envHandle:t,envBranch:r,envFile:i,fetchRemote:n=!0,localVariables:o}){let[{remoteVariables:s,remoteSecrets:u},{variables:l}]=await Promise.all([n?uN(e,t,r).catch(a=>(we({headline:"Failed to load environment variables from Shopify. The development server will still start, but the following error occurred:",body:[a.message,a.tryMessage,a.nextSteps].filter(Boolean).join(`
390
386
 
391
- `)}),Kx())):Kx(),o?{variables:o}:bl(e,i)]),m=Object.keys(u),d=Object.keys(s),f=Object.keys(l);function p(){(f.length>0||d.length+m.length>0)&&(dt(`
387
+ `)}),Zx())):Zx(),o?{variables:o}:wl(e,i)]),m=Object.keys(u),p=Object.keys(s),f=Object.keys(l);function d(){(f.length>0||p.length+m.length>0)&&(ht(`
392
388
  Environment variables injected into MiniOxygen:
393
- `),dt(_l([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[V.dim(a),V.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:u,localVariables:l,allVariables:{...u,...s,...l}}}async function iN(e,t,r){let{session:i,config:n}=await Rt(e);if(r){let l=(await Vx(i,n.storefront.id))?.environments||[];t=Yx(l,r).handle}let o=(await Gx(i,n.storefront.id,t))?.environmentVariables||[],s={},u={};for(let{key:l,value:m,isSecret:d}of o)d?u[l]=m:s[l]=m;return{remoteVariables:s,remoteSecrets:u}}async function bl(e,t){let r=G(e,t);return await $(r).then(i=>i?Jx(r):{variables:{}})}y();async function Qx(e,t,r){let i=await Pl(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new On(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new F(`${r} failed to start the tunnel.
394
- ${o.error.message}`);return o.value}async function Zx(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(K(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new F(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function nN(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function U6(e){nt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function z6(e,t,r){return bl(e,r).then(async({variables:i})=>{let n=t&&!nN(i);n&&await xl(e);let{shop:o,storefront:s}=await _i(e),u=s?.id;return{storefrontId:u,customerAccountPush:n,fetchRemote:!!o&&!!u,localVariables:i,storefrontTitle:s?.title}})}var ev=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function W6(e,t,r,i){dt(`
389
+ `),ht(Dl([...p.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[V.dim(a),V.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:d,remoteVariables:s,remoteSecrets:u,localVariables:l,allVariables:{...u,...s,...l}}}async function uN(e,t,r){let{session:i,config:n}=await It(e);if(r){let l=(await Yx(i,n.storefront.id))?.environments||[];t=Kx(l,r).handle}let o=(await Xx(i,n.storefront.id,t))?.environmentVariables||[],s={},u={};for(let{key:l,value:m,isSecret:p}of o)p?u[l]=m:s[l]=m;return{remoteVariables:s,remoteSecrets:u}}async function wl(e,t){let r=G(e,t);return await $(r).then(i=>i?Vx(r):{variables:{}})}y();async function ev(e,t,r){let i=await Ol(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new kn(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new T(`${r} failed to start the tunnel.
390
+ ${o.error.message}`);return o.value}async function tv(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(K(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new T(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function cN(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function J6(e){rt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function G6(e,t,r){return wl(e,r).then(async({variables:i})=>{let n=t&&!cN(i);n&&await gl(e);let{shop:o,storefront:s}=await _i(e),u=s?.id;return{storefrontId:u,customerAccountPush:n,fetchRemote:!!o&&!!u,localVariables:i,storefrontTitle:s?.title}})}var rv=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function V6(e,t,r,i){ht(`
395
391
  Starting tunnel...
396
- `);let n=await Qx(t,r,"cloudflare"),o=await Zx(n).then(u=>u.replace(ev.ORIGINAL,ev.REBRANDED)),s=await yl({path:e,devOrigin:o,storefrontId:i}).catch(u=>{u instanceof F&&nt({headline:"Customer Account Application setup update fail.",body:u.tryMessage||void 0,nextSteps:u.nextSteps})});return{host:o,cleanup:s}}function J6(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return ie`Debugging enabled on port ${String(e)}.\nAttach a ${X.link(V.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://localhost:${String(e)}.`.value}function G6(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser:
397
- ${$r({host:e})}`,`View server network requests:
392
+ `);let n=await ev(t,r,"cloudflare"),o=await tv(n).then(u=>u.replace(rv.ORIGINAL,rv.REBRANDED)),s=await ml({path:e,devOrigin:o,storefrontId:i}).catch(u=>{u instanceof T&&rt({headline:"Customer Account Application setup update fail.",body:u.tryMessage||void 0,nextSteps:u.nextSteps})});return{host:o,cleanup:s}}function X6(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return ie`Debugging enabled on port ${String(e)}.\nAttach a ${Y.link(V.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://localhost:${String(e)}.`.value}function Y6(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser:
393
+ ${jr({host:e})}`,`View server network requests:
398
394
  ${e}/subrequest-profiler`].map((t,r)=>({subdued:`${r===0?"":`
399
395
 
400
- `}${t}`}))}export{Zh as a,Wn as b,Jn as c,ga as d,Mw as e,Yn as f,bx as g,Cx as h,qH as i,HH as j,UH as k,zH as l,hI as m,al as n,WH as o,fI as p,JH as q,No as r,ct as s,O3 as t,pn as u,j3 as v,lt as w,mn as x,$c as y,Ro as z,qc as A,bt as B,tr as C,Di as D,Mo as E,gn as F,Uc as G,zc as H,k$ as I,Hy as J,Uy as K,SP as L,Jc as M,Gc as N,Jy as O,Gy as P,FP as Q,TP as R,yn as S,Vc as T,gq as U,yq as V,ph as W,Gv as X,x8 as Y,v8 as Z,w8 as _,Ox as $,Sx as aa,pI as ba,ll as ca,Fx as da,xI as ea,a8 as fa,et as ga,Vy as ha,Bo as ia,_i as ja,Xy as ka,Ky as la,Nq as ma,Zy as na,ex as oa,Be as pa,ax as qa,qo as ra,hH as sa,Ho as ta,fH as ua,dH as va,pH as wa,DH as xa,Rt as ya,dx as za,XH as Aa,DI as Ba,Ix as Ca,PI as Da,nU as Ea,sU as Fa,oU as Ga,aU as Ha,uU as Ia,cU as Ja,lU as Ka,hU as La,fU as Ma,dU as Na,NI as Oa,pU as Pa,mU as Qa,Lx as Ra,ml as Sa,jx as Ta,yN as Ua,xN as Va,vN as Wa,wN as Xa,SN as Ya,FN as Za,TN as _a,Jx as $a,ZU as ab,Jo as bb,l6 as cb,h6 as db,f6 as eb,Yx as fb,Gx as gb,Vx as hb,_6 as ib,nN as jb,U6 as kb,z6 as lb,ev as mb,W6 as nb,J6 as ob,G6 as pb};
396
+ `}${t}`}))}export{Yh as a,Jn as b,Gn as c,da as d,Lw as e,Yn as f,jg as g,Dx as h,Ax as i,WH as j,zH as k,JH as l,GH as m,gI as n,sl as o,VH as p,yI as q,XH as r,Po as s,ot as t,I$ as u,mn as v,H$ as w,at as x,gn as y,Bc as z,Io as A,jc as B,wt as C,Zt as D,Di as E,No as F,yn as G,qc as H,Hc as I,N3 as J,Wy as K,zy as L,kP as M,Wc as N,zc as O,Vy as P,Xy as Q,PP as R,IP as S,xn as T,Jc as U,vq as V,wq as W,hh as X,Vv as Y,E8 as Z,b8 as _,C8 as $,Px as aa,Tx as ba,vI as ca,ul as da,Ox as ea,CI as fa,l8 as ga,Qe as ha,Yy as ia,Mo as ja,_i as ka,Qy as la,Zy as ma,Lq as na,tx as oa,rx as pa,Me as qa,cx as ra,jo as sa,dH as ta,$o as ua,mH as va,gH as wa,yH as xa,SH as ya,It as za,mx as Aa,ZH as Ba,TI as Ca,Rx as Da,LI as Ea,aU as Fa,uU as Ga,cU as Ha,lU as Ia,hU as Ja,fU as Ka,pU as La,dU as Ma,mU as Na,gU as Oa,jI as Pa,yU as Qa,xU as Ra,jx as Sa,pl as Ta,qx as Ua,bN as Va,CN as Wa,DN as Xa,AN as Ya,PN as Za,IN as _a,NN as $a,Vx as ab,r6 as bb,Wo as cb,p6 as db,d6 as eb,m6 as fb,Kx as gb,Xx as hb,Yx as ib,T6 as jb,cN as kb,J6 as lb,G6 as mb,rv as nb,V6 as ob,X6 as pb,Y6 as qb};