You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
140 KiB
24 lines
140 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3],{40003:function(oi,St,$e){$e.r(St),$e.d(St,{setupMode:function(){return ni}});var U=$e(61174),Mr=2*60*1e3,Fr=function(){function e(t){var i=this;this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return i._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return i._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){if(this._worker){var t=Date.now()-this._lastUsedTime;t>Mr&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=U.j6.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var t=this,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];var n;return this._getClient().then(function(a){n=a}).then(function(a){return t._worker.withSyncedResources(i)}).then(function(a){return n})},e}();function Xe(e,t){t===void 0&&(t=!1);var i=e.length,r=0,n="",a=0,u=16,s=0,o=0,c=0,f=0,l=0;function h(b,E){for(var O=0,N=0;O<b||!E;){var T=e.charCodeAt(r);if(T>=48&&T<=57)N=N*16+T-48;else if(T>=65&&T<=70)N=N*16+T-65+10;else if(T>=97&&T<=102)N=N*16+T-97+10;else break;r++,O++}return O<b&&(N=-1),N}function g(b){r=b,n="",a=0,u=16,l=0}function d(){var b=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Ce(e.charCodeAt(r)))for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;else return l=3,e.substring(b,r);var E=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Ce(e.charCodeAt(r))){for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;E=r}else l=3;return e.substring(b,E)}function v(){for(var b="",E=r;;){if(r>=i){b+=e.substring(E,r),l=2;break}var O=e.charCodeAt(r);if(O===34){b+=e.substring(E,r),r++;break}if(O===92){if(b+=e.substring(E,r),r++,r>=i){l=2;break}var N=e.charCodeAt(r++);switch(N){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=`
|
|
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:var T=h(4,!0);T>=0?b+=String.fromCharCode(T):l=4;break;default:l=5}E=r;continue}if(O>=0&&O<=31)if(Te(O)){b+=e.substring(E,r),l=2;break}else l=6;r++}return b}function p(){if(n="",l=0,a=r,o=s,f=c,r>=i)return a=i,u=17;var b=e.charCodeAt(r);if(Qe(b)){do r++,n+=String.fromCharCode(b),b=e.charCodeAt(r);while(Qe(b));return u=15}if(Te(b))return r++,n+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,n+=`
|
|
`),s++,c=r,u=14;switch(b){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++,n=v(),u=10;case 47:var E=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<i&&!Te(e.charCodeAt(r));)r++;return n=e.substring(E,r),u=12}if(e.charCodeAt(r+1)===42){r+=2;for(var O=i-1,N=!1;r<O;){var T=e.charCodeAt(r);if(T===42&&e.charCodeAt(r+1)===47){r+=2,N=!0;break}r++,Te(T)&&(T===13&&e.charCodeAt(r)===10&&r++,s++,c=r)}return N||(r++,l=1),n=e.substring(E,r),u=13}return n+=String.fromCharCode(b),r++,u=16;case 45:if(n+=String.fromCharCode(b),r++,r===i||!Ce(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 n+=d(),u=11;default:for(;r<i&&S(b);)r++,b=e.charCodeAt(r);if(a!==r){switch(n=e.substring(a,r),n){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return n+=String.fromCharCode(b),r++,u=16}}function S(b){if(Qe(b)||Te(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function m(){var b;do b=p();while(b>=12&&b<=15);return b}return{setPosition:g,getPosition:function(){return r},scan:t?m:p,getToken:function(){return u},getTokenValue:function(){return n},getTokenOffset:function(){return a},getTokenLength:function(){return r-a},getTokenStartLine:function(){return o},getTokenStartCharacter:function(){return a-f},getTokenError:function(){return l}}}function Qe(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Te(e){return e===10||e===13||e===8232||e===8233}function Ce(e){return e>=48&&e<=57}var xe;(function(e){e.DEFAULT={allowTrailingComma:!1}})(xe||(xe={}));function Vr(e,t){var i=[],r=new Object,n=void 0,a={value:{},offset:0,length:0,type:"object",parent:void 0},u=!1;function s(o,c,f,l){a.value=o,a.offset=c,a.length=f,a.type=l,a.colonOffset=void 0,n=a}try{De(e,{onObjectBegin:function(o,c){if(t<=o)throw r;n=void 0,u=t>o,i.push("")},onObjectProperty:function(o,c,f){if(t<c||(s(o,c,f,"property"),i[i.length-1]=o,t<=c+f))throw r},onObjectEnd:function(o,c){if(t<=o)throw r;n=void 0,i.pop()},onArrayBegin:function(o,c){if(t<=o)throw r;n=void 0,i.push(0)},onArrayEnd:function(o,c){if(t<=o)throw r;n=void 0,i.pop()},onLiteralValue:function(o,c,f){if(t<c||(s(o,c,f,wt(o)),t<=c+f))throw r},onSeparator:function(o,c,f){if(t<=c)throw r;if(o===":"&&n&&n.type==="property")n.colonOffset=c,u=!1,n=void 0;else if(o===","){var l=i[i.length-1];typeof l=="number"?i[i.length-1]=l+1:(u=!0,i[i.length-1]=""),n=void 0}}})}catch(o){if(o!==r)throw o}return{path:i,previousNode:n,isAtPropertyKey:u,matches:function(o){for(var c=0,f=0;c<o.length&&f<i.length;f++)if(o[c]===i[f]||o[c]==="*")c++;else if(o[c]!=="**")return!1;return c===o.length}}}function Lr(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=xe.DEFAULT);var r=null,n=[],a=[];function u(o){Array.isArray(n)?n.push(o):r!==null&&(n[r]=o)}var s={onObjectBegin:function(){var o={};u(o),a.push(n),n=o,r=null},onObjectProperty:function(o){r=o},onObjectEnd:function(){n=a.pop()},onArrayBegin:function(){var o=[];u(o),a.push(n),n=o,r=null},onArrayEnd:function(){n=a.pop()},onLiteralValue:u,onError:function(o,c,f){t.push({error:o,offset:c,length:f})}};return De(e,s,i),n[0]}function _r(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=xe.DEFAULT);var r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function n(o){r.type==="property"&&(r.length=o-r.offset,r=r.parent)}function a(o){return r.children.push(o),o}var u={onObjectBegin:function(o){r=a({type:"object",offset:o,length:-1,parent:r,children:[]})},onObjectProperty:function(o,c,f){r=a({type:"property",offset:c,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:o,offset:c,length:f,parent:r})},onObjectEnd:function(o,c){n(o+c),r.length=o+c-r.offset,r=r.parent,n(o+c)},onArrayBegin:function(o,c){r=a({type:"array",offset:o,length:-1,parent:r,children:[]})},onArrayEnd:function(o,c){r.length=o+c-r.offset,r=r.parent,n(o+c)},onLiteralValue:function(o,c,f){a({type:wt(o),offset:c,length:f,parent:r,value:o}),n(c+f)},onSeparator:function(o,c,f){r.type==="property"&&(o===":"?r.colonOffset=c:o===","&&n(c))},onError:function(o,c,f){t.push({error:o,offset:c,length:f})}};De(e,u,i);var s=r.children[0];return s&&delete s.parent,s}function $r(e,t){if(e){for(var i=e,r=0,n=t;r<n.length;r++){var a=n[r];if(typeof a=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var u=!1,s=0,o=i.children;s<o.length;s++){var c=o[s];if(Array.isArray(c.children)&&c.children[0].value===a){i=c.children[1],u=!0;break}}if(!u)return}else{var f=a;if(i.type!=="array"||f<0||!Array.isArray(i.children)||f>=i.children.length)return;i=i.children[f]}}return i}}function Ct(e){if(!e.parent||!e.parent.children)return[];var t=Ct(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;t.push(i)}else if(e.parent.type==="array"){var r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function Ye(e){switch(e.type){case"array":return e.children.map(Ye);case"object":for(var t=Object.create(null),i=0,r=e.children;i<r.length;i++){var n=r[i],a=n.children[1];a&&(t[n.children[0].value]=Ye(a))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Dr(e,t,i){return i===void 0&&(i=!1),t>=e.offset&&t<e.offset+e.length||i&&t===e.offset+e.length}function At(e,t,i){if(i===void 0&&(i=!1),Dr(e,t,i)){var r=e.children;if(Array.isArray(r))for(var n=0;n<r.length&&r[n].offset<=t;n++){var a=At(r[n],t,i);if(a)return a}return e}}function De(e,t,i){i===void 0&&(i=xe.DEFAULT);var r=Xe(e,!1);function n(k){return k?function(){return k(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function a(k){return k?function(w){return k(w,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var u=n(t.onObjectBegin),s=a(t.onObjectProperty),o=n(t.onObjectEnd),c=n(t.onArrayBegin),f=n(t.onArrayEnd),l=a(t.onLiteralValue),h=a(t.onSeparator),g=n(t.onComment),d=a(t.onError),v=i&&i.disallowComments,p=i&&i.allowTrailingComma;function S(){for(;;){var k=r.scan();switch(r.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:v||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(k){case 12:case 13:v?m(10):g();break;case 16:m(1);break;case 15:case 14:break;default:return k}}}function m(k,w,P){if(w===void 0&&(w=[]),P===void 0&&(P=[]),d(k),w.length+P.length>0)for(var M=r.getToken();M!==17;){if(w.indexOf(M)!==-1){S();break}else if(P.indexOf(M)!==-1)break;M=S()}}function b(k){var w=r.getTokenValue();return k?l(w):s(w),S(),!0}function E(){switch(r.getToken()){case 11:var k=r.getTokenValue(),w=Number(k);isNaN(w)&&(m(2),w=0),l(w);break;case 7:l(null);break;case 8:l(!0);break;case 9:l(!1);break;default:return!1}return S(),!0}function O(){return r.getToken()!==10?(m(3,[],[2,5]),!1):(b(!1),r.getToken()===6?(h(":"),S(),I()||m(4,[],[2,5])):m(5,[],[2,5]),!0)}function N(){u(),S();for(var k=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(k||m(4,[],[]),h(","),S(),r.getToken()===2&&p)break}else k&&m(6,[],[]);O()||m(4,[],[2,5]),k=!0}return o(),r.getToken()!==2?m(7,[2],[]):S(),!0}function T(){c(),S();for(var k=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||m(4,[],[]),h(","),S(),r.getToken()===4&&p)break}else k&&m(6,[],[]);I()||m(4,[],[4,5]),k=!0}return f(),r.getToken()!==4?m(8,[4],[]):S(),!0}function I(){switch(r.getToken()){case 3:return T();case 1:return N();case 10:return b(!0);default:return E()}}return S(),r.getToken()===17?i.allowEmptyContent?!0:(m(4,[],[]),!1):I()?(r.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}function Rr(e,t){var i=Xe(e),r=[],n,a=0,u;do switch(u=i.getPosition(),n=i.scan(),n){case 12:case 13:case 17:a!==u&&r.push(e.substring(a,u)),t!==void 0&&r.push(i.getTokenValue().replace(/[^\r\n]/g,t)),a=i.getPosition();break}while(n!==17);return r.join("")}function wt(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function si(e,t,i){return Ur(e,t,void 0,i)}function Ur(e,t,i,r){for(var n,a=t.slice(),u=[],s=parseTree(e,u),o=void 0,c=void 0;a.length>0&&(c=a.pop(),o=findNodeAtLocation(s,a),o===void 0&&i!==void 0);)typeof c=="string"?i=(n={},n[c]=i,n):i=[i];if(o)if(o.type==="object"&&typeof c=="string"&&Array.isArray(o.children)){var f=findNodeAtLocation(o,[c]);if(f!==void 0)if(i===void 0){if(!f.parent)throw new Error("Malformed AST");var l=o.children.indexOf(f.parent),h=void 0,g=f.parent.offset+f.parent.length;if(l>0){var d=o.children[l-1];h=d.offset+d.length}else if(h=o.offset+1,o.children.length>1){var v=o.children[1];g=v.offset}return me(e,{offset:h,length:g-h,content:""},r)}else return me(e,{offset:f.offset,length:f.length,content:JSON.stringify(i)},r);else{if(i===void 0)return[];var p=JSON.stringify(c)+": "+JSON.stringify(i),S=r.getInsertionIndex?r.getInsertionIndex(o.children.map(function(k){return k.children[0].value})):o.children.length,m=void 0;if(S>0){var d=o.children[S-1];m={offset:d.offset+d.length,length:0,content:","+p}}else o.children.length===0?m={offset:o.offset+1,length:0,content:p}:m={offset:o.offset+1,length:0,content:p+","};return me(e,m,r)}}else if(o.type==="array"&&typeof c=="number"&&Array.isArray(o.children)){var b=c;if(b===-1){var p=""+JSON.stringify(i),m=void 0;if(o.children.length===0)m={offset:o.offset+1,length:0,content:p};else{var d=o.children[o.children.length-1];m={offset:d.offset+d.length,length:0,content:","+p}}return me(e,m,r)}else if(i===void 0&&o.children.length>=0){var E=c,O=o.children[E],m=void 0;if(o.children.length===1)m={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===E){var d=o.children[E-1],N=d.offset+d.length,T=o.offset+o.length;m={offset:N,length:T-2-N,content:""}}else m={offset:O.offset,length:o.children[E+1].offset-O.offset,content:""};return me(e,m,r)}else if(i!==void 0){var m=void 0,p=""+JSON.stringify(i);if(!r.isArrayInsertion&&o.children.length>c){var I=o.children[c];m={offset:I.offset,length:I.length,content:p}}else if(o.children.length===0||c===0)m={offset:o.offset+1,length:0,content:o.children.length===0?p:p+","};else{var S=c>o.children.length?o.children.length:c,d=o.children[S-1];m={offset:d.offset+d.length,length:0,content:","+p}}return me(e,m,r)}else throw new Error("Can not "+(i===void 0?"remove":r.isArrayInsertion?"insert":"modify")+" Array index "+b+" as length is not sufficient")}else throw new Error("Can not add "+(typeof c!="number"?"index":"property")+" to parent of type "+o.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return me(e,{offset:s?s.offset:0,length:s?s.length:0,content:JSON.stringify(i)},r)}}function me(e,t,i){if(!i.formattingOptions)return[t];var r=Tt(e,t),n=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;n>0&&!isEOL(r,n-1);)n--;for(;a<r.length&&!isEOL(r,a);)a++}for(var u=format(r,{offset:n,length:a-n},i.formattingOptions),s=u.length-1;s>=0;s--){var o=u[s];r=Tt(r,o),n=Math.min(n,o.offset),a=Math.max(a,o.offset+o.length),a+=o.content.length-o.length}var c=e.length-(r.length-a)-n;return[{offset:n,length:c,content:r.substring(n,a)}]}function Tt(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function ui(e,t){return`\r
|
|
`.indexOf(e.charAt(t))!==-1}var Re=Xe,fi=Vr,Wr=Lr,ci=_r,li=$r,qr=At,Jr=Ct,Br=Ye,hi=De,di=Rr;function gi(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function pi(e,t,i){return formatter.format(e,t,i)}function vi(e,t,i,r){return edit.setProperty(e,t,i,r)}function mi(e,t){for(var i=t.length-1;i>=0;i--)e=edit.applyEdit(e,t[i]);return e}function Ee(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var i,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!Ee(e[i],t[i]))return!1}else{var n=[];for(r in e)n.push(r);n.sort();var a=[];for(r in t)a.push(r);if(a.sort(),!Ee(n,a))return!1;for(i=0;i<n.length;i++)if(!Ee(e[n[i]],t[n[i]]))return!1}return!0}function re(e){return typeof e=="number"}function ue(e){return typeof e!="undefined"}function ne(e){return typeof e=="boolean"}function Hr(e){return typeof e=="string"}function xt(e,t){if(e.length<t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0}function Oe(e,t){var i=e.length-t.length;return i>0?e.lastIndexOf(t)===i:i===0?e===t:!1}function yi(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function bi(e,t){for(var i="";t>0;)(t&1)===1&&(i+=e),e+=e,t=t>>>1;return i}function Ue(e){return xt(e,"(?i)")?new RegExp(e.substring(4),"iu"):new RegExp(e,"u")}var Et;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Et||(Et={}));var We;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(We||(We={}));var ie;(function(e){function t(r,n){return r===Number.MAX_VALUE&&(r=We.MAX_VALUE),n===Number.MAX_VALUE&&(n=We.MAX_VALUE),{line:r,character:n}}e.create=t;function i(r){var n=r;return y.objectLiteral(n)&&y.uinteger(n.line)&&y.uinteger(n.character)}e.is=i})(ie||(ie={}));var H;(function(e){function t(r,n,a,u){if(y.uinteger(r)&&y.uinteger(n)&&y.uinteger(a)&&y.uinteger(u))return{start:ie.create(r,n),end:ie.create(a,u)};if(ie.is(r)&&ie.is(n))return{start:r,end:n};throw new Error("Range#create called with invalid arguments["+r+", "+n+", "+a+", "+u+"]")}e.create=t;function i(r){var n=r;return y.objectLiteral(n)&&ie.is(n.start)&&ie.is(n.end)}e.is=i})(H||(H={}));var je;(function(e){function t(r,n){return{uri:r,range:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.range)&&(y.string(n.uri)||y.undefined(n.uri))}e.is=i})(je||(je={}));var Ot;(function(e){function t(r,n,a,u){return{targetUri:r,targetRange:n,targetSelectionRange:a,originSelectionRange:u}}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.targetRange)&&y.string(n.targetUri)&&(H.is(n.targetSelectionRange)||y.undefined(n.targetSelectionRange))&&(H.is(n.originSelectionRange)||y.undefined(n.originSelectionRange))}e.is=i})(Ot||(Ot={}));var et;(function(e){function t(r,n,a,u){return{red:r,green:n,blue:a,alpha:u}}e.create=t;function i(r){var n=r;return y.numberRange(n.red,0,1)&&y.numberRange(n.green,0,1)&&y.numberRange(n.blue,0,1)&&y.numberRange(n.alpha,0,1)}e.is=i})(et||(et={}));var jt;(function(e){function t(r,n){return{range:r,color:n}}e.create=t;function i(r){var n=r;return H.is(n.range)&&et.is(n.color)}e.is=i})(jt||(jt={}));var It;(function(e){function t(r,n,a){return{label:r,textEdit:n,additionalTextEdits:a}}e.create=t;function i(r){var n=r;return y.string(n.label)&&(y.undefined(n.textEdit)||ae.is(n))&&(y.undefined(n.additionalTextEdits)||y.typedArray(n.additionalTextEdits,ae.is))}e.is=i})(It||(It={}));var Ie;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ie||(Ie={}));var Nt;(function(e){function t(r,n,a,u,s){var o={startLine:r,endLine:n};return y.defined(a)&&(o.startCharacter=a),y.defined(u)&&(o.endCharacter=u),y.defined(s)&&(o.kind=s),o}e.create=t;function i(r){var n=r;return y.uinteger(n.startLine)&&y.uinteger(n.startLine)&&(y.undefined(n.startCharacter)||y.uinteger(n.startCharacter))&&(y.undefined(n.endCharacter)||y.uinteger(n.endCharacter))&&(y.undefined(n.kind)||y.string(n.kind))}e.is=i})(Nt||(Nt={}));var tt;(function(e){function t(r,n){return{location:r,message:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&je.is(n.location)&&y.string(n.message)}e.is=i})(tt||(tt={}));var Q;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Q||(Q={}));var Pt;(function(e){e.Unnecessary=1,e.Deprecated=2})(Pt||(Pt={}));var Mt;(function(e){function t(i){var r=i;return r!=null&&y.string(r.href)}e.is=t})(Mt||(Mt={}));var ce;(function(e){function t(r,n,a,u,s,o){var c={range:r,message:n};return y.defined(a)&&(c.severity=a),y.defined(u)&&(c.code=u),y.defined(s)&&(c.source=s),y.defined(o)&&(c.relatedInformation=o),c}e.create=t;function i(r){var n,a=r;return y.defined(a)&&H.is(a.range)&&y.string(a.message)&&(y.number(a.severity)||y.undefined(a.severity))&&(y.integer(a.code)||y.string(a.code)||y.undefined(a.code))&&(y.undefined(a.codeDescription)||y.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(y.string(a.source)||y.undefined(a.source))&&(y.undefined(a.relatedInformation)||y.typedArray(a.relatedInformation,tt.is))}e.is=i})(ce||(ce={}));var Ne;(function(e){function t(r,n){for(var a=[],u=2;u<arguments.length;u++)a[u-2]=arguments[u];var s={title:r,command:n};return y.defined(a)&&a.length>0&&(s.arguments=a),s}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.title)&&y.string(n.command)}e.is=i})(Ne||(Ne={}));var ae;(function(e){function t(a,u){return{range:a,newText:u}}e.replace=t;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function n(a){var u=a;return y.objectLiteral(u)&&y.string(u.newText)&&H.is(u.range)}e.is=n})(ae||(ae={}));var Ae;(function(e){function t(r,n,a){var u={label:r};return n!==void 0&&(u.needsConfirmation=n),a!==void 0&&(u.description=a),u}e.create=t;function i(r){var n=r;return n!==void 0&&y.objectLiteral(n)&&y.string(n.label)&&(y.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(y.string(n.description)||n.description===void 0)}e.is=i})(Ae||(Ae={}));var X;(function(e){function t(i){var r=i;return typeof r=="string"}e.is=t})(X||(X={}));var le;(function(e){function t(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=t;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function n(a){var u=a;return ae.is(u)&&(Ae.is(u.annotationId)||X.is(u.annotationId))}e.is=n})(le||(le={}));var qe;(function(e){function t(r,n){return{textDocument:r,edits:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&Be.is(n.textDocument)&&Array.isArray(n.edits)}e.is=i})(qe||(qe={}));var Pe;(function(e){function t(r,n,a){var u={kind:"create",uri:r};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(u.options=n),a!==void 0&&(u.annotationId=a),u}e.create=t;function i(r){var n=r;return n&&n.kind==="create"&&y.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||y.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||y.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Pe||(Pe={}));var Me;(function(e){function t(r,n,a,u){var s={kind:"rename",oldUri:r,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=t;function i(r){var n=r;return n&&n.kind==="rename"&&y.string(n.oldUri)&&y.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||y.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||y.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Me||(Me={}));var Fe;(function(e){function t(r,n,a){var u={kind:"delete",uri:r};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(u.options=n),a!==void 0&&(u.annotationId=a),u}e.create=t;function i(r){var n=r;return n&&n.kind==="delete"&&y.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||y.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||y.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Fe||(Fe={}));var rt;(function(e){function t(i){var r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(n){return y.string(n.kind)?Pe.is(n)||Me.is(n)||Fe.is(n):qe.is(n)}))}e.is=t})(rt||(rt={}));var Je=function(){function e(t,i){this.edits=t,this.changeAnnotations=i}return e.prototype.insert=function(t,i,r){var n,a;if(r===void 0?n=ae.insert(t,i):X.is(r)?(a=r,n=le.insert(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=le.insert(t,i,a)),this.edits.push(n),a!==void 0)return a},e.prototype.replace=function(t,i,r){var n,a;if(r===void 0?n=ae.replace(t,i):X.is(r)?(a=r,n=le.replace(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=le.replace(t,i,a)),this.edits.push(n),a!==void 0)return a},e.prototype.delete=function(t,i){var r,n;if(i===void 0?r=ae.del(t):X.is(i)?(n=i,r=le.del(t,i)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(i),r=le.del(t,n)),this.edits.push(r),n!==void 0)return n},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Ft=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,i){var r;if(X.is(t)?r=t:(r=this.nextId(),i=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=i,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ki=function(){function e(t){var i=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Ft(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(qe.is(r)){var n=new Je(r.edits,i._changeAnnotations);i._textEditChanges[r.textDocument.uri]=n}})):t.changes&&Object.keys(t.changes).forEach(function(r){var n=new Je(t.changes[r]);i._textEditChanges[r]=n})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Be.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:t.uri,version:t.version},r=this._textEditChanges[i.uri];if(!r){var n=[],a={textDocument:i,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Je(n,this._changeAnnotations),this._textEditChanges[i.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var n=[];this._workspaceEdit.changes[t]=n,r=new Je(n),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ft,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ae.is(i)||X.is(i)?n=i:r=i;var a,u;if(n===void 0?a=Pe.create(t,r):(u=X.is(n)?n:this._changeAnnotations.manage(n),a=Pe.create(t,r,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},e.prototype.renameFile=function(t,i,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Ae.is(r)||X.is(r)?a=r:n=r;var u,s;if(a===void 0?u=Me.create(t,i,n):(s=X.is(a)?a:this._changeAnnotations.manage(a),u=Me.create(t,i,n,s)),this._workspaceEdit.documentChanges.push(u),s!==void 0)return s},e.prototype.deleteFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ae.is(i)||X.is(i)?n=i:r=i;var a,u;if(n===void 0?a=Fe.create(t,r):(u=X.is(n)?n:this._changeAnnotations.manage(n),a=Fe.create(t,r,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},e}(),Vt;(function(e){function t(r){return{uri:r}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)}e.is=i})(Vt||(Vt={}));var Lt;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&y.integer(n.version)}e.is=i})(Lt||(Lt={}));var Be;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&(n.version===null||y.integer(n.version))}e.is=i})(Be||(Be={}));var _t;(function(e){function t(r,n,a,u){return{uri:r,languageId:n,version:a,text:u}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&y.string(n.languageId)&&y.integer(n.version)&&y.string(n.text)}e.is=i})(_t||(_t={}));var fe;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(fe||(fe={})),function(e){function t(i){var r=i;return r===e.PlainText||r===e.Markdown}e.is=t}(fe||(fe={}));var nt;(function(e){function t(i){var r=i;return y.objectLiteral(i)&&fe.is(r.kind)&&y.string(r.value)}e.is=t})(nt||(nt={}));var W;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(W||(W={}));var z;(function(e){e.PlainText=1,e.Snippet=2})(z||(z={}));var $t;(function(e){e.Deprecated=1})($t||($t={}));var Dt;(function(e){function t(r,n,a){return{newText:r,insert:n,replace:a}}e.create=t;function i(r){var n=r;return n&&y.string(n.newText)&&H.is(n.insert)&&H.is(n.replace)}e.is=i})(Dt||(Dt={}));var Rt;(function(e){e.asIs=1,e.adjustIndentation=2})(Rt||(Rt={}));var it;(function(e){function t(i){return{label:i}}e.create=t})(it||(it={}));var Ut;(function(e){function t(i,r){return{items:i||[],isIncomplete:!!r}}e.create=t})(Ut||(Ut={}));var He;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function i(r){var n=r;return y.string(n)||y.objectLiteral(n)&&y.string(n.language)&&y.string(n.value)}e.is=i})(He||(He={}));var Wt;(function(e){function t(i){var r=i;return!!r&&y.objectLiteral(r)&&(nt.is(r.contents)||He.is(r.contents)||y.typedArray(r.contents,He.is))&&(i.range===void 0||H.is(i.range))}e.is=t})(Wt||(Wt={}));var qt;(function(e){function t(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=t})(qt||(qt={}));var Jt;(function(e){function t(i,r){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var u={label:i};return y.defined(r)&&(u.documentation=r),y.defined(n)?u.parameters=n:u.parameters=[],u}e.create=t})(Jt||(Jt={}));var Bt;(function(e){e.Text=1,e.Read=2,e.Write=3})(Bt||(Bt={}));var Ht;(function(e){function t(i,r){var n={range:i};return y.number(r)&&(n.kind=r),n}e.create=t})(Ht||(Ht={}));var q;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(q||(q={}));var zt;(function(e){e.Deprecated=1})(zt||(zt={}));var Kt;(function(e){function t(i,r,n,a,u){var s={name:i,kind:r,location:{uri:a,range:n}};return u&&(s.containerName=u),s}e.create=t})(Kt||(Kt={}));var Gt;(function(e){function t(r,n,a,u,s,o){var c={name:r,detail:n,kind:a,range:u,selectionRange:s};return o!==void 0&&(c.children=o),c}e.create=t;function i(r){var n=r;return n&&y.string(n.name)&&y.number(n.kind)&&H.is(n.range)&&H.is(n.selectionRange)&&(n.detail===void 0||y.string(n.detail))&&(n.deprecated===void 0||y.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}e.is=i})(Gt||(Gt={}));var Zt;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zt||(Zt={}));var Xt;(function(e){function t(r,n){var a={diagnostics:r};return n!=null&&(a.only=n),a}e.create=t;function i(r){var n=r;return y.defined(n)&&y.typedArray(n.diagnostics,ce.is)&&(n.only===void 0||y.typedArray(n.only,y.string))}e.is=i})(Xt||(Xt={}));var Qt;(function(e){function t(r,n,a){var u={title:r},s=!0;return typeof n=="string"?(s=!1,u.kind=n):Ne.is(n)?u.command=n:u.edit=n,s&&a!==void 0&&(u.kind=a),u}e.create=t;function i(r){var n=r;return n&&y.string(n.title)&&(n.diagnostics===void 0||y.typedArray(n.diagnostics,ce.is))&&(n.kind===void 0||y.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||Ne.is(n.command))&&(n.isPreferred===void 0||y.boolean(n.isPreferred))&&(n.edit===void 0||rt.is(n.edit))}e.is=i})(Qt||(Qt={}));var Yt;(function(e){function t(r,n){var a={range:r};return y.defined(n)&&(a.data=n),a}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.range)&&(y.undefined(n.command)||Ne.is(n.command))}e.is=i})(Yt||(Yt={}));var er;(function(e){function t(r,n){return{tabSize:r,insertSpaces:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.uinteger(n.tabSize)&&y.boolean(n.insertSpaces)}e.is=i})(er||(er={}));var tr;(function(e){function t(r,n,a){return{range:r,target:n,data:a}}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.range)&&(y.undefined(n.target)||y.string(n.target))}e.is=i})(tr||(tr={}));var rr;(function(e){function t(r,n){return{range:r,parent:n}}e.create=t;function i(r){var n=r;return n!==void 0&&H.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=i})(rr||(rr={}));var Si=null,nr;(function(e){function t(a,u,s,o){return new zr(a,u,s,o)}e.create=t;function i(a){var u=a;return!!(y.defined(u)&&y.string(u.uri)&&(y.undefined(u.languageId)||y.string(u.languageId))&&y.uinteger(u.lineCount)&&y.func(u.getText)&&y.func(u.positionAt)&&y.func(u.offsetAt))}e.is=i;function r(a,u){for(var s=a.getText(),o=n(u,function(d,v){var p=d.range.start.line-v.range.start.line;return p===0?d.range.start.character-v.range.start.character:p}),c=s.length,f=o.length-1;f>=0;f--){var l=o[f],h=a.offsetAt(l.range.start),g=a.offsetAt(l.range.end);if(g<=c)s=s.substring(0,h)+l.newText+s.substring(g,s.length);else throw new Error("Overlapping edit");c=h}return s}e.applyEdits=r;function n(a,u){if(a.length<=1)return a;var s=a.length/2|0,o=a.slice(0,s),c=a.slice(s);n(o,u),n(c,u);for(var f=0,l=0,h=0;f<o.length&&l<c.length;){var g=u(o[f],c[l]);g<=0?a[h++]=o[f++]:a[h++]=c[l++]}for(;f<o.length;)a[h++]=o[f++];for(;l<c.length;)a[h++]=c[l++];return a}})(nr||(nr={}));var zr=function(){function e(t,i,r,n){this._uri=t,this._languageId=i,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(i,r)}return this._content},e.prototype.update=function(t,i){this._content=t.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],i=this._content,r=!0,n=0;n<i.length;n++){r&&(t.push(n),r=!1);var a=i.charAt(n);r=a==="\r"||a===`
|
|
`,a==="\r"&&n+1<i.length&&i.charAt(n+1)===`
|
|
`&&n++}r&&i.length>0&&t.push(i.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),r=0,n=i.length;if(n===0)return ie.create(0,t);for(;r<n;){var a=Math.floor((r+n)/2);i[a]>t?n=a:r=a+1}var u=r-1;return ie.create(u,t-i[u])},e.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var r=i[t.line],n=t.line+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),y;(function(e){var t=Object.prototype.toString;function i(g){return typeof g!="undefined"}e.defined=i;function r(g){return typeof g=="undefined"}e.undefined=r;function n(g){return g===!0||g===!1}e.boolean=n;function a(g){return t.call(g)==="[object String]"}e.string=a;function u(g){return t.call(g)==="[object Number]"}e.number=u;function s(g,d,v){return t.call(g)==="[object Number]"&&d<=g&&g<=v}e.numberRange=s;function o(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=o;function c(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=c;function f(g){return t.call(g)==="[object Function]"}e.func=f;function l(g){return g!==null&&typeof g=="object"}e.objectLiteral=l;function h(g,d){return Array.isArray(g)&&g.every(d)}e.typedArray=h})(y||(y={}));var Kr=function(e,t,i){if(i||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},ir=function(){function e(t,i,r,n){this._uri=t,this._languageId=i,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(i,r)}return this._content},e.prototype.update=function(t,i){for(var r=0,n=t;r<n.length;r++){var a=n[r];if(e.isIncremental(a)){var u=sr(a.range),s=this.offsetAt(u.start),o=this.offsetAt(u.end);this._content=this._content.substring(0,s)+a.text+this._content.substring(o,this._content.length);var c=Math.max(u.start.line,0),f=Math.max(u.end.line,0),l=this._lineOffsets,h=or(a.text,!1,s);if(f-c===h.length)for(var g=0,d=h.length;g<d;g++)l[g+c+1]=h[g];else h.length<1e4?l.splice.apply(l,Kr([c+1,f-c],h,!1)):this._lineOffsets=l=l.slice(0,c+1).concat(h,l.slice(f+1));var v=a.text.length-(o-s);if(v!==0)for(var g=c+1+h.length,d=l.length;g<d;g++)l[g]=l[g]+v}else if(e.isFull(a))this._content=a.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=or(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),r=0,n=i.length;if(n===0)return{line:0,character:t};for(;r<n;){var a=Math.floor((r+n)/2);i[a]>t?n=a:r=a+1}var u=r-1;return{line:u,character:t-i[u]}},e.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var r=i[t.line],n=t.line+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},e.isFull=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},e}(),ar;(function(e){function t(n,a,u,s){return new ir(n,a,u,s)}e.create=t;function i(n,a,u){if(n instanceof ir)return n.update(a,u),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function r(n,a){for(var u=n.getText(),s=at(a.map(Gr),function(d,v){var p=d.range.start.line-v.range.start.line;return p===0?d.range.start.character-v.range.start.character:p}),o=0,c=[],f=0,l=s;f<l.length;f++){var h=l[f],g=n.offsetAt(h.range.start);if(g<o)throw new Error("Overlapping edit");g>o&&c.push(u.substring(o,g)),h.newText.length&&c.push(h.newText),o=n.offsetAt(h.range.end)}return c.push(u.substr(o)),c.join("")}e.applyEdits=r})(ar||(ar={}));function at(e,t){if(e.length<=1)return e;var i=e.length/2|0,r=e.slice(0,i),n=e.slice(i);at(r,t),at(n,t);for(var a=0,u=0,s=0;a<r.length&&u<n.length;){var o=t(r[a],n[u]);o<=0?e[s++]=r[a++]:e[s++]=n[u++]}for(;a<r.length;)e[s++]=r[a++];for(;u<n.length;)e[s++]=n[u++];return e}function or(e,t,i){i===void 0&&(i=0);for(var r=t?[i]:[],n=0;n<e.length;n++){var a=e.charCodeAt(n);(a===13||a===10)&&(a===13&&n+1<e.length&&e.charCodeAt(n+1)===10&&n++,r.push(i+n+1))}return r}function sr(e){var t=e.start,i=e.end;return t.line>i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function Gr(e){var t=sr(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var oe;(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"})(oe||(oe={}));var ur;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fe.Markdown,fe.PlainText],commitCharactersSupport:!0}}}}})(ur||(ur={}));function Zr(e,t){var i;return t.length===0?i=e:i=e.replace(/\{(\d+)\}/g,function(r,n){var a=n[0];return typeof t[a]!="undefined"?t[a]:r}),i}function Xr(e,t){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return Zr(t,i)}function we(e){return Xr}function Ci(e){return we}var ye=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},e(t,i)};return function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function r(){this.constructor=t}t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),F=we(),Qr={"color-hex":{errorMessage:F("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:F("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:F("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:F("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:F("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,}))$/}},be=function(){function e(t,i,r){r===void 0&&(r=0),this.offset=i,this.length=r,this.parent=t}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}(),Yr=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="null",n.value=null,n}return t}(be),fr=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,n)||this;return a.type="boolean",a.value=r,a}return t}(be),en=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="array",n.items=[],n}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(be),tn=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return t}(be),ot=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,r,n)||this;return a.type="string",a.value="",a}return t}(be),rn=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,r)||this;return a.type="property",a.colonOffset=-1,a.keyNode=n,a}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(be),nn=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(be);function Y(e){return ne(e)?e?{}:{not:{}}:e}var cr;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(cr||(cr={}));var an=function(){function e(t,i){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=i,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||lr(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),st=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),ee=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(t){for(var i=0,r=t;i<r.length;i++){var n=r[i];this.merge(n)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var i=0,r=this.problems;i<r.length;i++){var n=r[i];n.code===oe.EnumValueMismatch&&(n.message=F("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(a){return JSON.stringify(a)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var i=this.hasProblems();return i!==t.hasProblems()?i?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function Ai(e,t){return t===void 0&&(t=[]),new hr(e,t,[])}function he(e){return Br(e)}function ut(e){return Jr(e)}function lr(e,t,i){return i===void 0&&(i=!1),t>=e.offset&&t<e.offset+e.length||i&&t===e.offset+e.length}var hr=function(){function e(t,i,r){i===void 0&&(i=[]),r===void 0&&(r=[]),this.root=t,this.syntaxErrors=i,this.comments=r}return e.prototype.getNodeFromOffset=function(t,i){if(i===void 0&&(i=!1),this.root)return qr(this.root,t,i)},e.prototype.visit=function(t){if(this.root){var i=function(r){var n=t(r),a=r.children;if(Array.isArray(a))for(var u=0;u<a.length&&n;u++)n=i(a[u]);return n};i(this.root)}},e.prototype.validate=function(t,i,r){if(r===void 0&&(r=Q.Warning),this.root&&i){var n=new ee;return G(this.root,i,n,st.instance),n.problems.map(function(a){var u,s=H.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return ce.create(s,a.message,(u=a.severity)!==null&&u!==void 0?u:r,a.code)})}},e.prototype.getMatchingSchemas=function(t,i,r){i===void 0&&(i=-1);var n=new an(i,r);return this.root&&t&&G(this.root,t,new ee,n),n.schemas},e}();function G(e,t,i,r){if(!e||!r.include(e))return;var n=e;switch(n.type){case"object":c(n,t,i,r);break;case"array":o(n,t,i,r);break;case"string":s(n,t,i,r);break;case"number":u(n,t,i,r);break;case"property":return G(n.valueNode,t,i,r)}a(),r.add({node:n,schema:t});function a(){function f(V){return n.type===V||V==="integer"&&n.type==="number"&&n.isInteger}if(Array.isArray(t.type)?t.type.some(f)||i.problems.push({location:{offset:n.offset,length:n.length},message:t.errorMessage||F("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(f(t.type)||i.problems.push({location:{offset:n.offset,length:n.length},message:t.errorMessage||F("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var l=0,h=t.allOf;l<h.length;l++){var g=h[l];G(n,Y(g),i,r)}var d=Y(t.not);if(d){var v=new ee,p=r.newSub();G(n,d,v,p),v.hasProblems()||i.problems.push({location:{offset:n.offset,length:n.length},message:F("notSchemaWarning","Matches a schema that is not allowed.")});for(var S=0,m=p.schemas;S<m.length;S++){var b=m[S];b.inverted=!b.inverted,r.add(b)}}var E=function(V,$){for(var B=[],A=void 0,C=0,x=V;C<x.length;C++){var j=x[C],R=Y(j),L=new ee,D=r.newSub();if(G(n,R,L,D),L.hasProblems()||B.push(R),!A)A={schema:R,validationResult:L,matchingSchemas:D};else if(!$&&!L.hasProblems()&&!A.validationResult.hasProblems())A.matchingSchemas.merge(D),A.validationResult.propertiesMatches+=L.propertiesMatches,A.validationResult.propertiesValueMatches+=L.propertiesValueMatches;else{var J=L.compare(A.validationResult);J>0?A={schema:R,validationResult:L,matchingSchemas:D}:J===0&&(A.matchingSchemas.merge(D),A.validationResult.mergeEnumValues(L))}}return B.length>1&&$&&i.problems.push({location:{offset:n.offset,length:1},message:F("oneOfWarning","Matches multiple schemas when only one must validate.")}),A&&(i.merge(A.validationResult),i.propertiesMatches+=A.validationResult.propertiesMatches,i.propertiesValueMatches+=A.validationResult.propertiesValueMatches,r.merge(A.matchingSchemas)),B.length};Array.isArray(t.anyOf)&&E(t.anyOf,!1),Array.isArray(t.oneOf)&&E(t.oneOf,!0);var O=function(V){var $=new ee,B=r.newSub();G(n,Y(V),$,B),i.merge($),i.propertiesMatches+=$.propertiesMatches,i.propertiesValueMatches+=$.propertiesValueMatches,r.merge(B)},N=function(V,$,B){var A=Y(V),C=new ee,x=r.newSub();G(n,A,C,x),r.merge(x),C.hasProblems()?B&&O(B):$&&O($)},T=Y(t.if);if(T&&N(T,Y(t.then),Y(t.else)),Array.isArray(t.enum)){for(var I=he(n),k=!1,w=0,P=t.enum;w<P.length;w++){var M=P[w];if(Ee(I,M)){k=!0;break}}i.enumValues=t.enum,i.enumValueMatch=k,k||i.problems.push({location:{offset:n.offset,length:n.length},code:oe.EnumValueMismatch,message:t.errorMessage||F("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(V){return JSON.stringify(V)}).join(", "))})}if(ue(t.const)){var I=he(n);Ee(I,t.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:n.offset,length:n.length},code:oe.EnumValueMismatch,message:t.errorMessage||F("constWarning","Value must be {0}.",JSON.stringify(t.const))}),i.enumValueMatch=!1),i.enumValues=[t.const]}t.deprecationMessage&&n.parent&&i.problems.push({location:{offset:n.parent.offset,length:n.parent.length},severity:Q.Warning,message:t.deprecationMessage,code:oe.Deprecated})}function u(f,l,h,g){var d=f.value;function v(w){var P,M=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(w.toString());return M&&{value:Number(M[1]+(M[2]||"")),multiplier:(((P=M[2])===null||P===void 0?void 0:P.length)||0)-(parseInt(M[3])||0)}}if(re(l.multipleOf)){var p=-1;if(Number.isInteger(l.multipleOf))p=d%l.multipleOf;else{var S=v(l.multipleOf),m=v(d);if(S&&m){var b=Math.pow(10,Math.abs(m.multiplier-S.multiplier));m.multiplier<S.multiplier?m.value*=b:S.value*=b,p=m.value%S.value}}p!==0&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("multipleOfWarning","Value is not divisible by {0}.",l.multipleOf)})}function E(w,P){if(re(P))return P;if(ne(P)&&P)return w}function O(w,P){if(!ne(P)||!P)return w}var N=E(l.minimum,l.exclusiveMinimum);re(N)&&d<=N&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",N)});var T=E(l.maximum,l.exclusiveMaximum);re(T)&&d>=T&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",T)});var I=O(l.minimum,l.exclusiveMinimum);re(I)&&d<I&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("minimumWarning","Value is below the minimum of {0}.",I)});var k=O(l.maximum,l.exclusiveMaximum);re(k)&&d>k&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maximumWarning","Value is above the maximum of {0}.",k)})}function s(f,l,h,g){if(re(l.minLength)&&f.value.length<l.minLength&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("minLengthWarning","String is shorter than the minimum length of {0}.",l.minLength)}),re(l.maxLength)&&f.value.length>l.maxLength&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maxLengthWarning","String is longer than the maximum length of {0}.",l.maxLength)}),Hr(l.pattern)){var d=Ue(l.pattern);d.test(f.value)||h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||F("patternWarning",'String does not match the pattern of "{0}".',l.pattern)})}if(l.format)switch(l.format){case"uri":case"uri-reference":{var v=void 0;if(!f.value)v=F("uriEmpty","URI expected.");else{var p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);p?!p[2]&&l.format==="uri"&&(v=F("uriSchemeMissing","URI with a scheme is expected.")):v=F("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||F("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var S=Qr[l.format];(!f.value||!S.pattern.exec(f.value))&&h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||S.errorMessage});default:}}function o(f,l,h,g){if(Array.isArray(l.items)){for(var d=l.items,v=0;v<d.length;v++){var p=d[v],S=Y(p),m=new ee,b=f.items[v];b?(G(b,S,m,g),h.mergePropertyMatch(m)):f.items.length>=d.length&&h.propertiesValueMatches++}if(f.items.length>d.length)if(typeof l.additionalItems=="object")for(var E=d.length;E<f.items.length;E++){var m=new ee;G(f.items[E],l.additionalItems,m,g),h.mergePropertyMatch(m)}else l.additionalItems===!1&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",d.length)})}else{var O=Y(l.items);if(O)for(var N=0,T=f.items;N<T.length;N++){var b=T[N],m=new ee;G(b,O,m,g),h.mergePropertyMatch(m)}}var I=Y(l.contains);if(I){var k=f.items.some(function(M){var V=new ee;return G(M,I,V,st.instance),!V.hasProblems()});k||h.problems.push({location:{offset:f.offset,length:f.length},message:l.errorMessage||F("requiredItemMissingWarning","Array does not contain required item.")})}if(re(l.minItems)&&f.items.length<l.minItems&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("minItemsWarning","Array has too few items. Expected {0} or more.",l.minItems)}),re(l.maxItems)&&f.items.length>l.maxItems&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maxItemsWarning","Array has too many items. Expected {0} or fewer.",l.maxItems)}),l.uniqueItems===!0){var w=he(f),P=w.some(function(M,V){return V!==w.lastIndexOf(M)});P&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("uniqueItemsWarning","Array has duplicate items.")})}}function c(f,l,h,g){for(var d=Object.create(null),v=[],p=0,S=f.properties;p<S.length;p++){var m=S[p],b=m.keyNode.value;d[b]=m.valueNode,v.push(b)}if(Array.isArray(l.required))for(var E=0,O=l.required;E<O.length;E++){var N=O[E];if(!d[N]){var T=f.parent&&f.parent.type==="property"&&f.parent.keyNode,I=T?{offset:T.offset,length:T.length}:{offset:f.offset,length:1};h.problems.push({location:I,message:F("MissingRequiredPropWarning",'Missing property "{0}".',N)})}}var k=function(Pr){for(var kt=v.indexOf(Pr);kt>=0;)v.splice(kt,1),kt=v.indexOf(Pr)};if(l.properties)for(var w=0,P=Object.keys(l.properties);w<P.length;w++){var N=P[w];k(N);var M=l.properties[N],V=d[N];if(V)if(ne(M))if(M)h.propertiesMatches++,h.propertiesValueMatches++;else{var m=V.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||F("DisallowedExtraPropWarning","Property {0} is not allowed.",N)})}else{var $=new ee;G(V,M,$,g),h.mergePropertyMatch($)}}if(l.patternProperties)for(var B=0,A=Object.keys(l.patternProperties);B<A.length;B++)for(var C=A[B],x=Ue(C),j=0,R=v.slice(0);j<R.length;j++){var N=R[j];if(x.test(N)){k(N);var V=d[N];if(V){var M=l.patternProperties[C];if(ne(M))if(M)h.propertiesMatches++,h.propertiesValueMatches++;else{var m=V.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||F("DisallowedExtraPropWarning","Property {0} is not allowed.",N)})}else{var $=new ee;G(V,M,$,g),h.mergePropertyMatch($)}}}}if(typeof l.additionalProperties=="object")for(var L=0,D=v;L<D.length;L++){var N=D[L],V=d[N];if(V){var $=new ee;G(V,l.additionalProperties,$,g),h.mergePropertyMatch($)}}else if(l.additionalProperties===!1&&v.length>0)for(var J=0,Z=v;J<Z.length;J++){var N=Z[J],V=d[N];if(V){var m=V.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||F("DisallowedExtraPropWarning","Property {0} is not allowed.",N)})}}if(re(l.maxProperties)&&f.properties.length>l.maxProperties&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("MaxPropWarning","Object has more properties than limit of {0}.",l.maxProperties)}),re(l.minProperties)&&f.properties.length<l.minProperties&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("MinPropWarning","Object has fewer properties than the required number of {0}",l.minProperties)}),l.dependencies)for(var te=0,Se=Object.keys(l.dependencies);te<Se.length;te++){var b=Se[te],ve=d[b];if(ve){var mt=l.dependencies[b];if(Array.isArray(mt))for(var yt=0,Or=mt;yt<Or.length;yt++){var jr=Or[yt];d[jr]?h.propertiesValueMatches++:h.problems.push({location:{offset:f.offset,length:f.length},message:F("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",jr,b)})}else{var M=Y(mt);if(M){var $=new ee;G(f,M,$,g),h.mergePropertyMatch($)}}}}var Ir=Y(l.propertyNames);if(Ir)for(var bt=0,Nr=f.properties;bt<Nr.length;bt++){var ai=Nr[bt],b=ai.keyNode;b&&G(b,Ir,h,st.instance)}}}function wi(e,t){var i=[],r=-1,n=e.getText(),a=Json.createScanner(n,!1),u=t&&t.collectComments?[]:void 0;function s(){for(;;){var T=a.scan();switch(l(),T){case 12:case 13:Array.isArray(u)&&u.push(Range.create(e.positionAt(a.getTokenOffset()),e.positionAt(a.getTokenOffset()+a.getTokenLength())));break;case 15:case 14:break;default:return T}}}function o(T){return a.getToken()===T?(s(),!0):!1}function c(T,I,k,w,P){if(P===void 0&&(P=DiagnosticSeverity.Error),i.length===0||k!==r){var M=Range.create(e.positionAt(k),e.positionAt(w));i.push(Diagnostic.create(M,T,P,I,e.languageId)),r=k}}function f(T,I,k,w,P){k===void 0&&(k=void 0),w===void 0&&(w=[]),P===void 0&&(P=[]);var M=a.getTokenOffset(),V=a.getTokenOffset()+a.getTokenLength();if(M===V&&M>0){for(M--;M>0&&/\s/.test(n.charAt(M));)M--;V=M+1}if(c(T,I,M,V),k&&h(k,!1),w.length+P.length>0)for(var $=a.getToken();$!==17;){if(w.indexOf($)!==-1){s();break}else if(P.indexOf($)!==-1)break;$=s()}return k}function l(){switch(a.getTokenError()){case 4:return f(F("InvalidUnicode","Invalid unicode sequence in string."),ErrorCode.InvalidUnicode),!0;case 5:return f(F("InvalidEscapeCharacter","Invalid escape character in string."),ErrorCode.InvalidEscapeCharacter),!0;case 3:return f(F("UnexpectedEndOfNumber","Unexpected end of number."),ErrorCode.UnexpectedEndOfNumber),!0;case 1:return f(F("UnexpectedEndOfComment","Unexpected end of comment."),ErrorCode.UnexpectedEndOfComment),!0;case 2:return f(F("UnexpectedEndOfString","Unexpected end of string."),ErrorCode.UnexpectedEndOfString),!0;case 6:return f(F("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),ErrorCode.InvalidCharacter),!0}return!1}function h(T,I){return T.length=a.getTokenOffset()+a.getTokenLength()-T.offset,I&&s(),T}function g(T){if(a.getToken()===3){var I=new en(T,a.getTokenOffset());s();for(var k=0,w=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){w||f(F("ValueExpected","Value expected"),ErrorCode.ValueExpected);var P=a.getTokenOffset();if(s(),a.getToken()===4){w&&c(F("TrailingComma","Trailing comma"),ErrorCode.TrailingComma,P,P+1);continue}}else w&&f(F("ExpectedComma","Expected comma"),ErrorCode.CommaExpected);var M=E(I);M?I.items.push(M):f(F("PropertyExpected","Value expected"),ErrorCode.ValueExpected,void 0,[],[4,5]),w=!0}return a.getToken()!==4?f(F("ExpectedCloseBracket","Expected comma or closing bracket"),ErrorCode.CommaOrCloseBacketExpected,I):h(I,!0)}}var d=new ot(void 0,0,0);function v(T,I){var k=new rn(T,a.getTokenOffset(),d),w=S(k);if(!w)if(a.getToken()===16){f(F("DoubleQuotesExpected","Property keys must be doublequoted"),ErrorCode.Undefined);var P=new ot(k,a.getTokenOffset(),a.getTokenLength());P.value=a.getTokenValue(),w=P,s()}else return;k.keyNode=w;var M=I[w.value];if(M?(c(F("DuplicateKeyWarning","Duplicate object key"),ErrorCode.DuplicateKey,k.keyNode.offset,k.keyNode.offset+k.keyNode.length,DiagnosticSeverity.Warning),typeof M=="object"&&c(F("DuplicateKeyWarning","Duplicate object key"),ErrorCode.DuplicateKey,M.keyNode.offset,M.keyNode.offset+M.keyNode.length,DiagnosticSeverity.Warning),I[w.value]=!0):I[w.value]=k,a.getToken()===6)k.colonOffset=a.getTokenOffset(),s();else if(f(F("ColonExpected","Colon expected"),ErrorCode.ColonExpected),a.getToken()===10&&e.positionAt(w.offset+w.length).line<e.positionAt(a.getTokenOffset()).line)return k.length=w.length,k;var V=E(k);return V?(k.valueNode=V,k.length=V.offset+V.length-k.offset,k):f(F("ValueExpected","Value expected"),ErrorCode.ValueExpected,k,[],[2,5])}function p(T){if(a.getToken()===1){var I=new nn(T,a.getTokenOffset()),k=Object.create(null);s();for(var w=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){w||f(F("PropertyExpected","Property expected"),ErrorCode.PropertyExpected);var P=a.getTokenOffset();if(s(),a.getToken()===2){w&&c(F("TrailingComma","Trailing comma"),ErrorCode.TrailingComma,P,P+1);continue}}else w&&f(F("ExpectedComma","Expected comma"),ErrorCode.CommaExpected);var M=v(I,k);M?I.properties.push(M):f(F("PropertyExpected","Property expected"),ErrorCode.PropertyExpected,void 0,[],[2,5]),w=!0}return a.getToken()!==2?f(F("ExpectedCloseBrace","Expected comma or closing brace"),ErrorCode.CommaOrCloseBraceExpected,I):h(I,!0)}}function S(T){if(a.getToken()===10){var I=new ot(T,a.getTokenOffset());return I.value=a.getTokenValue(),h(I,!0)}}function m(T){if(a.getToken()===11){var I=new tn(T,a.getTokenOffset());if(a.getTokenError()===0){var k=a.getTokenValue();try{var w=JSON.parse(k);if(!isNumber(w))return f(F("InvalidNumberFormat","Invalid number format."),ErrorCode.Undefined,I);I.value=w}catch(P){return f(F("InvalidNumberFormat","Invalid number format."),ErrorCode.Undefined,I)}I.isInteger=k.indexOf(".")===-1}return h(I,!0)}}function b(T){var I;switch(a.getToken()){case 7:return h(new Yr(T,a.getTokenOffset()),!0);case 8:return h(new fr(T,!0,a.getTokenOffset()),!0);case 9:return h(new fr(T,!1,a.getTokenOffset()),!0);default:return}}function E(T){return g(T)||p(T)||S(T)||m(T)||b(T)}var O=void 0,N=s();return N!==17&&(O=E(O),O?a.getToken()!==17&&f(F("End of file expected","End of file expected."),ErrorCode.Undefined):f(F("Invalid symbol","Expected a JSON object, array or literal."),ErrorCode.Undefined)),new hr(O,i,u)}function ft(e,t,i){if(e!==null&&typeof e=="object"){var r=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var n=`[
|
|
`,a=0;a<e.length;a++)n+=r+ft(e[a],r,i),a<e.length-1&&(n+=","),n+=`
|
|
`;return n+=t+"]",n}else{var u=Object.keys(e);if(u.length===0)return"{}";for(var n=`{
|
|
`,a=0;a<u.length;a++){var s=u[a];n+=r+JSON.stringify(s)+": "+ft(e[s],r,i),a<u.length-1&&(n+=","),n+=`
|
|
`}return n+=t+"}",n}}return i(e)}var ct=we(),on=[",","}","]"],sn=[":"],Ti=function(){function e(t,i,r,n){i===void 0&&(i=[]),r===void 0&&(r=Promise),n===void 0&&(n={}),this.schemaService=t,this.contributions=i,this.promiseConstructor=r,this.clientCapabilities=n}return e.prototype.doResolve=function(t){for(var i=this.contributions.length-1;i>=0;i--){var r=this.contributions[i].resolveCompletion;if(r){var n=r(t);if(n)return n}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,i,r){var n=this,a={items:[],isIncomplete:!1},u=t.getText(),s=t.offsetAt(i),o=r.getNodeFromOffset(s,!0);if(this.isInComment(t,o?o.offset:0,s))return Promise.resolve(a);if(o&&s===o.offset+o.length&&s>0){var c=u[s-1];(o.type==="object"&&c==="}"||o.type==="array"&&c==="]")&&(o=o.parent)}var f=this.getCurrentWord(t,s),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=H.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{var h=s-f.length;h>0&&u[h-1]==='"'&&h--,l=H.create(t.positionAt(h),i)}var g=!1,d={},v={add:function(p){var S=p.label,m=d[S];if(m)m.documentation||(m.documentation=p.documentation),m.detail||(m.detail=p.detail);else{if(S=S.replace(/[\n]/g,"\u21B5"),S.length>60){var b=S.substr(0,57).trim()+"...";d[b]||(S=b)}l&&p.insertText!==void 0&&(p.textEdit=ae.replace(l,p.insertText)),g&&(p.commitCharacters=p.kind===W.Property?sn:on),p.label=S,d[S]=p,a.items.push(p)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(p){console.error(p)},log:function(p){console.log(p)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,r).then(function(p){var S=[],m=!0,b="",E=void 0;if(o&&o.type==="string"){var O=o.parent;O&&O.type==="property"&&O.keyNode===o&&(m=!O.valueNode,E=O,b=u.substr(o.offset+1,o.length-2),O&&(o=O.parent))}if(o&&o.type==="object"){if(o.offset===s)return a;var N=o.properties;N.forEach(function(w){(!E||E!==w)&&(d[w.keyNode.value]=it.create("__"))});var T="";m&&(T=n.evaluateSeparatorAfter(t,t.offsetAt(l.end))),p?n.getPropertyCompletions(p,r,o,m,T,v):n.getSchemaLessPropertyCompletions(r,o,b,v);var I=ut(o);n.contributions.forEach(function(w){var P=w.collectPropertyCompletions(t.uri,I,f,m,T==="",v);P&&S.push(P)}),!p&&f.length>0&&u.charAt(s-f.length-1)!=='"'&&(v.add({kind:W.Property,label:n.getLabelForValue(f),insertText:n.getInsertTextForProperty(f,void 0,!1,T),insertTextFormat:z.Snippet,documentation:""}),v.setAsIncomplete())}var k={};return p?n.getValueCompletions(p,r,o,s,t,v,k):n.getSchemaLessValueCompletions(r,o,s,t,v),n.contributions.length>0&&n.getContributedValueCompletions(r,o,s,t,v,S),n.promiseConstructor.all(S).then(function(){if(v.getNumberOfProposals()===0){var w=s;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);var P=n.evaluateSeparatorAfter(t,w);n.addFillerValueCompletions(k,P,v)}return a})})},e.prototype.getPropertyCompletions=function(t,i,r,n,a,u){var s=this,o=i.getMatchingSchemas(t.schema,r.offset);o.forEach(function(c){if(c.node===r&&!c.inverted){var f=c.schema.properties;f&&Object.keys(f).forEach(function(v){var p=f[v];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){var S={kind:W.Property,label:v,insertText:s.getInsertTextForProperty(v,p,n,a),insertTextFormat:z.Snippet,filterText:s.getFilterTextForValue(v),documentation:s.fromMarkup(p.markdownDescription)||p.description||""};p.suggestSortText!==void 0&&(S.sortText=p.suggestSortText),S.insertText&&Oe(S.insertText,"$1"+a)&&(S.command={title:"Suggest",command:"editor.action.triggerSuggest"}),u.add(S)}});var l=c.schema.propertyNames;if(typeof l=="object"&&!l.deprecationMessage&&!l.doNotSuggest){var h=function(v,p){p===void 0&&(p=void 0);var S={kind:W.Property,label:v,insertText:s.getInsertTextForProperty(v,void 0,n,a),insertTextFormat:z.Snippet,filterText:s.getFilterTextForValue(v),documentation:p||s.fromMarkup(l.markdownDescription)||l.description||""};l.suggestSortText!==void 0&&(S.sortText=l.suggestSortText),S.insertText&&Oe(S.insertText,"$1"+a)&&(S.command={title:"Suggest",command:"editor.action.triggerSuggest"}),u.add(S)};if(l.enum)for(var g=0;g<l.enum.length;g++){var d=void 0;l.markdownEnumDescriptions&&g<l.markdownEnumDescriptions.length?d=s.fromMarkup(l.markdownEnumDescriptions[g]):l.enumDescriptions&&g<l.enumDescriptions.length&&(d=l.enumDescriptions[g]),h(l.enum[g],d)}l.const&&h(l.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,i,r,n){var a=this,u=function(o){o.properties.forEach(function(c){var f=c.keyNode.value;n.add({kind:W.Property,label:f,insertText:a.getInsertTextForValue(f,""),insertTextFormat:z.Snippet,filterText:a.getFilterTextForValue(f),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var s=i.parent.keyNode.value;t.visit(function(o){return o.type==="property"&&o!==i.parent&&o.keyNode.value===s&&o.valueNode&&o.valueNode.type==="object"&&u(o.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(o){o.type==="object"&&o!==i&&u(o)});else i.type==="object"&&n.add({kind:W.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:z.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,i,r,n,a){var u=this,s=r;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(s=i.offset+i.length,i=i.parent),!i){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:z.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:z.Snippet,documentation:""});return}var o=this.evaluateSeparatorAfter(n,s),c=function(g){g.parent&&!lr(g.parent,r,!0)&&a.add({kind:u.getSuggestionKind(g.type),label:u.getLabelTextForMatchingNode(g,n),insertText:u.getInsertTextForMatchingNode(g,n,o),insertTextFormat:z.Snippet,documentation:""}),g.type==="boolean"&&u.addBooleanValueCompletion(!g.value,o,a)};if(i.type==="property"&&r>(i.colonOffset||0)){var f=i.valueNode;if(f&&(r>f.offset+f.length||f.type==="object"||f.type==="array"))return;var l=i.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===l&&g.valueNode&&c(g.valueNode),!0}),l==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(o,a)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var h=i.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(c),!0})}else i.items.forEach(c)},e.prototype.getValueCompletions=function(t,i,r,n,a,u,s){var o=n,c=void 0,f=void 0;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,f=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",u,s);return}if(r.type==="property"&&n>(r.colonOffset||0)){var l=r.valueNode;if(l&&n>l.offset+l.length)return;c=r.keyNode.value,r=r.parent}if(r&&(c!==void 0||r.type==="array")){for(var h=this.evaluateSeparatorAfter(a,o),g=i.getMatchingSchemas(t.schema,r.offset,f),d=0,v=g;d<v.length;d++){var p=v[d];if(p.node===r&&!p.inverted&&p.schema){if(r.type==="array"&&p.schema.items)if(Array.isArray(p.schema.items)){var S=this.findItemAtOffset(r,a,n);S<p.schema.items.length&&this.addSchemaValueCompletions(p.schema.items[S],h,u,s)}else this.addSchemaValueCompletions(p.schema.items,h,u,s);if(c!==void 0){var m=!1;if(p.schema.properties){var b=p.schema.properties[c];b&&(m=!0,this.addSchemaValueCompletions(b,h,u,s))}if(p.schema.patternProperties&&!m)for(var E=0,O=Object.keys(p.schema.patternProperties);E<O.length;E++){var N=O[E],T=Ue(N);if(T.test(c)){m=!0;var b=p.schema.patternProperties[N];this.addSchemaValueCompletions(b,h,u,s)}}if(p.schema.additionalProperties&&!m){var b=p.schema.additionalProperties;this.addSchemaValueCompletions(b,h,u,s)}}}}c==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(h,u),s.boolean&&(this.addBooleanValueCompletion(!0,h,u),this.addBooleanValueCompletion(!1,h,u)),s.null&&this.addNullValueCompletion(h,u)}},e.prototype.getContributedValueCompletions=function(t,i,r,n,a,u){if(!i)this.contributions.forEach(function(f){var l=f.collectDefaultCompletions(n.uri,a);l&&u.push(l)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i&&i.type==="property"&&r>(i.colonOffset||0)){var s=i.keyNode.value,o=i.valueNode;if((!o||r<=o.offset+o.length)&&i.parent){var c=ut(i.parent);this.contributions.forEach(function(f){var l=f.collectValueCompletions(n.uri,c,s,a);l&&u.push(l)})}}},e.prototype.addSchemaValueCompletions=function(t,i,r,n){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,i,r),this.addDefaultValueCompletions(t,i,r),this.collectTypes(t,n),Array.isArray(t.allOf)&&t.allOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}))},e.prototype.addDefaultValueCompletions=function(t,i,r,n){var a=this;n===void 0&&(n=0);var u=!1;if(ue(t.default)){for(var s=t.type,o=t.default,c=n;c>0;c--)o=[o],s="array";r.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,i),insertTextFormat:z.Snippet,detail:ct("json.suggest.default","Default value")}),u=!0}Array.isArray(t.examples)&&t.examples.forEach(function(f){for(var l=t.type,h=f,g=n;g>0;g--)h=[h],l="array";r.add({kind:a.getSuggestionKind(l),label:a.getLabelForValue(h),insertText:a.getInsertTextForValue(h,i),insertTextFormat:z.Snippet}),u=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(f){var l=t.type,h=f.body,g=f.label,d,v;if(ue(h)){for(var p=t.type,S=n;S>0;S--)h=[h],p="array";d=a.getInsertTextForSnippetValue(h,i),v=a.getFilterTextForSnippetValue(h),g=g||a.getLabelForSnippetValue(h)}else if(typeof f.bodyText=="string"){for(var m="",b="",E="",S=n;S>0;S--)m=m+E+`[
|
|
`,b=b+`
|
|
`+E+"]",E+=" ",l="array";d=m+E+f.bodyText.split(`
|
|
`).join(`
|
|
`+E)+b+i,g=g||d,v=d.replace(/[\n]/g,"")}else return;r.add({kind:a.getSuggestionKind(l),label:g,documentation:a.fromMarkup(f.markdownDescription)||f.description,insertText:d,insertTextFormat:z.Snippet,filterText:v}),u=!0}),!u&&typeof t.items=="object"&&!Array.isArray(t.items)&&n<5&&this.addDefaultValueCompletions(t.items,i,r,n+1)},e.prototype.addEnumValueCompletions=function(t,i,r){if(ue(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,i),insertTextFormat:z.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var n=0,a=t.enum.length;n<a;n++){var u=t.enum[n],s=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&n<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?s=this.fromMarkup(t.markdownEnumDescriptions[n]):t.enumDescriptions&&n<t.enumDescriptions.length&&(s=t.enumDescriptions[n]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,i),insertTextFormat:z.Snippet,documentation:s})}},e.prototype.collectTypes=function(t,i){if(!(Array.isArray(t.enum)||ue(t.const))){var r=t.type;Array.isArray(r)?r.forEach(function(n){return i[n]=!0}):r&&(i[r]=!0)}},e.prototype.addFillerValueCompletions=function(t,i,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:z.Snippet,detail:ct("defaults.object","New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:z.Snippet,detail:ct("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,i,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,i),insertTextFormat:z.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:z.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,i){var r=this,n=this.schemaService.getRegisteredSchemaIds(function(a){return a==="http"||a==="https"});n.forEach(function(a){return i.add({kind:W.Module,label:r.getLabelForValue(a),filterText:r.getFilterTextForValue(a),insertText:r.getInsertTextForValue(a,t),insertTextFormat:z.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var i=JSON.stringify(t);return i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,i){var r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+i:r==="[]"?"[$1]"+i:this.getInsertTextForPlainText(r+i)},e.prototype.getInsertTextForSnippetValue=function(t,i){var r=function(n){return typeof n=="string"&&n[0]==="^"?n.substr(1):JSON.stringify(n)};return ft(t,"",r)+i},e.prototype.getInsertTextForGuessedValue=function(t,i){switch(typeof t){case"object":return t===null?"${1:null}"+i:this.getInsertTextForValue(t,i);case"string":var r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+i}return this.getInsertTextForValue(t,i)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var i=t;t=i.length>0?i[0]:void 0}if(!t)return W.Value;switch(t){case"string":return W.Value;case"object":return W.Module;case"property":return W.Property;default:return W.Value}},e.prototype.getLabelTextForMatchingNode=function(t,i){switch(t.type){case"array":return"[]";case"object":return"{}";default:var r=i.getText().substr(t.offset,t.length);return r}},e.prototype.getInsertTextForMatchingNode=function(t,i,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var n=i.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(n)}},e.prototype.getInsertTextForProperty=function(t,i,r,n){var a=this.getInsertTextForValue(t,"");if(!r)return a;var u=a+": ",s,o=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var c=i.defaultSnippets[0].body;ue(c)&&(s=this.getInsertTextForSnippetValue(c,""))}o+=i.defaultSnippets.length}if(i.enum&&(!s&&i.enum.length===1&&(s=this.getInsertTextForGuessedValue(i.enum[0],"")),o+=i.enum.length),ue(i.default)&&(s||(s=this.getInsertTextForGuessedValue(i.default,"")),o++),Array.isArray(i.examples)&&i.examples.length&&(s||(s=this.getInsertTextForGuessedValue(i.examples[0],"")),o+=i.examples.length),o===0){var f=Array.isArray(i.type)?i.type[0]:i.type;switch(f||(i.properties?f="object":i.items&&(f="array")),f){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return a}}}return(!s||o>1)&&(s="$1"),u+s+n},e.prototype.getCurrentWord=function(t,i){for(var r=i-1,n=t.getText();r>=0&&`
|
|
\r\v":{[,]}`.indexOf(n.charAt(r))===-1;)r--;return n.substring(r+1,i)},e.prototype.evaluateSeparatorAfter=function(t,i){var r=Re(t.getText(),!0);r.setPosition(i);var n=r.scan();switch(n){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,i,r){for(var n=Re(i.getText(),!0),a=t.items,u=a.length-1;u>=0;u--){var s=a[u];if(r>s.offset+s.length){n.setPosition(s.offset+s.length);var o=n.scan();return o===5&&r>=n.getTokenOffset()+n.getTokenLength()?u+1:u}else if(r>=s.offset)return u}return 0},e.prototype.isInComment=function(t,i,r){var n=Re(t.getText(),!1);n.setPosition(i);for(var a=n.scan();a!==17&&n.getTokenOffset()+n.getTokenLength()<r;)a=n.scan();return(a===12||a===13)&&n.getTokenOffset()<=r},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:fe.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!ue(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(fe.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!ue(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),xi=function(){function e(t,i,r){i===void 0&&(i=[]),this.schemaService=t,this.contributions=i,this.promise=r||Promise}return e.prototype.doHover=function(t,i,r){var n=t.offsetAt(i),a=r.getNodeFromOffset(n);if(!a||(a.type==="object"||a.type==="array")&&n>a.offset+1&&n<a.offset+a.length-1)return this.promise.resolve(null);var u=a;if(a.type==="string"){var s=a.parent;if(s&&s.type==="property"&&s.keyNode===a&&(a=s.valueNode,!a))return this.promise.resolve(null)}for(var o=H.create(t.positionAt(u.offset),t.positionAt(u.offset+u.length)),c=function(d){var v={contents:d,range:o};return v},f=ut(a),l=this.contributions.length-1;l>=0;l--){var h=this.contributions[l],g=h.getInfoContribution(t.uri,f);if(g)return g.then(function(d){return c(d)})}return this.schemaService.getSchemaForResource(t.uri,r).then(function(d){if(d&&a){var v=r.getMatchingSchemas(d.schema,a.offset),p=void 0,S=void 0,m=void 0,b=void 0;v.every(function(O){if(O.node===a&&!O.inverted&&O.schema&&(p=p||O.schema.title,S=S||O.schema.markdownDescription||lt(O.schema.description),O.schema.enum)){var N=O.schema.enum.indexOf(he(a));O.schema.markdownEnumDescriptions?m=O.schema.markdownEnumDescriptions[N]:O.schema.enumDescriptions&&(m=lt(O.schema.enumDescriptions[N])),m&&(b=O.schema.enum[N],typeof b!="string"&&(b=JSON.stringify(b)))}return!0});var E="";return p&&(E=lt(p)),S&&(E.length>0&&(E+=`
|
|
|
|
`),E+=S),m&&(E.length>0&&(E+=`
|
|
|
|
`),E+="`"+un(b)+"`: "+m),c([E])}return null})},e}();function lt(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
|
|
$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function un(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var ht=$e(34155),dr;dr=(()=>{"use strict";var e={470:r=>{function n(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function a(s,o){for(var c,f="",l=0,h=-1,g=0,d=0;d<=s.length;++d){if(d<s.length)c=s.charCodeAt(d);else{if(c===47)break;c=47}if(c===47){if(!(h===d-1||g===1))if(h!==d-1&&g===2){if(f.length<2||l!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var v=f.lastIndexOf("/");if(v!==f.length-1){v===-1?(f="",l=0):l=(f=f.slice(0,v)).length-1-f.lastIndexOf("/"),h=d,g=0;continue}}else if(f.length===2||f.length===1){f="",l=0,h=d,g=0;continue}}o&&(f.length>0?f+="/..":f="..",l=2)}else f.length>0?f+="/"+s.slice(h+1,d):f=s.slice(h+1,d),l=d-h-1;h=d,g=0}else c===46&&g!==-1?++g:g=-1}return f}var u={resolve:function(){for(var s,o="",c=!1,f=arguments.length-1;f>=-1&&!c;f--){var l;f>=0?l=arguments[f]:(s===void 0&&(s=ht.cwd()),l=s),n(l),l.length!==0&&(o=l+"/"+o,c=l.charCodeAt(0)===47)}return o=a(o,!c),c?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(s){if(n(s),s.length===0)return".";var o=s.charCodeAt(0)===47,c=s.charCodeAt(s.length-1)===47;return(s=a(s,!o)).length!==0||o||(s="."),s.length>0&&c&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return n(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var c=arguments[o];n(c),c.length>0&&(s===void 0?s=c:s+="/"+c)}return s===void 0?".":u.normalize(s)},relative:function(s,o){if(n(s),n(o),s===o||(s=u.resolve(s))===(o=u.resolve(o)))return"";for(var c=1;c<s.length&&s.charCodeAt(c)===47;++c);for(var f=s.length,l=f-c,h=1;h<o.length&&o.charCodeAt(h)===47;++h);for(var g=o.length-h,d=l<g?l:g,v=-1,p=0;p<=d;++p){if(p===d){if(g>d){if(o.charCodeAt(h+p)===47)return o.slice(h+p+1);if(p===0)return o.slice(h+p)}else l>d&&(s.charCodeAt(c+p)===47?v=p:p===0&&(v=0));break}var S=s.charCodeAt(c+p);if(S!==o.charCodeAt(h+p))break;S===47&&(v=p)}var m="";for(p=c+v+1;p<=f;++p)p!==f&&s.charCodeAt(p)!==47||(m.length===0?m+="..":m+="/..");return m.length>0?m+o.slice(h+v):(h+=v,o.charCodeAt(h)===47&&++h,o.slice(h))},_makeLong:function(s){return s},dirname:function(s){if(n(s),s.length===0)return".";for(var o=s.charCodeAt(0),c=o===47,f=-1,l=!0,h=s.length-1;h>=1;--h)if((o=s.charCodeAt(h))===47){if(!l){f=h;break}}else l=!1;return f===-1?c?"/":".":c&&f===1?"//":s.slice(0,f)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');n(s);var c,f=0,l=-1,h=!0;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var g=o.length-1,d=-1;for(c=s.length-1;c>=0;--c){var v=s.charCodeAt(c);if(v===47){if(!h){f=c+1;break}}else d===-1&&(h=!1,d=c+1),g>=0&&(v===o.charCodeAt(g)?--g==-1&&(l=c):(g=-1,l=d))}return f===l?l=d:l===-1&&(l=s.length),s.slice(f,l)}for(c=s.length-1;c>=0;--c)if(s.charCodeAt(c)===47){if(!h){f=c+1;break}}else l===-1&&(h=!1,l=c+1);return l===-1?"":s.slice(f,l)},extname:function(s){n(s);for(var o=-1,c=0,f=-1,l=!0,h=0,g=s.length-1;g>=0;--g){var d=s.charCodeAt(g);if(d!==47)f===-1&&(l=!1,f=g+1),d===46?o===-1?o=g:h!==1&&(h=1):o!==-1&&(h=-1);else if(!l){c=g+1;break}}return o===-1||f===-1||h===0||h===1&&o===f-1&&o===c+1?"":s.slice(o,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return function(o,c){var f=c.dir||c.root,l=c.base||(c.name||"")+(c.ext||"");return f?f===c.root?f+l:f+"/"+l:l}(0,s)},parse:function(s){n(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var c,f=s.charCodeAt(0),l=f===47;l?(o.root="/",c=1):c=0;for(var h=-1,g=0,d=-1,v=!0,p=s.length-1,S=0;p>=c;--p)if((f=s.charCodeAt(p))!==47)d===-1&&(v=!1,d=p+1),f===46?h===-1?h=p:S!==1&&(S=1):h!==-1&&(S=-1);else if(!v){g=p+1;break}return h===-1||d===-1||S===0||S===1&&h===d-1&&h===g+1?d!==-1&&(o.base=o.name=g===0&&l?s.slice(1,d):s.slice(g,d)):(g===0&&l?(o.name=s.slice(1,h),o.base=s.slice(1,d)):(o.name=s.slice(g,h),o.base=s.slice(g,d)),o.ext=s.slice(h,d)),g>0?o.dir=s.slice(0,g-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u,r.exports=u},447:(r,n,a)=>{var u;if(a.r(n),a.d(n,{URI:()=>S,Utils:()=>M}),typeof ht=="object")u=ht.platform==="win32";else if(typeof navigator=="object"){var s=navigator.userAgent;u=s.indexOf("Windows")>=0}var o,c,f=(o=function(A,C){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,j){x.__proto__=j}||function(x,j){for(var R in j)Object.prototype.hasOwnProperty.call(j,R)&&(x[R]=j[R])})(A,C)},function(A,C){function x(){this.constructor=A}o(A,C),A.prototype=C===null?Object.create(C):(x.prototype=C.prototype,new x)}),l=/^\w[\w\d+.-]*$/,h=/^\//,g=/^\/\//,d="",v="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,S=function(){function A(C,x,j,R,L,D){D===void 0&&(D=!1),typeof C=="object"?(this.scheme=C.scheme||d,this.authority=C.authority||d,this.path=C.path||d,this.query=C.query||d,this.fragment=C.fragment||d):(this.scheme=function(J,Z){return J||Z?J:"file"}(C,D),this.authority=x||d,this.path=function(J,Z){switch(J){case"https":case"http":case"file":Z?Z[0]!==v&&(Z=v+Z):Z=v}return Z}(this.scheme,j||d),this.query=R||d,this.fragment=L||d,function(J,Z){if(!J.scheme&&Z)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+J.authority+'", path: "'+J.path+'", query: "'+J.query+'", fragment: "'+J.fragment+'"}');if(J.scheme&&!l.test(J.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(J.path){if(J.authority){if(!h.test(J.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(g.test(J.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,D))}return A.isUri=function(C){return C instanceof A||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="function"&&typeof C.with=="function"&&typeof C.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return T(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(C){if(!C)return this;var x=C.scheme,j=C.authority,R=C.path,L=C.query,D=C.fragment;return x===void 0?x=this.scheme:x===null&&(x=d),j===void 0?j=this.authority:j===null&&(j=d),R===void 0?R=this.path:R===null&&(R=d),L===void 0?L=this.query:L===null&&(L=d),D===void 0?D=this.fragment:D===null&&(D=d),x===this.scheme&&j===this.authority&&R===this.path&&L===this.query&&D===this.fragment?this:new b(x,j,R,L,D)},A.parse=function(C,x){x===void 0&&(x=!1);var j=p.exec(C);return j?new b(j[2]||d,P(j[4]||d),P(j[5]||d),P(j[7]||d),P(j[9]||d),x):new b(d,d,d,d,d)},A.file=function(C){var x=d;if(u&&(C=C.replace(/\\/g,v)),C[0]===v&&C[1]===v){var j=C.indexOf(v,2);j===-1?(x=C.substring(2),C=v):(x=C.substring(2,j),C=C.substring(j)||v)}return new b("file",x,C,d,d)},A.from=function(C){return new b(C.scheme,C.authority,C.path,C.query,C.fragment)},A.prototype.toString=function(C){return C===void 0&&(C=!1),I(this,C)},A.prototype.toJSON=function(){return this},A.revive=function(C){if(C){if(C instanceof A)return C;var x=new b(C);return x._formatted=C.external,x._fsPath=C._sep===m?C.fsPath:null,x}return C},A}(),m=u?1:void 0,b=function(A){function C(){var x=A!==null&&A.apply(this,arguments)||this;return x._formatted=null,x._fsPath=null,x}return f(C,A),Object.defineProperty(C.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),C.prototype.toString=function(x){return x===void 0&&(x=!1),x?I(this,!0):(this._formatted||(this._formatted=I(this,!1)),this._formatted)},C.prototype.toJSON=function(){var x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=m),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x},C}(S),E=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function O(A,C){for(var x=void 0,j=-1,R=0;R<A.length;R++){var L=A.charCodeAt(R);if(L>=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||C&&L===47)j!==-1&&(x+=encodeURIComponent(A.substring(j,R)),j=-1),x!==void 0&&(x+=A.charAt(R));else{x===void 0&&(x=A.substr(0,R));var D=E[L];D!==void 0?(j!==-1&&(x+=encodeURIComponent(A.substring(j,R)),j=-1),x+=D):j===-1&&(j=R)}}return j!==-1&&(x+=encodeURIComponent(A.substring(j))),x!==void 0?x:A}function N(A){for(var C=void 0,x=0;x<A.length;x++){var j=A.charCodeAt(x);j===35||j===63?(C===void 0&&(C=A.substr(0,x)),C+=E[j]):C!==void 0&&(C+=A[x])}return C!==void 0?C:A}function T(A,C){var x;return x=A.authority&&A.path.length>1&&A.scheme==="file"?"//"+A.authority+A.path:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?C?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,u&&(x=x.replace(/\//g,"\\")),x}function I(A,C){var x=C?N:O,j="",R=A.scheme,L=A.authority,D=A.path,J=A.query,Z=A.fragment;if(R&&(j+=R,j+=":"),(L||R==="file")&&(j+=v,j+=v),L){var te=L.indexOf("@");if(te!==-1){var Se=L.substr(0,te);L=L.substr(te+1),(te=Se.indexOf(":"))===-1?j+=x(Se,!1):(j+=x(Se.substr(0,te),!1),j+=":",j+=x(Se.substr(te+1),!1)),j+="@"}(te=(L=L.toLowerCase()).indexOf(":"))===-1?j+=x(L,!1):(j+=x(L.substr(0,te),!1),j+=L.substr(te))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58)(ve=D.charCodeAt(1))>=65&&ve<=90&&(D="/"+String.fromCharCode(ve+32)+":"+D.substr(3));else if(D.length>=2&&D.charCodeAt(1)===58){var ve;(ve=D.charCodeAt(0))>=65&&ve<=90&&(D=String.fromCharCode(ve+32)+":"+D.substr(2))}j+=x(D,!0)}return J&&(j+="?",j+=x(J,!1)),Z&&(j+="#",j+=C?Z:O(Z,!1)),j}function k(A){try{return decodeURIComponent(A)}catch(C){return A.length>3?A.substr(0,3)+k(A.substr(3)):A}}var w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(A){return A.match(w)?A.replace(w,function(C){return k(C)}):A}var M,V=a(470),$=function(){for(var A=0,C=0,x=arguments.length;C<x;C++)A+=arguments[C].length;var j=Array(A),R=0;for(C=0;C<x;C++)for(var L=arguments[C],D=0,J=L.length;D<J;D++,R++)j[R]=L[D];return j},B=V.posix||V;(function(A){A.joinPath=function(C){for(var x=[],j=1;j<arguments.length;j++)x[j-1]=arguments[j];return C.with({path:B.join.apply(B,$([C.path],x))})},A.resolvePath=function(C){for(var x=[],j=1;j<arguments.length;j++)x[j-1]=arguments[j];var R=C.path||"/";return C.with({path:B.resolve.apply(B,$([R],x))})},A.dirname=function(C){var x=B.dirname(C.path);return x.length===1&&x.charCodeAt(0)===46?C:C.with({path:x})},A.basename=function(C){return B.basename(C.path)},A.extname=function(C){return B.extname(C.path)}})(M||(M={}))}},t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={exports:{}};return e[r](n,n.exports,i),n.exports}return i.d=(r,n)=>{for(var a in n)i.o(n,a)&&!i.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:n[a]})},i.o=(r,n)=>Object.prototype.hasOwnProperty.call(r,n),i.r=r=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},i(447)})();const{URI:ze,Utils:Ei}=dr;function fn(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var i=String(e),r="",n=t?!!t.extended:!1,a=t?!!t.globstar:!1,u=!1,s=t&&typeof t.flags=="string"?t.flags:"",o,c=0,f=i.length;c<f;c++)switch(o=i[c],o){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+o;break;case"?":if(n){r+=".";break}case"[":case"]":if(n){r+=o;break}case"{":if(n){u=!0,r+="(";break}case"}":if(n){u=!1,r+=")";break}case",":if(u){r+="|";break}r+="\\"+o;break;case"*":for(var l=i[c-1],h=1;i[c+1]==="*";)h++,c++;var g=i[c+1];if(!a)r+=".*";else{var d=h>1&&(l==="/"||l===void 0||l==="{"||l===",")&&(g==="/"||g===void 0||g===","||g==="}");d?(g==="/"?c++:l==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=o}return(!s||!~s.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,s)}var de=we(),cn="!",ln="/",hn=function(){function e(t,i){this.globWrappers=[];try{for(var r=0,n=t;r<n.length;r++){var a=n[r],u=a[0]!==cn;u||(a=a.substring(1)),a.length>0&&(a[0]===ln&&(a=a.substring(1)),this.globWrappers.push({regexp:fn("**/"+a,{extended:!0,globstar:!0}),include:u}))}this.uris=i}catch(s){this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var i=!1,r=0,n=this.globWrappers;r<n.length;r++){var a=n[r],u=a.regexp,s=a.include;u.test(t)&&(i=s)}return i},e.prototype.getURIs=function(){return this.uris},e}(),dn=function(){function e(t,i,r){this.service=t,this.url=i,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new ke(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return t.service.resolveSchemaContent(i,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),ke=function(){function e(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return e}(),gr=function(){function e(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return e.prototype.getSection=function(t){var i=this.getSectionRecursive(t,this.schema);if(i)return Y(i)},e.prototype.getSectionRecursive=function(t,i){if(!i||typeof i=="boolean"||t.length===0)return i;var r=t.shift();if(i.properties&&typeof i.properties[r])return this.getSectionRecursive(t,i.properties[r]);if(i.patternProperties)for(var n=0,a=Object.keys(i.patternProperties);n<a.length;n++){var u=a[n],s=Ue(u);if(s.test(r))return this.getSectionRecursive(t,i.patternProperties[u])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(t,i.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(i.items)){var o=parseInt(r,10);if(!isNaN(o)&&i.items[o])return this.getSectionRecursive(t,i.items[o])}else if(i.items)return this.getSectionRecursive(t,i.items)}}},e}(),Oi=function(){function e(t,i,r){this.contextService=i,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(i){var r=ze.parse(i).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var i=this;this.cachedSchemaForResource=void 0;var r=!1;t=ge(t);for(var n=[t],a=Object.keys(this.schemasById).map(function(c){return i.schemasById[c]});n.length;)for(var u=n.pop(),s=0;s<a.length;s++){var o=a[s];o&&(o.url===u||o.dependencies[u])&&(o.url!==u&&n.push(o.url),o.clearSchema(),a[s]=void 0,r=!0)}return r},e.prototype.setSchemaContributions=function(t){if(t.schemas){var i=t.schemas;for(var r in i){var n=ge(r);this.contributionSchemas[n]=this.addSchemaHandle(n,i[r])}}if(Array.isArray(t.schemaAssociations))for(var a=t.schemaAssociations,u=0,s=a;u<s.length;u++){var o=s[u],c=o.uris.map(ge),f=this.addFilePatternAssociation(o.pattern,c);this.contributionAssociations.push(f)}},e.prototype.addSchemaHandle=function(t,i){var r=new dn(this,t,i);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,i){return this.schemasById[t]||this.addSchemaHandle(t,i)},e.prototype.addFilePatternAssociation=function(t,i){var r=new hn(t,i);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(t,i,r){var n=ge(t);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,i&&this.addFilePatternAssociation(i,[n]),r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var i=0,r=this.contributionAssociations;i<r.length;i++){var n=r[i];this.filePatternAssociations.push(n)}},e.prototype.getResolvedSchema=function(t){var i=ge(t),r=this.schemasById[i];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var i=de("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Ke(t));return this.promise.resolve(new ke({},[i]))}return this.requestService(t).then(function(r){if(!r){var n=de("json.schema.nocontent","Unable to load schema from '{0}': No content.",Ke(t));return new ke({},[n])}var a={},u=[];a=Wr(r,u);var s=u.length?[de("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Ke(t),u[0].offset)]:[];return new ke(a,s)},function(r){var n=r.toString(),a=r.toString().split("Error: ");return a.length>1&&(n=a[1]),Oe(n,".")&&(n=n.substr(0,n.length-1)),new ke({},[de("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Ke(t),n)])})},e.prototype.resolveSchemaContent=function(t,i,r){var n=this,a=t.errors.slice(0),u=t.schema;if(u.$schema){var s=ge(u.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new gr({},[de("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));s==="https://json-schema.org/draft/2019-09/schema"&&a.push(de("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var o=this.contextService,c=function(g,d){if(!d)return g;var v=g;return d[0]==="/"&&(d=d.substr(1)),d.split("/").some(function(p){return p=p.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[p],!v}),v},f=function(g,d,v,p){var S=p?decodeURIComponent(p):void 0,m=c(d,S);if(m)for(var b in m)m.hasOwnProperty(b)&&!g.hasOwnProperty(b)&&(g[b]=m[b]);else a.push(de("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",S,v))},l=function(g,d,v,p,S){o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(d)&&(d=o.resolveRelativePath(d,p)),d=ge(d);var m=n.getOrAddSchemaHandle(d);return m.getUnresolvedSchema().then(function(b){if(S[d]=!0,b.errors.length){var E=v?d+"#"+v:d;a.push(de("json.schema.problemloadingref","Problems loading reference '{0}': {1}",E,b.errors[0]))}return f(g,b.schema,d,v),h(g,b.schema,d,m.dependencies)})},h=function(g,d,v,p){if(!g||typeof g!="object")return Promise.resolve(null);for(var S=[g],m=[],b=[],E=function(){for(var k=[],w=0;w<arguments.length;w++)k[w]=arguments[w];for(var P=0,M=k;P<M.length;P++){var V=M[P];typeof V=="object"&&S.push(V)}},O=function(){for(var k=[],w=0;w<arguments.length;w++)k[w]=arguments[w];for(var P=0,M=k;P<M.length;P++){var V=M[P];if(typeof V=="object")for(var $ in V){var B=$,A=V[B];typeof A=="object"&&S.push(A)}}},N=function(){for(var k=[],w=0;w<arguments.length;w++)k[w]=arguments[w];for(var P=0,M=k;P<M.length;P++){var V=M[P];if(Array.isArray(V))for(var $=0,B=V;$<B.length;$++){var A=B[$];typeof A=="object"&&S.push(A)}}},T=function(k){for(var w=[];k.$ref;){var P=k.$ref,M=P.split("#",2);if(delete k.$ref,M[0].length>0){b.push(l(k,M[0],M[1],v,p));return}else w.indexOf(P)===-1&&(f(k,d,v,M[1]),w.push(P))}E(k.items,k.additionalItems,k.additionalProperties,k.not,k.contains,k.propertyNames,k.if,k.then,k.else),O(k.definitions,k.properties,k.patternProperties,k.dependencies),N(k.anyOf,k.allOf,k.oneOf,k.items)};S.length;){var I=S.pop();m.indexOf(I)>=0||(m.push(I),T(I))}return n.promise.all(b)};return h(u,u,i,r).then(function(g){return new gr(u,a)})},e.prototype.getSchemaForResource=function(t,i){if(i&&i.root&&i.root.type==="object"){var r=i.root.properties.filter(function(S){return S.keyNode.value==="$schema"&&S.valueNode&&S.valueNode.type==="string"});if(r.length>0){var n=r[0].valueNode;if(n&&n.type==="string"){var a=he(n);if(a&&xt(a,".")&&this.contextService&&(a=this.contextService.resolveRelativePath(a,t)),a){var u=ge(a);return this.getOrAddSchemaHandle(u).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var s=Object.create(null),o=[],c=pn(t),f=0,l=this.filePatternAssociations;f<l.length;f++){var h=l[f];if(h.matchesPattern(c))for(var g=0,d=h.getURIs();g<d.length;g++){var v=d[g];s[v]||(o.push(v),s[v]=!0)}}var p=o.length>0?this.createCombinedSchema(t,o).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:p},p},e.prototype.createCombinedSchema=function(t,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),n={allOf:i.map(function(a){return{$ref:a}})};return this.addSchemaHandle(r,n)},e.prototype.getMatchingSchemas=function(t,i,r){if(r){var n=r.id||"schemaservice://untitled/matchingSchemas/"+gn++;return this.resolveSchemaContent(new ke(r),n,{}).then(function(a){return i.getMatchingSchemas(a.schema).filter(function(u){return!u.inverted})})}return this.getSchemaForResource(t.uri,i).then(function(a){return a?i.getMatchingSchemas(a.schema).filter(function(u){return!u.inverted}):[]})},e}(),gn=0;function ge(e){try{return ze.parse(e).toString()}catch(t){return e}}function pn(e){try{return ze.parse(e).with({fragment:null,query:null}).toString()}catch(t){return e}}function Ke(e){try{var t=ze.parse(e);if(t.scheme==="file")return t.fsPath}catch(i){}return e}var vn=we(),ji=function(){function e(t,i){this.jsonSchemaService=t,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Q.Error)},e.prototype.doValidation=function(t,i,r,n){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var u=[],s={},o=function(l){var h=l.range.start.line+" "+l.range.start.character+" "+l.message;s[h]||(s[h]=!0,u.push(l))},c=function(l){var h=r!=null&&r.trailingCommas?Ge(r.trailingCommas):Q.Error,g=r!=null&&r.comments?Ge(r.comments):a.commentSeverity,d=r!=null&&r.schemaValidation?Ge(r.schemaValidation):Q.Warning,v=r!=null&&r.schemaRequest?Ge(r.schemaRequest):Q.Warning;if(l){if(l.errors.length&&i.root&&v){var p=i.root,S=p.type==="object"?p.properties[0]:void 0;if(S&&S.keyNode.value==="$schema"){var m=S.valueNode||S,b=H.create(t.positionAt(m.offset),t.positionAt(m.offset+m.length));o(ce.create(b,l.errors[0],v,oe.SchemaResolveError))}else{var b=H.create(t.positionAt(p.offset),t.positionAt(p.offset+1));o(ce.create(b,l.errors[0],v,oe.SchemaResolveError))}}else if(d){var E=i.validate(t,l.schema,d);E&&E.forEach(o)}pr(l.schema)&&(g=void 0),vr(l.schema)&&(h=void 0)}for(var O=0,N=i.syntaxErrors;O<N.length;O++){var T=N[O];if(T.code===oe.TrailingComma){if(typeof h!="number")continue;T.severity=h}o(T)}if(typeof g=="number"){var I=vn("InvalidCommentToken","Comments are not permitted in JSON.");i.comments.forEach(function(k){o(ce.create(k,I,g,oe.CommentNotPermitted))})}return u};if(n){var f=n.id||"schemaservice://untitled/"+mn++;return this.jsonSchemaService.resolveSchemaContent(new ke(n),f,{}).then(function(l){return c(l)})}return this.jsonSchemaService.getSchemaForResource(t.uri,i).then(function(l){return c(l)})},e}(),mn=0;function pr(e){if(e&&typeof e=="object"){if(ne(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,i=e.allOf;t<i.length;t++){var r=i[t],n=pr(r);if(ne(n))return n}}}function vr(e){if(e&&typeof e=="object"){if(ne(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(ne(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var i=0,r=e.allOf;i<r.length;i++){var n=r[i],a=vr(n);if(ne(a))return a}}}function Ge(e){switch(e){case"error":return Q.Error;case"warning":return Q.Warning;case"ignore":return}}var mr=48,yn=57,bn=65,Ze=97,kn=102;function K(e){return e<mr?0:e<=yn?e-mr:(e<Ze&&(e+=Ze-bn),e>=Ze&&e<=kn?e-Ze+10:0)}function Sn(e){if(e[0]==="#")switch(e.length){case 4:return{red:K(e.charCodeAt(1))*17/255,green:K(e.charCodeAt(2))*17/255,blue:K(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:K(e.charCodeAt(1))*17/255,green:K(e.charCodeAt(2))*17/255,blue:K(e.charCodeAt(3))*17/255,alpha:K(e.charCodeAt(4))*17/255};case 7:return{red:(K(e.charCodeAt(1))*16+K(e.charCodeAt(2)))/255,green:(K(e.charCodeAt(3))*16+K(e.charCodeAt(4)))/255,blue:(K(e.charCodeAt(5))*16+K(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(K(e.charCodeAt(1))*16+K(e.charCodeAt(2)))/255,green:(K(e.charCodeAt(3))*16+K(e.charCodeAt(4)))/255,blue:(K(e.charCodeAt(5))*16+K(e.charCodeAt(6)))/255,alpha:(K(e.charCodeAt(7))*16+K(e.charCodeAt(8)))/255}}}function Ii(e,t,i,r){return r===void 0&&(r=1),{red:e/255,green:t/255,blue:i/255,alpha:r}}var Ni=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,i,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var u=r.resultLimit||Number.MAX_VALUE,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||Oe(s.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var o=[],c=0,f=a.items;c<f.length;c++){var l=f[c];if(l.type==="object")for(var h=0,g=l.properties;h<g.length;h++){var d=g[h];if(d.keyNode.value==="key"&&d.valueNode){var v=je.create(t.uri,pe(t,l));if(o.push({name:he(d.valueNode),kind:q.Function,location:v}),u--,u<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),o}}}return o}for(var p=[{node:a,containerName:""}],S=0,m=!1,b=[],E=function(N,T){N.type==="array"?N.items.forEach(function(I){I&&p.push({node:I,containerName:T})}):N.type==="object"&&N.properties.forEach(function(I){var k=I.valueNode;if(k)if(u>0){u--;var w=je.create(t.uri,pe(t,I)),P=T?T+"."+I.keyNode.value:I.keyNode.value;b.push({name:n.getKeyLabel(I),kind:n.getSymbolKind(k.type),location:w,containerName:T}),p.push({node:k,containerName:P})}else m=!0})};S<p.length;){var O=p[S++];E(O.node,O.containerName)}return m&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),b},e.prototype.findDocumentSymbols2=function(t,i,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var u=r.resultLimit||Number.MAX_VALUE,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||Oe(s.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var o=[],c=0,f=a.items;c<f.length;c++){var l=f[c];if(l.type==="object")for(var h=0,g=l.properties;h<g.length;h++){var d=g[h];if(d.keyNode.value==="key"&&d.valueNode){var v=pe(t,l),p=pe(t,d.keyNode);if(o.push({name:he(d.valueNode),kind:q.Function,range:v,selectionRange:p}),u--,u<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),o}}}return o}for(var S=[],m=[{node:a,result:S}],b=0,E=!1,O=function(T,I){T.type==="array"?T.items.forEach(function(k,w){if(k)if(u>0){u--;var P=pe(t,k),M=P,V=String(w),$={name:V,kind:n.getSymbolKind(k.type),range:P,selectionRange:M,children:[]};I.push($),m.push({result:$.children,node:k})}else E=!0}):T.type==="object"&&T.properties.forEach(function(k){var w=k.valueNode;if(w)if(u>0){u--;var P=pe(t,k),M=pe(t,k.keyNode),V=[],$={name:n.getKeyLabel(k),kind:n.getSymbolKind(w.type),range:P,selectionRange:M,children:V,detail:n.getDetail(w)};I.push($),m.push({result:V,node:w})}else E=!0})};b<m.length;){var N=m[b++];O(N.node,N.result)}return E&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),S},e.prototype.getSymbolKind=function(t){switch(t){case"object":return q.Module;case"string":return q.String;case"number":return q.Number;case"array":return q.Array;case"boolean":return q.Boolean;default:return q.Variable}},e.prototype.getKeyLabel=function(t){var i=t.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},e.prototype.getDetail=function(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,i,r){return this.schemaService.getSchemaForResource(t.uri,i).then(function(n){var a=[];if(n)for(var u=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,s=i.getMatchingSchemas(n.schema),o={},c=0,f=s;c<f.length;c++){var l=f[c];if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){var h=String(l.node.offset);if(!o[h]){var g=Sn(he(l.node));if(g){var d=pe(t,l.node);a.push({color:g,range:d})}if(o[h]=!0,u--,u<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),a}}}return a})},e.prototype.getColorPresentations=function(t,i,r,n){var a=[],u=Math.round(r.red*255),s=Math.round(r.green*255),o=Math.round(r.blue*255);function c(l){var h=l.toString(16);return h.length!==2?"0"+h:h}var f;return r.alpha===1?f="#"+c(u)+c(s)+c(o):f="#"+c(u)+c(s)+c(o)+c(Math.round(r.alpha*255)),a.push({label:f,textEdit:ae.replace(n,JSON.stringify(f))}),a},e}();function pe(e,t){return H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var _=we(),yr={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Cn={id:_("schema.json.id","A unique identifier for the schema."),$schema:_("schema.json.$schema","The schema to verify this document against."),title:_("schema.json.title","A descriptive title of the element."),description:_("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:_("schema.json.default","A default value. Used by suggestions."),multipleOf:_("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:_("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:_("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:_("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:_("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:_("schema.json.maxLength","The maximum length of a string."),minLength:_("schema.json.minLength","The minimum length of a string."),pattern:_("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:_("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:_("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:_("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:_("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:_("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:_("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:_("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:_("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:_("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:_("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:_("schema.json.properties","A map of property names to schemas for each property."),patternProperties:_("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:_("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:_("schema.json.enum","The set of literal values that are valid."),type:_("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:_("schema.json.format","Describes the format expected for the value."),allOf:_("schema.json.allOf","An array of schemas, all of which must match."),anyOf:_("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:_("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:_("schema.json.not","A schema which must not match."),$id:_("schema.json.$id","A unique identifier for the schema."),$ref:_("schema.json.$ref","Reference a definition hosted on any location."),$comment:_("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:_("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:_("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:_("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:_("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:_("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:_("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:_("schema.json.contentEncoding","Describes the content encoding of a string property."),if:_("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:_("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:_("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var An in yr.schemas){var dt=yr.schemas[An];for(var Ve in dt.properties){var gt=dt.properties[Ve];typeof gt=="boolean"&&(gt=dt.properties[Ve]={});var br=Cn[Ve];br?gt.description=br:console.log(Ve+": localize('schema.json."+Ve+`', "")`)}}function Pi(e,t){var i=[],r=[],n=[],a=-1,u=createScanner(e.getText(),!1),s=u.scan();function o(w){i.push(w),r.push(n.length)}for(;s!==17;){switch(s){case 1:case 3:{var c=e.positionAt(u.getTokenOffset()).line,f={startLine:c,endLine:c,kind:s===1?"object":"array"};n.push(f);break}case 2:case 4:{var l=s===2?"object":"array";if(n.length>0&&n[n.length-1].kind===l){var f=n.pop(),h=e.positionAt(u.getTokenOffset()).line;f&&h>f.startLine+1&&a!==f.startLine&&(f.endLine=h-1,o(f),a=f.startLine)}break}case 13:{var c=e.positionAt(u.getTokenOffset()).line,g=e.positionAt(u.getTokenOffset()+u.getTokenLength()).line;u.getTokenError()===1&&c+1<e.lineCount?u.setPosition(e.offsetAt(Position.create(c+1,0))):c<g&&(o({startLine:c,endLine:g,kind:FoldingRangeKind.Comment}),a=c);break}case 12:{var d=e.getText().substr(u.getTokenOffset(),u.getTokenLength()),v=d.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(v){var h=e.positionAt(u.getTokenOffset()).line;if(v[1]){var f={startLine:h,endLine:h,kind:FoldingRangeKind.Region};n.push(f)}else{for(var p=n.length-1;p>=0&&n[p].kind!==FoldingRangeKind.Region;)p--;if(p>=0){var f=n[p];n.length=p,h>f.startLine&&a!==f.startLine&&(f.endLine=h,o(f),a=f.startLine)}}}break}}s=u.scan()}var S=t&&t.rangeLimit;if(typeof S!="number"||i.length<=S)return i;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var m=[],b=0,E=r;b<E.length;b++){var O=E[b];O<30&&(m[O]=(m[O]||0)+1)}for(var N=0,T=0,p=0;p<m.length;p++){var I=m[p];if(I){if(I+N>S){T=p;break}N+=I}}for(var k=[],p=0;p<i.length;p++){var O=r[p];typeof O=="number"&&(O<T||O===T&&N++<S)&&k.push(i[p])}return k}function Mi(e,t,i){function r(s){for(var o=e.offsetAt(s),c=i.getNodeFromOffset(o,!0),f=[];c;){switch(c.type){case"string":case"object":case"array":var l=c.offset+1,h=c.offset+c.length-1;l<h&&o>=l&&o<=h&&f.push(n(l,h)),f.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":f.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var g=u(c.offset+c.length,5);g!==-1&&f.push(n(c.offset,g))}c=c.parent}for(var d=void 0,v=f.length-1;v>=0;v--)d=SelectionRange.create(f[v],d);return d||(d=SelectionRange.create(Range.create(s,s))),d}function n(s,o){return Range.create(e.positionAt(s),e.positionAt(o))}var a=createScanner(e.getText(),!0);function u(s,o){a.setPosition(s);var c=a.scan();return c===o?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function Fi(e,t){var i=[];return t.visit(function(r){var n;if(r.type==="property"&&r.keyNode.value==="$ref"&&((n=r.valueNode)===null||n===void 0?void 0:n.type)==="string"){var a=r.valueNode.value,u=Tn(t,a);if(u){var s=e.positionAt(u.offset);i.push({target:e.uri+"#"+(s.line+1)+","+(s.character+1),range:wn(e,r.valueNode)})}}return!0}),Promise.resolve(i)}function wn(e,t){return Range.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Tn(e,t){var i=xn(t);return i?pt(i,e.root):null}function pt(e,t){if(!t)return null;if(e.length===0)return t;var i=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(u){return u.keyNode.value===i});return r?pt(e,r.valueNode):null}else if(t&&t.type==="array"&&i.match(/^(0|[1-9][0-9]*)$/)){var n=Number.parseInt(i),a=t.items[n];return a?pt(e,a):null}return null}function xn(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(En)}function En(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Vi(e){var t=e.promiseConstructor||Promise,i=new JSONSchemaService(e.schemaRequestService,e.workspaceContext,t);i.setSchemaContributions(schemaContributions);var r=new JSONCompletion(i,e.contributions,t,e.clientCapabilities),n=new JSONHover(i,e.contributions,t),a=new JSONDocumentSymbols(i),u=new JSONValidation(i,t);return{configure:function(s){i.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(o){i.registerExternalSchema(o.uri,o.fileMatch,o.schema)}),u.configure(s)},resetSchema:function(s){return i.onResourceChange(s)},doValidation:u.doValidation.bind(u),parseJSONDocument:function(s){return parseJSON(s,{collectComments:!0})},newJSONDocument:function(s,o){return newJSONDocument(s,o)},getMatchingSchemas:i.getMatchingSchemas.bind(i),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:n.doHover.bind(n),getFoldingRanges,getSelectionRanges,findDefinition:function(){return Promise.resolve([])},findLinks,format:function(s,o,c){var f=void 0;if(o){var l=s.offsetAt(o.start),h=s.offsetAt(o.end)-l;f={offset:l,length:h}}var g={tabSize:c?c.tabSize:4,insertSpaces:(c==null?void 0:c.insertSpaces)===!0,insertFinalNewline:(c==null?void 0:c.insertFinalNewline)===!0,eol:`
|
|
`};return formatJSON(s.getText(),f,g).map(function(d){return TextEdit.replace(Range.create(s.positionAt(d.offset),s.positionAt(d.offset+d.length)),d.content)})}}}var On=function(){function e(t,i,r){var n=this;this._languageId=t,this._worker=i,this._disposables=[],this._listener=Object.create(null);var a=function(s){var o=s.getLanguageId();if(o===n._languageId){var c;n._listener[s.uri.toString()]=s.onDidChangeContent(function(){clearTimeout(c),c=setTimeout(function(){return n._doValidate(s.uri,o)},500)}),n._doValidate(s.uri,o)}},u=function(s){U.j6.setModelMarkers(s,n._languageId,[]);var o=s.uri.toString(),c=n._listener[o];c&&(c.dispose(),delete n._listener[o])};this._disposables.push(U.j6.onDidCreateModel(a)),this._disposables.push(U.j6.onWillDisposeModel(function(s){u(s),n._resetSchema(s.uri)})),this._disposables.push(U.j6.onDidChangeModelLanguage(function(s){u(s.model),a(s.model),n._resetSchema(s.model.uri)})),this._disposables.push(r.onDidChange(function(s){U.j6.getModels().forEach(function(o){o.getLanguageId()===n._languageId&&(u(o),a(o))})})),this._disposables.push({dispose:function(){U.j6.getModels().forEach(u);for(var s in n._listener)n._listener[s].dispose()}}),U.j6.getModels().forEach(a)}return e.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(t){this._worker().then(function(i){i.resetSchema(t.toString())})},e.prototype._doValidate=function(t,i){this._worker(t).then(function(r){return r.doValidation(t.toString()).then(function(n){var a=n.map(function(s){return In(t,s)}),u=U.j6.getModel(t);u&&u.getLanguageId()===i&&U.j6.setModelMarkers(u,i,a)})}).then(void 0,function(r){console.error(r)})},e}();function jn(e){switch(e){case Q.Error:return U.ZL.Error;case Q.Warning:return U.ZL.Warning;case Q.Information:return U.ZL.Info;case Q.Hint:return U.ZL.Hint;default:return U.ZL.Info}}function In(e,t){var i=typeof t.code=="number"?String(t.code):t.code;return{severity:jn(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}function vt(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function kr(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function se(e){if(e)return new U.e6(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Nn(e){return typeof e.insert!="undefined"&&typeof e.replace!="undefined"}function Pn(e){var t=U.Mj.CompletionItemKind;switch(e){case W.Text:return t.Text;case W.Method:return t.Method;case W.Function:return t.Function;case W.Constructor:return t.Constructor;case W.Field:return t.Field;case W.Variable:return t.Variable;case W.Class:return t.Class;case W.Interface:return t.Interface;case W.Module:return t.Module;case W.Property:return t.Property;case W.Unit:return t.Unit;case W.Value:return t.Value;case W.Enum:return t.Enum;case W.Keyword:return t.Keyword;case W.Snippet:return t.Snippet;case W.Color:return t.Color;case W.File:return t.File;case W.Reference:return t.Reference}return t.Property}function Li(e){var t=languages.CompletionItemKind;switch(e){case t.Text:return jsonService.CompletionItemKind.Text;case t.Method:return jsonService.CompletionItemKind.Method;case t.Function:return jsonService.CompletionItemKind.Function;case t.Constructor:return jsonService.CompletionItemKind.Constructor;case t.Field:return jsonService.CompletionItemKind.Field;case t.Variable:return jsonService.CompletionItemKind.Variable;case t.Class:return jsonService.CompletionItemKind.Class;case t.Interface:return jsonService.CompletionItemKind.Interface;case t.Module:return jsonService.CompletionItemKind.Module;case t.Property:return jsonService.CompletionItemKind.Property;case t.Unit:return jsonService.CompletionItemKind.Unit;case t.Value:return jsonService.CompletionItemKind.Value;case t.Enum:return jsonService.CompletionItemKind.Enum;case t.Keyword:return jsonService.CompletionItemKind.Keyword;case t.Snippet:return jsonService.CompletionItemKind.Snippet;case t.Color:return jsonService.CompletionItemKind.Color;case t.File:return jsonService.CompletionItemKind.File;case t.Reference:return jsonService.CompletionItemKind.Reference}return jsonService.CompletionItemKind.Property}function Le(e){if(e)return{range:se(e.range),text:e.newText}}function Mn(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Fn=function(){function e(t){this._worker=t}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":",'"']},enumerable:!1,configurable:!0}),e.prototype.provideCompletionItems=function(t,i,r,n){var a=t.uri;return this._worker(a).then(function(u){return u.doComplete(a.toString(),vt(i))}).then(function(u){if(u){var s=t.getWordUntilPosition(i),o=new U.e6(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),c=u.items.map(function(f){var l={label:f.label,insertText:f.insertText||f.label,sortText:f.sortText,filterText:f.filterText,documentation:f.documentation,detail:f.detail,command:Mn(f.command),range:o,kind:Pn(f.kind)};return f.textEdit&&(Nn(f.textEdit)?l.range={insert:se(f.textEdit.insert),replace:se(f.textEdit.replace)}:l.range=se(f.textEdit.range),l.insertText=f.textEdit.newText),f.additionalTextEdits&&(l.additionalTextEdits=f.additionalTextEdits.map(Le)),f.insertTextFormat===z.Snippet&&(l.insertTextRules=U.Mj.CompletionItemInsertTextRule.InsertAsSnippet),l});return{isIncomplete:u.isIncomplete,suggestions:c}}})},e}();function Vn(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Sr(e){return typeof e=="string"?{value:e}:Vn(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+`
|
|
`+e.value+"\n```\n"}}function Ln(e){if(e)return Array.isArray(e)?e.map(Sr):[Sr(e)]}var _n=function(){function e(t){this._worker=t}return e.prototype.provideHover=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.doHover(n.toString(),vt(i))}).then(function(a){if(a)return{range:se(a.range),contents:Ln(a.contents)}})},e}();function _i(e){return{uri:Uri.parse(e.uri),range:se(e.range)}}function $n(e){var t=U.Mj.SymbolKind;switch(e){case q.File:return t.Array;case q.Module:return t.Module;case q.Namespace:return t.Namespace;case q.Package:return t.Package;case q.Class:return t.Class;case q.Method:return t.Method;case q.Property:return t.Property;case q.Field:return t.Field;case q.Constructor:return t.Constructor;case q.Enum:return t.Enum;case q.Interface:return t.Interface;case q.Function:return t.Function;case q.Variable:return t.Variable;case q.Constant:return t.Constant;case q.String:return t.String;case q.Number:return t.Number;case q.Boolean:return t.Boolean;case q.Array:return t.Array}return t.Function}var Dn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentSymbols=function(t,i){var r=t.uri;return this._worker(r).then(function(n){return n.findDocumentSymbols(r.toString())}).then(function(n){if(n)return n.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:$n(a.kind),range:se(a.location.range),selectionRange:se(a.location.range),tags:[]}})})},e}();function Cr(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Rn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentFormattingEdits=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.format(n.toString(),null,Cr(i)).then(function(u){if(!(!u||u.length===0))return u.map(Le)})})},e}(),Un=function(){function e(t){this._worker=t}return e.prototype.provideDocumentRangeFormattingEdits=function(t,i,r,n){var a=t.uri;return this._worker(a).then(function(u){return u.format(a.toString(),kr(i),Cr(r)).then(function(s){if(!(!s||s.length===0))return s.map(Le)})})},e}(),Wn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentColors=function(t,i){var r=t.uri;return this._worker(r).then(function(n){return n.findDocumentColors(r.toString())}).then(function(n){if(n)return n.map(function(a){return{color:a.color,range:se(a.range)}})})},e.prototype.provideColorPresentations=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getColorPresentations(n.toString(),i.color,kr(i.range))}).then(function(a){if(a)return a.map(function(u){var s={label:u.label};return u.textEdit&&(s.textEdit=Le(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(Le)),s})})},e}(),qn=function(){function e(t){this._worker=t}return e.prototype.provideFoldingRanges=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getFoldingRanges(n.toString(),i)}).then(function(a){if(a)return a.map(function(u){var s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind!="undefined"&&(s.kind=Jn(u.kind)),s})})},e}();function Jn(e){switch(e){case Ie.Comment:return U.Mj.FoldingRangeKind.Comment;case Ie.Imports:return U.Mj.FoldingRangeKind.Imports;case Ie.Region:return U.Mj.FoldingRangeKind.Region}}var Bn=function(){function e(t){this._worker=t}return e.prototype.provideSelectionRanges=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getSelectionRanges(n.toString(),i.map(vt))}).then(function(a){if(a)return a.map(function(u){for(var s=[];u;)s.push({range:se(u.range)}),u=u.parent;return s})})},e}();function Hn(e){return{getInitialState:function(){return new Tr(null,null,!1,null)},tokenize:function(t,i,r,n){return ri(e,t,i,r,n)}}}var Ar="delimiter.bracket.json",wr="delimiter.array.json",zn="delimiter.colon.json",Kn="delimiter.comma.json",Gn="keyword.json",Zn="keyword.json",Xn="string.value.json",Qn="number.json",Yn="string.key.json",ei="comment.block.json",ti="comment.line.json",_e=function(){function e(t,i){this.parent=t,this.type=i}return e.pop=function(t){return t?t.parent:null},e.push=function(t,i){return new e(t,i)},e.equals=function(t,i){if(!t&&!i)return!0;if(!t||!i)return!1;for(;t&&i;){if(t===i)return!0;if(t.type!==i.type)return!1;t=t.parent,i=i.parent}return!0},e}(),Tr=function(){function e(t,i,r,n){this._state=t,this.scanError=i,this.lastWasColon=r,this.parents=n}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon,this.parents)},e.prototype.equals=function(t){return t===this?!0:!t||!(t instanceof e)?!1:this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&_e.equals(this.parents,t.parents)},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(t){this._state=t},e}();function ri(e,t,i,r,n){r===void 0&&(r=0);var a=0,u=!1;switch(i.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2;break}for(var s=Re(t),o=i.lastWasColon,c=i.parents,f={tokens:[],endState:i.clone()};;){var l=r+s.getPosition(),h="",g=s.scan();if(g===17)break;if(l===r+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(s.getPosition(),3));switch(u&&(l-=a),u=a>0,g){case 1:c=_e.push(c,0),h=Ar,o=!1;break;case 2:c=_e.pop(c),h=Ar,o=!1;break;case 3:c=_e.push(c,1),h=wr,o=!1;break;case 4:c=_e.pop(c),h=wr,o=!1;break;case 6:h=zn,o=!0;break;case 5:h=Kn,o=!1;break;case 8:case 9:h=Gn,o=!1;break;case 7:h=Zn,o=!1;break;case 10:var d=c?c.type:0,v=d===1;h=o||v?Xn:Yn,o=!1;break;case 11:h=Qn,o=!1;break}if(e)switch(g){case 12:h=ti;break;case 13:h=ei;break}f.endState=new Tr(i.getStateData(),s.getTokenError(),o,c),f.tokens.push({startIndex:l,scopes:h})}return f}function ni(e){var t=[],i=[],r=new Fr(e);t.push(r);var n=function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];return r.getLanguageServiceWorker.apply(r,s)};function a(){var s=e.languageId,o=e.modeConfiguration;Er(i),o.documentFormattingEdits&&i.push(U.Mj.registerDocumentFormattingEditProvider(s,new Rn(n))),o.documentRangeFormattingEdits&&i.push(U.Mj.registerDocumentRangeFormattingEditProvider(s,new Un(n))),o.completionItems&&i.push(U.Mj.registerCompletionItemProvider(s,new Fn(n))),o.hovers&&i.push(U.Mj.registerHoverProvider(s,new _n(n))),o.documentSymbols&&i.push(U.Mj.registerDocumentSymbolProvider(s,new Dn(n))),o.tokens&&i.push(U.Mj.setTokensProvider(s,Hn(!0))),o.colors&&i.push(U.Mj.registerColorProvider(s,new Wn(n))),o.foldingRanges&&i.push(U.Mj.registerFoldingRangeProvider(s,new qn(n))),o.diagnostics&&i.push(new On(s,n,e)),o.selectionRanges&&i.push(U.Mj.registerSelectionRangeProvider(s,new Bn(n)))}a(),t.push(U.Mj.setLanguageConfiguration(e.languageId,ii));var u=e.modeConfiguration;return e.onDidChange(function(s){s.modeConfiguration!==u&&(u=s.modeConfiguration,a())}),t.push(xr(i)),xr(t)}function xr(e){return{dispose:function(){return Er(e)}}}function Er(e){for(;e.length;)e.pop().dispose()}var ii={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}}}]);
|