text: !function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=44)}([function(e,t){e.exports=require("vscode")},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(7);t.ErrorCodes=i.ErrorCodes,t.ResponseError=i.ResponseError,t.CancellationToken=i.CancellationToken,t.CancellationTokenSource=i.CancellationTokenSource,t.Disposable=i.Disposable,t.Event=i.Event,t.Emitter=i.Emitter,t.Trace=i.Trace,t.TraceFormat=i.TraceFormat,t.SetTraceNotification=i.SetTraceNotification,t.LogTraceNotification=i.LogTraceNotification,t.RequestType=i.RequestType,t.RequestType0=i.RequestType0,t.NotificationType=i.NotificationType,t.NotificationType0=i.NotificationType0,t.MessageReader=i.MessageReader,t.MessageWriter=i.MessageWriter,t.ConnectionStrategy=i.ConnectionStrategy,t.StreamMessageReader=i.StreamMessageReader,t.StreamMessageWriter=i.StreamMessageWriter,t.IPCMessageReader=i.IPCMessageReader,t.IPCMessageWriter=i.IPCMessageWriter,t.createClientPipeTransport=i.createClientPipeTransport,t.createServerPipeTransport=i.createServerPipeTransport,t.generateRandomPipeName=i.generateRandomPipeName,t.createClientSocketTransport=i.createClientSocketTransport,t.createServerSocketTransport=i.createServerSocketTransport,t.ProgressType=i.ProgressType,r(n(53)),r(n(54));const o=n(65),s=n(66);!function(e){let t,n,r,i,a,c;!function(e){e.method=o.CallHierarchyPrepareRequest.method,e.type=o.CallHierarchyPrepareRequest.type}(t=e.CallHierarchyPrepareRequest||(e.CallHierarchyPrepareRequest={})),function(e){e.method=o.CallHierarchyIncomingCallsRequest.method,e.type=o.CallHierarchyIncomingCallsRequest.type}(n=e.CallHierarchyIncomingCallsRequest||(e.CallHierarchyIncomingCallsRequest={})),function(e){e.method=o.CallHierarchyOutgoingCallsRequest.method,e.type=o.CallHierarchyOutgoingCallsRequest.type}(r=e.CallHierarchyOutgoingCallsRequest||(e.CallHierarchyOutgoingCallsRequest={})),e.SemanticTokenTypes=s.SemanticTokenTypes,e.SemanticTokenModifiers=s.SemanticTokenModifiers,e.SemanticTokens=s.SemanticTokens,function(e){e.method=s.SemanticTokensRequest.method,e.type=s.SemanticTokensRequest.type}(i=e.SemanticTokensRequest||(e.SemanticTokensRequest={})),function(e){e.method=s.SemanticTokensEditsRequest.method,e.type=s.SemanticTokensEditsRequest.type}(a=e.SemanticTokensEditsRequest||(e.SemanticTokensEditsRequest={})),function(e){e.method=s.SemanticTokensRangeRequest.method,e.type=s.SemanticTokensRangeRequest.type}(c=e.SemanticTokensRangeRequest||(e.SemanticTokensRangeRequest={}))}(t.Proposed||(t.Proposed={})),t.createProtocolConnection=function(e,t,n,r){return i.createMessageConnection(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),i=n(34);t.makePatchingRequire=i.makePatchingRequire;var o=function(e){return!0},s=function(){function e(){this.version=n(89).version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some(function(e){var t=e.filter;return!t||t(!1)})},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach(function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch(e){}}),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=o);var r=this.subscribers[e];if(r)for(var i=0;i<r.length;++i)if(r[i].listener===t&&r[i].filter===n)return r.splice(i,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach(function(t){return delete e.knownPatches[t]})},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(n){return e(t(n))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new s,n(35).prototype.require=r.makePatchingRequire(global.diagnosticsSource.getPatchesObject()));t.channel=global.diagnosticsSource},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7);t.ProtocolRequestType0=class extends r.RequestType0{constructor(e){super(e)}};t.ProtocolRequestType=class extends r.RequestType{constructor(e){super(e)}};t.ProtocolNotificationType=class extends r.NotificationType{constructor(e){super(e)}};t.ProtocolNotificationType0=class extends r.NotificationType0{constructor(e){super(e)}}},function(e,t,n){"use strict";var r=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.enableDebug&&console.info(e.TAG+t,n)},e.warn=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.disableWarnings||console.warn(e.TAG+t,n)},e.enableDebug=!1,e.disableWarnings=!1,e.TAG="ApplicationInsights:",e}();e.exports=r},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(67),s=n(68),a=n(14),c=n(69),u=n(32),l=n(33);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(1));class d{error(e){console.error(e)}warn(e){console.warn(e)}info(e){console.info(e)}log(e){console.log(e)}}var p,h,f,g,m;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(p=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(h=t.CloseAction||(t.CloseAction={}));class v{constructor(e){this.name=e,this.restarts=[]}error(e,t,n){return n&&n<=3?p.Continue:p.Shutdown}closed(){if(this.restarts.push(Date.now()),this.restarts.length<5)return h.Restart;return this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(r.window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`),h.DoNotRestart):(this.restarts.shift(),h.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(f=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(g=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(m||(m={}));const y=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],C=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter];function _(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var T;!function(e){e.is=function(e){let t=e;return t&&a.func(t.register)&&a.func(t.unregister)&&a.func(t.dispose)&&void 0!==t.messages}}(T||(T={}));class R{constructor(e,t,n,r,i,o){this._client=e,this._event=t,this._type=n,this._middleware=r,this._createParams=i,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t))return!0;return!1}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,e=>this._client.sendNotification(this._type,this._createParams(e))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(r.languages.match(t,e))return{send:e=>{this.callback(e)}};throw new Error("No provider available for the given text document")}}class w extends R{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),R.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){if(super.register(e,t),!t.registerOptions.documentSelector)return;let n=t.registerOptions.documentSelector;r.workspace.textDocuments.forEach(e=>{let t=e.uri.toString();if(!this._syncedDocuments.has(t)&&r.languages.match(n,e)){let n=this._client.clientOptions.middleware,r=e=>{this._client.sendNotification(this._type,this._createParams(e))};n.didOpen?n.didOpen(e,r):r(e),this._syncedDocuments.set(t,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class b extends R{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),R.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach(e=>{if(r.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}})}}class E{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get messages(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===i.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===i.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new c.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))},-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}};throw new Error("No provider available for the given text document")}}class S extends R{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>R.textDocumentFilter(e,t.document))}get messages(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}}class k{constructor(e){this._client=e,this._selectors=new Map}get messages(){return i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){if(R.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class P extends R{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),R.textDocumentFilter)}get messages(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){_(_(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})}register(e,t){this._includeText=!!t.registerOptions.includeText,super.register(e,t)}}class D{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get messages(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){_(_(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e,t){if(!Array.isArray(t.registerOptions.watchers))return;let n=[];for(let e of t.registerOptions.watchers){if(!a.string(e.globPattern))continue;let t=!0,o=!0,s=!0;void 0!==e.kind&&null!==e.kind&&(t=0!=(e.kind&i.WatchKind.Create),o=0!=(e.kind&i.WatchKind.Change),s=0!=(e.kind&i.WatchKind.Delete));let c=r.workspace.createFileSystemWatcher(e.globPattern,!t,!o,!s);this.hookListeners(c,t,o,s),n.push(c)}this._watchers.set(t.id,n)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,r,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed}),null,o),r&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}}class x{constructor(e,t){this._client=e,this._message=t,this._registrations=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);if(!t.registerOptions.documentSelector)return;let n=this.registerLanguageProvider(t.registerOptions);this._registrations.set(t.id,{disposable:n[0],data:t,provider:n[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(i.TextDocumentRegistrationOptions.is(t)){const n=i.StaticRegistrationOptions.hasId(t)?t.id:u.generateUuid(),r=t.documentSelector||e;if(r)return[n,Object.assign({},t,{documentSelector:r})]}else if(a.boolean(t)&&!0===t||i.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[u.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&r.languages.match(n,e))return t.provider}throw new Error(`The feature has no registration for the provided text document ${e.uri.toString()}`)}}t.TextDocumentFeature=x;class I{constructor(e,t){this._client=e,this._message=t,this._registrations=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wron feature. Requested ${e.method} but reached feature ${this.messages.method}`);const n=this.registerLanguageProvider(t.registerOptions);this._registrations.set(t.id,{disposable:n[0],provider:n[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}class O extends x{constructor(e){super(e,i.CompletionRequest.type)}fillClientCapabilities(e){let t=_(_(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[i.CompletionItemTag.Deprecated]}},t.completionItemKind={valueSet:C}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.triggerCharacters||[],n={provideCompletionItems:(e,t,n,r)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,r)=>o.sendRequest(i.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),r).then(o.protocol2CodeConverter.asCompletionResult,e=>(o.logFailedRequest(i.CompletionRequest.type,e),Promise.resolve([])));return s.provideCompletionItem?s.provideCompletionItem(e,t,r,n,a):a(e,t,r,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(i.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>(n.logFailedRequest(i.CompletionResolveRequest.type,t),Promise.resolve(e)));return r.resolveCompletionItem?r.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[r.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class N extends x{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=_(_(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.HoverRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asHover,e=>(r.logFailedRequest(i.HoverRequest.type,e),Promise.resolve(null))),s=r.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[r.languages.registerHoverProvider(e.documentSelector,t),t]}}class q extends x{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=_(_(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),r).then(o.protocol2CodeConverter.asSignatureHelp,e=>(o.logFailedRequest(i.SignatureHelpRequest.type,e),Promise.resolve(null))),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,r,n,s):s(e,t,r,n)}};let n;if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,...i)}else{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,i)}return[n,t]}}class A extends x{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=_(_(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>(r.logFailedRequest(i.DefinitionRequest.type,e),Promise.resolve(null))),s=r.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class L extends x{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideReferences:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),r).then(o.protocol2CodeConverter.asReferences,e=>(o.logFailedRequest(i.ReferencesRequest.type,e),Promise.resolve([]))),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerReferenceProvider(e.documentSelector,t),t]}}class M extends x{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentHighlights:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DocumentHighlightRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDocumentHighlights,e=>(r.logFailedRequest(i.DocumentHighlightRequest.type,e),Promise.resolve([]))),s=r.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class F extends x{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=_(_(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y},t.hierarchicalDocumentSymbolSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentSymbols:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return i.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>(n.logFailedRequest(i.DocumentSymbolRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,r):r(e,t)}};return[r.languages.registerDocumentSymbolProvider(e.documentSelector,t),t]}}class j extends I{constructor(e){super(e,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=_(_(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y}}initialize(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:u.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>(n.logFailedRequest(i.WorkspaceSymbolRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,r):r(e,t)}};return[r.languages.registerWorkspaceSymbolProvider(t),t]}}class H extends x{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=_(_(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:[i.CodeActionKind.Empty,i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeActions:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(i.CodeActionRequest.type,s,r).then(e=>{if(null===e)return;const t=[];for(let n of e)i.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>(o.logFailedRequest(i.CodeActionRequest.type,e),Promise.resolve([])))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class z extends x{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"codeLens").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeLenses:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>(n.logFailedRequest(i.CodeLensRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,r):r(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>(n.logFailedRequest(i.CodeLensResolveRequest.type,t),e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,r):r(e,t)}:void 0};return[r.languages.registerCodeLensProvider(e.documentSelector,t),t]}}class K extends x{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentFormattingEdits:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),options:r.code2ProtocolConverter.asFormattingOptions(t)};return r.sendRequest(i.DocumentFormattingRequest.type,o,n).then(r.protocol2CodeConverter.asTextEdits,e=>(r.logFailedRequest(i.DocumentFormattingRequest.type,e),Promise.resolve([])))},s=r.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class U extends x{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentRangeFormattingEdits:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n)};return o.sendRequest(i.DocumentRangeFormattingRequest.type,s,r).then(o.protocol2CodeConverter.asTextEdits,e=>(o.logFailedRequest(i.DocumentRangeFormattingRequest.type,e),Promise.resolve([])))};let a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class W extends x{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){_(_(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideOnTypeFormattingEdits:(e,t,n,r,o)=>{const s=this._client,a=(e,t,n,r,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(r)};return s.sendRequest(i.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>(s.logFailedRequest(i.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,r,o,a):a(e,t,n,r,o)}},n=e.moreTriggerCharacter||[];return[r.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class $ extends x{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=_(_(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(a.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register(this.messages,{id:u.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t={provideRenameEdits:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(i.RenameRequest.type,s,r).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>(o.logFailedRequest(i.RenameRequest.type,e),Promise.reject(new Error(e.message))))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,r,s):s(e,t,n,r)},prepareRename:e.prepareProvider?(e,t,n)=>{const r=this._client,o=(e,t,n)=>{let o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)};return r.sendRequest(i.PrepareRenameRequest.type,o,n).then(e=>i.Range.is(e)?r.protocol2CodeConverter.asRange(e):e&&i.Range.is(e.range)?{range:r.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>(r.logFailedRequest(i.PrepareRenameRequest.type,e),Promise.reject(new Error(e.message))))},s=r.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[r.languages.registerRenameProvider(e.documentSelector,t),t]}}class V extends x{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=_(_(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentLinks:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>(n.logFailedRequest(i.DocumentLinkRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,r):r(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let r=(e,t)=>n.sendRequest(i.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>(n.logFailedRequest(i.DocumentLinkResolveRequest.type,t),Promise.resolve(e)));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,r):r(e,t)}:void 0};return[r.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class G{constructor(e){this._client=e,this._listeners=new Map}get messages(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){_(_(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{section:e}})}register(e,t){let n=r.workspace.onDidChangeConfiguration(e=>{this.onDidChangeConfiguration(t.registerOptions.section,e)});this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(void 0!==(n=a.string(e)?[e]:e)&&void 0!==t){if(!n.some(e=>t.affectsConfiguration(e)))return}let r=e=>{void 0!==e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,r):r(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=n[t[e]];r||(r=Object.create(null),n[t[e]]=r),n=r}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),c=null;if(c=a>=0?r.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):r.workspace.getConfiguration(s,n)){let n=e[o].split(".");t(i,n)[n[n.length-1]]=c}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class B{constructor(e){this._client=e,this._commands=new Map}get messages(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){_(_(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e,t){const n=this._client,o=n.clientOptions.middleware,s=(e,t)=>{let r={command:e,arguments:t};return n.sendRequest(i.ExecuteCommandRequest.type,r).then(void 0,e=>{n.logFailedRequest(i.ExecuteCommandRequest.type,e)})};if(t.registerOptions.commands){const e=[];for(const n of t.registerOptions.commands)e.push(r.commands.registerCommand(n,(...e)=>o.executeCommand?o.executeCommand(n,e,s):s(n,e)));this._commands.set(t.id,e)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(e=>e.dispose())}dispose(){this._commands.forEach(e=>{e.forEach(e=>e.dispose())}),this._commands.clear()}}!function(e){e.is=function(e){return e&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class Z{constructor(e,t){this._resolve=e,this._reject=t,this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}}t.BaseLanguageClient=class{constructor(e,t,n){this._traceFormat=i.TraceFormat.Text,this._features=[],this._method2Message=new Map,this._dynamicFeatures=new Map,this._id=e,this._name=t,n=n||{},this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||f.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||new v(this._name),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this.state=m.Initial,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Z(e,t)}),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get state(){return this._state}set state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){return this.state===m.Running?g.Running:this.state===m.Starting?g.Starting:g.Stopped}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{return this._resolvedConnection.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${a.string(e)?e:e.method} failed.`,t),t}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${a.string(e)?e:e.method} failed.`,t),t}}onProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onProgress(e,t,n)}catch(e){throw this.error(`Registering progress handler for token ${t} failed.`,e),e}}sendProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(){return new v(this._name)}set trace(e){this._trace=e,this.onReady().then(()=>{this.resolveConnection().then(e=>{e.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})})},()=>{})}data2String(e){if(e instanceof i.ResponseError){const t=e;return`  Message: ${t.message}\n  Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t,n=!0){this.outputChannel.appendLine(`[Info  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=f.Info&&this.showNotificationMessage()}warn(e,t,n=!0){this.outputChannel.appendLine(`[Warn  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=f.Warn&&this.showNotificationMessage()}error(e,t,n=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=f.Error&&this.showNotificationMessage()}showNotificationMessage(){r.window.showInformationMessage("A request has failed. See the output for more information.","Go to output").then(()=>{this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP   - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.state===m.Initial||this.state===m.Stopping||this.state===m.Stopped}needsStop(){return this.state===m.Starting||this.state===m.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===m.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Z(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection()),this.state=m.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case i.MessageType.Error:this.error(e.message,void 0,!1);break;case i.MessageType.Warning:this.warn(e.message,void 0,!1);break;case i.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:r.window.showInformationMessage(e.message);break;default:r.window.showInformationMessage(e.message)}}),e.onRequest(i.ShowMessageRequest.type,e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:t=r.window.showInformationMessage;break;default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=m.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),r.window.showErrorMessage(`Couldn't start client ${this._name}`)}),new r.Disposable(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:process.pid,clientInfo:{name:"vscode",version:r.version},rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:i.Trace.toString(this._trace),workspaceFolders:null};if(this.fillInitializeParams(o),this._clientOptions.progressOnInitialization){const t=u.generateUuid(),n=new l.ProgressPart(e,t);return o.workDoneToken=t,this.doInitialize(e,o).then(e=>(n.done(),e),e=>{throw n.cancel(),e})}return this.doInitialize(e,o)}doInitialize(e,t){return e.initialize(t).then(t=>{this._resolvedConnection=e,this._initializeResult=t,this.state=m.Running;let n=void 0;return a.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics(e=>this.handleDiagnostics(e)),e.onRequest(i.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(i.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(i.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t}).then(void 0,t=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))}):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===m.Stopping&&this._onStop?this._onStop:(this.state=m.Stopping,this.cleanUp(!1),this._onStop=this.resolveConnection().then(e=>e.shutdown().then(()=>{e.exit(),e.dispose(),this.state=m.Stopped,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))):(this.state=m.Stopped,Promise.resolve())}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach(e=>e.dispose()),this._listeners=void 0),this._providers&&(this._providers.forEach(e=>e.dispose()),this._providers=void 0),this._syncedDocuments&&this._syncedDocuments.clear();for(let e of this._dynamicFeatures.values())e.dispose();e&&this.cleanUpChannel(),t&&this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0)}cleanUpChannel(){this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){var t,n;const r=this;function i(e){r._fileEvents.push(e),r._fileEventDelayer.trigger(()=>{r.onReady().then(()=>{r.resolveConnection().then(e=>{r.isConnectionActive()&&(r.forceDocumentSync(),e.didChangeWatchedFiles({changes:r._fileEvents})),r._fileEvents=[]})},e=>{r.error("Notify file events failed.",e)})})}const o=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null===(n=o)||void 0===n?void 0:n.didChangeWatchedFile)?o.didChangeWatchedFile(e,i):i(e)}forceDocumentSync(){this._dynamicFeatures.get(i.DidChangeTextDocumentNotification.type.method).forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),r=this.clientOptions.middleware;r.handleDiagnostics?r.handleDiagnostics(t,n,(e,t)=>this.setDiagnostics(e,t)):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(n=>(function(e,t,n,r){let o=new d,s=i.createProtocolConnection(e,t,o);return s.onError(e=>{n(e[0],e[1],e[2])}),s.onClose(r),{listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(a.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(a.string(e)?e:e.method,t),sendNotification:(e,t)=>s.sendNotification(a.string(e)?e:e.method,t),onNotification:(e,t)=>s.onNotification(a.string(e)?e:e.method,t),onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(e,t,n)=>{const r={sendNotification:!1,traceFormat:i.TraceFormat.Text};void 0===n?s.trace(e,t,r):(a.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(i.InitializeRequest.type,e),shutdown:()=>s.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(i.ExitNotification.type),onLogMessage:e=>s.onNotification(i.LogMessageNotification.type,e),onShowMessage:e=>s.onNotification(i.ShowMessageNotification.type,e),onTelemetry:e=>s.onNotification(i.TelemetryEventNotification.type,e),didChangeConfiguration:e=>s.sendNotification(i.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>s.sendNotification(i.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>s.sendNotification(i.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>s.sendNotification(i.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>s.sendNotification(i.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>s.sendNotification(i.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>s.onNotification(i.PublishDiagnosticsNotification.type,e),dispose:()=>s.dispose()}})(n.reader,n.writer,e,t))}handleConnectionClosed(){if(this.state===m.Stopping||this.state===m.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=h.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===h.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state=m.Stopped,this.cleanUp(!1,!0)):e===h.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=m.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===p.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){r.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=r.workspace.getConfiguration(this._id),o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n])&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t)}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),T.is(e)){let t=e.messages;if(Array.isArray(t))for(let n of t)this._method2Message.set(n.method,n),this._dynamicFeatures.set(n.method,e);else this._method2Message.set(t.method,t),this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){this.registerFeature(new G(this)),this.registerFeature(new w(this,this._syncedDocuments)),this.registerFeature(new E(this)),this.registerFeature(new S(this)),this.registerFeature(new k(this)),this.registerFeature(new P(this)),this.registerFeature(new b(this,this._syncedDocuments)),this.registerFeature(new D(this,e=>this.notifyFileEvent(e))),this.registerFeature(new O(this)),this.registerFeature(new N(this)),this.registerFeature(new q(this)),this.registerFeature(new A(this)),this.registerFeature(new L(this)),this.registerFeature(new M(this)),this.registerFeature(new F(this)),this.registerFeature(new j(this)),this.registerFeature(new H(this)),this.registerFeature(new z(this)),this.registerFeature(new K(this)),this.registerFeature(new U(this)),this.registerFeature(new W(this)),this.registerFeature(new $(this)),this.registerFeature(new V(this)),this.registerFeature(new B(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};_(e,"workspace").applyEdit=!0;let t=_(_(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional;let n=_(_(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[i.DiagnosticTag.Unnecessary,i.DiagnosticTag.Deprecated]};for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let e of this._features)e.initialize(this._capabilities,t)}handleRegistrationRequest(e){return new Promise((t,n)=>{for(let t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const r=t.registerOptions||{};r.documentSelector=r.documentSelector||this._clientOptions.documentSelector;const i={id:t.id,registerOptions:r};e.register(this._method2Message.get(t.method),i)}t()})}handleUnregistrationRequest(e){return new Promise((t,n)=>{for(let t of e.unregisterations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}t()})}handleApplyWorkspaceEdit(e){let t=e.edit,n=new Map;r.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):a.asPromise(r.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}logFailedRequest(e,t){t instanceof i.ResponseError&&(t.code===i.ErrorCodes.RequestCancelled||t.code===i.ErrorCodes.ContentModified)||this.error(`Request ${e.method} failed.`,t)}}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(12),o=n(48);t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.RequestType1=o.RequestType1,t.RequestType2=o.RequestType2,t.RequestType3=o.RequestType3,t.RequestType4=o.RequestType4,t.RequestType5=o.RequestType5,t.RequestType6=o.RequestType6,t.RequestType7=o.RequestType7,t.RequestType8=o.RequestType8,t.RequestType9=o.RequestType9,t.ResponseError=o.ResponseError,t.ErrorCodes=o.ErrorCodes,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.NotificationType1=o.NotificationType1,t.NotificationType2=o.NotificationType2,t.NotificationType3=o.NotificationType3,t.NotificationType4=o.NotificationType4,t.NotificationType5=o.NotificationType5,t.NotificationType6=o.NotificationType6,t.NotificationType7=o.NotificationType7,t.NotificationType8=o.NotificationType8,t.NotificationType9=o.NotificationType9;const s=n(20);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=n(21);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const c=n(17);t.Disposable=c.Disposable,t.Event=c.Event,t.Emitter=c.Emitter;const u=n(49);t.CancellationTokenSource=u.CancellationTokenSource,t.CancellationToken=u.CancellationToken;const l=n(50);var d,p,h,f,g,m,v,y;r(n(51)),r(n(52)),function(e){e.type=new o.NotificationType("$/cancelRequest")}(d||(d={})),function(e){e.type=new o.NotificationType("$/progress")}(p||(p={}));t.ProgressType=class{constructor(){}},t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTraceNotification")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class C extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,C.prototype)}}function _(e,t,n,r){let s=0,a=0,_=0;const T="2.0";let R,w,b=void 0,E=Object.create(null),S=void 0,k=Object.create(null),P=new Map,D=new l.LinkedMap,x=Object.create(null),I=Object.create(null),O=h.Off,N=f.Text,q=y.New,A=new c.Emitter,L=new c.Emitter,M=new c.Emitter,F=new c.Emitter,j=new c.Emitter;function H(e){return"req-"+e.toString()}function z(e,t){o.isRequestMessage(t)?e.set(H(t.id),t):o.isResponseMessage(t)?e.set(function(e){return null===e?"res-unknown-"+(++_).toString():"res-"+e.toString()}(t.id),t):e.set("not-"+(++a).toString(),t)}function K(e){}function U(){return q===y.Listening}function W(){return q===y.Closed}function $(){return q===y.Disposed}function V(){q!==y.New&&q!==y.Listening||(q=y.Closed,L.fire(void 0))}function G(){R||0===D.size||(R=setImmediate(()=>{R=void 0,function(){if(0===D.size)return;let e=D.shift();try{o.isRequestMessage(e)?function(e){if($())return;function n(n,r,i){let s={jsonrpc:T,id:e.id};n instanceof o.ResponseError?s.error=n.toJson():s.result=void 0===n?null:n,Z(s,r,i),t.write(s)}function r(n,r,i){let o={jsonrpc:T,id:e.id,error:n.toJson()};Z(o,r,i),t.write(o)}!function(e){if(O===h.Off||!w)return;if(N===f.Text){let t=void 0;O===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),w.log(`Received request '${e.method} - (${e.id})'.`,t)}else X("receive-request",e)}(e);let s,a,c=E[e.method];c&&(s=c.type,a=c.handler);let l=Date.now();if(a||b){let c=new u.CancellationTokenSource,d=String(e.id);I[d]=c;try{let u,p=u=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(c.token):b(e.method,c.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,c.token):b(e.method,...e.params,c.token):a?a(e.params,c.token):b(e.method,e.params,c.token);u?p.then?p.then(t=>{delete I[d],n(t,e.method,l)},t=>{delete I[d],t instanceof o.ResponseError?r(t,e.method,l):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(delete I[d],n(u,e.method,l)):(delete I[d],function(n,r,i){void 0===n&&(n=null);let o={jsonrpc:T,id:e.id,result:n};Z(o,r,i),t.write(o)}(u,e.method,l))}catch(t){delete I[d],t instanceof o.ResponseError?n(t,e.method,l):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):o.isNotificationMessage(e)?function(e){if($())return;let t,r=void 0;if(e.method===d.type.method)t=(e=>{let t=e.id,n=I[String(t)];n&&n.cancel()});else{let n=k[e.method];n&&(t=n.handler,r=n.type)}if(t||S)try{!function(e){if(O===h.Off||!w||e.method===m.type.method)return;if(N===f.Text){let t=void 0;O===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),w.log(`Received notification '${e.method}'.`,t)}else X("receive-notification",e)}(e),void 0===e.params||void 0!==r&&0===r.numberOfParams?t?t():S(e.method):i.array(e.params)&&(void 0===r||r.numberOfParams>1)?t?t(...e.params):S(e.method,...e.params):t?t(e.params):S(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else M.fire(e)}(e):o.isResponseMessage(e)?function(e){if($())return;if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),r=x[t];if(function(e,t){if(O===h.Off||!w)return;if(N===f.Text){let n=void 0;if(O===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";w.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else w.log(`Received response ${e.id} without active response promise.`,n)}else X("receive-response",e)}(e,r),r){delete x[t];try{if(e.error){let t=e.error;r.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${r.method}' failed with message: ${e.message}`):n.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),n=x[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{G()}}()}))}e.onClose(V),e.onError(function(e){A.fire([e,void 0,void 0])}),t.onClose(V),t.onError(function(e){A.fire(e)});let B=e=>{try{if(o.isNotificationMessage(e)&&e.method===d.type.method){let n=H(e.params.id),i=D.get(n);if(o.isRequestMessage(i)){let o=r&&r.cancelUndispatched?r.cancelUndispatched(i,K):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return D.delete(n),o.id=i.id,Z(o,e.method,Date.now()),void t.write(o)}}z(D,e)}finally{G()}};function Z(e,t,n){if(O!==h.Off&&w)if(N===f.Text){let r=void 0;O===h.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),w.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else X("send-response",e)}function X(e,t){if(!w||O===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};w.log(n)}function J(){if(W())throw new C(v.Closed,"Connection is closed.");if($())throw new C(v.Disposed,"Connection is disposed.")}function Y(e){return void 0===e?null:e}function Q(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=null;break;case 1:n=Y(t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Y(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}let ee={sendNotification:(e,...n)=>{let r,o;if(J(),i.string(e))switch(r=e,n.length){case 0:o=null;break;case 1:o=n[0];break;default:o=n}else r=e.method,o=Q(e,n);let s={jsonrpc:T,method:r,params:o};!function(e){if(O!==h.Off&&w)if(N===f.Text){let t=void 0;O===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),w.log(`Sending notification '${e.method}'.`,t)}else X("send-notification",e)}(s),t.write(s)},onNotification:(e,t)=>{J(),i.func(e)?S=e:t&&(i.string(e)?k[e]={type:void 0,handler:t}:k[e.method]={type:e,handler:t})},onProgress:(e,t,n)=>{if(P.has(t))throw new Error(`Progress handler for token ${t} already registered`);return P.set(t,n),{dispose:()=>{P.delete(t)}}},sendProgress:(e,t,n)=>{ee.sendNotification(p.type,{token:t,value:n})},onUnhandledProgress:F.event,sendRequest:(e,...n)=>{let r,a;J(),function(){if(!U())throw new Error("Call listen() first.")}();let c=void 0;if(i.string(e))switch(r=e,n.length){case 0:a=null;break;case 1:u.CancellationToken.is(n[0])?(a=null,c=n[0]):a=Y(n[0]);break;default:const t=n.length-1;u.CancellationToken.is(n[t])?(c=n[t],a=2===n.length?Y(n[0]):n.slice(0,t).map(e=>Y(e))):a=n.map(e=>Y(e))}else{r=e.method,a=Q(e,n);let t=e.numberOfParams;c=u.CancellationToken.is(n[t])?n[t]:void 0}let l=s++,p=new Promise((e,n)=>{let i={jsonrpc:T,id:l,method:r,params:a},s={method:r,timerStart:Date.now(),resolve:e,reject:n};!function(e){if(O!==h.Off&&w)if(N===f.Text){let t=void 0;O===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),w.log(`Sending request '${e.method} - (${e.id})'.`,t)}else X("send-request",e)}(i);try{t.write(i)}catch(e){s.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),s=null}s&&(x[String(l)]=s)});return c&&c.onCancellationRequested(()=>{ee.sendNotification(d.type,{id:l})}),p},onRequest:(e,t)=>{J(),i.func(e)?b=e:t&&(i.string(e)?E[e]={type:void 0,handler:t}:E[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let r=!1,o=f.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||f.Text)),N=o,w=(O=e)===h.Off?void 0:t,!r||W()||$()||ee.sendNotification(g.type,{value:h.toString(e)})},onError:A.event,onClose:L.event,onUnhandledNotification:M.event,onDispose:j.event,dispose:()=>{if($())return;q=y.Disposed,j.fire(void 0);let n=new Error("Connection got disposed.");Object.keys(x).forEach(e=>{x[e].reject(n)}),x=Object.create(null),I=Object.create(null),D=new l.LinkedMap,i.func(t.dispose)&&t.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{J(),function(){if(U())throw new C(v.AlreadyListening,"Connection is already listening")}(),q=y.Listening,e.listen(B)},inspect:()=>{console.log("inspect")}};return ee.onNotification(m.type,e=>{O!==h.Off&&w&&w.log(e.message,O===h.Verbose?e.verbose:void 0)}),ee.onNotification(p.type,e=>{const t=P.get(e.token);t?t(e.value):F.fire(e)}),ee}t.ConnectionError=C,function(e){e.is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)}}(t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,r,i){return r||(r=t.NullLogger),_(function(e){return void 0!==e.listen&&void 0===e.read}(e)?e:new s.StreamMessageReader(e),function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new a.StreamMessageWriter(n),r,i)}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(107)),r(n(37)),r(n(122))},function(e,t,n){"use strict";var r=function(){return function(){}}();e.exports=r},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=n(24),o=n(25),s=n(18),a=n(127),c=n(4),u=n(16),l=function(){function e(){}return e.getCookie=function(t,n){var r="";if(t&&t.length&&"string"==typeof n)for(var i=t+"=",o=n.split(";"),s=0;s<o.length;s++){n=o[s];if((n=e.trim(n))&&0===n.indexOf(i)){r=n.substring(i.length,o[s].length);break}}return r},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},n=e.map(function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)}).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(i>0?i+".":"")+r+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r<n.length;r++){if(new RegExp(n[r].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1}return!0},e.getCorrelationContextTarget=function(e,t){var n=e.headers&&e.headers[u.requestContextHeader];if(n)for(var r=n.split(","),i=0;i<r.length;++i){var o=r[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,n,a,u){n&&0===n.indexOf("//")&&(n="https:"+n);var l=s.parse(n),d=r({},a,{host:l.hostname,port:l.port,path:l.pathname}),p=void 0;if("https:"===l.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===l.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var h=s.parse(p);"https:"===h.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):d=r({},d,{host:h.hostname,port:h.port||"80",path:n,headers:r({},d.headers,{Host:l.hostname})})}var f="https:"===l.protocol&&!p;return f&&void 0!==t.httpsAgent?d.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(d.agent=e.tlsRestrictedAgent):d.agent=t.httpAgent,f?o.request(d,u):i.request(d,u)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();e.exports=l},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))}},function(e,t){e.exports=require("os")},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=n(22),o=function(){function e(){}return e.getCurrentContext=function(){return e.enabled?Zone.current.get("context"):null},e.generateContextObject=function(e,t,n,r){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t},customProperties:new s(r)}:null},e.runWithContext=function(t,n){e.enabled?Zone.current.fork({name:"AI-"+(t&&t.operation.parentId||"Unknown"),properties:{context:t}}).run(n):n()},e.wrapCallback=function(t){return e.enabled?Zone.current.wrap(t,"User-wrapped method"):t},e.enable=function(){if(!this.enabled)if(this.isNodeVersionCompatible()){if(!e.hasEverEnabled){this.hasEverEnabled=!0;try{"undefined"==typeof Zone&&n(102)}catch(e){r.warn("Failed to require zone.js")}i.registerContextPreservation(function(e){return Zone.current.wrap(e,"AI-ContextPreservation")}),this.patchError(),this.patchTimers(["setTimeout","setInterval"])}this.enabled=!0}else this.enabled=!1},e.disable=function(){this.enabled=!1},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.patchTimers=function(e){e.forEach(function(e){var t=global[e];global[e]=function(){var e=t.apply(this,arguments);return e.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},e}})},e.patchError=function(){var e=global.Error;function t(){if(!(this instanceof t))return t.apply(Object.create(t.prototype),arguments);var n=e.stackRewrite;if(e.prepareStackTrace){e.stackRewrite=!1;var r=e.prepareStackTrace;e.prepareStackTrace=function(e,t){for(var n=!1,i=0;i<t.length;i++){var o=t[i].getFileName();if(o)if(-1===o.indexOf("AutoCollection/CorrelationContextManager")&&-1===o.indexOf("AutoCollection\\CorrelationContextManager")){if(n)break}else n=!0}return i=Math.max(0,i-1),n&&t.splice(0,i),r(e,t)}}if(e.apply(this,arguments),e.stackRewrite=n,this.stack&&"string"==typeof this.stack){var i=this.stack.split("\n");i.length>3&&(0===i[2].trim().indexOf("at Error.AppInsightsAsyncCorrelatedErrorWrapper")?i.splice(2,1):0===i[1].trim().indexOf("at AppInsightsAsyncCorrelatedErrorWrapper.ZoneAwareError")&&0===i[2].trim().indexOf("at new AppInsightsAsyncCorrelatedErrorWrapper")&&i.splice(1,2)),this.stack=i.map(function(e){var t=e.indexOf(") [");return t>-1&&(e=e.substr(0,t+1)),e}).join("\n")}for(var o=Object.getOwnPropertyNames(this).concat(Object.keys(this)),s=0;s<o.length;s++){var a=o[s],c=Zone.__symbol__(a);Object.defineProperty(this,a,{enumerable:!1}),Object.defineProperty(this,c,{enumerable:!1,writable:!0})}return this}t.prototype=e.prototype;for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r];t[i]||Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}global.Error=t},e.enabled=!1,e.hasEverEnabled=!1,e}();t.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map(function(e){var t=e.split("=");return{key:t[0],value:t[1]}}).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map(function(e){return e.key+"="+e.value}).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var n=this.props[t];if(n.key===e)return n.value}},e.prototype.setProperty=function(t,n){if(e.bannedCharacters.test(t)||e.bannedCharacters.test(n))r.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+t+" and value: "+n);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===t)return void(o.value=n)}this.props.push({key:t,value:n})}},e.bannedCharacters=/[,=]/,e}()},function(e,t,n){"use strict";e.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class r{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var n=!1,r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...e){if(!this._callbacks)return[];for(var t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0),i=0,o=n.length;i<o;i++)try{t.push(n[i].apply(r[i],e))}catch(e){console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=((e,t,n)=>{let o;return this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),o={dispose:()=>{this._callbacks.remove(e,t),o.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(n)&&n.push(o),o})),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=i,i._noop=function(){}},function(e,t){e.exports=require("url")},function(e,t){e.exports=require("child_process")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(17),i=n(12);let o=8192,s=Buffer.from("\r","ascii")[0],a=Buffer.from("\n","ascii")[0],c="\r\n";class u{constructor(e="utf8"){this.encoding=e,this.index=0,this.buffer=Buffer.allocUnsafe(o)}append(e){var t=e;if("string"==typeof e){var n=e,r=Buffer.byteLength(n,this.encoding);(t=Buffer.allocUnsafe(r)).write(n,0,r,this.encoding)}if(this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{var i=(Math.ceil((this.index+t.length)/o)+1)*o;0===this.index?(this.buffer=Buffer.allocUnsafe(i),t.copy(this.buffer,0,0,t.length)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),t],i)}this.index+=t.length}tryReadHeaders(){let e=void 0,t=0;for(;t+3<this.index&&(this.buffer[t]!==s||this.buffer[t+1]!==a||this.buffer[t+2]!==s||this.buffer[t+3]!==a);)t++;if(t+3>=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split(c).forEach(t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let r=t.substr(0,n),i=t.substr(n+1).trim();e[r]=i});let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index<e)return null;let t=this.buffer.toString(this.encoding,0,e),n=e;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}get numberOfBytes(){return this.index}}!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class l{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l;class d extends l{constructor(e,t="utf8"){super(),this.readable=e,this.buffer=new u(t),this._partialMessageTimeout=1e4}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,this.readable.on("data",e=>{this.onData(e)}),this.readable.on("error",e=>this.fireError(e)),this.readable.on("close",()=>this.fireClose())}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=d;t.IPCMessageReader=class extends l{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){this.process.on("message",e)}};t.SocketMessageReader=class extends d{constructor(e,t="utf-8"){super(e,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(17),i=n(12);let o="Content-Length: ",s="\r\n";!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class a{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a;t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",e=>this.fireError(e)),this.writable.on("close",()=>this.fireClose())}write(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.writable.write(r.join(""),"ascii"),this.writable.write(t,this.encoding),this.errorCount=0}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",e=>this.fireError(e)),this.socket.on("close",()=>this.fireClose())}dispose(){super.dispose(),this.socket.destroy()}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.sending=!0,this.socket.write(r.join(""),"ascii",n=>{n&&this.handleError(n,e);try{this.socket.write(t,this.encoding,t=>{this.sending=!1,t?this.handleError(t,e):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})}catch(n){this.handleError(n,e)}})}catch(t){this.handleError(t,e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}},function(e,t,n){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL,t.IsInitialized){var r=n(86),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),o={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston};for(var s in o)-1===i.indexOf(s)&&o[s].enable()}t.registerContextPreservation=function(e){t.IsInitialized&&n(2).channel.addContextPreservation(e)}},function(e,t,n){"use strict";var r=n(24),i=n(25),o=n(4),s=n(10),a=n(16),c=n(128),u=n(15),l=n(22),d=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),l.IsInitialized&&(n(129).enable(e,this._client),n(130).enable(e,this._client),n(131).enable(e,this._client),n(132).enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;r.get;var n=r.request,o=i.request,s=function(n,r){var i=!r[e.disableCollectionRequestOption]&&!n[e.alreadyAutoCollectedFlag];n[e.alreadyAutoCollectedFlag]=!0,n&&r&&i&&e.trackRequest(t._client,{options:r,request:n})};r.request=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=n.call.apply(n,[r,e].concat(t));return s(o,e),o},i.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=o.call.apply(o,[i,e].concat(t));return s(r,e),r},r.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i,o=(i=r.request).call.apply(i,[r,e].concat(t));return o.end(),o},i.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=(r=i.request).call.apply(r,[i,e].concat(t));return o.end(),o}},e.trackRequest=function(t,n){if(n.options&&n.request&&t){var r=new c(n.options,n.request),i=u.CorrelationContextManager.getCurrentContext(),l=i&&i.operation&&i.operation.parentId+e.requestNumber+++".";if(s.canIncludeCorrelationHeader(t,r.getUrl())&&n.request.getHeader&&n.request.setHeader){if(t.config&&t.config.correlationId){var d=n.request.getHeader(a.requestContextHeader);if(d){var p=d.split(","),h=a.requestContextSourceKey+"=";p.some(function(e){return e.substring(0,h.length)===h})||n.request.setHeader(a.requestContextHeader,d+","+a.requestContextSourceKey+"="+t.config.correlationId)}else n.request.setHeader(a.requestContextHeader,a.requestContextSourceKey+"="+t.config.correlationId)}if(i&&i.operation){n.request.setHeader(a.requestIdHeader,l),n.request.setHeader(a.parentIdHeader,i.operation.id),n.request.setHeader(a.rootIdHeader,l);var f=i.customProperties.serializeToHeader();f&&n.request.setHeader(a.correlationContextHeader,f)}}n.request.on&&(n.request.on("response",function(e){r.onResponse(e);var i=r.getDependencyTelemetry(n,l);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)}),n.request.on("error",function(e){r.onError(e);var i=r.getDependencyTelemetry(n,l);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects.Error=e,t.trackDependency(i)}))}else o.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();e.exports=d},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("https")},function(e,t,n){"use strict";var r=n(10),i=n(4),o=function(){function e(){}return e.queryCorrelationId=function(t,n){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))n(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(n);else{e.pendingLookups[o]=[n];var s=function(){if(e.pendingLookups[o]){var n={method:"GET",disableAppInsightsAutoCollection:!0};i.info(e.TAG,n);var a=r.makeRequest(t,o,n,function(n){if(200===n.statusCode){var r="";n.setEncoding("utf-8"),n.on("data",function(e){r+=e}),n.on("end",function(){i.info(e.TAG,r);var t=e.correlationIdPrefix+r;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach(function(e){return e(t)}),delete e.pendingLookups[o]})}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)});a&&(a.on("error",function(t){i.warn(e.TAG,t)}),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter(function(e){return e!=n}),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+r.w3cTraceId()+"."},e.appendSuffix=function(t,n,i){if(t.length+n.length<e.requestIdMaxLength)return t+n+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(n=r.randomu32().toString(16);n.length<8;)n="0"+n;return t.substring(0,o)+n+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=r.randomu32(),e}();e.exports=o},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("net")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);t.default=class extends r.CompletionItem{constructor(e){super(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);t.default=class extends r.CodeLens{constructor(e){super(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);t.default=class extends r.DocumentLink{constructor(e,t){super(e,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends r{constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}}function o(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return o().asHex()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(14);t.ProgressPart=class{constructor(e,t){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(i.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done()}})}begin(e){let t=e.cancellable?r.ProgressLocation.Notification:r.ProgressLocation.Window;r.window.withProgress({location:t,cancellable:e.cancellable,title:e.title},async(t,n)=>(this._progress=t,this._infinite=void 0===e.percentage,this._cancellationToken=n,this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(i.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})))}report(e){if(this._infinite&&o.string(e.message))this._progress.report({message:e.message});else if(o.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._progress.report({message:e.message,increment:n}),this._reported+=n}}cancel(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=n(88),o=n(35),s=Object.keys(process.binding("natives")),a=o.prototype.require;t.makePatchingRequire=function(e){var t={};return function(n){var c=a.apply(this,arguments);if(e[n]){var u=o._resolveFilename(n,this);if(t.hasOwnProperty(u))return t[u];var l=void 0;if(s.indexOf(n)<0)try{l=a.call(this,r.join(n,"package.json")).version}catch(e){return c}else l=process.version.substring(1);var d=l.indexOf("-");d>=0&&(l=l.substring(0,d));for(var p=c,h=0,f=e[n];h<f.length;h++){var g=f[h];i.satisfies(l,g.versionSpecifier)&&(p=g.patch(p,u))}return t[u]=p}return c}}},function(e,t){e.exports=require("module")},function(e,t){e.exports=require("events")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvailabilityData=n(108),t.Base=n(38),t.ContextTagKeys=n(109),t.Data=n(110),t.DataPoint=n(111),t.DataPointType=n(39),t.Domain=n(9),t.Envelope=n(112),t.EventData=n(40),t.ExceptionData=n(113),t.ExceptionDetails=n(114),t.MessageData=n(115),t.MetricData=n(116),t.PageViewData=n(117),t.RemoteDependencyData=n(118),t.RequestData=n(119),t.SeverityLevel=n(120),t.StackFrame=n(121)},function(e,t,n){"use strict";var r=function(){return function(){}}();e.exports=r},function(e,t,n){"use strict";var r;!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(r||(r={})),e.exports=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=n(13),i=n(4),o=function(){function e(t){if(e.INSTANCE)throw new Error("Performance tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._isInitialized=!1,this._client=t}return e.prototype.enable=function(t){var n=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=r.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._handle=setInterval(function(){return n.trackPerformance()},6e4),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,n){var r=this;if(e.isEnabled()){var o=+new Date;t&&n?"function"==typeof n.once&&n.once("finish",function(){var t=+new Date;r._lastRequestExecutionTime=t-o,e._totalRequestCount++,n.statusCode>=400&&e._totalFailedRequestCount++}):i.warn("AutoCollectPerformance.countRequest was called with invalid parameters: ",!!t,!!n)}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork()},e.prototype._trackCpu=function(){var e=r.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,n=0,i=0,o=0,s=0,a=0;e&&a<e.length;a++){var c=e[a],u=this._lastCpus[a],l=(c.model,c.speed,c.times),d=u.times;t+=l.user-d.user||0,n+=l.sys-d.sys||0,i+=l.nice-d.nice||0,o+=l.idle-d.idle||0,s+=l.irq-d.irq||0}var p=void 0;if("function"==typeof process.cpuUsage){var h=process.cpuUsage(),f=process.hrtime(),g=h.user-this._lastAppCpuUsage.user+(h.system-this._lastAppCpuUsage.system)||0;if(void 0!==this._lastHrtime&&2===this._lastHrtime.length)p=100*g/((1e6*(f[0]-this._lastHrtime[0])+(f[1]-this._lastHrtime[1])/1e3||0)*e.length);this._lastAppCpuUsage=h,this._lastHrtime=f}var m=t+n+i+o+s||1;this._client.trackMetric({name:"\\Processor(_Total)\\% Processor Time",value:(m-o)/m*100}),this._client.trackMetric({name:"\\Process(??APP_WIN32_PROC??)\\% Processor Time",value:p||t/m*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=r.freemem(),t=process.memoryUsage().rss;this._client.trackMetric({name:"\\Process(??APP_WIN32_PROC??)\\Private Bytes",value:t}),this._client.trackMetric({name:"\\Memory\\Available Bytes",value:e})},e.prototype._trackNetwork=function(){var t=this._lastRequests,n={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-t.totalRequestCount||0,i=(t.totalFailedRequestCount,n.time-t.time),o=i/1e3;if(i>0){var s=r/o;this._client.trackMetric({name:"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",value:s}),this._client.trackMetric({name:"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time",value:e._lastRequestExecutionTime})}this._lastRequests=n},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._lastRequestExecutionTime=0,e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();e.exports=r},function(e,t,n){"use strict";var r=n(24),i=n(25),o=n(4),s=n(10),a=n(16),c=n(133),u=n(15),l=n(41),d=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||l.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e){e&&!this._isAutoCorrelating?u.CorrelationContextManager.enable():!e&&this._isAutoCorrelating&&u.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return u.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=function(n){if(n){if("function"!=typeof n)throw new Error("onRequest handler must be a function");return function(r,i){var o=r&&!r[e.alreadyAutoCollectedFlag];if(r&&o){var s=new c(r),a=t._generateCorrelationContext(s);u.CorrelationContextManager.runWithContext(a,function(){t._isEnabled&&(r[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:r,response:i},s)),l.countRequest(r,i),"function"==typeof n&&n(r,i)})}else"function"==typeof n&&n(r,i)}}},o=function(e){var t=e.addListener.bind(e);e.addListener=function(e,r){switch(e){case"request":case"checkContinue":return t(e,n(r));default:return t(e,r)}},e.on=e.addListener},s=r.createServer;r.createServer=function(e){var t=s(n(e));return o(t),t};var a=i.createServer;i.createServer=function(e,t){var r=a(e,n(t));return o(r),r}},e.trackRequestSync=function(t,n){if(n.request&&n.response&&t){e.addResponseCorrelationIdHeader(t,n.response);var r=u.CorrelationContextManager.getCurrentContext(),i=new c(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(t.context.tags)||r.operation.id,r.operation.name=i.getOperationName(t.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),e.endRequest(t,i,n,n.duration,n.error)}else o.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!t)},e.trackRequest=function(t,n,r){if(n.request&&n.response&&t){var i=u.CorrelationContextManager.getCurrentContext(),a=r||new c(n.request,i&&i.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,n.response),i&&!r&&(i.operation.id=a.getOperationId(t.context.tags)||i.operation.id,i.operation.name=a.getOperationName(t.context.tags)||i.operation.name,i.operation.parentId=a.getOperationParentId(t.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(a.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",function(){e.endRequest(t,a,n,null,null)}),n.request.on&&n.request.on("error",function(r){e.endRequest(t,a,n,null,r)})}else o.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var n=t.getHeader(a.requestContextHeader);if(n){var r=n.split(","),i=a.requestContextSourceKey+"=";r.some(function(e){return e.substring(0,i.length)===i})||t.setHeader(a.requestContextHeader,n+","+a.requestContextSourceKey+"="+e.config.correlationId)}else t.setHeader(a.requestContextHeader,a.requestContextSourceKey+"="+e.config.correlationId)}},e.endRequest=function(e,t,n,r,i){i?t.onError(i,r):t.onResponse(n.response,r);var o=t.getRequestTelemetry(n);if(o.tagOverrides=t.getRequestTags(e.context.tags),n.tagOverrides)for(var s in n.tagOverrides)o.tagOverrides[s]=n.tagOverrides[s];o.contextObjects=o.contextObjects||{},o.contextObjects["http.ServerRequest"]=n.request,o.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deactivate=t.activate=void 0;const r=n(5),i=n(11),o=n(45).loadMessageBundle(n(5).join(__dirname,"htmlMain.ts")),s=n(0),a=n(46),c=n(82),u=n(83),l=n(84),d=n(144);var p,h,f,g;let m;function v(e){try{return JSON.parse(i.readFileSync(e).toString())}catch(t){return console.log(`Problems reading ${e}: ${t}`),{}}}!function(e){e.type=new a.RequestType("html/tag")}(p||(p={})),function(e){e.type=new a.RequestType("html/onTypeRename")}(h||(h={})),function(e){e.type=new a.RequestType("html/semanticTokens")}(f||(f={})),function(e){e.type=new a.RequestType0("html/semanticTokenLegend")}(g||(g={})),t.activate=function(e){let t=e.subscriptions,n=function(e){let t=v(e.asAbsolutePath("./package.json"));return t?{name:t.name,version:t.version,aiKey:t.aiKey}:null}(e);m=n&&new l.default(n.name,n.version,n.aiKey);let i=v(e.asAbsolutePath("./server/package.json")).main,y=e.asAbsolutePath(r.join("server",i)),C={run:{module:y,transport:a.TransportKind.ipc},debug:{module:y,transport:a.TransportKind.ipc,options:{execArgv:["--nolazy","--inspect=6045"]}}},_=["html","handlebars"],T=void 0,R=[...d.getCustomDataPathsInAllWorkspaces(s.workspace.workspaceFolders),...d.getCustomDataPathsFromAllExtensions()],w={documentSelector:_,synchronize:{configurationSection:["html","css","javascript"]},initializationOptions:{embeddedLanguages:{css:!0,javascript:!0},dataPaths:R,provideFormatter:!1},middleware:{provideCompletionItem(e,t,n,r,i){function o(e){const n=e.range;n instanceof s.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new s.Range(n.start,t),replacing:n})}function a(e){return e&&(Array.isArray(e)?e:e.items).forEach(o),e}const c=i(e,t,n,r);return(e=>e&&e.then)(c)?c.then(a):a(c)}}},b=new a.LanguageClient("html",o(0,null),C,w);b.registerProposedFeatures();let E=b.start();function S(){const e=s.workspace.getConfiguration().get("html.format.enable");!e&&T?(T.dispose(),T=void 0):e&&!T&&(T=s.languages.registerDocumentRangeFormattingEditProvider(_,{provideDocumentRangeFormattingEdits(e,t,n,r){let i={textDocument:b.code2ProtocolConverter.asTextDocumentIdentifier(e),range:b.code2ProtocolConverter.asRange(t),options:b.code2ProtocolConverter.asFormattingOptions(n)};return b.sendRequest(a.DocumentRangeFormattingRequest.type,i,r).then(b.protocol2CodeConverter.asTextEdits,e=>(b.logFailedRequest(a.DocumentRangeFormattingRequest.type,e),Promise.resolve([])))}}))}t.push(E),b.onReady().then(()=>{E=u.activateTagClosing((e,t)=>{let n=b.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return b.sendRequest(p.type,n)},{html:!0,handlebars:!0},"html.autoClosingTags"),t.push(E),E=b.onTelemetry(e=>{m&&m.sendTelemetryEvent(e.key,e.data)}),t.push(E),S(),t.push({dispose:()=>T&&T.dispose()}),t.push(s.workspace.onDidChangeConfiguration(e=>e.affectsConfiguration("html.format.enable")&&S())),b.sendRequest(g.type).then(e=>{if(e){const n={provideDocumentSemanticTokens(e){const t={textDocument:b.code2ProtocolConverter.asTextDocumentIdentifier(e)};return b.sendRequest(f.type,t).then(e=>e&&new s.SemanticTokens(new Uint32Array(e)))},provideDocumentRangeSemanticTokens(e,t){const n={textDocument:b.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:[b.code2ProtocolConverter.asRange(t)]};return b.sendRequest(f.type,n).then(e=>e&&new s.SemanticTokens(new Uint32Array(e)))}};t.push(s.languages.registerDocumentSemanticTokensProvider(_,n,new s.SemanticTokensLegend(e.types,e.modifiers)))}})}),s.languages.setLanguageConfiguration("html",{indentationRules:{increaseIndentPattern:/<(?!\?|(?:area|base|br|col|frame|hr|html|img|input|link|meta|param)\b|[^>]*\/>)([-_\.A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*<\/\1>)|<!--(?!.*-->)|\{[^}"']*$/,decreaseIndentPattern:/^\s*(<\/(?!html)[-_\.A-Za-z0-9]+\b[^>]*>|-->|\})/},wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,onEnterRules:[{beforeText:new RegExp(`<(?!(?:${c.EMPTY_ELEMENTS.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>/i,action:{indentAction:s.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${c.EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:s.IndentAction.Indent}}]}),s.languages.setLanguageConfiguration("handlebars",{wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,onEnterRules:[{beforeText:new RegExp(`<(?!(?:${c.EMPTY_ELEMENTS.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>/i,action:{indentAction:s.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${c.EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:s.IndentAction.Indent}}]});const k=/^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?$/,P=/^(\s*)(<(h(t(m(l)?)?)?)?)?$/;s.languages.registerCompletionItemProvider(_,{provideCompletionItems(e,t){const n=[];let r=e.getText(new s.Range(new s.Position(t.line,0),t)),i=r.match(k);if(i){let e=new s.Range(new s.Position(t.line,i[1].length),t),r=new s.CompletionItem("#region",s.CompletionItemKind.Snippet);r.range=e,r.insertText=new s.SnippetString("\x3c!-- #region $1--\x3e"),r.documentation=o(1,null),r.filterText=i[2],r.sortText="za",n.push(r);let a=new s.CompletionItem("#endregion",s.CompletionItemKind.Snippet);a.range=e,a.insertText=new s.SnippetString("\x3c!-- #endregion --\x3e"),a.documentation=o(2,null),a.filterText=i[2],a.sortText="zb",n.push(a)}let a=r.match(P);if(a&&e.getText(new s.Range(new s.Position(0,0),t)).match(P)){let e=new s.Range(new s.Position(t.line,a[1].length),t),r=new s.CompletionItem("HTML sample",s.CompletionItemKind.Snippet);r.range=e;const i=["<!DOCTYPE html>","<html>","<head>","\t<meta charset='utf-8'>","\t<meta http-equiv='X-UA-Compatible' content='IE=edge'>","\t<title>${1:Page Title}</title>","\t<meta name='viewport' content='width=device-width, initial-scale=1'>","\t<link rel='stylesheet' type='text/css' media='screen' href='${2:main.css}'>","\t<script src='${3:main.js}'><\/script>","</head>","<body>","\t$0","</body>","</html>"].join("\n");r.insertText=new s.SnippetString(i),r.documentation=o(3,null),r.filterText=a[2],r.sortText="za",n.push(r)}return n}}),s.languages.registerOnTypeRenameProvider(_,{async provideOnTypeRenameRanges(e,t){const n=b.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return await b.sendRequest(h.type,n)||[]}})},t.deactivate=function(){return m?m.dispose():Promise.resolve(null)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o,s,a,c,u=n(5),l=n(11),d=Object.prototype.toString;function p(e){return void 0!==e}function h(e){return"[object String]"===d.call(e)}function f(e){return JSON.parse(l.readFileSync(e,"utf8"))}function g(e,t){return c&&(e="［"+e.replace(/[aouei]/g,"$&$&")+"］"),0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0],i=t[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&void 0!==i&&null!==i||(o=String(i)),o})}function m(e){return function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return function(e){return"[object Number]"===d.call(e)}(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):g(e[t],r):h(n)?(console.warn("Message "+n+" didn't get externalized correctly."),g(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function v(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return g(t,n)}function y(e,t){return s[e]=t,t}function C(e,t){var n,r=u.join(a.cacheRoot,e.id+"-"+e.hash+".json"),i=!1,o=!1;try{return n=JSON.parse(l.readFileSync(r,{encoding:"utf8",flag:"r"})),function(e){var t=new Date;l.utimes(e,t,t,function(){})}(r),n}catch(e){if("ENOENT"===e.code)o=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),l.unlink(r,function(e){e&&console.error("Deleting corrupted bundle "+r+" failed.")}),i=!0}}if(!(n=function(e,t){var n=a.translationsConfig[e.id];if(n){var r=f(n).contents,i=f(u.join(t,"nls.metadata.json")),o=Object.create(null);for(var s in i){var c=i[s],l=r[e.outDir+"/"+s];if(l){for(var d=[],p=0;p<c.keys.length;p++){var g=c.keys[p],m=l[h(g)?g:g.key];void 0===m&&(m=c.messages[p]),d.push(m)}o[s]=d}else o[s]=c.messages}return o}}(e,t))||i)return n;if(o)try{l.writeFileSync(r,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}function _(e){try{return function(e){var t=f(u.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var i=t[r];n[r]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function T(e,t){var n;if(!0===a.languagePackSupport&&void 0!==a.cacheRoot&&void 0!==a.languagePackId&&void 0!==a.translationsConfigFile&&void 0!==a.translationsConfig)try{n=C(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(a.languagePackSupport)return _(t);var r=function(e){for(var t=a.language;t;){var n=u.join(e,"nls.bundle."+t+".json");if(l.existsSync(n))return n;var r=t.lastIndexOf("-");t=r>0?t.substring(0,r):void 0}if(void 0===t&&(n=u.join(e,"nls.bundle.json"),l.existsSync(n)))return n}(t);if(r)try{return f(r)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=_(t)}return n}function R(e){if(!e)return v;var t=u.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),a.messageFormat===r.both||a.messageFormat===r.bundle){var n=function(e){for(var t,n=u.dirname(e);t=u.join(n,"nls.metadata.header.json"),!l.existsSync(t);){var r=u.dirname(n);if(r===n){t=void 0;break}n=r}return t}(e);if(n){var i=u.dirname(n),o=s[i];if(void 0===o)try{var d=JSON.parse(l.readFileSync(n,"utf8"));try{var h=T(d,i);o=y(i,h?{header:d,nlsBundle:h}:null)}catch(e){console.error("Failed to load nls bundle",e),o=y(i,null)}}catch(e){console.error("Failed to read header file",e),o=y(i,null)}if(o){var g=e.substr(i.length+1).replace(/\\/g,"/"),C=o.nlsBundle[g];return void 0===C?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):m(C)}}}if(a.messageFormat===r.both||a.messageFormat===r.file)try{var _=f(function(e){var t;if(a.cacheLanguageResolution&&t)t=t;else{if(c||!a.language)t=".nls.json";else for(var n=a.language;n;){var r=".nls."+n+".json";if(l.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}a.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(_)?m(_):p(_.messages)&&p(_.keys)?m(_.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(r=t.MessageFormat||(t.MessageFormat={})),function(e){e.standalone="standalone",e.languagePack="languagePack"}(i=t.BundleFormat||(t.BundleFormat={})),function(e){e.is=function(e){var t=e;return t&&p(t.key)&&p(t.comment)}}(o||(o={})),function(){if(a={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:r.bundle},h(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];h(n)&&(t=n)}if(h(e.locale)&&(a.locale=e.locale.toLowerCase()),void 0===t?a.language=a.locale:"en"!==t&&(a.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(a.languagePackSupport=e._languagePackSupport),h(e._cacheRoot)&&(a.cacheRoot=e._cacheRoot),h(e._languagePackId)&&(a.languagePackId=e._languagePackId),h(e._translationsConfigFile)){a.translationsConfigFile=e._translationsConfigFile;try{a.translationsConfig=f(a.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=u.dirname(e._corruptedFile);l.exists(i,function(t){t&&l.writeFile(e._corruptedFile,"corrupted","utf8",function(e){console.error(e)})})}}}}catch(e){}c="pseudo"===a.locale,void 0,s=Object.create(null)}(),t.loadMessageBundle=R,t.config=function(e){return e&&(h(e.locale)&&(a.locale=e.locale.toLowerCase(),a.language=a.locale,void 0,s=Object.create(null)),void 0!==e.messageFormat&&(a.messageFormat=e.messageFormat),e.bundleFormat===i.standalone&&!0===a.languagePackSupport&&(a.languagePackSupport=!1)),c="pseudo"===a.locale,R}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(19),i=n(11),o=n(47),s=n(6),a=n(0),c=n(1),u=n(70),l=n(71),d=n(72),p=n(73),h=n(74),f=n(75),g=n(76),m=n(77),v=n(78),y=n(79),C=n(80),_=n(14),T=n(81);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(6));const R="^1.41.0";var w,b,E,S,k,P,D;!function(e){e.is=function(e){return _.string(e.command)}}(w||(w={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(b=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===b.socket&&_.number(t.port)}}(E||(E={})),function(e){e.is=function(e){return _.string(e.module)}}(S||(S={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(k||(k={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(P||(P={}));t.LanguageClient=class extends s.BaseLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,u;_.string(t)?(o=e,s=t,a=n,c=r,u=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,u=r),void 0===u&&(u=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=u;try{this.checkVersion()}catch(e){throw _.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=o.parse(a.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${a.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!o.satisfies(e,R))throw new Error(`The language client requires VS Code version ${R} but received version ${a.version}`)}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}})}checkProcessDied(e){e&&setTimeout(()=>{try{process.kill(e.pid,0),T.terminate(e)}catch(e){}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}createMessageTransports(e){function t(e,t){if(!e&&!t)return;let n=Object.create(null);return Object.keys(process.env).forEach(e=>n[e]=process.env[e]),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach(t=>n[t]=e[t]),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function o(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}let a,u=this._serverOptions;if(_.func(u))return u().then(t=>{if(s.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(k.is(t))return this._isDetached=!!t.detached,{reader:new c.StreamMessageReader(t.reader),writer:new c.StreamMessageWriter(t.writer)};{let n;return P.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),{reader:new c.StreamMessageReader(n.stdout),writer:new c.StreamMessageWriter(n.stdin)}}});let l=u;return a=l.run||l.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some(e=>n.some(t=>e.startsWith(t))||i.some(t=>e===t))}()?l.debug:l.run:u,this._getServerWorkingDir(a.options).then(n=>{if(S.is(a)&&a.module){let i=a,s=i.transport||b.stdio;if(!i.runtime){let a=void 0;return new Promise((u,l)=>{let d=i.args&&i.args.slice()||[];s===b.ipc?d.push("--node-ipc"):s===b.stdio?d.push("--stdio"):s===b.pipe?(a=c.generateRandomPipeName(),d.push(`--pipe=${a}`)):E.isSocket(s)&&d.push(`--socket=${s.port}`),d.push(`--clientProcessId=${process.pid.toString()}`);let p=i.options||Object.create(null);if(p.env=t(p.env,!0),p.execArgv=p.execArgv||[],p.cwd=n,p.silent=!0,s===b.ipc||s===b.stdio){let t=r.fork(i.module,d||[],p);o(t),this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),s===b.ipc?(t.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),u({reader:new c.IPCMessageReader(this._serverProcess),writer:new c.IPCMessageWriter(this._serverProcess)})):u({reader:new c.StreamMessageReader(t.stdout),writer:new c.StreamMessageWriter(t.stdin)})}else s===b.pipe?c.createClientPipeTransport(a).then(t=>{let n=r.fork(i.module,d||[],p);o(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),t.onConnected().then(e=>{u({reader:e[0],writer:e[1]})})}):E.isSocket(s)&&c.createClientSocketTransport(s.port).then(t=>{let n=r.fork(i.module,d||[],p);o(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),t.onConnected().then(e=>{u({reader:e[0],writer:e[1]})})})})}{let o=[],a=i.options||Object.create(null);a.execArgv&&a.execArgv.forEach(e=>o.push(e)),o.push(i.module),i.args&&i.args.forEach(e=>o.push(e));let u=Object.create(null);u.cwd=n,u.env=t(a.env,!1);let l=void 0;if(s===b.ipc?(u.stdio=[null,null,null,"ipc"],o.push("--node-ipc")):s===b.stdio?o.push("--stdio"):s===b.pipe?(l=c.generateRandomPipeName(),o.push(`--pipe=${l}`)):E.isSocket(s)&&o.push(`--socket=${s.port}`),o.push(`--clientProcessId=${process.pid.toString()}`),s===b.ipc||s===b.stdio){let t=r.spawn(i.runtime,o,u);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),s===b.ipc?(t.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),Promise.resolve({reader:new c.IPCMessageReader(t),writer:new c.IPCMessageWriter(t)})):Promise.resolve({reader:new c.StreamMessageReader(t.stdout),writer:new c.StreamMessageWriter(t.stdin)})):Promise.reject(`Launching server using runtime ${i.runtime} failed.`)}if(s===b.pipe)return c.createClientPipeTransport(l).then(t=>{let n=r.spawn(i.runtime,o,u);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${i.runtime} failed.`)});if(E.isSocket(s))return c.createClientSocketTransport(s.port).then(t=>{let n=r.spawn(i.runtime,o,u);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${i.runtime} failed.`)})}}else if(w.is(a)&&a.command){let t=a,i=t.args||[],o=Object.assign({},t.options);o.cwd=o.cwd||n;let s=r.spawn(t.command,i,o);return s&&s.pid?(s.stderr.on("data",t=>this.outputChannel.append(_.string(t)?t:t.toString(e))),this._serverProcess=s,this._isDetached=!!o.detached,Promise.resolve({reader:new c.StreamMessageReader(s.stdout),writer:new c.StreamMessageWriter(s.stdin)})):Promise.reject(`Launching server using command ${t.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(u,null,4)))})}registerProposedFeatures(){this.registerFeatures(D.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new l.ConfigurationFeature(this)),this.registerFeature(new p.TypeDefinitionFeature(this)),this.registerFeature(new d.ImplementationFeature(this)),this.registerFeature(new u.ColorProviderFeature(this)),this.registerFeature(new h.WorkspaceFoldersFeature(this)),this.registerFeature(new f.FoldingRangeFeature(this)),this.registerFeature(new g.DeclarationFeature(this)),this.registerFeature(new m.SelectionRangeFeature(this)),this.registerFeature(new v.ProgressFeature(this))}_mainGetRootPath(){let e=a.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(e=>{i.lstat(t,(n,r)=>{e(!n&&r.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}};t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return a.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new a.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?a.workspace.getConfiguration(t).get(n,!1):a.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}},function(e){e.createAll=function(e){return[new y.CallHierarchyFeature(e),new C.SemanticTokensFeature(e)]}}(D=t.ProposedFeatures||(t.ProposedFeatures={}))},function(e,t){var n;t=e.exports=p,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],s=t.src=[],a=t.tokens={},c=0;function u(e){a[e]=c++}u("NUMERICIDENTIFIER"),s[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",u("NUMERICIDENTIFIERLOOSE"),s[a.NUMERICIDENTIFIERLOOSE]="[0-9]+",u("NONNUMERICIDENTIFIER"),s[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",u("MAINVERSION"),s[a.MAINVERSION]="("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")",u("MAINVERSIONLOOSE"),s[a.MAINVERSIONLOOSE]="("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")",u("PRERELEASEIDENTIFIER"),s[a.PRERELEASEIDENTIFIER]="(?:"+s[a.NUMERICIDENTIFIER]+"|"+s[a.NONNUMERICIDENTIFIER]+")",u("PRERELEASEIDENTIFIERLOOSE"),s[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[a.NUMERICIDENTIFIERLOOSE]+"|"+s[a.NONNUMERICIDENTIFIER]+")",u("PRERELEASE"),s[a.PRERELEASE]="(?:-("+s[a.PRERELEASEIDENTIFIER]+"(?:\\."+s[a.PRERELEASEIDENTIFIER]+")*))",u("PRERELEASELOOSE"),s[a.PRERELEASELOOSE]="(?:-?("+s[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[a.PRERELEASEIDENTIFIERLOOSE]+")*))",u("BUILDIDENTIFIER"),s[a.BUILDIDENTIFIER]="[0-9A-Za-z-]+",u("BUILD"),s[a.BUILD]="(?:\\+("+s[a.BUILDIDENTIFIER]+"(?:\\."+s[a.BUILDIDENTIFIER]+")*))",u("FULL"),u("FULLPLAIN"),s[a.FULLPLAIN]="v?"+s[a.MAINVERSION]+s[a.PRERELEASE]+"?"+s[a.BUILD]+"?",s[a.FULL]="^"+s[a.FULLPLAIN]+"$",u("LOOSEPLAIN"),s[a.LOOSEPLAIN]="[v=\\s]*"+s[a.MAINVERSIONLOOSE]+s[a.PRERELEASELOOSE]+"?"+s[a.BUILD]+"?",u("LOOSE"),s[a.LOOSE]="^"+s[a.LOOSEPLAIN]+"$",u("GTLT"),s[a.GTLT]="((?:<|>)?=?)",u("XRANGEIDENTIFIERLOOSE"),s[a.XRANGEIDENTIFIERLOOSE]=s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",u("XRANGEIDENTIFIER"),s[a.XRANGEIDENTIFIER]=s[a.NUMERICIDENTIFIER]+"|x|X|\\*",u("XRANGEPLAIN"),s[a.XRANGEPLAIN]="[v=\\s]*("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:"+s[a.PRERELEASE]+")?"+s[a.BUILD]+"?)?)?",u("XRANGEPLAINLOOSE"),s[a.XRANGEPLAINLOOSE]="[v=\\s]*("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:"+s[a.PRERELEASELOOSE]+")?"+s[a.BUILD]+"?)?)?",u("XRANGE"),s[a.XRANGE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAIN]+"$",u("XRANGELOOSE"),s[a.XRANGELOOSE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAINLOOSE]+"$",u("COERCE"),s[a.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",u("COERCERTL"),o[a.COERCERTL]=new RegExp(s[a.COERCE],"g"),u("LONETILDE"),s[a.LONETILDE]="(?:~>?)",u("TILDETRIM"),s[a.TILDETRIM]="(\\s*)"+s[a.LONETILDE]+"\\s+",o[a.TILDETRIM]=new RegExp(s[a.TILDETRIM],"g");u("TILDE"),s[a.TILDE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAIN]+"$",u("TILDELOOSE"),s[a.TILDELOOSE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAINLOOSE]+"$",u("LONECARET"),s[a.LONECARET]="(?:\\^)",u("CARETTRIM"),s[a.CARETTRIM]="(\\s*)"+s[a.LONECARET]+"\\s+",o[a.CARETTRIM]=new RegExp(s[a.CARETTRIM],"g");u("CARET"),s[a.CARET]="^"+s[a.LONECARET]+s[a.XRANGEPLAIN]+"$",u("CARETLOOSE"),s[a.CARETLOOSE]="^"+s[a.LONECARET]+s[a.XRANGEPLAINLOOSE]+"$",u("COMPARATORLOOSE"),s[a.COMPARATORLOOSE]="^"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+")$|^$",u("COMPARATOR"),s[a.COMPARATOR]="^"+s[a.GTLT]+"\\s*("+s[a.FULLPLAIN]+")$|^$",u("COMPARATORTRIM"),s[a.COMPARATORTRIM]="(\\s*)"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+"|"+s[a.XRANGEPLAIN]+")",o[a.COMPARATORTRIM]=new RegExp(s[a.COMPARATORTRIM],"g");u("HYPHENRANGE"),s[a.HYPHENRANGE]="^\\s*("+s[a.XRANGEPLAIN]+")\\s+-\\s+("+s[a.XRANGEPLAIN]+")\\s*$",u("HYPHENRANGELOOSE"),s[a.HYPHENRANGELOOSE]="^\\s*("+s[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+s[a.XRANGEPLAINLOOSE]+")\\s*$",u("STAR"),s[a.STAR]="(<|>)?=?\\s*\\*";for(var l=0;l<c;l++)n(l,s[l]),o[l]||(o[l]=new RegExp(s[l]));function d(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[a.LOOSE]:o[a.FULL]).test(e))return null;try{return new p(e,t)}catch(e){return null}}function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof p))return new p(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}t.parse=d,t.valid=function(e,t){var n=d(e,t);return n?n.version:null},t.clean=function(e,t){var n=d(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=p,p.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},p.prototype.toString=function(){return this.version},p.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof p||(e=new p(e,this.options)),this.compareMain(e)||this.comparePre(e)},p.prototype.compareMain=function(e){return e instanceof p||(e=new p(e,this.options)),f(this.major,e.major)||f(this.minor,e.minor)||f(this.patch,e.patch)},p.prototype.comparePre=function(e){if(e instanceof p||(e=new p(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)},p.prototype.compareBuild=function(e){e instanceof p||(e=new p(e,this.options));var t=0;do{var r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)},p.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new p(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(y(e,t))return null;var n=d(e),r=d(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},t.compareIdentifiers=f;var h=/^[0-9]+$/;function f(e,t){var n=h.test(e),r=h.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function g(e,t,n){return new p(e,n).compare(new p(t,n))}function m(e,t,n){return g(e,t,n)>0}function v(e,t,n){return g(e,t,n)<0}function y(e,t,n){return 0===g(e,t,n)}function C(e,t,n){return 0!==g(e,t,n)}function _(e,t,n){return g(e,t,n)>=0}function T(e,t,n){return g(e,t,n)<=0}function R(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return y(e,n,r);case"!=":return C(e,n,r);case">":return m(e,n,r);case">=":return _(e,n,r);case"<":return v(e,n,r);case"<=":return T(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function w(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof w))return new w(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===b?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return f(t,e)},t.major=function(e,t){return new p(e,t).major},t.minor=function(e,t){return new p(e,t).minor},t.patch=function(e,t){return new p(e,t).patch},t.compare=g,t.compareLoose=function(e,t){return g(e,t,!0)},t.compareBuild=function(e,t,n){var r=new p(e,n),i=new p(t,n);return r.compare(i)||r.compareBuild(i)},t.rcompare=function(e,t,n){return g(t,e,n)},t.sort=function(e,n){return e.sort(function(e,r){return t.compareBuild(e,r,n)})},t.rsort=function(e,n){return e.sort(function(e,r){return t.compareBuild(r,e,n)})},t.gt=m,t.lt=v,t.eq=y,t.neq=C,t.gte=_,t.lte=T,t.cmp=R,t.Comparator=w;var b={};function E(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof E)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new E(e.raw,t);if(e instanceof w)return new E(e.value,t);if(!(this instanceof E))return new E(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function S(e,t){for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every(function(e){return i.intersects(e,t)}),i=r.pop();return n}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function P(e,t,n,r,i,o,s,a,c,u,l,d,p){return((t=k(n)?"":k(r)?">="+n+".0.0":k(i)?">="+n+"."+r+".0":">="+t)+" "+(a=k(c)?"":k(u)?"<"+(+c+1)+".0.0":k(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function D(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==b&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function x(e,t,n){try{t=new E(t,n)}catch(e){return!1}return t.test(e)}function I(e,t,n,r){var i,o,s,a,c;switch(e=new p(e,r),t=new E(t,r),n){case">":i=m,o=T,s=v,a=">",c=">=";break;case"<":i=v,o=_,s=m,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(x(e,t,r))return!1;for(var u=0;u<t.set.length;++u){var l=null,d=null;if(t.set[u].forEach(function(e){e.semver===b&&(e=new w(">=0.0.0")),l=l||e,d=d||e,i(e.semver,l.semver,r)?l=e:s(e.semver,d.semver,r)&&(d=e)}),l.operator===a||l.operator===c)return!1;if((!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&s(e,d.semver))return!1}return!0}w.prototype.parse=function(e){var t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new p(n[2],this.options.loose):this.semver=b},w.prototype.toString=function(){return this.value},w.prototype.test=function(e){if(n("Comparator.test",e,this.options.loose),this.semver===b||e===b)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return R(e,this.operator,this.semver,this.options)},w.prototype.intersects=function(e,t){if(!(e instanceof w))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new E(e.value,t),x(this.value,n,t));if(""===e.operator)return""===e.value||(n=new E(this.value,t),x(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=R(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=R(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},t.Range=E,E.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},E.prototype.toString=function(){return this.range},E.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[a.HYPHENRANGELOOSE]:o[a.HYPHENRANGE];e=e.replace(r,P),n("hyphen replace",e),e=e.replace(o[a.COMPARATORTRIM],"$1$2$3"),n("comparator trim",e,o[a.COMPARATORTRIM]),e=(e=(e=e.replace(o[a.TILDETRIM],"$1~")).replace(o[a.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],s=e.split(" ").map(function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[a.CARETLOOSE]:o[a.CARET];return e.replace(r,function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),k(r)?a="":k(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":k(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t.loose?o[a.TILDELOOSE]:o[a.TILDE];return e.replace(r,function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),k(r)?a="":k(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":k(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t.loose?o[a.XRANGELOOSE]:o[a.XRANGE];return e.replace(r,function(r,i,o,s,a,c){n("xRange",e,r,i,o,s,a,c);var u=k(o),l=u||k(s),d=l||k(a),p=d;return"="===i&&p&&(i=""),c=t.includePrerelease?"-0":"",u?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&p?(l&&(s=0),a=0,">"===i?(i=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===i&&(i="<",l?o=+o+1:s=+s+1),r=i+o+"."+s+"."+a+c):l?r=">="+o+".0.0"+c+" <"+(+o+1)+".0.0"+c:d&&(r=">="+o+"."+s+".0"+c+" <"+o+"."+(+s+1)+".0"+c),n("xRange return",r),r})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[a.STAR],"")}(e,t),n("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(e){return!!e.match(i)})),s=s.map(function(e){return new w(e,this.options)},this)},E.prototype.intersects=function(e,t){if(!(e instanceof E))throw new TypeError("a Range is required");return this.set.some(function(n){return S(n,t)&&e.set.some(function(e){return S(e,t)&&n.every(function(n){return e.every(function(e){return n.intersects(e,t)})})})})},t.toComparators=function(e,t){return new E(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},E.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(D(this.set[t],e,this.options))return!0;return!1},t.satisfies=x,t.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new E(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&-1!==i.compare(e)||(i=new p(r=e,n)))}),r},t.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new E(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&1!==i.compare(e)||(i=new p(r=e,n)))}),r},t.minVersion=function(e,t){e=new E(e,t);var n=new p("0.0.0");if(e.test(n))return n;if(n=new p("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){var i=e.set[r];i.forEach(function(e){var t=new p(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!m(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new E(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return I(e,t,"<",n)},t.gtr=function(e,t,n){return I(e,t,">",n)},t.outside=I,t.prerelease=function(e,t){var n=d(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new E(e,n),t=new E(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof p)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=o[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[a.COERCERTL].lastIndex=-1}else n=e.match(o[a.COERCE]);if(null===n)return null;return d(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(12);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.ContentModified=-32801,e.MessageWriteError=1,e.MessageReadError=2}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s;t.RequestType0=class extends s{constructor(e){super(e,0)}};t.RequestType=class extends s{constructor(e){super(e,1)}};t.RequestType1=class extends s{constructor(e){super(e,1)}};t.RequestType2=class extends s{constructor(e){super(e,2)}};t.RequestType3=class extends s{constructor(e){super(e,3)}};t.RequestType4=class extends s{constructor(e){super(e,4)}};t.RequestType5=class extends s{constructor(e){super(e,5)}};t.RequestType6=class extends s{constructor(e){super(e,6)}};t.RequestType7=class extends s{constructor(e){super(e,7)}};t.RequestType8=class extends s{constructor(e){super(e,8)}};t.RequestType9=class extends s{constructor(e){super(e,9)}};t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}};t.NotificationType0=class extends s{constructor(e){super(e,0)}};t.NotificationType1=class extends s{constructor(e){super(e,1)}};t.NotificationType2=class extends s{constructor(e){super(e,2)}};t.NotificationType3=class extends s{constructor(e){super(e,3)}};t.NotificationType4=class extends s{constructor(e){super(e,4)}};t.NotificationType5=class extends s{constructor(e){super(e,5)}};t.NotificationType6=class extends s{constructor(e){super(e,6)}};t.NotificationType7=class extends s{constructor(e){super(e,7)}};t.NotificationType8=class extends s{constructor(e){super(e,8)}};t.NotificationType9=class extends s{constructor(e){super(e,9)}},t.isRequestMessage=function(e){let t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(17),i=n(12);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});class a{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof a&&this._token.dispose():this._token=o.None}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(r=t.Touch||(t.Touch={}));t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5),i=n(13),o=n(27),s=n(28),a=n(20),c=n(21);t.generateRandomPipeName=function(){const e=o.randomBytes(21).toString("hex");return"win32"===process.platform?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:r.join(i.tmpdir(),`vscode-${e}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,r=new Promise((e,t)=>{n=e});return new Promise((i,o)=>{let u=s.createServer(e=>{u.close(),n([new a.SocketMessageReader(e,t),new c.SocketMessageWriter(e,t)])});u.on("error",o),u.listen(e,()=>{u.removeListener("error",o),i({onConnected:()=>r})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=s.createConnection(e);return[new a.SocketMessageReader(n,t),new c.SocketMessageWriter(n,t)]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(28),i=n(20),o=n(21);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise((e,t)=>{n=e});return new Promise((a,c)=>{let u=r.createServer(e=>{u.close(),n([new i.SocketMessageReader(e,t),new o.SocketMessageWriter(e,t)])});u.on("error",c),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",c),a({onConnected:()=>s})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=r.createConnection(e,"127.0.0.1");return[new i.SocketMessageReader(n,t),new o.SocketMessageWriter(n,t)]}},function(e,t,n){"use strict";var r,i,o,s,a,c,u,l,d,p,h,f,g,m,v,y,C,_,T,R;n.r(t),n.d(t,"Position",function(){return r}),n.d(t,"Range",function(){return i}),n.d(t,"Location",function(){return o}),n.d(t,"LocationLink",function(){return s}),n.d(t,"Color",function(){return a}),n.d(t,"ColorInformation",function(){return c}),n.d(t,"ColorPresentation",function(){return u}),n.d(t,"FoldingRangeKind",function(){return l}),n.d(t,"FoldingRange",function(){return d}),n.d(t,"DiagnosticRelatedInformation",function(){return p}),n.d(t,"DiagnosticSeverity",function(){return h}),n.d(t,"DiagnosticTag",function(){return f}),n.d(t,"Diagnostic",function(){return g}),n.d(t,"Command",function(){return m}),n.d(t,"TextEdit",function(){return v}),n.d(t,"TextDocumentEdit",function(){return y}),n.d(t,"CreateFile",function(){return C}),n.d(t,"RenameFile",function(){return _}),n.d(t,"DeleteFile",function(){return T}),n.d(t,"WorkspaceEdit",function(){return R}),n.d(t,"WorkspaceChange",function(){return J}),n.d(t,"TextDocumentIdentifier",function(){return w}),n.d(t,"VersionedTextDocumentIdentifier",function(){return b}),n.d(t,"TextDocumentItem",function(){return E}),n.d(t,"MarkupKind",function(){return S}),n.d(t,"MarkupContent",function(){return k}),n.d(t,"CompletionItemKind",function(){return P}),n.d(t,"InsertTextFormat",function(){return D}),n.d(t,"CompletionItemTag",function(){return x}),n.d(t,"CompletionItem",function(){return I}),n.d(t,"CompletionList",function(){return O}),n.d(t,"MarkedString",function(){return N}),n.d(t,"Hover",function(){return q}),n.d(t,"ParameterInformation",function(){return A}),n.d(t,"SignatureInformation",function(){return L}),n.d(t,"DocumentHighlightKind",function(){return M}),n.d(t,"DocumentHighlight",function(){return F}),n.d(t,"SymbolKind",function(){return j}),n.d(t,"SymbolTag",function(){return H}),n.d(t,"SymbolInformation",function(){return z}),n.d(t,"DocumentSymbol",function(){return K}),n.d(t,"CodeActionKind",function(){return U}),n.d(t,"CodeActionContext",function(){return W}),n.d(t,"CodeAction",function(){return $}),n.d(t,"CodeLens",function(){return V}),n.d(t,"FormattingOptions",function(){return G}),n.d(t,"DocumentLink",function(){return B}),n.d(t,"SelectionRange",function(){return Z}),n.d(t,"EOL",function(){return Q}),n.d(t,"TextDocument",function(){return Y}),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return ee.objectLiteral(t)&&ee.number(t.line)&&ee.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(ee.number(e)&&ee.number(t)&&ee.number(n)&&ee.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return ee.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ee.defined(t)&&i.is(t.range)&&(ee.string(t.uri)||ee.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return ee.defined(t)&&i.is(t.targetRange)&&ee.string(t.targetUri)&&(i.is(t.targetSelectionRange)||ee.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||ee.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return ee.number(t.red)&&ee.number(t.green)&&ee.number(t.blue)&&ee.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&a.is(t.color)}}(c||(c={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return ee.string(t.label)&&(ee.undefined(t.textEdit)||v.is(t))&&(ee.undefined(t.additionalTextEdits)||ee.typedArray(t.additionalTextEdits,v.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return ee.defined(n)&&(o.startCharacter=n),ee.defined(r)&&(o.endCharacter=r),ee.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return ee.number(t.startLine)&&ee.number(t.startLine)&&(ee.undefined(t.startCharacter)||ee.number(t.startCharacter))&&(ee.undefined(t.endCharacter)||ee.number(t.endCharacter))&&(ee.undefined(t.kind)||ee.string(t.kind))}}(d||(d={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ee.defined(t)&&o.is(t.location)&&ee.string(t.message)}}(p||(p={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(h||(h={})),function(e){e.Unnecessary=1,e.Deprecated=2}(f||(f={})),function(e){e.create=function(e,t,n,r,i,o){var s={range:e,message:t};return ee.defined(n)&&(s.severity=n),ee.defined(r)&&(s.code=r),ee.defined(i)&&(s.source=i),ee.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t=e;return ee.defined(t)&&i.is(t.range)&&ee.string(t.message)&&(ee.number(t.severity)||ee.undefined(t.severity))&&(ee.number(t.code)||ee.string(t.code)||ee.undefined(t.code))&&(ee.string(t.source)||ee.undefined(t.source))&&(ee.undefined(t.relatedInformation)||ee.typedArray(t.relatedInformation,p.is))}}(g||(g={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return ee.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.title)&&ee.string(t.command)}}(m||(m={})),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:""}},e.is=function(e){var t=e;return ee.objectLiteral(t)&&ee.string(t.newText)&&i.is(t.range)}}(v||(v={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ee.defined(t)&&b.is(t.textDocument)&&Array.isArray(t.edits)}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ee.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ee.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ee.boolean(t.options.ignoreIfExists)))}}(C||(C={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ee.string(t.oldUri)&&ee.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ee.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ee.boolean(t.options.ignoreIfExists)))}}(_||(_={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ee.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ee.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ee.boolean(t.options.ignoreIfNotExists)))}}(T||(T={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(function(e){return ee.string(e.kind)?C.is(e)||_.is(e)||T.is(e):y.is(e)}))}}(R||(R={}));var w,b,E,S,k,P,D,x,I,O,N,q,A,L,M,F,j,H,z,K,U,W,$,V,G,B,Z,X=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(v.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(v.replace(e,t))},e.prototype.delete=function(e){this.edits.push(v.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}(),J=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach(function(e){if(y.is(e)){var n=new X(e.edits);t._textEditChanges[e.textDocument.uri]=n}}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new X(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(b.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new X(i),this._textEditChanges[t.uri]=r}return r}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 r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new X(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(C.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(_.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(T.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.uri)}}(w||(w={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.uri)&&(null===t.version||ee.number(t.version))}}(b||(b={})),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 ee.defined(t)&&ee.string(t.uri)&&ee.string(t.languageId)&&ee.number(t.version)&&ee.string(t.text)}}(E||(E={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(S||(S={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(S||(S={})),function(e){e.is=function(e){var t=e;return ee.objectLiteral(e)&&S.is(t.kind)&&ee.string(t.value)}}(k||(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}(P||(P={})),function(e){e.PlainText=1,e.Snippet=2}(D||(D={})),function(e){e.Deprecated=1}(x||(x={})),function(e){e.create=function(e){return{label:e}}}(I||(I={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(O||(O={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ee.string(t)||ee.objectLiteral(t)&&ee.string(t.language)&&ee.string(t.value)}}(N||(N={})),function(e){e.is=function(e){var t=e;return!!t&&ee.objectLiteral(t)&&(k.is(t.contents)||N.is(t.contents)||ee.typedArray(t.contents,N.is))&&(void 0===e.range||i.is(e.range))}}(q||(q={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(A||(A={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return ee.defined(t)&&(i.documentation=t),ee.defined(n)?i.parameters=n:i.parameters=[],i}}(L||(L={})),function(e){e.Text=1,e.Read=2,e.Write=3}(M||(M={})),function(e){e.create=function(e,t){var n={range:e};return ee.number(t)&&(n.kind=t),n}}(F||(F={})),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}(j||(j={})),function(e){e.Deprecated=1}(H||(H={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(z||(z={})),function(e){e.create=function(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&ee.string(t.name)&&ee.number(t.kind)&&i.is(t.range)&&i.is(t.selectionRange)&&(void 0===t.detail||ee.string(t.detail))&&(void 0===t.deprecated||ee.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))}}(K||(K={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(U||(U={})),function(e){e.create=function(e,t){var n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),n},e.is=function(e){var t=e;return ee.defined(t)&&ee.typedArray(t.diagnostics,g.is)&&(void 0===t.only||ee.typedArray(t.only,ee.string))}}(W||(W={})),function(e){e.create=function(e,t,n){var r={title:e};return m.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&ee.string(t.title)&&(void 0===t.diagnostics||ee.typedArray(t.diagnostics,g.is))&&(void 0===t.kind||ee.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||m.is(t.command))&&(void 0===t.isPreferred||ee.boolean(t.isPreferred))&&(void 0===t.edit||R.is(t.edit))}}($||($={})),function(e){e.create=function(e,t){var n={range:e};return ee.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return ee.defined(t)&&i.is(t.range)&&(ee.undefined(t.command)||m.is(t.command))}}(V||(V={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return ee.defined(t)&&ee.number(t.tabSize)&&ee.boolean(t.insertSpaces)}}(G||(G={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return ee.defined(t)&&i.is(t.range)&&(ee.undefined(t.target)||ee.string(t.target))}}(B||(B={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&i.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Z||(Z={}));var Y,Q=["\n","\r\n","\r"];!function(e){e.create=function(e,t,n,r){return new te(e,t,n,r)},e.is=function(e){var t=e;return!!(ee.defined(t)&&ee.string(t.uri)&&(ee.undefined(t.languageId)||ee.string(t.languageId))&&ee.number(t.lineCount)&&ee.func(t.getText)&&ee.func(t.positionAt)&&ee.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,i=t.slice(0,r),o=t.slice(r);e(i,n),e(o,n);for(var s=0,a=0,c=0;s<i.length&&a<o.length;){var u=n(i[s],o[a]);t[c++]=u<=0?i[s++]:o[a++]}for(;s<i.length;)t[c++]=i[s++];for(;a<o.length;)t[c++]=o[a++];return t}(t,function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=n.length,o=r.length-1;o>=0;o--){var s=r[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(Y||(Y={}));var ee,te=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;n<i;){var o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}var s=n-1;return r.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},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.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(ee||(ee={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(55),i=n(7),o=n(3),s=n(56);t.ImplementationRequest=s.ImplementationRequest;const a=n(57);t.TypeDefinitionRequest=a.TypeDefinitionRequest;const c=n(58);t.WorkspaceFoldersRequest=c.WorkspaceFoldersRequest,t.DidChangeWorkspaceFoldersNotification=c.DidChangeWorkspaceFoldersNotification;const u=n(59);t.ConfigurationRequest=u.ConfigurationRequest;const l=n(60);t.DocumentColorRequest=l.DocumentColorRequest,t.ColorPresentationRequest=l.ColorPresentationRequest;const d=n(61);t.FoldingRangeRequest=d.FoldingRangeRequest;const p=n(62);t.DeclarationRequest=p.DeclarationRequest;const h=n(63);t.SelectionRangeRequest=h.SelectionRangeRequest;const f=n(64);var g,m;t.WorkDoneProgress=f.WorkDoneProgress,t.WorkDoneProgressCreateRequest=f.WorkDoneProgressCreateRequest,t.WorkDoneProgressCancelNotification=f.WorkDoneProgressCancelNotification,function(e){e.is=function(e){const t=e;return r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}}(g=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!g.is(t))return!1;return!0}}(m=t.DocumentSelector||(t.DocumentSelector={})),function(e){e.type=new o.ProtocolRequestType("client/registerCapability")}(t.RegistrationRequest||(t.RegistrationRequest={})),function(e){e.type=new o.ProtocolRequestType("client/unregisterCapability")}(t.UnregistrationRequest||(t.UnregistrationRequest={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(t.ResourceOperationKind||(t.ResourceOperationKind={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(t.FailureHandlingKind||(t.FailureHandlingKind={})),function(e){e.hasId=function(e){const t=e;return t&&r.string(t.id)&&t.id.length>0}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||m.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new o.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new o.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new o.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new o.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new o.ProtocolNotificationType("workspace/didChangeConfiguration")}(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4}(t.MessageType||(t.MessageType={})),function(e){e.type=new o.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new o.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new o.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new o.ProtocolNotificationType("telemetry/event")}(t.TelemetryEventNotification||(t.TelemetryEventNotification={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})),function(e){e.method="textDocument/didOpen",e.type=new o.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.method="textDocument/didChange",e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new o.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new o.ProtocolNotificationType(e.method)}(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})),function(e){e.method="textDocument/willSave",e.type=new o.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new o.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new o.ProtocolNotificationType("workspace/didChangeWatchedFiles")}(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(t.FileChangeType||(t.FileChangeType={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(t.WatchKind||(t.WatchKind={})),function(e){e.type=new o.ProtocolNotificationType("textDocument/publishDiagnostics")}(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e.method="textDocument/completion",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new o.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new o.ProtocolRequestType(e.method)}(t.HoverRequest||(t.HoverRequest={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e.method="textDocument/signatureHelp",e.type=new o.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="workspace/symbol",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.type=new o.ProtocolRequestType("textDocument/codeLens"),e.resultType=new i.ProgressType}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.type=new o.ProtocolRequestType("codeLens/resolve")}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="textDocument/documentLink",e.type=new o.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.type=new o.ProtocolRequestType("documentLink/resolve")}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.method="textDocument/rename",e.type=new o.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new o.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new o.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new o.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.method="textDocument/implementation",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.method="textDocument/typeDefinition",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3);!function(e){e.type=new r.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3);!function(e){e.type=new r.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.method="textDocument/documentColor",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new i.ProtocolRequestType("textDocument/colorPresentation")}(t.ColorPresentationRequest||(t.ColorPresentationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.method="textDocument/declaration",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.method="textDocument/selectionRange",e.type=new i.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(3);!function(e){e.type=new r.ProgressType}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new i.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3);!function(e){e.comment="comment",e.keyword="keyword",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.namespace="namespace",e.type="type",e.struct="struct",e.class="class",e.interface="interface",e.enum="enum",e.typeParameter="typeParameter",e.function="function",e.member="member",e.property="property",e.macro="macro",e.variable="variable",e.parameter="parameter",e.label="label"}(t.SemanticTokenTypes||(t.SemanticTokenTypes={})),function(e){e.documentation="documentation",e.declaration="declaration",e.definition="definition",e.reference="reference",e.static="static",e.abstract="abstract",e.deprecated="deprecated",e.async="async",e.volatile="volatile",e.readonly="readonly"}(t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})),function(e){e.is=function(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(t.SemanticTokens||(t.SemanticTokens={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/edits",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensEditsRequest||(t.SemanticTokensEditsRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(14),s=n(29),a=n(30),c=n(31);t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function u(e){return{uri:t(e.uri)}}function l(e){return{uri:t(e.uri),version:e.version}}function d(e){return{label:e.label}}function p(e){return{label:e.label,parameters:function(e){return e.map(d)}(e.parameters)}}function h(e){return void 0===e?e:{signatures:function(e){return e.map(p)}(e.signatures),activeSignature:e.activeSignature,activeParameter:e.activeParameter}}function f(e){return{line:e.line,character:e.character}}function g(e){return void 0===e||null===e?e:{line:e.line,character:e.character}}function m(e){if(void 0===e||null===e)return e;if(function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}(e))throw new Error("Receving unknown insert replace range.");return{start:g(e.start),end:g(e.end)}}function v(e){return void 0===e||null===e?e:i.Location.create(n(e.uri),m(e.range))}function y(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function C(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function _(e){return{message:e.message,location:v(e.location)}}function T(e){let t=i.Diagnostic.create(m(e.range),e.message);return o.number(e.severity)&&(t.severity=y(e.severity)),(o.number(e.code)||o.string(e.code))&&(t.code=e.code),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=C(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=function(e){return e.map(_)}(e.relatedInformation)),e.source&&(t.source=e.source),t}function R(e){return void 0===e||null===e?e:e.map(T)}function w(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function b(e){return{range:m(e.range),newText:e.newText}}function E(e){return e}function S(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:u,asVersionedTextDocumentIdentifier:l,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map(e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}})}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:u(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:l(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:u(e.document),reason:function(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:u(e),position:f(t)}},asCompletionParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{triggerKind:function(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:function(e){switch(e){case r.SignatureHelpTriggerKind.Invoke:return i.SignatureHelpTriggerKind.Invoked;case r.SignatureHelpTriggerKind.TriggerCharacter:return i.SignatureHelpTriggerKind.TriggerCharacter;case r.SignatureHelpTriggerKind.ContentChange:return i.SignatureHelpTriggerKind.ContentChange}}(n.triggerKind),activeSignatureHelp:h(n.activeSignatureHelp)}}},asWorkerPosition:f,asRange:m,asPosition:g,asPositions:function(e){let t=[];for(let n of e)t.push(g(n));return t},asLocation:v,asDiagnosticSeverity:y,asDiagnosticTag:C,asDiagnostic:T,asDiagnostics:R,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n=i.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=m(t.textEdit.range)):t.insertText instanceof r.SnippetString?(n=i.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText,t.range&&(s=m(t.range)),e.insertTextFormat=n,t.fromEdit&&void 0!==o&&void 0!==s?e.textEdit={newText:o,range:s}:e.insertText=o}(t,e),o.number(e.kind)&&(t.kind=function(e,t){return void 0!==t?t:e+1}(e.kind,n&&n.originalItemKind)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=function(e){return void 0===e||null===e?e:e.map(b)}(e.additionalTextEdits)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=S(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect);const a=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=w(n);void 0!==e&&t.push(e)}return t}(e.tags);if(n&&(void 0!==n.data&&(t.data=n.data),!0===n.deprecated||!1===n.deprecated)){if(!0===n.deprecated&&void 0!==a&&a.length>0){const e=a.indexOf(r.CompletionItemTag.Deprecated);-1!==e&&a.splice(e,1)}t.deprecated=n.deprecated}return void 0!==a&&a.length>0&&(t.tags=a),t},asTextEdit:b,asSymbolKind:function(e){return e<=r.SymbolKind.TypeParameter?e+1:i.SymbolKind.Property},asSymbolTag:E,asSymbolTags:function(e){return e.map(E)},asReferenceParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){if(void 0===e||null===e)return e;let t;return e.only&&o.string(e.only.value)&&(t=[e.only.value]),i.CodeActionContext.create(R(e.diagnostics),t)},asCommand:S,asCodeLens:function(e){let t=i.CodeLens.create(m(e.range));return e.command&&(t.command=S(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:u(e)}},asCodeLensParams:function(e){return{textDocument:u(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(m(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:u(e)}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(14),s=n(29),a=n(30),c=n(31);var u;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(u||(u={})),t.createConverter=function(e){const t=e||(e=>r.Uri.parse(e));function n(e){return t(e)}function l(e){return e.map(d)}function d(e){let t=new r.Diagnostic(g(e.range),e.message,m(e.severity));return(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){return e.map(p)}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=h(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function p(e){return new r.DiagnosticRelatedInformation(S(e.location),e.message)}function h(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function f(e){if(e)return new r.Position(e.line,e.character)}function g(e){if(e)return new r.Range(f(e.start),f(e.end))}function m(e){if(void 0===e||null===e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function v(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function y(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function C(e){let t=function(e){if(void 0===e||null===e)return[];const t=[];for(let n of e){const e=y(n);void 0!==e&&t.push(e)}return t}(e.tags),n=new s.default(e.label);e.detail&&(n.detail=e.detail),e.documentation&&(n.documentation=v(e.documentation),n.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(n.filterText=e.filterText);let a=function(e){return e.textEdit?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.textEdit.newText),range:g(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:g(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(a&&(n.insertText=a.text,n.range=a.range,n.fromEdit=a.fromEdit),o.number(e.kind)){let[t,o]=function(e){return i.CompletionItemKind.Text<=e&&e<=i.CompletionItemKind.TypeParameter?[e-1,void 0]:[r.CompletionItemKind.Text,e]}(e.kind);n.kind=t,o&&(n.originalItemKind=o)}return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=T(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=A(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(r.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),t.length>0&&(n.tags=t),n}function _(e){if(e)return new r.TextEdit(g(e.range),e.newText)}function T(e){if(e)return e.map(_)}function R(e){return e.map(w)}function w(e){let t=new r.SignatureInformation(e.label);return e.documentation&&(t.documentation=v(e.documentation)),e.parameters&&(t.parameters=b(e.parameters)),t}function b(e){return e.map(E)}function E(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=v(e.documentation)),t}function S(e){if(e)return new r.Location(t(e.uri),g(e.range))}function k(e){if(!e)return;let n={targetUri:t(e.targetUri),targetRange:g(e.targetSelectionRange),originSelectionRange:g(e.originSelectionRange),targetSelectionRange:g(e.targetSelectionRange)};if(!n.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return n}function P(e){if(e)return o.array(e)?0===e.length?[]:i.LocationLink.is(e[0])?e.map(e=>k(e)):e.map(e=>S(e)):i.LocationLink.is(e)?[k(e)]:S(e)}function D(e){let t=new r.DocumentHighlight(g(e.range));return o.number(e.kind)&&(t.kind=x(e.kind)),t}function x(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function I(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function O(e){return e}function N(e,n){let i=new r.SymbolInformation(e.name,I(e.kind),g(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(i.containerName=e.containerName),i}function q(e){let t=new r.DocumentSymbol(e.name,e.detail||"",I(e.kind),g(e.range),g(e.selectionRange));if(void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(q(t));t.children=n}return t}function A(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const L=new Map;function M(e){if(void 0===e||null===e)return;let t=L.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function F(e){if(!e)return;let t=new a.default(g(e.range));return e.command&&(t.command=A(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function j(e){if(!e)return;let n=new r.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach(e=>{i.CreateFile.is(e)?n.createFile(t(e.uri),e.options):i.RenameFile.is(e)?n.renameFile(t(e.oldUri),t(e.newUri),e.options):i.DeleteFile.is(e)?n.deleteFile(t(e.uri),e.options):i.TextDocumentEdit.is(e)?n.set(t(e.textDocument.uri),T(e.edits)):console.error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`)}):e.changes&&Object.keys(e.changes).forEach(r=>{n.set(t(r),T(e.changes[r]))}),n}function H(e){let t=g(e.range),r=e.target?n(e.target):void 0,i=new c.default(t,r);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function z(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function K(e){return new r.ColorInformation(g(e.range),z(e.color))}function U(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=T(e.additionalTextEdits),e.textEdit&&(t.textEdit=_(e.textEdit)),t}function W(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function $(e){return new r.FoldingRange(e.startLine,e.endLine,W(e.kind))}function V(e){return new r.SelectionRange(g(e.range),e.parent?V(e.parent):void 0)}return L.set(i.CodeActionKind.Empty,r.CodeActionKind.Empty),L.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),L.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),L.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),L.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),L.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),L.set(i.CodeActionKind.Source,r.CodeActionKind.Source),L.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:l,asDiagnostic:d,asRange:g,asRanges:function(e){return e.map(e=>g(e))},asPosition:f,asDiagnosticSeverity:m,asDiagnosticTag:h,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return new r.MarkdownString(e);if(u.is(e))return(new r.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=new r.MarkdownString;u.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return(t=new r.MarkdownString).appendText(e.value),t;default:return(t=new r.MarkdownString).appendText(`Unsupported Markup content received. Kind is: ${e.kind}`),t}}}(e.contents),g(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e))return e.map(C);let t=e;return new r.CompletionList(t.items.map(C),t.isIncomplete)},asCompletionItem:C,asTextEdit:_,asTextEdits:T,asSignatureHelp:function(e){if(!e)return;let t=new r.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=R(e.signatures)),t},asSignatureInformations:R,asSignatureInformation:w,asParameterInformations:b,asParameterInformation:E,asDeclarationResult:function(e){if(e)return P(e)},asDefinitionResult:function(e){if(e)return P(e)},asLocation:S,asReferences:function(e){if(e)return e.map(e=>S(e))},asDocumentHighlights:function(e){if(e)return e.map(D)},asDocumentHighlight:D,asDocumentHighlightKind:x,asSymbolKind:I,asSymbolTag:O,asSymbolTags:function(e){if(void 0!==e&&null!==e)return e.map(O)},asSymbolInformations:function(e,t){if(e)return e.map(e=>N(e,t))},asSymbolInformation:N,asDocumentSymbols:function(e){if(void 0!==e&&null!==e)return e.map(q)},asDocumentSymbol:q,asCommand:A,asCommands:function(e){if(e)return e.map(A)},asCodeAction:function(e){if(void 0===e||null===e)return;let t=new r.CodeAction(e.title);return void 0!==e.kind&&(t.kind=M(e.kind)),e.diagnostics&&(t.diagnostics=l(e.diagnostics)),e.edit&&(t.edit=j(e.edit)),e.command&&(t.command=A(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),t},asCodeActionKind:M,asCodeActionKinds:function(e){if(void 0!==e&&null!==e)return e.map(e=>M(e))},asCodeLens:F,asCodeLenses:function(e){if(e)return e.map(e=>F(e))},asWorkspaceEdit:j,asDocumentLink:H,asDocumentLinks:function(e){if(e)return e.map(H)},asFoldingRangeKind:W,asFoldingRange:$,asFoldingRanges:function(e){if(Array.isArray(e))return e.map($)},asColor:z,asColorInformation:K,asColorInformations:function(e){if(Array.isArray(e))return e.map(K)},asColorPresentation:U,asColorPresentations:function(e){if(Array.isArray(e))return e.map(U)},asSelectionRange:V,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push(V(n));return t}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(e=>{this.onSuccess=e}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e})),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}t.ColorProviderFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.colorProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={color:e,textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:r.code2ProtocolConverter.asRange(t.range)};return r.sendRequest(i.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>(r.logFailedRequest(i.ColorPresentationRequest.type,e),Promise.resolve(null)))},s=r.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,r=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.DocumentColorRequest.type,r,t).then(this.asColorInformations.bind(this),e=>(n.logFailedRequest(i.ColorPresentationRequest.type,e),Promise.resolve(null)))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,r):r(e,t)}};return[r.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new r.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1);t.ConfigurationFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(i.ConfigurationRequest.type,(t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.clientOptions.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)})}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=r.workspace.getConfiguration(void 0,e).get(t);else{let o=r.workspace.getConfiguration(t.substr(0,i),e);o&&(n=o.get(t.substr(i+1)))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=t.get(e))}return n||null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}t.ImplementationFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.implementationProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.ImplementationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>(r.logFailedRequest(i.ImplementationRequest.type,e),Promise.resolve(null))),s=r.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[r.languages.registerImplementationProvider(e.documentSelector,t),t]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}t.TypeDefinitionFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.TypeDefinitionRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=s(s(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.typeDefinitionProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.TypeDefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>(r.logFailedRequest(i.TypeDefinitionRequest.type,e),Promise.resolve(null))),s=r.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(32),i=n(0),o=n(1);function s(e,t){if(void 0!==e)return e[t]}function a(e,t){return e.filter(e=>t.indexOf(e)<0)}t.arrayDiff=a;t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}get messages(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=i.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map(e=>this.asProtocol(e))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{let n=()=>{let e=i.workspace.workspaceFolders;return void 0===e?null:e.map(e=>this.asProtocol(e))},r=t.clientOptions.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()});let n,a=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof a?n=a:!0===a&&(n=r.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})}sendInitialEvent(e){if(this._initialFolders&&e){const t=a(this._initialFolders,e),n=a(e,this._initialFolders);(n.length>0||t.length>0)&&this.doSendEvent(n,t)}else this._initialFolders?this.doSendEvent([],this._initialFolders):e&&this.doSendEvent(e,[])}doSendEvent(e,t){let n={event:{added:e.map(e=>this.asProtocol(e)),removed:t.map(e=>this.asProtocol(e))}};this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,n)}register(e,t){let n=t.id,r=this._client,o=i.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},n=r.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(n,o),this.sendInitialEvent(i.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}t.FoldingRangeFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.foldingRangeProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e)};return r.sendRequest(i.FoldingRangeRequest.type,o,n).then(this.asFoldingRanges.bind(this),e=>(r.logFailedRequest(i.FoldingRangeRequest.type,e),Promise.resolve(null)))},s=r.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[r.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}asFoldingRangeKind(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new r.FoldingRange(e.startLine,e.endLine,this.asFoldingRangeKind(e.kind))):[]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}t.DeclarationFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.declarationProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DeclarationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDeclarationResult,e=>(r.logFailedRequest(i.DeclarationRequest.type,e),Promise.resolve(null))),s=r.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[r.languages.registerDeclarationProvider(e.documentSelector,t),t]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]=Object.create(null)),e[t]}t.SelectionRangeFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.SelectionRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.selectionRangeProvider);n&&r&&this.register(this.messages,{id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideSelectionRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:r.code2ProtocolConverter.asPositions(t)};return r.sendRequest(i.SelectionRangeRequest.type,o,n).then(e=>r.protocol2CodeConverter.asSelectionRanges(e),e=>(r.logFailedRequest(i.SelectionRangeRequest.type,e),Promise.resolve(null)))},s=r.clientOptions.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[r.languages.registerSelectionRangeProvider(e.documentSelector,t),t]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),i=n(33);t.ProgressFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){((function(e,t){return void 0===e[t]&&(e[t]=Object.create(null)),e[t]})(e,"window")).workDoneProgress=!0}initialize(){this._client.onRequest(r.WorkDoneProgressCreateRequest.type,e=>{new i.ProgressPart(this._client,e.token)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(1),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var a,c;!function(e){function t(e,t){if(null===t)return;let n=new r.CallHierarchyItem(e.asSymbolKind(t.kind),t.name,t.detail||"",e.asUri(t.uri),e.asRange(t.range),e.asRange(t.selectionRange));return void 0!==t.tags&&(n.tags=e.asSymbolTags(t.tags)),n}function n(e,n){return new r.CallHierarchyIncomingCall(t(e,n.from),e.asRanges(n.fromRanges))}function i(e,n){return new r.CallHierarchyOutgoingCall(t(e,n.to),e.asRanges(n.fromRanges))}e.asCallHierarchyItem=t,e.asCallHierarchyItems=function(e,n){if(null===n)return;return n.map(n=>t(e,n))[0]},e.asCallHierarchyIncomingCall=n,e.asCallHierarchyIncomingCalls=function(e,t){if(null!==t)return t.map(t=>n(e,t))},e.asCallHierarchyOutgoingCall=i,e.asCallHierarchyOutgoingCalls=function(e,t){if(null!==t)return t.map(t=>i(e,t))}}(a||(a={})),function(e){e.asCallHierarchyItem=function(e,t){const n={name:t.name,kind:e.asSymbolKind(t.kind),uri:e.asUri(t.uri),range:e.asRange(t.range),selectionRange:e.asRange(t.selectionRange)};return void 0!==t.detail&&t.detail.length>0&&(n.detail=t.detail),void 0!==t.tags&&(n.tags=e.asSymbolTags(t.tags)),n}}(c||(c={}));class u{constructor(e){this.client=e,this.middleware=e.clientOptions.middleware}prepareCallHierarchy(e,t,n){const r=this.client,o=this.middleware,s=(e,t,n)=>{const o=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.Proposed.CallHierarchyPrepareRequest.type,o,n).then(e=>a.asCallHierarchyItems(this.client.protocol2CodeConverter,e),e=>(r.logFailedRequest(i.Proposed.CallHierarchyPrepareRequest.type,e),Promise.resolve(null)))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:c.asCallHierarchyItem(n.code2ProtocolConverter,e)};return n.sendRequest(i.Proposed.CallHierarchyIncomingCallsRequest.type,r,t).then(e=>a.asCallHierarchyIncomingCalls(n.protocol2CodeConverter,e),e=>(n.logFailedRequest(i.Proposed.CallHierarchyIncomingCallsRequest.type,e),Promise.resolve(null)))};return r.provideCallHierarchyIncomingCalls?r.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:c.asCallHierarchyItem(n.code2ProtocolConverter,e)};return n.sendRequest(i.Proposed.CallHierarchyOutgoingCallsRequest.type,r,t).then(e=>a.asCallHierarchyOutgoingCalls(n.protocol2CodeConverter,e),e=>(n.logFailedRequest(i.Proposed.CallHierarchyOutgoingCallsRequest.type,e),Promise.resolve(null)))};return r.provideCallHierarchyOutgingCalls?r.provideCallHierarchyOutgingCalls(e,t,o):o(e,t)}}t.CallHierarchyFeature=class extends o.TextDocumentFeature{constructor(e){super(e,i.Proposed.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const n=e,[r,i]=this.getRegistration(t,n.callHierarchyProvider);r&&i&&this.register(this.messages,{id:r,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new u(t);return[r.languages.registerCallHierarchyProvider(e.documentSelector,n),n]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),i=n(6),o=n(1);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var a;!function(e){function t(e){return new r.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}e.asSemanticTokens=function(e){if(void 0!==e&&null!==e)return new r.SemanticTokens(new Uint32Array(e.data),e.resultId)},e.asSemanticTokensEdit=t,e.asSemanticTokensEdits=function(e){if(void 0!==e&&null!==e)return new r.SemanticTokensEdits(e.edits.map(t),e.resultId)},e.asLegend=function(e){return e}}(a||(a={}));t.SemanticTokensFeature=class extends i.TextDocumentFeature{constructor(e){super(e,o.Proposed.SemanticTokensRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.Proposed.SemanticTokenTypes.comment,o.Proposed.SemanticTokenTypes.keyword,o.Proposed.SemanticTokenTypes.number,o.Proposed.SemanticTokenTypes.regexp,o.Proposed.SemanticTokenTypes.operator,o.Proposed.SemanticTokenTypes.namespace,o.Proposed.SemanticTokenTypes.type,o.Proposed.SemanticTokenTypes.struct,o.Proposed.SemanticTokenTypes.class,o.Proposed.SemanticTokenTypes.interface,o.Proposed.SemanticTokenTypes.enum,o.Proposed.SemanticTokenTypes.typeParameter,o.Proposed.SemanticTokenTypes.function,o.Proposed.SemanticTokenTypes.member,o.Proposed.SemanticTokenTypes.macro,o.Proposed.SemanticTokenTypes.variable,o.Proposed.SemanticTokenTypes.parameter,o.Proposed.SemanticTokenTypes.property,o.Proposed.SemanticTokenTypes.label],t.tokenModifiers=[o.Proposed.SemanticTokenModifiers.declaration,o.Proposed.SemanticTokenModifiers.documentation,o.Proposed.SemanticTokenModifiers.static,o.Proposed.SemanticTokenModifiers.abstract,o.Proposed.SemanticTokenModifiers.deprecated,o.Proposed.SemanticTokenModifiers.async,o.Proposed.SemanticTokenModifiers.readonly]}initialize(e,t){const n=e;let[r,i]=this.getRegistration(t,n.semanticTokensProvider);r&&i&&this.register(this.messages,{id:r,registerOptions:i})}registerLanguageProvider(e){const t={provideDocumentSemanticTokens:(e,t)=>{const n=this._client,r=n.clientOptions.middleware,i=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.Proposed.SemanticTokensRequest.type,r,t).then(e=>a.asSemanticTokens(e),e=>{n.logFailedRequest(o.Proposed.SemanticTokensRequest.type,e)})};return r.provideDocumentSemanticTokens?r.provideDocumentSemanticTokens(e,t,i):i(e,t)},provideDocumentSemanticTokensEdits:void 0!==e.documentProvider&&"boolean"!=typeof e.documentProvider&&!0===e.documentProvider.edits?(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return r.sendRequest(o.Proposed.SemanticTokensEditsRequest.type,i,n).then(e=>o.Proposed.SemanticTokens.is(e)?a.asSemanticTokens(e):a.asSemanticTokensEdits(e),e=>{r.logFailedRequest(o.Proposed.SemanticTokensEditsRequest.type,e)})};return i.provideDocumentSemanticTokensEdits?i.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0},n=!0===e.rangeProvider?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};return r.sendRequest(o.Proposed.SemanticTokensRangeRequest.type,i,n).then(e=>a.asSemanticTokens(e),e=>{r.logFailedRequest(o.Proposed.SemanticTokensRangeRequest.type,e)})};return i.provideDocumentRangeSemanticTokens?i.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,i=[],s=a.asLegend(e.legend);return i.push(r.languages.registerDocumentSemanticTokensProvider(e.documentSelector,t,s)),void 0!==n&&i.push(r.languages.registerDocumentRangeSemanticTokensProvider(e.documentSelector,n,s)),[new r.Disposable(()=>i.forEach(e=>e.dispose())),{document:t,range:n}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(19),i=n(5),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=i.join(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_ELEMENTS=void 0,t.EMPTY_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateTagClosing=void 0;const r=n(0);t.activateTagClosing=function(e,t,n){let i=[];r.workspace.onDidChangeTextDocument(t=>(function(t,n){if(!o)return;let i=r.window.activeTextEditor&&r.window.activeTextEditor.document;if(t!==i||0===n.length)return;void 0!==s&&clearTimeout(s);let a=n[n.length-1],c=a.text[a.text.length-1];if(a.rangeLength>0||">"!==c&&"/"!==c)return;let u=a.range.start,l=t.version;s=setTimeout(()=>{let n=new r.Position(u.line,u.character+a.text.length);e(t,n).then(e=>{if(e&&o){let i=r.window.activeTextEditor;if(i){let o=i.document;if(t===o&&o.version===l){let t=i.selections;t.length&&t.some(e=>e.active.isEqual(n))?i.insertSnippet(new r.SnippetString(e),t.map(e=>e.active)):i.insertSnippet(new r.SnippetString(e),n)}}}}),s=void 0},100)})(t.document,t.contentChanges),null,i);let o=!1;a(),r.window.onDidChangeActiveTextEditor(a,null,i);let s=void 0;function a(){o=!1;let e=r.window.activeTextEditor;if(!e)return;let i=e.document;t[i.languageId]&&r.workspace.getConfiguration(void 0,i.uri).get(n)&&(o=!0)}return r.Disposable.from(...i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=!0;var r=n(11),i=n(13),o=n(5),s=n(0),a=n(85),c=function(){function e(e,t,n){var i=this;this.extensionId=e,this.extensionVersion=t,this.userOptIn=!1;var a=process.env.VSCODE_LOGS||"";a&&e&&"trace"===process.env.VSCODE_LOG_LEVEL&&(a=o.join(a,e+".txt"),this.logStream=r.createWriteStream(a,{flags:"a",encoding:"utf8",autoClose:!0})),this.updateUserOptIn(n),this.configListener=s.workspace.onDidChangeConfiguration(function(){return i.updateUserOptIn(n)})}return e.prototype.updateUserOptIn=function(t){var n=s.workspace.getConfiguration(e.TELEMETRY_CONFIG_ID);this.userOptIn!==n.get(e.TELEMETRY_CONFIG_ENABLED_ID,!0)&&(this.userOptIn=n.get(e.TELEMETRY_CONFIG_ENABLED_ID,!0),this.userOptIn?this.createAppInsightsClient(t):this.dispose())},e.prototype.createAppInsightsClient=function(e){a.defaultClient?(this.appInsightsClient=new a.TelemetryClient(e),this.appInsightsClient.channel.setUseDiskRetryCaching(!0)):(a.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setUseDiskRetryCaching(!0).start(),this.appInsightsClient=a.defaultClient),this.appInsightsClient.commonProperties=this.getCommonProperties(),s&&s.env&&(this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.userId]=s.env.machineId,this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.sessionId]=s.env.sessionId),e&&0===e.indexOf("AIF-")&&(this.appInsightsClient.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1")},e.prototype.getCommonProperties=function(){var e=Object.create(null);return e["common.os"]=i.platform(),e["common.platformversion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,s&&s.env&&(e["common.vscodemachineid"]=s.env.machineId,e["common.vscodesessionid"]=s.env.sessionId,e["common.vscodeversion"]=s.version),e},e.prototype.sendTelemetryEvent=function(e,t,n){this.userOptIn&&e&&this.appInsightsClient&&(this.appInsightsClient.trackEvent({name:this.extensionId+"/"+e,properties:t,measurements:n}),this.logStream&&this.logStream.write("telemetry/"+e+" "+JSON.stringify({properties:t,measurements:n})+"\n"))},e.prototype.dispose=function(){var e=this;this.configListener.dispose();var t=new Promise(function(t){if(!e.logStream)return t(void 0);e.logStream.on("finish",t),e.logStream.end()}),n=new Promise(function(t){e.appInsightsClient?e.appInsightsClient.flush({callback:function(){e.appInsightsClient=void 0,t(void 0)}}):t(void 0)});return Promise.all([n,t])},e.TELEMETRY_CONFIG_ID="telemetry",e.TELEMETRY_CONFIG_ENABLED_ID="enableTelemetry",e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),i=n(105),o=n(126),s=n(41),a=n(23),c=n(43),u=n(4);t.TelemetryClient=n(134),t.Contracts=n(8);var l,d,p,h,f,g=!0,m=!1,v=!0,y=!0,C=!0,_=!0,T=!0,R=!0,w=void 0,b=void 0,E=!1;function S(){return t.defaultClient?(E=!0,l.enable(g,m),d.enable(v),p.enable(y),h.useAutoCorrelation(R),h.enable(C),f.enable(_)):u.warn("Start cannot be called before setup"),k}t.setup=function(e){return t.defaultClient?u.info("The default client is already setup"):(t.defaultClient=new t.TelemetryClient(e),l=new i(t.defaultClient),d=new o(t.defaultClient),p=new s(t.defaultClient),h=new c(t.defaultClient),f=new a(t.defaultClient)),t.defaultClient&&t.defaultClient.channel&&t.defaultClient.channel.setUseDiskRetryCaching(T,w,b),k},t.start=S,t.getCorrelationContext=function(){return R?r.CorrelationContextManager.getCurrentContext():null},t.wrapWithCorrelationContext=function(e){return r.CorrelationContextManager.wrapCallback(e)};var k=function(){function e(){}return e.setAutoCollectConsole=function(t,n){return void 0===n&&(n=!1),g=t,m=n,E&&l.enable(t,n),e},e.setAutoCollectExceptions=function(t){return v=t,E&&d.enable(t),e},e.setAutoCollectPerformance=function(t){return y=t,E&&p.enable(t),e},e.setAutoCollectRequests=function(t){return C=t,E&&h.enable(t),e},e.setAutoCollectDependencies=function(t){return _=t,E&&f.enable(t),e},e.setAutoDependencyCorrelation=function(t){return R=t,E&&h.useAutoCorrelation(t),e},e.setUseDiskRetryCaching=function(n,r,i){return T=n,w=r,b=i,t.defaultClient&&t.defaultClient.channel&&t.defaultClient.channel.setUseDiskRetryCaching(n,r,i),e},e.setInternalLogging=function(t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),u.enableDebug=t,u.disableWarnings=!n,e},e.start=S,e}();t.Configuration=k,t.dispose=function(){t.defaultClient=null,E=!1,l&&l.dispose(),d&&d.dispose(),p&&p.dispose(),h&&h.dispose(),f&&f.dispose()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87);t.bunyan=r;var i=n(90);t.console=i;var o=n(93);t.mongodbCore=o;var s=n(94);t.mongodb=s;var a=n(95);t.mysql=a;var c=n(98);t.pgPool=c;var u=n(99);t.pg=u;var l=n(100);t.redis=l;var d=n(101);t.winston=d,t.enable=function(){r.enable(),i.enable(),o.enable(),s.enable(),a.enable(),u.enable(),c.enable(),l.enable(),d.enable()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var t=e.prototype._emit;return e.prototype._emit=function(e,n){var i=t.apply(this,arguments);if(!n){var o=i;o||(o=t.call(this,e,!0)),r.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},t.enable=function(){r.channel.registerMonkeyPatch("bunyan",t.bunyan)}},function(e,t){var n;t=e.exports=G,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],s=t.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var u=a++;s[u]="[0-9]+";var l=a++;s[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[u]+")\\.("+s[u]+")\\.("+s[u]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[l]+")";var f=a++;s[f]="(?:"+s[u]+"|"+s[l]+")";var g=a++;s[g]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=a++;s[m]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var v=a++;s[v]="[0-9A-Za-z-]+";var y=a++;s[y]="(?:\\+("+s[v]+"(?:\\."+s[v]+")*))";var C=a++,_="v?"+s[d]+s[g]+"?"+s[y]+"?";s[C]="^"+_+"$";var T="[v=\\s]*"+s[p]+s[m]+"?"+s[y]+"?",R=a++;s[R]="^"+T+"$";var w=a++;s[w]="((?:<|>)?=?)";var b=a++;s[b]=s[u]+"|x|X|\\*";var E=a++;s[E]=s[c]+"|x|X|\\*";var S=a++;s[S]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[y]+"?)?)?";var k=a++;s[k]="[v=\\s]*("+s[b]+")(?:\\.("+s[b]+")(?:\\.("+s[b]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var P=a++;s[P]="^"+s[w]+"\\s*"+s[S]+"$";var D=a++;s[D]="^"+s[w]+"\\s*"+s[k]+"$";var x=a++;s[x]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var I=a++;s[I]="(?:~>?)";var O=a++;s[O]="(\\s*)"+s[I]+"\\s+",o[O]=new RegExp(s[O],"g");var N=a++;s[N]="^"+s[I]+s[S]+"$";var q=a++;s[q]="^"+s[I]+s[k]+"$";var A=a++;s[A]="(?:\\^)";var L=a++;s[L]="(\\s*)"+s[A]+"\\s+",o[L]=new RegExp(s[L],"g");var M=a++;s[M]="^"+s[A]+s[S]+"$";var F=a++;s[F]="^"+s[A]+s[k]+"$";var j=a++;s[j]="^"+s[w]+"\\s*("+T+")$|^$";var H=a++;s[H]="^"+s[w]+"\\s*("+_+")$|^$";var z=a++;s[z]="(\\s*)"+s[w]+"\\s*("+T+"|"+s[S]+")",o[z]=new RegExp(s[z],"g");var K=a++;s[K]="^\\s*("+s[S]+")\\s+-\\s+("+s[S]+")\\s*$";var U=a++;s[U]="^\\s*("+s[k]+")\\s+-\\s+("+s[k]+")\\s*$";var W=a++;s[W]="(<|>)?=?\\s*\\*";for(var $=0;$<a;$++)n($,s[$]),o[$]||(o[$]=new RegExp(s[$]));function V(e,t){if(e instanceof G)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t?o[R]:o[C]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(e instanceof G){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.loose=t;var s=e.trim().match(t?o[R]:o[C]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}t.parse=V,t.valid=function(e,t){var n=V(e,t);return n?n.version:null},t.clean=function(e,t){var n=V(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=G,G.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},G.prototype.toString=function(){return this.version},G.prototype.compare=function(e){return n("SemVer.compare",this.version,this.loose,e),e instanceof G||(e=new G(e,this.loose)),this.compareMain(e)||this.comparePre(e)},G.prototype.compareMain=function(e){return e instanceof G||(e=new G(e,this.loose)),Z(this.major,e.major)||Z(this.minor,e.minor)||Z(this.patch,e.patch)},G.prototype.comparePre=function(e){if(e instanceof G||(e=new G(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Z(r,i)}while(++t)},G.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new G(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=V(e),r=V(t);if(n.prerelease.length||r.prerelease.length){for(var i in n)if(("major"===i||"minor"===i||"patch"===i)&&n[i]!==r[i])return"pre"+i;return"prerelease"}for(var i in n)if(("major"===i||"minor"===i||"patch"===i)&&n[i]!==r[i])return i},t.compareIdentifiers=Z;var B=/^[0-9]+$/;function Z(e,t){var n=B.test(e),r=B.test(t);return n&&r&&(e=+e,t=+t),n&&!r?-1:r&&!n?1:e<t?-1:e>t?1:0}function X(e,t,n){return new G(e,n).compare(new G(t,n))}function J(e,t,n){return X(e,t,n)>0}function Y(e,t,n){return X(e,t,n)<0}function Q(e,t,n){return 0===X(e,t,n)}function ee(e,t,n){return 0!==X(e,t,n)}function te(e,t,n){return X(e,t,n)>=0}function ne(e,t,n){return X(e,t,n)<=0}function re(e,t,n,r){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),i=e===n;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),i=e!==n;break;case"":case"=":case"==":i=Q(e,n,r);break;case"!=":i=ee(e,n,r);break;case">":i=J(e,n,r);break;case">=":i=te(e,n,r);break;case"<":i=Y(e,n,r);break;case"<=":i=ne(e,n,r);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ie(e,t){if(e instanceof ie){if(e.loose===t)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return Z(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=X,t.compareLoose=function(e,t){return X(e,t,!0)},t.rcompare=function(e,t,n){return X(t,e,n)},t.sort=function(e,n){return e.sort(function(e,r){return t.compare(e,r,n)})},t.rsort=function(e,n){return e.sort(function(e,r){return t.rcompare(e,r,n)})},t.gt=J,t.lt=Y,t.eq=Q,t.neq=ee,t.gte=te,t.lte=ne,t.cmp=re,t.Comparator=ie;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,u,l,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(u)?"<"+(+c+1)+".0.0":ae(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ue(e,t){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length){for(r=0;r<e.length;r++)if(n(e[r].semver),e[r].semver!==oe&&e[r].semver.prerelease.length>0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function le(e,t,n){try{t=new se(t,n)}catch(e){return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new G(e,r),t=new se(t,r),n){case">":i=J,o=ne,s=Y,a=">",c=">=";break;case"<":i=Y,o=te,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,r))return!1;for(var u=0;u<t.set.length;++u){var l=null,d=null;if(t.set[u].forEach(function(e){e.semver===oe&&(e=new ie(">=0.0.0")),l=l||e,d=d||e,i(e.semver,l.semver,r)?l=e:s(e.semver,d.semver,r)&&(d=e)}),l.operator===a||l.operator===c)return!1;if((!d.operator||d.operator===a)&&o(e,d.semver))return!1;if(d.operator===c&&s(e,d.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.loose?o[j]:o[H],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new G(n[2],this.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new G(e,this.loose)),re(e,this.operator,this.semver,this.loose))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(""===this.operator)return n=new se(e.value,t),le(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),le(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[U]:o[K];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[z],"$1$2$3"),n("comparator trim",e,o[z]),e=(e=(e=e.replace(o[O],"$1~")).replace(o[L],"$1^")).split(/\s+/).join(" ");var i=t?o[j]:o[H],s=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[F]:o[M];return e.replace(r,function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),"-"!==s.charAt(0)&&(s="-"+s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[q]:o[N];return e.replace(r,function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),"-"!==s.charAt(0)&&(s="-"+s),a=">="+r+"."+i+"."+o+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[D]:o[P];return e.replace(r,function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),u=c||ae(o),l=u||ae(s),d=l;return"="===r&&d&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&d?(u&&(o=0),l&&(s=0),">"===r?(r=">=",u?(i=+i+1,o=0,s=0):l&&(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[W],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(s=s.filter(function(e){return!!e.match(i)})),s=s.map(function(e){return new ie(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(n){return n.every(function(n){return e.set.some(function(e){return e.every(function(e){return n.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.loose));for(var t=0;t<this.set.length;t++)if(ue(this.set[t],e))return!0;return!1},t.satisfies=le,t.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&-1!==i.compare(e)||(i=new G(r=e,n)))}),r},t.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&1!==i.compare(e)||(i=new G(r=e,n)))}),r},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return de(e,t,"<",n)},t.gtr=function(e,t,n){return de(e,t,">",n)},t.outside=de,t.prerelease=function(e,t){var n=V(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(o[x]);return null==t?null:V((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}},function(e){e.exports={name:"diagnostic-channel",version:"0.2.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"^7.0.12",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"^2.2.1"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(91);t.console={versionSpecifier:">= 4.0.0",patch:function(e){var t=new i.Writable,n=new i.Writable;t.write=function(e){if(!e)return!0;var t=e.toString();return r.channel.publish("console",{message:t}),!0},n.write=function(e){if(!e)return!0;var t=e.toString();return r.channel.publish("console",{message:t,stderr:!0}),!0};for(var o=new e.Console(t,n),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch(e){}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++)s(c[a]);return e}},t.enable=function(){r.channel.registerMonkeyPatch("console",t.console),n(92)}},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("console")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.mongoCore2={versionSpecifier:">= 2.0.0 < 2.2.0",patch:function(e){var t=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=t.apply(this,arguments),n=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=r.channel.bindToContext(arguments[e])),n.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=r.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},t.enable=function(){r.channel.registerMonkeyPatch("mongodb-core",t.mongoCore2)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.mongo2={versionSpecifier:">= 2.0.0 <= 2.2.x",patch:function(e){var t=e.instrument({operationIdGenerator:{next:function(){return r.channel.bindToContext(function(e){return e()})}}}),n={};return t.on("started",function(e){n[e.requestId]||(n[e.requestId]=e)}),t.on("succeeded",function(e){var t=n[e.requestId];t&&delete n[e.requestId],e.operationId(function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})}),t.on("failed",function(e){var t=n[e.requestId];t&&delete n[e.requestId],e.operationId(function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})}),e}},t.enable=function(){r.channel.registerMonkeyPatch("mongodb",t.mongo2)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(5);t.mysql={versionSpecifier:">= 2.0.0 <= 2.14.x",patch:function(e,t){var o=function(e,t){return function(t,n){var i=e[t];i&&(e[t]=function(){for(var e=arguments.length-1,t=arguments.length-1;t>=0;--t){if("function"==typeof arguments[t]){e=t;break}if(void 0!==arguments[t])break}var o=arguments[e],s={result:null,startTime:null};"function"==typeof o&&(n?(s.startTime=process.hrtime(),arguments[e]=r.channel.bindToContext(n(s,o))):arguments[e]=r.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(96)(i.dirname(t)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach(function(e){return s(a)(e)}),o(a)("createQuery",function(e,t){return function(n){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;r.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:n,duration:o}),t.apply(this,arguments)}});var c=n(97)(i.dirname(t)+"/lib/Pool");return["_enqueueCallback"].forEach(function(e){return s(c)(e)}),e}},t.enable=function(){r.channel.registerMonkeyPatch("mysql",t.mysql)}},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=96},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=97},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.postgresPool1={versionSpecifier:"1.x",patch:function(e){var t=e.prototype.connect;return e.prototype.connect=function(e){e&&(arguments[0]=r.channel.bindToContext(e)),t.apply(this,arguments)},e}},t.enable=function(){r.channel.registerMonkeyPatch("pg-pool",t.postgresPool1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(36);t.postgres6={versionSpecifier:"6.x",patch:function(e,t){var n=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0},u=process.hrtime();function l(e){e&&e[o]&&(e=e[o]);var t=r.channel.bindToContext(function(t,n){var o=process.hrtime(u);if(c.result=n&&{rowCount:n.rowCount,command:n.command},c.error=t,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),r.channel.publish("postgres",c),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)});try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(c.query.preparable={text:e,args:t},s=l(s)):(c.query.text=e,s?s=l(s):t=l(t)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=l(s):t?t=l(t):e.callback=l(e.callback))}catch(e){return n.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=n.apply(this,arguments)},e}},t.enable=function(){r.channel.registerMonkeyPatch("pg",t.postgres6)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.redis={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e){var t=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var n=e.callback;if(!n||!n.pubsubBound){var i=this.address,o=process.hrtime();e.callback=r.channel.bindToContext(function(t,s){var a=process.hrtime(o),c=1e3*a[0]+a[1]/1e6|0;r.channel.publish("redis",{duration:c,address:i,commandObj:e,err:t,result:s}),"function"==typeof n&&n.apply(this,arguments)}),e.callback.pubsubBound=!0}}return t.call(this,e)},e}},t.enable=function(){r.channel.registerMonkeyPatch("redis",t.redis)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.winston={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,i=function(n,i,o){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",r.channel.publish("winston",{level:n,message:i,meta:o,levelKind:s}),i};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==i&&(this.filters=this.filters.filter(function(e){return e!==i}),this.filters.push(i)):this.filters=[i],n.apply(this,arguments)},e}},t.enable=function(){r.channel.registerMonkeyPatch("winston",t.winston)}},function(e,t,n){
  /**
  * @license
  * Copyright Google Inc. All Rights Reserved.
  *
  * Use of this source code is governed by an MIT-style license that can be
  * found in the LICENSE file at https://angular.io/license
  */
  !function(e,t){t()}(0,function(){"use strict";
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */!function(e){if(e.Zone)throw new Error("Zone already loaded.");var t=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new n(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==O)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"current",{get:function(){return u.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),u=new i(u,this);try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{u=u.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),u=new i(u,this);try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{u=u.parent}},t.prototype.runTask=function(e,t,n){if(e.runCount++,e.zone!=this)throw new Error("A task can only be run in the zone which created it! (Creation: "+e.zone.name+"; Execution: "+this.name+")");var r=l;l=e,u=new i(u,this);try{"macroTask"==e.type&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{u=u.parent,l=r}},t.prototype.scheduleMicroTask=function(e,t,n,i){return this._zoneDelegate.scheduleTask(this,new r("microTask",this,e,t,n,i,null))},t.prototype.scheduleMacroTask=function(e,t,n,i,o){return this._zoneDelegate.scheduleTask(this,new r("macroTask",this,e,t,n,i,o))},t.prototype.scheduleEventTask=function(e,t,n,i,o){return this._zoneDelegate.scheduleTask(this,new r("eventTask",this,e,t,n,i,o))},t.prototype.cancelTask=function(e){var t=this._zoneDelegate.cancelTask(this,e);return e.runCount=-1,e.cancelFn=null,t},t}();t.__symbol__=o;var n=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=n&&(n.onHasTask?n:t._hasTaskZS),this._hasTaskDlgt=n&&(n.onHasTask?t:t._hasTaskDlgt),this._hasTaskCurrZone=n&&(n.onHasTask?this.zone:t.zone)}return e.prototype.fork=function(e,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,n):new t(e,n)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){try{if(this._scheduleTaskZS)return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t);if(t.scheduleFn)t.scheduleFn(t);else{if("microTask"!=t.type)throw new Error("Task is missing scheduleFn.");!function(e){g(),d.push(e)}(t)}return t}finally{e==this.zone&&this._updateTaskCount(t.type,1)}},e.prototype.invokeTask=function(e,t,n,r){try{return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}finally{e!=this.zone||"eventTask"==t.type||t.data&&t.data.isPeriodic||this._updateTaskCount(t.type,-1)}},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw new Error("Task does not support cancellation, or is already canceled.");n=t.cancelFn(t)}return e==this.zone&&this._updateTaskCount(t.type,-1),n},e.prototype.hasTask=function(e,t){return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==i){var o={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};try{this.hasTask(this.zone,o)}finally{this._parentDelegate&&this._parentDelegate._updateTaskCount(e,t)}}},e}(),r=function(){function e(e,t,n,r,i,o,s){this.runCount=0,this.type=e,this.zone=t,this.source=n,this.data=i,this.scheduleFn=o,this.cancelFn=s,this.callback=r;var a=this;this.invoke=function(){f++;try{return t.runTask(a,this,arguments)}finally{1==f&&v(),f--}}}return e.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,source:this.source,data:this.data,zone:this.zone.name,invoke:this.invoke,scheduleFn:this.scheduleFn,cancelFn:this.cancelFn,runCount:this.runCount,callback:this.callback}},e}(),i=function(){return function(e,t){this.parent=e,this.zone=t}}();function o(e){return"__zone_symbol__"+e}var s=o("setTimeout"),a=o("Promise"),c=o("then"),u=new i(null,new t(null,null)),l=null,d=[],p=!1,h=[],f=0;function g(){0===f&&0===d.length&&(e[a]?e[a].resolve(0)[c](v):e[s](v,0))}function m(e){var t=e&&e.rejection;t&&console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0),console.error(e)}function v(){if(!p){for(p=!0;d.length;){var e=d;d=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){m(e)}}}for(;h.length;)for(var r=function(){var e=h.shift();try{e.zone.runGuarded(function(){throw e})}catch(e){m(e)}};h.length;)r();p=!1}}function y(e){return e&&e.then}function C(e){return e}function _(e){return O.reject(e)}var T=o("state"),R=o("value"),w="Promise.then",b=null,E=!0,S=!1,k=0;function P(e,t){return function(n){D(e,t,n)}}function D(e,n,r){if(e[T]===b)if(r instanceof O&&r.hasOwnProperty(T)&&r.hasOwnProperty(R)&&r[T]!==b)x(r),D(e,r[T],r[R]);else if(y(r))r.then(P(e,n),P(e,!1));else{e[T]=n;var i=e[R];e[R]=r;for(var o=0;o<i.length;)I(e,i[o++],i[o++],i[o++],i[o++]);if(0==i.length&&n==S){e[T]=k;try{throw new Error("Uncaught (in promise): "+r+(r&&r.stack?"\n"+r.stack:""))}catch(n){var s=n;s.rejection=r,s.promise=e,s.zone=t.current,s.task=t.currentTask,h.push(s),g()}}}return e}function x(e){if(e[T]===k){e[T]=S;for(var t=0;t<h.length;t++)if(e===h[t].promise){h.splice(t,1);break}}}function I(e,t,n,r,i){x(e);var o=e[T]?r||C:i||_;t.scheduleMicroTask(w,function(){try{D(n,!0,t.run(o,null,[e[R]]))}catch(e){D(n,!1,e)}})}var O=function(){function e(t){if(!(this instanceof e))throw new Error("Must be an instanceof Promise.");this[T]=b,this[R]=[];try{t&&t(P(this,E),P(this,S))}catch(e){D(this,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return D(new this(null),E,e)},e.reject=function(e){return D(new this(null),S,e)},e.race=function(e){var t,n,r=new this(function(e,r){var i;t=(i=[e,r])[0],n=i[1]});function i(e){r&&(r=t(e))}function o(e){r&&(r=n(e))}for(var s=0,a=e;s<a.length;s++){var c=a[s];y(c)||(c=this.resolve(c)),c.then(i,o)}return r},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),i=0,o=[],s=0,a=e;s<a.length;s++){var c=a[s];y(c)||(c=this.resolve(c)),c.then(function(e){return function(n){o[e]=n,--i||t(o)}}(i),n),i++}return i||t(o),r},e.prototype.then=function(e,n){var r=new this.constructor(null),i=t.current;return this[T]==b?this[R].push(i,r,e,n):I(this,i,r,e,n),r},e.prototype.catch=function(e){return this.then(null,e)},e}();O.resolve=O.resolve,O.reject=O.reject,O.race=O.race,O.all=O.all;var N,q=e[o("Promise")]=e.Promise;function A(e){var t=e.prototype,n=t[o("then")]=t.then;t.then=function(e,t){var r=this;return new O(function(e,t){n.call(r,e,t)}).then(e,t)}}if(e.Promise=O,q&&(A(q),void 0!==e.fetch)){var L=void 0;try{L=e.fetch()}catch(t){L=e.fetch("about:blank")}L.then(function(){return null},function(){return null}),L.constructor!=q&&L.constructor!=O&&A(L.constructor)}Promise[t.__symbol__("uncaughtPromiseErrors")]=h,function(e){e[e.blackList=0]="blackList",e[e.transition=1]="transition"}(N||(N={}));var M,F=e[o("Error")]=e.Error,j={};e.Error=$;var H="stackRewrite",z=function(e,t){if(!e[t]){var n=o(t);e[t]={configurable:!0,enumerable:!0,get:function(){if(!this[n]){var e=this[o("error")];e&&(this[n]=e[t])}return this[n]},set:function(e){this[n]=e}}}},K=function(e,t){e[t]||(e[t]={configurable:!0,enumerable:!0,writable:!0,value:function(){var e=this[o("error")],n=e&&e[t]||this[t];if(n)return n.apply(e,arguments)}})},U=function(){for(var e=Object.create(null),t=new F,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r];Object.prototype.hasOwnProperty.call(t,i)&&z(e,i)}var o=F.prototype;if(o){var s=Object.getOwnPropertyNames(o);for(r=0;r<s.length;r++)"constructor"!==(i=s[r])&&"toString"!==i&&"toSource"!==i&&z(e,i)}return z(e,"originalStack"),z(e,"zoneAwareStack"),K(e,"toString"),K(e,"toSource"),e}(),W=function(e){if(e===$.prototype)return U;var t=Object.create(null),n=Object.getOwnPropertyNames(U),r=Object.getOwnPropertyNames(e);return n.forEach(function(e){0===r.filter(function(t){return t===e}).length&&(t[e]=U[e])}),t};function $(){if(!(this instanceof $))return $.apply(Object.create($.prototype),arguments);var e=F.apply(this,arguments);if(this[o("error")]=e,e.originalStack=e.stack,$[H]&&e.originalStack){for(var t=e.originalStack.split("\n"),n=u,r=0;t[r]!==M&&r<t.length;)r++;for(;r<t.length&&n;r++){var i=t[r];if(i.trim()){var s=j.hasOwnProperty(i)&&j[i];s===N.blackList?(t.splice(r,1),r--):s===N.transition?n.parent?(t[r]+=" ["+n.parent.zone.name+" => "+n.zone.name+"]",n=n.parent):n=null:t[r]+=" ["+n.zone.name+"]"}}e.stack=e.zoneAwareStack=t.join("\n")}return Object.defineProperties(this,W(Object.getPrototypeOf(this))),this}$.prototype=F.prototype,$[t.__symbol__("blacklistedStackFrames")]=j,$[H]=!1,F.hasOwnProperty("stackTraceLimit")&&(F.stackTraceLimit=Math.max(F.stackTraceLimit,15),Object.defineProperty($,"stackTraceLimit",{get:function(){return F.stackTraceLimit},set:function(e){return F.stackTraceLimit=e}})),F.hasOwnProperty("captureStackTrace")&&Object.defineProperty($,"captureStackTrace",{value:function(e,t){F.captureStackTrace(e,t)}}),Object.defineProperty($,"prepareStackTrace",{get:function(){return F.prepareStackTrace},set:function(e){return F.prepareStackTrace=e&&"function"==typeof e?function(t,n){if(n)for(var r=0;r<n.length;r++){if("zoneCaptureStackTrace"===n[r].getFunctionName()){n.splice(r,1);break}}return e.apply(this,[t,n])}:e}});var V=t.current.fork({name:"detect",onInvoke:function(e,t,n,r,i,o,s){return e.invoke(n,r,i,o,s)},onHandleError:function(e,t,n,r){if(r.originalStack&&Error===$)for(var i=r.originalStack.split(/\n/),o=!1,s=!1,a=!1;i.length;){var c=i.shift();if(/:\d+:\d+/.test(c)){var u=c.split("(")[0].split("@")[0],l=N.transition;if(-1!==u.indexOf("ZoneAwareError")&&(M=c),-1!==u.indexOf("runGuarded")?s=!0:-1!==u.indexOf("runTask")?a=!0:-1!==u.indexOf("run")?o=!0:l=N.blackList,j[c]=l,o&&s&&a){$[H]=!0;break}}}return!1}});V.runTask(V.scheduleMacroTask("detect",function(){V.run(function(){V.runGuarded(function(){throw new Error("blacklistStackFrames")})})},null,function(){return null},null)),e.Zone=t}("object"==typeof window&&window||"object"==typeof self&&self||global);
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */var e=function(e){return"__zone_symbol__"+e},t="object"==typeof window&&window||"object"==typeof self&&self||global;!("nw"in t)&&"undefined"!=typeof process&&{}.toString.call(process);var r=e("eventTasks");function i(e,t,n,i,o){var s=e[r];if(s)for(var a=0;a<s.length;a++){var c=s[a],u=c.data,l=u.handler;if((u.handler===t||l.listener===t)&&u.useCapturing===i&&u.eventName===n)return o&&s.splice(a,1),c}return null}var o=function(e,n){return{useCapturing:n[2],eventName:n[0],handler:n[1],target:e||t,name:n[0],invokeAddFunc:function(e,t){return t&&t.invoke?this.target[e](this.eventName,t.invoke,this.useCapturing):this.target[e](this.eventName,t,this.useCapturing)},invokeRemoveFunc:function(e,t){return t&&t.invoke?this.target[e](this.eventName,t.invoke,this.useCapturing):this.target[e](this.eventName,t,this.useCapturing)}}};function s(t,n,s,a,c,u){void 0===s&&(s=!0),void 0===a&&(a=!1),void 0===c&&(c=!1),void 0===u&&(u=o);var l=e(t),d=e(n),p=!s&&void 0;function h(e){var t=e.data;return function(e,t,n){var i=e[r];i||(i=e[r]=[]),n?i.unshift(t):i.push(t)}(t.target,e,c),t.invokeAddFunc(l,e)}function f(e){var t=e.data;return i(t.target,e.invoke,t.eventName,t.useCapturing,!0),t.invokeRemoveFunc(d,e)}return function(e,n){var r=u(e,n);r.useCapturing=r.useCapturing||p;var o=null;"function"==typeof r.handler?o=r.handler:r.handler&&r.handler.handleEvent&&(o=function(e){return r.handler.handleEvent(e)});var s=!1;try{s=r.handler&&"[object FunctionWrapper]"===r.handler.toString()}catch(e){return}if(!o||s)return r.invokeAddFunc(l,r.handler);if(!a){var c=i(r.target,r.handler,r.eventName,r.useCapturing,!1);if(c)return r.invokeAddFunc(l,c)}var d=Zone.current,g=r.target.constructor.name+"."+t+":"+r.eventName;d.scheduleEventTask(g,o,r,h,f)}}function a(t,n,r){void 0===n&&(n=!0),void 0===r&&(r=o);var s=e(t),a=!n&&void 0;return function(e,t){var n=r(e,t);n.useCapturing=n.useCapturing||a;var o=i(n.target,n.handler,n.eventName,n.useCapturing,!0);o?o.zone.cancelTask(o):n.invokeRemoveFunc(s,n.handler)}}s("addEventListener","removeEventListener"),a("removeEventListener"),e("originalInstance");function c(t,n,r){for(var i=t;i&&-1===Object.getOwnPropertyNames(i).indexOf(n);)i=Object.getPrototypeOf(i);!i&&t[n]&&(i=t);var o,s=e(n);return i&&!(o=i[s])&&(o=i[s]=i[n],i[n]=function(e,t){try{return Function("f","return function "+e+"(){return f(this, arguments)}")(t)}catch(e){return function(){return t(this,arguments)}}}(n,r(o,s,n))),o}
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  var u,l,d=function(e){return function(t,n){return e(t,n),t}},p="addListener",h="prependListener",f="removeListener",g="removeAllListeners",m="listeners",v="on",y=d(s(p,f,!1,!0,!1)),C=d(s(h,f,!1,!0,!0)),_=d(a(f,!1)),T=d(function(n,i){void 0===i&&(i=!0);var o=e(n),s=!i&&void 0;return function(e,n){var i=e||t;if(0===n.length)return i[r]=[],void i[o]();var a=n[0];!function(e,t,n,i){var o=e[r];if(o){for(var s=[],a=o.length-1;a>=0;a--){var c=o[a],u=c.data;u.eventName===t&&u.useCapturing===n&&(s.push(c),i&&o.splice(a,1))}}}(i,a,n[1]||s,!0),i[o](a)}}(g,!1)),R=function(n){return e(n),function(e,n){var i=n[0],o=e||t;return o[r]?o[r].filter(function(e){return e.data.eventName===i}).map(function(e){return e.data.handler}):[]}}(m);try{u=n(36)}catch(e){}u&&u.EventEmitter&&function(e){!e||!e.addListener||(c(e,p,function(){return y}),c(e,h,function(){return C}),c(e,f,function(){return _}),c(e,g,function(){return T}),c(e,m,function(){return R}),e[v]=e[p])}(u.EventEmitter.prototype)
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */;try{l=n(11)}catch(e){}
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  function w(e,t,n,r){var i=null,o=null;n+=r;var s={};function a(t){var n=t.data;return n.args[0]=function(){t.invoke.apply(this,arguments),delete s[n.handleId]},n.handleId=i.apply(e,n.args),s[n.handleId]=t,t}function u(e){return delete s[e.data.handleId],o(e.data.handleId)}i=c(e,t+=r,function(n){return function(i,o){if("function"==typeof o[0]){var s=Zone.current,c={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?o[1]||0:null,args:o},l=s.scheduleMacroTask(t,o[0],c,a,u);if(!l)return l;var d=l.data.handleId;return d.ref&&d.unref&&(l.ref=d.ref.bind(d),l.unref=d.unref.bind(d)),l}return n.apply(e,o)}}),o=c(e,n,function(t){return function(n,r){var i="number"==typeof r[0]?s[r[0]]:r[0];i&&"string"==typeof i.type?(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&i.zone.cancelTask(i):t.apply(e,r)}})}
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */l&&["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter(function(e){return!!l[e]&&"function"==typeof l[e]}).forEach(function(e){!function(e,t,n){var r=null;function i(e){var t=e.data;return t.args[t.callbackIndex]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=c(e,t,function(e){return function(t,r){var o=n(t,r);return o.callbackIndex>=0&&"function"==typeof r[o.callbackIndex]?Zone.current.scheduleMacroTask(o.name,r[o.callbackIndex],o,i,null):e.apply(t,r)}})}(l,e,function(t,n){return{name:"fs."+e,args:n,callbackIndex:n.length>0?n.length-1:-1,target:t}})});var b,E,S="set",k="object"==typeof window&&window||"object"==typeof self&&self||global,P=n(103);w(P,S,"clear","Timeout"),w(P,S,"clear","Interval"),w(P,S,"clear","Immediate"),global.setTimeout!==P.setTimeout&&(w(k,S,"clear","Timeout"),w(k,S,"clear","Interval"),w(k,S,"clear","Immediate")),function(){var e=null;function t(t){var n=t.data;return n[0]=function(){t.invoke.apply(this,arguments)},e.apply(process,n),t}e=c(process,"nextTick",function(e){return function(n,r){if("function"==typeof r[0]){var i=Zone.current,o=i.scheduleMicroTask("nextTick",r[0],r,t);return o}return e.apply(process,r)}})}();try{b=n(27)}catch(e){}if(b){var D=b.randomBytes;b.randomBytes=function(e,t){if(t){var n=Zone.current,r=b.constructor.name+".randomBytes";return D(e,n.wrap(t,r))}return D(e)}.bind(b);var x=b.pbkdf2;b.pbkdf2=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];if("function"==typeof n){var r=Zone.current,i=b.constructor.name+".pbkdf2";return e[e.length-1]=r.wrap(n,i),x.apply(void 0,e)}return x.apply(void 0,e)}.bind(b)}try{E=n(104)}catch(e){}if(E&&E.ClientRequest){var I=E.ClientRequest.bind(E);E.ClientRequest=function(e,t){if(t){var n=Zone.current;return new I(e,n.wrap(t,"http.ClientRequest"))}return new I(e)}}})},function(e,t){e.exports=require("timers")},function(e,t){e.exports=require("_http_client")},function(e,t,n){"use strict";var r=n(22),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){r.IsInitialized&&(n(106).enable(e&&t,this._client),n(124).enable(e,this._client),n(125).enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),i=n(2),o=[],s=function(e){o.forEach(function(t){var n=e.data.message;n.lastIndexOf("\n")==n.length-1&&(n=n.substring(0,n.length-1)),t.trackTrace({message:n,severity:e.data.stderr?r.SeverityLevel.Warning:r.SeverityLevel.Information})})};t.enable=function(e,t){e?(0===o.length&&i.channel.subscribe("console",s),o.push(t)):0===(o=o.filter(function(e){return e!=t})).length&&i.channel.unsubscribe("console",s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37),i=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();t.RemoteDependencyDataConstants=i,t.domainSupportsProperties=function(e){return"properties"in e||e instanceof r.EventData||e instanceof r.ExceptionData||e instanceof r.MessageData||e instanceof r.MetricData||e instanceof r.PageViewData||e instanceof r.RemoteDependencyData||e instanceof r.RequestData}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=function(){return function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}}();e.exports=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(n(38));e.exports=i},function(e,t,n){"use strict";var r=n(39),i=function(){return function(){this.kind=r.Measurement}}();e.exports=i},function(e,t,n){"use strict";var r=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();e.exports=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();e.exports=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(n(40));e.exports=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(n(9));e.exports=i},function(e,t,n){"use strict";var r;!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(r||(r={})),e.exports=r},function(e,t,n){"use strict";var r=function(){return function(){}}();e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(123))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.telemetryTypeToBaseType=function(e){switch(e){case r.Event:return"EventData";case r.Exception:return"ExceptionData";case r.Trace:return"MessageData";case r.Metric:return"MetricData";case r.Request:return"RequestData";case r.Dependency:return"RemoteDependencyData"}},t.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return r.Event;case"ExceptionData":return r.Exception;case"MessageData":return r.Trace;case"MetricData":return r.Metric;case"RequestData":return r.Request;case"RemoteDependencyData":return r.Dependency}},function(e){e[e.Event=0]="Event",e[e.Exception=1]="Exception",e[e.Trace=2]="Trace",e[e.Metric=3]="Metric",e[e.Request=4]="Request",e[e.Dependency=5]="Dependency"}(r=t.TelemetryType||(t.TelemetryType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),i=n(2),o=[],s={10:r.SeverityLevel.Verbose,20:r.SeverityLevel.Verbose,30:r.SeverityLevel.Information,40:r.SeverityLevel.Warning,50:r.SeverityLevel.Error,60:r.SeverityLevel.Critical},a=function(e){o.forEach(function(t){var n=s[e.data.level];t.trackTrace({message:e.data.result,severity:n})})};t.enable=function(e,t){e?(0===o.length&&i.channel.subscribe("bunyan",a),o.push(t)):0===(o=o.filter(function(e){return e!=t})).length&&i.channel.unsubscribe("bunyan",a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),i=n(2),o=[],s={syslog:function(e){var t={emerg:r.SeverityLevel.Critical,alert:r.SeverityLevel.Critical,crit:r.SeverityLevel.Critical,error:r.SeverityLevel.Error,warning:r.SeverityLevel.Warning,notice:r.SeverityLevel.Information,info:r.SeverityLevel.Information,debug:r.SeverityLevel.Verbose};return void 0===t[e]?r.SeverityLevel.Information:t[e]},npm:function(e){var t={error:r.SeverityLevel.Error,warn:r.SeverityLevel.Warning,info:r.SeverityLevel.Information,verbose:r.SeverityLevel.Verbose,debug:r.SeverityLevel.Verbose,silly:r.SeverityLevel.Verbose};return void 0===t[e]?r.SeverityLevel.Information:t[e]},unknown:function(e){return r.SeverityLevel.Information}},a=function(e){o.forEach(function(t){var n=s[e.data.levelKind](e.data.level);t.trackTrace({message:e.data.message,severity:n,properties:e.data.meta})})};t.enable=function(e,t){e?(0===o.length&&i.channel.subscribe("winston",a),o.push(t)):0===(o=o.filter(function(e){return e!=t})).length&&i.channel.unsubscribe("winston",a)}},function(e,t,n){"use strict";var r=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return Object.defineProperty(e,"UNCAUGHT_EXCEPTION_HANDLER_NAME",{get:function(){return"uncaughtException"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"UNHANDLED_REJECTION_HANDLER_NAME",{get:function(){return"unhandledRejection"},enumerable:!0,configurable:!0}),e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var n=this;if(t){this._isInitialized=!0;if(!this._exceptionListenerHandle){var r=function(e,t){if(n._client.trackException({exception:t}),n._client.flush({isAppCrashing:!0}),e)throw t};this._exceptionListenerHandle=r.bind(this,!0),this._rejectionListenerHandle=r.bind(this,!1),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)}}else this._exceptionListenerHandle&&(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e}();e.exports=r},function(e,t){e.exports=require("constants")},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=n(18),o=n(8),s=n(10),a=n(16),c=n(42),u=n(26),l=function(e){function t(n,r){var i=e.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=t._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return r(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=s.getCorrelationContextTarget(e,a.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var n=i.parse(this.url);n.search=void 0,n.hash=void 0;var r=this.method.toUpperCase()+" "+n.pathname,s=o.RemoteDependencyDataConstants.TYPE_HTTP,a=n.hostname;this.correlationId?(s=o.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==u.correlationIdPrefix&&(a=n.hostname+" | "+this.correlationId)):s=o.RemoteDependencyDataConstants.TYPE_HTTP;var c={id:t,name:r,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:s,target:a};if(e){for(var l in e)c[l]||(c[l]=e[l]);if(e.properties)for(var l in e.properties)c.properties[l]=e.properties[l]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)e=i.parse(e);else{var n=e;e={},n&&Object.keys(n).forEach(function(t){e[t]=n[t]})}if(e.path){var r=i.parse(e.path);e.pathname=r.pathname,e.search=r.search}e.host&&e.port&&(!i.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host));return e.protocol=e.protocol||t.agent&&t.agent.protocol||void 0,e.hostname=e.hostname||"localhost",i.format(e)},t}(c);e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=[];t.subscriber=function(e){i.forEach(function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",dependencyTypeName:"mongodb"})})},t.enable=function(e,n){e?(0===i.length&&r.channel.subscribe("mongodb",t.subscriber),i.push(n)):0===(i=i.filter(function(e){return e!=n})).length&&r.channel.unsubscribe("mongodb",t.subscriber)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=[];t.subscriber=function(e){i.forEach(function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",dependencyTypeName:"mysql"})})},t.enable=function(e,n){e?(0===i.length&&r.channel.subscribe("mysql",t.subscriber),i.push(n)):0===(i=i.filter(function(e){return e!=n})).length&&r.channel.unsubscribe("mysql",t.subscriber)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=[];t.subscriber=function(e){i.forEach(function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",dependencyTypeName:"redis"})})},t.enable=function(e,n){e?(0===i.length&&r.channel.subscribe("redis",t.subscriber),i.push(n)):0===(i=i.filter(function(e){return e!=n})).length&&r.channel.unsubscribe("redis",t.subscriber)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=[];t.subscriber=function(e){i.forEach(function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",dependencyTypeName:"postgres"})})},t.enable=function(e,n){e?(0===i.length&&r.channel.subscribe("postgres",t.subscriber),i.push(n)):0===(i=i.filter(function(e){return e!=n})).length&&r.channel.unsubscribe("postgres",t.subscriber)}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=n(18),o=n(8),s=n(10),a=n(16),c=n(42),u=n(26),l=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return r(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+i.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+i.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=i.parse(e.url),r=n.pathname,o=n.search;return i.format({protocol:t?"https":"http",host:e.headers.host,pathname:r,search:o})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(s.getCookie(e,n))},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=s.getCorrelationContextTarget(e,a.requestContextSourceKey),e.headers){if(this.correlationContextHeader=e.headers[a.correlationContextHeader],e.headers[a.requestIdHeader])this.parentId=e.headers[a.requestIdHeader],this.requestId=u.generateRequestId(this.parentId),this.correlationContextHeader=e.headers[a.correlationContextHeader];else{var n=e.headers[a.rootIdHeader];this.parentId=e.headers[a.parentIdHeader],this.requestId=u.generateRequestId(n||this.parentId),this.correlationContextHeader=null}t&&(this.requestId=t),this.operationId=u.getRootId(this.requestId)}},t.parseId=function(e){return e.substr(0,e.indexOf("|"))},t.keys=new o.ContextTagKeys,t}(c);e.exports=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=n(135),o=n(43),s=n(23),a=n(4),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?o.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?o.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);e.exports=c},function(e,t,n){"use strict";var r=n(18),i=n(136),o=n(137),s=n(8),a=n(138),c=n(139),u=n(15),l=n(141),d=n(10),p=n(4),h=n(143),f=function(){function e(e){this._telemetryProcessors=[];var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new l(this.config);this.channel=new a(function(){return t.disableAppInsights},function(){return t.maxBatchSize},function(){return t.maxBatchIntervalMs},n)}return e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=h.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString());var r=this.runTelemetryProcessors(n,e.contextObjects);(r=r&&c.samplingTelemetryProcessor(n,{correlationContext:u.CorrelationContextManager.getCurrentContext()}))&&this.channel.send(n)}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=u.CorrelationContextManager.getCurrentContext();for(var i=0;i<r;++i)try{var o=this._telemetryProcessors[i];if(o&&!1===o.apply(null,[e,t])){n=!1;break}}catch(t){n=!0,p.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return n},e}();e.exports=f},function(e,t,n){"use strict";var r=n(26),i=function(){function e(t){var n=this;this.endpointBase="https://dc.services.visualstudio.com",this.instrumentationKey=t||e._getInstrumentationKey(),this.endpointUrl=this.endpointBase+"/v2/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net"],this.setCorrelationId=function(e){return n.correlationId=e},this.profileQueryEndpoint=process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){r.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix,r.queryCorrelationId(this,this.setCorrelationId)},enumerable:!0,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();e.exports=i},function(e,t,n){"use strict";var r=n(13),i=n(11),o=n(5),s=n(8),a=n(4),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=r&&r.hostname(),this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){var t=o.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.sdkVersion=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();e.exports=c},function(e,t,n){"use strict";var r=n(4),i=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;if(!this._isDisabled())if(e){var n=this._stringify(e);"string"==typeof n&&(this._buffer.push(n),this._buffer.length>=this._getBatchSize()?this.triggerSend(!1):!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout(function(){t._timeoutHandle=null,t.triggerSend(!1)},this._getBatchIntervalMs())))}else r.warn("Cannot send null/undefined telemetry")},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;if(!n){var r=this._buffer.join("\n");e?(this._sender.saveOnCrash(r),"function"==typeof t&&t("data saved on crash")):this._sender.send(Buffer.from?Buffer.from(r):new Buffer(r),t)}this._lastSend=+new Date,this._buffer.length=0,clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){r.warn("Failed to serialize payload",t,e)}},e}();e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(140))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8);function i(e){var t=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var n=0;n<e.length;n++)t=((t<<5)+t|0)+e.charCodeAt(n)|0;return(t=t<=-2147483648?2147483647:Math.abs(t))/2147483647*100}t.samplingTelemetryProcessor=function(e,t){var n=e.sampleRate;return null===n||void 0===n||n>=100||!(!e.data||r.TelemetryType.Metric!==r.baseTypeToTelemetryType(e.data.baseType))||(t.correlationContext&&t.correlationContext.operation?i(t.correlationContext.operation.id)<n:100*Math.random()<n)},t.getSamplingHashCode=i},function(e,t,n){"use strict";var r=n(11),i=n(13),o=n(5),s=n(142),a=n(19),c=n(4),u=n(23),l=n(10),d=function(){function e(t,n,i){if(this._config=t,this._onSuccess=n,this._onError=i,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=r.existsSync(e.ICACLS_PATH)}catch(e){}e.OS_PROVIDES_FILE_PROTECTION||c.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,n,r){this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof n&&n>=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,c.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected."))},e.prototype.send=function(t,n){var r=this,i=this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}};s.gzip(t,function(s,a){var d=a;s?(c.warn(s),d=t,o.headers["Content-Length"]=t.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=a.length),c.info(e.TAG,o),o[u.disableCollectionRequestOption]=!0;var p=l.makeRequest(r._config,i,o,function(i){i.setEncoding("utf-8");var o="";i.on("data",function(e){o+=e}),i.on("end",function(){r._numConsecutiveFailures=0,c.info(e.TAG,o),"function"==typeof r._onSuccess&&r._onSuccess(o),"function"==typeof n&&n(o),r._enableDiskRetryMode&&(200===i.statusCode?setTimeout(function(){return r._sendFirstFileOnDisk()},r._resendInterval):408!==i.statusCode&&429!==i.statusCode&&439!==i.statusCode&&500!==i.statusCode&&503!==i.statusCode||r._storeToDisk(t))})});p.on("error",function(i){if(r._numConsecutiveFailures++,!r._enableDiskRetryMode||r._numConsecutiveFailures>0&&r._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var o="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";r._enableDiskRetryMode&&(o="Ingestion endpoint could not be reached "+r._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),c.warn(e.TAG,o,i)}else{o="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";c.info(e.TAG,o,i)}if(r._onErrorHelper(i),"function"==typeof n){var s="error sending telemetry";i&&"function"==typeof i.toString&&(s=i.toString()),n(s)}r._enableDiskRetryMode&&r._storeToDisk(t)}),p.write(d),p.end()})},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(e)},e.prototype._runICACLS=function(t,n){var r=a.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",function(e){return n(e)}),r.on("close",function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))})},e.prototype._runICACLSSync=function(t){if(!a.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=a.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=a.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",function(e){return r+=e}),n.on("error",function(e){return t(e,null)}),n.on("close",function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)})},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(a.spawnSync){var t=a.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity(function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)})})):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;r.lstat(e,function(i,o){i&&"ENOENT"===i.code?r.mkdir(e,function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)}):!i&&o.isDirectory()?n._applyACLRules(e,t):t(i||new Error("Path existed but was not a directory"))})},e.prototype._getShallowDirectorySize=function(e,t){r.readdir(e,function(n,i){if(n)return t(n,-1);var s=null,a=0,c=0;if(0!==i.length)for(var u=0;u<i.length;u++)r.stat(o.join(e,i[u]),function(e,n){c++,e?s=e:n.isFile()&&(a+=n.size),c===i.length&&t(s,s?-1:a)});else t(null,0)})},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=r.readdirSync(e),n=0,i=0;i<t.length;i++)n+=r.statSync(o.join(e,t[i])).size;return n},e.prototype._storeToDisk=function(t){var n=this,s=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);c.info(e.TAG,"Checking existance of data storage directory: "+s),this._confirmDirExists(s,function(i){if(i)return c.warn(e.TAG,"Error while checking/creating directory: "+(i&&i.message)),void n._onErrorHelper(i);n._getShallowDirectorySize(s,function(i,a){if(i||a<0)return c.warn(e.TAG,"Error while checking directory size: "+(i&&i.message)),void n._onErrorHelper(i);if(a>n._maxBytesOnDisk)c.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+a);else{var u=(new Date).getTime()+".ai.json",l=o.join(s,u);c.info(e.TAG,"saving data to disk at: "+l),r.writeFile(l,t,{mode:384},function(e){return n._onErrorHelper(e)})}})})},e.prototype._storeToDiskSync=function(t){var n=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);try{c.info(e.TAG,"Checking existance of data storage directory: "+n),r.existsSync(n)||r.mkdirSync(n),this._applyACLRulesSync(n);var s=this._getShallowDirectorySizeSync(n);if(s>this._maxBytesOnDisk)return void c.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+s);var a=(new Date).getTime()+".ai.json",u=o.join(n,a);c.info(e.TAG,"saving data before crash to disk at: "+u),r.writeFileSync(u,t,{mode:384})}catch(t){c.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var t=this,n=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);r.exists(n,function(e){e&&r.readdir(n,function(e,i){if(e)t._onErrorHelper(e);else if((i=i.filter(function(e){return o.basename(e).indexOf(".ai.json")>-1})).length>0){var s=i[0],a=o.join(n,s);r.readFile(a,function(e,n){e?t._onErrorHelper(e):r.unlink(a,function(e){e?t._onErrorHelper(e):t.send(n)})})}})})},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=5e7,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===i.type(),e}();e.exports=d},function(e,t){e.exports=require("zlib")},function(e,t,n){"use strict";var r=n(8),i=n(10),o=n(15),s=function(){function e(){}return e.createEnvelope=function(t,n,o,s,a){var c=null;switch(n){case r.TelemetryType.Trace:c=e.createTraceData(t);break;case r.TelemetryType.Dependency:c=e.createDependencyData(t);break;case r.TelemetryType.Event:c=e.createEventData(t);break;case r.TelemetryType.Exception:c=e.createExceptionData(t);break;case r.TelemetryType.Request:c=e.createRequestData(t);break;case r.TelemetryType.Metric:c=e.createMetricData(t)}if(o&&r.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var u in o)c.baseData.properties[u]||(c.baseData.properties[u]=o[u]);else c.baseData.properties=o;c.baseData.properties=i.validateStringMap(c.baseData.properties)}var l=a&&a.instrumentationKey||"",d=new r.Envelope;return d.data=c,d.iKey=l,d.name="Microsoft.ApplicationInsights."+l.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,n===r.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new r.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=r.SeverityLevel.Information:t.severityLevel=e.severity;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Trace),n.baseData=t,n},e.createDependencyData=function(e){var t=new r.RemoteDependencyData;t.name=e.name,t.data=e.data,t.target=e.target,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=i.w3cTraceId();var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Dependency),n.baseData=t,n},e.createEventData=function(e){var t=new r.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Event),n.baseData=t,n},e.createExceptionData=function(e){var t=new r.ExceptionData;t.properties=e.properties,t.severityLevel=r.SeverityLevel.Error,t.measurements=e.measurements,t.exceptions=[];var n=e.exception.stack,o=new r.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(n),o.hasFullStack=i.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new r.Data;return s.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new r.RequestData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=i.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Request),n.baseData=t,n},e.createMetricData=function(e){var t=new r.MetricData;t.metrics=[];var n=new r.DataPoint;n.count=isNaN(e.count)?1:e.count,n.kind=r.DataPointType.Aggregation,n.max=isNaN(e.max)?e.value:e.max,n.min=isNaN(e.min)?e.value:e.min,n.name=e.name,n.stdDev=isNaN(e.stdDev)?0:e.stdDev,n.value=e.value,t.metrics.push(n),t.properties=e.properties;var i=new r.Data;return i.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Metric),i.baseData=t,i},e.getTags=function(e,t){var n=o.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var i in e.tags)r[i]=e.tags[i];if(t)for(var i in t)r[i]=t[i];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var s=n[o];if(a.regex.test(s)){var c=new a(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var u=0,l=t.length-1,d=0,p=u,h=l;u<l;){if((d+=t[u].sizeInBytes+t[l].sizeInBytes)>32768){var f=h-p+1;t.splice(p,f);break}p=u,h=l,u++,l--}}return t},e}(),a=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=i.trim(t);var r=t.match(e.regex);r&&r.length>=5&&(this.method=i.trim(r[2])||this.method,this.fileName=i.trim(r[4])||"<no_filename>",this.line=parseInt(r[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,e.baseSize=58,e}();e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomDataPathsFromAllExtensions=t.getCustomDataPathsInAllWorkspaces=void 0;const r=n(5),i=n(0);t.getCustomDataPathsInAllWorkspaces=function(e){const t=[];return e?(e.forEach(e=>{const n=i.workspace.getConfiguration(void 0,e.uri).inspect("html");if(n&&n.workspaceFolderValue&&n.workspaceFolderValue.customData){const i=n.workspaceFolderValue.customData;Array.isArray(i)&&i.forEach(n=>{"string"==typeof n&&t.push(r.resolve(e.uri.fsPath,n))})}}),t):t},t.getCustomDataPathsFromAllExtensions=function(){const e=[];for(const t of i.extensions.all){const n=t.packageJSON&&t.packageJSON.contributes;n&&n.html&&n.html.customData&&Array.isArray(n.html.customData)&&n.html.customData.forEach(n=>{e.push(r.resolve(t.extensionPath,n))})}return e}}]));
  //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/extensions/html-language-features/client/dist/htmlMain.js.map