UNPKG

code-server

Version:

Run VS Code on a remote server.

1 lines • 285 kB
(()=>{var e={838:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],o=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<o&&(o=i,s=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},5457:(e,t,n)=>{var r=n(4044),i=n(838);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),v(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}(e),!0).map(d)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function h(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=h(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function p(e){return"{"+e+"}"}function g(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function m(e,t){return e>=t}function v(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),d=c||l,y=o.body.indexOf(",")>=0;if(!d&&!y)return o.post.match(/,.*\}/)?v(e=o.pre+"{"+o.body+a+o.post):[e];if(d)s=o.body.split(/\.\./);else if(1===(s=h(o.body)).length&&1===(s=v(s[0],!1).map(p)).length)return(w=o.post.length?v(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var C,R=o.pre,w=o.post.length?v(o.post,!1):[""];if(d){var b=u(s[0]),T=u(s[1]),S=Math.max(s[0].length,s[1].length),_=3==s.length?Math.abs(u(s[2])):1,P=f;T<b&&(_*=-1,P=m);var D=s.some(g);C=[];for(var E=b;P(E,T);E+=_){var x;if(l)"\\"===(x=String.fromCharCode(E))&&(x="");else if(x=String(E),D){var k=S-x.length;if(k>0){var O=new Array(k+1).join("0");x=E<0?"-"+O+x.slice(1):O+x}}C.push(x)}}else C=r(s,(function(e){return v(e,!1)}));for(var F=0;F<C.length;F++)for(var q=0;q<w.length;q++){var N=R+C[F]+w[q];(!t||d||N)&&n.push(N)}return n}},4044:e=>{e.exports=function(e,n){for(var r=[],i=0;i<e.length;i++){var o=n(e[i],i);t(o)?r.push.apply(r,o):r.push(o)}return r};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},5295:(e,t,n)=>{"use strict";const r=n(7372),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),g=()=>1,f=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(m(e,t)){if(y(e,r),!e[a])return}else n&&(e[p]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[l]&&e[l](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class C{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const R=(e,t,n,r)=>{let i=n.value;m(e,i)&&(y(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||g;if(this[s]="function"!=typeof t?g:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=g),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;R(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;R(this,e,n,t),n=r}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[l]&&this[d]&&this[d].length&&this[d].forEach((e=>this[l](e.key,e.value))),this[h]=new Map,this[d]=new r,this[o]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[i])return y(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[l]&&(this[u]||this[l](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const p=new C(e,t,a,r,n);return p.length>this[i]?(this[l]&&this[l](e,t),!1):(this[o]+=p.length,this[d].unshift(p),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[h].forEach(((e,t)=>f(this,t,!1)))}}},3707:(e,t,n)=>{e.exports=h,h.Minimatch=p;var r={sep:"/"};try{r=n(5622)}catch(e){}var i=h.GLOBSTAR=p.GLOBSTAR={},o=n(5457),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c="[^/]*?",l="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),u=/\/+/;function d(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function h(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new p(t,n).match(e))}function p(e,t){if(!(this instanceof p))return new p(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function g(e,t){if(t||(t=this instanceof p?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}h.filter=function(e,t){return t=t||{},function(n,r,i){return h(n,e,t)}},h.defaults=function(e){if(!e||!Object.keys(e).length)return h;var t=h,n=function(n,r,i){return t.minimatch(n,r,d(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,d(e,r))},n},p.defaults=function(e){return e&&Object.keys(e).length?h.defaults(e).Minimatch:p},p.prototype.debug=function(){},p.prototype.make=function(){if(!this._made){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(u)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0}},p.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r<i&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}},h.braceExpand=function(e,t){return g(e,t)},p.prototype.braceExpand=g,p.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",u=!!n.nocase,d=!1,h=[],p=[],g=!1,m=-1,v=-1,y="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",C=this;function R(){if(r){switch(r){case"*":o+=c,u=!0;break;case"?":o+=a,u=!0;break;default:o+="\\"+r}C.debug("clearStateChar %j %j",r,o),r=!1}}for(var w,b=0,T=e.length;b<T&&(w=e.charAt(b));b++)if(this.debug("%s\t%s %s %j",e,b,o,w),d&&l[w])o+="\\"+w,d=!1;else switch(w){case"/":return!1;case"\\":R(),d=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,b,o,w),g){this.debug(" in class"),"!"===w&&b===v+1&&(w="^"),o+=w;continue}C.debug("call clearStateChar %j",r),R(),r=w,n.noext&&R();continue;case"(":if(g){o+="(";continue}if(!r){o+="\\(";continue}h.push({type:r,start:b-1,reStart:o.length,open:s[r].open,close:s[r].close}),o+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,o),r=!1;continue;case")":if(g||!h.length){o+="\\)";continue}R(),u=!0;var S=h.pop();o+=S.close,"!"===S.type&&p.push(S),S.reEnd=o.length;continue;case"|":if(g||!h.length||d){o+="\\|",d=!1;continue}R(),o+="|";continue;case"[":if(R(),g){o+="\\"+w;continue}g=!0,v=b,m=o.length,o+=w;continue;case"]":if(b===v+1||!g){o+="\\"+w,d=!1;continue}if(g){var _=e.substring(v+1,b);try{RegExp("["+_+"]")}catch(e){var P=this.parse(_,f);o=o.substr(0,m)+"\\["+P[0]+"\\]",u=u||P[1],g=!1;continue}}u=!0,g=!1,o+=w;continue;default:R(),d?d=!1:!l[w]||"^"===w&&g||(o+="\\"),o+=w}for(g&&(_=e.substr(v+1),P=this.parse(_,f),o=o.substr(0,m)+"\\["+P[0],u=u||P[1]),S=h.pop();S;S=h.pop()){var D=o.slice(S.reStart+S.open.length);this.debug("setting tail",o,S),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n %s",D,D,S,o);var E="*"===S.type?c:"?"===S.type?a:"\\"+S.type;u=!0,o=o.slice(0,S.reStart)+E+"\\("+D}R(),d&&(o+="\\\\");var x=!1;switch(o.charAt(0)){case".":case"[":case"(":x=!0}for(var k=p.length-1;k>-1;k--){var O=p[k],F=o.slice(0,O.reStart),q=o.slice(O.reStart,O.reEnd-8),N=o.slice(O.reEnd-8,O.reEnd),I=o.slice(O.reEnd);N+=I;var M=F.split("(").length-1,A=I;for(b=0;b<M;b++)A=A.replace(/\)[+*?]?/,"");var L="";""===(I=A)&&t!==f&&(L="$"),o=F+q+I+L+N}if(""!==o&&u&&(o="(?=.)"+o),x&&(o=y+o),t===f)return[o,u];if(!u)return e.replace(/\\(.)/g,"$1");var j=n.nocase?"i":"";try{var $=new RegExp("^"+o+"$",j)}catch(e){return new RegExp("$.")}return $._glob=e,$._src=o,$};var f={};h.makeRe=function(e,t){return new p(e,t||{}).makeRe()},p.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===i?n:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp},h.match=function(e,t,n){var r=new p(t,n=n||{});return e=e.filter((function(e){return r.match(e)})),r.options.nonull&&!e.length&&e.push(t),e},p.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/")),e=e.split(u),this.debug(this.pattern,"split",e);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(i=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;if(n.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},p.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var l,u=t[s],d=e[o];if(this.debug(t,u,d),!1===u)return!1;if(u===i){this.debug("GLOBSTAR",[t,u,d]);var h=o,p=s+1;if(p===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;h<a;){var g=e[h];if(this.debug("\nglobstar while",e,h,t,p,g),this.matchOne(e.slice(h),t.slice(p),n))return this.debug("globstar found match!",h,a,g),!0;if("."===g||".."===g||!r.dot&&"."===g.charAt(0)){this.debug("dot detected!",e,h,t,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",e,h,t,p),h!==a))}if("string"==typeof u?(l=r.nocase?d.toLowerCase()===u.toLowerCase():d===u,this.debug("string match",u,d,l)):(l=d.match(u),this.debug("pattern match",u,d,l)),!l)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},3134:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&s||a||l}}e.exports=i;const o=n(8716),{re:s,t:a}=n(9022),c=n(5452),l=n(6830),u=n(9510),d=n(7374)},7374:(e,t,n)=>{class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(o,D(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],d),a("comparator trim",e,l[u.COMPARATORTRIM]),e=(e=(e=e.replace(l[u.TILDETRIM],h)).replace(l[u.CARETTRIM],p)).split(/\s+/).join(" ");const c=r?l[u.COMPARATORLOOSE]:l[u.COMPARATOR],f=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options))).filter(this.options.loose?e=>!!e.match(c):()=>!0).map((e=>new s(e,this.options))),m=(f.length,new Map);for(const e of f){if(g(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const y=[...m.values()];return i.set(t,y),y}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>m(n,t)&&e.set.some((e=>m(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(E(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const i=new(n(5295))({max:1e3}),o=n(8716),s=n(3134),a=n(6830),c=n(9510),{re:l,t:u,comparatorTrimReplace:d,tildeTrimReplace:h,caretTrimReplace:p}=n(9022),g=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=C(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=_(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,C=(e,t)=>e.trim().split(/\s+/).map((e=>R(e,t))).join(" "),R=(e,t)=>{const n=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{a("caret",e,t);const n=t.loose?l[u.CARETLOOSE]:l[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),y(n)?c="":y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(n,((n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const l=y(i),u=l||y(o),d=u||y(s),h=d;return"="===r&&h&&(r=""),c=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},_=(e,t)=>(a("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),P=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),D=e=>(t,n,r,i,o,s,a,c,l,u,d,h,p)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=y(l)?"":y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:h?`<=${l}.${u}.${d}-${h}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`}`.trim(),E=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9510:(e,t,n)=>{const r=n(6830),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(39),{re:s,t:a}=n(9022),c=n(8716),{compareIdentifiers:l}=n(8822);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return l(n,i)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return l(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},6457:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},5452:(e,t,n)=>{const r=n(8565),i=n(3328),o=n(2260),s=n(6579),a=n(290),c=n(5891);e.exports=(e,t,n,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,l);case"!=":return i(e,n,l);case">":return o(e,n,l);case">=":return s(e,n,l);case"<":return a(e,n,l);case"<=":return c(e,n,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},9469:(e,t,n)=>{const r=n(9510),i=n(5692),{re:o,t:s}=n(9022);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},1868:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},5919:(e,t,n)=>{const r=n(3992);e.exports=(e,t)=>r(e,t,!0)},3992:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},1007:(e,t,n)=>{const r=n(5692),i=n(8565);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),o=n.prerelease.length||i.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return s+e;return a}}},8565:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>0===r(e,t,n)},2260:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)>0},6579:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)>=0},515:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},290:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)<0},5891:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)<=0},2611:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).major},6319:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).minor},3328:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>0!==r(e,t,n)},5692:(e,t,n)=>{const{MAX_LENGTH:r}=n(39),{re:i,t:o}=n(9022),s=n(9510),a=n(8716);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},7368:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).patch},7794:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9114:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(t,e,n)},3843:(e,t,n)=>{const r=n(1868);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},9845:(e,t,n)=>{const r=n(7374);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},8753:(e,t,n)=>{const r=n(1868);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},398:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},8873:(e,t,n)=>{const r=n(9022);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(39).SEMVER_SPEC_VERSION,SemVer:n(9510),compareIdentifiers:n(8822).compareIdentifiers,rcompareIdentifiers:n(8822).rcompareIdentifiers,parse:n(5692),valid:n(398),clean:n(6457),inc:n(515),diff:n(1007),major:n(2611),minor:n(6319),patch:n(7368),prerelease:n(7794),compare:n(3992),rcompare:n(9114),compareLoose:n(5919),compareBuild:n(1868),sort:n(8753),rsort:n(3843),gt:n(2260),lt:n(290),eq:n(8565),neq:n(3328),gte:n(6579),lte:n(5891),cmp:n(5452),coerce:n(9469),Comparator:n(3134),Range:n(7374),satisfies:n(9845),toComparators:n(8384),maxSatisfying:n(6369),minSatisfying:n(2663),minVersion:n(75),validRange:n(9178),outside:n(9434),gtr:n(8237),ltr:n(9860),intersects:n(8258),simplifyRange:n(3607),subset:n(2199)}},39:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},6830:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},8822:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},8716:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},9022:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(39),i=n(6830),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const l=(e,t,n)=>{const r=c++;i(r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),l("FULL",`^${s[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),l("LOOSE",`^${s[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),l("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),l("COERCERTL",s[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},8237:(e,t,n)=>{const r=n(9434);e.exports=(e,t,n)=>r(e,t,">",n)},8258:(e,t,n)=>{const r=n(7374);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},9860:(e,t,n)=>{const r=n(9434);e.exports=(e,t,n)=>r(e,t,"<",n)},6369:(e,t,n)=>{const r=n(9510),i=n(7374);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},2663:(e,t,n)=>{const r=n(9510),i=n(7374);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},75:(e,t,n)=>{const r=n(9510),i=n(7374),o=n(2260);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},9434:(e,t,n)=>{const r=n(9510),i=n(3134),{ANY:o}=i,s=n(7374),a=n(9845),c=n(2260),l=n(290),u=n(5891),d=n(6579);e.exports=(e,t,n,h)=>{let p,g,f,m,v;switch(e=new r(e,h),t=new s(t,h),n){case">":p=c,g=u,f=l,m=">",v=">=";break;case"<":p=l,g=d,f=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let s=null,a=null;if(r.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:f(e.semver,a.semver,h)&&(a=e)})),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&g(e,a.semver))return!1;if(a.operator===v&&f(e,a.semver))return!1}return!0}},3607:(e,t,n)=>{const r=n(9845),i=n(3992);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,n)));for(const e of c)r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const l=[];for(const[e,t]of o)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return u.length<d.length?u:t}},2199:(e,t,n)=>{const r=n(7374),{ANY:i}=n(3134),o=n(9845),s=n(3992),a=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i)return 1===t.length&&t[0].semver===i;const r=new Set;let a,u,d,h,p,g,f;for(const t of e)">"===t.operator||">="===t.operator?a=c(a,t,n):"<"===t.operator||"<="===t.operator?u=l(u,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&u){if(d=s(a.semver,u.semver,n),d>0)return null;if(0===d&&(">="!==a.operator||"<="!==u.operator))return null}for(const e of r){if(a&&!o(e,String(a),n))return null;if(u&&!o(e,String(u),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}for(const e of t){if(f=f||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,a)if(">"===e.operator||">="===e.operator){if(h=c(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!o(a.semver,String(e),n))return!1;if(u)if("<"===e.operator||"<="===e.operator){if(p=l(u,e,n),p===e&&p!==u)return!1}else if("<="===u.operator&&!o(u.semver,String(e),n))return!1;if(!e.operator&&(u||a)&&0!==d)return!1}return!(a&&g&&!u&&0!==d||u&&f&&!a&&0!==d)},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n)=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=a(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},8384:(e,t,n)=>{const r=n(7374);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9178:(e,t,n)=>{const r=n(7374);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},5748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const r=n(5285);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(8159);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=n(345);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(7770);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=n(4806);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=n(9248);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const l=n(6336);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const u=n(8094);t.RAL=u.default},7770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(8094),i=n(8472),o=n(345);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=r.default().timer.setTimeout(e.bind(t),0);return{dispose(){r.default().timer.clearTimeout(n)}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},6336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const r=n(8094),i=n(8472),o=n(5285),s=n(5164),a=n(345),c=n(7770);var l,u,d,h,p,g,f,m,v,y,C,R,w;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.type=new o.NotificationType("$/progress")}(u||(u={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class b extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,b.prototype)}}t.ConnectionError=b,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(y=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(l.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(C=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:C.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&C.is(t.sender)}}(R=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(R.is(t.cancellationStrategy)||v.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(w||(w={})),t.createMessageConnection=function(e,n,v,y){const C=void 0!==v?v:t.NullLogger;let T=0,S=0,_=0;const P="2.0";let D;const E=Object.create(null);let x;const k=Object.create(null),O=new Map;let F,q,N=new s.LinkedMap,I=Object.create(null),M=Object.create(null),A=h.Off,L=p.Text,j=w.New;const $=new a.Emitter,W=new a.Emitter,K=new a.Emitter,U=new a.Emitter,H=new a.Emitter,z=y&&y.cancellationStrategy?y.cancellationStrategy:R.Message;function B(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function G(e){}function V(){return j===w.Listening}function X(){return j===w.Closed}function J(){return j===w.Disposed}function Y(){j!==w.New&&j!==w.Listening||(j=w.Closed,W.fire(void 0))}function Z(){F||0===N.size||(F=r.default().timer.setImmediate((()=>{F=void 0,function(){if(0===N.size)return;const e=N.shift();try{o.isRequestMessage(e)?function(e){if(J())return;function t(t,r,i){const s={jsonrpc:P,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,r,i),n.write(s)}function r(t,r,i){const o={jsonrpc:P,id:e.id,error:t.toJson()};ee(o,r,i),n.write(o)}!function(e){if(A!==h.Off&&q)if(L===p.Text){let t;A===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),q.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=E[e.method];let a,c;s&&(a=s.type,c=s.handler);const l=Date.now();if(c||D){const s=String(e.id),u=z.receiver.createCancellationTokenSource(s);M[s]=u;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else D&&(d=D(e.method,e.params,u.token));const h=d;d?h.then?h.then((n=>{delete M[s],t(n,e.method,l)}),(t=>{delete M[s],t instanceof o.ResponseError?r(t,e.method,l):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(delete M[s],t(d,e.method,l)):(delete M[s],function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:P,id:e.id,result:t};ee(o,r,i),n.write(o)}(d,e.method,l))}catch(n){delete M[s],n instanceof o.ResponseError?t(n,e.method,l):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):o.isNotificationMessage(e)?function(e){if(J())return;let t,n;if(e.method===l.type.method)n=e=>{const t=e.id,n=M[String(t)];n&&n.cancel()};else{const r=k[e.method];r&&(n=r.handler,t=r.type)}if(n||x)try{!function(e){if(A!==h.Off&&q&&e.method!==f.type.method)if(L===p.Text){let t;A===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),q.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(