219 lines
459 KiB
JavaScript
219 lines
459 KiB
JavaScript
|
|
"use strict";var Fb=Object.create;var ms=Object.defineProperty;var Db=Object.getOwnPropertyDescriptor;var jb=Object.getOwnPropertyNames;var Ub=Object.getPrototypeOf,$b=Object.prototype.hasOwnProperty;var x=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),wf=(i,e)=>{for(var t in e)ms(i,t,{get:e[t],enumerable:!0})},xf=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of jb(e))!$b.call(i,n)&&n!==t&&ms(i,n,{get:()=>e[n],enumerable:!(r=Db(e,n))||r.enumerable});return i};var $e=(i,e,t)=>(t=i!=null?Fb(Ub(i)):{},xf(e||!i||!i.__esModule?ms(t,"default",{value:i,enumerable:!0}):t,i)),Vb=i=>xf(ms({},"__esModule",{value:!0}),i);var kf=x((bI,Of)=>{var Ef={};Of.exports=Ef;var Sf={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Sf).forEach(function(i){var e=Sf[i],t=Ef[i]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var Tf=x((_I,Cf)=>{"use strict";Cf.exports=function(i,e){e=e||process.argv;var t=e.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=e.indexOf(r+i);return n!==-1&&(t===-1?!0:n<t)}});var If=x((wI,Af)=>{"use strict";var Hb=require("os"),$t=Tf(),at=process.env,yr=void 0;$t("no-color")||$t("no-colors")||$t("color=false")?yr=!1:($t("color")||$t("colors")||$t("color=true")||$t("color=always"))&&(yr=!0);"FORCE_COLOR"in at&&(yr=at.FORCE_COLOR.length===0||parseInt(at.FORCE_COLOR,10)!==0);function Gb(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Wb(i){if(yr===!1)return 0;if($t("color=16m")||$t("color=full")||$t("color=truecolor"))return 3;if($t("color=256"))return 2;if(i&&!i.isTTY&&yr!==!0)return 0;var e=yr?1:0;if(process.platform==="win32"){var t=Hb.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in at)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in at})||at.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in at)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(at.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in at){var r=parseInt((at.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(at.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(at.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(at.TERM)||"COLORTERM"in at?1:(at.TERM==="dumb",e)}function ka(i){var e=Wb(i);return Gb(e)}Af.exports={supportsColor:ka,stdout:ka(process.stdout),stderr:ka(process.stderr)}});var Bf=x((xI,Nf)=>{Nf.exports=function(e,t){var r="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7
|
|||
|
|
`)!=-1,r=this._styles,n=r.length;n--;){var s=Wi[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(Kb,function(o){return s.close+o+s.open}))}return e}ye.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in i)(function(t){ye[t]=function(r){if(typeof i[t]=="object"){var n=r;for(var s in i[t])n=ye[i[t][s]](n);return n}return ye[i[t]](r)}})(e)};function Xb(){var i={};return Object.keys(Wf).forEach(function(e){i[e]={get:function(){return Gf([e])}}}),i}var e_=function(e,t){var r=t.split("");return r=r.map(e),r.join("")};ye.trap=Bf();ye.zalgo=Rf();ye.maps={};ye.maps.america=Mf()(ye);ye.maps.zebra=Ff()(ye);ye.maps.rainbow=jf()(ye);ye.maps.random=$f()(ye);for(Vf in ye.maps)(function(i){ye[i]=function(e){return e_(ye.maps[i],e)}})(Vf);var Vf;Hf(ye,Xb())});var Jf=x((II,zf)=>{var t_=Kf();zf.exports=t_});var Qf=x((NI,Zf)=>{var br=1e3,_r=br*60,wr=_r*60,Yi=wr*24,i_=Yi*7,r_=Yi*365.25;Zf.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return n_(i);if(t==="number"&&isFinite(i))return e.long?o_(i):s_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function n_(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*r_;case"weeks":case"week":case"w":return t*i_;case"days":case"day":case"d":return t*Yi;case"hours":case"hour":case"hrs":case"hr":case"h":return t*wr;case"minutes":case"minute":case"mins":case"min":case"m":return t*_r;case"seconds":case"second":case"secs":case"sec":case"s":return t*br;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function s_(i){var e=Math.abs(i);return e>=Yi?Math.round(i/Yi)+"d":e>=wr?Math.round(i/wr)+"h":e>=_r?Math.round(i/_r)+"m":e>=br?Math.round(i/br)+"s":i+"ms"}function o_(i){var e=Math.abs(i);return e>=Yi?gs(i,e,Yi,"day"):e>=wr?gs(i,e,wr,"hour"):e>=_r?gs(i,e,_r,"minute"):e>=br?gs(i,e,br,"second"):i+" ms"}function gs(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Ca=x((BI,Xf)=>{function a_(i){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=o,t.humanize=Qf(),t.destroy=c,Object.keys(i).forEach(u=>{t[u]=i[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let d=0;d<u.length;d++)f=(f<<5)-f+u.charCodeAt(d),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,d=null,m,g;function y(...b){if(!y.enabled)return;let w=y,S=Number(new Date),k=S-(f||S);w.diff=k,w.prev=f,w.curr=S,f=S,b[0]=t.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let O=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";O++;let A=t.formatters[T];if(typeof A=="function"){let C=b[O];R=A.call(w,C),b.splice(O,1),O--}return R}),t.formatArgs.call(w,b),(w.log||t.log).apply(w,b)}return y.namespace=u,y.useColors=t.useColors(),y.color=t.selectColor(u),y.extend=r,y.destroy=t.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(m!==t.namespaces&&(m=t.namespaces,g=t.enabled(u)),g),set:b=>{d=b}}),typeof t.init=="function"&&t.init(y),y}function r(u,f){let d=t(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),m=d.length;for(f=0;f<m;f++)d[f]&&(u=d[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f
|
|||
|
|
`).join(`
|
|||
|
|
`+s),i.push(n+"m+"+_s.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=w_()+e+" "+i[0]}function w_(){return Xe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function x_(...i){return process.stderr.write(bs.format(...i)+`
|
|||
|
|
`)}function S_(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function E_(){return process.env.DEBUG}function O_(i){i.inspectOpts={};let e=Object.keys(Xe.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=Xe.inspectOpts[e[t]]}_s.exports=Ca()(Xe);var{formatters:oh}=_s.exports;oh.o=function(i){return this.inspectOpts.colors=this.useColors,bs.inspect(i,this.inspectOpts).split(`
|
|||
|
|
`).map(e=>e.trim()).join(" ")};oh.O=function(i){return this.inspectOpts.colors=this.useColors,bs.inspect(i,this.inspectOpts)}});var rn=x((PI,Aa)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Aa.exports=eh():Aa.exports=ah()});var Bh=x((MI,aw)=>{aw.exports={name:"dotenv",version:"16.4.5",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","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --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:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Mh=x((qI,li)=>{var Da=require("fs"),ja=require("path"),lw=require("os"),cw=require("crypto"),uw=Bh(),Ua=uw.version,fw=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function hw(i){let e={},t=i.toString();t=t.replace(/\r\n?/mg,`
|
|||
|
|
`);let r;for(;(r=fw.exec(t))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|||
|
|
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function pw(i){let e=Ph(i),t=Ve.configDotenv({path:e});if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=Rh(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),l=gw(t,a);s=Ve.decrypt(l.ciphertext,l.key);break}catch(a){if(o+1>=n)throw a}return Ve.parse(s)}function dw(i){console.log(`[dotenv@${Ua}][INFO] ${i}`)}function mw(i){console.log(`[dotenv@${Ua}][WARN] ${i}`)}function As(i){console.log(`[dotenv@${Ua}][DEBUG] ${i}`)}function Rh(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function gw(i,e){let t;try{t=new URL(e)}catch(a){if(a.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 a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function Ph(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)Da.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=ja.resolve(process.cwd(),".env.vault");return Da.existsSync(e)?e:null}function Lh(i){return i[0]==="~"?ja.join(lw.homedir(),i.slice(1)):i}function vw(i){dw("Loading env from encrypted .env.vault");let e=Ve._parseVault(i),t=process.env;return i&&i.processEnv!=null&&(t=i.processEnv),Ve.populate(t,e,i),{parsed:e}}function yw(i){let e=ja.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug);i&&i.encoding?t=i.encoding:r&&As("No encoding is specified. UTF-8 is used by default");let n=[e];if(i&&i.path)if(!Array.isArray(i.path))n=[Lh(i.path)];else{n=[];for(let l of i.path)n.push(Lh(l))}let s,o={};for(let l of n)try{let c=Ve.parse(Da.readFileSync(l,{encoding:t}));Ve.populate(o,c,i)}catch(c){r&&As(`Failed to load ${l} ${c.message}`),s=c}let a=process.env;return i&&i.processEnv!=null&&(a=i.processEnv),Ve.populate(a,o,i),s?{parsed:o,error:s}:{parsed:o}}function bw(i){if(Rh(i).length===0)return Ve.configDotenv(i);let e=Ph(i);return e?Ve._configVault(i):(mw(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Ve.configDotenv(i))}function _w(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=cw.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,l=o.message==="Invalid key length",c=o.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw o}}function ww(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&As(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var Ve={configDotenv:yw,_configVault:vw,_parseVault:pw,config:bw,decrypt:_w,parse:hw,populate:ww};li.exports.configDotenv=Ve.configDotenv;li.exports._configVault=Ve._configVault;li.exports._parseVault=Ve._parseVault;li.exports.confi
|
|||
|
|
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new Pw.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],n=r.indexOf(t);n!==-1&&(r.splice(n,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Mw.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let n={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(n),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(s,o),a instanceof $h.Agent)try{return a.addRequest(e,n)}catch(l){return r(l)}this[Kt].currentSocket=a,super.createSocket(e,t,r)},a=>{this.decrementSockets(s,o),r(a)})}createConnection(){let e=this[Kt].currentSocket;if(this[Kt].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return(e=this[Kt].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[Kt]&&(this[Kt].defaultPort=e)}get protocol(){var e;return(e=this[Kt].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[Kt]&&(this[Kt].protocol=e)}};St.Agent=$a});var Gh=x(Er=>{"use strict";var qw=Er&&Er.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Er,"__esModule",{value:!0});Er.parseProxyResponse=void 0;var Fw=qw(rn()),Is=(0,Fw.default)("https-proxy-agent:parse-proxy-response");function Dw(i){return new Promise((e,t)=>{let r=0,n=[];function s(){let u=i.read();u?c(u):i.once("readable",s)}function o(){i.removeListener("end",a),i.removeListener("error",l),i.removeListener("readable",s)}function a(){o(),Is("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}function l(u){o(),Is("onerror %o",u),t(u)}function c(u){n.push(u),r+=u.length;let f=Buffer.concat(n,r),d=f.indexOf(`\r
|
|||
|
|
\r
|
|||
|
|
`);if(d===-1){Is("have not received end of HTTP headers yet..."),s();return}let m=f.slice(0,d).toString("ascii").split(`\r
|
|||
|
|
`),g=m.shift();if(!g)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let y=g.split(" "),b=+y[1],w=y.slice(2).join(" "),S={};for(let k of m){if(!k)continue;let O=k.indexOf(":");if(O===-1)return i.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${k}"`));let E=k.slice(0,O).toLowerCase(),R=k.slice(O+1).trimStart(),T=S[E];typeof T=="string"?S[E]=[T,R]:Array.isArray(T)?T.push(R):S[E]=R}Is("got proxy server response: %o %o",g,S),o(),e({connect:{statusCode:b,statusText:w,headers:S},buffered:f})}i.on("error",l),i.on("end",a),s()})}Er.parseProxyResponse=Dw});var Zh=x(Nt=>{"use strict";var jw=Nt&&Nt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Uw=Nt&&Nt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),zh=Nt&&Nt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&jw(e,i,t);return Uw(e,i),e},Jh=Nt&&Nt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.HttpsProxyAgent=void 0;var Ns=zh(require("net")),Wh=zh(require("tls")),$w=Jh(require("assert")),Vw=Jh(rn()),Hw=Va(),Gw=require("url"),Ww=Gh(),an=(0,Vw.default)("https-proxy-agent"),Yh=i=>i.servername===void 0&&i.host&&!Ns.isIP(i.host)?{...i,servername:i.host}:i,Bs=class extends Hw.Agent{constructor(e,t){var s;super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new Gw.URL(e):e,this.proxyHeaders=(s=t==null?void 0:t.headers)!=null?s:{},an("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?Kh(t,"headers"):null,host:r,port:n}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let n;r.protocol==="https:"?(an("Creating `tls.Socket`: %o",this.connectOpts),n=Wh.connect(Yh(this.connectOpts))):(an("Creating `net.Socket`: %o",this.connectOpts),n=Ns.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Ns.isIPv6(t.host)?`[${t.host}]`:t.host,a=`CONNECT ${o}:${t.port} HTTP/1.1\r
|
|||
|
|
`;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${t.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
|
|||
|
|
`;let l=(0,Ww.parseProxyResponse)(n);n.write(`${a}\r
|
|||
|
|
`);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",Yw),t.secureEndpoint?(an("Upgrading socket connection to TLS"),Wh.connect({...Kh(Yh(t),"host","path","port"),socket:n})):n;n.destroy();let f=new Ns.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{an("Replaying proxy buffer for failed request"),(0,$w.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),f}};Bs.protocols=["http","https"];Nt.HttpsProxyAgent=Bs;function Yw(i){i.resume()}function Kh(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var ep=x((VI,Ls)=>{var Xh=Xh||function(i){return Buffer.from(i).toString("base64")};function Kw(i){var e=this,t=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,d=new Array(65535),m=new Array(65535),g=new Array(64),y=new Array(64),b=[],w=0,S=7,k=new Array(64),O=new Array(64),E=new Array(64),R=new Array(256),T=new Array(2048),A,C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],B=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],F=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],H=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Y=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function Q(I){for(var Z=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],te=0;te<64;te++){var ee=r((Z[te]*I+50)/100);ee<1?ee=1:ee>255&&(ee=255),n[C[te]]=ee}for(var le=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ce=0;ce<64;ce++){var _e=r((le[ce]*I+50)/100);_e<1?_e=1:_e>255&&(_e=255),s[C[ce]]=_e}for(var we=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Re=0,Ae=0;Ae<8;Ae++)for(var D=0;D<8;D++)o[Re]=1/(n[C[Re]]*we[Ae]*we[D]*8),a[Re]=1/(s[C[Re]]*we[Ae]*we[D]*8),Re++}function W(I,Z){for(var te=0,ee=0,le=new Array,ce=1;ce<=16;ce++){for(var _e=1;_e<=I[ce];_e++)le[Z[ee]]=[],le[Z[ee]][0]=te,le[Z[ee]][1]=ce,ee++,te++;te*=2}return le}function de(){l=W(B,P),c=W(H,j),u=W(U,F),f=W(V,Y)}function ae(){for(var I=1,Z=2,te=1;te<=15;te++){for(var ee=I;ee<Z;ee++)m[32767+ee]=te,d[32767+ee]=[],d[32767+ee][1]=te,d[32767+ee][0]=ee;for(var le=-(Z-1);le<=-I;le++)m[32767+le]=te,d[32767+le]=[],d[32767+le][1]=te,d[32767+le][0]=Z-1+le;I<<=1,Z<<=1}}function ne(){for(var I=0;I<256;I++)T[I]=19595*I,T[I+256>>0]=38470*I,T[I+512>>0]=7471*I+32768,T[I+768>>0]=-11059*I,T[I+1024>>0]=-21709*I,T[I+1280>>0]=32768*I+8421375,T[I+1536>>0]=-27439*I,T[I+1792>>0]=-5329*I}function ue(I){for(var Z=I[0],te=I[1]-1;te>=0;)Z&1<<te&&(w|=1<<S
|
|||
|
|
%s`,E,E,S,r);var R=S.type==="*"?za:S.type==="?"?Ka:"\\"+S.type;n=!0,r=r.slice(0,S.reStart)+R+"\\("+E}g(),s&&(r+="\\\\");var T=!1;switch(r.charAt(0)){case"[":case".":case"(":T=!0}for(var A=a.length-1;A>-1;A--){var C=a[A],B=r.slice(0,C.reStart),P=r.slice(C.reStart,C.reEnd-8),U=r.slice(C.reEnd-8,C.reEnd),F=r.slice(C.reEnd);U+=F;var H=B.split("(").length-1,j=F;for(y=0;y<H;y++)j=j.replace(/\)[+*?]?/,"");F=j;var V="";F===""&&e!==Ps&&(V="$");var Y=B+P+F+V+U;r=Y}if(r!==""&&n&&(r="(?=.)"+r),T&&(r=d+r),e===Ps)return[r,n];if(!n)return v1(i);var Q=t.nocase?"i":"";try{var W=new RegExp("^"+r+"$",Q)}catch{return new RegExp("$.")}return W._glob=i,W._src=r,W}Et.makeRe=function(i,e){return new et(i,e||{}).makeRe()};et.prototype.makeRe=g1;function g1(){if(this.regexp||this.regexp===!1)return this.regexp;var i=this.set;if(!i.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?za:e.dot?l1:c1,r=e.nocase?"i":"",n=i.map(function(s){return s.map(function(o){return o===Ja?t:typeof o=="string"?y1(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}Et.match=function(i,e,t){t=t||{};var r=new et(e,t);return i=i.filter(function(n){return r.match(n)}),r.options.nonull&&!i.length&&i.push(e),i};et.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;ln.sep!=="/"&&(e=e.split(ln.sep).join("/")),e=e.split(Ip),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};et.prototype.matchOne=function(i,e,t){var r=this.options;this.debug("matchOne",{this:this,file:i,pattern:e}),this.debug("matchOne",i.length,e.length);for(var n=0,s=0,o=i.length,a=e.length;n<o&&s<a;n++,s++){this.debug("matchOne loop");var l=e[s],c=i[n];if(this.debug(e,l,c),l===!1)return!1;if(l===Ja){this.debug("GLOBSTAR",[e,l,c]);var u=n,f=s+1;if(f===a){for(this.debug("** at the end");n<o;n++)if(i[n]==="."||i[n]===".."||!r.dot&&i[n].charAt(0)===".")return!1;return!0}for(;u<o;){var d=i[u];if(this.debug(`
|
|||
|
|
globstar while`,i,u,e,f,d),this.matchOne(i.slice(u),e.slice(f),t))return this.debug("globstar found match!",u,o,d),!0;if(d==="."||d===".."||!r.dot&&d.charAt(0)==="."){this.debug("dot detected!",i,u,e,f);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(t&&(this.debug(`
|
|||
|
|
>>> no match, partial?`,i,u,e,f),u===o))}var m;if(typeof l=="string"?(m=c===l,this.debug("string match",l,c,m)):(m=c.match(l),this.debug("pattern match",l,c,m)),!m)return!1}if(n===o&&s===a)return!0;if(n===o)return t;if(s===a)return n===o-1&&i[n]==="";throw new Error("wtf?")};function v1(i){return i.replace(/\\(.)/g,"$1")}function y1(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Qa=x((e2,Pp)=>{"use strict";var Rp=require("fs"),Za;function b1(){try{return Rp.statSync("/.dockerenv"),!0}catch{return!1}}function _1(){try{return Rp.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Pp.exports=()=>(Za===void 0&&(Za=b1()||_1()),Za)});var Fp=x((t2,Xa)=>{"use strict";var w1=require("os"),x1=require("fs"),Mp=Qa(),qp=()=>{if(process.platform!=="linux")return!1;if(w1.release().toLowerCase().includes("microsoft"))return!Mp();try{return x1.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Mp():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Xa.exports=qp:Xa.exports=qp()});var jp=x((i2,Dp)=>{"use strict";Dp.exports=(i,e,t)=>{let r=n=>Object.defineProperty(i,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let n=t();return r(n),n},set(n){r(n)}}),i}});var Yp=x((r2,Wp)=>{var S1=require("path"),E1=require("child_process"),{promises:el,constants:Gp}=require("fs"),qs=Fp(),O1=Qa(),tl=jp(),Up=S1.join(__dirname,"xdg-open"),{platform:kr,arch:$p}=process,k1=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",r=!1;try{await el.access(t,Gp.F_OK),r=!0}catch{}if(!r)return i;let n=await el.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):i}})(),Vp=async(i,e)=>{let t;for(let r of i)try{return await e(r)}catch(n){t=n}throw t},Fs=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return Vp(i.app,a=>Fs({...i,app:a}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return Vp(e,a=>Fs({...i,app:{name:a,arguments:t}}));let r,n=[],s={};if(kr==="darwin")r="open",i.wait&&n.push("--wait-apps"),i.background&&n.push("--background"),i.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(kr==="win32"||qs&&!O1()){let a=await k1();r=qs?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),qs||(s.windowsVerbatimArguments=!0);let l=["Start"];i.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&l.push(`"${i.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),l.push(t.join(","))),i.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let a=!__dirname||__dirname==="/",l=!1;try{await el.access(Up,Gp.X_OK),l=!0}catch{}r=process.versions.electron||kr==="android"||a||!l?"xdg-open":Up}t.length>0&&n.push(...t),i.wait||(s.stdio="ignore",s.detached=!0)}i.target&&n.push(i.target),kr==="darwin"&&t.length>0&&n.push("--args",...t);let o=E1.spawn(r,n,s);return i.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",c=>{if(i.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},il=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return Fs({...e,target:i})},C1=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return Fs({...e,app:{name:i,arguments:t}})};function Hp(i){if(typeof i=="string"||Array.isArray(i))return i;let{[$p]:e}=i;if(!e)throw new Error(`${$p} is not supported`);return e}function rl({[kr]:i},{wsl:e}){if(e&&qs)return Hp(e);if(!i)throw new Error(`${kr} is not supported`);return Hp(i)}var Ds={};tl(Ds,"chrome",()=>rl({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","c
|
|||
|
|
`)}displayWidth(e){return Vd(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,n){var d;let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-n.displayWidth(e)),l=2,u=((d=this.helpWidth)!=null?d:80)-t-l-2,f;return u<this.minWidthToWrap||n.preformatted(r)?f=r:f=n.boxWrap(r,u).replace(/\n/g,`
|
|||
|
|
`+" ".repeat(t+l)),o+a+" ".repeat(l)+f.replace(/\n/g,`
|
|||
|
|
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(c+f<=t){l.push(u),c+=f;return}s.push(l.join(""));let d=u.trimStart();l=[d],c=this.displayWidth(d)}),s.push(l.join(""))}),s.join(`
|
|||
|
|
`)}};function Vd(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}El.Help=Sl;El.stripColor=Vd});var Al=x(Tl=>{var{InvalidArgumentError:Px}=un(),kl=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Mx(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Px(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Hd(this.name().replace(/^no-/,"")):Hd(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Cl=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let n=this.negativeOptions.get(r).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function Hd(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Mx(i){let e,t,r=/^-[^-]$/,n=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|||
|
|
- a short flag is a single dash and a single character
|
|||
|
|
- either use a single dash and a single character (for a short flag)
|
|||
|
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
|
|||
|
|
- too many short flags`):n.test(o)?new Error(`${a}
|
|||
|
|
- too many long flags`):new Error(`${a}
|
|||
|
|
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Tl.Option=kl;Tl.DualOptions=Cl});var Wd=x(Gd=>{function qx(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=i.length;n++){let s=1;i[n-1]===e[r-1]?s=0:s=1,t[n][r]=Math.min(t[n-1][r]+1,t[n][r-1]+1,t[n-1][r-1]+s),n>1&&r>1&&i[n-1]===e[r-2]&&i[n-2]===e[r-1]&&(t[n][r]=Math.min(t[n][r],t[n-2][r-2]+1))}return t[i.length][e.length]}function Fx(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=qx(i,o),l=Math.max(i.length,o.length);(l-a)/l>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|||
|
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|||
|
|
(Did you mean ${r[0]}?)`:""}Gd.suggestSimilar=Fx});var Jd=x(Rl=>{var Dx=require("node:events").EventEmitter,Il=require("node:child_process"),ci=require("node:path"),$s=require("node:fs"),Oe=require("node:process"),{Argument:jx,humanReadableArgName:Ux}=Us(),{CommanderError:Nl}=un(),{Help:$x,stripColor:Vx}=Ol(),{Option:Yd,DualOptions:Hx}=Al(),{suggestSimilar:Kd}=Wd(),Bl=class i extends Dx{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Oe.stdout.write(t),writeErr:t=>Oe.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>Oe.stdout.isTTY?Oe.stdout.columns:void 0,getErrHelpWidth:()=>Oe.stderr.isTTY?Oe.stderr.columns:void 0,getOutHasColors:()=>{var t,r,n;return(n=Ll())!=null?n:Oe.stdout.isTTY&&((r=(t=Oe.stdout).hasColors)==null?void 0:r.call(t))},getErrHasColors:()=>{var t,r,n;return(n=Ll())!=null?n:Oe.stderr.isTTY&&((r=(t=Oe.stderr).hasColors)==null?void 0:r.call(t))},stripColor:t=>Vx(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new i(e)}createHelp(){return Object.assign(new $x,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|||
|
|
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new jx(e,t)}argument(e,t,r,n){let s=this.createArgument(e,t);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e!=null?e:"help [command]";let[,r,n]=e.match(/([^ ]+) *(.*)/),s=t!=null?t:"display help for command",o=this.createCommand(r);return o.helpOption(!1),n&&o.arguments(n),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){var t;return((t=this._addImplicitHelpCommand)!=null?t:this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|||
|
|
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new Nl(e,t,r)),Oe.exit(e)}action(e){let t=r=>{let n=this.registeredArguments.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Yd(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
|
|||
|
|
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof Yd)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var n,s;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(n=Oe.versions)!=null&&n.electron&&(t.from="electron");let o=(s=Oe.execArgv)!=null?s:[];(o.includes("-e")||o.includes("--eval")||o.includes("-p")||o.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Oe.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Oe.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),t
|
|||
|
|
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if($s.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
|
|||
|
|
- if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|||
|
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|||
|
|
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let d=ci.resolve(u,f);if($s.existsSync(d))return d;if(n.includes(ci.extname(f)))return;let m=n.find(g=>$s.existsSync(`${d}${g}`));if(m)return`${d}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=$s.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=ci.resolve(ci.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=ci.basename(this._scriptPath,ci.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}r=n.includes(ci.extname(o));let l;Oe.platform!=="win32"?r?(t.unshift(o),t=zd(Oe.execArgv).concat(t),l=Il.spawn(Oe.argv[0],t,{stdio:"inherit"})):l=Il.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=zd(Oe.execArgv).concat(t),l=Il.spawn(Oe.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Oe.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;l.on("close",u=>{u=u!=null?u:1,c?c(new Nl(u,"commander.executeSubCommandAsync","(close)")):Oe.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)Oe.exit(1);else{let f=new Nl(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,r){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(r));else return n._parseCommand(t,r)}),s}_dispatchHelpCommand(e){var r,n,s,o;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[(o=(s=(r=this._getHelpOption())==null?void 0:r.long)!=null?s:(n=this._getHelpOption())==null?void 0:n.short)!=null?o:"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,n,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&
|
|||
|
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|||
|
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|||
|
|
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Oe.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Oe.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Hx(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},n=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Kd(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=Kd(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|||
|
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=(n=this.parent)==null?void 0:n._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>Ux(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=ci.basename(e,ci.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);return r.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,s;return t?(r=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:n,helpWidth:s}}outputHelp(e){var o;let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),(o=this._getHelpOption())!=null&&o.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){var r;return typeof e=="boolean"?(e?this._helpOption=(r=this._helpOption)!=null?r:void 0:this._helpOption=null,this):(e=e!=null?e:"-h, --help",t=t!=null?t:"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){var r;this.outputHelp(e);let t=Number((r=Oe.exitCode)!=null?r:0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|||
|
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|||
|
|
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function zd(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}function Ll(){if(Oe.env.NO_COLOR||Oe.env.FORCE_COLOR==="0"||Oe.env.FORCE_COLOR==="false")return!1;if(Oe.env.FORCE_COLOR||Oe.env.CLICOLOR_FORCE!==void 0)return!0}Rl.Command=Bl;Rl.useColor=Ll});var em=x(Lt=>{var{Argument:Zd}=Us(),{Command:Pl}=Jd(),{CommanderError:Gx,InvalidArgumentError:Qd}=un(),{Help:Wx}=Ol(),{Option:Xd}=Al();Lt.program=new Pl;Lt.createCommand=i=>new Pl(i);Lt.createOption=(i,e)=>new Xd(i,e);Lt.createArgument=(i,e)=>new Zd(i,e);Lt.Command=Pl;Lt.Option=Xd;Lt.Argument=Zd;Lt.Help=Wx;Lt.CommanderError=Gx;Lt.InvalidArgumentError=Qd;Lt.InvalidOptionArgumentError=Qd});var om=x((nm,sm)=>{nm=sm.exports=Ir;function Ir(i,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var t=e;e={},e.total=t}else{if(e=e||{},typeof i!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=i,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}Ir.prototype.tick=function(i,e){if(i!==0&&(i=i||1),typeof i=="object"&&(e=i,i=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=i,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};Ir.prototype.render=function(i,e){if(e=e!==void 0?e:!1,i&&(this.tokens=i),!!this.stream.isTTY){var t=Date.now(),r=t-this.lastRender;if(!(!e&&r<this.renderThrottle)){this.lastRender=t;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),o,a,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),d=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),m=Math.max(0,this.stream.columns-d.replace(":bar","").length);m&&process.platform==="win32"&&(m=m-1);var g=Math.min(this.width,m);if(l=Math.round(g*n),a=Array(Math.max(0,l+1)).join(this.chars.complete),o=Array(Math.max(0,g-l+1)).join(this.chars.incomplete),l>0&&(a=a.slice(0,-1)+this.chars.head),d=d.replace(":bar",a+o),this.tokens)for(var y in this.tokens)d=d.replace(":"+y,this.tokens[y]);this.lastDraw!==d&&(this.stream.cursorTo(0),this.stream.write(d),this.stream.clearLine(1),this.lastDraw=d)}}};Ir.prototype.update=function(i,e){var t=Math.floor(i*this.total),r=t-this.curr;this.tick(r,e)};Ir.prototype.interrupt=function(i){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(i),this.stream.write(`
|
|||
|
|
`),this.stream.write(this.lastDraw)};Ir.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
|
|||
|
|
`)}});var lm=x(($2,am)=>{am.exports=om()});var hm=x(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});var cm=require("buffer"),Ji={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};ui.ERRORS=Ji;function Yx(i){if(!cm.Buffer.isEncoding(i))throw new Error(Ji.INVALID_ENCODING)}ui.checkEncoding=Yx;function um(i){return typeof i=="number"&&isFinite(i)&&Zx(i)}ui.isFiniteInteger=um;function fm(i,e){if(typeof i=="number"){if(!um(i)||i<0)throw new Error(e?Ji.INVALID_OFFSET:Ji.INVALID_LENGTH)}else throw new Error(e?Ji.INVALID_OFFSET_NON_NUMBER:Ji.INVALID_LENGTH_NON_NUMBER)}function Kx(i){fm(i,!1)}ui.checkLengthValue=Kx;function zx(i){fm(i,!0)}ui.checkOffsetValue=zx;function Jx(i,e){if(i<0||i>e.length)throw new Error(Ji.INVALID_TARGET_OFFSET)}ui.checkTargetOffset=Jx;function Zx(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}function Qx(i){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof cm.Buffer.prototype[i]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}ui.bigIntAndBufferInt64Check=Qx});var dm=x(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var pe=hm(),pm=4096,Xx="utf8",Ml=class i{constructor(e){if(this.length=0,this._encoding=Xx,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(pe.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(pe.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(pm);else{if(typeof e!="undefined")throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(pm)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return pe.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return pe.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._inse
|
|||
|
|
`).join(`\r
|
|||
|
|
`)),s.removeListener("error",jg),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(wn,this)})),a(u,n)}};$g.exports=Oc;function cO(i,e){for(let t of Object.keys(e))i.on(t,e[t]);return function(){for(let r of Object.keys(e))i.removeListener(r,e[r])}}function wn(i){i._state=Ug,i.emit("close")}function jg(){this.destroy()}function xn(i,e,t,r){t=t||ho.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...r},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${e} ${ho.STATUS_CODES[e]}\r
|
|||
|
|
`+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r
|
|||
|
|
`)+`\r
|
|||
|
|
\r
|
|||
|
|
`+t)}function rr(i,e,t,r,n){if(i.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,rr),i.emit("wsClientError",s,t,e)}else xn(t,r,n)}});var Se=x(tt=>{"use strict";var Ac=Symbol.for("yaml.alias"),Wg=Symbol.for("yaml.document"),po=Symbol.for("yaml.map"),Yg=Symbol.for("yaml.pair"),Ic=Symbol.for("yaml.scalar"),mo=Symbol.for("yaml.seq"),mi=Symbol.for("yaml.node.type"),fO=i=>!!i&&typeof i=="object"&&i[mi]===Ac,hO=i=>!!i&&typeof i=="object"&&i[mi]===Wg,pO=i=>!!i&&typeof i=="object"&&i[mi]===po,dO=i=>!!i&&typeof i=="object"&&i[mi]===Yg,Kg=i=>!!i&&typeof i=="object"&&i[mi]===Ic,mO=i=>!!i&&typeof i=="object"&&i[mi]===mo;function zg(i){if(i&&typeof i=="object")switch(i[mi]){case po:case mo:return!0}return!1}function gO(i){if(i&&typeof i=="object")switch(i[mi]){case Ac:case po:case Ic:case mo:return!0}return!1}var vO=i=>(Kg(i)||zg(i))&&!!i.anchor;tt.ALIAS=Ac;tt.DOC=Wg;tt.MAP=po;tt.NODE_TYPE=mi;tt.PAIR=Yg;tt.SCALAR=Ic;tt.SEQ=mo;tt.hasAnchor=vO;tt.isAlias=fO;tt.isCollection=zg;tt.isDocument=hO;tt.isMap=pO;tt.isNode=gO;tt.isPair=dO;tt.isScalar=Kg;tt.isSeq=mO});var Sn=x(Nc=>{"use strict";var Ge=Se(),vt=Symbol("break visit"),Jg=Symbol("skip children"),ti=Symbol("remove node");function go(i,e){let t=Zg(e);Ge.isDocument(i)?Ur(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):Ur(null,i,t,Object.freeze([]))}go.BREAK=vt;go.SKIP=Jg;go.REMOVE=ti;function Ur(i,e,t,r){let n=Qg(i,e,t,r);if(Ge.isNode(n)||Ge.isPair(n))return Xg(i,r,n),Ur(i,n,t,r);if(typeof n!="symbol"){if(Ge.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=Ur(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===vt)return vt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ge.isPair(e)){r=Object.freeze(r.concat(e));let s=Ur("key",e.key,t,r);if(s===vt)return vt;s===ti&&(e.key=null);let o=Ur("value",e.value,t,r);if(o===vt)return vt;o===ti&&(e.value=null)}}return n}async function vo(i,e){let t=Zg(e);Ge.isDocument(i)?await $r(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):await $r(null,i,t,Object.freeze([]))}vo.BREAK=vt;vo.SKIP=Jg;vo.REMOVE=ti;async function $r(i,e,t,r){let n=await Qg(i,e,t,r);if(Ge.isNode(n)||Ge.isPair(n))return Xg(i,r,n),$r(i,n,t,r);if(typeof n!="symbol"){if(Ge.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=await $r(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===vt)return vt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ge.isPair(e)){r=Object.freeze(r.concat(e));let s=await $r("key",e.key,t,r);if(s===vt)return vt;s===ti&&(e.key=null);let o=await $r("value",e.value,t,r);if(o===vt)return vt;o===ti&&(e.value=null)}}return n}function Zg(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Qg(i,e,t,r){var n,s,o,a,l;if(typeof t=="function")return t(i,e,r);if(Ge.isMap(e))return(n=t.Map)==null?void 0:n.call(t,i,e,r);if(Ge.isSeq(e))return(s=t.Seq)==null?void 0:s.call(t,i,e,r);if(Ge.isPair(e))return(o=t.Pair)==null?void 0:o.call(t,i,e,r);if(Ge.isScalar(e))return(a=t.Scalar)==null?void 0:a.call(t,i,e,r);if(Ge.isAlias(e))return(l=t.Alias)==null?void 0:l.call(t,i,e,r)}function Xg(i,e,t){let r=e[e.length-1];if(Ge.isCollection(r))r.items[i]=t;else if(Ge.isPair(r))i==="key"?r.key=t:r.value=t;else if(Ge.isDocument(r))r.contents=t;else{let n=Ge.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Nc.visit=go;Nc.visitAsync=vo});var Bc=x(t0=>{"use strict";var e0=Se(),yO=Sn(),bO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_O=i=>i.replace(/[!,[\]{}]/g,e=>bO[e]),En=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocumen
|
|||
|
|
`)}};En.defaultYaml={explicit:!1,version:"1.2"};En.defaultTags={"!!":"tag:yaml.org,2002:"};t0.Directives=En});var yo=x(On=>{"use strict";var i0=Se(),wO=Sn();function xO(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function r0(i){let e=new Set;return wO.visit(i,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function n0(i,e){for(let t=1;;++t){let r=`${i}${t}`;if(!e.has(r))return r}}function SO(i,e){let t=[],r=new Map,n=null;return{onAnchor:s=>{t.push(s),n||(n=r0(i));let o=n0(e,n);return n.add(o),o},setAnchors:()=>{for(let s of t){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(i0.isScalar(o.node)||i0.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}On.anchorIsValid=xO;On.anchorNames=r0;On.createNodeAnchors=SO;On.findNewAnchor=n0});var Lc=x(s0=>{"use strict";function kn(i,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){let o=r[n],a=kn(i,r,String(n),o);a===void 0?delete r[n]:a!==o&&(r[n]=a)}else if(r instanceof Map)for(let n of Array.from(r.keys())){let s=r.get(n),o=kn(i,r,n,s);o===void 0?r.delete(n):o!==s&&r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let s=kn(i,r,n,n);s===void 0?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(let[n,s]of Object.entries(r)){let o=kn(i,r,n,s);o===void 0?delete r[n]:o!==s&&(r[n]=o)}return i.call(e,t,r)}s0.applyReviver=kn});var Ci=x(a0=>{"use strict";var EO=Se();function o0(i,e,t){if(Array.isArray(i))return i.map((r,n)=>o0(r,String(n),t));if(i&&typeof i.toJSON=="function"){if(!t||!EO.hasAnchor(i))return i.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(i,r),t.onCreate=s=>{r.res=s,delete t.onCreate};let n=i.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}a0.toJS=o0});var bo=x(c0=>{"use strict";var OO=Lc(),l0=Se(),kO=Ci(),Rc=class{constructor(e){Object.defineProperty(this,l0.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!l0.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=kO.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?OO.applyReviver(s,{"":a},"",a):a}};c0.NodeBase=Rc});var Cn=x(f0=>{"use strict";var CO=yo(),u0=Sn(),_o=Se(),TO=bo(),AO=Ci(),Pc=class extends TO.NodeBase{constructor(e){super(_o.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return u0.visit(e,{Node:(r,n)=>{if(n===this)return u0.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=t,o=this.resolve(n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(AO.toJS(o,null,t),a=r.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=wo(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){let n=`*${this.source}`;if(e){if(CO.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function wo(i,e,t){if(_o.isAlias(e)){let r=e.resolve(i),n=t&&r&&t.get(r);return n?n.count*n.aliasCount:0}else if(_o.isCollection(e)){let r=0;for(let n of e.items){let s=wo(i,n,t);s>r&&(r=s)}return r}else if(
|
|||
|
|
`)?Dc(t,e):t.includes(`
|
|||
|
|
`)?`
|
|||
|
|
`+Dc(t,e):(i.endsWith(" ")?"":" ")+t;Eo.indentComment=Dc;Eo.lineComment=UO;Eo.stringifyComment=jO});var g0=x(In=>{"use strict";var $O="flow",jc="block",Oo="quoted";function VO(i,e,t="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return i;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(i.length<=l)return i;let c=[],u={},f=n-e.length;typeof r=="number"&&(r>n-Math.max(2,s)?c.push(0):f=n-r);let d,m,g=!1,y=-1,b=-1,w=-1;t===jc&&(y=m0(i,y,e.length),y!==-1&&(f=y+l));for(let k;k=i[y+=1];){if(t===Oo&&k==="\\"){switch(b=y,i[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}w=y}if(k===`
|
|||
|
|
`)t===jc&&(y=m0(i,y,e.length)),f=y+e.length+l,d=void 0;else{if(k===" "&&m&&m!==" "&&m!==`
|
|||
|
|
`&&m!==" "){let O=i[y+1];O&&O!==" "&&O!==`
|
|||
|
|
`&&O!==" "&&(d=y)}if(y>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Oo){for(;m===" "||m===" ";)m=k,k=i[y+=1],g=!0;let O=y>w+1?y-2:b-1;if(u[O])return i;c.push(O),u[O]=!0,f=O+l,d=void 0}else g=!0}m=k}if(g&&a&&a(),c.length===0)return i;o&&o();let S=i.slice(0,c[0]);for(let k=0;k<c.length;++k){let O=c[k],E=c[k+1]||i.length;O===0?S=`
|
|||
|
|
${e}${i.slice(0,E)}`:(t===Oo&&u[O]&&(S+=`${i[O]}\\`),S+=`
|
|||
|
|
${e}${i.slice(O+1,E)}`)}return S}function m0(i,e,t){let r=e,n=e+1,s=i[n];for(;s===" "||s===" ";)if(e<n+t)s=i[++e];else{do s=i[++e];while(s&&s!==`
|
|||
|
|
`);r=e,n=e+1,s=i[n]}return r}In.FOLD_BLOCK=jc;In.FOLD_FLOW=$O;In.FOLD_QUOTED=Oo;In.foldFlowLines=VO});var Bn=x(v0=>{"use strict";var ri=je(),Ai=g0(),Co=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),To=i=>/^(%|---|\.\.\.)/m.test(i);function HO(i,e,t){if(!e||e<0)return!1;let r=e-t,n=i.length;if(n<=r)return!1;for(let s=0,o=0;s<n;++s)if(i[s]===`
|
|||
|
|
`){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function Nn(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(To(i)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<n)l+=1;else{for(o+=t.slice(a,l)+`
|
|||
|
|
|
|||
|
|
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|||
|
|
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:Ai.foldFlowLines(o,s,Ai.FOLD_QUOTED,Co(e,!1))}function Uc(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
|
|||
|
|
`)||/[ \t]\n|\n[ \t]/.test(i))return Nn(i,e);let t=e.indent||(To(i)?" ":""),r="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
|||
|
|
${t}`)+"'";return e.implicitKey?r:Ai.foldFlowLines(r,t,Ai.FOLD_FLOW,Co(e,!1))}function Vr(i,e){let{singleQuote:t}=e.options,r;if(t===!1)r=Nn;else{let n=i.includes('"'),s=i.includes("'");n&&!s?r=Uc:s&&!n?r=Nn:r=t?Uc:Nn}return r(i,e)}var $c;try{$c=new RegExp(`(^|(?<!
|
|||
|
|
))
|
|||
|
|
+(?!
|
|||
|
|
|$)`,"g")}catch{$c=/\n+(?!\n|$)/g}function ko({comment:i,type:e,value:t},r,n,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Vr(t,r);let c=r.indent||(r.forceBlockIndent||To(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===ri.Scalar.BLOCK_FOLDED?!1:e===ri.Scalar.BLOCK_LITERAL?!0:!HO(t,l,c.length);if(!t)return u?`|
|
|||
|
|
`:`>
|
|||
|
|
`;let f,d;for(d=t.length;d>0;--d){let R=t[d-1];if(R!==`
|
|||
|
|
`&&R!==" "&&R!==" ")break}let m=t.substring(d),g=m.indexOf(`
|
|||
|
|
`);g===-1?f="-":t===m||g!==m.length-1?(f="+",s&&s()):f="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
|
|||
|
|
`&&(m=m.slice(0,-1)),m=m.replace($c,`$&${c}`));let y=!1,b,w=-1;for(b=0;b<t.length;++b){let R=t[b];if(R===" ")y=!0;else if(R===`
|
|||
|
|
`)w=b;else break}let S=t.substring(0,w<b?w+1:b);S&&(t=t.substring(S.length),S=S.replace(/\n+/g,`$&${c}`));let O=(u?"|":">")+(y?c?"2":"1":"")+f;if(i&&(O+=" "+a(i.replace(/ ?[\r\n]+/g," ")),n&&n()),u)return t=t.replace(/\n+/g,`$&${c}`),`${O}
|
|||
|
|
${c}${S}${t}${m}`;t=t.replace(/\n+/g,`
|
|||
|
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let E=Ai.foldFlowLines(`${S}${t}${m}`,c,Ai.FOLD_BLOCK,Co(r,!0));return`${O}
|
|||
|
|
${c}${E}`}function GO(i,e,t,r){let{type:n,value:s}=i,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
|
|||
|
|
`)||u&&/[[\]{},]/.test(s))return Vr(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
|
|||
|
|
`)?Vr(s,e):ko(i,e,t,r);if(!a&&!u&&n!==ri.Scalar.PLAIN&&s.includes(`
|
|||
|
|
`))return ko(i,e,t,r);if(To(s)){if(l==="")return e.forceBlockIndent=!0,ko(i,e,t,r);if(a&&l===c)return Vr(s,e)}let f=s.replace(/\n+/g,`$&
|
|||
|
|
${l}`);if(o){let d=y=>{var b;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((b=y.test)==null?void 0:b.test(f))},{compat:m,tags:g}=e.doc.schema;if(g.some(d)||m!=null&&m.some(d))return Vr(s,e)}return a?f:Ai.foldFlowLines(f,l,Ai.FOLD_FLOW,Co(e,!1))}function WO(i,e,t,r){let{implicitKey:n,inFlow:s}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:a}=i;a!==ri.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=ri.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case ri.Scalar.BLOCK_FOLDED:case ri.Scalar.BLOCK_LITERAL:return n||s?Vr(o.value,e):ko(o,e,t,r);case ri.Scalar.QUOTE_DOUBLE:return Nn(o.value,e);case ri.Scalar.QUOTE_SINGLE:return Uc(o.value,e);case ri.Scalar.PLAIN:return GO(o,e,t,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}v0.stringifyString=WO});var Ln=x(Vc=>{"use strict";var YO=yo(),Ii=Se(),KO=An(),zO=Bn();function JO(i,e){let t=Object.assign({blockQuote:!0,commentString:KO.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function ZO(i,e){var n,s,o,a;if(e.tag){let l=i.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let t,r;if(Ii.isScalar(e)){r=e.value;let l=i.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}t=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,t=i.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!t){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return t}function QO(i,e,{anchors:t,doc:r}){if(!r.directives)return"";let n=[],s=(Ii.isScalar(i)||Ii.isCollection(i))&&i.anchor;s&&YO.anchorIsValid(s)&&(t.add(s),n.push(`&${s}`));let o=i.tag?i.tag:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function XO(i,e,t,r){var l,c;if(Ii.isPair(i))return i.toString(e,t,r);if(Ii.isAlias(i)){if(e.doc.directives)return i.toString(e);if((l=e.resolvedAliases)!=null&&l.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let n,s=Ii.isNode(i)?i:e.doc.createNode(i,{onTagObj:u=>n=u});n||(n=ZO(e.doc.schema.tags,s));let o=QO(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,t,r):Ii.isScalar(s)?zO.stringifyString(s,e,t,r):s.toString(e,t,r);return o?Ii.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|||
|
|
${e.indent}${a}`:a}Vc.createStringifyContext=JO;Vc.stringify=XO});var w0=x(_0=>{"use strict";var gi=Se(),y0=je(),b0=Ln(),Rn=An();function ek({key:i,value:e},t,r,n){var T,A;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,d=gi.isNode(i)&&i.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(gi.isCollection(i)||!gi.isNode(i)&&typeof i=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let m=!f&&(!i||d&&e==null&&!t.inFlow||gi.isCollection(i)||(gi.isScalar(i)?i.type===y0.Scalar.BLOCK_FOLDED||i.type===y0.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(f||!s),indent:a+l});let g=!1,y=!1,b=b0.stringify(i,t,()=>g=!0,()=>y=!0);if(!m&&!t.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(s||e==null)return g&&r&&r(),b===""?"?":m?`? ${b}`:b}else if(s&&!f||e==null&&m)return b=`? ${b}`,d&&!g?b+=Rn.lineComment(b,t.indent,c(d)):y&&n&&n(),b;g&&(d=null),m?(d&&(b+=Rn.lineComment(b,t.indent,c(d))),b=`? ${b}
|
|||
|
|
${a}:`):(b=`${b}:`,d&&(b+=Rn.lineComment(b,t.indent,c(d))));let w,S,k;gi.isNode(e)?(w=!!e.spaceBefore,S=e.commentBefore,k=e.comment):(w=!1,S=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!d&&gi.isScalar(e)&&(t.indentAtStart=b.length+1),y=!1,!u&&l.length>=2&&!t.inFlow&&!m&&gi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let O=!1,E=b0.stringify(e,t,()=>O=!0,()=>y=!0),R=" ";if(d||w||S){if(R=w?`
|
|||
|
|
`:"",S){let C=c(S);R+=`
|
|||
|
|
${Rn.indentComment(C,t.indent)}`}E===""&&!t.inFlow?R===`
|
|||
|
|
`&&(R=`
|
|||
|
|
|
|||
|
|
`):R+=`
|
|||
|
|
${t.indent}`}else if(!m&&gi.isCollection(e)){let C=E[0],B=E.indexOf(`
|
|||
|
|
`),P=B!==-1,U=(A=(T=t.inFlow)!=null?T:e.flow)!=null?A:e.items.length===0;if(P||!U){let F=!1;if(P&&(C==="&"||C==="!")){let H=E.indexOf(" ");C==="&"&&H!==-1&&H<B&&E[H+1]==="!"&&(H=E.indexOf(" ",H+1)),(H===-1||B<H)&&(F=!0)}F||(R=`
|
|||
|
|
${t.indent}`)}}else(E===""||E[0]===`
|
|||
|
|
`)&&(R="");return b+=R+E,t.inFlow?O&&r&&r():k&&!O?b+=Rn.lineComment(b,t.indent,c(k)):y&&n&&n(),b}_0.stringifyPair=ek});var Gc=x(Hc=>{"use strict";function tk(i,...e){i==="debug"&&console.log(...e)}function ik(i,e){(i==="debug"||i==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}Hc.debug=tk;Hc.warn=ik});var Bo=x(No=>{"use strict";var Pn=Se(),x0=je(),Ao="<<",Io={identify:i=>i===Ao||typeof i=="symbol"&&i.description===Ao,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new x0.Scalar(Symbol(Ao)),{addToJSMap:S0}),stringify:()=>Ao},rk=(i,e)=>(Io.identify(e)||Pn.isScalar(e)&&(!e.type||e.type===x0.Scalar.PLAIN)&&Io.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===Io.tag&&t.default));function S0(i,e,t){if(t=i&&Pn.isAlias(t)?t.resolve(i.doc):t,Pn.isSeq(t))for(let r of t.items)Wc(i,e,r);else if(Array.isArray(t))for(let r of t)Wc(i,e,r);else Wc(i,e,t)}function Wc(i,e,t){let r=i&&Pn.isAlias(t)?t.resolve(i.doc):t;if(!Pn.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,i,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}No.addMergeToJSMap=S0;No.isMergeKey=rk;No.merge=Io});var Kc=x(k0=>{"use strict";var nk=Gc(),E0=Bo(),sk=Ln(),O0=Se(),Yc=Ci();function ok(i,e,{key:t,value:r}){if(O0.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,r);else if(E0.isMergeKey(i,t))E0.addMergeToJSMap(i,e,r);else{let n=Yc.toJS(t,"",i);if(e instanceof Map)e.set(n,Yc.toJS(r,n,i));else if(e instanceof Set)e.add(n);else{let s=ak(t,n,i),o=Yc.toJS(r,s,i);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function ak(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(O0.isNode(i)&&(t!=null&&t.doc)){let r=sk.createStringifyContext(t.doc,{});r.anchors=new Set;for(let s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=i.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),nk.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}k0.addPairToJSMap=ok});var Ni=x(zc=>{"use strict";var C0=Tn(),lk=w0(),ck=Kc(),Lo=Se();function uk(i,e,t){let r=C0.createNode(i,void 0,t),n=C0.createNode(e,void 0,t);return new Ro(r,n)}var Ro=class i{constructor(e,t=null){Object.defineProperty(this,Lo.NODE_TYPE,{value:Lo.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return Lo.isNode(t)&&(t=t.clone(e)),Lo.isNode(r)&&(r=r.clone(e)),new i(t,r)}toJSON(e,t){let r=t!=null&&t.mapAsMap?new Map:{};return ck.addPairToJSMap(t,r,this)}toString(e,t,r){return e!=null&&e.doc?lk.stringifyPair(this,e,t,r):JSON.stringify(this)}};zc.Pair=Ro;zc.createPair=uk});var Jc=x(A0=>{"use strict";var sr=Se(),T0=Ln(),Po=An();function fk(i,e,t){var s;return(((s=e.inFlow)!=null?s:i.flow)?pk:hk)(i,e,t)}function hk({comment:i,items:e},t,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),f=!1,d=[];for(let g=0;g<e.length;++g){let y=e[g],b=null;if(sr.isNode(y))!f&&y.spaceBefore&&d.push(""),Mo(t,d,y.commentBefore,f),y.comment&&(b=y.comment);else if(sr.isPair(y)){let S=sr.isNode(y.key)?y.key:null;S&&(!f&&S.spaceBefore&&d.push(""),Mo(t,d,S.commentBefore,f))}f=!1;let w=T0.stringify(y,u,()=>b=null,()=>f=!0);b&&(w+=Po.lineComment(w,s,c(b))),f&&b&&(f=!1),d.push(r+w)}let m;if(d.length===0)m=n.start+n.end;else{m=d[0];for(let g=1;g<d.length;++g){let y=d[g];m+=y?`
|
|||
|
|
${l}${y}`:`
|
|||
|
|
`}}return i?(m+=`
|
|||
|
|
`+Po.indentComment(c(i),l),a&&a()):f&&o&&o(),m}function pk({items:i},e,{flowChars:t,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<i.length;++g){let y=i[g],b=null;if(sr.isNode(y))y.spaceBefore&&f.push(""),Mo(e,f,y.commentBefore,!1),y.comment&&(b=y.comment);else if(sr.isPair(y)){let S=sr.isNode(y.key)?y.key:null;S&&(S.spaceBefore&&f.push(""),Mo(e,f,S.commentBefore,!1),S.comment&&(c=!0));let k=sr.isNode(y.value)?y.value:null;k?(k.comment&&(b=k.comment),k.commentBefore&&(c=!0)):y.value==null&&(S!=null&&S.comment)&&(b=S.comment)}b&&(c=!0);let w=T0.stringify(y,l,()=>b=null);g<i.length-1&&(w+=","),b&&(w+=Po.lineComment(w,r,a(b))),!c&&(f.length>u||w.includes(`
|
|||
|
|
`))&&(c=!0),f.push(w),u=f.length}let{start:d,end:m}=t;if(f.length===0)return d+m;if(!c){let g=f.reduce((y,b)=>y+b.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(let y of f)g+=y?`
|
|||
|
|
${s}${n}${y}`:`
|
|||
|
|
`;return`${g}
|
|||
|
|
${n}${m}`}else return`${d}${o}${f.join(" ")}${o}${m}`}function Mo({indent:i,options:{commentString:e}},t,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=Po.indentComment(e(r),i);t.push(s.trimStart())}}A0.stringifyCollection=fk});var Li=x(Qc=>{"use strict";var dk=Jc(),mk=Kc(),gk=So(),Bi=Se(),qo=Ni(),vk=je();function Mn(i,e){let t=Bi.isScalar(e)?e.value:e;for(let r of i)if(Bi.isPair(r)&&(r.key===e||r.key===t||Bi.isScalar(r.key)&&r.key.value===t))return r}var Zc=class extends gk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Bi.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(qo.createPair(l,c,r))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let r;Bi.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new qo.Pair(e,e==null?void 0:e.value):r=new qo.Pair(e.key,e.value);let n=Mn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);Bi.isScalar(n.value)&&vk.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let t=Mn(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var s;let r=Mn(this.items,e),n=r==null?void 0:r.value;return(s=!t&&Bi.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!Mn(this.items,e)}set(e,t){this.add(new qo.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(n);for(let s of this.items)mk.addPairToJSMap(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Bi.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),dk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}};Qc.YAMLMap=Zc;Qc.findPair=Mn});var Hr=x(N0=>{"use strict";var yk=Se(),I0=Li(),bk={collection:"map",default:!0,nodeClass:I0.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return yk.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>I0.YAMLMap.from(i,e,t)};N0.map=bk});var Ri=x(B0=>{"use strict";var _k=Tn(),wk=Jc(),xk=So(),Do=Se(),Sk=je(),Ek=Ci(),Xc=class extends xk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Do.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Fo(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=Fo(e);if(typeof r!="number")return;let n=this.items[r];return!t&&Do.isScalar(n)?n.value:n}has(e){let t=Fo(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=Fo(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[r];Do.isScalar(n)&&Sk.isScalarValue(t)?n.value=t:this.items[r]=t}toJSON(e,t){let r=[];t!=null&&t.onCreate&&t.onCreate(r);let n=0;for(let s of this.items)r.push(Ek.toJS(s,String(n++),t));return r}toString(e,t,r){return e?wk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof n=="function"){let l=t instanceof Set?a:String(o++);a=n.call(t,l,a)}s.items.push(_k.createNode(a,void 0,r))}}return s}};function Fo(i){let e=Do.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}B0.YAMLSeq=Xc});var Gr=x(R0=>{"use strict";var Ok=Se(),L0=Ri(),kk={collection:"seq",default:!0,nodeClass:L0.YAMLSeq,tag:"
|
|||
|
|
`:" ")}return Jk.stringifyString({comment:i,type:e,value:a},r,n,s)}};z0.binary=Zk});var Yo=x(Wo=>{"use strict";var Go=Se(),cu=Ni(),Qk=je(),Xk=Ri();function J0(i,e){var t;if(Go.isSeq(i))for(let r=0;r<i.items.length;++r){let n=i.items[r];if(!Go.isPair(n)){if(Go.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new cu.Pair(new Qk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
|
|||
|
|
${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(t=s.value)!=null?t:s.key;o.comment=o.comment?`${n.comment}
|
|||
|
|
${o.comment}`:n.comment}n=s}i.items[r]=Go.isPair(n)?n:new cu.Pair(n)}}else e("Expected a sequence for this tag");return i}function Z0(i,e,t){let{replacer:r}=t,n=new Xk.YAMLSeq(i);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(cu.createPair(a,l,t))}return n}var eC={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:J0,createNode:Z0};Wo.createPairs=Z0;Wo.pairs=eC;Wo.resolvePairs=J0});var hu=x(fu=>{"use strict";var Q0=Se(),uu=Ci(),Fn=Li(),tC=Ri(),X0=Yo(),or=class i extends tC.YAMLSeq{constructor(){super(),this.add=Fn.YAMLMap.prototype.add.bind(this),this.delete=Fn.YAMLMap.prototype.delete.bind(this),this.get=Fn.YAMLMap.prototype.get.bind(this),this.has=Fn.YAMLMap.prototype.has.bind(this),this.set=Fn.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let n of this.items){let s,o;if(Q0.isPair(n)?(s=uu.toJS(n.key,"",t),o=uu.toJS(n.value,s,t)):s=uu.toJS(n,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let n=X0.createPairs(e,t,r),s=new this;return s.items=n.items,s}};or.tag="tag:yaml.org,2002:omap";var iC={collection:"seq",identify:i=>i instanceof Map,nodeClass:or,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=X0.resolvePairs(i,e),r=[];for(let{key:n}of t.items)Q0.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new or,t)},createNode:(i,e,t)=>or.from(i,e,t)};fu.YAMLOMap=or;fu.omap=iC});var nv=x(pu=>{"use strict";var ev=je();function tv({value:i,source:e},t){return e&&(i?iv:rv).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var iv={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ev.Scalar(!0),stringify:tv},rv={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ev.Scalar(!1),stringify:tv};pu.falseTag=rv;pu.trueTag=iv});var sv=x(Ko=>{"use strict";var rC=je(),du=Wr(),nC={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:du.stringifyNumber},sC={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():du.stringifyNumber(i)}},oC={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new rC.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let r=i.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:du.stringifyNumber};Ko.float=oC;Ko.floatExp=sC;Ko.floatNaN=nC});var av=x(jn=>{"use strict";var ov=Wr(),Dn=i=>typeof i=="bigint"||Number.isInteger(i);function zo(i,e,t,{intAsBigInt:r}){let n=i[0];if((n==="-"||n==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),r){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return n==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return n==="-"?-1*s:s}function mu(i,e,t){let{value:r}=i;if(Dn(r)){let n=r.toString(e);return r<0?"-"+t+n.substr(1):t+n}return ov.stringifyNumber(i)}var aC={identify:Dn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>zo(i,2,2,t),stringify:i=>mu(i,2
|
|||
|
|
`)?(t.push("..."),t.push($n.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push($n.indentComment(s(c),"")))}return t.join(`
|
|||
|
|
`)+`
|
|||
|
|
`}Ev.stringifyDocument=qC});var Vn=x(kv=>{"use strict";var FC=Cn(),Yr=So(),qt=Se(),DC=Ni(),jC=Ci(),UC=Cu(),$C=Ov(),Au=yo(),VC=Lc(),HC=Tn(),Iu=Bc(),Nu=class i{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qt.NODE_TYPE,{value:qt.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Iu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(i.prototype,{[qt.NODE_TYPE]:{value:qt.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=qt.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Kr(this.contents)&&this.contents.add(e)}addIn(e,t){Kr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=Au.anchorNames(this);e.anchor=!t||r.has(t)?Au.findNewAnchor(t||"a",r):t}return new FC.Alias(e.anchor)}createNode(e,t,r){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let b=S=>typeof S=="number"||S instanceof String||S instanceof Number,w=t.filter(b).map(String);w.length>0&&(t=t.concat(w)),n=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:m}=Au.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:m},y=HC.createNode(e,u,g);return a&&qt.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new DC.Pair(n,s)}delete(e){return Kr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Yr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Kr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return qt.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Yr.isEmptyPath(e)?!t&&qt.isScalar(this.contents)?this.contents.value:this.contents:qt.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return qt.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Yr.isEmptyPath(e)?this.contents!==void 0:qt.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Yr.collectionFromPath(this.schema,[e],t):Kr(this.contents)&&this.contents.set(e,t)}setIn(e,t){Yr.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Yr.collectionFromPath(this.schema,Array.from(e),t):Kr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Iu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Iu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new UC.Schema(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAlias
|
|||
|
|
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l&&l.line===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
|
|||
|
|
|
|||
|
|
${o}
|
|||
|
|
${c}
|
|||
|
|
`}};Gn.YAMLError=Hn;Gn.YAMLParseError=Bu;Gn.YAMLWarning=Lu;Gn.prettifyError=GC});var Yn=x(Cv=>{"use strict";function WC(i,{flow:e,indicator:t,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",m=!1,g=!1,y=null,b=null,w=null,S=null,k=null,O=null,E=null;for(let A of i)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),y&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),A.type){case"space":!e&&(t!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&A.source.includes(" ")&&(y=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=A.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=A.source:l=!0:d+=A.source,c=!0,m=!0,(b||w)&&(S=A),u=!0;break;case"anchor":b&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=A,E===null&&(E=A.offset),c=!1,u=!1,g=!0;break;case"tag":{w&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),w=A,E===null&&(E=A.offset),c=!1,u=!1,g=!0;break}case t:(b||w)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),O&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e!=null?e:"collection"}`),O=A,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){k&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}let R=i[i.length-1],T=R?R.offset+R.source.length:n;return g&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(c&&y.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:O,spaceBefore:l,comment:f,hasNewline:m,anchor:b,tag:w,newlineAfterProp:S,end:T,start:E!=null?E:T}}Cv.resolveProps=WC});var ra=x(Tv=>{"use strict";function Ru(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
|||
|
|
`))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(Ru(e.key)||Ru(e.value))return!0}return!1;default:return!0}}Tv.containsNewline=Ru});var Pu=x(Av=>{"use strict";var YC=ra();function KC(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===i&&(r.source==="]"||r.source==="}")&&YC.containsNewline(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Av.flowIndentCheck=KC});var Mu=x(Nv=>{"use strict";var Iv=Se();function zC(i,e,t){let{uniqueKeys:r}=i.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||Iv.isScalar(s)&&Iv.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,t))}Nv.mapIncludes=zC});var qv=x(Mv=>{"use strict";var Bv=Ni(),JC=Li(),Lv=Yn(),ZC=ra(),Rv=Pu(),QC=Mu(),Pv="All mapping items must start at the same column";function XC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:JC.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:m,key:g,sep:y,value:b}=d,w=Lv.resolveProps(m,{indicator:"explicit-key-ind",next:g!=null?g:y==null?void 0:y[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),S=!w.found;if(S){if(g&&(g.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==r.indent&&n(l,"BAD_INDENT",Pv)),!w.anchor&&!w.tag&&!y){c=w.end,w.comment&&(a.comment?a.comment+=`
|
|||
|
|
`+w.comment:a.comment=w.comment);continue}(w.newlineAfterProp||ZC.containsNewline(g))&&n(g!=null?g:m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=w.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",Pv);t.atKey=!0;let k=w.end,O=g?i(t,g,w,n):e(t,k,m,null,w,n);t.schema.compat&&Rv.flowIndentCheck(r.indent,g,n),t.atKey=!1,QC.mapIncludes(t,a.items,O)&&n(k,"DUPLICATE_KEY","Map keys must be unique");let E=Lv.resolveProps(y!=null?y:[],{indicator:"map-value-ind",next:b,offset:O.range[2],onError:n,parentIndent:r.indent,startOnNewline:!g||g.type==="block-scalar"});if(l=E.end,E.found){S&&((b==null?void 0:b.type)==="block-map"&&!E.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&w.start<E.found.offset-1024&&n(O.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let R=b?i(t,b,E,n):e(t,l,y,null,E,n);t.schema.compat&&Rv.flowIndentCheck(r.indent,b,n),l=R.range[2];let T=new Bv.Pair(O,R);t.options.keepSourceTokens&&(T.srcToken=d),a.items.push(T)}else{S&&n(O.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(O.comment?O.comment+=`
|
|||
|
|
`+E.comment:O.comment=E.comment);let R=new Bv.Pair(O);t.options.keepSourceTokens&&(R.srcToken=d),a.items.push(R)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c!=null?c:l],a}Mv.resolveBlockMap=XC});var Dv=x(Fv=>{"use strict";var eT=Ri(),tT=Yn(),iT=Pu();function rT({composeNode:i,composeEmptyNode:e},t,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:eT.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let m=tT.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||d)d&&d.type==="block-seq"?n(m.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=m.end,m.comment&&(a.comment=m.comment);continue}let g=d?i(t,d,m,n):e(t,m.end,f,null,m,n);t.schema.compat&&iT.flowIndentCheck(r.indent,d,n),l=g.range[2],a.items.push(g)}return a.range=[r.offset,l,c!=null?c:l],a}Fv.resolveBlockSeq=rT});var zr=x(jv=>{"use strict";function nT(i,e,t,r){let n="";if(i){let s=!1,o="";for(let a of i){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}jv.resolveEnd=nT});var Hv=x(Vv=>{"use strict";var sT=Se(),oT=Ni(),Uv=Li(),aT=Ri(),lT=zr(),$v=Yn(),cT=ra(),uT=Mu(),qu="Block collections are not allowed within flow collections",Fu=i=>i&&(i.type==="block-map"||i.type==="block-seq");function fT({composeNode:i,composeEmptyNode:e},t,r,n,s){var b,w;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?Uv.YAMLMap:aT.YAMLSeq,c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let S=0;S<r.items.length;++S){let k=r.items[S],{start:O,key:E,sep:R,value:T}=k,A=$v.resolveProps(O,{flow:a,indicator:"explicit-key-ind",next:E!=null?E:R==null?void 0:R[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!R&&!T){S===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):S<r.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
|||
|
|
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&t.options.strict&&cT.containsNewline(E)&&n(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(S===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let C="";e:for(let B of O)switch(B.type){case"comma":case"space":break;case"comment":C=B.source.substring(1);break e;default:break e}if(C){let B=c.items[c.items.length-1];sT.isPair(B)&&(B=(w=B.value)!=null?w:B.key),B.comment?B.comment+=`
|
|||
|
|
`+C:B.comment=C,A.comment=A.comment.substring(C.length+1)}}if(!o&&!R&&!A.found){let C=T?i(t,T,A,n):e(t,A.end,R,null,A,n);c.items.push(C),f=C.range[2],Fu(T)&&n(C.range,"BLOCK_IN_FLOW",qu)}else{t.atKey=!0;let C=A.end,B=E?i(t,E,A,n):e(t,C,O,null,A,n);Fu(E)&&n(B.range,"BLOCK_IN_FLOW",qu),t.atKey=!1;let P=$v.resolveProps(R!=null?R:[],{flow:a,indicator:"map-value-ind",next:T,offset:B.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(P.found){if(!o&&!A.found&&t.options.strict){if(R)for(let H of R){if(H===P.found)break;if(H.type==="newline"){n(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<P.found.offset-1024&&n(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&T.source&&T.source[0]===":"?n(T,"MISSING_CHAR",`Missing space after : in ${a}`):n(P.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let U=T?i(t,T,P,n):P.found?e(t,P.end,R,null,P,n):null;U?Fu(T)&&n(U.range,"BLOCK_IN_FLOW",qu):P.comment&&(B.comment?B.comment+=`
|
|||
|
|
`+P.comment:B.comment=P.comment);let F=new oT.Pair(B,U);if(t.options.keepSourceTokens&&(F.srcToken=k),o){let H=c;uT.mapIncludes(t,H.items,B)&&n(C,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(F)}else{let H=new Uv.YAMLMap(t.schema);H.flow=!0,H.items.push(F);let j=(U!=null?U:B).range;H.range=[B.range[0],j[1],j[2]],c.items.push(H)}f=U?U.range[2]:P.end}}let d=o?"}":"]",[m,...g]=r.end,y=f;if(m&&m.source===d)y=m.offset+m.source.length;else{let S=a[0].toUpperCase()+a.substring(1),k=u?`${S} must end with a ${d}`:`${S} in block collection must be sufficiently indented and end with a ${d}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",k),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let S=lT.resolveEnd(g,y,t.options.strict,n);S.comment&&(c.comment?c.comment+=`
|
|||
|
|
`+S.comment:c.comment=S.comment),c.range=[r.offset,y,S.offset]}else c.range=[r.offset,y,y];return c}Vv.resolveFlowCollection=fT});var Wv=x(Gv=>{"use strict";var hT=Se(),pT=je(),dT=Li(),mT=Ri(),gT=qv(),vT=Dv(),yT=Hv();function Du(i,e,t,r,n,s){let o=t.type==="block-map"?gT.resolveBlockMap(i,e,t,r,s):t.type==="block-seq"?vT.resolveBlockSeq(i,e,t,r,s):yT.resolveFlowCollection(i,e,t,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function bT(i,e,t,r,n){var d,m;let s=r.tag,o=s?e.directives.tagName(s.source,g=>n(s,"TAG_RESOLVE_FAILED",g)):null;if(t.type==="block-seq"){let{anchor:g,newlineAfterProp:y}=r,b=g&&s?g.offset>s.offset?g:s:g!=null?g:s;b&&(!y||y.offset<b.offset)&&n(b,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===dT.YAMLMap.tagName&&a==="map"||o===mT.YAMLSeq.tagName&&a==="seq")return Du(i,e,t,n,o);let l=e.schema.tags.find(g=>g.tag===o&&g.collection===a);if(!l){let g=e.schema.knownTags[o];if(g&&g.collection===a)e.schema.tags.push(Object.assign({},g,{default:!1})),l=g;else return g!=null&&g.collection?n(s,"BAD_COLLECTION_TYPE",`${g.tag} used for ${a} collection, but expects ${g.collection}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Du(i,e,t,n,o)}let c=Du(i,e,t,n,o,l),u=(m=(d=l.resolve)==null?void 0:d.call(l,c,g=>n(s,"TAG_RESOLVE_FAILED",g),e.options))!=null?m:c,f=hT.isNode(u)?u:new pT.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}Gv.composeCollection=bT});var Uu=x(Yv=>{"use strict";var ju=je();function _T(i,e,t){let r=e.offset,n=wT(e,i.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?ju.Scalar.BLOCK_FOLDED:ju.Scalar.BLOCK_LITERAL,o=e.source?xT(e.source):[],a=o.length;for(let y=o.length-1;y>=0;--y){let b=o[y][1];if(b===""||b==="\r")a=y;else break}if(a===0){let y=n.chomp==="+"&&o.length>0?`
|
|||
|
|
`.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:y,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let y=0;y<a;++y){let[b,w]=o[y];if(w===""||w==="\r")n.indent===0&&b.length>l&&(l=b.length);else{b.length<l&&t(c+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=b.length),u=y,l===0&&!i.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=b.length+w.length+1}for(let y=o.length-1;y>=a;--y)o[y][0].length>l&&(a=y+1);let f="",d="",m=!1;for(let y=0;y<u;++y)f+=o[y][0].slice(l)+`
|
|||
|
|
`;for(let y=u;y<a;++y){let[b,w]=o[y];c+=b.length+w.length+1;let S=w[w.length-1]==="\r";if(S&&(w=w.slice(0,-1)),w&&b.length<l){let O=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(S?2:1),"BAD_INDENT",O),b=""}s===ju.Scalar.BLOCK_LITERAL?(f+=d+b.slice(l)+w,d=`
|
|||
|
|
`):b.length>l||w[0]===" "?(d===" "?d=`
|
|||
|
|
`:!m&&d===`
|
|||
|
|
`&&(d=`
|
|||
|
|
|
|||
|
|
`),f+=d+b.slice(l)+w,d=`
|
|||
|
|
`,m=!0):w===""?d===`
|
|||
|
|
`?f+=`
|
|||
|
|
`:d=`
|
|||
|
|
`:(f+=d+w,d=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let y=a;y<o.length;++y)f+=`
|
|||
|
|
`+o[y][0].slice(l);f[f.length-1]!==`
|
|||
|
|
`&&(f+=`
|
|||
|
|
`);break;default:f+=`
|
|||
|
|
`}let g=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,g,g]}}function wT({offset:i,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],o=0,a="",l=-1;for(let d=1;d<n.length;++d){let m=n[d];if(!a&&(m==="-"||m==="+"))a=m;else{let g=Number(m);!o&&g?o=g:l===-1&&(l=i+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let d=1;d<e.length;++d){let m=e[d];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,u=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;r(m,"UNEXPECTED_TOKEN",g);let y=m.source;y&&typeof y=="string"&&(f+=y.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function xT(i){let e=i.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r!=null&&r[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}Yv.resolveBlockScalar=_T});var Vu=x(zv=>{"use strict";var $u=je(),ST=zr();function ET(i,e,t){let{offset:r,type:n,source:s,end:o}=i,a,l,c=(d,m,g)=>t(r+d,m,g);switch(n){case"scalar":a=$u.Scalar.PLAIN,l=OT(s,c);break;case"single-quoted-scalar":a=$u.Scalar.QUOTE_SINGLE,l=kT(s,c);break;case"double-quoted-scalar":a=$u.Scalar.QUOTE_DOUBLE,l=CT(s,c);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=ST.resolveEnd(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function OT(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Kv(i)}function kT(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),Kv(i.slice(1,-1)).replace(/''/g,"'")}function Kv(i){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|||
|
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|||
|
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(i);if(!r)return i;let n=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(i);)r[1]===""?s===`
|
|||
|
|
`?n+=s:s=`
|
|||
|
|
`:(n+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(i),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function CT(i,e){let t="";for(let r=1;r<i.length-1;++r){let n=i[r];if(!(n==="\r"&&i[r+1]===`
|
|||
|
|
`))if(n===`
|
|||
|
|
`){let{fold:s,offset:o}=TT(i,r);t+=s,r=o}else if(n==="\\"){let s=i[++r],o=AT[s];if(o)t+=o;else if(s===`
|
|||
|
|
`)for(s=i[r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="\r"&&i[r+1]===`
|
|||
|
|
`)for(s=i[++r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=IT(i,r+1,a,e),r+=a}else{let a=i.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(n===" "||n===" "){let s=r,o=i[r+1];for(;o===" "||o===" ";)o=i[++r+1];o!==`
|
|||
|
|
`&&!(o==="\r"&&i[r+2]===`
|
|||
|
|
`)&&(t+=r>s?i.slice(s,r+1):n)}else t+=n}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function TT(i,e){let t="",r=i[e+1];for(;(r===" "||r===" "||r===`
|
|||
|
|
`||r==="\r")&&!(r==="\r"&&i[e+2]!==`
|
|||
|
|
`);)r===`
|
|||
|
|
`&&(t+=`
|
|||
|
|
`),e+=1,r=i[e+1];return t||(t=" "),{fold:t,offset:e}}var AT={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|||
|
|
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function IT(i,e,t,r){let n=i.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=i.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}zv.resolveFlowScalar=ET});var Qv=x(Zv=>{"use strict";var lr=Se(),Jv=je(),NT=Uu(),BT=Vu();function LT(i,e,t,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?NT.resolveBlockScalar(i,e,r):BT.resolveFlowScalar(e,i.options.strict,r),l=t?i.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null,c;i.options.stringKeys&&i.atKey?c=i.schema[lr.SCALAR]:l?c=RT(i.schema,n,l,t,r):e.type==="scalar"?c=PT(i,n,e,r):c=i.schema[lr.SCALAR];let u;try{let f=c.resolve(n,d=>r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),i.options);u=lr.isScalar(f)?f:new Jv.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),u=new Jv.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function RT(i,e,t,r,n){var a;if(t==="!")return i[lr.SCALAR];let s=[];for(let l of i.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[lr.SCALAR])}function PT({atKey:i,directives:e,schema:t},r,n,s){var a;let o=t.tags.find(l=>{var c;return(l.default===!0||i&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||t[lr.SCALAR];if(t.compat){let l=(a=t.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:t[lr.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Zv.composeScalar=LT});var ey=x(Xv=>{"use strict";function MT(i,e,t){if(e){t===null&&(t=e.length);for(let r=t-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":i-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)i+=n.source.length,n=e[++r];break}}return i}Xv.emptyScalarPosition=MT});var ry=x(Gu=>{"use strict";var qT=Cn(),FT=Se(),DT=Wv(),ty=Qv(),jT=zr(),UT=ey(),$T={composeNode:iy,composeEmptyNode:Hu};function iy(i,e,t,r){let n=i.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=VT(i,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=ty.composeScalar(i,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=DT.composeCollection($T,i,e,t,r),a&&(c.anchor=a.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=Hu(i,e.offset,void 0,null,t,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&i.options.stringKeys&&(!FT.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),i.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Hu(i,e,t,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:UT.emptyScalarPosition(e,t,r),indent:-1,source:""},f=ty.composeScalar(i,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function VT({options:i},{offset:e,source:t,end:r},n){let s=new qT.Alias(t.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=jT.resolve
|
|||
|
|
|
|||
|
|
`:`
|
|||
|
|
`)+(o.substring(1)||" "),t=!0,r=!1;break;case"%":((n=i[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var Wu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,s)=>{let o=zn(t);s?this.warnings.push(new Kn.YAMLWarning(o,r,n)):this.errors.push(new Kn.YAMLParseError(o,r,n))},this.directives=new KT.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=ly(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|||
|
|
${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(ay.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];ay.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
|
|||
|
|
${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
|
|||
|
|
${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ly(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=zn(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=JT.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Kn.YAMLParseError(zn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Kn.YAMLParseError(zn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=ZT.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|||
|
|
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Kn.YAMLParseError(zn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new zT.Document(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};cy.Composer=Wu});var hy=x(na=>{"use strict";var QT=Uu(),XT=Vu(),eA=Wn(),uy=Bn();function tA(i,e=!0,t){if(i){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(a,s,o);else throw new eA.YAMLParseError([a,a+1],s,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return XT.resolveFlowScalar(i,e,r);case"block-scalar":return QT.resolveBlockScalar({options:{strict:e}},i,r)}}return null}function iA(i,e){var c;let{implicitKey:t=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=uy.stringifyString({type:o,value:i},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
|
|||
|
|
`}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
|
|||
|
|
`),f=a.substring(0,u),d=a.substring(u+1)+`
|
|||
|
|
`,m=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return fy(m,l)||m.push({type:"newline",offset:-1,indent:r,source:`
|
|||
|
|
`}),{type:"block-scalar",offset:s,indent:r,props:m,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function rA(i,e,t={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=t,a="indent"in i?i.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=i.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=uy.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":nA(i,l);break;case'"':Ku(i,l,"double-quoted-scalar");break;case"'":Ku(i,l,"single-quoted-scalar");break;default:Ku(i,l,"scalar")}}function nA(i,e){let t=e.indexOf(`
|
|||
|
|
`),r=e.substring(0,t),n=e.substring(t+1)+`
|
|||
|
|
`;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,i.source=n}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];fy(a,"end"in i?i.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|||
|
|
`});for(let l of Object.keys(i))l!=="type"&&l!=="offset"&&delete i[l];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:n})}}function fy(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function Ku(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let r=i.props.slice(1),n=e.length;i.props[0].type==="block-scalar-header"&&(n-=i.props[0].source.length);for(let s of r)s.offset+=n;delete i.props,Object.assign(i,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
|||
|
|
`};delete i.items,Object.assign(i,{type:t,source:e,end:[n]});break}default:{let r="indent"in i?i.indent:-1,n="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:r,source:e,end:n})}}}na.createScalarToken=iA;na.resolveAsScalar=tA;na.setScalarValue=rA});var dy=x(py=>{"use strict";var sA=i=>"type"in i?oa(i):sa(i);function oa(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=oa(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=sa(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=sa(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=sa(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function sa({start:i,key:e,sep:t,value:r}){let n="";for(let s of i)n+=s.source;if(e&&(n+=oa(e)),t)for(let s of t)n+=s.source;return r&&(n+=oa(r)),n}py.stringify=sA});var yy=x(vy=>{"use strict";var zu=Symbol("break visit"),oA=Symbol("skip children"),my=Symbol("remove item");function cr(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),gy(Object.freeze([]),i,e)}cr.BREAK=zu;cr.SKIP=oA;cr.REMOVE=my;cr.itemAtPath=(i,e)=>{let t=i;for(let[r,n]of e){let s=t==null?void 0:t[r];if(s&&"items"in s)t=s.items[n];else return}return t};cr.parentCollection=(i,e)=>{let t=cr.itemAtPath(i,e.slice(0,-1)),r=e[e.length-1][0],n=t==null?void 0:t[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function gy(i,e,t){let r=t(e,i);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=gy(Object.freeze(i.concat([[n,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===zu)return zu;a===my&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&n==="key"&&(r=r(e,i))}}return typeof r=="function"?r(e,i):r}vy.visit=cr});var aa=x(yt=>{"use strict";var Ju=hy(),aA=dy(),lA=yy(),Zu="\uFEFF",Qu="",Xu="",ef="",cA=i=>!!i&&"items"in i,uA=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function fA(i){switch(i){case Zu:return"<BOM>";case Qu:return"<DOC>";case Xu:return"<FLOW_END>";case ef:return"<SCALAR>";default:return JSON.stringify(i)}}function hA(i){switch(i){case Zu:return"byte-order-mark";case Qu:return"doc-mode";case Xu:return"flow-error-end";case ef:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|||
|
|
`:case`\r
|
|||
|
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}yt.createScalarToken=Ju.createScalarToken;yt.resolveAsScalar=Ju.resolveAsScalar;yt.setScalarValue=Ju.setScalarValue;yt.stringify=aA.stringify;yt.visit=lA.visit;yt.BOM=Zu;yt.DOCUMENT=Qu;yt.FLOW_END=Xu;yt.SCALAR=ef;yt.isCollection=cA;yt.isScalar=uA;yt.prettyToken=fA;yt.tokenType=hA});var nf=x(_y=>{"use strict";var Jn=aa();function Wt(i){switch(i){case void 0:case" ":case`
|
|||
|
|
`:case"\r":case" ":return!0;default:return!1}}var by=new Set("0123456789ABCDEFabcdef"),pA=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),la=new Set(",[]{}"),dA=new Set(` ,[]{}
|
|||
|
|
\r `),tf=i=>!i||dA.has(i),rf=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=(n=this.next)!=null?n:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|||
|
|
`?!0:t==="\r"?this.buffer[e+1]===`
|
|||
|
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
|
|||
|
|
`||!n&&!this.atEnd)return e+r+1}return t===`
|
|||
|
|
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Wt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|||
|
|
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Jn.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Jn.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Wt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Wt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Wt(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(tf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&Wt(n[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Jn.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(tf),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Wt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*th
|
|||
|
|
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=r.indexOf(`
|
|||
|
|
`,s)}n!==-1&&(t=n-(r[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Wt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
|
|||
|
|
`:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|||
|
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|||
|
|
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|||
|
|
`;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
|
|||
|
|
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield Jn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(Wt(s)||e&&la.has(s))break;t=r}else if(Wt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===`
|
|||
|
|
`?(r+=1,n=`
|
|||
|
|
`,s=this.buffer[r+1]):t=r),s==="#"||e&&la.has(s))break;if(n===`
|
|||
|
|
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&la.has(n))break;t=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Jn.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(tf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(Wt(t)||e&&la.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Wt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(pA.has(t))t=this.buffer[++e];else if(t==="%"&&by.has(this.buffer[e+1])&&by.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|||
|
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|||
|
|
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};_y.Lexer=rf});var of=x(wy=>{"use strict";var sf=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};wy.LineCounter=sf});var lf=x(ky=>{"use strict";var xy=aa(),mA=nf();function ur(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function Sy(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Oy(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ca(i){var e;switch(i.type){case"document":return i.start;case"block-map":{let t=i.items[i.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function Jr(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function Ey(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!ur(e.start,"explicit-key-ind")&&!ur(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Oy(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var af=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new mA.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",xy.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=xy.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else
|
|||
|
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|||
|
|
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ur(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Oy(t.key)&&!ur(t.sep,"newline")){let a=Jr(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(ur(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=Jr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ur(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||t.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){n&&a.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourc
|
|||
|
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|||
|
|
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ca(e),r=Jr(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ca(e),r=Jr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};ky.Parser=af});var Ny=x(Qn=>{"use strict";var Cy=Yu(),gA=Vn(),Zn=Wn(),vA=Gc(),yA=Se(),bA=of(),Ty=lf();function Ay(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new bA.LineCounter||null,prettyErrors:e}}function _A(i,e={}){let{lineCounter:t,prettyErrors:r}=Ay(e),n=new Ty.Parser(t==null?void 0:t.addNewLine),s=new Cy.Composer(e),o=Array.from(s.compose(n.parse(i)));if(r&&t)for(let a of o)a.errors.forEach(Zn.prettifyError(i,t)),a.warnings.forEach(Zn.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Iy(i,e={}){let{lineCounter:t,prettyErrors:r}=Ay(e),n=new Ty.Parser(t==null?void 0:t.addNewLine),s=new Cy.Composer(e),o=null;for(let a of s.compose(n.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Zn.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(Zn.prettifyError(i,t)),o.warnings.forEach(Zn.prettifyError(i,t))),o}function wA(i,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=Iy(i,t);if(!n)return null;if(n.warnings.forEach(s=>vA.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},t))}function xA(i,e,t){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(i===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return yA.isDocument(i)&&!r?i.toString(t):new gA.Document(i,r,t).toString(t)}Qn.parse=wA;Qn.parseAllDocuments=_A;Qn.parseDocument=Iy;Qn.stringify=xA});var Ly=x(Ce=>{"use strict";var SA=Yu(),EA=Vn(),OA=Cu(),cf=Wn(),kA=Cn(),Pi=Se(),CA=Ni(),TA=je(),AA=Li(),IA=Ri(),NA=aa(),BA=nf(),LA=of(),RA=lf(),ua=Ny(),By=Sn();Ce.Composer=SA.Composer;Ce.Document=EA.Document;Ce.Schema=OA.Schema;Ce.YAMLError=cf.YAMLError;Ce.YAMLParseError=cf.YAMLParseError;Ce.YAMLWarning=cf.YAMLWarning;Ce.Alias=kA.Alias;Ce.isAlias=Pi.isAlias;Ce.isCollection=Pi.isCollection;Ce.isDocument=Pi.isDocument;Ce.isMap=Pi.isMap;Ce.isNode=Pi.isNode;Ce.isPair=Pi.isPair;Ce.isScalar=Pi.isScalar;Ce.isSeq=Pi.isSeq;Ce.Pair=CA.Pair;Ce.Scalar=TA.Scalar;Ce.YAMLMap=AA.YAMLMap;Ce.YAMLSeq=IA.YAMLSeq;Ce.CST=NA;Ce.Lexer=BA.Lexer;Ce.LineCounter=LA.LineCounter;Ce.Parser=RA.Parser;Ce.parse=ua.parse;Ce.parseAllDocuments=u
|
|||
|
|
GFS4: `),console.error(i)});qe[it]||(Uy=global[it]||[],Vy(qe,Uy),qe.close=(function(i){function e(t,r){return i.call(qe,t,function(n){n||$y(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,da,{value:i}),e})(qe.close),qe.closeSync=(function(i){function e(t){i.apply(qe,arguments),$y()}return Object.defineProperty(e,da,{value:i}),e})(qe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fr(qe[it]),require("assert").equal(qe[it].length,0)}));var Uy;global[it]||Vy(global,qe[it]);pf.exports=ff(VA(qe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!qe.__patched&&(pf.exports=ff(qe),qe.__patched=!0);function ff(i){UA(i),i.gracefulify=ff,i.createReadStream=E,i.createWriteStream=R;var e=i.readFile;i.readFile=t;function t(C,B,P){return typeof B=="function"&&(P=B,B=null),U(C,B,P);function U(F,H,j,V){return e(F,H,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Zr([U,[F,H,j],Y,V||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var r=i.writeFile;i.writeFile=n;function n(C,B,P,U){return typeof P=="function"&&(U=P,P=null),F(C,B,P,U);function F(H,j,V,Y,Q){return r(H,j,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Zr([F,[H,j,V,Y],W,Q||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}var s=i.appendFile;s&&(i.appendFile=o);function o(C,B,P,U){return typeof P=="function"&&(U=P,P=null),F(C,B,P,U);function F(H,j,V,Y,Q){return s(H,j,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Zr([F,[H,j,V,Y],W,Q||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}var a=i.copyFile;a&&(i.copyFile=l);function l(C,B,P,U){return typeof P=="function"&&(U=P,P=0),F(C,B,P,U);function F(H,j,V,Y,Q){return a(H,j,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Zr([F,[H,j,V,Y],W,Q||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}var c=i.readdir;i.readdir=f;var u=/^v[0-5]\./;function f(C,B,P){typeof B=="function"&&(P=B,B=null);var U=u.test(process.version)?function(j,V,Y,Q){return c(j,F(j,V,Y,Q))}:function(j,V,Y,Q){return c(j,V,F(j,V,Y,Q))};return U(C,B,P);function F(H,j,V,Y){return function(Q,W){Q&&(Q.code==="EMFILE"||Q.code==="ENFILE")?Zr([U,[H,j,V],Q,Y||Date.now(),Date.now()]):(W&&W.sort&&W.sort(),typeof V=="function"&&V.call(this,Q,W))}}}if(process.version.substr(0,4)==="v0.8"){var d=$A(i);w=d.ReadStream,k=d.WriteStream}var m=i.ReadStream;m&&(w.prototype=Object.create(m.prototype),w.prototype.open=S);var g=i.WriteStream;g&&(k.prototype=Object.create(g.prototype),k.prototype.open=O),Object.defineProperty(i,"ReadStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0}),Object.defineProperty(i,"WriteStream",{get:function(){return k},set:function(C){k=C},enumerable:!0,configurable:!0});var y=w;Object.defineProperty(i,"FileReadStream",{get:function(){return y},set:function(C){y=C},enumerable:!0,configurable:!0});var b=k;Object.defineProperty(i,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function w(C,B){return this instanceof w?(m.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function S(){var C=this;A(C.path,C.flags,C.mode,function(B,P){B?(C.autoClose&&C.destroy(),C.emit("error",B)):(C.fd=P,C.emit("open",P),C.read())})}function k(C,B){return this instanceof k?(g.apply(this,arguments),this):k.apply(Object.create(k.prototype),arguments)}function O(){var C=this;A(C.path,C.flags,C.mode,function(B,P){B?(C.destroy(),C.emit("error",B)):(C.fd=P,C.emit("open",P))})}function E(C,B){return new i.ReadStream(C,B)}function R(C,B){return new i.WriteStream(C,B)}var T=i.open;i.open=A;function A(C,B,P,U){return typeof P=="function"&&(U=P,P=null),F(C,B,P,U);function F(H,j,V,Y,Q){return T(H,j,V,function(W,de){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Zr([F,[H,j,V,Y],W,Q||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}return i}function Zr(i){fr("ENQUEUE",i[0].name,i[1]),qe[it].push(i),hf()}var pa;function $y(){for(var i=Date.now(),e=0;e<qe[it].length;++e)qe[it][e].length>2&
|
|||
|
|
`)&&!i.startsWith(`
|
|||
|
|
`)&&!i.match(/[^\r]\n/)}function I_(i){return!i.includes(`\r
|
|||
|
|
`)&&i.includes(`
|
|||
|
|
`)}var Ss="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",N_=new RegExp("[".concat(Ss,"]+|\\s+|[^").concat(Ss,"]"),"ug"),sn=new It;sn.equals=function(i,e,t){return t.ignoreCase&&(i=i.toLowerCase(),e=e.toLowerCase()),i.trim()===e.trim()};sn.tokenize=function(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');t=Array.from(e.intlSegmenter.segment(i),function(s){return s.segment})}else t=i.match(N_)||[];var r=[],n=null;return t.forEach(function(s){/\s/.test(s)?n==null?r.push(s):r.push(r.pop()+s):/\s/.test(n)?r[r.length-1]==n?r.push(r.pop()+s):r.push(n+s):r.push(s),n=s}),r};sn.join=function(i){return i.map(function(e,t){return t==0?e:e.replace(/^\s+/,"")}).join("")};sn.postProcess=function(i,e){if(!i||e.oneChangePerToken)return i;var t=null,r=null,n=null;return i.forEach(function(s){s.added?r=s:s.removed?n=s:((r||n)&&hh(t,n,r,s),t=s,r=null,n=null)}),(r||n)&&hh(t,n,r,null),i};function B_(i,e,t){return(t==null?void 0:t.ignoreWhitespace)!=null&&!t.ignoreWhitespace?Eh(i,e,t):sn.diff(i,e,t)}function hh(i,e,t,r){if(e&&t){var n=e.value.match(/^\s*/)[0],s=e.value.match(/\s*$/)[0],o=t.value.match(/^\s*/)[0],a=t.value.match(/\s*$/)[0];if(i){var l=ch(n,o);i.value=Na(i.value,o,l),e.value=nn(e.value,l),t.value=nn(t.value,l)}if(r){var c=uh(s,a);r.value=Ia(r.value,a,c),e.value=ws(e.value,c),t.value=ws(t.value,c)}}else if(t)i&&(t.value=t.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(i&&r){var u=r.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],d=e.value.match(/\s*$/)[0],m=ch(u,f);e.value=nn(e.value,m);var g=uh(nn(u,m),d);e.value=ws(e.value,g),r.value=Ia(r.value,u,g),i.value=Na(i.value,u,u.slice(0,u.length-g.length))}else if(r){var y=r.value.match(/^\s*/)[0],b=e.value.match(/\s*$/)[0],w=fh(b,y);e.value=ws(e.value,w)}else if(i){var S=i.value.match(/\s*$/)[0],k=e.value.match(/^\s*/)[0],O=fh(S,k);e.value=nn(e.value,O)}}var Sh=new It;Sh.tokenize=function(i){var e=new RegExp("(\\r?\\n)|[".concat(Ss,"]+|[^\\S\\n\\r]+|[^").concat(Ss,"]"),"ug");return i.match(e)||[]};function Eh(i,e,t){return Sh.diff(i,e,t)}function L_(i,e){if(typeof i=="function")e.callback=i;else if(i)for(var t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}var on=new It;on.tokenize=function(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,`
|
|||
|
|
`));var t=[],r=i.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var s=r[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t};on.equals=function(i,e,t){return t.ignoreWhitespace?((!t.newlineIsToken||!i.includes(`
|
|||
|
|
`))&&(i=i.trim()),(!t.newlineIsToken||!e.includes(`
|
|||
|
|
`))&&(e=e.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(i.endsWith(`
|
|||
|
|
`)&&(i=i.slice(0,-1)),e.endsWith(`
|
|||
|
|
`)&&(e=e.slice(0,-1))),It.prototype.equals.call(this,i,e,t)};function Ba(i,e,t){return on.diff(i,e,t)}function R_(i,e,t){var r=L_(t,{ignoreWhitespace:!0});return on.diff(i,e,r)}var Oh=new It;Oh.tokenize=function(i){return i.split(/(\S.+?[.!?])(?=\s+|$)/)};function P_(i,e,t){return Oh.diff(i,e,t)}var kh=new It;kh.tokenize=function(i){return i.split(/([{}:;,]|\s+)/)};function M_(i,e,t){return kh.diff(i,e,t)}function ph(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function dt(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ph(Object(t),!0).forEach(function(r){D_(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):ph(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function q_(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function F_(i){var e=q_(i,"string");return typeof e=="symbol"?e:e+""}function La(i){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(i)}function D_(i,e,t){return e=F_(e),e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function ai(i){return j_(i)||U_(i)||$_(i)||V_()}function j_(i){if(Array.isArray(i))return Ra(i)}function U_(i){if(typeof Symbol!="undefined"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function $_(i,e){if(i){if(typeof i=="string")return Ra(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ra(i,e)}}function Ra(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function V_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var xr=new It;xr.useLongestToken=!0;xr.tokenize=on.tokenize;xr.castInput=function(i,e){var t=e.undefinedReplacement,r=e.stringifyReplacer,n=r===void 0?function(s,o){return typeof o=="undefined"?t:o}:r;return typeof i=="string"?i:JSON.stringify(Es(i,null,null,n),n," ")};xr.equals=function(i,e,t){return It.prototype.equals.call(xr,i.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"),t)};function H_(i,e,t){return xr.diff(i,e,t)}function Es(i,e,t,r,n){e=e||[],t=t||[],r&&(i=r(n,i));var s;for(s=0;s<e.length;s+=1)if(e[s]===i)return t[s];var o;if(Object.prototype.toString.call(i)==="[object Array]"){for(e.push(i),o=new Array(i.length),t.push(o),s=0;s<i.length;s+=1)o[s]=Es(i[s],e,t,r,n);return e.pop(),t.pop(),o}if(i&&i.toJSON&&(i=i.toJSON()),La(i)==="object"&&i!==null){e.push(i),o={},t.push(o);var a=[],l;for(l in i)Object.prototype.hasOwnProperty.call(i,l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=Es(i[l],e,t,r,l);e.pop(),t.pop()}else o=i;return o}var Os=new It;Os.tokenize=function(i){return i.slice()};Os.join=Os.removeEmpty=function(i){return i};function G_(i,e,t){return Os.diff(i,e,t)}function Ch(i){return Array.isArray(i)?i.map(Ch):dt(dt({},i),{},{hunks:i.hunks.map(function(e){return dt(dt({},e),{},{lines:e.lines.map(function(t,r){var n;return t.startsWith("\\")||t.endsWith("\r")||(n=e.lines[r+1])!==null&&n!==void 0&&n.startsWith("\\")?t:t+"\r"})})})})}function Th(i){return Array.isArray(i)?i.map(Th):dt(dt({},i),{},{hunks:i.hunks.map(function(e){return dt(dt({},e),{},{lines:e.lines.map(function(t){return t.endsWith("\r")?t.substring(0,t.length-1):t})})})})}function W_(i){return Array.isArray(i)||(i=[i]),!i.some(function(e){return e.hunks.some(function(t){return t.lines.some(function(r){return!r.startsWith("\\")&&r.endsWith("\r")})})})}function Y_(i){return Array.isArray(i)||(i=[i]),i.some(function(e){return e.hunks.some(function(t){return t.lines.some(function(r){return r.endsWith("\r")})})})&&i.every(function(e){return e.hunks.every(function(t){return t.lines.every(function(r,n){var s;return r.startsWith("\\")||r.endsWith("\r")||((s=t.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})})})}function Ts(i){var e=i.split(/\n/),t=[],r=0;function n(){var a={};for(t.push(a);r<e.length;){var l=e[r];if(/^(\-\-\-|\+\+\+|@@)\s/.test(l))break;var c=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(l);c&&(a.index=c[1]),r++}for(s(a),s(a),a.hunks=[];r<e.length;){var u=e[r];if(/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(u))break;if(/^@@/.test(u))a.hunks.push(o());else{if(u)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(u));r++}}}function s(a){var l=/^(---|\+\+\+)\s+(.*)\r?$/.exec(e[r]);if(l){var c=l[1]==="---"?"old":"new",u=l[2].split(" ",2),f=u[0].replace(/\\\\/g,"\\");/^".*"$/.test(f)&&(f=f.substr(1,f.length-2)),a[c+"FileName"]=f,a[c+"Header"]=(u[1]||"").trim(),r++}}function o(){var a=r,l=e[r++],c=l.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),u={oldStart:+c[1],oldLines:typeof c[2]=="undefined"?1:+c[2],newStart:+c[3],newLines:typeof c[4]=="undefined"?1:+c[4],lines:[]};u.oldLines===0&&(u.oldStart+=1),u.newLines===0&&(u.newStart+=1);for(var f=0,d=0;r<e.length&&(d<u.oldLines||f<u.newLines||(m=e[r])!==null&&m!==void 0&&m.startsWith("\\"));r++){var m,g=e[r].length==0&&r!=e.length-1?" ":e[r][0];if(g==="+"||g==="-"||g===" "||g==="\\")u.lines.push(e[r]),g==="+"?f++:g==="-"?d++:g===" "&&(f++,d++);else throw new Error("Hunk at line ".concat(a+1," contained invalid line ").concat(e[r]))}if(!f&&u.newLines===1&&(u.newLines=0),!d&&u.oldLines===1&&(u.oldLines=0),f!==u.newLines)throw new Error("Added line count did not match for hunk at line "+(a+1));if(d!==u.oldLines)throw new Error("Removed line count did not match for hunk at line "+(a+1));return u}for(;r<e.length;)n();return t}function K_(i,e,t){var r=!0,n=!1,s=!1,o=1;return function a(){if(r&&!s){if(n?o++:r=!1,i+o<=t)return i+o;s=!0}if(!n)return s||(r=!0),e<=i-o?i-o++:(n=!0,a())}}function Ah(i,e){var t=arg
|
|||
|
|
`),n=e.hunks,s=t.compareLine||function(P,U,F,H){return U===H},o=t.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return i;for(var l="",c=!1,u=!1,f=0;f<n[n.length-1].lines.length;f++){var d=n[n.length-1].lines[f];d[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=d}if(c){if(u){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function m(P,U,F){for(var H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,V=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],Y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,Q=0,W=!1;H<P.length;H++){var de=P[H],ae=de.length>0?de[0]:" ",ne=de.length>0?de.substr(1):de;if(ae==="-")if(s(U+1,r[U],ae,ne))U++,Q=0;else return!F||r[U]==null?null:(V[Y]=r[U],m(P,U+1,F-1,H,!1,V,Y+1));if(ae==="+"){if(!j)return null;V[Y]=ne,Y++,Q=0,W=!0}if(ae===" ")if(Q++,V[Y]=r[U],s(U+1,r[U],ae,ne))Y++,j=!0,W=!1,U++;else return W||!F?null:r[U]&&(m(P,U+1,F-1,H+1,!1,V,Y+1)||m(P,U+1,F-1,H,!1,V,Y+1))||m(P,U,F-1,H+1,!1,V,Y)}return Y-=Q,U-=Q,V.length=Y,{patchedLines:V,oldLineLastI:U-1}}for(var g=[],y=0,b=0;b<n.length;b++){for(var w=n[b],S=void 0,k=r.length-w.oldLines+o,O=void 0,E=0;E<=o;E++){O=w.oldStart+y-1;for(var R=K_(O,a,k);O!==void 0&&(S=m(w.lines,O,E),!S);O=R());if(S)break}if(!S)return!1;for(var T=a;T<O;T++)g.push(r[T]);for(var A=0;A<S.patchedLines.length;A++){var C=S.patchedLines[A];g.push(C)}a=S.oldLineLastI+1,y=O+1-w.oldStart}for(var B=a;B<r.length;B++)g.push(r[B]);return g.join(`
|
|||
|
|
`)}function z_(i,e){typeof i=="string"&&(i=Ts(i));var t=0;function r(){var n=i[t++];if(!n)return e.complete();e.loadFile(n,function(s,o){if(s)return e.complete(s);var a=Ah(o,n,e);e.patched(n,a,function(l){if(l)return e.complete(l);r()})})}r()}function ks(i,e,t,r,n,s,o){if(o||(o={}),typeof o=="function"&&(o={callback:o}),typeof o.context=="undefined"&&(o.context=4),o.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(o.callback){var a=o,l=a.callback;Ba(t,r,dt(dt({},o),{},{callback:function(f){var d=c(f);l(d)}}))}else return c(Ba(t,r,o));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(A){return A.map(function(C){return" "+C})}for(var d=[],m=0,g=0,y=[],b=1,w=1,S=function(){var C=u[k],B=C.lines||Z_(C.value);if(C.lines=B,C.added||C.removed){var P;if(!m){var U=u[k-1];m=b,g=w,U&&(y=o.context>0?f(U.lines.slice(-o.context)):[],m-=y.length,g-=y.length)}(P=y).push.apply(P,ai(B.map(function(Y){return(C.added?"+":"-")+Y}))),C.added?w+=B.length:b+=B.length}else{if(m)if(B.length<=o.context*2&&k<u.length-2){var F;(F=y).push.apply(F,ai(f(B)))}else{var H,j=Math.min(B.length,o.context);(H=y).push.apply(H,ai(f(B.slice(0,j))));var V={oldStart:m,oldLines:b-m+j,newStart:g,newLines:w-g+j,lines:y};d.push(V),m=0,g=0,y=[]}b+=B.length,w+=B.length}},k=0;k<u.length;k++)S();for(var O=0,E=d;O<E.length;O++)for(var R=E[O],T=0;T<R.lines.length;T++)R.lines[T].endsWith(`
|
|||
|
|
`)?R.lines[T]=R.lines[T].slice(0,-1):(R.lines.splice(T+1,0,"\\ No newline at end of file"),T++);return{oldFileName:i,newFileName:e,oldHeader:n,newHeader:s,hunks:d}}}function Cs(i){if(Array.isArray(i))return i.map(Cs).join(`
|
|||
|
|
`);var e=[];i.oldFileName==i.newFileName&&e.push("Index: "+i.oldFileName),e.push("==================================================================="),e.push("--- "+i.oldFileName+(typeof i.oldHeader=="undefined"?"":" "+i.oldHeader)),e.push("+++ "+i.newFileName+(typeof i.newHeader=="undefined"?"":" "+i.newHeader));for(var t=0;t<i.hunks.length;t++){var r=i.hunks[t];r.oldLines===0&&(r.oldStart-=1),r.newLines===0&&(r.newStart-=1),e.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),e.push.apply(e,r.lines)}return e.join(`
|
|||
|
|
`)+`
|
|||
|
|
`}function Ih(i,e,t,r,n,s,o){var a;if(typeof o=="function"&&(o={callback:o}),(a=o)!==null&&a!==void 0&&a.callback){var c=o,u=c.callback;ks(i,e,t,r,n,s,dt(dt({},o),{},{callback:function(d){d?u(Cs(d)):u()}}))}else{var l=ks(i,e,t,r,n,s,o);return l?Cs(l):void 0}}function J_(i,e,t,r,n,s){return Ih(i,i,e,t,r,n,s)}function Z_(i){var e=i.endsWith(`
|
|||
|
|
`),t=i.split(`
|
|||
|
|
`).map(function(r){return r+`
|
|||
|
|
`});return e?t.pop():t.push(t.pop().slice(0,-1)),t}function Q_(i,e){return i.length!==e.length?!1:Pa(i,e)}function Pa(i,e){if(e.length>i.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==i[t])return!1;return!0}function X_(i){var e=Ma(i.lines),t=e.oldLines,r=e.newLines;t!==void 0?i.oldLines=t:delete i.oldLines,r!==void 0?i.newLines=r:delete i.newLines}function ew(i,e,t){i=dh(i,t),e=dh(e,t);var r={};(i.index||e.index)&&(r.index=i.index||e.index),(i.newFileName||e.newFileName)&&(mh(i)?mh(e)?(r.oldFileName=xs(r,i.oldFileName,e.oldFileName),r.newFileName=xs(r,i.newFileName,e.newFileName),r.oldHeader=xs(r,i.oldHeader,e.oldHeader),r.newHeader=xs(r,i.newHeader,e.newHeader)):(r.oldFileName=i.oldFileName,r.newFileName=i.newFileName,r.oldHeader=i.oldHeader,r.newHeader=i.newHeader):(r.oldFileName=e.oldFileName||i.oldFileName,r.newFileName=e.newFileName||i.newFileName,r.oldHeader=e.oldHeader||i.oldHeader,r.newHeader=e.newHeader||i.newHeader)),r.hunks=[];for(var n=0,s=0,o=0,a=0;n<i.hunks.length||s<e.hunks.length;){var l=i.hunks[n]||{oldStart:1/0},c=e.hunks[s]||{oldStart:1/0};if(gh(l,c))r.hunks.push(vh(l,o)),n++,a+=l.newLines-l.oldLines;else if(gh(c,l))r.hunks.push(vh(c,a)),s++,o+=c.newLines-c.oldLines;else{var u={oldStart:Math.min(l.oldStart,c.oldStart),oldLines:0,newStart:Math.min(l.newStart+o,c.oldStart+a),newLines:0,lines:[]};tw(u,l.oldStart,l.lines,c.oldStart,c.lines),s++,n++,r.hunks.push(u)}}return r}function dh(i,e){if(typeof i=="string"){if(/^@@/m.test(i)||/^Index:/m.test(i))return Ts(i)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return ks(void 0,void 0,e,i)}return i}function mh(i){return i.newFileName&&i.newFileName!==i.oldFileName}function xs(i,e,t){return e===t?e:(i.conflict=!0,{mine:e,theirs:t})}function gh(i,e){return i.oldStart<e.oldStart&&i.oldStart+i.oldLines<e.oldStart}function vh(i,e){return{oldStart:i.oldStart,oldLines:i.oldLines,newStart:i.newStart+e,newLines:i.newLines,lines:i.lines}}function tw(i,e,t,r,n){var s={offset:e,lines:t,index:0},o={offset:r,lines:n,index:0};for(bh(i,s,o),bh(i,o,s);s.index<s.lines.length&&o.index<o.lines.length;){var a=s.lines[s.index],l=o.lines[o.index];if((a[0]==="-"||a[0]==="+")&&(l[0]==="-"||l[0]==="+"))iw(i,s,o);else if(a[0]==="+"&&l[0]===" "){var c;(c=i.lines).push.apply(c,ai(Ki(s)))}else if(l[0]==="+"&&a[0]===" "){var u;(u=i.lines).push.apply(u,ai(Ki(o)))}else a[0]==="-"&&l[0]===" "?yh(i,s,o):l[0]==="-"&&a[0]===" "?yh(i,o,s,!0):a===l?(i.lines.push(a),s.index++,o.index++):qa(i,Ki(s),Ki(o))}_h(i,s),_h(i,o),X_(i)}function iw(i,e,t){var r=Ki(e),n=Ki(t);if(wh(r)&&wh(n)){if(Pa(r,n)&&xh(t,r,r.length-n.length)){var s;(s=i.lines).push.apply(s,ai(r));return}else if(Pa(n,r)&&xh(e,n,n.length-r.length)){var o;(o=i.lines).push.apply(o,ai(n));return}}else if(Q_(r,n)){var a;(a=i.lines).push.apply(a,ai(r));return}qa(i,r,n)}function yh(i,e,t,r){var n=Ki(e),s=rw(t,n);if(s.merged){var o;(o=i.lines).push.apply(o,ai(s.merged))}else qa(i,r?s:n,r?n:s)}function qa(i,e,t){i.conflict=!0,i.lines.push({conflict:!0,mine:e,theirs:t})}function bh(i,e,t){for(;e.offset<t.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];i.lines.push(r),e.offset++}}function _h(i,e){for(;e.index<e.lines.length;){var t=e.lines[e.index++];i.lines.push(t)}}function Ki(i){for(var e=[],t=i.lines[i.index][0];i.index<i.lines.length;){var r=i.lines[i.index];if(t==="-"&&r[0]==="+"&&(t="+"),t===r[0])e.push(r),i.index++;else break}return e}function rw(i,e){for(var t=[],r=[],n=0,s=!1,o=!1;n<e.length&&i.index<i.lines.length;){var a=i.lines[i.index],l=e[n];if(l[0]==="+")break;if(s=s||a[0]!==" ",r.push(l),n++,a[0]==="+")for(o=!0;a[0]==="+";)t.push(a),a=i.lines[++i.index];l.substr(1)===a.substr(1)?(t.push(a),i.index++):o=!0}if((e[n]||"")[0]==="+"&&s&&(o=!0),o)return t;for(;n<e.length;)r.push(e[n++]);return{merged:r,changes:t}}function wh(i){return i.reduce(function(e,t){return e&&t[0]==="-"},!0)}function xh(i,e,t){for(var r=0;r<t;r++){var n=e[e.length-t+r].substr(1);if(i.lines[i.index+r]!==" "+n)return!1}return i.index+=t,!0}function Ma(i){var e=0,t=0;return i.forEach(function(r){if(typeof r!="string"){va
|
|||
|
|
/*! Bundled license information:
|
|||
|
|
|
|||
|
|
progress/lib/node-progress.js:
|
|||
|
|
(*!
|
|||
|
|
* node-progress
|
|||
|
|
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|||
|
|
* MIT Licensed
|
|||
|
|
*)
|
|||
|
|
*/
|