monaco-json
Advanced tools
Comparing version 1.0.7 to 1.1.0
{ | ||
"name": "monaco-json", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"description": "JSON plugin for the Monaco Editor", | ||
@@ -21,16 +21,18 @@ "scripts": { | ||
}, | ||
"dependencies": { | ||
"vscode-json-languageservice": "^1.1.5-next.1", | ||
"vscode-languageserver-types": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"vscode-json-languageservice": "^1.1.7", | ||
"vscode-languageserver-types": "^1.0.2", | ||
"event-stream": "^3.3.2", | ||
"gulp": "^3.9.1", | ||
"gulp-requirejs": "^0.1.3", | ||
"gulp-tsb": "^1.10.4", | ||
"gulp-tsb": "^2.0.0", | ||
"gulp-uglify": "^1.5.3", | ||
"merge-stream": "^1.0.0", | ||
"monaco-editor-core": "0.6.0", | ||
"monaco-editor-core": "^0.7.0", | ||
"object-assign": "^4.1.0", | ||
"rimraf": "^2.5.2", | ||
"typescript": "1.8.10" | ||
"typescript": "2.0.3" | ||
} | ||
} |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-json version: 1.0.7(9904c49bdae21c25ef476d94942c9330867e6fd3) | ||
* monaco-json version: 1.1.0(69912f9b934810d5ea3551fcac4fac07359d116a) | ||
* Released under the MIT license | ||
* https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md | ||
*-----------------------------------------------------------------------------*/ | ||
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/workerManager",["require","exports"],e)}(function(e,n){function t(e){var n,t,o=new r(function(e,r){n=e,t=r},function(){});return e.then(n,t),o}var r=monaco.Promise,o=12e4,a=function(){function e(e){var n=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._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 e=Date.now()-this._lastUsedTime;e>o&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];var o;return t(this._getClient().then(function(e){o=e}).then(function(t){return e._worker.withSyncedResources(n)}).then(function(e){return o}))},e}();n.WorkerManager=a}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-languageserver-types/main",["require","exports"],e)}(function(e,n){var t;!function(e){function n(e,n){return{line:e,character:n}}function t(e){var n=e;return C.defined(n)&&C.number(n.line)&&C.number(n.character)}e.create=n,e.is=t}(t=n.Position||(n.Position={}));var r;!function(e){function n(e,n,r,o){if(C.number(e)&&C.number(n)&&C.number(r)&&C.number(o))return{start:t.create(e,n),end:t.create(r,o)};if(t.is(e)&&t.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+r+", "+o+"]")}function r(e){var n=e;return C.defined(n)&&t.is(n.start)&&t.is(n.end)}e.create=n,e.is=r}(r=n.Range||(n.Range={}));var o;!function(e){function n(e,n){return{uri:e,range:n}}function t(e){var n=e;return C.defined(n)&&r.is(n.range)&&(C.string(n.uri)||C.undefined(n.uri))}e.create=n,e.is=t}(o=n.Location||(n.Location={}));var a;!function(e){function n(e,n,t,r,o){var a={range:e,message:n};return C.defined(t)&&(a.severity=t),C.defined(r)&&(a.code=r),C.defined(o)&&(a.source=o),a}function t(e){var n=e;return C.defined(n)&&r.is(n.range)&&C.string(n.message)&&(C.number(n.severity)||C.undefined(n.severity))&&(C.number(n.code)||C.string(n.code)||C.undefined(n.code))&&(C.string(n.source)||C.undefined(n.source))}e.create=n,e.is=t}(a=n.Diagnostic||(n.Diagnostic={}));var i;!function(e){function n(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o={title:e,command:n};return C.defined(t)&&t.length>0&&(o.arguments=t),o}function t(e){var n=e;return C.defined(n)&&C.string(n.title)&&C.string(n.title)}e.create=n,e.is=t}(i=n.Command||(n.Command={}));var c;!function(e){function n(e,n){return{range:e,newText:n}}function t(e,n){return{range:{start:e,end:e},newText:n}}function r(e){return{range:e,newText:""}}e.replace=n,e.insert=t,e.del=r}(c=n.TextEdit||(n.TextEdit={}));var u=function(){function e(){this.workspaceEdit={changes:Object.create(null)},this.textEditChanges=Object.create(null)}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){var n=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,n){this.edits.push(c.insert(e,n))},e.prototype.replace=function(e,n){this.edits.push(c.replace(e,n))},e.prototype["delete"]=function(e){this.edits.push(c.del(e))},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),t=this.textEditChanges[e];if(!t){var r=[];this.workspaceEdit.changes[e]=r,t=new n(r),this.textEditChanges[e]=t}return t},e}();n.WorkspaceChange=u;var s;!function(e){function n(e){return{uri:e}}function t(e){var n=e;return C.defined(n)&&C.string(n.uri)}e.create=n,e.is=t}(s=n.TextDocumentIdentifier||(n.TextDocumentIdentifier={}));var d;!function(e){function n(e,n){return{uri:e,version:n}}function t(e){var n=e;return C.defined(n)&&C.string(n.uri)&&C.number(n.version)}e.create=n,e.is=t}(d=n.VersionedTextDocumentIdentifier||(n.VersionedTextDocumentIdentifier={}));var l;!function(e){function n(e,n,t,r){return{uri:e,languageId:n,version:t,text:r}}function t(e){var n=e;return C.defined(n)&&C.string(n.uri)&&C.string(n.languageId)&&C.number(n.version)&&C.string(n.text)}e.create=n,e.is=t}(l=n.TextDocumentItem||(n.TextDocumentItem={}));var f;!function(e){function n(e){return{label:e}}e.create=n}(f=n.CompletionItem||(n.CompletionItem={}));var p;!function(e){function n(e,n){return{items:e?e:[],isIncomplete:!!n}}e.create=n}(p=n.CompletionList||(n.CompletionList={}));var g;!function(e){function n(e,n){return n?{label:e,documentation:n}:{label:e}}e.create=n}(g=n.ParameterInformation||(n.ParameterInformation={}));var m;!function(e){function n(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o={label:e};return C.defined(n)&&(o.documentation=n),C.defined(t)?o.parameters=t:o.parameters=[],o}e.create=n}(m=n.SignatureInformation||(n.SignatureInformation={}));var h;!function(e){function n(e,n){var t={range:e};return C.number(n)&&(t.kind=n),t}e.create=n}(h=n.DocumentHighlight||(n.DocumentHighlight={}));var v;!function(e){function n(e,n,t,r,o){var a={name:e,kind:n,location:{uri:r,range:t}};return o&&(a.containerName=o),a}e.create=n}(v=n.SymbolInformation||(n.SymbolInformation={}));var k;!function(e){function n(e){return{diagnostics:e}}function t(e){var n=e;return C.defined(n)&&C.typedArray(n.diagnostics,a.is)}e.create=n,e.is=t}(k=n.CodeActionContext||(n.CodeActionContext={}));var b;!function(e){function n(e,n){var t={range:e};return C.defined(n)&&(t.data=n),t}function t(e){var n=e;return C.defined(n)&&r.is(n.range)&&(C.undefined(n.command)||i.is(n.command))}e.create=n,e.is=t}(b=n.CodeLens||(n.CodeLens={}));var y;!function(e){function n(e,n){return{tabSize:e,insertSpaces:n}}function t(e){var n=e;return C.defined(n)&&C.number(n.tabSize)&&C["boolean"](n.insertSpaces)}e.create=n,e.is=t}(y=n.FormattingOptions||(n.FormattingOptions={}));var E;!function(e){function n(e,n,t,r){return new T(e,n,t,r)}function t(e){var n=e;return!!(C.defined(n)&&C.string(n.uri)&&(C.undefined(n.languageId)||C.string(n.languageId))&&C.number(n.lineCount)&&C.func(n.getText)&&C.func(n.positionAt)&&C.func(n.offsetAt))}e.create=n,e.is=t}(E=n.TextDocument||(n.TextDocument={}));var C,T=function(){function e(e,n,t,r){this._uri=e,this._languageId=n,this._version=t,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._content},e.prototype.update=function(e,n){this._content=e.text,this._version=n,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],n=this._content,t=!0,r=0;r<n.length;r++){t&&(e.push(r),t=!1);var o=n.charAt(r);t="\r"===o||"\n"===o,"\r"===o&&r+1<n.length&&"\n"===n.charAt(r+1)&&r++}t&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,o=n.length;if(0===o)return t.create(0,e);for(;r<o;){var a=Math.floor((r+o)/2);n[a]>e?o=a:r=a+1}var i=r-1;return t.create(i,e-n[i])},e.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var t=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(t+e.character,r),t)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){function n(e){return"undefined"!=typeof e}function t(e){return"undefined"==typeof e}function r(e){return e===!0||e===!1}function o(e){return"[object String]"===u.call(e)}function a(e){return"[object Number]"===u.call(e)}function i(e){return"[object Function]"===u.call(e)}function c(e,n){return Array.isArray(e)&&e.every(n)}var u=Object.prototype.toString;e.defined=n,e.undefined=t,e["boolean"]=r,e.string=o,e.number=a,e.func=i,e.typedArray=c}(C||(C={}))}),define("vscode-languageserver-types",["vscode-languageserver-types/main"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/languageFeatures",["require","exports","vscode-languageserver-types"],e)}(function(e,n){function t(e){switch(e){case 1:return monaco.Severity.Error;case 2:return monaco.Severity.Warning;case 3:case 4:default:return monaco.Severity.Info}}function r(e,n){var r="number"==typeof n.code?String(n.code):n.code;return{severity:t(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:r,source:n.source}}function o(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function a(e){if(e)return{start:o(e.getStartPosition()),end:o(e.getEndPosition())}}function i(e){if(e)return new b(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function c(e){var n=monaco.languages.CompletionItemKind;switch(e){case 1:return n.Text;case 2:return n.Method;case 3:return n.Function;case 4:return n.Constructor;case 5:return n.Field;case 6:return n.Variable;case 7:return n.Class;case 8:return n.Interface;case 9:return n.Module;case 10:return n.Property;case 11:return n.Unit;case 12:return n.Value;case 13:return n.Enum;case 14:return n.Keyword;case 15:return n.Snippet;case 16:return n.Color;case 17:return n.File;case 18:return n.Reference}return n.Property}function u(e){var n=monaco.languages.CompletionItemKind;switch(e){case n.Text:return 1;case n.Method:return 2;case n.Function:return 3;case n.Constructor:return 4;case n.Field:return 5;case n.Variable:return 6;case n.Class:return 7;case n.Interface:return 8;case n.Module:return 9;case n.Property:return 10;case n.Unit:return 11;case n.Value:return 12;case n.Enum:return 13;case n.Keyword:return 14;case n.Snippet:return 15;case n.Color:return 16;case n.File:return 17;case n.Reference:return 18}return 10}function s(e){if(e)return{range:i(e.range),text:e.newText}}function d(e){if(e)return{range:a(b.lift(e.range)),newText:e.text}}function l(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:c(e.kind),textEdit:s(e.textEdit),data:e.data}}function f(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:u(e.kind),textEdit:d(e.textEdit),data:e.data}}function p(e){if(e)return Array.isArray(e)?e:[e]}function g(e){return{uri:k.parse(e.uri),range:i(e.range)}}function m(e){var n=monaco.languages.SymbolKind;switch(e){case 1:return n.Array;case 2:return n.Module;case 3:return n.Namespace;case 4:return n.Package;case 5:return n.Class;case 6:return n.Method;case 7:return n.Property;case 8:return n.Field;case 9:return n.Constructor;case 10:return n.Enum;case 11:return n.Interface;case 12:return n.Function;case 13:return n.Variable;case 14:return n.Constant;case 15:return n.String;case 16:return n.Number;case 17:return n.Boolean;case 18:return n.Array}return n.Function}function h(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}function v(e,n){return n.cancel&&e.onCancellationRequested(function(){return n.cancel()}),n}var k=(e("vscode-languageserver-types"),monaco.Uri),b=monaco.Range,y=function(){function e(e,n){var t=this;this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null);var r=function(e){var n=e.getModeId();if(n===t._languageId){var r;t._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(r),r=setTimeout(function(){return t._doValidate(e.uri,n)},500)}),t._doValidate(e.uri,n)}},o=function(e){monaco.editor.setModelMarkers(e,t._languageId,[]),delete t._listener[e.uri.toString()]};this._disposables.push(monaco.editor.onDidCreateModel(r)),this._disposables.push(monaco.editor.onWillDisposeModel(function(e){o(e),t._resetSchema(e.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){o(e.model),r(e.model),t._resetSchema(e.model.uri)})),this._disposables.push({dispose:function(){for(var e in t._listener)t._listener[e].dispose()}}),monaco.editor.getModels().forEach(r)}return e.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(e){this._worker().then(function(n){n.resetSchema(e.toString())})},e.prototype._doValidate=function(e,n){this._worker(e).then(function(t){return t.doValidation(e.toString()).then(function(t){var o=t.map(function(n){return r(e,n)});monaco.editor.setModelMarkers(monaco.editor.getModel(e),n,o)})}).then(void 0,function(e){console.error(e)})},e}();n.DiagnostcsAdapter=y;var E=function(){function e(e){this._worker=e}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),e.prototype.provideCompletionItems=function(e,n,t){var r=(e.getWordUntilPosition(n),e.uri);return v(t,this._worker(r).then(function(e){return e.doComplete(r.toString(),o(n)).then(function(e){if(e){var n=e.items.map(function(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:c(e.kind),textEdit:s(e.textEdit)}});return{isIncomplete:e.isIncomplete,items:n}}})}))},e.prototype.resolveCompletionItem=function(e,n){return v(n,this._worker().then(function(n){var t=f(e);return n.doResolve(t).then(function(e){return l(e)})}))},e}();n.CompletionAdapter=E;var C=function(){function e(e){this._worker=e}return e.prototype.provideHover=function(e,n,t){var r=e.uri;return v(t,this._worker(r).then(function(e){return e.doHover(r.toString(),o(n))}).then(function(e){if(e)return{range:i(e.range),contents:p(e.contents)}}))},e}();n.HoverAdapter=C;var T=function(){function e(e){this._worker=e}return e.prototype.provideDocumentSymbols=function(e,n){var t=e.uri;return v(n,this._worker(t).then(function(e){return e.findDocumentSymbols(t.toString())}).then(function(e){if(e)return e.map(function(e){return{name:e.name,containerName:e.containerName,kind:m(e.kind),location:g(e.location)}})}))},e}();n.DocumentSymbolAdapter=T;var x=function(){function e(e){this._worker=e}return e.prototype.provideDocumentFormattingEdits=function(e,n,t){var r=e.uri;return v(t,this._worker(r).then(function(e){return e.format(r.toString(),null,h(n)).then(function(e){if(e&&0!==e.length)return e.map(s)})}))},e}();n.DocumentFormattingEditProvider=x;var _=function(){function e(e){this._worker=e}return e.prototype.provideDocumentRangeFormattingEdits=function(e,n,t,r){var o=e.uri;return v(r,this._worker(o).then(function(e){return e.format(o.toString(),a(n),h(t)).then(function(e){if(e&&0!==e.length)return e.map(s)})}))},e}();n.DocumentRangeFormattingEditProvider=_}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-nls/vscode-nls",["require","exports"],e)}(function(e,n){function t(e,n){var t;return t=0===n.length?e:e.replace(/\{(\d+)\}/g,function(e,t){var r=t[0];return"undefined"!=typeof n[r]?n[r]:e})}function r(e,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return t(n,r)}function o(e){return r}function a(e){return o}n.loadMessageBundle=o,n.config=a}),define("vscode-nls",["vscode-nls/vscode-nls"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("jsonc-parser/main",["require","exports","vscode-nls"],e)}(function(e,n){function t(e,n){function t(n,t){for(var r=0,o=0;r<n||!t;){var a=e.charCodeAt(f);if(a>=b._0&&a<=b._9)o=16*o+a-b._0;else if(a>=b.A&&a<=b.F)o=16*o+a-b.A+10;else{if(!(a>=b.a&&a<=b.f))break;o=16*o+a-b.a+10}f++,r++}return r<n&&(o=-1),o}function i(e){f=e,g="",m=0,h=k.Unknown,y=v.None}function c(){var n=f;if(e.charCodeAt(f)===b._0)f++;else for(f++;f<e.length&&a(e.charCodeAt(f));)f++;if(f<e.length&&e.charCodeAt(f)===b.dot){if(f++,!(f<e.length&&a(e.charCodeAt(f))))return y=v.UnexpectedEndOfNumber,e.substring(n,f);for(f++;f<e.length&&a(e.charCodeAt(f));)f++}var t=f;if(f<e.length&&(e.charCodeAt(f)===b.E||e.charCodeAt(f)===b.e))if(f++,(f<e.length&&e.charCodeAt(f)===b.plus||e.charCodeAt(f)===b.minus)&&f++,f<e.length&&a(e.charCodeAt(f))){for(f++;f<e.length&&a(e.charCodeAt(f));)f++;t=f}else y=v.UnexpectedEndOfNumber;return e.substring(n,t)}function u(){for(var n="",r=f;;){if(f>=p){n+=e.substring(r,f),y=v.UnexpectedEndOfString;break}var a=e.charCodeAt(f);if(a===b.doubleQuote){n+=e.substring(r,f),f++;break}if(a!==b.backslash){if(o(a)){n+=e.substring(r,f),y=v.UnexpectedEndOfString;break}f++}else{if(n+=e.substring(r,f),f++,f>=p){y=v.UnexpectedEndOfString;break}switch(a=e.charCodeAt(f++)){case b.doubleQuote:n+='"';break;case b.backslash:n+="\\";break;case b.slash:n+="/";break;case b.b:n+="\b";break;case b.f:n+="\f";break;case b.n:n+="\n";break;case b.r:n+="\r";break;case b.t:n+="\t";break;case b.u:var i=t(4,!0);i>=0?n+=String.fromCharCode(i):y=v.InvalidUnicode;break;default:y=v.InvalidEscapeCharacter}r=f}}return n}function s(){if(g="",y=v.None,m=f,f>=p)return m=p,h=k.EOF;var n=e.charCodeAt(f);if(r(n)){do f++,g+=String.fromCharCode(n),n=e.charCodeAt(f);while(r(n));return h=k.Trivia}if(o(n))return f++,g+=String.fromCharCode(n),n===b.carriageReturn&&e.charCodeAt(f)===b.lineFeed&&(f++,g+="\n"),h=k.LineBreakTrivia;switch(n){case b.openBrace:return f++,h=k.OpenBraceToken;case b.closeBrace:return f++,h=k.CloseBraceToken;case b.openBracket:return f++,h=k.OpenBracketToken;case b.closeBracket:return f++,h=k.CloseBracketToken;case b.colon:return f++,h=k.ColonToken;case b.comma:return f++,h=k.CommaToken;case b.doubleQuote:return f++,g=u(),h=k.StringLiteral;case b.slash:var t=f-1;if(e.charCodeAt(f+1)===b.slash){for(f+=2;f<p&&!o(e.charCodeAt(f));)f++;return g=e.substring(t,f),h=k.LineCommentTrivia}if(e.charCodeAt(f+1)===b.asterisk){f+=2;for(var i=p-1,s=!1;f<i;){var l=e.charCodeAt(f);if(l===b.asterisk&&e.charCodeAt(f+1)===b.slash){f+=2,s=!0;break}f++}return s||(f++,y=v.UnexpectedEndOfComment),g=e.substring(t,f),h=k.BlockCommentTrivia}return g+=String.fromCharCode(n),f++,h=k.Unknown;case b.minus:if(g+=String.fromCharCode(n),f++,f===p||!a(e.charCodeAt(f)))return h=k.Unknown;case b._0:case b._1:case b._2:case b._3:case b._4:case b._5:case b._6:case b._7:case b._8:case b._9:return g+=c(),h=k.NumericLiteral;default:for(;f<p&&d(n);)f++,n=e.charCodeAt(f);if(m!==f){switch(g=e.substring(m,f)){case"true":return h=k.TrueKeyword;case"false":return h=k.FalseKeyword;case"null":return h=k.NullKeyword}return h=k.Unknown}return g+=String.fromCharCode(n),f++,h=k.Unknown}}function d(e){if(r(e)||o(e))return!1;switch(e){case b.closeBrace:case b.closeBracket:case b.openBrace:case b.openBracket:case b.doubleQuote:case b.colon:case b.comma:return!1}return!0}function l(){var e;do e=s();while(e>=k.LineCommentTrivia&&e<=k.Trivia);return e}void 0===n&&(n=!1);var f=0,p=e.length,g="",m=0,h=k.Unknown,y=v.None;return{setPosition:i,getPosition:function(){return f},scan:n?l:s,getToken:function(){return h},getTokenValue:function(){return g},getTokenOffset:function(){return m},getTokenLength:function(){return f-m},getTokenError:function(){return y}}}function r(e){return e===b.space||e===b.tab||e===b.verticalTab||e===b.formFeed||e===b.nonBreakingSpace||e===b.ogham||e>=b.enQuad&&e<=b.zeroWidthSpace||e===b.narrowNoBreakSpace||e===b.mathematicalSpace||e===b.ideographicSpace||e===b.byteOrderMark}function o(e){return e===b.lineFeed||e===b.carriageReturn||e===b.lineSeparator||e===b.paragraphSeparator}function a(e){return e>=b._0&&e<=b._9}function i(e,n){var r,o,a=t(e),i=[],c=0;do switch(o=a.getPosition(),r=a.scan()){case k.LineCommentTrivia:case k.BlockCommentTrivia:case k.EOF:c!==o&&i.push(e.substring(c,o)),void 0!==n&&i.push(a.getTokenValue().replace(/[^\r\n]/g,n)),c=a.getPosition()}while(r!==k.EOF);return i.join("")}function c(e){switch(e){case y.InvalidSymbol:return h("error.invalidSymbol","Invalid symbol");case y.InvalidNumberFormat:return h("error.invalidNumberFormat","Invalid number format");case y.PropertyNameExpected:return h("error.propertyNameExpected","Property name expected");case y.ValueExpected:return h("error.valueExpected","Value expected");case y.ColonExpected:return h("error.colonExpected","Colon expected");case y.CommaExpected:return h("error.commaExpected","Comma expected");case y.CloseBraceExpected:return h("error.closeBraceExpected","Closing brace expected");case y.CloseBracketExpected:return h("error.closeBracketExpected","Closing bracket expected");case y.EndOfFileExpected:return h("error.endOfFileExpected","End of file expected");default:return""}}function u(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function s(e,n){function t(e,n,t,r){i.value=e,i.offset=n,i.length=t,i.type=r,i.columnOffset=void 0,a=i}var r=[],o=new Object,a=void 0,i={value:void 0,offset:void 0,length:void 0,type:void 0},c=!1;try{g(e,{onObjectBegin:function(e,t){if(n<=e)throw o;a=void 0,c=n>e,r.push("")},onObjectProperty:function(e,a,i){if(n<a)throw o;if(t(e,a,i,"property"),r[r.length-1]=e,n<=a+i)throw o},onObjectEnd:function(e,t){if(n<=e)throw o;a=void 0,r.pop()},onArrayBegin:function(e,t){if(n<=e)throw o;a=void 0,r.push(0)},onArrayEnd:function(e,t){if(n<=e)throw o;a=void 0,r.pop()},onLiteralValue:function(e,r,a){if(n<r)throw o;if(t(e,r,a,u(e)),n<=r+a)throw o},onSeparator:function(e,t,i){if(n<=t)throw o;if(":"===e&&"property"===a.type)a.columnOffset=t,c=!1,a=void 0;else if(","===e){var u=r[r.length-1];"number"==typeof u?r[r.length-1]=u+1:(c=!0,r[r.length-1]=""),a=void 0}}})}catch(s){if(s!==o)throw s}return""===r[r.length-1]&&r.pop(),{path:r,previousNode:a,isAtPropertyKey:c,matches:function(e){for(var n=0,t=0;n<e.length&&t<r.length;t++)if(e[n]===r[t]||"*"===e[n])n++;else if("**"!==e[n])return!1;return n===e.length}}}function d(e,n,t){function r(e){Array.isArray(a)?a.push(e):o&&(a[o]=e)}void 0===n&&(n=[]);var o=null,a=[],i=[],c={onObjectBegin:function(){var e={};r(e),i.push(a),a=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){a=i.pop()},onArrayBegin:function(){var e=[];r(e),i.push(a),a=e,o=null},onArrayEnd:function(){a=i.pop()},onLiteralValue:r,onError:function(e){n.push({error:e})}};return g(e,c,t),a[0]}function l(e,n,t){function r(e){"property"===a.type&&(a.length=e-a.offset,a=a.parent)}function o(e){return a.children.push(e),r(e.offset+e.length),e}void 0===n&&(n=[]);var a={type:"array",offset:-1,length:-1,children:[]},i={onObjectBegin:function(e){a=o({type:"object",offset:e,length:-1,parent:a,children:[]})},onObjectProperty:function(e,n,t){a=o({type:"property",offset:n,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:e,offset:n,length:t,parent:a})},onObjectEnd:function(e,n){r(e),a.length=e+n-a.offset,a=a.parent},onArrayBegin:function(e,n){a=o({type:"array",offset:e,length:-1,parent:a,children:[]})},onArrayEnd:function(e,n){a.length=e+n-a.offset,a=a.parent},onLiteralValue:function(e,n,t){o({type:u(e),offset:n,length:t,parent:a,value:e})},onSeparator:function(e,n,t){"property"===a.type&&(":"===e?a.columnOffset=n:","===e&&r(n))},onError:function(e){n.push({error:e})}};g(e,i,t);var c=a.children[0];return c&&delete c.parent,c}function f(e,n){if(e){for(var t=e,r=0,o=n;r<o.length;r++){var a=o[r];if("string"==typeof a){if("object"!==t.type)return;for(var i=!1,c=0,u=t.children;c<u.length;c++){var s=u[c];if(s.children[0].value===a){t=s.children[1],i=!0;break}}if(!i)return}else{var d=a;if("array"!==t.type||d<0||d>=t.children.length)return;t=t.children[d]}}return t}}function p(e){if("array"===e.type)return e.children.map(p);if("object"===e.type){for(var n={},t=0,r=e.children;t<r.length;t++){var o=r[t];n[o.children[0].value]=p(o.children[1])}return n}return e.value}function g(e,n,r){function o(e){return e?function(){return e(g.getTokenOffset(),g.getTokenLength())}:function(){return!0}}function a(e){return e?function(n){return e(n,g.getTokenOffset(),g.getTokenLength())}:function(){return!0}}function i(){for(;;){var e=g.scan();switch(e){case k.LineCommentTrivia:case k.BlockCommentTrivia:_&&c(y.InvalidSymbol);break;case k.Unknown:c(y.InvalidSymbol);break;case k.Trivia:case k.LineBreakTrivia:break;default:return e}}}function c(e,n,t){if(void 0===n&&(n=[]),void 0===t&&(t=[]),x(e),n.length+t.length>0)for(var r=g.getToken();r!==k.EOF;){if(n.indexOf(r)!==-1){i();break}if(t.indexOf(r)!==-1)break;r=i()}}function u(e){if(g.getToken()!==k.StringLiteral)return!1;var n=g.getTokenValue();return e?C(n):h(n),i(),!0}function s(){switch(g.getToken()){case k.NumericLiteral:var e=0;try{e=JSON.parse(g.getTokenValue()),"number"!=typeof e&&(c(y.InvalidNumberFormat),e=0)}catch(n){c(y.InvalidNumberFormat)}C(e);break;case k.NullKeyword:C(null);break;case k.TrueKeyword:C(!0);break;case k.FalseKeyword:C(!1);break;default:return!1}return i(),!0}function d(){return u(!1)?(g.getToken()===k.ColonToken?(T(":"),i(),p()||c(y.ValueExpected,[],[k.CloseBraceToken,k.CommaToken])):c(y.ColonExpected,[],[k.CloseBraceToken,k.CommaToken]),!0):(c(y.PropertyNameExpected,[],[k.CloseBraceToken,k.CommaToken]),!1)}function l(){if(g.getToken()!==k.OpenBraceToken)return!1;m(),i();for(var e=!1;g.getToken()!==k.CloseBraceToken&&g.getToken()!==k.EOF;)g.getToken()===k.CommaToken?(e||c(y.ValueExpected,[],[]),T(","),i()):e&&c(y.CommaExpected,[],[]),d()||c(y.ValueExpected,[],[k.CloseBraceToken,k.CommaToken]),e=!0;return v(),g.getToken()!==k.CloseBraceToken?c(y.CloseBraceExpected,[k.CloseBraceToken],[]):i(),!0}function f(){if(g.getToken()!==k.OpenBracketToken)return!1;b(),i();for(var e=!1;g.getToken()!==k.CloseBracketToken&&g.getToken()!==k.EOF;)g.getToken()===k.CommaToken?(e||c(y.ValueExpected,[],[]),T(","),i()):e&&c(y.CommaExpected,[],[]),p()||c(y.ValueExpected,[],[k.CloseBracketToken,k.CommaToken]),e=!0;return E(),g.getToken()!==k.CloseBracketToken?c(y.CloseBracketExpected,[k.CloseBracketToken],[]):i(),!0}function p(){return f()||l()||u(!0)||s()}var g=t(e,!1),m=o(n.onObjectBegin),h=a(n.onObjectProperty),v=o(n.onObjectEnd),b=o(n.onArrayBegin),E=o(n.onArrayEnd),C=a(n.onLiteralValue),T=a(n.onSeparator),x=a(n.onError),_=r&&r.disallowComments;return i(),g.getToken()===k.EOF||(p()?(g.getToken()!==k.EOF&&c(y.EndOfFileExpected,[],[]),!0):(c(y.ValueExpected,[],[]),!1))}var m=e("vscode-nls"),h=m.loadMessageBundle();!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(n.ScanError||(n.ScanError={}));var v=n.ScanError;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(n.SyntaxKind||(n.SyntaxKind={}));var k=n.SyntaxKind;n.createScanner=t;var b;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(b||(b={})),n.stripComments=i,function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(n.ParseErrorCode||(n.ParseErrorCode={}));var y=n.ParseErrorCode;n.getParseErrorMessage=c, | ||
n.getLocation=s,n.parse=d,n.parseTree=l,n.findNodeAtLocation=f,n.getNodeValue=p,n.visit=g}),define("jsonc-parser",["jsonc-parser/main"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/tokenization",["require","exports","jsonc-parser"],e)}(function(e,n){function t(e){return{getInitialState:function(){return new a(null,null,(!1))},tokenize:function(n,t,o,a){return r(e,n,t,o,a)}}}function r(e,t,r,i,c){void 0===i&&(i=0);var u=0,s=!1;switch(r.scanError){case o.ScanError.UnexpectedEndOfString:t='"'+t,u=1;break;case o.ScanError.UnexpectedEndOfComment:t="/*"+t,u=2}var d,l,f=o.createScanner(t),p=r.lastWasColon;for(l={tokens:[],endState:r.clone()};;){var g=i+f.getPosition(),m="";if(d=f.scan(),d===o.SyntaxKind.EOF)break;if(g===i+f.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(f.getPosition(),3));switch(s&&(g-=u),s=u>0,d){case o.SyntaxKind.OpenBraceToken:m=n.TOKEN_DELIM_OBJECT,p=!1;break;case o.SyntaxKind.CloseBraceToken:m=n.TOKEN_DELIM_OBJECT,p=!1;break;case o.SyntaxKind.OpenBracketToken:m=n.TOKEN_DELIM_ARRAY,p=!1;break;case o.SyntaxKind.CloseBracketToken:m=n.TOKEN_DELIM_ARRAY,p=!1;break;case o.SyntaxKind.ColonToken:m=n.TOKEN_DELIM_COLON,p=!0;break;case o.SyntaxKind.CommaToken:m=n.TOKEN_DELIM_COMMA,p=!1;break;case o.SyntaxKind.TrueKeyword:case o.SyntaxKind.FalseKeyword:m=n.TOKEN_VALUE_BOOLEAN,p=!1;break;case o.SyntaxKind.NullKeyword:m=n.TOKEN_VALUE_NULL,p=!1;break;case o.SyntaxKind.StringLiteral:m=p?n.TOKEN_VALUE_STRING:n.TOKEN_PROPERTY_NAME,p=!1;break;case o.SyntaxKind.NumericLiteral:m=n.TOKEN_VALUE_NUMBER,p=!1}if(e)switch(d){case o.SyntaxKind.LineCommentTrivia:m=n.TOKEN_COMMENT_LINE;break;case o.SyntaxKind.BlockCommentTrivia:m=n.TOKEN_COMMENT_BLOCK}l.endState=new a(r.getStateData(),f.getTokenError(),p),l.tokens.push({startIndex:g,scopes:m})}return l}var o=e("jsonc-parser");n.createTokenizationSupport=t,n.TOKEN_DELIM_OBJECT="punctuation.bracket.json",n.TOKEN_DELIM_ARRAY="punctuation.array.json",n.TOKEN_DELIM_COLON="punctuation.colon.json",n.TOKEN_DELIM_COMMA="punctuation.comma.json",n.TOKEN_VALUE_BOOLEAN="support.property-value.keyword.json",n.TOKEN_VALUE_NULL="support.property-value.constant.other.json",n.TOKEN_VALUE_STRING="support.property-value.string.value.json",n.TOKEN_VALUE_NUMBER="support.property-value.constant.numeric.json",n.TOKEN_PROPERTY_NAME="support.type.property-name.json",n.TOKEN_COMMENT_BLOCK="comment.block.json",n.TOKEN_COMMENT_LINE="comment.line.json";var a=function(){function e(e,n,t){this._state=e,this.scanError=n,this.lastWasColon=t}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(n){return n===this||!!(n&&n instanceof e)&&(this.scanError===n.scanError&&this.lastWasColon===n.lastWasColon)},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}()}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/jsonMode",["require","exports","./workerManager","./languageFeatures","./tokenization"],e)}(function(e,n){function t(e){var n=[],t=new r.WorkerManager(e);n.push(t);var c=function(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];return t.getLanguageServiceWorker.apply(t,e)},u=e.languageId;n.push(monaco.languages.registerCompletionItemProvider(u,new o.CompletionAdapter(c))),n.push(monaco.languages.registerHoverProvider(u,new o.HoverAdapter(c))),n.push(monaco.languages.registerDocumentSymbolProvider(u,new o.DocumentSymbolAdapter(c))),n.push(monaco.languages.registerDocumentFormattingEditProvider(u,new o.DocumentFormattingEditProvider(c))),n.push(monaco.languages.registerDocumentRangeFormattingEditProvider(u,new o.DocumentRangeFormattingEditProvider(c))),n.push(new o.DiagnostcsAdapter(u,c)),n.push(monaco.languages.setTokensProvider(u,a.createTokenizationSupport(!0))),n.push(monaco.languages.setLanguageConfiguration(u,i))}var r=e("./workerManager"),o=e("./languageFeatures"),a=e("./tokenization");n.setupMode=t;var i={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}}); | ||
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/workerManager",["require","exports"],e)}(function(e,n){function t(e){var n,t,o=new r(function(e,r){n=e,t=r},function(){});return e.then(n,t),o}var r=monaco.Promise,o=12e4,a=function(){function e(e){var n=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._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 e=Date.now()-this._lastUsedTime;e>o&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];var o;return t(this._getClient().then(function(e){o=e}).then(function(t){return e._worker.withSyncedResources(n)}).then(function(e){return o}))},e}();n.WorkerManager=a}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-languageserver-types/main",["require","exports"],e)}(function(e,n){var t;!function(e){function n(e,n){return{line:e,character:n}}function t(e){var n=e;return T.defined(n)&&T.number(n.line)&&T.number(n.character)}e.create=n,e.is=t}(t=n.Position||(n.Position={}));var r;!function(e){function n(e,n,r,o){if(T.number(e)&&T.number(n)&&T.number(r)&&T.number(o))return{start:t.create(e,n),end:t.create(r,o)};if(t.is(e)&&t.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+r+", "+o+"]")}function r(e){var n=e;return T.defined(n)&&t.is(n.start)&&t.is(n.end)}e.create=n,e.is=r}(r=n.Range||(n.Range={}));var o;!function(e){function n(e,n){return{uri:e,range:n}}function t(e){var n=e;return T.defined(n)&&r.is(n.range)&&(T.string(n.uri)||T.undefined(n.uri))}e.create=n,e.is=t}(o=n.Location||(n.Location={}));var a;!function(e){function n(e,n,t,r,o){var a={range:e,message:n};return T.defined(t)&&(a.severity=t),T.defined(r)&&(a.code=r),T.defined(o)&&(a.source=o),a}function t(e){var n=e;return T.defined(n)&&r.is(n.range)&&T.string(n.message)&&(T.number(n.severity)||T.undefined(n.severity))&&(T.number(n.code)||T.string(n.code)||T.undefined(n.code))&&(T.string(n.source)||T.undefined(n.source))}e.create=n,e.is=t}(a=n.Diagnostic||(n.Diagnostic={}));var i;!function(e){function n(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o={title:e,command:n};return T.defined(t)&&t.length>0&&(o.arguments=t),o}function t(e){var n=e;return T.defined(n)&&T.string(n.title)&&T.string(n.title)}e.create=n,e.is=t}(i=n.Command||(n.Command={}));var c;!function(e){function n(e,n){return{range:e,newText:n}}function t(e,n){return{range:{start:e,end:e},newText:n}}function r(e){return{range:e,newText:""}}e.replace=n,e.insert=t,e.del=r}(c=n.TextEdit||(n.TextEdit={}));var u=function(){function e(){this.workspaceEdit={changes:Object.create(null)},this.textEditChanges=Object.create(null)}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){var n=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,n){this.edits.push(c.insert(e,n))},e.prototype.replace=function(e,n){this.edits.push(c.replace(e,n))},e.prototype["delete"]=function(e){this.edits.push(c.del(e))},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),t=this.textEditChanges[e];if(!t){var r=[];this.workspaceEdit.changes[e]=r,t=new n(r),this.textEditChanges[e]=t}return t},e}();n.WorkspaceChange=u;var s;!function(e){function n(e){return{uri:e}}function t(e){var n=e;return T.defined(n)&&T.string(n.uri)}e.create=n,e.is=t}(s=n.TextDocumentIdentifier||(n.TextDocumentIdentifier={}));var d;!function(e){function n(e,n){return{uri:e,version:n}}function t(e){var n=e;return T.defined(n)&&T.string(n.uri)&&T.number(n.version)}e.create=n,e.is=t}(d=n.VersionedTextDocumentIdentifier||(n.VersionedTextDocumentIdentifier={}));var l;!function(e){function n(e,n,t,r){return{uri:e,languageId:n,version:t,text:r}}function t(e){var n=e;return T.defined(n)&&T.string(n.uri)&&T.string(n.languageId)&&T.number(n.version)&&T.string(n.text)}e.create=n,e.is=t}(l=n.TextDocumentItem||(n.TextDocumentItem={}));var f;!function(e){function n(e){return{label:e}}e.create=n}(f=n.CompletionItem||(n.CompletionItem={}));var p;!function(e){function n(e,n){return{items:e?e:[],isIncomplete:!!n}}e.create=n}(p=n.CompletionList||(n.CompletionList={}));var g;!function(e){function n(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n}(g=n.MarkedString||(n.MarkedString={}));var m;!function(e){function n(e,n){return n?{label:e,documentation:n}:{label:e}}e.create=n}(m=n.ParameterInformation||(n.ParameterInformation={}));var h;!function(e){function n(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o={label:e};return T.defined(n)&&(o.documentation=n),T.defined(t)?o.parameters=t:o.parameters=[],o}e.create=n}(h=n.SignatureInformation||(n.SignatureInformation={}));var v;!function(e){function n(e,n){var t={range:e};return T.number(n)&&(t.kind=n),t}e.create=n}(v=n.DocumentHighlight||(n.DocumentHighlight={}));var k;!function(e){function n(e,n,t,r,o){var a={name:e,kind:n,location:{uri:r,range:t}};return o&&(a.containerName=o),a}e.create=n}(k=n.SymbolInformation||(n.SymbolInformation={}));var b;!function(e){function n(e){return{diagnostics:e}}function t(e){var n=e;return T.defined(n)&&T.typedArray(n.diagnostics,a.is)}e.create=n,e.is=t}(b=n.CodeActionContext||(n.CodeActionContext={}));var y;!function(e){function n(e,n){var t={range:e};return T.defined(n)&&(t.data=n),t}function t(e){var n=e;return T.defined(n)&&r.is(n.range)&&(T.undefined(n.command)||i.is(n.command))}e.create=n,e.is=t}(y=n.CodeLens||(n.CodeLens={}));var E;!function(e){function n(e,n){return{tabSize:e,insertSpaces:n}}function t(e){var n=e;return T.defined(n)&&T.number(n.tabSize)&&T["boolean"](n.insertSpaces)}e.create=n,e.is=t}(E=n.FormattingOptions||(n.FormattingOptions={}));var C;!function(e){function n(e,n,t,r){return new x(e,n,t,r)}function t(e){var n=e;return!!(T.defined(n)&&T.string(n.uri)&&(T.undefined(n.languageId)||T.string(n.languageId))&&T.number(n.lineCount)&&T.func(n.getText)&&T.func(n.positionAt)&&T.func(n.offsetAt))}e.create=n,e.is=t}(C=n.TextDocument||(n.TextDocument={}));var T,x=function(){function e(e,n,t,r){this._uri=e,this._languageId=n,this._version=t,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._content},e.prototype.update=function(e,n){this._content=e.text,this._version=n,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],n=this._content,t=!0,r=0;r<n.length;r++){t&&(e.push(r),t=!1);var o=n.charAt(r);t="\r"===o||"\n"===o,"\r"===o&&r+1<n.length&&"\n"===n.charAt(r+1)&&r++}t&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,o=n.length;if(0===o)return t.create(0,e);for(;r<o;){var a=Math.floor((r+o)/2);n[a]>e?o=a:r=a+1}var i=r-1;return t.create(i,e-n[i])},e.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var t=n[e.line],r=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(t+e.character,r),t)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){function n(e){return"undefined"!=typeof e}function t(e){return"undefined"==typeof e}function r(e){return e===!0||e===!1}function o(e){return"[object String]"===u.call(e)}function a(e){return"[object Number]"===u.call(e)}function i(e){return"[object Function]"===u.call(e)}function c(e,n){return Array.isArray(e)&&e.every(n)}var u=Object.prototype.toString;e.defined=n,e.undefined=t,e["boolean"]=r,e.string=o,e.number=a,e.func=i,e.typedArray=c}(T||(T={}))}),define("vscode-languageserver-types",["vscode-languageserver-types/main"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/languageFeatures",["require","exports","vscode-languageserver-types"],e)}(function(e,n){function t(e){switch(e){case 1:return monaco.Severity.Error;case 2:return monaco.Severity.Warning;case 3:case 4:default:return monaco.Severity.Info}}function r(e,n){var r="number"==typeof n.code?String(n.code):n.code;return{severity:t(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:r,source:n.source}}function o(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function a(e){if(e)return{start:o(e.getStartPosition()),end:o(e.getEndPosition())}}function i(e){if(e)return new b(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function c(e){var n=monaco.languages.CompletionItemKind;switch(e){case 1:return n.Text;case 2:return n.Method;case 3:return n.Function;case 4:return n.Constructor;case 5:return n.Field;case 6:return n.Variable;case 7:return n.Class;case 8:return n.Interface;case 9:return n.Module;case 10:return n.Property;case 11:return n.Unit;case 12:return n.Value;case 13:return n.Enum;case 14:return n.Keyword;case 15:return n.Snippet;case 16:return n.Color;case 17:return n.File;case 18:return n.Reference}return n.Property}function u(e){var n=monaco.languages.CompletionItemKind;switch(e){case n.Text:return 1;case n.Method:return 2;case n.Function:return 3;case n.Constructor:return 4;case n.Field:return 5;case n.Variable:return 6;case n.Class:return 7;case n.Interface:return 8;case n.Module:return 9;case n.Property:return 10;case n.Unit:return 11;case n.Value:return 12;case n.Enum:return 13;case n.Keyword:return 14;case n.Snippet:return 15;case n.Color:return 16;case n.File:return 17;case n.Reference:return 18}return 10}function s(e){if(e)return{range:i(e.range),text:e.newText}}function d(e){if(e)return{range:a(b.lift(e.range)),newText:e.text}}function l(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:c(e.kind),textEdit:s(e.textEdit),data:e.data}}function f(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:u(e.kind),textEdit:d(e.textEdit),data:e.data}}function p(e){if(e)return Array.isArray(e)?e:[e]}function g(e){return{uri:k.parse(e.uri),range:i(e.range)}}function m(e){var n=monaco.languages.SymbolKind;switch(e){case 1:return n.Array;case 2:return n.Module;case 3:return n.Namespace;case 4:return n.Package;case 5:return n.Class;case 6:return n.Method;case 7:return n.Property;case 8:return n.Field;case 9:return n.Constructor;case 10:return n.Enum;case 11:return n.Interface;case 12:return n.Function;case 13:return n.Variable;case 14:return n.Constant;case 15:return n.String;case 16:return n.Number;case 17:return n.Boolean;case 18:return n.Array}return n.Function}function h(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}function v(e,n){return n.cancel&&e.onCancellationRequested(function(){return n.cancel()}),n}var k=(e("vscode-languageserver-types"),monaco.Uri),b=monaco.Range,y=function(){function e(e,n){var t=this;this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null);var r=function(e){var n=e.getModeId();if(n===t._languageId){var r;t._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(r),r=setTimeout(function(){return t._doValidate(e.uri,n)},500)}),t._doValidate(e.uri,n)}},o=function(e){monaco.editor.setModelMarkers(e,t._languageId,[]),delete t._listener[e.uri.toString()]};this._disposables.push(monaco.editor.onDidCreateModel(r)),this._disposables.push(monaco.editor.onWillDisposeModel(function(e){o(e),t._resetSchema(e.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){o(e.model),r(e.model),t._resetSchema(e.model.uri)})),this._disposables.push({dispose:function(){for(var e in t._listener)t._listener[e].dispose()}}),monaco.editor.getModels().forEach(r)}return e.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(e){this._worker().then(function(n){n.resetSchema(e.toString())})},e.prototype._doValidate=function(e,n){this._worker(e).then(function(t){return t.doValidation(e.toString()).then(function(t){var o=t.map(function(n){return r(e,n)});monaco.editor.setModelMarkers(monaco.editor.getModel(e),n,o)})}).then(void 0,function(e){console.error(e)})},e}();n.DiagnostcsAdapter=y;var E=function(){function e(e){this._worker=e}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),e.prototype.provideCompletionItems=function(e,n,t){var r=(e.getWordUntilPosition(n),e.uri);return v(t,this._worker(r).then(function(e){return e.doComplete(r.toString(),o(n)).then(function(e){if(e){var n=e.items.map(function(e){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:c(e.kind),textEdit:s(e.textEdit)}});return{isIncomplete:e.isIncomplete,items:n}}})}))},e.prototype.resolveCompletionItem=function(e,n){return v(n,this._worker().then(function(n){var t=f(e);return n.doResolve(t).then(function(e){return l(e)})}))},e}();n.CompletionAdapter=E;var C=function(){function e(e){this._worker=e}return e.prototype.provideHover=function(e,n,t){var r=e.uri;return v(t,this._worker(r).then(function(e){return e.doHover(r.toString(),o(n))}).then(function(e){if(e)return{range:i(e.range),contents:p(e.contents)}}))},e}();n.HoverAdapter=C;var T=function(){function e(e){this._worker=e}return e.prototype.provideDocumentSymbols=function(e,n){var t=e.uri;return v(n,this._worker(t).then(function(e){return e.findDocumentSymbols(t.toString())}).then(function(e){if(e)return e.map(function(e){return{name:e.name,containerName:e.containerName,kind:m(e.kind),location:g(e.location)}})}))},e}();n.DocumentSymbolAdapter=T;var x=function(){function e(e){this._worker=e}return e.prototype.provideDocumentFormattingEdits=function(e,n,t){var r=e.uri;return v(t,this._worker(r).then(function(e){return e.format(r.toString(),null,h(n)).then(function(e){if(e&&0!==e.length)return e.map(s)})}))},e}();n.DocumentFormattingEditProvider=x;var _=function(){function e(e){this._worker=e}return e.prototype.provideDocumentRangeFormattingEdits=function(e,n,t,r){var o=e.uri;return v(r,this._worker(o).then(function(e){return e.format(o.toString(),a(n),h(t)).then(function(e){if(e&&0!==e.length)return e.map(s)})}))},e}();n.DocumentRangeFormattingEditProvider=_}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-nls/vscode-nls",["require","exports"],e)}(function(e,n){function t(e,n){var t;return t=0===n.length?e:e.replace(/\{(\d+)\}/g,function(e,t){var r=t[0];return"undefined"!=typeof n[r]?n[r]:e})}function r(e,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return t(n,r)}function o(e){return r}function a(e){return o}n.loadMessageBundle=o,n.config=a}),define("vscode-nls",["vscode-nls/vscode-nls"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("jsonc-parser/main",["require","exports","vscode-nls"],e)}(function(e,n){function t(e,n){function t(n,t){for(var r=0,o=0;r<n||!t;){var a=e.charCodeAt(f);if(a>=b._0&&a<=b._9)o=16*o+a-b._0;else if(a>=b.A&&a<=b.F)o=16*o+a-b.A+10;else{if(!(a>=b.a&&a<=b.f))break;o=16*o+a-b.a+10}f++,r++}return r<n&&(o=-1),o}function i(e){f=e,g="",m=0,h=k.Unknown,y=v.None}function c(){var n=f;if(e.charCodeAt(f)===b._0)f++;else for(f++;f<e.length&&a(e.charCodeAt(f));)f++;if(f<e.length&&e.charCodeAt(f)===b.dot){if(f++,!(f<e.length&&a(e.charCodeAt(f))))return y=v.UnexpectedEndOfNumber,e.substring(n,f);for(f++;f<e.length&&a(e.charCodeAt(f));)f++}var t=f;if(f<e.length&&(e.charCodeAt(f)===b.E||e.charCodeAt(f)===b.e))if(f++,(f<e.length&&e.charCodeAt(f)===b.plus||e.charCodeAt(f)===b.minus)&&f++,f<e.length&&a(e.charCodeAt(f))){for(f++;f<e.length&&a(e.charCodeAt(f));)f++;t=f}else y=v.UnexpectedEndOfNumber;return e.substring(n,t)}function u(){for(var n="",r=f;;){if(f>=p){n+=e.substring(r,f),y=v.UnexpectedEndOfString;break}var a=e.charCodeAt(f);if(a===b.doubleQuote){n+=e.substring(r,f),f++;break}if(a!==b.backslash){if(o(a)){n+=e.substring(r,f),y=v.UnexpectedEndOfString;break}f++}else{if(n+=e.substring(r,f),f++,f>=p){y=v.UnexpectedEndOfString;break}switch(a=e.charCodeAt(f++)){case b.doubleQuote:n+='"';break;case b.backslash:n+="\\";break;case b.slash:n+="/";break;case b.b:n+="\b";break;case b.f:n+="\f";break;case b.n:n+="\n";break;case b.r:n+="\r";break;case b.t:n+="\t";break;case b.u:var i=t(4,!0);i>=0?n+=String.fromCharCode(i):y=v.InvalidUnicode;break;default:y=v.InvalidEscapeCharacter}r=f}}return n}function s(){if(g="",y=v.None,m=f,f>=p)return m=p,h=k.EOF;var n=e.charCodeAt(f);if(r(n)){do f++,g+=String.fromCharCode(n),n=e.charCodeAt(f);while(r(n));return h=k.Trivia}if(o(n))return f++,g+=String.fromCharCode(n),n===b.carriageReturn&&e.charCodeAt(f)===b.lineFeed&&(f++,g+="\n"),h=k.LineBreakTrivia;switch(n){case b.openBrace:return f++,h=k.OpenBraceToken;case b.closeBrace:return f++,h=k.CloseBraceToken;case b.openBracket:return f++,h=k.OpenBracketToken;case b.closeBracket:return f++,h=k.CloseBracketToken;case b.colon:return f++,h=k.ColonToken;case b.comma:return f++,h=k.CommaToken;case b.doubleQuote:return f++,g=u(),h=k.StringLiteral;case b.slash:var t=f-1;if(e.charCodeAt(f+1)===b.slash){for(f+=2;f<p&&!o(e.charCodeAt(f));)f++;return g=e.substring(t,f),h=k.LineCommentTrivia}if(e.charCodeAt(f+1)===b.asterisk){f+=2;for(var i=p-1,s=!1;f<i;){var l=e.charCodeAt(f);if(l===b.asterisk&&e.charCodeAt(f+1)===b.slash){f+=2,s=!0;break}f++}return s||(f++,y=v.UnexpectedEndOfComment),g=e.substring(t,f),h=k.BlockCommentTrivia}return g+=String.fromCharCode(n),f++,h=k.Unknown;case b.minus:if(g+=String.fromCharCode(n),f++,f===p||!a(e.charCodeAt(f)))return h=k.Unknown;case b._0:case b._1:case b._2:case b._3:case b._4:case b._5:case b._6:case b._7:case b._8:case b._9:return g+=c(),h=k.NumericLiteral;default:for(;f<p&&d(n);)f++,n=e.charCodeAt(f);if(m!==f){switch(g=e.substring(m,f)){case"true":return h=k.TrueKeyword;case"false":return h=k.FalseKeyword;case"null":return h=k.NullKeyword}return h=k.Unknown}return g+=String.fromCharCode(n),f++,h=k.Unknown}}function d(e){if(r(e)||o(e))return!1;switch(e){case b.closeBrace:case b.closeBracket:case b.openBrace:case b.openBracket:case b.doubleQuote:case b.colon:case b.comma:return!1}return!0}function l(){var e;do e=s();while(e>=k.LineCommentTrivia&&e<=k.Trivia);return e}void 0===n&&(n=!1);var f=0,p=e.length,g="",m=0,h=k.Unknown,y=v.None;return{setPosition:i,getPosition:function(){return f},scan:n?l:s,getToken:function(){return h},getTokenValue:function(){return g},getTokenOffset:function(){return m},getTokenLength:function(){return f-m},getTokenError:function(){return y}}}function r(e){return e===b.space||e===b.tab||e===b.verticalTab||e===b.formFeed||e===b.nonBreakingSpace||e===b.ogham||e>=b.enQuad&&e<=b.zeroWidthSpace||e===b.narrowNoBreakSpace||e===b.mathematicalSpace||e===b.ideographicSpace||e===b.byteOrderMark}function o(e){return e===b.lineFeed||e===b.carriageReturn||e===b.lineSeparator||e===b.paragraphSeparator}function a(e){return e>=b._0&&e<=b._9}function i(e,n){var r,o,a=t(e),i=[],c=0;do switch(o=a.getPosition(),r=a.scan()){case k.LineCommentTrivia:case k.BlockCommentTrivia:case k.EOF:c!==o&&i.push(e.substring(c,o)),void 0!==n&&i.push(a.getTokenValue().replace(/[^\r\n]/g,n)),c=a.getPosition()}while(r!==k.EOF);return i.join("")}function c(e){switch(e){case y.InvalidSymbol:return h("error.invalidSymbol","Invalid symbol");case y.InvalidNumberFormat:return h("error.invalidNumberFormat","Invalid number format");case y.PropertyNameExpected:return h("error.propertyNameExpected","Property name expected");case y.ValueExpected:return h("error.valueExpected","Value expected");case y.ColonExpected:return h("error.colonExpected","Colon expected");case y.CommaExpected:return h("error.commaExpected","Comma expected");case y.CloseBraceExpected:return h("error.closeBraceExpected","Closing brace expected");case y.CloseBracketExpected:return h("error.closeBracketExpected","Closing bracket expected");case y.EndOfFileExpected:return h("error.endOfFileExpected","End of file expected");default:return""}}function u(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function s(e,n){function t(e,n,t,r){i.value=e,i.offset=n,i.length=t,i.type=r,i.columnOffset=void 0,a=i}var r=[],o=new Object,a=void 0,i={value:void 0,offset:void 0,length:void 0,type:void 0},c=!1;try{g(e,{onObjectBegin:function(e,t){if(n<=e)throw o;a=void 0,c=n>e,r.push("")},onObjectProperty:function(e,a,i){if(n<a)throw o;if(t(e,a,i,"property"),r[r.length-1]=e,n<=a+i)throw o},onObjectEnd:function(e,t){if(n<=e)throw o;a=void 0,r.pop()},onArrayBegin:function(e,t){if(n<=e)throw o;a=void 0,r.push(0)},onArrayEnd:function(e,t){if(n<=e)throw o;a=void 0,r.pop()},onLiteralValue:function(e,r,a){if(n<r)throw o;if(t(e,r,a,u(e)),n<=r+a)throw o},onSeparator:function(e,t,i){if(n<=t)throw o;if(":"===e&&"property"===a.type)a.columnOffset=t,c=!1,a=void 0;else if(","===e){var u=r[r.length-1];"number"==typeof u?r[r.length-1]=u+1:(c=!0,r[r.length-1]=""),a=void 0}}})}catch(s){if(s!==o)throw s}return""===r[r.length-1]&&r.pop(),{path:r,previousNode:a,isAtPropertyKey:c,matches:function(e){for(var n=0,t=0;n<e.length&&t<r.length;t++)if(e[n]===r[t]||"*"===e[n])n++;else if("**"!==e[n])return!1;return n===e.length}}}function d(e,n,t){function r(e){Array.isArray(a)?a.push(e):o&&(a[o]=e)}void 0===n&&(n=[]);var o=null,a=[],i=[],c={onObjectBegin:function(){var e={};r(e),i.push(a),a=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){a=i.pop()},onArrayBegin:function(){var e=[];r(e),i.push(a),a=e,o=null},onArrayEnd:function(){a=i.pop()},onLiteralValue:r,onError:function(e){n.push({error:e})}};return g(e,c,t),a[0]}function l(e,n,t){function r(e){"property"===a.type&&(a.length=e-a.offset,a=a.parent)}function o(e){return a.children.push(e),r(e.offset+e.length),e}void 0===n&&(n=[]);var a={type:"array",offset:-1,length:-1,children:[]},i={onObjectBegin:function(e){a=o({type:"object",offset:e,length:-1,parent:a,children:[]})},onObjectProperty:function(e,n,t){a=o({type:"property",offset:n,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:e,offset:n,length:t,parent:a})},onObjectEnd:function(e,n){r(e),a.length=e+n-a.offset,a=a.parent},onArrayBegin:function(e,n){a=o({type:"array",offset:e,length:-1,parent:a,children:[]})},onArrayEnd:function(e,n){a.length=e+n-a.offset,a=a.parent},onLiteralValue:function(e,n,t){o({type:u(e),offset:n,length:t,parent:a,value:e})},onSeparator:function(e,n,t){"property"===a.type&&(":"===e?a.columnOffset=n:","===e&&r(n))},onError:function(e){n.push({error:e})}};g(e,i,t);var c=a.children[0];return c&&delete c.parent,c}function f(e,n){if(e){for(var t=e,r=0,o=n;r<o.length;r++){var a=o[r];if("string"==typeof a){if("object"!==t.type)return;for(var i=!1,c=0,u=t.children;c<u.length;c++){var s=u[c];if(s.children[0].value===a){t=s.children[1],i=!0;break}}if(!i)return}else{var d=a;if("array"!==t.type||d<0||d>=t.children.length)return;t=t.children[d]}}return t}}function p(e){if("array"===e.type)return e.children.map(p);if("object"===e.type){for(var n={},t=0,r=e.children;t<r.length;t++){var o=r[t];n[o.children[0].value]=p(o.children[1])}return n}return e.value}function g(e,n,r){function o(e){return e?function(){return e(g.getTokenOffset(),g.getTokenLength())}:function(){return!0}}function a(e){return e?function(n){return e(n,g.getTokenOffset(),g.getTokenLength())}:function(){return!0}}function i(){for(;;){var e=g.scan();switch(e){case k.LineCommentTrivia:case k.BlockCommentTrivia:_&&c(y.InvalidSymbol);break;case k.Unknown:c(y.InvalidSymbol);break;case k.Trivia:case k.LineBreakTrivia:break;default:return e}}}function c(e,n,t){if(void 0===n&&(n=[]),void 0===t&&(t=[]),x(e),n.length+t.length>0)for(var r=g.getToken();r!==k.EOF;){if(n.indexOf(r)!==-1){i();break}if(t.indexOf(r)!==-1)break;r=i()}}function u(e){if(g.getToken()!==k.StringLiteral)return!1;var n=g.getTokenValue();return e?C(n):h(n),i(),!0}function s(){switch(g.getToken()){case k.NumericLiteral:var e=0;try{e=JSON.parse(g.getTokenValue()),"number"!=typeof e&&(c(y.InvalidNumberFormat),e=0)}catch(n){c(y.InvalidNumberFormat)}C(e);break;case k.NullKeyword:C(null);break;case k.TrueKeyword:C(!0);break;case k.FalseKeyword:C(!1);break;default:return!1}return i(),!0}function d(){return u(!1)?(g.getToken()===k.ColonToken?(T(":"),i(),p()||c(y.ValueExpected,[],[k.CloseBraceToken,k.CommaToken])):c(y.ColonExpected,[],[k.CloseBraceToken,k.CommaToken]),!0):(c(y.PropertyNameExpected,[],[k.CloseBraceToken,k.CommaToken]),!1)}function l(){if(g.getToken()!==k.OpenBraceToken)return!1;m(),i();for(var e=!1;g.getToken()!==k.CloseBraceToken&&g.getToken()!==k.EOF;)g.getToken()===k.CommaToken?(e||c(y.ValueExpected,[],[]),T(","),i()):e&&c(y.CommaExpected,[],[]),d()||c(y.ValueExpected,[],[k.CloseBraceToken,k.CommaToken]),e=!0;return v(),g.getToken()!==k.CloseBraceToken?c(y.CloseBraceExpected,[k.CloseBraceToken],[]):i(),!0}function f(){if(g.getToken()!==k.OpenBracketToken)return!1;b(),i();for(var e=!1;g.getToken()!==k.CloseBracketToken&&g.getToken()!==k.EOF;)g.getToken()===k.CommaToken?(e||c(y.ValueExpected,[],[]),T(","),i()):e&&c(y.CommaExpected,[],[]),p()||c(y.ValueExpected,[],[k.CloseBracketToken,k.CommaToken]),e=!0;return E(),g.getToken()!==k.CloseBracketToken?c(y.CloseBracketExpected,[k.CloseBracketToken],[]):i(),!0}function p(){return f()||l()||u(!0)||s()}var g=t(e,!1),m=o(n.onObjectBegin),h=a(n.onObjectProperty),v=o(n.onObjectEnd),b=o(n.onArrayBegin),E=o(n.onArrayEnd),C=a(n.onLiteralValue),T=a(n.onSeparator),x=a(n.onError),_=r&&r.disallowComments;return i(),g.getToken()===k.EOF||(p()?(g.getToken()!==k.EOF&&c(y.EndOfFileExpected,[],[]),!0):(c(y.ValueExpected,[],[]),!1))}var m=e("vscode-nls"),h=m.loadMessageBundle();!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(n.ScanError||(n.ScanError={}));var v=n.ScanError;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(n.SyntaxKind||(n.SyntaxKind={}));var k=n.SyntaxKind;n.createScanner=t;var b;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(b||(b={})),n.stripComments=i,function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",e[e.CloseBracketExpected=7]="CloseBracketExpected", | ||
e[e.EndOfFileExpected=8]="EndOfFileExpected"}(n.ParseErrorCode||(n.ParseErrorCode={}));var y=n.ParseErrorCode;n.getParseErrorMessage=c,n.getLocation=s,n.parse=d,n.parseTree=l,n.findNodeAtLocation=f,n.getNodeValue=p,n.visit=g}),define("jsonc-parser",["jsonc-parser/main"],function(e){return e}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/tokenization",["require","exports","jsonc-parser"],e)}(function(e,n){function t(e){return{getInitialState:function(){return new a(null,null,(!1))},tokenize:function(n,t,o,a){return r(e,n,t,o,a)}}}function r(e,t,r,i,c){void 0===i&&(i=0);var u=0,s=!1;switch(r.scanError){case o.ScanError.UnexpectedEndOfString:t='"'+t,u=1;break;case o.ScanError.UnexpectedEndOfComment:t="/*"+t,u=2}var d,l,f=o.createScanner(t),p=r.lastWasColon;for(l={tokens:[],endState:r.clone()};;){var g=i+f.getPosition(),m="";if(d=f.scan(),d===o.SyntaxKind.EOF)break;if(g===i+f.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(f.getPosition(),3));switch(s&&(g-=u),s=u>0,d){case o.SyntaxKind.OpenBraceToken:m=n.TOKEN_DELIM_OBJECT,p=!1;break;case o.SyntaxKind.CloseBraceToken:m=n.TOKEN_DELIM_OBJECT,p=!1;break;case o.SyntaxKind.OpenBracketToken:m=n.TOKEN_DELIM_ARRAY,p=!1;break;case o.SyntaxKind.CloseBracketToken:m=n.TOKEN_DELIM_ARRAY,p=!1;break;case o.SyntaxKind.ColonToken:m=n.TOKEN_DELIM_COLON,p=!0;break;case o.SyntaxKind.CommaToken:m=n.TOKEN_DELIM_COMMA,p=!1;break;case o.SyntaxKind.TrueKeyword:case o.SyntaxKind.FalseKeyword:m=n.TOKEN_VALUE_BOOLEAN,p=!1;break;case o.SyntaxKind.NullKeyword:m=n.TOKEN_VALUE_NULL,p=!1;break;case o.SyntaxKind.StringLiteral:m=p?n.TOKEN_VALUE_STRING:n.TOKEN_PROPERTY_NAME,p=!1;break;case o.SyntaxKind.NumericLiteral:m=n.TOKEN_VALUE_NUMBER,p=!1}if(e)switch(d){case o.SyntaxKind.LineCommentTrivia:m=n.TOKEN_COMMENT_LINE;break;case o.SyntaxKind.BlockCommentTrivia:m=n.TOKEN_COMMENT_BLOCK}l.endState=new a(r.getStateData(),f.getTokenError(),p),l.tokens.push({startIndex:g,scopes:m})}return l}var o=e("jsonc-parser");n.createTokenizationSupport=t,n.TOKEN_DELIM_OBJECT="punctuation.bracket.json",n.TOKEN_DELIM_ARRAY="punctuation.array.json",n.TOKEN_DELIM_COLON="punctuation.colon.json",n.TOKEN_DELIM_COMMA="punctuation.comma.json",n.TOKEN_VALUE_BOOLEAN="support.property-value.keyword.json",n.TOKEN_VALUE_NULL="support.property-value.constant.other.json",n.TOKEN_VALUE_STRING="support.property-value.string.value.json",n.TOKEN_VALUE_NUMBER="support.property-value.constant.numeric.json",n.TOKEN_PROPERTY_NAME="support.type.property-name.json",n.TOKEN_COMMENT_BLOCK="comment.block.json",n.TOKEN_COMMENT_LINE="comment.line.json";var a=function(){function e(e,n,t){this._state=e,this.scanError=n,this.lastWasColon=t}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(n){return n===this||!!(n&&n instanceof e)&&(this.scanError===n.scanError&&this.lastWasColon===n.lastWasColon)},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}()}),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/jsonMode",["require","exports","./workerManager","./languageFeatures","./tokenization"],e)}(function(e,n){function t(e){var n=[],t=new r.WorkerManager(e);n.push(t);var c=function(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];return t.getLanguageServiceWorker.apply(t,e)},u=e.languageId;n.push(monaco.languages.registerCompletionItemProvider(u,new o.CompletionAdapter(c))),n.push(monaco.languages.registerHoverProvider(u,new o.HoverAdapter(c))),n.push(monaco.languages.registerDocumentSymbolProvider(u,new o.DocumentSymbolAdapter(c))),n.push(monaco.languages.registerDocumentFormattingEditProvider(u,new o.DocumentFormattingEditProvider(c))),n.push(monaco.languages.registerDocumentRangeFormattingEditProvider(u,new o.DocumentRangeFormattingEditProvider(c))),n.push(new o.DiagnostcsAdapter(u,c)),n.push(monaco.languages.setTokensProvider(u,a.createTokenizationSupport(!0))),n.push(monaco.languages.setLanguageConfiguration(u,i))}var r=e("./workerManager"),o=e("./languageFeatures"),a=e("./tokenization");n.setupMode=t;var i={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}}); |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-json version: 1.0.7(9904c49bdae21c25ef476d94942c9330867e6fd3) | ||
* monaco-json version: 1.1.0(69912f9b934810d5ea3551fcac4fac07359d116a) | ||
* Released under the MIT license | ||
@@ -5,0 +5,0 @@ * https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md |
@@ -11,23 +11,23 @@ /*--------------------------------------------------------------------------------------------- | ||
*/ | ||
validate?: boolean; | ||
readonly validate?: boolean; | ||
/** | ||
* If set, comments are tolerated. If set to false, syntax errors will be emmited for comments. | ||
*/ | ||
allowComments?: boolean; | ||
readonly allowComments?: boolean; | ||
/** | ||
* A list of known schemas and/or associations of schemas to file names. | ||
*/ | ||
schemas?: { | ||
readonly schemas?: { | ||
/** | ||
* The URI of the schema, which is also the identifier of the schema. | ||
*/ | ||
uri: string; | ||
readonly uri: string; | ||
/** | ||
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json' | ||
*/ | ||
fileMatch?: string[]; | ||
readonly fileMatch?: string[]; | ||
/** | ||
* The schema for the given URI. | ||
*/ | ||
schema?: any; | ||
readonly schema?: any; | ||
}[]; | ||
@@ -37,4 +37,4 @@ } | ||
export interface LanguageServiceDefaults { | ||
onDidChange: IEvent<LanguageServiceDefaults>; | ||
diagnosticsOptions: DiagnosticsOptions; | ||
readonly onDidChange: IEvent<LanguageServiceDefaults>; | ||
readonly diagnosticsOptions: DiagnosticsOptions; | ||
setDiagnosticsOptions(options: DiagnosticsOptions): void; | ||
@@ -41,0 +41,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130282
10
2
1
+ Addedjsonc-parser@0.2.3(transitive)
+ Addedvscode-json-languageservice@1.1.9(transitive)
+ Addedvscode-languageserver-types@1.0.21.0.4(transitive)
+ Addedvscode-nls@1.0.4(transitive)
+ Addedvscode-uri@0.0.7(transitive)