-
Notifications
You must be signed in to change notification settings - Fork 28
/
2.js
executable file
·1 lines (1 loc) · 33.2 KB
/
2.js
1
webpackJsonp([2],{1144:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMode=function(e){var t=[],n=new r.a(e);t.push(n);var s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.getLanguageServiceWorker.apply(n,e)},d=e.languageId;t.push(monaco.languages.registerCompletionItemProvider(d,new o.a(s))),t.push(monaco.languages.registerHoverProvider(d,new o.g(s))),t.push(monaco.languages.registerDocumentSymbolProvider(d,new o.f(s))),t.push(monaco.languages.registerDocumentFormattingEditProvider(d,new o.d(s))),t.push(monaco.languages.registerDocumentRangeFormattingEditProvider(d,new o.e(s))),t.push(new o.b(d,s,e)),t.push(monaco.languages.setTokensProvider(d,Object(a.a)(!0))),t.push(monaco.languages.setLanguageConfiguration(d,i)),t.push(monaco.languages.registerColorProvider(d,new o.c(s)))};var r=n(1367),o=n(1368),a=n(1370),i={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"\"",close:"\"",notIn:["string"]}]}},1221:function(e,t){"use strict";function n(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||8192<=e&&8203>=e||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function o(e){return 48<=e&&57>=e}t.a=function(e,t){function a(t,n){for(var r,o=0,a=0;o<t||!n;){if(r=e.charCodeAt(c),48<=r&&57>=r)a=16*a+r-48;else if(65<=r&&70>=r)a=16*a+r-65+10;else if(97<=r&&102>=r)a=16*a+r-97+10;else break;c++,o++}return o<t&&(a=-1),a}function i(){var t=c;if(48===e.charCodeAt(c))c++;else for(c++;c<e.length&&o(e.charCodeAt(c));)c++;if(c<e.length&&46===e.charCodeAt(c))if(c++,c<e.length&&o(e.charCodeAt(c)))for(c++;c<e.length&&o(e.charCodeAt(c));)c++;else return m=3,e.substring(t,c);var n=c;if(c<e.length&&(69===e.charCodeAt(c)||101===e.charCodeAt(c)))if(c++,(c<e.length&&43===e.charCodeAt(c)||45===e.charCodeAt(c))&&c++,c<e.length&&o(e.charCodeAt(c))){for(c++;c<e.length&&o(e.charCodeAt(c));)c++;n=c}else m=3;return e.substring(t,n)}function s(){for(var t="",n=c;;){if(c>=u){t+=e.substring(n,c),m=2;break}var o=e.charCodeAt(c);if(34===o){t+=e.substring(n,c),c++;break}if(92===o){if(t+=e.substring(n,c),c++,c>=u){m=2;break}switch(o=e.charCodeAt(c++),o){case 34:t+="\"";break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var i=a(4,!0);0<=i?t+=g(i):m=4;break;default:m=5;}n=c;continue}if(0<=o&&31>=o)if(r(o)){t+=e.substring(n,c),m=2;break}else m=6;c++}return t}function d(){if(h="",m=0,p=c,c>=u)return p=u,f=17;var t=e.charCodeAt(c);if(n(t)){do c++,h+=g(t),t=e.charCodeAt(c);while(n(t));return f=15}if(r(t))return c++,h+=g(t),13===t&&10===e.charCodeAt(c)&&(c++,h+="\n"),f=14;switch(t){case 123:return c++,f=1;case 125:return c++,f=2;case 91:return c++,f=3;case 93:return c++,f=4;case 58:return c++,f=6;case 44:return c++,f=5;case 34:return c++,h=s(),f=10;case 47:var a=c-1;if(47===e.charCodeAt(c+1)){for(c+=2;c<u&&!r(e.charCodeAt(c));)c++;return h=e.substring(a,c),f=12}if(42===e.charCodeAt(c+1)){c+=2;for(var d,y=!1;c<u;){if(d=e.charCodeAt(c),42===d&&c+1<u&&47===e.charCodeAt(c+1)){c+=2,y=!0;break}c++}return y||(c++,m=1),h=e.substring(a,c),f=13}return h+=g(t),c++,f=16;case 45:if(h+=g(t),c++,c===u||!o(e.charCodeAt(c)))return f=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return h+=i(),f=11;default:for(;c<u&&l(t);)c++,t=e.charCodeAt(c);return p===c?(h+=g(t),c++,f=16):(h=e.substring(p,c),f="true"===h?8:"false"===h?9:"null"===h?7:16);}}function l(e){if(n(e)||r(e))return!1;return 125===e||93===e||123===e||91===e||34===e||58===e||44===e?!1:!0}var g=String.fromCharCode;void 0===t&&(t=!1);var c=0,u=e.length,h="",p=0,f=16,m=0;return{setPosition:function(e){c=e,h="",p=0,f=16,m=0},getPosition:function(){return c},scan:t?function(){var e;do e=d();while(12<=e&&15>=e);return e}:d,getToken:function(){return f},getTokenValue:function(){return h},getTokenOffset:function(){return p},getTokenLength:function(){return c-p},getTokenError:function(){return m}}}},1262:function(e,t,n){"use strict";function r(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function o(e,t,n){for(var r=0,o=0,a=n.tabSize||4;r<e.length;){var i=e.charAt(r);if(" "===i)o++;else if("\t"===i)o+=a;else break;r++}return Math.floor(o/a)}function a(e,t){for(var n,r=0;r<t.length;r++){if(n=t.charAt(r),"\r"===n)return r+1<t.length&&"\n"===t.charAt(r+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}function i(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}t.a=function(e,t,n){function d(){return b+r(y,c+_)}function l(){var e=C.scan();for(k=!1;15===e||14===e;)k=k||14===e,e=C.scan();return T=16===e||0!==C.getTokenError(),e}function g(t,n,r){!T&&n<f&&r>p&&e.substring(n,r)!==t&&E.push({offset:n,length:r-n,content:t})}var c,u,h,p,f;if(t){for(p=t.offset,f=p+t.length,h=p;0<h&&!i(e,h-1);)h--;for(var m=f;m<e.length&&!i(e,m);)m++;u=e.substring(h,m),c=o(u,0,n)}else u=e,c=0,h=0,p=0,f=e.length;var y,b=a(n,e),k=!1,_=0;y=n.insertSpaces?r(" ",n.tabSize||4):"\t";var C=Object(s.a)(u,!1),T=!1,E=[],x=l();if(17!==x){var v=C.getTokenOffset()+h,S=r(y,c);g(S,h,v)}for(;17!==x;){for(var A=C.getTokenOffset()+C.getTokenLength()+h,w=l(),P="";!k&&(12===w||13===w);){var I=C.getTokenOffset()+h;g(" ",A,I),A=C.getTokenOffset()+C.getTokenLength()+h,P=12===w?d():"",w=l()}if(2===w)1!==x&&(_--,P=d());else if(4===w)3!==x&&(_--,P=d());else{switch(x){case 3:case 1:_++,P=d();break;case 5:case 12:P=d();break;case 13:P=k?d():" ";break;case 6:P=" ";break;case 10:if(6===w){P="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===w||13===w?P=" ":5!==w&&17!==w&&(T=!0);break;case 16:T=!0;}k&&(12===w||13===w)&&(P=d())}var O=C.getTokenOffset()+h;g(P,A,O),x=w}return E},t.b=i;var s=n(1221)},1263:function(e,t,n){"use strict";function r(e){if("array"===e.type)return e.children.map(r);if("object"===e.type){for(var t,n=Object.create(null),o=0,a=e.children;o<a.length;o++)t=a[o],n[t.children[0].value]=r(t.children[1]);return n}return e.value}function o(e,t,n){function r(e){return e?function(){return e(p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function a(){for(;;){var e=p.scan();switch(p.getTokenError()){case 4:s(14);break;case 5:s(15);break;case 3:s(13);break;case 1:x||s(11);break;case 2:s(12);break;case 6:s(16);}switch(e){case 12:case 13:x?s(10):T();break;case 16:s(1);break;case 15:case 14:break;default:return e;}}}function s(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),E(e),0<t.length+n.length)for(var r=p.getToken();17!==r;){if(-1!==t.indexOf(r)){a();break}else if(-1!==n.indexOf(r))break;r=a()}}function d(e){var t=p.getTokenValue();return e?_(t):m(t),a(),!0}function l(){switch(p.getToken()){case 11:var e=0;try{e=JSON.parse(p.getTokenValue()),"number"!=typeof e&&(s(2),e=0)}catch(t){s(2)}_(e);break;case 7:_(null);break;case 8:_(!0);break;case 9:_(!1);break;default:return!1;}return a(),!0}function g(){return 10===p.getToken()?(d(!1),6===p.getToken()?(C(":"),a(),!h()&&s(4,[],[2,5])):s(5,[],[2,5]),!0):(s(3,[],[2,5]),!1)}function c(){f(),a();for(var e=!1;2!==p.getToken()&&17!==p.getToken();){if(5!==p.getToken())e&&s(6,[],[]);else if(e||s(4,[],[]),C(","),a(),2===p.getToken()&&v)break;g()||s(4,[],[2,5]),e=!0}return y(),2===p.getToken()?a():s(7,[2],[]),!0}function u(){b(),a();for(var e=!1;4!==p.getToken()&&17!==p.getToken();){if(5!==p.getToken())e&&s(6,[],[]);else if(e||s(4,[],[]),C(","),a(),4===p.getToken()&&v)break;h()||s(4,[],[4,5]),e=!0}return k(),4===p.getToken()?a():s(8,[4],[]),!0}function h(){switch(p.getToken()){case 3:return u();case 1:return c();case 10:return d(!0);default:return l();}}var p=Object(i.a)(e,!1),f=r(t.onObjectBegin),m=o(t.onObjectProperty),y=r(t.onObjectEnd),b=r(t.onArrayBegin),k=r(t.onArrayEnd),_=o(t.onLiteralValue),C=o(t.onSeparator),T=r(t.onComment),E=o(t.onError),x=n&&n.disallowComments,v=n&&n.allowTrailingComma;return!(a(),17!==p.getToken())||(h()?(17!==p.getToken()&&s(9,[],[]),!0):(s(4,[],[]),!1))}function a(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null";}}t.b=function(e,t){function n(e,t,n,r){d.value=e,d.offset=t,d.length=n,d.type=r,d.columnOffset=void 0,s=d}var r=[],i={},s=void 0,d={value:{},offset:0,length:0,type:"object"},l=!1;try{o(e,{onObjectBegin:function(e){if(t<=e)throw i;s=void 0,l=t>e,r.push("")},onObjectProperty:function(e,o,a){if(t<o)throw i;if(n(e,o,a,"property"),r[r.length-1]=e,t<=o+a)throw i},onObjectEnd:function(e){if(t<=e)throw i;s=void 0,r.pop()},onArrayBegin:function(e){if(t<=e)throw i;s=void 0,r.push(0)},onArrayEnd:function(e){if(t<=e)throw i;s=void 0,r.pop()},onLiteralValue:function(e,r,o){if(t<r)throw i;if(n(e,r,o,a(e)),t<=r+o)throw i},onSeparator:function(e,n){if(t<=n)throw i;if(":"===e&&s&&"property"===s.type)s.columnOffset=n,l=!1,s=void 0;else if(","===e){var o=r[r.length-1];"number"==typeof o?r[r.length-1]=o+1:(l=!0,r[r.length-1]=""),s=void 0}}})}catch(t){if(t!==i)throw t}return{path:r,previousNode:s,isAtPropertyKey:l,matches:function(e){for(var t=0,n=0;t<e.length&&n<r.length;n++)if(e[t]===r[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.d=function(e,t,n){function r(e){Array.isArray(i)?i.push(e):a&&(i[a]=e)}void 0===t&&(t=[]);var a=null,i=[],s=[];return o(e,{onObjectBegin:function(){var e={};r(e),s.push(i),i=e,a=null},onObjectProperty:function(e){a=e},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var e=[];r(e),s.push(i),i=e,a=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:r,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),i[0]},t.e=function(e,t,n){function r(e){"property"===s.type&&(s.length=e-s.offset,s=s.parent)}function i(e){return s.children.push(e),e}void 0===t&&(t=[]);var s={type:"array",offset:-1,length:-1,children:[]};o(e,{onObjectBegin:function(e){s=i({type:"object",offset:e,length:-1,parent:s,children:[]})},onObjectProperty:function(e,t,n){s=i({type:"property",offset:t,length:-1,parent:s,children:[]}),s.children.push({type:"string",value:e,offset:t,length:n,parent:s})},onObjectEnd:function(e,t){s.length=e+t-s.offset,s=s.parent,r(e+t)},onArrayBegin:function(e){s=i({type:"array",offset:e,length:-1,parent:s,children:[]})},onArrayEnd:function(e,t){s.length=e+t-s.offset,s=s.parent,r(e+t)},onLiteralValue:function(e,t,n){i({type:a(e),offset:t,length:n,parent:s,value:e}),r(t+n)},onSeparator:function(e,t){"property"===s.type&&(":"===e?s.columnOffset=t:","===e&&r(t))},onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n);var d=s.children[0];return d&&delete d.parent,d},t.a=function(e,t){if(e){for(var n,r=e,o=0,a=t;o<a.length;o++)if(n=a[o],"string"==typeof n){if("object"!==r.type||!Array.isArray(r.children))return;for(var i,s=!1,d=0,l=r.children;d<l.length;d++)if(i=l[d],Array.isArray(i.children)&&i.children[0].value===n){r=i.children[1],s=!0;break}if(!s)return}else{var g=n;if("array"!==r.type||0>g||!Array.isArray(r.children)||g>=r.children.length)return;r=r.children[g]}return r}},t.c=r,t.g=o,t.f=function(e,t){var n,r,o=Object(i.a)(e),a=[],s=0;do r=o.getPosition(),n=o.scan(),12===n||13===n||17===n?(s!==r&&a.push(e.substring(s,r)),void 0!==t&&a.push(o.getTokenValue().replace(/[^\r\n]/g,t)),s=o.getPosition()):void 0;while(17!==n);return a.join("")};var i=n(1221)},1367:function(e,t,n){"use strict";function r(e){var t,n,a=new o(function(r,o){t=r,n=o},function(){});return e.then(t,n),a}n.d(t,"a",function(){return a});var o=monaco.Promise,a=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},30000),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._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>120000&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o;return r(this._getClient().then(function(e){o=e}).then(function(){return e._worker.withSyncedResources(t)}).then(function(){return o}))},e}()},1368:function(e,t,n){"use strict";function r(e){return e===y.b.Error?monaco.MarkerSeverity.Error:e===y.b.Warning?monaco.MarkerSeverity.Warning:e===y.b.Information?monaco.MarkerSeverity.Info:e===y.b.Hint?monaco.MarkerSeverity.Hint:monaco.MarkerSeverity.Info}function o(e,t){var n="number"==typeof t.code?t.code+"":t.code;return{severity:r(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:n,source:t.source}}function a(e){return e?{character:e.column-1,line:e.lineNumber-1}:void 0}function i(e){return e?{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}:void 0}function s(e){return e?new k(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1):void 0}function d(e){var t=monaco.languages.CompletionItemKind;return e===y.a.Text?t.Text:e===y.a.Method?t.Method:e===y.a.Function?t.Function:e===y.a.Constructor?t.Constructor:e===y.a.Field?t.Field:e===y.a.Variable?t.Variable:e===y.a.Class?t.Class:e===y.a.Interface?t.Interface:e===y.a.Module?t.Module:e===y.a.Property?t.Property:e===y.a.Unit?t.Unit:e===y.a.Value?t.Value:e===y.a.Enum?t.Enum:e===y.a.Keyword?t.Keyword:e===y.a.Snippet?t.Snippet:e===y.a.Color?t.Color:e===y.a.File?t.File:e===y.a.Reference?t.Reference:t.Property}function l(e){return e?{range:s(e.range),text:e.newText}:void 0}function g(e){return e&&"object"==typeof e&&"string"==typeof e.kind}function c(e){return"string"==typeof e?{value:e}:g(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function u(e){return e?Array.isArray(e)?e.map(c):[c(e)]:void 0}function h(e){return{uri:b.parse(e.uri),range:s(e.range)}}function p(e){var t=monaco.languages.SymbolKind;return e===y.e.File?t.Array:e===y.e.Module?t.Module:e===y.e.Namespace?t.Namespace:e===y.e.Package?t.Package:e===y.e.Class?t.Class:e===y.e.Method?t.Method:e===y.e.Property?t.Property:e===y.e.Field?t.Field:e===y.e.Constructor?t.Constructor:e===y.e.Enum?t.Enum:e===y.e.Interface?t.Interface:e===y.e.Function?t.Function:e===y.e.Variable?t.Variable:e===y.e.Constant?t.Constant:e===y.e.String?t.String:e===y.e.Number?t.Number:e===y.e.Boolean?t.Boolean:e===y.e.Array?t.Array:t.Function}function f(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}function m(e,t){return t.cancel&&e.onCancellationRequested(function(){return t.cancel()}),t}n.d(t,"b",function(){return _}),n.d(t,"a",function(){return C}),n.d(t,"g",function(){return T}),n.d(t,"f",function(){return E}),n.d(t,"d",function(){return x}),n.d(t,"e",function(){return v}),n.d(t,"c",function(){return S});var y=n(1369),b=monaco.Uri,k=monaco.Range,_=function(){function e(e,t,n){var r=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var o=function(e){var t=e.getModeId();if(t===r._languageId){var n;r._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(n),n=setTimeout(function(){return r._doValidate(e.uri,t)},500)}),r._doValidate(e.uri,t)}},a=function(e){monaco.editor.setModelMarkers(e,r._languageId,[]);var t=e.uri.toString(),n=r._listener[t];n&&(n.dispose(),delete r._listener[t])};this._disposables.push(monaco.editor.onDidCreateModel(o)),this._disposables.push(monaco.editor.onWillDisposeModel(function(e){a(e),r._resetSchema(e.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(e){a(e.model),o(e.model),r._resetSchema(e.model.uri)})),this._disposables.push(n.onDidChange(function(){monaco.editor.getModels().forEach(function(e){e.getModeId()===r._languageId&&(a(e),o(e))})})),this._disposables.push({dispose:function(){for(var e in monaco.editor.getModels().forEach(a),r._listener)r._listener[e].dispose()}}),monaco.editor.getModels().forEach(o)}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(t){t.resetSchema(e.toString())})},e.prototype._doValidate=function(e,t){this._worker(e).then(function(n){return n.doValidation(e.toString()).then(function(n){var r=n.map(function(t){return o(e,t)}),a=monaco.editor.getModel(e);a.getModeId()===t&&monaco.editor.setModelMarkers(a,t,r)})}).then(void 0,function(e){console.error(e)})},e}(),C=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,t,n){var r=e.getWordUntilPosition(t),o=e.uri;return m(n,this._worker(o).then(function(e){return e.doComplete(o.toString(),a(t))}).then(function(e){if(e){var t=e.items.map(function(e){var t={label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:d(e.kind)};return e.textEdit&&(t.range=s(e.textEdit.range),t.insertText=e.textEdit.newText),e.insertTextFormat===y.c.Snippet&&(t.insertText={value:t.insertText}),t});return{isIncomplete:e.isIncomplete,items:t}}}))},e}(),T=function(){function e(e){this._worker=e}return e.prototype.provideHover=function(e,t,n){var r=e.uri;return m(n,this._worker(r).then(function(e){return e.doHover(r.toString(),a(t))}).then(function(e){return e?{range:s(e.range),contents:u(e.contents)}:void 0}))},e}(),E=function(){function e(e){this._worker=e}return e.prototype.provideDocumentSymbols=function(e,t){var n=e.uri;return m(t,this._worker(n).then(function(e){return e.findDocumentSymbols(n.toString())}).then(function(e){return e?e.map(function(e){return{name:e.name,containerName:e.containerName,kind:p(e.kind),location:h(e.location)}}):void 0}))},e}(),x=function(){function e(e){this._worker=e}return e.prototype.provideDocumentFormattingEdits=function(e,t,n){var r=e.uri;return m(n,this._worker(r).then(function(e){return e.format(r.toString(),null,f(t)).then(function(e){return e&&0!==e.length?e.map(l):void 0})}))},e}(),v=function(){function e(e){this._worker=e}return e.prototype.provideDocumentRangeFormattingEdits=function(e,t,n,r){var o=e.uri;return m(r,this._worker(o).then(function(e){return e.format(o.toString(),i(t),f(n)).then(function(e){return e&&0!==e.length?e.map(l):void 0})}))},e}(),S=function(){function e(e){this._worker=e}return e.prototype.provideDocumentColors=function(e,t){var n=e.uri;return m(t,this._worker(n).then(function(e){return e.findDocumentColors(n.toString())}).then(function(e){return e?e.map(function(e){return{color:e.color,range:s(e.range)}}):void 0}))},e.prototype.provideColorPresentations=function(e,t,n){var r=e.uri;return m(n,this._worker(r).then(function(e){return e.getColorPresentations(r.toString(),t.color,i(t.range))}).then(function(e){return e?e.map(function(e){var t={label:e.label};return e.textEdit&&(t.textEdit=l(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(l)),t}):void 0}))},e}()},1369:function(e,t,n){"use strict";var r=Math.max,o=Math.min;n.d(t,"b",function(){return d}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return b}),n.d(t,"a",function(){return k}),n.d(t,"c",function(){return _}),n.d(t,"e",function(){return w});var a;(function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return L.defined(t)&&L.number(t.line)&&L.number(t.character)}})(a||(a={}));var i;(function(e){e.create=function(e,t,n,r){if(L.number(e)&&L.number(t)&&L.number(n)&&L.number(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return L.defined(t)&&a.is(t.start)&&a.is(t.end)}})(i||(i={}));var s;(function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return L.defined(t)&&i.is(t.range)&&(L.string(t.uri)||L.undefined(t.uri))}})(s||(s={}));var d;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(d||(d={}));var l;(function(e){e.create=function(e,t,n,r,o){var a={range:e,message:t};return L.defined(n)&&(a.severity=n),L.defined(r)&&(a.code=r),L.defined(o)&&(a.source=o),a},e.is=function(e){var t=e;return L.defined(t)&&i.is(t.range)&&L.string(t.message)&&(L.number(t.severity)||L.undefined(t.severity))&&(L.number(t.code)||L.string(t.code)||L.undefined(t.code))&&(L.string(t.source)||L.undefined(t.source))}})(l||(l={}));var g;(function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return L.defined(n)&&0<n.length&&(o.arguments=n),o},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.title)&&L.string(t.title)}})(g||(g={}));var c;(function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}}})(c||(c={}));var u;(function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return L.defined(t)&&m.is(t.textDocument)&&Array.isArray(t.edits)}})(u||(u={}));var h,p=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(c.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(c.replace(e,t))},e.prototype.delete=function(e){this.edits.push(c.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),f=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach(function(e){var n=new p(e.edits);t._textEditChanges[e.textDocument.uri]=n}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new p(e.changes[n]);t._textEditChanges[n]=r}))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(m.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for versioned document changes.");var t=e,n=this._textEditChanges[t.uri];if(!n){var r=[];this._workspaceEdit.documentChanges.push({textDocument:t,edits:r}),n=new p(r),this._textEditChanges[t.uri]=n}return n}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[e];if(!n){var r=[];this._workspaceEdit.changes[e]=r,n=new p(r),this._textEditChanges[e]=n}return n},e}();(function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)}})(h||(h={}));var m;(function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.number(t.version)}})(m||(m={}));var y;(function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.string(t.languageId)&&L.number(t.version)&&L.string(t.text)}})(y||(y={}));var b;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(b||(b={}));var k;(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})(k||(k={}));var _;(function(e){e.PlainText=1,e.Snippet=2})(_||(_={}));var C;(function(e){e.create=function(e){return{label:e}}})(C||(C={}));var T;(function(e){e.create=function(e,t){return{items:e?e:[],isIncomplete:!!t}}})(T||(T={}));var E;(function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}})(E||(E={}));var x;(function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}})(x||(x={}));var v;(function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return L.defined(t)&&(o.documentation=t),o.parameters=L.defined(n)?n:[],o}})(v||(v={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var A;(function(e){e.create=function(e,t){var n={range:e};return L.number(t)&&(n.kind=t),n}})(A||(A={}));var w;(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})(w||(w={}));var P;(function(e){e.create=function(e,t,n,r,o){var a={name:e,kind:t,location:{uri:r,range:n}};return o&&(a.containerName=o),a}})(P||(P={}));var I;(function(e){e.create=function(e){return{diagnostics:e}},e.is=function(e){var t=e;return L.defined(t)&&L.typedArray(t.diagnostics,l.is)}})(I||(I={}));var O;(function(e){e.create=function(e,t){var n={range:e};return L.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return L.defined(t)&&i.is(t.range)&&(L.undefined(t.command)||g.is(t.command))}})(O||(O={}));var M;(function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return L.defined(t)&&L.number(t.tabSize)&&L.boolean(t.insertSpaces)}})(M||(M={}));var j=function(){return function(){}}();(function(e){e.create=function(e,t){return{range:e,target:t}},e.is=function(e){var t=e;return L.defined(t)&&i.is(t.range)&&(L.undefined(t.target)||L.string(t.target))}})(j||(j={}));var F;(function(e){function t(e,n){if(1>=e.length)return e;var r=0|e.length/2,o=e.slice(0,r),a=e.slice(r);t(o,n),t(a,n);for(var s=0,d=0,l=0;s<o.length&&d<a.length;){var i=n(o[s],a[d]);e[l++]=0>=i?o[s++]:a[d++]}for(;s<o.length;)e[l++]=o[s++];for(;d<a.length;)e[l++]=a[d++];return e}e.create=function(e,t,n,r){return new W(e,t,n,r)},e.is=function(e){var t=e;return L.defined(t)&&L.string(t.uri)&&(L.undefined(t.languageId)||L.string(t.languageId))&&L.number(t.lineCount)&&L.func(t.getText)&&L.func(t.positionAt)&&L.func(t.offsetAt)},e.applyEdits=function(n,r){for(var o=n.getText(),a=t(r,function(e,t){var n=e.range.start.line-t.range.start.line;return 0==n?e.range.start.character-t.range.start.character:0}),s=o.length,d=a.length-1;0<=d;d--){var i=a[d],e=n.offsetAt(i.range.start),l=n.offsetAt(i.range.end);if(l<=s)o=o.substring(0,e)+i.newText+o.substring(l,o.length);else throw new Error("Ovelapping edit");s=e}return o}})(F||(F={}));var D;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(D||(D={}));var L,W=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,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(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&0<t.length&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=r(o(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){var s=Math.floor((n+i)/2);t[s]>e?i=s:n=s+1}var d=n-1;return a.create(d,e-t[d])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(0>e.line)return 0;var n=t[e.line],a=e.line+1<t.length?t[e.line+1]:this._content.length;return r(o(n+e.character,a),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();(function(e){var t=Object.prototype.toString;e.defined=function(e){return"undefined"!=typeof e},e.undefined=void 0,e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.func=function(e){return"[object Function]"===t.call(e)},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}})(L||(L={}))},1370:function(e,t,n){"use strict";function r(e,t,n,r){void 0===r&&(r=0);var y=0,b=!1;switch(n.scanError){case 2:t="\""+t,y=1;break;case 1:t="/*"+t,y=2;}var k,_,C=o.a(t),T=n.lastWasColon;for(_={tokens:[],endState:n.clone()};;){var E=r+C.getPosition(),x="";if(k=C.scan(),17===k)break;if(E===r+C.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(C.getPosition(),3));b&&(E-=y),b=0<y,1===k?(x=a,T=!1):2===k?(x=a,T=!1):3===k?(x=i,T=!1):4===k?(x=i,T=!1):6===k?(x=s,T=!0):5===k?(x=d,T=!1):8===k||9===k?(x=l,T=!1):7===k?(x=g,T=!1):10===k?(x=T?c:h,T=!1):11===k?(x=u,T=!1):void 0,e&&(12===k?x=f:13===k?x=p:void 0),_.endState=new m(n.getStateData(),C.getTokenError(),T),_.tokens.push({startIndex:E,scopes:x})}return _}t.a=function(e){return{getInitialState:function(){return new m(null,null,!1)},tokenize:function(t,n,o,a){return r(e,t,n,o,a)}}};var o=n(1371),a="delimiter.bracket.json",i="delimiter.array.json",s="delimiter.colon.json",d="delimiter.comma.json",l="keyword.json",g="keyword.json",c="string.value.json",u="number.json",h="string.key.json",p="comment.block.json",f="comment.line.json",m=function(){function e(e,t,n){this._state=e,this.scanError=t,this.lastWasColon=n}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(t){return t===this||t&&t instanceof e&&this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}()},1371:function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1262),o=n(1372),a=n(1221),i=n(1263),s=a.a,d=i.b,l=i.d,g=i.e,c=i.a,u=i.c,h=i.g,p=i.f},1372:function(e,t,n){"use strict";function r(e,t,n){var r=o(e,t),s=t.offset,d=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;0<s&&!Object(a.b)(r,s-1);)s--;for(;d<r.length&&!Object(a.b)(r,d);)d++}for(var l,g=Object(a.a)(r,{offset:s,length:d-s},n),c=g.length-1;0<=c;c--)l=g[c],r=o(r,l),s=Math.min(s,l.offset),d=Math.max(d,l.offset+l.length),d+=l.content.length-l.length;var i=e.length-(r.length-d)-s;return[{offset:s,length:i,content:r.substring(s,d)}]}function o(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}t.b=function(e,t,n,o,a){for(var s=[],d=Object(i.e)(e,s),l=void 0,g=void 0;0<t.length&&(g=t.pop(),l=Object(i.a)(d,t),void 0===l&&void 0!==n);)n="string"==typeof g?(v={},v[g]=n,v):[n];if(!l){if(void 0===n)throw new Error("Can not delete in empty document");return r(e,{offset:d?d.offset:0,length:d?d.length:0,content:JSON.stringify(n)},o)}if("object"===l.type&&"string"==typeof g&&Array.isArray(l.children)){var c=Object(i.a)(l,[g]);if(void 0!==c){if(void 0===n){if(!c.parent)throw new Error("Malformed AST");var u=l.children.indexOf(c.parent),h=void 0,p=c.parent.offset+c.parent.length;if(0<u){var f=l.children[u-1];h=f.offset+f.length}else if(h=l.offset+1,1<l.children.length){var m=l.children[1];p=m.offset}return r(e,{offset:h,length:p-h,content:""},o)}return r(e,{offset:c.offset,length:c.length,content:JSON.stringify(n)},o)}if(void 0===n)return[];var y=JSON.stringify(g)+": "+JSON.stringify(n),b=a?a(l.children.map(function(e){return e.children[0].value})):l.children.length,k=void 0;if(0<b){var f=l.children[b-1];k={offset:f.offset+f.length,length:0,content:","+y}}else k=0===l.children.length?{offset:l.offset+1,length:0,content:y}:{offset:l.offset+1,length:0,content:y+","};return r(e,k,o)}if("array"===l.type&&"number"==typeof g&&Array.isArray(l.children)){var _=g;if(-1==_){var y=""+JSON.stringify(n),k=void 0;if(0===l.children.length)k={offset:l.offset+1,length:0,content:y};else{var f=l.children[l.children.length-1];k={offset:f.offset+f.length,length:0,content:","+y}}return r(e,k,o)}if(void 0===n&&0<=l.children.length){var C=g,T=l.children[C],k=void 0;if(1===l.children.length)k={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1==C){var f=l.children[C-1],E=f.offset+f.length,x=l.offset+l.length;k={offset:E,length:x-2-E,content:""}}else k={offset:T.offset,length:l.children[C+1].offset-T.offset,content:""};return r(e,k,o)}throw new Error("Array modification not supported yet")}else throw new Error("Can not add "+("number"==typeof g?"property":"index")+" to parent of type "+l.type);var v},t.a=o;var a=n(1262),i=n(1263)}});