@lib-feedit/commons
Version:
Reusable components, scripts, styles, hooks & more
3 lines • 98.3 kB
JavaScript
import{execSync as e}from"child_process";import{existsSync as t,readFileSync as u,writeFileSync as n}from"fs";import{exit as i}from"process";import*as r from"path";import{styleText as o,stripVTControlCharacters as D}from"node:util";import l from"node:process";import*as s from"node:readline";import{AsyncLocalStorage as a,AsyncResource as c}from"node:async_hooks";import p from"stream";import F from"tty";function d(e,t,u,n){return new(u||(u=Promise))(function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function D(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof u?t:new u(function(e){e(t)})).then(o,D)}l((n=n.apply(e,t||[])).next())})}
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
function h(e){return null==e}"function"==typeof SuppressedError&&SuppressedError;var f={isNothing:h,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:h(e)?[]:[e]},repeat:function(e,t){var u,n="";for(u=0;u<t;u+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var u,n,i,r;if(t)for(u=0,n=(r=Object.keys(t)).length;u<n;u+=1)e[i=r[u]]=t[i];return e}};function g(e,t){var u="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(u+='in "'+e.mark.name+'" '),u+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(u+="\n\n"+e.mark.snippet),n+" "+u):n}function m(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=g(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}m.prototype=Object.create(Error.prototype),m.prototype.constructor=m,m.prototype.toString=function(e){return this.name+": "+g(this,e)};var C=m;function E(e,t,u,n,i){var r="",o="",D=Math.floor(i/2)-1;return n-t>D&&(t=n-D+(r=" ... ").length),u-n>D&&(u=n+D-(o=" ...").length),{str:r+e.slice(t,u).replace(/\t/g,"→")+o,pos:n-t+r.length}}function b(e,t){return f.repeat(" ",t-e.length)+e}var B=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var u,n=/\r?\n|\r|\0/g,i=[0],r=[],o=-1;u=n.exec(e.buffer);)r.push(u.index),i.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var D,l,s="",a=Math.min(e.line+t.linesAfter,r.length).toString().length,c=t.maxLength-(t.indent+a+3);for(D=1;D<=t.linesBefore&&!(o-D<0);D++)l=E(e.buffer,i[o-D],r[o-D],e.position-(i[o]-i[o-D]),c),s=f.repeat(" ",t.indent)+b((e.line-D+1).toString(),a)+" | "+l.str+"\n"+s;for(l=E(e.buffer,i[o],r[o],e.position,c),s+=f.repeat(" ",t.indent)+b((e.line+1).toString(),a)+" | "+l.str+"\n",s+=f.repeat("-",t.indent+a+3+l.pos)+"^\n",D=1;D<=t.linesAfter&&!(o+D>=r.length);D++)l=E(e.buffer,i[o+D],r[o+D],e.position-(i[o]-i[o+D]),c),s+=f.repeat(" ",t.indent)+b((e.line+D+1).toString(),a)+" | "+l.str+"\n";return s.replace(/\n$/,"")},A=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y=["scalar","sequence","mapping"];var v=function(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===A.indexOf(t))throw new C('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach(function(u){e[u].forEach(function(e){t[String(e)]=u})}),t}(t.styleAliases||null),-1===y.indexOf(this.kind))throw new C('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function w(e,t){var u=[];return e[t].forEach(function(e){var t=u.length;u.forEach(function(u,n){u.tag===e.tag&&u.kind===e.kind&&u.multi===e.multi&&(t=n)}),u[t]=e}),u}function k(e){return this.extend(e)}k.prototype.extend=function(e){var t=[],u=[];if(e instanceof v)u.push(e);else if(Array.isArray(e))u=u.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new C("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(u=u.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof v))throw new C("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new C("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new C("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(e){if(!(e instanceof v))throw new C("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(k.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(u),n.compiledImplicit=w(n,"implicit"),n.compiledExplicit=w(n,"explicit"),n.compiledTypeMap=function(){var e,t,u={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(u.multi[e.kind].push(e),u.multi.fallback.push(e)):u[e.kind][e.tag]=u.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return u}(n.compiledImplicit,n.compiledExplicit),n};var x=k,S=new v("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),L=new v("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),I=new v("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),T=new x({explicit:[S,L,I]});var O=new v("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var j=new v("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function R(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function M(e){return 48<=e&&e<=55}function U(e){return 48<=e&&e<=57}var $=new v("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,u=e.length,n=0,i=!1;if(!u)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===u)return!0;if("b"===(t=e[++n])){for(n++;n<u;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<u;n++)if("_"!==(t=e[n])){if(!R(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<u;n++)if("_"!==(t=e[n])){if(!M(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<u;n++)if("_"!==(t=e[n])){if(!U(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,u=e,n=1;if(-1!==u.indexOf("_")&&(u=u.replace(/_/g,"")),"-"!==(t=u[0])&&"+"!==t||("-"===t&&(n=-1),t=(u=u.slice(1))[0]),"0"===u)return 0;if("0"===t){if("b"===u[1])return n*parseInt(u.slice(2),2);if("x"===u[1])return n*parseInt(u.slice(2),16);if("o"===u[1])return n*parseInt(u.slice(2),8)}return n*parseInt(u,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!f.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var _=/^[-+]?[0-9]+e/;var P=new v("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!N.test(e)||"_"===e[e.length-1])},construct:function(e){var t,u;return u="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===u?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:u*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||f.isNegativeZero(e))},represent:function(e,t){var u;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(f.isNegativeZero(e))return"-0.0";return u=e.toString(10),_.test(u)?u.replace("e",".e"):u},defaultStyle:"lowercase"}),Y=T.extend({implicit:[O,j,$,P]}),q=Y,G=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),W=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var V=new v("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==G.exec(e)||null!==W.exec(e))},construct:function(e){var t,u,n,i,r,o,D,l,s=0,a=null;if(null===(t=G.exec(e))&&(t=W.exec(e)),null===t)throw new Error("Date resolve error");if(u=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(u,n,i));if(r=+t[4],o=+t[5],D=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(a=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(a=-a)),l=new Date(Date.UTC(u,n,i,r,o,D,s)),a&&l.setTime(l.getTime()-a),l},instanceOf:Date,represent:function(e){return e.toISOString()}});var z=new v("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var K=new v("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,u,n=0,i=e.length,r=H;for(u=0;u<i;u++)if(!((t=r.indexOf(e.charAt(u)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,u,n=e.replace(/[\r\n=]/g,""),i=n.length,r=H,o=0,D=[];for(t=0;t<i;t++)t%4==0&&t&&(D.push(o>>16&255),D.push(o>>8&255),D.push(255&o)),o=o<<6|r.indexOf(n.charAt(t));return 0===(u=i%4*6)?(D.push(o>>16&255),D.push(o>>8&255),D.push(255&o)):18===u?(D.push(o>>10&255),D.push(o>>2&255)):12===u&&D.push(o>>4&255),new Uint8Array(D)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,u,n="",i=0,r=e.length,o=H;for(t=0;t<r;t++)t%3==0&&t&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(u=r%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===u?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===u&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),Z=Object.prototype.hasOwnProperty,Q=Object.prototype.toString;var J=new v("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,u,n,i,r,o=[],D=e;for(t=0,u=D.length;t<u;t+=1){if(n=D[t],r=!1,"[object Object]"!==Q.call(n))return!1;for(i in n)if(Z.call(n,i)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0},construct:function(e){return null!==e?e:[]}}),X=Object.prototype.toString;var ee=new v("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,u,n,i,r,o=e;for(r=new Array(o.length),t=0,u=o.length;t<u;t+=1){if(n=o[t],"[object Object]"!==X.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;r[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,u,n,i,r,o=e;for(r=new Array(o.length),t=0,u=o.length;t<u;t+=1)n=o[t],i=Object.keys(n),r[t]=[i[0],n[i[0]]];return r}}),te=Object.prototype.hasOwnProperty;var ue=new v("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,u=e;for(t in u)if(te.call(u,t)&&null!==u[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),ne=q.extend({implicit:[V,z],explicit:[K,J,ee,ue]}),ie=Object.prototype.hasOwnProperty,re=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oe=/[\x85\u2028\u2029]/,De=/[,\[\]\{\}]/,le=/^(?:!|!!|![a-z\-]+!)$/i,se=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ae(e){return Object.prototype.toString.call(e)}function ce(e){return 10===e||13===e}function pe(e){return 9===e||32===e}function Fe(e){return 9===e||32===e||10===e||13===e}function de(e){return 44===e||91===e||93===e||123===e||125===e}function he(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function fe(e){return 120===e?2:117===e?4:85===e?8:0}function ge(e){return 48<=e&&e<=57?e-48:-1}function me(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function Ce(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function Ee(e,t,u){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:u}):e[t]=u}for(var be=new Array(256),Be=new Array(256),Ae=0;Ae<256;Ae++)be[Ae]=me(Ae)?1:0,Be[Ae]=me(Ae);function ye(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ne,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ve(e,t){var u={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return u.snippet=B(u),new C(t,u)}function we(e,t){throw ve(e,t)}function ke(e,t){e.onWarning&&e.onWarning.call(null,ve(e,t))}var xe={YAML:function(e,t,u){var n,i,r;null!==e.version&&we(e,"duplication of %YAML directive"),1!==u.length&&we(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(u[0]))&&we(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),r=parseInt(n[2],10),1!==i&&we(e,"unacceptable YAML version of the document"),e.version=u[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&ke(e,"unsupported YAML version of the document")},TAG:function(e,t,u){var n,i;2!==u.length&&we(e,"TAG directive accepts exactly two arguments"),n=u[0],i=u[1],le.test(n)||we(e,"ill-formed tag handle (first argument) of the TAG directive"),ie.call(e.tagMap,n)&&we(e,'there is a previously declared suffix for "'+n+'" tag handle'),se.test(i)||we(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){we(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function Se(e,t,u,n){var i,r,o,D;if(t<u){if(D=e.input.slice(t,u),n)for(i=0,r=D.length;i<r;i+=1)9===(o=D.charCodeAt(i))||32<=o&&o<=1114111||we(e,"expected valid JSON character");else re.test(D)&&we(e,"the stream contains non-printable characters");e.result+=D}}function Le(e,t,u,n){var i,r,o,D;for(f.isObject(u)||we(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,D=(i=Object.keys(u)).length;o<D;o+=1)r=i[o],ie.call(t,r)||(Ee(t,r,u[r]),n[r]=!0)}function Ie(e,t,u,n,i,r,o,D,l){var s,a;if(Array.isArray(i))for(s=0,a=(i=Array.prototype.slice.call(i)).length;s<a;s+=1)Array.isArray(i[s])&&we(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===ae(i[s])&&(i[s]="[object Object]");if("object"==typeof i&&"[object Object]"===ae(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(s=0,a=r.length;s<a;s+=1)Le(e,t,r[s],u);else Le(e,t,r,u);else e.json||ie.call(u,i)||!ie.call(t,i)||(e.line=o||e.line,e.lineStart=D||e.lineStart,e.position=l||e.position,we(e,"duplicated mapping key")),Ee(t,i,r),delete u[i];return t}function Te(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):we(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Oe(e,t,u){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;pe(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!ce(i))break;for(Te(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==u&&0!==n&&e.lineIndent<u&&ke(e,"deficient indentation"),n}function je(e){var t,u=e.position;return!(45!==(t=e.input.charCodeAt(u))&&46!==t||t!==e.input.charCodeAt(u+1)||t!==e.input.charCodeAt(u+2)||(u+=3,0!==(t=e.input.charCodeAt(u))&&!Fe(t)))}function Re(e,t){1===t?e.result+=" ":t>1&&(e.result+=f.repeat("\n",t-1))}function Me(e,t){var u,n,i=e.tag,r=e.anchor,o=[],D=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),45===n)&&Fe(e.input.charCodeAt(e.position+1));)if(D=!0,e.position++,Oe(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(u=e.line,Ne(e,t,3,!1,!0),o.push(e.result),Oe(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&0!==n)we(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!D&&(e.tag=i,e.anchor=r,e.kind="sequence",e.result=o,!0)}function Ue(e){var t,u,n,i,r=!1,o=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&we(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(r=!0,i=e.input.charCodeAt(++e.position)):33===i?(o=!0,u="!!",i=e.input.charCodeAt(++e.position)):u="!",t=e.position,r){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):we(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Fe(i);)33===i&&(o?we(e,"tag suffix cannot contain exclamation marks"):(u=e.input.slice(t-1,e.position+1),le.test(u)||we(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),De.test(n)&&we(e,"tag suffix cannot contain flow indicator characters")}n&&!se.test(n)&&we(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){we(e,"tag name is malformed: "+n)}return r?e.tag=n:ie.call(e.tagMap,u)?e.tag=e.tagMap[u]+n:"!"===u?e.tag="!"+n:"!!"===u?e.tag="tag:yaml.org,2002:"+n:we(e,'undeclared tag handle "'+u+'"'),!0}function $e(e){var t,u;if(38!==(u=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&we(e,"duplication of an anchor property"),u=e.input.charCodeAt(++e.position),t=e.position;0!==u&&!Fe(u)&&!de(u);)u=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Ne(e,t,u,n,i){var r,o,D,l,s,a,c,p,F,d=1,h=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=o=D=4===u||3===u,n&&Oe(e,!0,-1)&&(h=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;Ue(e)||$e(e);)Oe(e,!0,-1)?(h=!0,D=r,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):D=!1;if(D&&(D=h||i),1!==d&&4!==u||(p=1===u||2===u?t:t+1,F=e.position-e.lineStart,1===d?D&&(Me(e,F)||function(e,t,u){var n,i,r,o,D,l,s,a=e.tag,c=e.anchor,p={},F=Object.create(null),d=null,h=null,f=null,g=!1,m=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),s=e.input.charCodeAt(e.position);0!==s;){if(g||-1===e.firstTabInLine||(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),r=e.line,63!==s&&58!==s||!Fe(n)){if(o=e.line,D=e.lineStart,l=e.position,!Ne(e,u,2,!1,!0))break;if(e.line===r){for(s=e.input.charCodeAt(e.position);pe(s);)s=e.input.charCodeAt(++e.position);if(58===s)Fe(s=e.input.charCodeAt(++e.position))||we(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Ie(e,p,F,d,h,null,o,D,l),d=h=f=null),m=!0,g=!1,i=!1,d=e.tag,h=e.result;else{if(!m)return e.tag=a,e.anchor=c,!0;we(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return e.tag=a,e.anchor=c,!0;we(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(g&&(Ie(e,p,F,d,h,null,o,D,l),d=h=f=null),m=!0,g=!0,i=!0):g?(g=!1,i=!0):we(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=n;if((e.line===r||e.lineIndent>t)&&(g&&(o=e.line,D=e.lineStart,l=e.position),Ne(e,t,4,!0,i)&&(g?h=e.result:f=e.result),g||(Ie(e,p,F,d,h,f,o,D,l),d=h=f=null),Oe(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==s)we(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&Ie(e,p,F,d,h,null,o,D,l),m&&(e.tag=a,e.anchor=c,e.kind="mapping",e.result=p),m}(e,F,p))||function(e,t){var u,n,i,r,o,D,l,s,a,c,p,F,d=!0,h=e.tag,f=e.anchor,g=Object.create(null);if(91===(F=e.input.charCodeAt(e.position)))o=93,s=!1,r=[];else{if(123!==F)return!1;o=125,s=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),F=e.input.charCodeAt(++e.position);0!==F;){if(Oe(e,!0,t),(F=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=h,e.anchor=f,e.kind=s?"mapping":"sequence",e.result=r,!0;d?44===F&&we(e,"expected the node content, but found ','"):we(e,"missed comma between flow collection entries"),p=null,D=l=!1,63===F&&Fe(e.input.charCodeAt(e.position+1))&&(D=l=!0,e.position++,Oe(e,!0,t)),u=e.line,n=e.lineStart,i=e.position,Ne(e,t,1,!1,!0),c=e.tag,a=e.result,Oe(e,!0,t),F=e.input.charCodeAt(e.position),!l&&e.line!==u||58!==F||(D=!0,F=e.input.charCodeAt(++e.position),Oe(e,!0,t),Ne(e,t,1,!1,!0),p=e.result),s?Ie(e,r,g,c,a,p,u,n,i):D?r.push(Ie(e,null,g,c,a,p,u,n,i)):r.push(a),Oe(e,!0,t),44===(F=e.input.charCodeAt(e.position))?(d=!0,F=e.input.charCodeAt(++e.position)):d=!1}we(e,"unexpected end of the stream within a flow collection")}(e,p)?g=!0:(o&&function(e,t){var u,n,i,r,o=1,D=!1,l=!1,s=t,a=0,c=!1;if(124===(r=e.input.charCodeAt(e.position)))n=!1;else{if(62!==r)return!1;n=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)1===o?o=43===r?3:2:we(e,"repeat of a chomping mode identifier");else{if(!((i=ge(r))>=0))break;0===i?we(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?we(e,"repeat of an indentation width identifier"):(s=t+i-1,l=!0)}if(pe(r)){do{r=e.input.charCodeAt(++e.position)}while(pe(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!ce(r)&&0!==r)}for(;0!==r;){for(Te(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!l||e.lineIndent<s)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>s&&(s=e.lineIndent),ce(r))a++;else{if(e.lineIndent<s){3===o?e.result+=f.repeat("\n",D?1+a:a):1===o&&D&&(e.result+="\n");break}for(n?pe(r)?(c=!0,e.result+=f.repeat("\n",D?1+a:a)):c?(c=!1,e.result+=f.repeat("\n",a+1)):0===a?D&&(e.result+=" "):e.result+=f.repeat("\n",a):e.result+=f.repeat("\n",D?1+a:a),D=!0,l=!0,a=0,u=e.position;!ce(r)&&0!==r;)r=e.input.charCodeAt(++e.position);Se(e,u,e.position,!1)}}return!0}(e,p)||function(e,t){var u,n,i;if(39!==(u=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(u=e.input.charCodeAt(e.position));)if(39===u){if(Se(e,n,e.position,!0),39!==(u=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else ce(u)?(Se(e,n,i,!0),Re(e,Oe(e,!1,t)),n=i=e.position):e.position===e.lineStart&&je(e)?we(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);we(e,"unexpected end of the stream within a single quoted scalar")}(e,p)||function(e,t){var u,n,i,r,o,D;if(34!==(D=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,u=n=e.position;0!==(D=e.input.charCodeAt(e.position));){if(34===D)return Se(e,u,e.position,!0),e.position++,!0;if(92===D){if(Se(e,u,e.position,!0),ce(D=e.input.charCodeAt(++e.position)))Oe(e,!1,t);else if(D<256&&be[D])e.result+=Be[D],e.position++;else if((o=fe(D))>0){for(i=o,r=0;i>0;i--)(o=he(D=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+o:we(e,"expected hexadecimal character");e.result+=Ce(r),e.position++}else we(e,"unknown escape sequence");u=n=e.position}else ce(D)?(Se(e,u,n,!0),Re(e,Oe(e,!1,t)),u=n=e.position):e.position===e.lineStart&&je(e)?we(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}we(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?g=!0:!function(e){var t,u,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Fe(n)&&!de(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an alias node must contain at least one character"),u=e.input.slice(t,e.position),ie.call(e.anchorMap,u)||we(e,'unidentified alias "'+u+'"'),e.result=e.anchorMap[u],Oe(e,!0,-1),!0}(e)?function(e,t,u){var n,i,r,o,D,l,s,a,c=e.kind,p=e.result;if(Fe(a=e.input.charCodeAt(e.position))||de(a)||35===a||38===a||42===a||33===a||124===a||62===a||39===a||34===a||37===a||64===a||96===a)return!1;if((63===a||45===a)&&(Fe(n=e.input.charCodeAt(e.position+1))||u&&de(n)))return!1;for(e.kind="scalar",e.result="",i=r=e.position,o=!1;0!==a;){if(58===a){if(Fe(n=e.input.charCodeAt(e.position+1))||u&&de(n))break}else if(35===a){if(Fe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&je(e)||u&&de(a))break;if(ce(a)){if(D=e.line,l=e.lineStart,s=e.lineIndent,Oe(e,!1,-1),e.lineIndent>=t){o=!0,a=e.input.charCodeAt(e.position);continue}e.position=r,e.line=D,e.lineStart=l,e.lineIndent=s;break}}o&&(Se(e,i,r,!1),Re(e,e.line-D),i=r=e.position,o=!1),pe(a)||(r=e.position+1),a=e.input.charCodeAt(++e.position)}return Se(e,i,r,!1),!!e.result||(e.kind=c,e.result=p,!1)}(e,p,1===u)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||we(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=D&&Me(e,F))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&we(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,s=e.implicitTypes.length;l<s;l+=1)if((c=e.implicitTypes[l]).resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ie.call(e.typeMap[e.kind||"fallback"],e.tag))c=e.typeMap[e.kind||"fallback"][e.tag];else for(c=null,l=0,s=(a=e.typeMap.multi[e.kind||"fallback"]).length;l<s;l+=1)if(e.tag.slice(0,a[l].tag.length)===a[l].tag){c=a[l];break}c||we(e,"unknown tag !<"+e.tag+">"),null!==e.result&&c.kind!==e.kind&&we(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result,e.tag)?(e.result=c.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):we(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function _e(e){var t,u,n,i,r=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(Oe(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!Fe(i);)i=e.input.charCodeAt(++e.position);for(n=[],(u=e.input.slice(t,e.position)).length<1&&we(e,"directive name must not be less than one character in length");0!==i;){for(;pe(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!ce(i));break}if(ce(i))break;for(t=e.position;0!==i&&!Fe(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&Te(e),ie.call(xe,u)?xe[u](e,u,n):ke(e,'unknown document directive "'+u+'"')}Oe(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Oe(e,!0,-1)):o&&we(e,"directives end mark is expected"),Ne(e,e.lineIndent-1,4,!1,!0),Oe(e,!0,-1),e.checkLineBreaks&&oe.test(e.input.slice(r,e.position))&&ke(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&je(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Oe(e,!0,-1)):e.position<e.length-1&&we(e,"end of the stream or a document separator is expected")}function Pe(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var u=new ye(e,t),n=e.indexOf("\0");for(-1!==n&&(u.position=n,we(u,"null byte is not allowed in input")),u.input+="\0";32===u.input.charCodeAt(u.position);)u.lineIndent+=1,u.position+=1;for(;u.position<u.length-1;)_e(u);return u.documents}var Ye={loadAll:function(e,t,u){null!==t&&"object"==typeof t&&void 0===u&&(u=t,t=null);var n=Pe(e,u);if("function"!=typeof t)return n;for(var i=0,r=n.length;i<r;i+=1)t(n[i])},load:function(e,t){var u=Pe(e,t);if(0!==u.length){if(1===u.length)return u[0];throw new C("expected a single document in the stream, but found more")}}},qe=Object.prototype.toString,Ge=Object.prototype.hasOwnProperty,We=65279,Ve={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ze=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],He=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ke(e){var t,u,n;if(t=e.toString(16).toUpperCase(),e<=255)u="x",n=2;else if(e<=65535)u="u",n=4;else{if(!(e<=4294967295))throw new C("code point within a string may not be greater than 0xFFFFFFFF");u="U",n=8}return"\\"+u+f.repeat("0",n-t.length)+t}function Ze(e){this.schema=e.schema||ne,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=f.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var u,n,i,r,o,D,l;if(null===t)return{};for(u={},i=0,r=(n=Object.keys(t)).length;i<r;i+=1)o=n[i],D=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=e.compiledTypeMap.fallback[o])&&Ge.call(l.styleAliases,D)&&(D=l.styleAliases[D]),u[o]=D;return u}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Qe(e,t){for(var u,n=f.repeat(" ",t),i=0,r=-1,o="",D=e.length;i<D;)-1===(r=e.indexOf("\n",i))?(u=e.slice(i),i=D):(u=e.slice(i,r+1),i=r+1),u.length&&"\n"!==u&&(o+=n),o+=u;return o}function Je(e,t){return"\n"+f.repeat(" ",e.indent*t)}function Xe(e){return 32===e||9===e}function et(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==We||65536<=e&&e<=1114111}function tt(e){return et(e)&&e!==We&&13!==e&&10!==e}function ut(e,t,u){var n=tt(e),i=n&&!Xe(e);return(u?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||tt(t)&&!Xe(t)&&35===e||58===t&&i}function nt(e,t){var u,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(u=e.charCodeAt(t+1))>=56320&&u<=57343?1024*(n-55296)+u-56320+65536:n}function it(e){return/^\n* /.test(e)}function rt(e,t,u,n,i,r,o,D){var l,s,a=0,c=null,p=!1,F=!1,d=-1!==n,h=-1,f=et(s=nt(e,0))&&s!==We&&!Xe(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!Xe(e)&&58!==e}(nt(e,e.length-1));if(t||o)for(l=0;l<e.length;a>=65536?l+=2:l++){if(!et(a=nt(e,l)))return 5;f=f&&ut(a,c,D),c=a}else{for(l=0;l<e.length;a>=65536?l+=2:l++){if(10===(a=nt(e,l)))p=!0,d&&(F=F||l-h-1>n&&" "!==e[h+1],h=l);else if(!et(a))return 5;f=f&&ut(a,c,D),c=a}F=F||d&&l-h-1>n&&" "!==e[h+1]}return p||F?u>9&&it(e)?5:o?2===r?5:2:F?4:3:!f||o||i(e)?2===r?5:2:1}function ot(e,t,u,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==ze.indexOf(t)||He.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,u),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),D=n||e.flowLevel>-1&&u>=e.flowLevel;switch(rt(t,D,e.indent,o,function(t){return function(e,t){var u,n;for(u=0,n=e.implicitTypes.length;u<n;u+=1)if(e.implicitTypes[u].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+Dt(t,e.indent)+lt(Qe(t,r));case 4:return">"+Dt(t,e.indent)+lt(Qe(function(e,t){var u,n,i=/(\n+)([^\n]*)/g,r=(D=e.indexOf("\n"),D=-1!==D?D:e.length,i.lastIndex=D,st(e.slice(0,D),t)),o="\n"===e[0]||" "===e[0];var D;for(;n=i.exec(e);){var l=n[1],s=n[2];u=" "===s[0],r+=l+(o||u||""===s?"":"\n")+st(s,t),o=u}return r}(t,o),r));case 5:return'"'+function(e){for(var t,u="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=nt(e,i),!(t=Ve[n])&&et(n)?(u+=e[i],n>=65536&&(u+=e[i+1])):u+=t||Ke(n);return u}(t)+'"';default:throw new C("impossible error: invalid scalar style")}}()}function Dt(e,t){var u=it(e)?String(t):"",n="\n"===e[e.length-1];return u+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function lt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function st(e,t){if(""===e||" "===e[0])return e;for(var u,n,i=/ [^ ]/g,r=0,o=0,D=0,l="";u=i.exec(e);)(D=u.index)-r>t&&(n=o>r?o:D,l+="\n"+e.slice(r,n),r=n+1),o=D;return l+="\n",e.length-r>t&&o>r?l+=e.slice(r,o)+"\n"+e.slice(o+1):l+=e.slice(r),l.slice(1)}function at(e,t,u,n){var i,r,o,D="",l=e.tag;for(i=0,r=u.length;i<r;i+=1)o=u[i],e.replacer&&(o=e.replacer.call(u,String(i),o)),(pt(e,t+1,o,!0,!0,!1,!0)||void 0===o&&pt(e,t+1,null,!0,!0,!1,!0))&&(n&&""===D||(D+=Je(e,t)),e.dump&&10===e.dump.charCodeAt(0)?D+="-":D+="- ",D+=e.dump);e.tag=l,e.dump=D||"[]"}function ct(e,t,u){var n,i,r,o,D,l;for(r=0,o=(i=u?e.explicitTypes:e.implicitTypes).length;r<o;r+=1)if(((D=i[r]).instanceOf||D.predicate)&&(!D.instanceOf||"object"==typeof t&&t instanceof D.instanceOf)&&(!D.predicate||D.predicate(t))){if(u?D.multi&&D.representName?e.tag=D.representName(t):e.tag=D.tag:e.tag="?",D.represent){if(l=e.styleMap[D.tag]||D.defaultStyle,"[object Function]"===qe.call(D.represent))n=D.represent(t,l);else{if(!Ge.call(D.represent,l))throw new C("!<"+D.tag+'> tag resolver accepts not "'+l+'" style');n=D.represent[l](t,l)}e.dump=n}return!0}return!1}function pt(e,t,u,n,i,r,o){e.tag=null,e.dump=u,ct(e,u,!1)||ct(e,u,!0);var D,l=qe.call(e.dump),s=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var a,c,p="[object Object]"===l||"[object Array]"===l;if(p&&(c=-1!==(a=e.duplicates.indexOf(u))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(i=!1),c&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(p&&c&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(!function(e,t,u,n){var i,r,o,D,l,s,a="",c=e.tag,p=Object.keys(u);if(!0===e.sortKeys)p.sort();else if("function"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new C("sortKeys must be a boolean or a function");for(i=0,r=p.length;i<r;i+=1)s="",n&&""===a||(s+=Je(e,t)),D=u[o=p[i]],e.replacer&&(D=e.replacer.call(u,o,D)),pt(e,t+1,o,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,l&&(s+=Je(e,t)),pt(e,t+1,D,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?s+=":":s+=": ",a+=s+=e.dump));e.tag=c,e.dump=a||"{}"}(e,t,e.dump,i),c&&(e.dump="&ref_"+a+e.dump)):(!function(e,t,u){var n,i,r,o,D,l="",s=e.tag,a=Object.keys(u);for(n=0,i=a.length;n<i;n+=1)D="",""!==l&&(D+=", "),e.condenseFlow&&(D+='"'),o=u[r=a[n]],e.replacer&&(o=e.replacer.call(u,r,o)),pt(e,t,r,!1,!1)&&(e.dump.length>1024&&(D+="? "),D+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),pt(e,t,o,!1,!1)&&(l+=D+=e.dump));e.tag=s,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?at(e,t-1,e.dump,i):at(e,t,e.dump,i),c&&(e.dump="&ref_"+a+e.dump)):(!function(e,t,u){var n,i,r,o="",D=e.tag;for(n=0,i=u.length;n<i;n+=1)r=u[n],e.replacer&&(r=e.replacer.call(u,String(n),r)),(pt(e,t,r,!1,!1)||void 0===r&&pt(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=D,e.dump="["+o+"]"}(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new C("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&ot(e,e.dump,t,r,s)}null!==e.tag&&"?"!==e.tag&&(D=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),D="!"===e.tag[0]?"!"+D:"tag:yaml.org,2002:"===D.slice(0,18)?"!!"+D.slice(18):"!<"+D+">",e.dump=D+" "+e.dump)}return!0}function Ft(e,t){var u,n,i=[],r=[];for(dt(e,i,r),u=0,n=r.length;u<n;u+=1)t.duplicates.push(i[r[u]]);t.usedDuplicates=new Array(n)}function dt(e,t,u){var n,i,r;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===u.indexOf(i)&&u.push(i);else if(t.push(e),Array.isArray(e))for(i=0,r=e.length;i<r;i+=1)dt(e[i],t,u);else for(i=0,r=(n=Object.keys(e)).length;i<r;i+=1)dt(e[n[i]],t,u)}function ht(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var ft={Type:v,Schema:x,FAILSAFE_SCHEMA:T,JSON_SCHEMA:Y,CORE_SCHEMA:q,DEFAULT_SCHEMA:ne,load:Ye.load,loadAll:Ye.loadAll,dump:{dump:function(e,t){var u=new Ze(t=t||{});u.noRefs||Ft(e,u);var n=e;return u.replacer&&(n=u.replacer.call({"":n},"",n)),pt(u,0,n,!0,!0)?u.dump+"\n":""}}.dump,YAMLException:C,types:{binary:K,float:P,map:I,null:O,pairs:ee,set:ue,timestamp:V,bool:j,int:$,merge:z,omap:J,seq:L,str:S},safeLoad:ht("safeLoad","load"),safeLoadAll:ht("safeLoadAll","loadAll"),safeDump:ht("safeDump","dump")};const gt=(e,t=[])=>"up"===e.name||t.includes("vim")&&"k"===e.name||t.includes("emacs")&&e.ctrl&&"p"===e.name,mt=(e,t=[])=>"down"===e.name||t.includes("vim")&&"j"===e.name||t.includes("emacs")&&e.ctrl&&"n"===e.name,Ct=e=>"1234567890".includes(e.name),Et=e=>"enter"===e.name||"return"===e.name;class bt extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}}class Bt extends Error{name="CancelPromptError";message="Prompt was canceled"}class At extends Error{name="ExitPromptError"}class yt extends Error{name="HookError"}class vt extends Error{name="ValidationError"}const wt=new a;function kt(){const e=wt.getStore();if(!e)throw new yt("[Inquirer] Hook functions can only be called from within a prompt");return e}function xt(){return kt().rl}function St(e){return c.bind((...t)=>{const u=kt();let n=!1;const i=u.handleChange;u.handleChange=()=>{n=!0};const r=e(...t);return n&&i(),u.handleChange=i,r})}function Lt(e){const t=kt(),{index:u}=t,n=e({get:()=>t.hooks[u],set(e){t.hooks[u]=e},initialized:u in t.hooks});return t.index++,n}const It={queue(e){const t=kt(),{index:u}=t;t.hooksEffect.push(()=>{t.hooksCleanup[u]?.();const n=e(xt());if(null!=n&&"function"!=typeof n)throw new vt("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[u]=n})},run(){const e=kt();St(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){const e=kt();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function Tt(e){return Lt(t=>{const u=c.bind(function(e){t.get()!==e&&(t.set(e),kt().handleChange())});if(t.initialized)return[t.get(),u];const n="function"==typeof e?e():e;return t.set(n),[n,u]})}function Ot(e,t){Lt(u=>{const n=u.get(),i=!Array.isArray(n)||t.some((e,t)=>!Object.is(e,n[t]));i&&It.queue(e),u.set(t)})}const jt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},Rt={...jt,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},Mt={...jt,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Ut=("win32"!==l.platform?"linux"!==l.env.TERM:Boolean(l.env.WT_SESSION)||Boolean(l.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===l.env.ConEmuTask||"Terminus-Sublime"===l.env.TERM_PROGRAM||"vscode"===l.env.TERM_PROGRAM||"xterm-256color"===l.env.TERM||"alacritty"===l.env.TERM||"JetBrains-JediTerm"===l.env.TERMINAL_EMULATOR)?Rt:Mt,$t={prefix:{idle:o("blue","?"),done:o("green",Ut.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>o("yellow",e))},style:{answer:e=>o("cyan",e),message:e=>o("bold",e),error:e=>o("red",`> ${e}`),defaultAnswer:e=>o("dim",`(${e})`),help:e=>o("dim",e),highlight:e=>o("cyan",e),key:e=>o("cyan",o("bold",`<${e}>`))}};function Nt(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _t(...e){const t={};for(const u of e)for(const[e,n]of Object.entries(u)){const u=t[e];t[e]=Nt(u)&&Nt(n)?_t(u,n):n}return t}function Pt(...e){return _t(...[$t,...e.filter(e=>null!=e)])}function Yt({status:e="idle",theme:t}){const[u,n]=Tt(!1),[i,r]=Tt(0),{prefix:o,spinner:D}=Pt(t);if(Ot(()=>{if("loading"===e){let e,t=-1;const u=setTimeout(()=>{n(!0),e=setInterval(()=>{t+=1,r(t%D.frames.length)},D.interval)},300);return()=>{clearTimeout(u),clearInterval(e)}}n(!1)},[e]),u)return D.frames[i];return"string"==typeof o?o:o["loading"===e?"idle":e]??o.idle}function qt(e,t){return Lt(u=>{const n=u.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((e,u)=>e!==t[u])){const n=e();return u.set({value:n,dependencies:t}),n}return n.value})}function Gt(e){return Tt({current:e})[0]}function Wt(e){const t=Gt(e);t.current=e,Ot(e=>{let u=!1;const n=St((n,i)=>{u||t.current(i,e)});return e.input.on("keypress",n),()=>{u=!0,e.input.removeListener("keypress",n)}},[])}function Vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zt,Ht;var Kt=Vt(Ht?zt:(Ht=1,zt=function(e){const t=function(e){const t={defaultWidth:0,output:process.stdout,tty:F};return e?(Object.keys(t).forEach(function(u){e[u]||(e[u]=t[u])}),e):t}(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){const e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&0!==e)return e}return t.defaultWidth}));const Zt=function({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}();function Qt(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Zt,"")}function Jt(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),12288===(u=e)||u>=65281&&u<=65376||u>=65504&&u<=65510||function(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725=