code-server
Version:
Run VS Code on a remote server.
1 lines • 275 kB
JavaScript
(()=>{var e={2775:(e,t,n)=>{(()=>{var e={46:e=>{"use strict";function t(){}function n(e,t){const r=n.spread(e,t),o=r.then((e=>e[0]));return o.cancel=r.cancel,o}!function(e){e.spread=function(e,n){let r=null;const o=new Promise(((i,s)=>{function a(){e.removeListener(n,c),e.removeListener("error",u),o.cancel=t}function c(...e){a(),i(e)}function u(e){a(),s(e)}r=a,e.on(n,c),e.on("error",u)}));if(!r)throw new TypeError("Could not get `cancel()` function");return o.cancel=r,o}}(n||(n={})),e.exports=n},54:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const o=n(614),i=r(n(374)),s=r(n(304)),a=i.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends o.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,o=null;const i=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${i}ms`);e.code="ETIMEOUT",u(e)},d=e=>{r||(null!==o&&(clearTimeout(o),o=null),u(e))},f=t=>{if(r)return;if(null!=o&&(clearTimeout(o),o=null),i=t,Boolean(i)&&"function"==typeof i.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var i;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof i&&i>0&&(o=setTimeout(l,i)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(f,d)}catch(e){Promise.reject(e).catch(d)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,o)=>{e.call(this,t,n,((e,t)=>{e?o(e):r(t)}))}))}}},370:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(631)),s=o(n(16)),a=o(n(835)),c=o(n(374)),u=o(n(46)),l=n(54),d=c.default("http-proxy-agent");class f extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,o=a.default.parse(e.path);let c;if(o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),null==o.port&&(t.port,1)&&(o.port=String(t.port)),"80"===o.port&&delete o.port,e.path=a.default.format(o),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=i.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield u.default(c,"connect"),c}))}}t.default=f},201:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(370));function o(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(n(631)),s=o(n(16)),a=o(n(835)),c=o(n(357)),u=o(n(374)),l=n(54),d=o(n(829)),f=u.default("https-proxy-agent:agent");class h extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let o;r?(f("Creating `tls.Socket`: %o",n),o=s.default.connect(n)):(f("Creating `net.Socket`: %o",n),o=i.default.connect(n));const a=Object.assign({},n.headers);let u=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:h,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(l+=`:${h}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const g=d.default(o);o.write(`${u}\r\n`);const{statusCode:y,buffered:v}=yield g;if(200===y){if(e.once("socket",p),t.secureEndpoint){const e=t.servername||t.host;if(!e)throw new Error('Could not determine "servername"');return f("Upgrading socket connection to TLS"),s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const b=new i.default.Socket;return b.readable=!0,e.once("socket",(e=>{f("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(v),e.push(null)})),b}))}}function p(e){e.resume()}t.default=h},18:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(146));function o(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(o||(o={})),e.exports=o},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(374)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const i=[];function s(){const n=e.read();n?function(e){i.push(e),r+=e.length;const n=Buffer.concat(i,r);if(-1===n.indexOf("\r\n\r\n"))return o("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];o("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){o("onclose had error %o",e)}function c(){o("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),o("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorStatusDescription=t.xhr=t.configure=void 0;var r=n(835),o=n(211),i=n(605),s=n(761),a=n(472),c=n(18),u=n(201);if(process.env.VSCODE_NLS_CONFIG){var l=process.env.VSCODE_NLS_CONFIG;a.config(JSON.parse(l))}var d=a.loadMessageBundle(),f=null,h=!0;function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){return Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}function m(e){var t;return new Promise((function(n,s){var a=r.parse(e.url),c={hostname:a.hostname,port:a.port?parseInt(a.port):"https:"===a.protocol?443:80,path:a.path,method:e.type||"GET",headers:e.headers,rejectUnauthorized:"boolean"!=typeof e.strictSSL||e.strictSSL};e.user&&e.password&&(c.auth=e.user+":"+e.password);var u=function(r){r.statusCode>=300&&r.statusCode<400&&e.followRedirects&&e.followRedirects>0&&r.headers.location?n(m(p({},e,{url:r.headers.location,followRedirects:e.followRedirects-1}))):n({req:t,res:r})};(t="https:"===a.protocol?o.request(c,u):i.request(c,u)).on("error",s),e.timeout&&t.setTimeout(e.timeout),e.data&&t.write(e.data),t.end()}))}t.configure=function(e,t){f=e,h=t},t.xhr=function(e){var n=function(e,t){void 0===t&&(t={});var n=r.parse(e),o=t.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(n);if(!o)return null;var i=r.parse(o);if(!/^https?:$/.test(i.protocol))return null;var s={host:i.hostname,port:Number(i.port),auth:i.auth,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL};return"http:"===n.protocol?u(s):c(s)}(e.url,{proxyUrl:f,strictSSL:h});return"number"!=typeof(e=p({agent:n,strictSSL:h},e)).followRedirects&&(e.followRedirects=5),m(e).then((function(n){return new Promise((function(r,o){var i=n.res,a=i,c=i.headers&&i.headers["content-encoding"],u=!1;if("gzip"===c){var l=s.createGunzip();i.pipe(l),a=l}else if("deflate"===c){var f=s.createInflate();i.pipe(f),a=f}var h=[];a.on("data",(function(e){return h.push(e)})),a.on("end",(function(){if(!u){if(u=!0,e.followRedirects>0&&(i.statusCode>=300&&i.statusCode<=303||307===i.statusCode)){var n=i.headers.location;if(n){var s={type:e.type,url:n,user:e.user,password:e.password,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data};return void t.xhr(s).then(r,o)}}var a=Buffer.concat(h),c={responseText:a.toString(),body:a,status:i.statusCode,headers:i.headers||{}};i.statusCode>=200&&i.statusCode<300||1223===i.statusCode?r(c):o(c)}})),a.on("error",(function(t){var n={responseText:d("error","Unable to access {0}. Error: {1}",e.url,t.message),body:Buffer.concat(h),status:500,headers:{}};u=!0,o(n)}))}))}),(function(t){var r;return r=n?d("error.cannot.connect.proxy","Unable to connect to {0} through a proxy . Error: {1}",e.url,t.message):d("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,t.message),Promise.reject({responseText:r,body:Buffer.concat([]),status:404,headers:{}})}))},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return d("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return d("status.401","Unauthorized. The server is refusing to respond.");case 403:return d("status.403","Forbidden. The server is refusing to respond.");case 404:return d("status.404","Not Found. The requested location could not be found.");case 405:return d("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return d("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return d("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return d("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return d("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return d("status.410","Gone. The requested page is no longer available.");case 411:return d("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return d("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return d("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return d("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return d("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return d("status.500","Internal Server Error.");case 501:return d("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return d("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return d("status.416","HTTP status code {0}",e)}}},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,o,i,s=n(926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],o=n[r],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return s.default().loadMessageBundle(e)},t.config=function(e){return s.default().config(e)}},926:(e,t)=>{"use strict";var n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var r=n(622),o=n(747),i=n(926),s=n(800),a=n(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function f(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(o.readFileSync(e,"utf8"))}function p(e){return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],r):f(n)?(console.warn("Message "+n+" didn't get externalized correctly."),s.format(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function m(e,t){return c[e]=t,t}function g(e){try{return function(e){var t=h(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var o in t){var i=t[o];n[o]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function y(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,i,s,a=r.join(u.cacheRoot,e.id+"-"+e.hash+".json"),c=!1,l=!1;try{return n=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var o=h(n).contents,i=h(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=o[e.outDir+"/"+a];if(l){for(var d=[],p=0;p<c.keys.length;p++){var m=c.keys[p],g=l[f(m)?m:m.key];void 0===g&&(g=c.messages[p]),d.push(g)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{o.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return g(t);var i=function(e){for(var t=u.language;t;){var n=r.join(e,"nls.bundle."+t+".json");if(o.existsSync(n))return n;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(n=r.join(e,"nls.bundle.json"),o.existsSync(n)))return n}(t);if(i)try{return h(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=g(t)}return n}function v(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!o.existsSync(t);){var i=r.dirname(n);if(i===n){t=void 0;break}n=i}return t}(e);if(n){var i=r.dirname(n),a=c[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(n,"utf8"));try{var d=y(l,i);a=m(i,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=m(i,null)}}catch(e){console.error("Failed to read header file",e),a=m(i,null)}if(a){var f=e.substr(i.length+1).replace(/\\/g,"/"),g=a.nlsBundle[f];return void 0===g?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):p(g)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var v=h(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var r=".nls."+n+".json";if(o.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(v)?p(v):s.isDefined(v.messages)&&s.isDefined(v.keys)?p(v.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function b(e){return e&&(f(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),s.setPseudo("pseudo"===u.locale),v}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},f(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];f(n)&&(t=n)}if(f(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),f(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),f(e._languagePackId)&&(u.languagePackId=e._languagePackId),f(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=h(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=r.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=v,t.config=b,i.default.install(Object.freeze({loadMessageBundle:v,config:b}))},374:(e,t)=>{function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n}},357:e=>{"use strict";e.exports=n(2357)},614:e=>{"use strict";e.exports=n(8614)},747:e=>{"use strict";e.exports=n(5747)},605:e=>{"use strict";e.exports=n(8605)},211:e=>{"use strict";e.exports=n(7211)},631:e=>{"use strict";e.exports=n(1631)},622:e=>{"use strict";e.exports=n(5622)},16:e=>{"use strict";e.exports=n(4016)},835:e=>{"use strict";e.exports=n(8835)},761:e=>{"use strict";e.exports=n(8761)}},r={},o=function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}(539),i=t;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()},7375:(e,t,n)=>{"use strict";function r(e,t){void 0===t&&(t=!1);var n=e.length,r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){for(var o=0,i=0;o<t||!n;){var s=e.charCodeAt(r);if(s>=48&&s<=57)i=16*i+s-48;else if(s>=65&&s<=70)i=16*i+s-65+10;else{if(!(s>=97&&s<=102))break;i=16*i+s-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",p=0,c=r,d=l,h=f,r>=n)return c=n,u=17;var t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){for(var t="",o=r;;){if(r>=n){t+=e.substring(o,r),p=2;break}var s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),++r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=m(4,!0);a>=0?t+=String.fromCharCode(a):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:var g=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(g,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;for(var v=n-1,b=!1;r<v;){var R=e.charCodeAt(r);if(42===R&&47===e.charCodeAt(r+1)){r+=2,b=!0;break}r++,i(R)&&(13===R&&10===e.charCodeAt(r)&&r++,l++,f=r)}return b||(r++,p=1),a=e.substring(g,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),++r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&s(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r)){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,p=0},getPosition:function(){return r},scan:t?function(){var e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:function(){return u},getTokenValue:function(){return a},getTokenOffset:function(){return c},getTokenLength:function(){return r-c},getTokenStartLine:function(){return d},getTokenStartCharacter:function(){return c-h},getTokenError:function(){return p}}}function o(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function i(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function a(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function c(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var u;n.r(t),n.d(t,{ClientCapabilities:()=>x,CodeAction:()=>k.CodeAction,CodeActionContext:()=>k.CodeActionContext,CodeActionKind:()=>k.CodeActionKind,Color:()=>k.Color,ColorInformation:()=>k.ColorInformation,ColorPresentation:()=>k.ColorPresentation,Command:()=>k.Command,CompletionItem:()=>k.CompletionItem,CompletionItemKind:()=>k.CompletionItemKind,CompletionItemTag:()=>k.CompletionItemTag,CompletionList:()=>k.CompletionList,Diagnostic:()=>k.Diagnostic,DiagnosticSeverity:()=>k.DiagnosticSeverity,DocumentHighlight:()=>k.DocumentHighlight,DocumentHighlightKind:()=>k.DocumentHighlightKind,DocumentLink:()=>k.DocumentLink,DocumentSymbol:()=>k.DocumentSymbol,ErrorCode:()=>S,FoldingRange:()=>k.FoldingRange,FoldingRangeKind:()=>k.FoldingRangeKind,Hover:()=>k.Hover,InsertTextFormat:()=>k.InsertTextFormat,Location:()=>k.Location,MarkedString:()=>k.MarkedString,MarkupContent:()=>k.MarkupContent,MarkupKind:()=>k.MarkupKind,Position:()=>k.Position,Range:()=>k.Range,SelectionRange:()=>k.SelectionRange,SymbolInformation:()=>k.SymbolInformation,SymbolKind:()=>k.SymbolKind,TextDocument:()=>T,TextDocumentEdit:()=>k.TextDocumentEdit,TextEdit:()=>k.TextEdit,VersionedTextDocumentIdentifier:()=>k.VersionedTextDocumentIdentifier,WorkspaceEdit:()=>k.WorkspaceEdit,getLanguageService:()=>Le}),function(e){e.DEFAULT={allowTrailingComma:!1}}(u||(u={}));var l=r,d=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=u.DEFAULT);var o=null,i=[],s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n){void 0===n&&(n=u.DEFAULT);var o=r(e,!1);function i(e){return e?function(){return e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function s(e){return e?function(t){return e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var a=i(t.onObjectBegin),c=s(t.onObjectProperty),l=i(t.onObjectEnd),d=i(t.onArrayBegin),f=i(t.onArrayEnd),h=s(t.onLiteralValue),p=s(t.onSeparator),m=i(t.onComment),g=s(t.onError),y=n&&n.disallowComments,v=n&&n.allowTrailingComma;function b(){for(;;){var e=o.scan();switch(o.getTokenError()){case 4:R(14);break;case 5:R(15);break;case 3:R(13);break;case 1:y||R(11);break;case 2:R(12);break;case 6:R(16)}switch(e){case 12:case 13:y?R(10):m();break;case 16:R(1);break;case 15:case 14:break;default:return e}}}function R(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),g(e),t.length+n.length>0)for(var r=o.getToken();17!==r;){if(-1!==t.indexOf(r)){b();break}if(-1!==n.indexOf(r))break;r=b()}}function T(e){var t=o.getTokenValue();return e?h(t):c(t),b(),!0}b(),17===o.getToken()?!!n.allowEmptyContent||R(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){d(),b();for(var t=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||R(4,[],[]),p(","),b(),4===o.getToken()&&v)break}else t&&R(6,[],[]);e()||R(4,[],[4,5]),t=!0}return f(),4!==o.getToken()?R(8,[4],[]):b(),!0}();case 1:return function(){a(),b();for(var t=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||R(4,[],[]),p(","),b(),2===o.getToken()&&v)break}else t&&R(6,[],[]);(10!==o.getToken()?(R(3,[],[2,5]),0):(T(!1),6===o.getToken()?(p(":"),b(),e()||R(4,[],[2,5])):R(5,[],[2,5]),1))||R(4,[],[2,5]),t=!0}return l(),2!==o.getToken()?R(7,[2],[]):b(),!0}();case 10:return T(!0);default:return function(){switch(o.getToken()){case 11:var e=o.getTokenValue(),t=Number(e);isNaN(t)&&(R(2),t=0),h(t);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return b(),!0}()}}()?17!==o.getToken()&&R(9,[],[]):R(4,[],[])}(e,{onObjectBegin:function(){var e={};a(e),s.push(i),i=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),i[0]},f=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var i=0;i<o.length&&o[i].offset<=n;i++){var s=e(o[i],n,r);if(s)return s}return t}},h=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},p=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var i=o[r],s=i.children[1];s&&(n[i.children[0].value]=e(s))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function m(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!m(e[n],t[n]))return!1}else{var o=[];for(r in e)o.push(r);o.sort();var i=[];for(r in t)i.push(r);if(i.sort(),!m(o,i))return!1;for(n=0;n<o.length;n++)if(!m(e[o[n]],t[o[n]]))return!1}return!0}function g(e){return"number"==typeof e}function y(e){return void 0!==e}function v(e){return"boolean"==typeof e}function b(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function R(e){var t="";(function(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}var T,S,x,k=n(1674),C=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(t,n){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e.isIncremental(i)){var s=_(i.range),a=this.offsetAt(s.start),c=this.offsetAt(s.end);this._content=this._content.substring(0,a)+i.text+this._content.substring(c,this._content.length);var u=Math.max(s.start.line,0),l=Math.max(s.end.line,0),d=this._lineOffsets,f=P(i.text,!1,a);if(l-u===f.length)for(var h=0,p=f.length;h<p;h++)d[h+u+1]=f[h];else f.length<1e4?d.splice.apply(d,[u+1,l-u].concat(f)):this._lineOffsets=d=d.slice(0,u+1).concat(f,d.slice(l+1));var m=i.text.length-(c-a);if(0!==m)for(h=u+1+f.length,p=d.length;h<p;h++)d[h]=d[h]+m}else{if(!e.isFull(i))throw new Error("Unknown change event received");this._content=i.text,this._lineOffsets=void 0}}this._version=n},e.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=P(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return{line:i,character:e-t[i]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},e}();function w(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);w(r,t),w(o,t);for(var i=0,s=0,a=0;i<r.length&&s<o.length;){var c=t(r[i],o[s]);e[a++]=c<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function P(e,t,n){void 0===n&&(n=0);for(var r=t?[n]:[],o=0;o<e.length;o++){var i=e.charCodeAt(o);13!==i&&10!==i||(13===i&&o+1<e.length&&10===e.charCodeAt(o+1)&&o++,r.push(n+o+1))}return r}function _(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function O(e){var t=_(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new C(e,t,n,r)},e.update=function(e,t,n){if(e instanceof C)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,o=[],i=0,s=w(t.map(O),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));i<s.length;i++){var a=s[i],c=e.offsetAt(a.range.start);if(c<r)throw new Error("Overlapping edit");c>r&&o.push(n.substring(r,c)),a.newText.length&&o.push(a.newText),r=e.offsetAt(a.range.end)}return o.push(n.substr(r)),o.join("")}}(T||(T={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"}(S||(S={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[k.MarkupKind.Markdown,k.MarkupKind.PlainText],commitCharactersSupport:!0}}}}}(x||(x={}));var D,E,q=n(8472),j=(D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),N=q.LV(),M={"color-hex":{errorMessage:N("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:N("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:N("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:N("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:N("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},A=function(){function e(e,t,n){void 0===n&&(n=0),this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),F=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return j(t,e),t}(A),I=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.type="boolean",o.value=n,o}return j(t,e),t}(A),L=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return j(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(A),W=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}return j(t,e),t}(A),$=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="string",o.value="",o}return j(t,e),t}(A),V=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.type="property",o.colonOffset=-1,o.keyNode=r,o}return j(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(A),U=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return j(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(A);function H(e){return v(e)?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(E||(E={}));var B=function(){function e(e,t){void 0===e&&(e=-1),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){Array.prototype.push.apply(this.schemas,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||X(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),z=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),K=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.merge(r)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,n=this.problems;t<n.length;t++){var r=n[t];r.code===S.EnumValueMismatch&&(r.message=N("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map((function(e){return JSON.stringify(e)})).join(", ")))}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++},e.prototype.compare=function(e){var t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},e}();function J(e){return p(e)}function G(e){return h(e)}function X(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var Z=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]),this.root=e,this.syntaxErrors=t,this.comments=n}return e.prototype.getNodeFromOffset=function(e,t){if(void 0===t&&(t=!1),this.root)return f(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(n){var r=e(n),o=n.children;if(Array.isArray(o))for(var i=0;i<o.length&&r;i++)r=t(o[i]);return r};t(this.root)}},e.prototype.validate=function(e,t,n){if(void 0===n&&(n=k.DiagnosticSeverity.Warning),this.root&&t){var r=new K;return Y(this.root,t,r,z.instance),r.problems.map((function(t){var r,o=k.Range.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return k.Diagnostic.create(o,t.message,null!==(r=t.severity)&&void 0!==r?r:n,t.code)}))}},e.prototype.getMatchingSchemas=function(e,t,n){void 0===t&&(t=-1);var r=new B(t,n);return this.root&&e&&Y(this.root,e,new K,r),r.schemas},e}();function Y(e,t,n,r){if(e&&r.include(e)){var o=e;switch(o.type){case"object":!function(e,t,n,r){for(var o=Object.create(null),i=[],s=0,a=e.properties;s<a.length;s++)o[U=(y=a[s]).keyNode.value]=y.valueNode,i.push(U);if(Array.isArray(t.required))for(var c=0,u=t.required;c<u.length;c++)if(!o[w=u[c]]){var l=e.parent&&"property"===e.parent.type&&e.parent.keyNode,d=l?{offset:l.offset,length:l.length}:{offset:e.offset,length:1};n.problems.push({location:d,message:N("MissingRequiredPropWarning",'Missing property "{0}".',w)})}var f=function(e){for(var t=i.indexOf(e);t>=0;)i.splice(t,1),t=i.indexOf(e)};if(t.properties)for(var h=0,p=Object.keys(t.properties);h<p.length;h++){f(w=p[h]);var m=t.properties[w];if(q=o[w])if(v(m))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{var y=q.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:t.errorMessage||N("DisallowedExtraPropWarning","Property {0} is not allowed.",w)})}else Y(q,m,O=new K,r),n.mergePropertyMatch(O)}if(t.patternProperties)for(var b=0,T=Object.keys(t.patternProperties);b<T.length;b++)for(var S=T[b],x=R(S),k=0,C=i.slice(0);k<C.length;k++){var w=C[k];(null==x?void 0:x.test(w))&&(f(w),(q=o[w])&&(v(m=t.patternProperties[S])?m?(n.propertiesMatches++,n.propertiesValueMatches++):(y=q.parent,n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:t.errorMessage||N("DisallowedExtraPropWarning","Property {0} is not allowed.",w)})):(Y(q,m,O=new K,r),n.mergePropertyMatch(O))))}if("object"==typeof t.additionalProperties){for(var P=0,_=i;P<_.length;P++)if(q=o[w=_[P]]){var O=new K;Y(q,t.additionalProperties,O,r),n.mergePropertyMatch(O)}}else if(!1===t.additionalProperties&&i.length>0)for(var D=0,E=i;D<E.length;D++){var q;(q=o[w=E[D]])&&(y=q.parent,n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},message:t.errorMessage||N("DisallowedExtraPropWarning","Property {0} is not allowed.",w)}))}if(g(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),g(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependencies)for(var j=0,M=Object.keys(t.dependencies);j<M.length;j++)if(o[U=M[j]]){var A=t.dependencies[U];if(Array.isArray(A))for(var F=0,I=A;F<I.length;F++){var L=I[F];o[L]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:N("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",L,U)})}else(m=H(A))&&(Y(e,m,O=new K,r),n.mergePropertyMatch(O))}var W=H(t.propertyNames);if(W)for(var $=0,V=e.properties;$<V.length;$++){var U;(U=V[$].keyNode)&&Y(U,W,n,z.instance)}}(o,t,n,r);break;case"array":!function(e,t,n,r){if(Array.isArray(t.items)){for(var o=t.items,i=0;i<o.length;i++){var s=H(o[i]),a=new K;(f=e.items[i])?(Y(f,s,a,r),n.mergePropertyMatch(a)):e.items.length>=o.length&&n.propertiesValueMatches++}if(e.items.length>o.length)if("object"==typeof t.additionalItems)for(var c=o.length;c<e.items.length;c++)a=new K,Y(e.items[c],t.additionalItems,a,r),n.mergePropertyMatch(a);else!1===t.additionalItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",o.length)})}else{var u=H(t.items);if(u)for(var l=0,d=e.items;l<d.length;l++){var f;Y(f=d[l],u,a=new K,r),n.mergePropertyMatch(a)}}var h=H(t.contains);if(h&&(e.items.some((function(e){var t=new K;return Y(e,h,t,z.instance),!t.hasProblems()}))||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||N("requiredItemMissingWarning","Array does not contain required item.")})),g(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("minItemsWarning","Array has too few items. Expected {0} or more.",t.minItems)}),g(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){var p=J(e);p.some((function(e,t){return t!==p.lastIndexOf(e)}))&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("uniqueItemsWarning","Array has duplicate items.")})}}(o,t,n,r);break;case"string":!function(e,t,n,r){if(g(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("minLengthWarning","String is shorter than the minimum length of {0}.",t.minLength)}),g(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:N("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)}),"string"==typeof t.pattern){var o=R(t.pattern);(null==o?void 0:o.test(e.value))||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||N("patternWarning",'String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":var i=void 0;if(e.value){var s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);s?s[2]||"uri"!==t.format||(i=N("uriSchemeMissing","URI with a scheme is expected.")):i=N("uriMissing","URI is expected.")}else i=N("uriEmpty","URI expected.");i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||N("uriFormatWarning","String is not a URI: {0}",i)});break;case"color-hex":case"date-time":case"date":case"time":case"email":var a=M[t.format];e.value&&a.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||a.errorMessage})}}(o,t,n);break;case"number":!function(e,t,n,r){var o=e.value;function i(e){var t,n=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return n&&{value:Number(n[1]+(n[2]||"")),multiplier:((null===(t=n[2])||void 0===t?void 0:t.length)||0)-(parseInt(n[3])||0)}}if(g(t.multipleOf)){var s=-1;if(Number.isInteger(t.multipleOf))s=o%t.multipleOf;else{var a=i(t.multipleOf),c=i(o);if(a&&c){var u=Math.pow(10,Math.abs(c.multiplier-a.multiplier));c.multiplier<a.multiplier?c.value*=u:a.value*=u,s=c.value%a.value}}0!==s&&n.problems.push({location:{offset:e.offset,length:e.length},message: