text: module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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=33)}([function(e,t){e.exports=require("vscode")},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(14);r(n(14),t),r(n(41),t),t.createProtocolConnection=function(e,t,n,i){return o.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const i=n(7);t.RegistrationType=class{constructor(e){this.method=e}};class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class o extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLanguageClient=t.MessageTransports=t.TextDocumentFeature=t.State=t.RevealOutputChannelOn=t.CloseAction=t.ErrorAction=void 0;const i=n(0),r=n(1),o=n(19),s=n(61),a=n(62),c=n(6),u=n(63),l=n(12),d=n(26);class p{error(e){r.RAL().console.error(e)}warn(e){r.RAL().console.warn(e)}info(e){r.RAL().console.info(e)}log(e){r.RAL().console.log(e)}}var f,g,h,m,v;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(f=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(g=t.CloseAction||(t.CloseAction={}));class y{constructor(e,t){this.name=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?f.Continue:f.Shutdown}closed(){if(this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount)return g.Restart;return this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(i.window.showErrorMessage(`The ${this.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted.`),g.DoNotRestart):(this.restarts.shift(),g.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(h=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(m=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"}(v||(v={}));const T=[r.SymbolKind.File,r.SymbolKind.Module,r.SymbolKind.Namespace,r.SymbolKind.Package,r.SymbolKind.Class,r.SymbolKind.Method,r.SymbolKind.Property,r.SymbolKind.Field,r.SymbolKind.Constructor,r.SymbolKind.Enum,r.SymbolKind.Interface,r.SymbolKind.Function,r.SymbolKind.Variable,r.SymbolKind.Constant,r.SymbolKind.String,r.SymbolKind.Number,r.SymbolKind.Boolean,r.SymbolKind.Array,r.SymbolKind.Object,r.SymbolKind.Key,r.SymbolKind.Null,r.SymbolKind.EnumMember,r.SymbolKind.Struct,r.SymbolKind.Event,r.SymbolKind.Operator,r.SymbolKind.TypeParameter],C=[r.CompletionItemKind.Text,r.CompletionItemKind.Method,r.CompletionItemKind.Function,r.CompletionItemKind.Constructor,r.CompletionItemKind.Field,r.CompletionItemKind.Variable,r.CompletionItemKind.Class,r.CompletionItemKind.Interface,r.CompletionItemKind.Module,r.CompletionItemKind.Property,r.CompletionItemKind.Unit,r.CompletionItemKind.Value,r.CompletionItemKind.Enum,r.CompletionItemKind.Keyword,r.CompletionItemKind.Snippet,r.CompletionItemKind.Color,r.CompletionItemKind.File,r.CompletionItemKind.Reference,r.CompletionItemKind.Folder,r.CompletionItemKind.EnumMember,r.CompletionItemKind.Constant,r.CompletionItemKind.Struct,r.CompletionItemKind.Event,r.CompletionItemKind.Operator,r.CompletionItemKind.TypeParameter],R=[r.SymbolTag.Deprecated];function S(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var _,E;!function(e){e.fromConfiguration=function(e){const t=i.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(_||(_={})),function(e){e.is=function(e){let t=e;return t&&c.func(t.register)&&c.func(t.unregister)&&c.func(t.dispose)&&void 0!==t.registrationType}}(E||(E={}));class w{constructor(e,t,n,i,r,o){this._client=e,this._event=t,this._type=n,this._middleware=i,this._createParams=r,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t))return!0;return!1}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(e.id,e.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(i.languages.match(t,e))return{send:e=>{this.callback(e)}}}}class b extends w{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,r.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),w.textDocumentFilter),this._syncedDocuments=t}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return r.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;i.workspace.textDocuments.forEach(e=>{let n=e.uri.toString();if(!this._syncedDocuments.has(n)&&i.languages.match(t,e)){let t=this._client.clientOptions.middleware,i=e=>{this._client.sendNotification(this._type,this._createParams(e))};t.didOpen?t.didOpen(e,i):i(e),this._syncedDocuments.set(n,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class I extends w{constructor(e,t){super(e,i.workspace.onDidCloseTextDocument,r.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),w.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return r.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.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(i.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 x{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get registrationType(){return r.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==r.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{documentSelector:e.registerOptions.documentSelector,syncKind:e.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===r.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===r.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(r.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new u.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(r.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(i.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}}}}class P extends w{constructor(e){super(e,i.workspace.onWillSaveTextDocument,r.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>w.textDocumentFilter(e,t.document))}get registrationType(){return r.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}}class D{constructor(e){this._client=e,this._selectors=new Map}get registrationType(){return r.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(w.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(r.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 N extends w{constructor(e){super(e,i.workspace.onDidSaveTextDocument,r.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),w.textDocumentFilter),this._includeText=!1}get registrationType(){return r.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){S(S(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}}class O{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get registrationType(){return r.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){S(S(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let n of e.registerOptions.watchers){if(!c.string(n.globPattern))continue;let e=!0,o=!0,s=!0;void 0!==n.kind&&null!==n.kind&&(e=0!=(n.kind&r.WatchKind.Create),o=0!=(n.kind&r.WatchKind.Change),s=0!=(n.kind&r.WatchKind.Delete));let a=i.workspace.createFileSystemWatcher(n.globPattern,!e,!o,!s);this.hookListeners(a,e,o,s),t.push(a)}this._watchers.set(e.id,t)}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,i,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Changed}),null,o),i&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.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 k{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[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(r.TextDocumentRegistrationOptions.is(t)){const n=r.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),i=t.documentSelector||e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(c.boolean(t)&&!0===t||r.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=c.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[l.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return c.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&&i.languages.match(n,e))return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}t.TextDocumentFeature=k;class A extends k{constructor(e){super(e,r.CompletionRequest.type)}fillClientCapabilities(e){let t=S(S(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[r.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[r.InsertTextMode.asIs,r.InsertTextMode.adjustIndentation]}},t.completionItemKind={valueSet:C}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.triggerCharacters||[],n={provideCompletionItems:(e,t,n,i)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,i)=>o.sendRequest(r.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,e=>o.handleFailedRequest(r.CompletionRequest.type,e,null));return s.provideCompletionItem?s.provideCompletionItem(e,t,i,n,a):a(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(r.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>n.handleFailedRequest(r.CompletionResolveRequest.type,t,e));return i.resolveCompletionItem?i.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[i.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class L extends k{constructor(e){super(e,r.HoverRequest.type)}fillClientCapabilities(e){const t=S(S(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[r.MarkupKind.Markdown,r.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asHover,e=>i.handleFailedRequest(r.HoverRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[i.languages.registerHoverProvider(e.documentSelector,t),t]}}class F extends k{constructor(e){super(e,r.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=S(S(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then(o.protocol2CodeConverter.asSignatureHelp,e=>o.handleFailedRequest(r.SignatureHelpRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};let n;if(void 0===e.retriggerCharacters){const r=e.triggerCharacters||[];n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,...r)}else{const r={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,r)}return[n,t]}}class M extends k{constructor(e){super(e,r.DefinitionRequest.type)}fillClientCapabilities(e){let t=S(S(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.DefinitionRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class q extends k{constructor(e){super(e,r.ReferencesRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideReferences:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then(o.protocol2CodeConverter.asReferences,e=>o.handleFailedRequest(r.ReferencesRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerReferenceProvider(e.documentSelector,t),t]}}class U extends k{constructor(e){super(e,r.DocumentHighlightRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDocumentHighlights,e=>i.handleFailedRequest(r.DocumentHighlightRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class j extends k{constructor(e){super(e,r.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=S(S(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:T},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:R},t.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return r.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>n.handleFailedRequest(r.DocumentSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}},n=void 0!==e.label?{label:e.label}:void 0;return[i.languages.registerDocumentSymbolProvider(e.documentSelector,t,n),t]}}class H extends class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[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}}{constructor(e){super(e,r.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=S(S(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:T},t.tagSupport={valueSet:R}}initialize(e){e.workspaceSymbolProvider&&this.register({id:l.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>n.handleFailedRequest(r.WorkspaceSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,i):i(e,t)}};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}class W extends k{constructor(e){super(e,r.CodeActionRequest.type)}fillClientCapabilities(e){const t=S(S(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[r.CodeActionKind.Empty,r.CodeActionKind.QuickFix,r.CodeActionKind.Refactor,r.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorRewrite,r.CodeActionKind.Source,r.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!1}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeActions:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(r.CodeActionRequest.type,s,i).then(e=>{if(null===e)return;const t=[];for(let n of e)r.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>o.handleFailedRequest(r.CodeActionRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(r.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeAction(e),t).then(n.protocol2CodeConverter.asCodeAction,t=>n.handleFailedRequest(r.CodeActionResolveRequest.type,t,e));return i.resolveCodeAction?i.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[i.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class K extends k{constructor(e){super(e,r.CodeLensRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"codeLens").dynamicRegistration=!0,S(S(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.CodeLensRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()});const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=new i.EventEmitter,n={onDidChangeCodeLenses:t.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>n.handleFailedRequest(r.CodeLensRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>n.handleFailedRequest(r.CodeLensResolveRequest.type,t,e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(e.documentSelector,n),{provider:n,onDidChangeCodeLensEmitter:t}]}}class V extends k{constructor(e){super(e,r.DocumentFormattingRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,_.fromConfiguration(e))};return i.sendRequest(r.DocumentFormattingRequest.type,o,n).then(i.protocol2CodeConverter.asTextEdits,e=>i.handleFailedRequest(r.DocumentFormattingRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class B extends k{constructor(e){super(e,r.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,_.fromConfiguration(e))};return o.sendRequest(r.DocumentRangeFormattingRequest.type,s,i).then(o.protocol2CodeConverter.asTextEdits,e=>o.handleFailedRequest(r.DocumentRangeFormattingRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class z extends k{constructor(e){super(e,r.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){S(S(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const s=this._client,a=(e,t,n,i,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i,_.fromConfiguration(e))};return s.sendRequest(r.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>s.handleFailedRequest(r.DocumentOnTypeFormattingRequest.type,e,null))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,i,o,a):a(e,t,n,i,o)}},n=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class G extends k{constructor(e){super(e,r.RenameRequest.type)}fillClientCapabilities(e){let t=S(S(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=r.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(c.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:l.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t={provideRenameEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(r.RenameRequest.type,s,i).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>o.handleFailedRequest(r.RenameRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{let o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(r.PrepareRenameRequest.type,o,n).then(e=>r.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&r.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>i.handleFailedRequest(r.PrepareRenameRequest.type,e,void 0))},s=i.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[i.languages.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){const t=e;return t&&c.boolean(t.defaultBehavior)}}class $ extends k{constructor(e){super(e,r.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=S(S(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>n.handleFailedRequest(r.DocumentLinkRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(r.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>n.handleFailedRequest(r.DocumentLinkResolveRequest.type,t,e));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class Y{constructor(e){this._client=e,this._listeners=new Map}get registrationType(){return r.DidChangeConfigurationNotification.type}fillClientCapabilities(e){S(S(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register({id:l.generateUuid(),registerOptions:{section:e}})}register(e){let t=i.workspace.onDidChangeConfiguration(t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)});this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.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(n=c.string(e)?[e]:e,void 0!==n&&void 0!==t){if(!n.some(e=>t.affectsConfiguration(e)))return}let i=e=>{void 0!==e?this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,i):i(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s],c=a.indexOf("."),u=null;if(u=c>=0?i.workspace.getConfiguration(a.substr(0,c),n).get(a.substr(c+1)):i.workspace.getConfiguration(void 0,n).get(a),u){let n=e[s].split(".");t(r,n)[n[n.length-1]]=o.toJSONObject(u)}}return r}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class X{constructor(e){this._client=e,this._commands=new Map}get registrationType(){return r.ExecuteCommandRequest.type}fillClientCapabilities(e){S(S(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.clientOptions.middleware,o=(e,n)=>{let i={command:e,arguments:n};return t.sendRequest(r.ExecuteCommandRequest.type,i).then(void 0,e=>t.handleFailedRequest(r.ExecuteCommandRequest.type,e,void 0))};if(e.registerOptions.commands){const t=[];for(const r of e.registerOptions.commands)t.push(i.commands.registerCommand(r,(...e)=>n.executeCommand?n.executeCommand(r,e,o):o(r,e)));this._commands.set(e.id,t)}}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&&r.MessageReader.is(e.reader)&&r.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class J{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)}}class Q{constructor(e,t,n){var i;this._traceFormat=r.TraceFormat.Text,this._features=[],this._dynamicFeatures=new Map,this._id=e,this._name=t;const o={isTrusted:!1};void 0!==(n=n||{}).markdown&&!0===n.markdown.isTrusted&&(o.isTrusted=!0),this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||h.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||this.createDefaultErrorHandler(null===(i=n.connectionOptions)||void 0===i?void 0:i.maxRestartCount),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:o},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=v.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 u.Delayer(250),this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new J(e,t)}),this._onStop=void 0,this._telemetryEmitter=new r.Emitter,this._stateChangeEmitter=new r.Emitter,this._trace=r.Trace.Off,this._tracer={log:(e,t)=>{c.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=s.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=a.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted),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===v.Running?m.Running:this.state===v.Starting?m.Starting:m.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 ${c.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${c.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 ${c.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${c.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{if(r.WorkDoneProgress.is(e)){const i=this._clientOptions.middleware.handleWorkDoneProgress;if(void 0!==i)return this._resolvedConnection.onProgress(e,t,e=>{i(t,e,()=>n(e))})}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=i.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(e){if(void 0!==e&&e<0)throw new Error("Invalid maxRestartCount: "+e);return new y(this._name,null!=e?e:4)}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 r.ResponseError){const t=e;return`  Message: ${t.message}\n  Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?c.string(e.stack)?e.stack:e.message:c.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<=h.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<=h.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<=h.Error&&this.showNotificationMessage()}showNotificationMessage(){i.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===v.Initial||this.state===v.Stopping||this.state===v.Stopped}needsStop(){return this.state===v.Starting||this.state===v.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===v.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new J(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection()),this.state=v.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case r.MessageType.Error:this.error(e.message,void 0,!1);break;case r.MessageType.Warning:this.warn(e.message,void 0,!1);break;case r.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case r.MessageType.Error:i.window.showErrorMessage(e.message);break;case r.MessageType.Warning:i.window.showWarningMessage(e.message);break;case r.MessageType.Info:i.window.showInformationMessage(e.message);break;default:i.window.showInformationMessage(e.message)}}),e.onRequest(r.ShowMessageRequest.type,e=>{let t;switch(e.type){case r.MessageType.Error:t=i.window.showErrorMessage;break;case r.MessageType.Warning:t=i.window.showWarningMessage;break;case r.MessageType.Info:t=i.window.showInformationMessage;break;default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.onRequest(r.ShowDocumentRequest.type,async e=>{var t;const n=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external){return{success:await i.env.openExternal(t)}}{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await i.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!0}}},r=null===(t=this._clientOptions.middleware.window)||void 0===t?void 0:t.showDocument;return void 0!==r?r(e,n):n(e)}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=v.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),i.window.showErrorMessage("Couldn't start client "+this._name)}),new i.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:null,clientInfo:{name:i.env.appName,version:i.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(i.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:c.func(t)?t():t,trace:r.Trace.toString(this._trace),workspaceFolders:null};if(this.fillInitializeParams(o),this._clientOptions.progressOnInitialization){const t=l.generateUuid(),n=new d.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=v.Running;let n=void 0;return c.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===r.TextDocumentSyncKind.None?{openClose:!1,change:r.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(r.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(r.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(r.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(r.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 r.ResponseError&&t.data&&t.data.retry?i.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&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=i.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===v.Stopping&&this._onStop?this._onStop:(this.state=v.Stopping,this.cleanUp(!1),this._onStop=this.resolveConnection().then(e=>e.shutdown().then(()=>{e.exit(),e.end(),e.dispose(),this.state=v.Stopped,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))):(this.state=v.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(const e of this._features.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;const n=this;function i(e){n._fileEvents.push(e),n._fileEventDelayer.trigger(()=>{n.onReady().then(()=>{n.resolveConnection().then(e=>{n.isConnectionActive()&&(n.forceDocumentSync(),e.didChangeWatchedFiles({changes:n._fileEvents})),n._fileEvents=[]})},e=>{n.error("Notify file events failed.",e)})})}const r=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null==r?void 0:r.didChangeWatchedFile)?r.didChangeWatchedFile(e,i):i(e)}forceDocumentSync(){void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(r.DidChangeTextDocumentNotification.type.method)),this._didChangeTextDocumentFeature.forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),i=this.clientOptions.middleware;i.handleDiagnostics?i.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,i,o){let s=new p,a=r.createProtocolConnection(e,t,s,o);return a.onError(e=>{n(e[0],e[1],e[2])}),a.onClose(i),{listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(c.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(c.string(e)?e:e.method,t),sendNotification:(e,t)=>a.sendNotification(c.string(e)?e:e.method,t),onNotification:(e,t)=>a.onNotification(c.string(e)?e:e.method,t),onProgress:a.onProgress,sendProgress:a.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:r.TraceFormat.Text};void 0===n?a.trace(e,t,i):(c.boolean(n),a.trace(e,t,n))},initialize:e=>a.sendRequest(r.InitializeRequest.type,e),shutdown:()=>a.sendRequest(r.ShutdownRequest.type,void 0),exit:()=>a.sendNotification(r.ExitNotification.type),onLogMessage:e=>a.onNotification(r.LogMessageNotification.type,e),onShowMessage:e=>a.onNotification(r.ShowMessageNotification.type,e),onTelemetry:e=>a.onNotification(r.TelemetryEventNotification.type,e),didChangeConfiguration:e=>a.sendNotification(r.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>a.sendNotification(r.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>a.sendNotification(r.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>a.sendNotification(r.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>a.sendNotification(r.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>a.sendNotification(r.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>a.onNotification(r.PublishDiagnosticsNotification.type,e),end:()=>a.end(),dispose:()=>a.dispose()}}(n.reader,n.writer,e,t,this._clientOptions.connectionOptions))}handleConnectionClosed(){if(this.state===v.Stopping||this.state===v.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=g.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===g.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state===v.Starting?(this._onReadyCallbacks.reject(new Error("Connection to server got closed. Server will not be restarted.")),this.state=v.StartFailed):this.state=v.Stopped,this.cleanUp(!1,!0)):e===g.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=v.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===f.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){i.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=i.workspace.getConfiguration(this._id),o=r.Trace.Off,s=r.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=r.Trace.fromString(e):(o=r.Trace.fromString(n.get("trace.server.verbosity","off")),s=r.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=c.array(n)?n:[n],t&&this._dynamicFeatures.get(r.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),E.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){this.registerFeature(new Y(this)),this.registerFeature(new b(this,this._syncedDocuments)),this.registerFeature(new x(this)),this.registerFeature(new P(this)),this.registerFeature(new D(this)),this.registerFeature(new N(this)),this.registerFeature(new I(this,this._syncedDocuments)),this.registerFeature(new O(this,e=>this.notifyFileEvent(e))),this.registerFeature(new A(this)),this.registerFeature(new L(this)),this.registerFeature(new F(this)),this.registerFeature(new M(this)),this.registerFeature(new q(this)),this.registerFeature(new U(this)),this.registerFeature(new j(this)),this.registerFeature(new H(this)),this.registerFeature(new W(this)),this.registerFeature(new K(this)),this.registerFeature(new V(this)),this.registerFeature(new B(this)),this.registerFeature(new z(this)),this.registerFeature(new G(this)),this.registerFeature(new $(this)),this.registerFeature(new X(this))}fillInitializeParams(e){for(let t of this._features)c.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};S(e,"workspace").applyEdit=!0;const t=S(S(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[r.ResourceOperationKind.Create,r.ResourceOperationKind.Rename,r.ResourceOperationKind.Delete],t.failureHandling=r.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=S(S(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[r.DiagnosticTag.Unnecessary,r.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const i=S(e,"window");S(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0};S(i,"showDocument").support=!0;const o=S(e,"general");o.regularExpressions={engine:"ECMAScript",version:"ES2020"},o.markdown={parser:"marked",version:"1.1.0"};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(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const i=t.registerOptions||{};i.documentSelector=i.documentSelector||this._clientOptions.documentSelector;const r={id:t.id,registerOptions:i};try{e.register(r)}catch(e){return void n(e)}}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;i.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(r.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}):c.asPromise(i.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}handleFailedRequest(e,t,n){if(t instanceof r.ResponseError){if(t.code===r.LSPErrorCodes.RequestCancelled)throw this.makeCancelError();if(t.code===r.LSPErrorCodes.ContentModified)return n}throw this.error(`Request ${e.method} failed.`,t),t}makeCancelError(){const e=new Error(Q.Canceled);return e.name=Q.Canceled,e}}t.BaseLanguageClient=Q,Q.Canceled="Canceled"},function(e,t,n){"use strict";let i;function r(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(4);!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)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,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[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(r[o],e))}catch(e){i.default().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),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=o,o._noop=function(){}},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&r(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>i(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";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;n(34).default.install();const o=n(16);r(n(16),t);class s extends o.AbstractMessageReader{constructor(e){super(),this._onData=new o.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=s;class a extends o.AbstractMessageWriter{constructor(e){super(),this.context=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.context.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,i){return void 0===n&&(n=o.NullLogger),o.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),o.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,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=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||l||a(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){(function(e){function n(e,t){for(var n=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i<e.length;i++)t(e[i],i,e)&&n.push(e[i]);return n}t.resolve=function(){for(var t="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,r="/"===s.charAt(0))}return(r?"/":"")+(t=n(i(t.split("/"),(function(e){return!!e})),!r).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===r(e,-1);return(e=n(i(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var r=i(e.split("/")),o=i(n.split("/")),s=Math.min(r.length,o.length),a=s,c=0;c<s;c++)if(r[c]!==o[c]){a=c;break}var u=[];for(c=a;c<r.length;c++)u.push("..");return(u=u.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!r){i=o;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"/":e.slice(0,i)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,i=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){n=t+1;break}}else-1===i&&(r=!1,i=t+1);return-1===i?"":e.slice(n,i)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,i=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===i&&(r=!1,i=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(9))},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClient=void 0;const o=n(13),s=n(27);r(n(27),t),r(n(13),t);class a extends o.CommonLanguageClient{constructor(e,t,n,i){super(e,t,n),this.worker=i}createMessageTransports(e){const t=new s.BrowserMessageReader(this.worker),n=new s.BrowserMessageWriter(this.worker);return Promise.resolve({reader:t,writer:n})}getLocale(){return"en"}}t.LanguageClient=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class i{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends i{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new i("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 i(e)},t.generateUuid=function(){return o().asHex()}},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1),t),r(n(3),t),r(n(64),t)},function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const i=n(17);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const r=n(15);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const o=n(5);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(18);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=n(36);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=n(37);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const u=n(39);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return u.CancellationStrategy}});const l=n(4);t.RAL=l.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(8);var r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(r=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:r.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){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class a{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=a;t.RequestType0=class extends a{constructor(e){super(e,0)}};t.RequestType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends a{constructor(e){super(e,2)}};t.RequestType3=class extends a{constructor(e){super(e,3)}};t.RequestType4=class extends a{constructor(e){super(e,4)}};t.RequestType5=class extends a{constructor(e){super(e,5)}};t.RequestType6=class extends a{constructor(e){super(e,6)}};t.RequestType7=class extends a{constructor(e){super(e,7)}};t.RequestType8=class extends a{constructor(e){super(e,8)}};t.RequestType9=class extends a{constructor(e){super(e,9)}};t.NotificationType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends a{constructor(e){super(e,0)}};t.NotificationType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends a{constructor(e){super(e,2)}};t.NotificationType3=class extends a{constructor(e){super(e,3)}};t.NotificationType4=class extends a{constructor(e){super(e,4)}};t.NotificationType5=class extends a{constructor(e){super(e,5)}};t.NotificationType6=class extends a{constructor(e){super(e,6)}};t.NotificationType7=class extends a{constructor(e){super(e,7)}};t.NotificationType8=class extends a{constructor(e){super(e,8)}};t.NotificationType9=class extends a{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(4),r=n(8),o=n(5);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=i.default().timer.setTimeout(e.bind(t),0);return{dispose(){i.default().timer.clearTimeout(n)}}}));class c{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?a:(this._emitter||(this._emitter=new o.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 c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toJSONObject=t.ConfigurationFeature=void 0;const i=n(0),r=n(1);function o(e){if(e){if(Array.isArray(e))return e.map(o);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=o(e[n]));return t}}return e}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(r.ConfigurationRequest.type,(t,n)=>{let i=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},r=e.clientOptions.middleware.workspace;return r&&r.configuration?r.configuration(t,n,i):i(t)})}getConfiguration(e,t){let n=null;if(t){let r=t.lastIndexOf(".");if(-1===r)n=o(i.workspace.getConfiguration(void 0,e).get(t));else{let s=i.workspace.getConfiguration(t.substr(0,r),e);s&&(n=o(s.get(t.substr(r+1))))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=o(t.get(e)))}return void 0===n&&(n=null),n}dispose(){}},t.toJSONObject=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CompletionItem{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CodeLens{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const i=n(0),r=n(6);!function(e){e.is=function(e){const t=e;return null!=t&&(r.number(t.value)||r.string(t.value))&&r.string(t.target)}}(t.DiagnosticCode||(t.DiagnosticCode={}));class o extends i.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CallHierarchyItem{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r,o),void 0!==s&&(this.data=s)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const i=n(0),r=n(1),o=n(6);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(r.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}})}begin(e){i.window.withProgress({location:i.ProgressLocation.Window,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(r.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";e.exports=n(1)},function(e,t,n){"use strict";(function(e){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};function o(){return"1"===e.env.VSC_PYTHON_UNIT_TEST}Object.defineProperty(t,"__esModule",{value:!0}),t.UseProposedApi=t.isUnitTestExecution=t.isTestExecution=t.isCI=t.STANDARD_OUTPUT_CHANNEL=t.DEFAULT_INTERPRETER_SETTING=t.Octicons=t.Commands=t.CommandSource=t.AppinsightsKey=t.JUPYTER_EXTENSION_ID=t.PYLANCE_EXTENSION_ID=t.CODE_RUNNER_EXTENSION_ID=t.PVSC_EXTENSION_ID=t.PYTHON_NOTEBOOKS=t.PYTHON=t.InteractiveScheme=t.InteractiveInputScheme=t.NotebookCellScheme=t.PYTHON_WARNINGS=t.PYTHON_LANGUAGE=void 0,t.PYTHON_LANGUAGE="python",t.PYTHON_WARNINGS="PYTHONWARNINGS",t.NotebookCellScheme="vscode-notebook-cell",t.InteractiveInputScheme="vscode-interactive-input",t.InteractiveScheme="vscode-interactive",t.PYTHON=[{scheme:"file",language:t.PYTHON_LANGUAGE},{scheme:"untitled",language:t.PYTHON_LANGUAGE},{scheme:"vscode-notebook",language:t.PYTHON_LANGUAGE},{scheme:t.NotebookCellScheme,language:t.PYTHON_LANGUAGE},{scheme:t.InteractiveInputScheme,language:t.PYTHON_LANGUAGE}],t.PYTHON_NOTEBOOKS=[{scheme:"vscode-notebook",language:t.PYTHON_LANGUAGE},{scheme:t.NotebookCellScheme,language:t.PYTHON_LANGUAGE},{scheme:t.InteractiveInputScheme,language:t.PYTHON_LANGUAGE}],t.PVSC_EXTENSION_ID="ms-python.python",t.CODE_RUNNER_EXTENSION_ID="formulahendry.code-runner",t.PYLANCE_EXTENSION_ID="ms-python.vscode-pylance",t.JUPYTER_EXTENSION_ID="ms-toolsai.jupyter",t.AppinsightsKey="AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",function(e){e.ui="ui",e.commandPalette="commandpalette"}(t.CommandSource||(t.CommandSource={})),function(e){e.Set_Interpreter="python.setInterpreter",e.Set_ShebangInterpreter="python.setShebangInterpreter",e.Exec_In_Terminal="python.execInTerminal",e.Exec_In_Terminal_Icon="python.execInTerminal-icon",e.Debug_In_Terminal="python.debugInTerminal",e.Exec_Selection_In_Terminal="python.execSelectionInTerminal",e.Exec_Selection_In_Django_Shell="python.execSelectionInDjangoShell",e.Tests_Configure="python.configureTests",e.Test_Refresh="python.refreshTests",e.Test_Refreshing="python.refreshingTests",e.Test_Stop_Refreshing="python.stopRefreshingTests",e.Sort_Imports="python.sortImports",e.ViewOutput="python.viewOutput",e.Start_REPL="python.startREPL",e.Create_Terminal="python.createTerminal",e.Set_Linter="python.setLinter",e.Enable_Linter="python.enableLinting",e.Run_Linter="python.runLinting",e.Enable_SourceMap_Support="python.enableSourceMapSupport",e.SwitchOffInsidersChannel="python.switchOffInsidersChannel",e.SwitchToInsidersDaily="python.switchToDailyChannel",e.SwitchToInsidersWeekly="python.switchToWeeklyChannel",e.PickLocalProcess="python.pickLocalProcess",e.GetSelectedInterpreterPath="python.interpreterPath",e.ClearStorage="python.clearPersistentStorage",e.ClearWorkspaceInterpreter="python.clearWorkspaceInterpreter",e.LaunchTensorBoard="python.launchTensorBoard",e.RefreshTensorBoard="python.refreshTensorBoard",e.ReportIssue="python.reportIssue"}(t.Commands||(t.Commands={})),function(e){e.Add="$(add)",e.Test_Pass="$(check)",e.Test_Fail="$(alert)",e.Test_Error="$(x)",e.Test_Skip="$(circle-slash)",e.Downloading="$(cloud-download)",e.Installing="$(desktop-download)",e.Search_Stop="$(search-stop)",e.Star="$(star-full)",e.Gear="$(gear)"}(t.Octicons||(t.Octicons={})),t.DEFAULT_INTERPRETER_SETTING="python",t.STANDARD_OUTPUT_CHANNEL="STANDARD_OUTPUT_CHANNEL",t.isCI="true"===e.env.TRAVIS||void 0!==e.env.TF_BUILD,t.isTestExecution=function(){return"1"===e.env.VSC_PYTHON_CI_TEST||o()},t.isUnitTestExecution=o,t.UseProposedApi=Symbol("USE_VSC_PROPOSED_API"),r(n(29),t)}).call(this,n(9))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.HiddenFilePrefix=t.EXTENSION_ROOT_DIR=void 0;const i=n(10),r=i.basename(e);t.EXTENSION_ROOT_DIR="client"===r?i.join(e,"..",".."):i.join(e,"..","..","..",".."),t.HiddenFilePrefix="_HiddenFile_"}).call(this,"/")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrors=t.EventName=void 0,function(e){e.FORMAT_SORT_IMPORTS="FORMAT.SORT_IMPORTS",e.FORMAT="FORMAT.FORMAT",e.FORMAT_ON_TYPE="FORMAT.FORMAT_ON_TYPE",e.EDITOR_LOAD="EDITOR.LOAD",e.LINTING="LINTING",e.REPL="REPL",e.SELECT_INTERPRETER="SELECT_INTERPRETER",e.SELECT_INTERPRETER_ENTER_BUTTON="SELECT_INTERPRETER_ENTER_BUTTON",e.SELECT_INTERPRETER_ENTER_CHOICE="SELECT_INTERPRETER_ENTER_CHOICE",e.SELECT_INTERPRETER_SELECTED="SELECT_INTERPRETER_SELECTED",e.SELECT_INTERPRETER_ENTER_OR_FIND="SELECT_INTERPRETER_ENTER_OR_FIND",e.SELECT_INTERPRETER_ENTERED_EXISTS="SELECT_INTERPRETER_ENTERED_EXISTS",e.PYTHON_INTERPRETER="PYTHON_INTERPRETER",e.PYTHON_INSTALL_PACKAGE="PYTHON_INSTALL_PACKAGE",e.PYTHON_INTERPRETER_DISCOVERY="PYTHON_INTERPRETER_DISCOVERY",e.PYTHON_INTERPRETER_AUTO_SELECTION="PYTHON_INTERPRETER_AUTO_SELECTION",e.PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES="PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES",e.PYTHON_INTERPRETER_ACTIVATION_FOR_RUNNING_CODE="PYTHON_INTERPRETER_ACTIVATION_FOR_RUNNING_CODE",e.PYTHON_INTERPRETER_ACTIVATION_FOR_TERMINAL="PYTHON_INTERPRETER_ACTIVATION_FOR_TERMINAL",e.PIPENV_INTERPRETER_DISCOVERY="PIPENV_INTERPRETER_DISCOVERY",e.TERMINAL_SHELL_IDENTIFICATION="TERMINAL_SHELL_IDENTIFICATION",e.PYTHON_INTERPRETER_ACTIVATE_ENVIRONMENT_PROMPT="PYTHON_INTERPRETER_ACTIVATE_ENVIRONMENT_PROMPT",e.PYTHON_NOT_INSTALLED_PROMPT="PYTHON_NOT_INSTALLED_PROMPT",e.CONDA_INHERIT_ENV_PROMPT="CONDA_INHERIT_ENV_PROMPT",e.INSIDERS_RELOAD_PROMPT="INSIDERS_RELOAD_PROMPT",e.INSIDERS_PROMPT="INSIDERS_PROMPT",e.ENVFILE_VARIABLE_SUBSTITUTION="ENVFILE_VARIABLE_SUBSTITUTION",e.ENVFILE_WORKSPACE="ENVFILE_WORKSPACE",e.EXECUTION_CODE="EXECUTION_CODE",e.EXECUTION_DJANGO="EXECUTION_DJANGO",e.DEBUG_IN_TERMINAL_BUTTON="DEBUG.IN_TERMINAL",e.DEBUG_ADAPTER_USING_WHEELS_PATH="DEBUG_ADAPTER.USING_WHEELS_PATH",e.DEBUG_SESSION_ERROR="DEBUG_SESSION.ERROR",e.DEBUG_SESSION_START="DEBUG_SESSION.START",e.DEBUG_SESSION_STOP="DEBUG_SESSION.STOP",e.DEBUG_SESSION_USER_CODE_RUNNING="DEBUG_SESSION.USER_CODE_RUNNING",e.DEBUGGER="DEBUGGER",e.DEBUGGER_ATTACH_TO_CHILD_PROCESS="DEBUGGER.ATTACH_TO_CHILD_PROCESS",e.DEBUGGER_ATTACH_TO_LOCAL_PROCESS="DEBUGGER.ATTACH_TO_LOCAL_PROCESS",e.DEBUGGER_CONFIGURATION_PROMPTS="DEBUGGER.CONFIGURATION.PROMPTS",e.DEBUGGER_CONFIGURATION_PROMPTS_IN_LAUNCH_JSON="DEBUGGER.CONFIGURATION.PROMPTS.IN.LAUNCH.JSON",e.UNITTEST_CONFIGURING="UNITTEST.CONFIGURING",e.UNITTEST_CONFIGURE="UNITTEST.CONFIGURE",e.UNITTEST_DISCOVERY_TRIGGER="UNITTEST.DISCOVERY.TRIGGER",e.UNITTEST_DISCOVERING="UNITTEST.DISCOVERING",e.UNITTEST_DISCOVERING_STOP="UNITTEST.DISCOVERY.STOP",e.UNITTEST_DISCOVERY_DONE="UNITTEST.DISCOVERY.DONE",e.UNITTEST_RUN_STOP="UNITTEST.RUN.STOP",e.UNITTEST_RUN="UNITTEST.RUN",e.UNITTEST_RUN_ALL_FAILED="UNITTEST.RUN_ALL_FAILED",e.UNITTEST_DISABLED="UNITTEST.DISABLED",e.PYTHON_EXPERIMENTS_INIT_PERFORMANCE="PYTHON_EXPERIMENTS_INIT_PERFORMANCE",e.PYTHON_EXPERIMENTS_OPT_IN_OPT_OUT_SETTINGS="PYTHON_EXPERIMENTS_OPT_IN_OPT_OUT_SETTINGS",e.EXTENSION_SURVEY_PROMPT="EXTENSION_SURVEY_PROMPT",e.JOIN_MAILING_LIST_PROMPT_DISPLAYED="JOIN_MAILING_LIST_PROMPT_DISPLAYED",e.JOIN_MAILING_LIST_PROMPT="JOIN_MAILING_LIST_PROMPT",e.PYTHON_LANGUAGE_SERVER_STARTUP_DURATION="PYTHON_LANGUAGE_SERVER_STARTUP_DURATION",e.PYTHON_LANGUAGE_SERVER_CURRENT_SELECTION="PYTHON_LANGUAGE_SERVER_CURRENT_SELECTION",e.PYTHON_LANGUAGE_SERVER_LIST_BLOB_STORE_PACKAGES="PYTHON_LANGUAGE_SERVER.LIST_BLOB_PACKAGES",e.PYTHON_LANGUAGE_SERVER_EXTRACTED="PYTHON_LANGUAGE_SERVER.EXTRACTED",e.PYTHON_LANGUAGE_SERVER_DOWNLOADED="PYTHON_LANGUAGE_SERVER.DOWNLOADED",e.PYTHON_LANGUAGE_SERVER_ERROR="PYTHON_LANGUAGE_SERVER.ERROR",e.PYTHON_LANGUAGE_SERVER_PLATFORM_SUPPORTED="PYTHON_LANGUAGE_SERVER.PLATFORM_SUPPORTED",e.PYTHON_LANGUAGE_SERVER_ENABLED="PYTHON_LANGUAGE_SERVER.ENABLED",e.PYTHON_LANGUAGE_SERVER_STARTUP="PYTHON_LANGUAGE_SERVER.STARTUP",e.PYTHON_LANGUAGE_SERVER_READY="PYTHON_LANGUAGE_SERVER.READY",e.PYTHON_LANGUAGE_SERVER_TELEMETRY="PYTHON_LANGUAGE_SERVER.EVENT",e.LANGUAGE_SERVER_ENABLED="LANGUAGE_SERVER.ENABLED",e.LANGUAGE_SERVER_STARTUP="LANGUAGE_SERVER.STARTUP",e.LANGUAGE_SERVER_READY="LANGUAGE_SERVER.READY",e.LANGUAGE_SERVER_TELEMETRY="LANGUAGE_SERVER.EVENT",e.LANGUAGE_SERVER_REQUEST="LANGUAGE_SERVER.REQUEST",e.TERMINAL_CREATE="TERMINAL.CREATE",e.ACTIVATE_ENV_IN_CURRENT_TERMINAL="ACTIVATE_ENV_IN_CURRENT_TERMINAL",e.ACTIVATE_ENV_TO_GET_ENV_VARS_FAILED="ACTIVATE_ENV_TO_GET_ENV_VARS_FAILED",e.DIAGNOSTICS_ACTION="DIAGNOSTICS.ACTION",e.DIAGNOSTICS_MESSAGE="DIAGNOSTICS.MESSAGE",e.PLATFORM_INFO="PLATFORM.INFO",e.SELECT_LINTER="LINTING.SELECT",e.USE_REPORT_ISSUE_COMMAND="USE_REPORT_ISSUE_COMMAND",e.LINTER_NOT_INSTALLED_PROMPT="LINTER_NOT_INSTALLED_PROMPT",e.LINTER_INSTALL_PROMPT="LINTER_INSTALL_PROMPT",e.HASHED_PACKAGE_NAME="HASHED_PACKAGE_NAME",e.HASHED_PACKAGE_PERF="HASHED_PACKAGE_PERF",e.JEDI_LANGUAGE_SERVER_ENABLED="JEDI_LANGUAGE_SERVER.ENABLED",e.JEDI_LANGUAGE_SERVER_STARTUP="JEDI_LANGUAGE_SERVER.STARTUP",e.JEDI_LANGUAGE_SERVER_READY="JEDI_LANGUAGE_SERVER.READY",e.JEDI_LANGUAGE_SERVER_REQUEST="JEDI_LANGUAGE_SERVER.REQUEST",e.TENSORBOARD_SESSION_LAUNCH="TENSORBOARD.SESSION_LAUNCH",e.TENSORBOARD_SESSION_DURATION="TENSORBOARD.SESSION_DURATION",e.TENSORBOARD_SESSION_DAEMON_STARTUP_DURATION="TENSORBOARD.SESSION_DAEMON_STARTUP_DURATION",e.TENSORBOARD_LAUNCH_PROMPT_SELECTION="TENSORBOARD.LAUNCH_PROMPT_SELECTION",e.TENSORBOARD_SESSION_E2E_STARTUP_DURATION="TENSORBOARD.SESSION_E2E_STARTUP_DURATION",e.TENSORBOARD_ENTRYPOINT_SHOWN="TENSORBOARD.ENTRYPOINT_SHOWN",e.TENSORBOARD_INSTALL_PROMPT_SHOWN="TENSORBOARD.INSTALL_PROMPT_SHOWN",e.TENSORBOARD_INSTALL_PROMPT_SELECTION="TENSORBOARD.INSTALL_PROMPT_SELECTION",e.TENSORBOARD_DETECTED_IN_INTEGRATED_TERMINAL="TENSORBOARD_DETECTED_IN_INTEGRATED_TERMINAL",e.TENSORBOARD_PACKAGE_INSTALL_RESULT="TENSORBOARD.PACKAGE_INSTALL_RESULT",e.TENSORBOARD_TORCH_PROFILER_IMPORT="TENSORBOARD.TORCH_PROFILER_IMPORT",e.TENSORBOARD_JUMP_TO_SOURCE_REQUEST="TENSORBOARD_JUMP_TO_SOURCE_REQUEST",e.TENSORBOARD_JUMP_TO_SOURCE_FILE_NOT_FOUND="TENSORBOARD_JUMP_TO_SOURCE_FILE_NOT_FOUND"}(t.EventName||(t.EventName={})),function(e){e.FailedToParseVersion="FailedToParseVersion",e.FailedToDetermineOS="FailedToDetermineOS"}(t.PlatformErrors||(t.PlatformErrors={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionSingleActivationService=t.ILanguageServerOutputChannel=t.ILanguageServerProxy=t.ILanguageServerManager=t.ILanguageServerAnalysisOptions=t.ILanguageClientFactory=t.ILanguageServerFolderService=t.ILanguageServerCache=t.ILanguageServerActivator=t.LanguageServerType=t.IExtensionActivationService=t.IExtensionActivationManager=void 0,t.IExtensionActivationManager=Symbol("IExtensionActivationManager"),t.IExtensionActivationService=Symbol("IExtensionActivationService"),function(e){e.Jedi="Jedi",e.JediLSP="JediLSP",e.Microsoft="Microsoft",e.Node="Pylance",e.None="None"}(t.LanguageServerType||(t.LanguageServerType={})),t.ILanguageServerActivator=Symbol("ILanguageServerActivator"),t.ILanguageServerCache=Symbol("ILanguageServerCache"),t.ILanguageServerFolderService=Symbol("ILanguageServerFolderService"),t.ILanguageClientFactory=Symbol("ILanguageClientFactory"),t.ILanguageServerAnalysisOptions=Symbol("ILanguageServerAnalysisOptions"),t.ILanguageServerManager=Symbol("ILanguageServerManager"),t.ILanguageServerProxy=Symbol("ILanguageServerProxy"),t.ILanguageServerOutputChannel=Symbol("ILanguageServerOutputChannel"),t.IExtensionSingleActivationService=Symbol("IExtensionSingleActivationService")},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.loadLocalizedStringsForBrowser=t.loadLocalizedStringsUsingNodeFS=t.getLocalizedString=t.shouldLoadUsingNodeFS=t._getAskedForCollection=t._resetCollections=void 0;const i=n(0),r=n(10),o=n(29);let s,a,c,u={};function l(){try{if(null===navigator||void 0===navigator?void 0:navigator.language)return navigator.language.toLowerCase()}catch(e){}const t=e.env.VSCODE_NLS_CONFIG;return t?JSON.parse(t).locale:"en-us"}async function d(e){try{const t=e?`package.nls.${e}.json`:"package.nls.json",n=i.Uri.joinPath(i.Uri.file(o.EXTENSION_ROOT_DIR),t),r=await i.workspace.fs.readFile(n),s=(new TextDecoder).decode(r);return JSON.parse(s)}catch(e){return{}}}t._resetCollections=function(){c="",s=void 0,u={}},t._getAskedForCollection=function(){return u},t.shouldLoadUsingNodeFS=function(){return!s||l()!==c},t.getLocalizedString=function(e,t){let n=a;if(s&&s.hasOwnProperty(e)&&(n=s),void 0===n)throw new Error("Localizations haven't been loaded yet for key: "+e);let i=n[e];return!i&&t&&(i=t),u[e]=i,i},t.loadLocalizedStringsUsingNodeFS=function(e){c=l();const t=r.join(o.EXTENSION_ROOT_DIR,`package.nls.${c}.json`);if(e.fileExistsSync(t)){const n=e.readFileSync(t);s=JSON.parse(n)}else s={};if(!a){const t=r.join(o.EXTENSION_ROOT_DIR,"package.nls.json");if(e.fileExistsSync(t)){const n=e.readFileSync(t);a=JSON.parse(n)}else a={}}},t.loadLocalizedStringsForBrowser=async function(){c=l(),s=await d(c),a||(a=await d())}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.activate=void 0;const i=n(0),r=n(11),o=n(81),s=n(82),a=n(31),c=n(28),u=n(32),l=n(30),d=n(87);async function p(e,t){const n=await t.activate();if(!n.languageServerFolder)throw new Error("Could not find Pylance extension");const{path:c,version:u}=await n.languageServerFolder();try{const t=new Worker(c+"/browser.server.bundle.js"),n={distUrl:c};t.postMessage(n);const p=new s.LanguageClientMiddlewareBase(void 0,a.LanguageServerType.Node,g,u);p.connect();const f={documentSelector:[{language:"python"}],synchronize:{configurationSection:["python"]},middleware:p},h=new o.LanguageClient("python","Python Language Server",f,t);h.onDidChangeState(t=>{t.newState===r.State.Running&&(e.subscriptions.push(i.commands.registerCommand("python.viewLanguageServerOutput",()=>h.outputChannel.show())),h.onTelemetry(e=>{var t;const n=e.EventName||l.EventName.LANGUAGE_SERVER_TELEMETRY,i={...e.Properties,method:null===(t=e.Properties.method)||void 0===t?void 0:t.replace(/\//g,".")};g(n,e.Measurements,i,e.Exception)}))});const m=h.start();e.subscriptions.push(m),e.subscriptions.push(d.createStatusItem())}catch(e){console.log(e)}}let f;function g(t,i,r,o){var s;const a=function(){if(f)return f;const e=c.PVSC_EXTENSION_ID,{extensions:t}=n(0),i=t.getExtension(e).packageJSON.version,r=n(89).default;return f=new r(e,i,c.AppinsightsKey,!0),f}(),u="number"==typeof i?{duration:i}:i||void 0,l={},d=t;if(r){const e=r;Object.getOwnPropertyNames(e).forEach(n=>{if(void 0!==e[n]&&null!==e[n])try{switch(typeof e[n]){case"string":l[n]=e[n];break;case"object":l[n]="object";break;default:l[n]=e[n].toString()}}catch(e){console.error(`Failed to serialize ${n} for ${t}`,e)}})}if(o){const e={errorName:o.name,errorMessage:o.message,errorStack:null!==(s=o.stack)&&void 0!==s?s:""};Object.assign(l,e);const t=Object.getOwnPropertyNames(e);a.sendTelemetryErrorEvent(d,l,u,t)}else a.sendTelemetryEvent(d,l,u);e.env&&e.env.VSC_PYTHON_LOG_TELEMETRY&&console.error(`Telemetry Event : ${d} Measures: ${JSON.stringify(u)} Props: ${JSON.stringify(l)} `)}t.activate=async function(e){await u.loadLocalizedStringsForBrowser();const t=i.extensions.getExtension(c.PYLANCE_EXTENSION_ID);if(t)return void p(e,t);const n=i.extensions.onDidChange(()=>{const t=i.extensions.getExtension(c.PYLANCE_EXTENSION_ID);t&&(n.dispose(),p(e,t))})}}).call(this,n(9))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(4),r=n(15),o=n(5),s=n(35);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}a.emptyBuffer=new Uint8Array(0);class c{constructor(e){this.socket=e,this._onData=new o.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class u{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error("In a Browser environments only utf-8 text encding is supported. But got encoding: "+t);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const l=new TextEncoder,d=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error("In a Browser environments only utf-8 text encding is supported. But got encoding: "+t.charset);return Promise.resolve(l.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new u(e)}),console:console,timer:Object.freeze({setTimeout:(e,t,...n)=>setTimeout(e,t,...n),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setTimeout(e,0,...t),clearImmediate(e){clearTimeout(e)}})});function p(){return d}!function(e){e.install=function(){i.default.install(d)}}(p||(p={})),t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,n=0,i=0;e:for(;t<this._chunks.length;){const r=this._chunks[t];for(n=0;n<r.length;){switch(r[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}i+=r.byteLength,t++}if(4!==e)return;const r=this._read(i+n),o=new Map,s=this.toString(r,"ascii").split("\r\n");if(s.length<2)return o;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const i=t.substr(0,n),r=t.substr(n+1).trim();o.set(i,r)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const r=i.slice(0,e);t.set(r,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(4),r=n(8),o=n(5);var s;!function(e){e.is=function(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.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: "+(r.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,r;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)n=null!=e?e:"utf-8";else{if(n=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,o.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=i.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:r,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={}));t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=i.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}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;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then(e=>{this.options.contentTypeDecoder.decode(e,this.options).then(e=>{this.callback(e)},e=>{this.fireError(e)})},e=>{this.fireError(e)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(i.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=i.default().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(4),r=n(8),o=n(38),s=n(5);var a;!function(e){e.is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.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: "+(r.string(e.message)?e.message:"unknown"))}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){var t,n;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:i.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(n=e.contentTypeEncoder)&&void 0!==n?n:i.default().applicationJson.encoder}}}(a||(a={}));t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(4);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&i.default().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const i=n(4),r=n(8),o=n(17),s=n(40),a=n(5),c=n(18);var u,l,d,p,f,g,h,m,v,y,T,C,R;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.type=new o.NotificationType("$/progress")}(l||(l={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return r.func(e)}}(d||(d={})),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"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!r.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"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(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("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(h=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class S extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,S.prototype)}}t.ConnectionError=S,function(e){e.is=function(e){const t=e;return t&&r.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&r.func(t.createCancellationTokenSource)}}(y=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(u.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&r.func(t.sendCancellation)&&r.func(t.cleanup)}}(T=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:T.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&T.is(t.sender)}}(C=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy))}}(t.ConnectionOptions||(t.ConnectionOptions={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(R||(R={})),t.createMessageConnection=function(e,n,v,y){const T=void 0!==v?v:t.NullLogger;let _=0,E=0,w=0,b=void 0;const I=Object.create(null);let x=void 0;const P=Object.create(null),D=new Map;let N,O,k=new s.LinkedMap,A=Object.create(null),L=Object.create(null),F=p.Off,M=f.Text,q=R.New;const U=new a.Emitter,j=new a.Emitter,H=new a.Emitter,W=new a.Emitter,K=new a.Emitter,V=y&&y.cancellationStrategy?y.cancellationStrategy:C.Message;function B(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function z(e,t){var n;o.isRequestMessage(t)?e.set(B(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++E).toString(),t)}function G(e){}function $(){return q===R.Listening}function Y(){return q===R.Closed}function X(){return q===R.Disposed}function J(){q!==R.New&&q!==R.Listening||(q=R.Closed,j.fire(void 0))}function Q(){N||0===k.size||(N=i.default().timer.setImmediate(()=>{N=void 0,function(){if(0===k.size)return;const e=k.shift();try{o.isRequestMessage(e)?function(e){if(X())return;function t(t,i,r){const s={jsonrpc:"2.0",id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,i,r),n.write(s)}function i(t,i,r){const o={jsonrpc:"2.0",id:e.id,error:t.toJson()};ee(o,i,r),n.write(o)}!function(e){if(F===p.Off||!O)return;if(M===f.Text){let t=void 0;F===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=I[e.method];let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||b){const s=String(e.id),l=V.receiver.createCancellationTokenSource(s);L[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else b&&(d=b(e.method,e.params,l.token));const p=d;d?p.then?p.then(n=>{delete L[s],t(n,e.method,u)},t=>{delete L[s],t instanceof o.ResponseError?i(t,e.method,u):t&&r.string(t.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete L[s],t(d,e.method,u)):(delete L[s],function(t,i,r){void 0===t&&(t=null);const o={jsonrpc:"2.0",id:e.id,result:t};ee(o,i,r),n.write(o)}(d,e.method,u))}catch(n){delete L[s],n instanceof o.ResponseError?t(n,e.method,u):n&&r.string(n.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(X())return;let t,n=void 0;if(e.method===u.type.method)t=e=>{const t=e.id,n=L[String(t)];n&&n.cancel()};else{const i=P[e.method];i&&(t=i.handler,n=i.type)}if(t||x)try{!function(e){if(F===p.Off||!O||e.method===h.type.method)return;if(M===f.Text){let t=void 0;F===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(e),t?void 0===e.params?(void 0!==n&&0!==n.numberOfParams&&n.parameterStructures!==o.ParameterStructures.byName&&T.error(`Notification ${e.method} defines ${n.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==n&&(n.parameterStructures===o.ParameterStructures.byName&&T.error(`Notification ${e.method} defines parameters by name but received parameters by position`),n.numberOfParams!==e.params.length&&T.error(`Notification ${e.method} defines ${n.numberOfParams} params but received ${e.params.length} argumennts`)),t(...e.params)):(void 0!==n&&n.parameterStructures===o.ParameterStructures.byPosition&&T.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):x&&x(e.method,e.params)}catch(t){t.message?T.error(`Notification handler '${e.method}' failed with message: ${t.message}`):T.error(`Notification handler '${e.method}' failed unexpectedly.`)}else H.fire(e)}(e):o.isResponseMessage(e)?function(e){if(X())return;if(null===e.id)e.error?T.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):T.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=A[t];if(function(e,t){if(F===p.Off||!O)return;if(M===f.Text){let n=void 0;if(F===p.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){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else O.log(`Received response ${e.id} without active response promise.`,n)}else te("receive-response",e)}(e,n),n){delete A[t];try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?T.error(`Response handler '${n.method}' failed with message: ${e.message}`):T.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void T.error("Received empty message.");T.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(r.string(t.id)||r.number(t.id)){const e=String(t.id),n=A[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{Q()}}()}))}e.onClose(J),e.onError((function(e){U.fire([e,void 0,void 0])})),n.onClose(J),n.onError((function(e){U.fire(e)}));const Z=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=B(e.params.id),i=k.get(t);if(o.isRequestMessage(i)){const r=null==y?void 0:y.connectionStrategy,o=r&&r.cancelUndispatched?r.cancelUndispatched(i,G):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return k.delete(t),o.id=i.id,ee(o,e.method,Date.now()),void n.write(o)}}z(k,e)}finally{Q()}};function ee(e,t,n){if(F!==p.Off&&O)if(M===f.Text){let i=void 0;F===p.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),O.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else te("send-response",e)}function te(e,t){if(!O||F===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(n)}function ne(){if(Y())throw new S(m.Closed,"Connection is closed.");if(X())throw new S(m.Disposed,"Connection is disposed.")}function ie(e){return void 0===e?null:e}function re(e){return null===e?void 0:e}function oe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function se(e,t){switch(e){case o.ParameterStructures.auto:return oe(t)?re(t):[ie(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return re(t);case o.ParameterStructures.byPosition:return[ie(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function ae(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=se(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(ie(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const ce={sendNotification:(e,...t)=>{let i,s;if(ne(),r.string(e)){i=e;const n=t[0];let r=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(r=1,a=n);let c=t.length;const u=c-r;switch(u){case 0:s=void 0;break;case 1:s=se(a,t[r]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(r,c).map(e=>ie(e))}}else{const n=t;i=e.method,s=ae(e,n)}const a={jsonrpc:"2.0",method:i,params:s};!function(e){if(F!==p.Off&&O)if(M===f.Text){let t=void 0;F===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ne(),r.func(e)?x=e:t&&(r.string(e)?(n=e,P[e]={type:void 0,handler:t}):(n=e.method,P[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete P[n]:x=void 0}}},onProgress:(e,t,n)=>{if(D.has(t))throw new Error(`Progress handler for token ${t} already registered`);return D.set(t,n),{dispose:()=>{D.delete(t)}}},sendProgress:(e,t,n)=>{ce.sendNotification(l.type,{token:t,value:n})},onUnhandledProgress:W.event,sendRequest:(e,...t)=>{let i,s;ne(),function(){if(!$())throw new Error("Call listen() first.")}();let a=void 0;if(r.string(e)){i=e;const n=t[0],r=t[t.length-1];let u=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,a=r);const p=d-u;switch(p){case 0:s=void 0;break;case 1:s=se(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${p} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map(e=>ie(e))}}else{const n=t;i=e.method,s=ae(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=_++;let l;a&&(l=a.onCancellationRequested(()=>{V.sender.sendCancellation(ce,u)}));return new Promise((e,t)=>{const r={jsonrpc:"2.0",id:u,method:i,params:s};let a={method:i,timerStart:Date.now(),resolve:t=>{e(t),V.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),V.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(F!==p.Off&&O)if(M===f.Text){let t=void 0;F===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(r);try{n.write(r)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(A[String(u)]=a)})},onRequest:(e,t)=>{ne();let n=null;return d.is(e)?(n=void 0,b=e):r.string(e)?(n=null,void 0!==t&&(n=e,I[e]={handler:t,type:void 0})):void 0!==t&&(n=e.method,I[e.method]={type:e,handler:t}),{dispose:()=>{null!==n&&(void 0!==n?delete I[n]:b=void 0)}}},trace:(e,t,n)=>{let i=!1,o=f.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||f.Text)),F=e,M=o,O=F===p.Off?void 0:t,!i||Y()||X()||ce.sendNotification(g.type,{value:p.toString(e)})},onError:U.event,onClose:j.event,onUnhandledNotification:H.event,onDispose:K.event,end:()=>{n.end()},dispose:()=>{if(X())return;q=R.Disposed,K.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(A).forEach(e=>{A[e].reject(t)}),A=Object.create(null),L=Object.create(null),k=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{ne(),function(){if($())throw new S(m.AlreadyListening,"Connection is already listening")}(),q=R.Listening,e.listen(Z)},inspect:()=>{i.default().console.log("inspect")}};return ce.onNotification(h.type,e=>{F!==p.Off&&O&&O.log(e.message,F===p.Verbose?e.verbose:void 0)}),ce.onNotification(l.type,e=>{const t=D.get(e.token);t?t(e.value):W.fire(e)}),ce}},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i=t.Touch||(t.Touch={}));class r{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}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){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}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,this._state++}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,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,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}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.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,this._state++}else if(t===i.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,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=r;t.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(n(7),t),r(n(42),t),r(n(2),t),r(n(43),t);var o=n(60);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(t.LSPErrorCodes||(t.LSPErrorCodes={}))},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l,d,p,f,g,h,m,v,y,T,C,R,S,_,E,w,b,I,x;n.r(t),n.d(t,"integer",(function(){return i})),n.d(t,"uinteger",(function(){return r})),n.d(t,"Position",(function(){return o})),n.d(t,"Range",(function(){return s})),n.d(t,"Location",(function(){return a})),n.d(t,"LocationLink",(function(){return c})),n.d(t,"Color",(function(){return u})),n.d(t,"ColorInformation",(function(){return l})),n.d(t,"ColorPresentation",(function(){return d})),n.d(t,"FoldingRangeKind",(function(){return p})),n.d(t,"FoldingRange",(function(){return f})),n.d(t,"DiagnosticRelatedInformation",(function(){return g})),n.d(t,"DiagnosticSeverity",(function(){return h})),n.d(t,"DiagnosticTag",(function(){return m})),n.d(t,"CodeDescription",(function(){return v})),n.d(t,"Diagnostic",(function(){return y})),n.d(t,"Command",(function(){return T})),n.d(t,"TextEdit",(function(){return C})),n.d(t,"ChangeAnnotation",(function(){return R})),n.d(t,"ChangeAnnotationIdentifier",(function(){return S})),n.d(t,"AnnotatedTextEdit",(function(){return _})),n.d(t,"TextDocumentEdit",(function(){return E})),n.d(t,"CreateFile",(function(){return w})),n.d(t,"RenameFile",(function(){return b})),n.d(t,"DeleteFile",(function(){return I})),n.d(t,"WorkspaceEdit",(function(){return x})),n.d(t,"WorkspaceChange",(function(){return ae})),n.d(t,"TextDocumentIdentifier",(function(){return P})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return D})),n.d(t,"OptionalVersionedTextDocumentIdentifier",(function(){return N})),n.d(t,"TextDocumentItem",(function(){return O})),n.d(t,"MarkupKind",(function(){return k})),n.d(t,"MarkupContent",(function(){return A})),n.d(t,"CompletionItemKind",(function(){return L})),n.d(t,"InsertTextFormat",(function(){return F})),n.d(t,"CompletionItemTag",(function(){return M})),n.d(t,"InsertReplaceEdit",(function(){return q})),n.d(t,"InsertTextMode",(function(){return U})),n.d(t,"CompletionItem",(function(){return j})),n.d(t,"CompletionList",(function(){return H})),n.d(t,"MarkedString",(function(){return W})),n.d(t,"Hover",(function(){return K})),n.d(t,"ParameterInformation",(function(){return V})),n.d(t,"SignatureInformation",(function(){return B})),n.d(t,"DocumentHighlightKind",(function(){return z})),n.d(t,"DocumentHighlight",(function(){return G})),n.d(t,"SymbolKind",(function(){return $})),n.d(t,"SymbolTag",(function(){return Y})),n.d(t,"SymbolInformation",(function(){return X})),n.d(t,"DocumentSymbol",(function(){return J})),n.d(t,"CodeActionKind",(function(){return Q})),n.d(t,"CodeActionContext",(function(){return Z})),n.d(t,"CodeAction",(function(){return ee})),n.d(t,"CodeLens",(function(){return te})),n.d(t,"FormattingOptions",(function(){return ne})),n.d(t,"DocumentLink",(function(){return ie})),n.d(t,"SelectionRange",(function(){return re})),n.d(t,"EOL",(function(){return ue})),n.d(t,"TextDocument",(function(){return ce})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=r.MAX_VALUE),t===Number.MAX_VALUE&&(t=r.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return le.objectLiteral(t)&&le.uinteger(t.line)&&le.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,n,i){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(i))return{start:o.create(e,t),end:o.create(n,i)};if(o.is(e)&&o.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 le.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.string(t.uri)||le.undefined(t.uri))}}(a||(a={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.targetRange)&&le.string(t.targetUri)&&(s.is(t.targetSelectionRange)||le.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||le.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return le.numberRange(t.red,0,1)&&le.numberRange(t.green,0,1)&&le.numberRange(t.blue,0,1)&&le.numberRange(t.alpha,0,1)}}(u||(u={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return s.is(t.range)&&u.is(t.color)}}(l||(l={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return le.string(t.label)&&(le.undefined(t.textEdit)||C.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,C.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,i,r){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(i)&&(o.endCharacter=i),le.defined(r)&&(o.kind=r),o},e.is=function(e){var t=e;return le.uinteger(t.startLine)&&le.uinteger(t.startLine)&&(le.undefined(t.startCharacter)||le.uinteger(t.startCharacter))&&(le.undefined(t.endCharacter)||le.uinteger(t.endCharacter))&&(le.undefined(t.kind)||le.string(t.kind))}}(f||(f={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return le.defined(t)&&a.is(t.location)&&le.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(h||(h={})),function(e){e.Unnecessary=1,e.Deprecated=2}(m||(m={})),function(e){e.is=function(e){var t=e;return null!=t&&le.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,i,r,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(i)&&(s.code=i),le.defined(r)&&(s.source=r),le.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return le.defined(n)&&s.is(n.range)&&le.string(n.message)&&(le.number(n.severity)||le.undefined(n.severity))&&(le.integer(n.code)||le.string(n.code)||le.undefined(n.code))&&(le.undefined(n.codeDescription)||le.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(le.string(n.source)||le.undefined(n.source))&&(le.undefined(n.relatedInformation)||le.typedArray(n.relatedInformation,g.is))}}(y||(y={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={title:e,command:t};return le.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(T||(T={})),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 le.objectLiteral(t)&&le.string(t.newText)&&s.is(t.range)}}(C||(C={})),function(e){e.create=function(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){var t=e;return void 0!==t&&le.objectLiteral(t)&&le.string(t.label)&&(le.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(le.string(t.description)||void 0===t.description)}}(R||(R={})),function(e){e.is=function(e){return"string"==typeof e}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return C.is(t)&&(R.is(t.annotationId)||S.is(t.annotationId))}}(_||(_={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&N.is(t.textDocument)&&Array.isArray(t.edits)}}(E||(E={})),function(e){e.create=function(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"create"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&le.string(t.oldUri)&&le.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(b||(b={})),function(e){e.create=function(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"delete"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||le.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||le.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(I||(I={})),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 le.string(e.kind)?w.is(e)||b.is(e)||I.is(e):E.is(e)})))}}(x||(x={}));var P,D,N,O,k,A,L,F,M,q,U,j,H,W,K,V,B,z,G,$,Y,X,J,Q,Z,ee,te,ne,ie,re,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=C.insert(e,t):S.is(n)?(r=n,i=_.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=_.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=C.replace(e,t):S.is(n)?(r=n,i=_.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=_.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=C.del(e):S.is(t)?(i=t,n=_.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=_.del(e,i)),this.edits.push(n),void 0!==i)return i},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.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),se=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ae=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(E.is(e)){var n=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new oe(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(N.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new oe(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new oe(r),this._textEditChanges[e]=i}return i},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(R.is(t)||S.is(t)?i=t:n=t,void 0===i?r=w.create(e,n):(o=S.is(i)?i:this._changeAnnotations.manage(i),r=w.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,s;if(R.is(n)||S.is(n)?r=n:i=n,void 0===r?o=b.create(e,t,i):(s=S.is(r)?r:this._changeAnnotations.manage(r),o=b.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(R.is(t)||S.is(t)?i=t:n=t,void 0===i?r=I.create(e,n):(o=S.is(i)?i:this._changeAnnotations.manage(i),r=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)}}(P||(P={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.integer(t.version)}}(D||(D={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&(null===t.version||le.integer(t.version))}}(N||(N={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(O||(O={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(k||(k={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(k||(k={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&k.is(t.kind)&&le.string(t.value)}}(A||(A={})),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}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(M||(M={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&le.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(q||(q={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.create=function(e){return{label:e}}}(j||(j={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(H||(H={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return le.string(t)||le.objectLiteral(t)&&le.string(t.language)&&le.string(t.value)}}(W||(W={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(A.is(t.contents)||W.is(t.contents)||le.typedArray(t.contents,W.is))&&(void 0===e.range||s.is(e.range))}}(K||(K={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={label:e};return le.defined(t)&&(r.documentation=t),le.defined(n)?r.parameters=n:r.parameters=[],r}}(B||(B={})),function(e){e.Text=1,e.Read=2,e.Write=3}(z||(z={})),function(e){e.create=function(e,t){var n={range:e};return le.number(t)&&(n.kind=t),n}}(G||(G={})),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}($||($={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,i,r){var o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(X||(X={})),function(e){e.create=function(e,t,n,i,r,o){var s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&le.string(t.name)&&le.number(t.kind)&&s.is(t.range)&&s.is(t.selectionRange)&&(void 0===t.detail||le.string(t.detail))&&(void 0===t.deprecated||le.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(J||(J={})),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"}(Q||(Q={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return le.defined(t)&&le.typedArray(t.diagnostics,y.is)&&(void 0===t.only||le.typedArray(t.only,le.string))}}(Z||(Z={})),function(e){e.create=function(e,t,n){var i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):T.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){var t=e;return t&&le.string(t.title)&&(void 0===t.diagnostics||le.typedArray(t.diagnostics,y.is))&&(void 0===t.kind||le.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||T.is(t.command))&&(void 0===t.isPreferred||le.boolean(t.isPreferred))&&(void 0===t.edit||x.is(t.edit))}}(ee||(ee={})),function(e){e.create=function(e,t){var n={range:e};return le.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.command)||T.is(t.command))}}(te||(te={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return le.defined(t)&&le.uinteger(t.tabSize)&&le.boolean(t.insertSpaces)}}(ne||(ne={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.target)||le.string(t.target))}}(ie||(ie={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&s.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(re||(re={}));var ce,ue=["\n","\r\n","\r"];!function(e){e.create=function(e,t,n,i){return new de(e,t,n,i)},e.is=function(e){var t=e;return!!(le.defined(t)&&le.string(t.uri)&&(le.undefined(t.languageId)||le.string(t.languageId))&&le.uinteger(t.lineCount)&&le.func(t.getText)&&le.func(t.positionAt)&&le.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),i=function e(t,n){if(t.length<=1)return t;var i=t.length/2|0,r=t.slice(0,i),o=t.slice(i);e(r,n),e(o,n);var s=0,a=0,c=0;for(;s<r.length&&a<o.length;){var u=n(r[s],o[a]);t[c++]=u<=0?r[s++]:o[a++]}for(;s<r.length;)t[c++]=r[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})),r=n.length,o=i.length-1;o>=0;o--){var s=i[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=r))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),r=a}return n}}(ce||(ce={}));var le,de=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(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,i=0;i<t.length;i++){n&&(e.push(i),n=!1);var r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}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 o.create(0,e);for(;n<i;){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var s=n-1;return o.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],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,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.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},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)}}(le||(le={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const i=n(44),r=n(2),o=n(45);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=n(46);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=n(47);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=n(48);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const u=n(49);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const l=n(50);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}});const d=n(51);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const p=n(52);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const f=n(53);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const g=n(54);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const h=n(55);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return h.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return h.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return h.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});const m=n(56);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return m.ShowDocumentRequest}});const v=n(57);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const y=n(58);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return y.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return y.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return y.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return y.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return y.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return y.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return y.WillDeleteFilesRequest}});const T=n(59);var C,R;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return T.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return T.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return T.MonikerRequest}}),function(e){e.is=function(e){const t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(C=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!C.is(t))return!1;return!0}}(R=t.DocumentSelector||(t.DocumentSelector={})),function(e){e.type=new r.ProtocolRequestType("client/registerCapability")}(t.RegistrationRequest||(t.RegistrationRequest={})),function(e){e.type=new r.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&&i.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||R.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new r.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new r.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new r.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new r.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new r.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 r.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new r.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new r.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new r.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 r.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})),function(e){e.method="textDocument/didChange",e.type=new r.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new r.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 r.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new r.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new r.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 r.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 r.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new r.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 r.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new r.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new r.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new r.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new r.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new r.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.Identifier=1}(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})),function(e){e.method="textDocument/rename",e.type=new r.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new r.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new r.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new r.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,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=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(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}),t.ImplementationRequest=void 0;const i=n(2);!function(e){e.method="textDocument/implementation",e.type=new i.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(2);!function(e){e.method="textDocument/typeDefinition",e.type=new i.ProtocolRequestType(e.method)}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(2);!function(e){e.type=new i.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new i.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(2);!function(e){e.type=new i.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(2);!function(e){e.method="textDocument/documentColor",e.type=new i.ProtocolRequestType(e.method)}(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}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const i=n(2);!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)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(2);!function(e){e.method="textDocument/declaration",e.type=new i.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(2);!function(e){e.method="textDocument/selectionRange",e.type=new i.ProtocolRequestType(e.method)}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(7),r=n(2);!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new r.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new r.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(2);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const i=n(2);!function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator"}(t.SemanticTokenTypes||(t.SemanticTokenTypes={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(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.Relative="relative"}(t.TokenFormat||(t.TokenFormat={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(2);!function(e){e.method="window/showDocument",e.type=new i.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(2);!function(e){e.method="textDocument/linkedEditingRange",e.type=new i.ProtocolRequestType(e.method)}(t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(2);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(2);!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(t.UniquenessLevel||(t.UniquenessLevel={})),function(e){e.import="import",e.export="export",e.local="local"}(t.MonikerKind||(t.MonikerKind={})),function(e){e.method="textDocument/moniker",e.type=new i.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(7);t.createProtocolConnection=function(e,t,n,r){return i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),i.createMessageConnection(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(0),r=n(1),o=n(6),s=n(20),a=n(21),c=n(22),u=n(23),l=n(24),d=n(25),p=n(1);var f;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(f||(f={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function g(e){return{uri:t(e.uri)}}function h(e){switch(e){case i.TextDocumentSaveReason.Manual:return r.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return r.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return r.TextDocumentSaveReason.FocusOut}return r.TextDocumentSaveReason.Manual}function m(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return r.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return r.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return r.CompletionTriggerKind.Invoked}}function v(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return r.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return r.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return r.SignatureHelpTriggerKind.ContentChange}}function y(e){return{label:e.label}}function T(e){return{label:e.label,parameters:(t=e.parameters,t.map(y))};var t}function C(e){return{line:e.line,character:e.character}}function R(e){return null==e?e:{line:e.line,character:e.character}}function S(e){return null==e?e:{start:R(e.start),end:R(e.end)}}function _(e){return null==e?e:r.Location.create(n(e.uri),S(e.range))}function E(e){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}}function w(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function b(e){return{message:e.message,location:_(e.location)}}function I(e){const t=r.Diagnostic.create(S(e.range),e.message),i=e instanceof l.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const s=function(e){if(null!=e)return o.number(e)||o.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return l.DiagnosticCode.is(s)?void 0!==i&&i.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=E(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=w(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(b)),e.source&&(t.source=e.source),t}function x(e){return null==e?e:e.map(I)}function P(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function D(e){return{range:S(e.range),newText:e.newText}}function N(e){return e<=i.SymbolKind.TypeParameter?e+1:r.SymbolKind.Property}function O(e){return e}function k(e){return e.map(O)}function A(e){let t=r.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:g,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},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:g(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:g(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:g(e.document),reason:h(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asDidRenameFilesParams:function(e){return{files:e.files.map(e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)}))}},asDidDeleteFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asWillCreateFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asWillRenameFilesParams:function(e){return{files:e.files.map(e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)}))}},asWillDeleteFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asTextDocumentPositionParams:function(e,t){return{textDocument:g(e),position:C(t)}},asCompletionParams:function(e,t,n){return{textDocument:g(e),position:C(t),context:{triggerKind:m(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:g(e),position:C(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:v(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(r=i.signatures,r.map(T)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,r},asWorkerPosition:C,asRange:S,asPosition:R,asPositions:function(e){let t=[];for(let n of e)t.push(R(n));return t},asLocation:_,asDiagnosticSeverity:E,asDiagnosticTag:w,asDiagnostic:I,asDiagnostics:x,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;var a,c;e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case r.MarkupKind.PlainText:return{kind:e,value:t};case r.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=r.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=t.textEdit.range):t.insertText instanceof i.SnippetString?(n=r.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText;t.range&&(s=t.range);e.insertTextFormat=n,t.fromEdit&&void 0!==o&&void 0!==s?e.textEdit=function(e,t){return f.is(t)?r.InsertReplaceEdit.create(e,S(t.inserting),S(t.replacing)):{newText:e,range:S(t)}}(o,s):e.insertText=o}(t,e),o.number(e.kind)&&(t.kind=(a=e.kind,void 0!==(c=n&&n.originalItemKind)?c:a+1)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=function(e){if(null==e)return e;return e.map(D)}(e.additionalTextEdits)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=A(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect);const u=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags);if(n){if(void 0!==n.data&&(t.data=n.data),!0===n.deprecated||!1===n.deprecated){if(!0===n.deprecated&&void 0!==u&&u.length>0){const e=u.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&u.splice(e,1)}t.deprecated=n.deprecated}void 0!==n.insertTextMode&&(t.insertTextMode=n.insertTextMode)}return void 0!==u&&u.length>0&&(t.tags=u),void 0===t.insertTextMode&&!0===e.keepWhitespace&&(t.insertTextMode=p.InsertTextMode.adjustIndentation),t},asTextEdit:D,asSymbolKind:N,asSymbolTag:O,asSymbolTags:k,asReferenceParams:function(e,t,n){return{textDocument:g(e),position:C(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:function(e){let t=r.CodeAction.create(e.title);if(e instanceof u.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=function(e){if(null==e)return;return e.value}(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=x(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=A(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionContext:function(e){if(null==e)return e;let t;return e.only&&o.string(e.only.value)&&(t=[e.only.value]),r.CodeActionContext.create(x(e.diagnostics),t)},asCommand:A,asCodeLens:function(e){let t=r.CodeLens.create(S(e.range));return e.command&&(t.command=A(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:g(e)}},asCodeLensParams:function(e){return{textDocument:g(e)}},asDocumentLink:function(e){let t=r.DocumentLink.create(S(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof c.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:g(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:N(e.kind),uri:n(e.uri),range:S(e.range),selectionRange:S(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=k(e.tags)),e instanceof d.default&&void 0!==e.data&&(t.data=e.data),t}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(0),r=n(1),o=n(6),s=n(20),a=n(21),c=n(22),u=n(23),l=n(24),d=n(25),p=n(1);var f;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(f||(f={})),t.createConverter=function(e,t){const n=e||(e=>i.Uri.parse(e));function g(e){return n(e)}function h(e){return e.map(m)}function m(e){let t=new l.ProtocolDiagnostic(C(e.range),e.message,S(e.severity),e.data);return void 0!==e.code&&(r.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:g(e.codeDescription.href)}:l.DiagnosticCode.is(e.code)?(t.hasDiagnosticCode=!0,t.code={value:e.code.value,target:g(e.code.target)}):t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(v)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=y(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function v(e){return new i.DiagnosticRelatedInformation(A(e.location),e.message)}function y(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function T(e){if(e)return new i.Position(e.line,e.character)}function C(e){if(e)return new i.Range(T(e.start),T(e.end))}function R(e){return e.map(e=>C(e))}function S(e){if(null==e)return i.DiagnosticSeverity.Error;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}return i.DiagnosticSeverity.Error}function _(e){if(o.string(e))return e;switch(e.kind){case r.MarkupKind.Markdown:return E(e.value);case r.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function E(e){const n=new i.MarkdownString(e);return!0===t&&(n.isTrusted=t),n}function w(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function b(e){let t=function(e){if(null==e)return[];const t=[];for(let n of e){const e=w(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=_(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===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.textEdit.newText),range:I(e.textEdit),fromEdit:!0}:{text:e.textEdit.newText,range:I(e.textEdit),fromEdit:!0}:e.insertText?e.insertTextFormat===r.InsertTextFormat.Snippet?{text:new i.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]=(c=e.kind,r.CompletionItemKind.Text<=c&&c<=r.CompletionItemKind.TypeParameter?[c-1,void 0]:[i.CompletionItemKind.Text,c]);n.kind=t,o&&(n.originalItemKind=o)}var c;return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=P(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=B(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(i.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),void 0!==e.insertTextMode&&(n.insertTextMode=e.insertTextMode,e.insertTextMode===p.InsertTextMode.asIs&&(n.keepWhitespace=!0)),n}function I(e){return r.InsertReplaceEdit.is(e)?{inserting:C(e.insert),replacing:C(e.replace)}:C(e.range)}function x(e){if(e)return new i.TextEdit(C(e.range),e.newText)}function P(e){if(e)return e.map(x)}function D(e){return e.map(N)}function N(e){let t=new i.SignatureInformation(e.label);return void 0!==e.documentation&&(t.documentation=_(e.documentation)),void 0!==e.parameters&&(t.parameters=O(e.parameters)),void 0!==e.activeParameter&&(t.activeParameter=e.activeParameter),t}function O(e){return e.map(k)}function k(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=_(e.documentation)),t}function A(e){if(e)return new i.Location(n(e.uri),C(e.range))}function L(e){if(!e)return;let t={targetUri:n(e.targetUri),targetRange:C(e.targetRange),originSelectionRange:C(e.originSelectionRange),targetSelectionRange:C(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}function F(e){if(e){if(o.array(e)){if(0===e.length)return[];if(r.LocationLink.is(e[0])){return e.map(e=>L(e))}return e.map(e=>A(e))}return r.LocationLink.is(e)?[L(e)]:A(e)}}function M(e){let t=new i.DocumentHighlight(C(e.range));return o.number(e.kind)&&(t.kind=q(e.kind)),t}function q(e){switch(e){case r.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case r.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case r.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function U(e){return e<=r.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function j(e){switch(e){case r.SymbolTag.Deprecated:return i.SymbolTag.Deprecated;default:return}}function H(e){if(null==e)return;const t=[];for(const n of e){const e=j(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function W(e,t){let r=new i.SymbolInformation(e.name,U(e.kind),C(e.location.range),e.location.uri?n(e.location.uri):t);return V(r,e),e.containerName&&(r.containerName=e.containerName),r}function K(e){let t=new i.DocumentSymbol(e.name,e.detail||"",U(e.kind),C(e.range),C(e.selectionRange));if(V(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(K(t));t.children=n}return t}function V(e,t){e.tags=H(t.tags),t.deprecated&&(e.tags?e.tags.includes(i.SymbolTag.Deprecated)||(e.tags=e.tags.concat(i.SymbolTag.Deprecated)):e.tags=[i.SymbolTag.Deprecated])}function B(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const z=new Map;function G(e){if(null==e)return;let t=z.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function $(e){if(!e)return;let t=new a.default(C(e.range));return e.command&&(t.command=B(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function Y(e){if(!e)return;const t=new Map;if(void 0!==e.changeAnnotations)for(const n of Object.keys(e.changeAnnotations)){const i=X(e.changeAnnotations[n]);t.set(n,i)}const o=e=>void 0===e?void 0:t.get(e),s=new i.WorkspaceEdit;if(e.documentChanges)for(const t of e.documentChanges)if(r.CreateFile.is(t))s.createFile(n(t.uri),t.options,o(t.annotationId));else if(r.RenameFile.is(t))s.renameFile(n(t.oldUri),n(t.newUri),t.options,o(t.annotationId));else if(r.DeleteFile.is(t))s.deleteFile(n(t.uri),t.options,o(t.annotationId));else{if(!r.TextDocumentEdit.is(t))throw new Error("Unknown workspace edit change received:\n"+JSON.stringify(t,void 0,4));{const e=n(t.textDocument.uri);for(const n of t.edits)p.AnnotatedTextEdit.is(n)?s.replace(e,C(n.range),n.newText,o(n.annotationId)):s.replace(e,C(n.range),n.newText)}}else e.changes&&Object.keys(e.changes).forEach(t=>{s.set(n(t),P(e.changes[t]))});return s}function X(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}function J(e){let t=C(e.range),n=e.target?g(e.target):void 0,i=new c.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function Q(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function Z(e){return new i.ColorInformation(C(e.range),Q(e.color))}function ee(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=P(e.additionalTextEdits),e.textEdit&&(t.textEdit=x(e.textEdit)),t}function te(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function ne(e){return new i.FoldingRange(e.startLine,e.endLine,te(e.kind))}function ie(e){return new i.SelectionRange(C(e.range),e.parent?ie(e.parent):void 0)}function re(e){if(null===e)return;let t=new d.default(U(e.kind),e.name,e.detail||"",g(e.uri),C(e.range),C(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=H(e.tags)),t}function oe(e){return new i.CallHierarchyIncomingCall(re(e.from),R(e.fromRanges))}function se(e){return new i.CallHierarchyOutgoingCall(re(e.to),R(e.fromRanges))}function ae(e){return new i.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}return z.set(r.CodeActionKind.Empty,i.CodeActionKind.Empty),z.set(r.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),z.set(r.CodeActionKind.Refactor,i.CodeActionKind.Refactor),z.set(r.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),z.set(r.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),z.set(r.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),z.set(r.CodeActionKind.Source,i.CodeActionKind.Source),z.set(r.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:g,asDiagnostics:h,asDiagnostic:m,asRange:C,asRanges:R,asPosition:T,asDiagnosticSeverity:S,asDiagnosticTag:y,asHover:function(e){if(e)return new i.Hover(function(e){if(o.string(e))return E(e);if(f.is(e)){return E().appendCodeblock(e.value,e.language)}if(Array.isArray(e)){let t=[];for(let n of e){let e=E();f.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case r.MarkupKind.Markdown:return E(e.value);case r.MarkupKind.PlainText:return t=E(),t.appendText(e.value),t;default:return t=E(),t.appendText("Unsupported Markup content received. Kind is: "+e.kind),t}}}(e.contents),C(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e)){return e.map(b)}let t=e;return new i.CompletionList(t.items.map(b),t.isIncomplete)},asCompletionItem:b,asTextEdit:x,asTextEdits:P,asSignatureHelp:function(e){if(!e)return;let t=new i.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=D(e.signatures)),t},asSignatureInformations:D,asSignatureInformation:N,asParameterInformations:O,asParameterInformation:k,asDeclarationResult:function(e){if(e)return F(e)},asDefinitionResult:function(e){if(e)return F(e)},asLocation:A,asReferences:function(e){if(e)return e.map(e=>A(e))},asDocumentHighlights:function(e){if(e)return e.map(M)},asDocumentHighlight:M,asDocumentHighlightKind:q,asSymbolKind:U,asSymbolTag:j,asSymbolTags:H,asSymbolInformations:function(e,t){if(e)return e.map(e=>W(e,t))},asSymbolInformation:W,asDocumentSymbols:function(e){if(null!=e)return e.map(K)},asDocumentSymbol:K,asCommand:B,asCommands:function(e){if(e)return e.map(B)},asCodeAction:function(e){if(null==e)return;let t=new u.default(e.title,e.data);return void 0!==e.kind&&(t.kind=G(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=h(e.diagnostics)),void 0!==e.edit&&(t.edit=Y(e.edit)),void 0!==e.command&&(t.command=B(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionKind:G,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>G(e))},asCodeLens:$,asCodeLenses:function(e){if(e)return e.map(e=>$(e))},asWorkspaceEdit:Y,asDocumentLink:J,asDocumentLinks:function(e){if(e)return e.map(J)},asFoldingRangeKind:te,asFoldingRange:ne,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(ne)},asColor:Q,asColorInformation:Z,asColorInformations:function(e){if(Array.isArray(e))return e.map(Z)},asColorPresentation:ee,asColorPresentations:function(e){if(Array.isArray(e))return e.map(ee)},asSelectionRange:ie,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push(ie(n));return t},asSemanticTokensLegend:function(e){return e},asSemanticTokens:function(e){if(null!=e)return new i.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ae,asSemanticTokensEdits:function(e){if(null!=e)return new i.SemanticTokensEdits(e.edits.map(ae),e.resultId)},asCallHierarchyItem:re,asCallHierarchyItems:function(e){if(null!==e)return e.map(e=>re(e))},asCallHierarchyIncomingCall:oe,asCallHierarchyIncomingCalls:function(e){if(null!==e)return e.map(e=>oe(e))},asCallHierarchyOutgoingCall:se,asCallHierarchyOutgoingCalls:function(e){if(null!==e)return e.map(e=>se(e))},asLinkedEditingRanges:function(e){if(null!=e)return new i.LinkedEditingRanges(R(e.ranges),function(e){if(null==e)return;return new RegExp(e)}(e.wordPattern))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delayer=void 0;const i=n(1);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=i.RAL().timer.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&&(i.RAL().timer.clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.CommonLanguageClient=void 0;const i=n(3),r=n(65),o=n(19),s=n(66),a=n(67),c=n(68),u=n(69),l=n(70),d=n(71),p=n(72),f=n(73),g=n(74),h=n(75),m=n(80);class v extends i.BaseLanguageClient{constructor(e,t,n){super(e,t,n)}registerProposedFeatures(){this.registerFeatures(y.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new o.ConfigurationFeature(this)),this.registerFeature(new a.TypeDefinitionFeature(this)),this.registerFeature(new s.ImplementationFeature(this)),this.registerFeature(new r.ColorProviderFeature(this)),this.registerFeature(new c.WorkspaceFoldersFeature(this)),this.registerFeature(new u.FoldingRangeFeature(this)),this.registerFeature(new l.DeclarationFeature(this)),this.registerFeature(new d.SelectionRangeFeature(this)),this.registerFeature(new p.ProgressFeature(this)),this.registerFeature(new f.CallHierarchyFeature(this)),this.registerFeature(new g.SemanticTokensFeature(this)),this.registerFeature(new m.LinkedEditingFeature(this)),this.registerFeature(new h.DidCreateFilesFeature(this)),this.registerFeature(new h.DidRenameFilesFeature(this)),this.registerFeature(new h.DidDeleteFilesFeature(this)),this.registerFeature(new h.WillCreateFilesFeature(this)),this.registerFeature(new h.WillRenameFilesFeature(this)),this.registerFeature(new h.WillDeleteFilesFeature(this))}}var y;t.CommonLanguageClient=v,function(e){e.createAll=function(e){return[]}}(y=t.ProposedFeatures||(t.ProposedFeatures={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(r.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>i.handleFailedRequest(r.ColorPresentationRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(r.DocumentColorRequest.type,i,t).then(this.asColorInformations.bind(this),e=>n.handleFailedRequest(r.ColorPresentationRequest.type,e,null))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new i.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}t.ColorProviderFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.ImplementationRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[i.languages.registerImplementationProvider(e.documentSelector,t),t]}}t.ImplementationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.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,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.TypeDefinitionRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}t.TypeDefinitionFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const i=n(12),r=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 registrationType(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=r.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){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{const n=()=>{const e=r.workspace.workspaceFolders;if(void 0===e)return null;return e.map(e=>this.asProtocol(e))},i=t.clientOptions.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()});const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=i.generateUuid()),a&&this.register({id:a,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){let t=e.id,n=this._client,i=r.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},i=n.clientOptions.middleware.workspace;i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(t,i),this.sendInitialEvent(r.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}),t.FoldingRangeFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.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,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(r.FoldingRangeRequest.type,o,n).then(a.asFoldingRanges,e=>i.handleFailedRequest(r.FoldingRangeRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[i.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}static asFoldingRangeKind(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}static asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new i.FoldingRange(e.startLine,e.endLine,a.asFoldingRangeKind(e.kind))):[]}}t.FoldingRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDeclarationResult,e=>i.handleFailedRequest(r.DeclarationRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[i.languages.registerDeclarationProvider(e.documentSelector,t),t]}}t.DeclarationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]=Object.create(null)),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.SelectionRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideSelectionRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositions(t)};return i.sendRequest(r.SelectionRangeRequest.type,o,n).then(e=>i.protocol2CodeConverter.asSelectionRanges(e),e=>i.handleFailedRequest(r.SelectionRangeRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[i.languages.registerSelectionRangeProvider(e.documentSelector,t),t]}}t.SelectionRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(1),r=n(26);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,e=>{this.activeParts.add(new r.ProgressPart(this._client,e.token,t))})}dispose(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a{constructor(e){this.client=e,this.middleware=e.clientOptions.middleware}prepareCallHierarchy(e,t,n){const i=this.client,o=this.middleware,s=(e,t,n)=>{const o=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(r.CallHierarchyPrepareRequest.type,o,n).then(e=>i.protocol2CodeConverter.asCallHierarchyItems(e),e=>i.handleFailedRequest(r.CallHierarchyPrepareRequest.type,e,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyIncomingCallsRequest.type,i,t).then(e=>n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e),e=>n.handleFailedRequest(r.CallHierarchyIncomingCallsRequest.type,e,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyOutgoingCallsRequest.type,i,t).then(e=>n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e),e=>n.handleFailedRequest(r.CallHierarchyOutgoingCallsRequest.type,e,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class c extends o.TextDocumentFeature{constructor(e){super(e,r.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new a(t);return[i.languages.registerCallHierarchyProvider(e.documentSelector,n),n]}}t.CallHierarchyFeature=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const i=n(0),r=n(3),o=n(1),s=n(6);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class c extends r.TextDocumentFeature{constructor(e){super(e,o.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=a(a(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.SemanticTokenTypes.namespace,o.SemanticTokenTypes.type,o.SemanticTokenTypes.class,o.SemanticTokenTypes.enum,o.SemanticTokenTypes.interface,o.SemanticTokenTypes.struct,o.SemanticTokenTypes.typeParameter,o.SemanticTokenTypes.parameter,o.SemanticTokenTypes.variable,o.SemanticTokenTypes.property,o.SemanticTokenTypes.enumMember,o.SemanticTokenTypes.event,o.SemanticTokenTypes.function,o.SemanticTokenTypes.method,o.SemanticTokenTypes.macro,o.SemanticTokenTypes.keyword,o.SemanticTokenTypes.modifier,o.SemanticTokenTypes.comment,o.SemanticTokenTypes.string,o.SemanticTokenTypes.number,o.SemanticTokenTypes.regexp,o.SemanticTokenTypes.operator],t.tokenModifiers=[o.SemanticTokenModifiers.declaration,o.SemanticTokenModifiers.definition,o.SemanticTokenModifiers.readonly,o.SemanticTokenModifiers.static,o.SemanticTokenModifiers.deprecated,o.SemanticTokenModifiers.abstract,o.SemanticTokenModifiers.async,o.SemanticTokenModifiers.modification,o.SemanticTokenModifiers.documentation,o.SemanticTokenModifiers.defaultLibrary],t.formats=[o.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,a(a(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.SemanticTokensRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()});const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=s.boolean(e.full)?e.full:void 0!==e.full,n=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,r=new i.EventEmitter,a=t?{onDidChangeSemanticTokens:r.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.clientOptions.middleware,r=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,i,t).then(e=>n.protocol2CodeConverter.asSemanticTokens(e),e=>n.handleFailedRequest(o.SemanticTokensRequest.type,e,null))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,r):r(e,t)},provideDocumentSemanticTokensEdits:n?(e,t,n)=>{const i=this._client,r=i.clientOptions.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(o.SemanticTokensDeltaRequest.type,r,n).then(e=>o.SemanticTokens.is(e)?i.protocol2CodeConverter.asSemanticTokens(e):i.protocol2CodeConverter.asSemanticTokensEdits(e),e=>i.handleFailedRequest(o.SemanticTokensDeltaRequest.type,e,null))};return r.provideDocumentSemanticTokensEdits?r.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,r=i.clientOptions.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(o.SemanticTokensRangeRequest.type,r,n).then(e=>i.protocol2CodeConverter.asSemanticTokens(e),e=>i.handleFailedRequest(o.SemanticTokensRangeRequest.type,e,null))};return r.provideDocumentRangeSemanticTokens?r.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,u=[],l=this._client.protocol2CodeConverter.asSemanticTokensLegend(e.legend);return void 0!==a&&u.push(i.languages.registerDocumentSemanticTokensProvider(e.documentSelector,a,l)),void 0!==c&&u.push(i.languages.registerDocumentRangeSemanticTokensProvider(e.documentSelector,c,l)),[new i.Disposable(()=>u.forEach(e=>e.dispose())),{range:c,full:a,onDidChangeSemanticTokensEmitter:r}]}}t.SemanticTokensFeature=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const i=n(0),r=n(76),o=n(1),s=n(12);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,i,r){this._filters=new Map,this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=r}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){var t;const n=null===(t=e.workspace)||void 0===t?void 0:t.fileOperations,i=void 0!==n?(r=n,o=this._serverCapability,r[o]):void 0;var r,o;if(void 0!==(null==i?void 0:i.filters))try{this.register({id:s.generateUuid(),registerOptions:{filters:i.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map(e=>{const t=new r.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}async filter(e,t){const n=await Promise.all(e.files.map(async e=>{const n=t(e),r=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(r)){if(void 0===t.kind)return!0;const e=await u.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===i.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===i.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder){if(await u.getFileType(n)===i.FileType.Directory&&t.matcher.match(r+"/"))return!0}return!1})),r=e.files.filter((e,t)=>n[t]);return Object.assign(Object.assign({},e),{files:r})}static async getFileType(e){try{return(await i.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){if(void 0!==e)return!0===e.ignoreCase?{nocase:!0}:void 0}}class l extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._notificationType=n,this._accessUri=o,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>{this._client.sendNotification(this._notificationType,this._createParams(e))};this.doSend(t,e)}}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",e=>e,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didCreateFiles)?i.didCreateFiles(e,t):t(e)}};t.DidRenameFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",e=>e.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didRenameFiles)?i.didRenameFiles(e,t):t(e)}};t.DidDeleteFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",e=>e,e.code2ProtocolConverter.asDidDeleteFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didDeleteFiles)?i.didDeleteFiles(e,t):t(e)}};class d extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._requestType=n,this._accessUri=o,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e)).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",e=>e,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willCreateFiles)?i.willCreateFiles(e,t):t(e)}};t.WillRenameFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",e=>e.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willRenameFiles)?i.willRenameFiles(e,t):t(e)}};t.WillDeleteFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",e=>e,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willDeleteFiles)?i.willDeleteFiles(e,t):t(e)}}},function(e,t,n){e.exports=l,l.Minimatch=d;var i={sep:"/"};try{i=n(10)}catch(e){}var r=l.GLOBSTAR=d.GLOBSTAR={},o=n(77),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var c=/\/+/;function u(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function l(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new d(t,n).match(e))}function d(e,t){if(!(this instanceof d))return new d(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==i.sep&&(e=e.split(i.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function p(e,t){if(t||(t=this instanceof d?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}l.filter=function(e,t){return t=t||{},function(n,i,r){return l(n,e,t)}},l.defaults=function(e){if(!e||!Object.keys(e).length)return l;var t=l,n=function(n,i,r){return t.minimatch(n,i,u(e,r))};return n.Minimatch=function(n,i){return new t.Minimatch(n,u(e,i))},n},d.defaults=function(e){return e&&Object.keys(e).length?l.defaults(e).Minimatch:d},d.prototype.debug=function(){},d.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(c)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=this.options,i=0;if(n.nonegate)return;for(var r=0,o=e.length;r<o&&"!"===e.charAt(r);r++)t=!t,i++;i&&(this.pattern=e.substr(i));this.negate=t},l.braceExpand=function(e,t){return p(e,t)},d.prototype.braceExpand=p,d.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return r;if(""===e)return"";var i,o="",c=!!n.nocase,u=!1,l=[],d=[],p=!1,g=-1,h=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(i){switch(i){case"*":o+="[^/]*?",c=!0;break;case"?":o+="[^/]",c=!0;break;default:o+="\\"+i}v.debug("clearStateChar %j %j",i,o),i=!1}}for(var T,C=0,R=e.length;C<R&&(T=e.charAt(C));C++)if(this.debug("%s\t%s %s %j",e,C,o,T),u&&a[T])o+="\\"+T,u=!1;else switch(T){case"/":return!1;case"\\":y(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,C,o,T),p){this.debug("  in class"),"!"===T&&C===h+1&&(T="^"),o+=T;continue}v.debug("call clearStateChar %j",i),y(),i=T,n.noext&&y();continue;case"(":if(p){o+="(";continue}if(!i){o+="\\(";continue}l.push({type:i,start:C-1,reStart:o.length,open:s[i].open,close:s[i].close}),o+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,o),i=!1;continue;case")":if(p||!l.length){o+="\\)";continue}y(),c=!0;var S=l.pop();o+=S.close,"!"===S.type&&d.push(S),S.reEnd=o.length;continue;case"|":if(p||!l.length||u){o+="\\|",u=!1;continue}y(),o+="|";continue;case"[":if(y(),p){o+="\\"+T;continue}p=!0,h=C,g=o.length,o+=T;continue;case"]":if(C===h+1||!p){o+="\\"+T,u=!1;continue}if(p){var _=e.substring(h+1,C);try{RegExp("["+_+"]")}catch(e){var E=this.parse(_,f);o=o.substr(0,g)+"\\["+E[0]+"\\]",c=c||E[1],p=!1;continue}}c=!0,p=!1,o+=T;continue;default:y(),u?u=!1:!a[T]||"^"===T&&p||(o+="\\"),o+=T}p&&(_=e.substr(h+1),E=this.parse(_,f),o=o.substr(0,g)+"\\["+E[0],c=c||E[1]);for(S=l.pop();S;S=l.pop()){var w=o.slice(S.reStart+S.open.length);this.debug("setting tail",o,S),w=w.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n   %s",w,w,S,o);var b="*"===S.type?"[^/]*?":"?"===S.type?"[^/]":"\\"+S.type;c=!0,o=o.slice(0,S.reStart)+b+"\\("+w}y(),u&&(o+="\\\\");var I=!1;switch(o.charAt(0)){case".":case"[":case"(":I=!0}for(var x=d.length-1;x>-1;x--){var P=d[x],D=o.slice(0,P.reStart),N=o.slice(P.reStart,P.reEnd-8),O=o.slice(P.reEnd-8,P.reEnd),k=o.slice(P.reEnd);O+=k;var A=D.split("(").length-1,L=k;for(C=0;C<A;C++)L=L.replace(/\)[+*?]?/,"");var F="";""===(k=L)&&t!==f&&(F="$"),o=D+N+k+F+O}""!==o&&c&&(o="(?=.)"+o);I&&(o=m+o);if(t===f)return[o,c];if(!c)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var M=n.nocase?"i":"";try{var q=new RegExp("^"+o+"$",M)}catch(e){return new RegExp("$.")}return q._glob=e,q._src=o,q};var f={};l.makeRe=function(e,t){return new d(e,t||{}).makeRe()},d.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===r?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch(e){this.regexp=!1}return this.regexp},l.match=function(e,t,n){var i=new d(t,n=n||{});return e=e.filter((function(e){return i.match(e)})),i.options.nonull&&!e.length&&e.push(t),e},d.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/"));e=e.split(c),this.debug(this.pattern,"split",e);var r,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(r=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],u=e;if(n.matchBase&&1===a.length&&(u=[r]),this.matchOne(u,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},d.prototype.matchOne=function(e,t,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[o];if(this.debug(t,l,d),!1===l)return!1;if(l===r){this.debug("GLOBSTAR",[t,l,d]);var p=o,f=s+1;if(f===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!i.dot&&"."===e[o].charAt(0))return!1;return!0}for(;p<a;){var g=e[p];if(this.debug("\nglobstar while",e,p,t,f,g),this.matchOne(e.slice(p),t.slice(f),n))return this.debug("globstar found match!",p,a,g),!0;if("."===g||".."===g||!i.dot&&"."===g.charAt(0)){this.debug("dot detected!",e,p,t,f);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,f),p!==a))}if("string"==typeof l?(u=i.nocase?d.toLowerCase()===l.toLowerCase():d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},function(e,t,n){var i=n(78),r=n(79);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var o=[],s=r("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var c,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),m=u||d,v=s.body.indexOf(",")>=0;if(!m&&!v)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+a+s.post,e(t)):[t];if(m)c=s.body.split(/\.\./);else{if(1===(c=function e(t){if(!t)return[""];var n=[],i=r("{","}",t);if(!i)return t.split(",");var o=i.pre,s=i.body,a=i.post,c=o.split(",");c[c.length-1]+="{"+s+"}";var u=e(a);a.length&&(c[c.length-1]+=u.shift(),c.push.apply(c,u));return n.push.apply(n,c),n}(s.body)).length)if(1===(c=e(c[0],!1).map(p)).length)return(C=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+c[0]+e}))}var y,T=s.pre,C=s.post.length?e(s.post,!1):[""];if(m){var R=l(c[0]),S=l(c[1]),_=Math.max(c[0].length,c[1].length),E=3==c.length?Math.abs(l(c[2])):1,w=g;S<R&&(E*=-1,w=h);var b=c.some(f);y=[];for(var I=R;w(I,S);I+=E){var x;if(d)"\\"===(x=String.fromCharCode(I))&&(x="");else if(x=String(I),b){var P=_-x.length;if(P>0){var D=new Array(P+1).join("0");x=I<0?"-"+D+x.slice(1):D+x}}y.push(x)}}else y=i(c,(function(t){return e(t,!1)}));for(var N=0;N<y.length;N++)for(var O=0;O<C.length;O++){var k=T+y[N]+C[O];(!n||m||k)&&o.push(k)}return o}(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}(e),!0).map(d)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function p(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function h(e,t){return e>=t}},function(e,t){e.exports=function(e,t){for(var i=[],r=0;r<e.length;r++){var o=t(e[r],r);n(o)?i.push.apply(i,o):i.push(o)}return i};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function i(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var i=o(e,t,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+e.length,i[1]),post:n.slice(i[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}function o(e,t,n){var i,r,o,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(i=[],o=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((r=i.pop())<o&&(o=r,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[o,s])}return a}e.exports=i,i.range=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const i=n(0),r=n(1),o=n(3);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asLinkedEditingRanges,e=>i.handleFailedRequest(r.LinkedEditingRangeRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[i.languages.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}t.LinkedEditingFeature=a},function(e,t,n){"use strict";e.exports=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClientMiddlewareBase=void 0;const i=n(10),r=n(0),o=n(11),s=n(28),a=n(83),c=n(84),u=n(85),l=n(86),d=n(30),p=n(31);t.LanguageClientMiddlewareBase=class{constructor(e,t,n,i){this.serviceContainer=e,this.sendTelemetryEventFunc=n,this.serverVersion=i,this.lastCaptured=new Map,this.nextWindow=0,this.eventCount=0,this.workspace={configuration:async(e,t,n)=>{if(!this.serviceContainer)return n(e,t);const i=this.serviceContainer.get(a.IConfigurationService),s=this.serviceContainer.get(l.IEnvironmentVariablesProvider);let u=n(e,t);if(c.isThenable(u)&&(u=await u),u instanceof o.ResponseError)return u;for(const[t,n]of e.items.entries())if("python"===n.section){const e=n.scopeUri?r.Uri.parse(n.scopeUri):void 0;u[t].pythonPath=i.getSettings(e).pythonPath;const o=(await s.getEnvironmentVariables(e)).PYTHONPATH;o&&(u[t]._envPYTHONPATH=o)}return u}},this.connectedPromise=c.createDeferred(),this.handleDiagnostics=this.handleDiagnostics.bind(this),this.didOpen=this.didOpen.bind(this),this.didSave=this.didSave.bind(this),this.didChange=this.didChange.bind(this),this.didClose=this.didClose.bind(this),this.willSave=this.willSave.bind(this),this.willSaveWaitUntil=this.willSaveWaitUntil.bind(this),t===p.LanguageServerType.Node?this.eventName=d.EventName.LANGUAGE_SERVER_REQUEST:t===p.LanguageServerType.Jedi&&(this.eventName=d.EventName.JEDI_LANGUAGE_SERVER_REQUEST)}get connected(){return this.connectedPromise.promise}connect(){this.connectedPromise.resolve(!0)}disconnect(){this.connectedPromise=c.createDeferred(),this.connectedPromise.resolve(!1)}didChange(){return this.callNext("didChange",arguments)}didOpen(){return this.callNext("didOpen",arguments)}didClose(){return this.callNext("didClose",arguments)}didSave(){return this.callNext("didSave",arguments)}willSave(){return this.callNext("willSave",arguments)}willSaveWaitUntil(){return this.callNext("willSaveWaitUntil",arguments)}async provideCompletionItem(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/completion",3e5,"provideCompletionItem",arguments,(e,t)=>{if(!t)return{resultLength:0};return{resultLength:Array.isArray(t)?t.length:t.items.length}})}async provideHover(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/hover",3e5,"provideHover",arguments)}async handleDiagnostics(e,t,n){if(await this.connected){const t=e.fsPath,n=t?i.basename(t):void 0;if(!n||!n.startsWith(s.HiddenFilePrefix))return this.callNext("handleDiagnostics",arguments)}}async resolveCompletionItem(){if(await this.connected)return this.callNextAndSendTelemetry("completionItem/resolve",3e5,"resolveCompletionItem",arguments)}async provideSignatureHelp(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/signatureHelp",3e5,"provideSignatureHelp",arguments)}async provideDefinition(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/definition",6e4,"provideDefinition",arguments)}async provideReferences(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/references",6e4,"provideReferences",arguments)}async provideDocumentHighlights(){if(await this.connected)return this.callNext("provideDocumentHighlights",arguments)}async provideDocumentSymbols(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/documentSymbol",3e5,"provideDocumentSymbols",arguments)}async provideWorkspaceSymbols(){if(await this.connected)return this.callNextAndSendTelemetry("workspace/symbol",6e4,"provideWorkspaceSymbols",arguments)}async provideCodeActions(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/codeAction",3e5,"provideCodeActions",arguments)}async provideCodeLenses(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/codeLens",3e5,"provideCodeLenses",arguments)}async resolveCodeLens(){if(await this.connected)return this.callNextAndSendTelemetry("codeLens/resolve",3e5,"resolveCodeLens",arguments)}async provideDocumentFormattingEdits(){if(await this.connected)return this.callNext("provideDocumentFormattingEdits",arguments)}async provideDocumentRangeFormattingEdits(){if(await this.connected)return this.callNext("provideDocumentRangeFormattingEdits",arguments)}async provideOnTypeFormattingEdits(){if(await this.connected)return this.callNext("provideOnTypeFormattingEdits",arguments)}async provideRenameEdits(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/rename",6e4,"provideRenameEdits",arguments)}async prepareRename(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/prepareRename",6e4,"prepareRename",arguments)}async provideDocumentLinks(){if(await this.connected)return this.callNext("provideDocumentLinks",arguments)}async resolveDocumentLink(){if(await this.connected)return this.callNext("resolveDocumentLink",arguments)}async provideDeclaration(){if(await this.connected)return this.callNextAndSendTelemetry("textDocument/declaration",6e4,"provideDeclaration",arguments)}async provideTypeDefinition(){if(await this.connected)return this.callNext("provideTypeDefinition",arguments)}async provideImplementation(){if(await this.connected)return this.callNext("provideImplementation",arguments)}async provideDocumentColors(){if(await this.connected)return this.callNext("provideDocumentColors",arguments)}async provideColorPresentations(){if(await this.connected)return this.callNext("provideColorPresentations",arguments)}async provideFoldingRanges(){if(await this.connected)return this.callNext("provideFoldingRanges",arguments)}async provideSelectionRanges(){if(await this.connected)return this.callNext("provideSelectionRanges",arguments)}async prepareCallHierarchy(){if(await this.connected)return this.callNext("prepareCallHierarchy",arguments)}async provideCallHierarchyIncomingCalls(){if(await this.connected)return this.callNext("provideCallHierarchyIncomingCalls",arguments)}async provideCallHierarchyOutgoingCalls(){if(await this.connected)return this.callNext("provideCallHierarchyOutgoingCalls",arguments)}async provideDocumentSemanticTokens(){if(await this.connected)return this.callNext("provideDocumentSemanticTokens",arguments)}async provideDocumentSemanticTokensEdits(){if(await this.connected)return this.callNext("provideDocumentSemanticTokensEdits",arguments)}async provideDocumentRangeSemanticTokens(){if(await this.connected)return this.callNext("provideDocumentRangeSemanticTokens",arguments)}async provideLinkedEditingRange(){if(await this.connected)return this.callNext("provideLinkedEditingRange",arguments)}callNext(e,t){return this.notebookAddon&&this.notebookAddon[e]?this.notebookAddon[e](...t):t[t.length-1](...t)}callNextAndSendTelemetry(e,t,n,i,r){const o=Date.now(),s=new u.StopWatch;let a=!1;const l=[...i];l[l.length-1]=(...e)=>(a=!0,i[i.length-1](...e)),o>this.nextWindow&&(this.nextWindow=o+36e5,this.eventCount=0);const d=this.lastCaptured.get(e),p=n=>{if(this.eventName&&a&&this.eventCount<100&&(!d||o-d>t)){this.lastCaptured.set(e,o),this.eventCount+=1;const t=e.replace(/\//g,"."),i={lsVersion:this.serverVersion||"unknown",method:t};let a=s.elapsedTime;r&&(a={duration:a,...r(this,n)}),this.sendTelemetryEventFunc(this.eventName,a,i)}return n},f=this.callNext(n,l);return c.isThenable(f)?f.then(p):p(f)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDefaultLanguageServer=t.IInterpreterPathService=t.IExperimentService=t.IAsyncDisposableRegistry=t.IEditorUtils=t.IBrowserService=t.IExtensions=t.IExtensionContext=t.IHttpClient=t.IFileDownloader=t.ISocketServer=t.ToolExecutionPath=t.IToolExecutionPath=t.IConfigurationService=t.ICurrentProcess=t.IRandom=t.IPathUtils=t.IInstaller=t.Product=t.ProductType=t.ProductInstallStatus=t.InstallerResponse=t.IPersistentStateFactory=t.WORKSPACE_MEMENTO=t.GLOBAL_MEMENTO=t.IMemento=t.IDisposableRegistry=t.IsWindows=t.IDocumentSymbolProvider=t.IOutputChannel=void 0,t.IOutputChannel=Symbol("IOutputChannel"),t.IDocumentSymbolProvider=Symbol("IDocumentSymbolProvider"),t.IsWindows=Symbol("IS_WINDOWS"),t.IDisposableRegistry=Symbol("IDisposableRegistry"),t.IMemento=Symbol("IGlobalMemento"),t.GLOBAL_MEMENTO=Symbol("IGlobalMemento"),t.WORKSPACE_MEMENTO=Symbol("IWorkspaceMemento"),t.IPersistentStateFactory=Symbol("IPersistentStateFactory"),function(e){e[e.Installed=0]="Installed",e[e.Disabled=1]="Disabled",e[e.Ignore=2]="Ignore"}(t.InstallerResponse||(t.InstallerResponse={})),function(e){e[e.Installed=0]="Installed",e[e.NotInstalled=1]="NotInstalled",e[e.NeedsUpgrade=2]="NeedsUpgrade"}(t.ProductInstallStatus||(t.ProductInstallStatus={})),function(e){e.Linter="Linter",e.Formatter="Formatter",e.TestFramework="TestFramework",e.RefactoringLibrary="RefactoringLibrary",e.DataScience="DataScience"}(t.ProductType||(t.ProductType={})),function(e){e[e.pytest=1]="pytest",e[e.pylint=3]="pylint",e[e.flake8=4]="flake8",e[e.pycodestyle=5]="pycodestyle",e[e.pylama=6]="pylama",e[e.prospector=7]="prospector",e[e.pydocstyle=8]="pydocstyle",e[e.yapf=9]="yapf",e[e.autopep8=10]="autopep8",e[e.mypy=11]="mypy",e[e.unittest=12]="unittest",e[e.isort=15]="isort",e[e.black=16]="black",e[e.bandit=17]="bandit",e[e.jupyter=18]="jupyter",e[e.ipykernel=19]="ipykernel",e[e.notebook=20]="notebook",e[e.kernelspec=21]="kernelspec",e[e.nbconvert=22]="nbconvert",e[e.pandas=23]="pandas",e[e.tensorboard=24]="tensorboard",e[e.torchProfilerInstallName=25]="torchProfilerInstallName",e[e.torchProfilerImportName=26]="torchProfilerImportName",e[e.pip=27]="pip",e[e.ensurepip=28]="ensurepip"}(t.Product||(t.Product={})),t.IInstaller=Symbol("IInstaller"),t.IPathUtils=Symbol("IPathUtils"),t.IRandom=Symbol("IRandom"),t.ICurrentProcess=Symbol("ICurrentProcess"),t.IConfigurationService=Symbol("IConfigurationService"),t.IToolExecutionPath=Symbol("IToolExecutionPath"),function(e){e.pipenv="pipenv"}(t.ToolExecutionPath||(t.ToolExecutionPath={})),t.ISocketServer=Symbol("ISocketServer"),t.IFileDownloader=Symbol("IFileDownloader"),t.IHttpClient=Symbol("IHttpClient"),t.IExtensionContext=Symbol("ExtensionContext"),t.IExtensions=Symbol("IExtensions"),t.IBrowserService=Symbol("IBrowserService"),t.IEditorUtils=Symbol("IEditorUtils"),t.IAsyncDisposableRegistry=Symbol("IAsyncDisposableRegistry"),t.IExperimentService=Symbol("IExperimentService"),t.IInterpreterPathService=Symbol("IInterpreterPathService"),t.IDefaultLanguageServer=Symbol("IDefaultLanguageServer")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenIterator=t.iterable=t.mapToIterator=t.chain=t.iterEmpty=t.createDeferredFromPromise=t.createDeferredFrom=t.createDeferred=t.isPromise=t.isThenable=t.sleep=void 0,t.sleep=async function(e){return new Promise(t=>{setTimeout(()=>t(e),e)})},t.isThenable=function(e){return"function"==typeof(null==e?void 0:e.then)},t.isPromise=function(e){return"function"==typeof(null==e?void 0:e.then)&&"function"==typeof(null==e?void 0:e.catch)};class i{constructor(e=null){this.scope=e,this._resolved=!1,this._rejected=!1,this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this._resolve.apply(this.scope?this.scope:this,[e]),this._resolved=!0}reject(e){this._reject.apply(this.scope?this.scope:this,[e]),this._rejected=!0}get promise(){return this._promise}get resolved(){return this._resolved}get rejected(){return this._rejected}get completed(){return this._rejected||this._resolved}}function r(e=null){return new i(e)}async function o(e,t){const n=void 0===t?-1:t;try{return{index:n,result:await e.next(),err:null}}catch(e){return{index:n,err:e,result:null}}}t.createDeferred=r,t.createDeferredFrom=function(...e){const t=r();return Promise.all(e).then(t.resolve.bind(t)).catch(t.reject.bind(t)),t},t.createDeferredFromPromise=function(e){const t=r();return e.then(t.resolve.bind(t)).catch(t.reject.bind(t)),t},t.iterEmpty=function(){return async function*(){}()};const s=new Promise(()=>{});async function*a(e,t){const n=e.map(o);let i=e.length;for(;i>0;){const{index:r,result:a,err:c}=await Promise.race(n);null!==c?(n[r]=s,i-=1,void 0!==t&&await t(c,r)):a.done?(n[r]=s,i-=1,void 0!==a.value&&(yield a.value)):(n[r]=o(e[r],r),yield a.value)}}function c(e){const t=e;return void 0===t[Symbol.asyncIterator]&&(t[Symbol.asyncIterator]=()=>t),t}t.chain=a,t.mapToIterator=async function*(e,t,n=!0){if(n){const n=e.map(e=>async function*(){yield t(e)}());yield*c(a(n))}else yield*e.map(t)},t.iterable=c,t.flattenIterator=async function(e){const t=[];for await(const n of c(e))t.push(n);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopWatch=void 0;t.StopWatch=class{constructor(){this.started=(new Date).getTime()}get elapsedTime(){return(new Date).getTime()-this.started}reset(){this.started=(new Date).getTime()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentVariablesProvider=t.IEnvironmentVariablesService=void 0,t.IEnvironmentVariablesService=Symbol("IEnvironmentVariablesService"),t.IEnvironmentVariablesProvider=Symbol("IEnvironmentVariablesProvider")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStatusItem=void 0;const i=n(0),r=n(88);t.createStatusItem=function(){if("createLanguageStatusItem"in i.languages){const e=i.languages.createLanguageStatusItem("python.projectStatus",{language:"python"});return e.name=r.LanguageService.statusItem.name(),e.severity=i.LanguageStatusSeverity.Warning,e.text=r.LanguageService.statusItem.text(),e.detail=r.LanguageService.statusItem.detail(),e.command={title:r.Common.learnMore(),command:"vscode.open",arguments:[i.Uri.parse("https://aka.ms/AAdzyh4")]},e}return{dispose:()=>{}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Common=t.LanguageService=void 0;const i=n(32);function r(e,t){return()=>i.getLocalizedString(e,t)}!function(e){e.statusItem={name:r("LanguageService.statusItem.name","Python IntelliSense Status"),text:r("LanguageService.statusItem.text","Partial Mode"),detail:r("LanguageService.statusItem.detail","Limited IntelliSense provided by Pylance")}}(t.LanguageService||(t.LanguageService={})),function(e){e.learnMore=r("Common.learnMore","Learn more")}(t.Common||(t.Common={}))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"default",(function(){return qc}));var i,r,o,s,a,c,u,l,d,p,f,g,h=n(0),m=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,C=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))y.call(t,n)&&C(e,n,t[n]);if(v)for(var n of v(t))T.call(t,n)&&C(e,n,t[n]);return e},S=(e,t)=>()=>(e&&(t=e(e=0)),t),_=(e,t,n)=>new Promise((i,r)=>{var o=e=>{try{a(n.next(e))}catch(e){r(e)}},s=e=>{try{a(n.throw(e))}catch(e){r(e)}},a=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}),E=S(()=>{i={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}}),w=S(()=>{r="function",o="object",s="undefined",a="prototype",c="hasOwnProperty",l=(u=Object)[a],d=u.assign,p=u.create,f=u.defineProperty,g=l[c]});function b(){return typeof globalThis!==s&&globalThis?globalThis:typeof self!==s&&self?self:typeof window!==s&&window?window:typeof e!==s&&e?e:null}function I(e){throw new TypeError(e)}function x(e){if(p)return p(e);if(null==e)return{};var t=typeof e;function n(){}return t!==o&&t!==r&&I("Object prototype may only be an Object:"+e),n[a]=e,new n}var P=S(()=>{w()});function D(e,t){function n(){this.constructor=e}typeof t!==r&&null!==t&&I("Class extends value "+String(t)+" is not a constructor or null"),k(e,t),e[a]=null===t?x(t):(n[a]=t[a],new n)}var N,O,k,A=S(()=>{w(),P(),(b()||{}).Symbol,(b()||{}).Reflect,N=function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])l[c].call(t,r)&&(e[r]=t[r]);return e},O=d||N,k=function(e,t){return(k=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[c](n)&&(e[n]=t[n])})(e,t)}}),L=S(()=>{}),F=S(()=>{w(),P(),A(),L()});function M(e,t){return e&&le[J].hasOwnProperty.call(e,t)}function q(e){return e&&(e===le[J]||e===Array[J])}function U(e){return q(e)||e===Function[J]}function j(e){if(e){if(de)return de(e);var t=e[ae]||e[J]||(e[X]?e[X][J]:null);if(t)return t}return null}function H(e,t){var n=[],i=le.getOwnPropertyNames;if(i)n=i(e);else for(var r in e)"string"==typeof r&&M(e,r)&&n.push(r);if(n&&n.length>0)for(var o=0;o<n.length;o++)t(n[o])}function W(e,t,n){return t!==X&&typeof e[t]===Q&&(n||M(e,t))}function K(e){throw new TypeError("DynamicProto: "+e)}function V(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function B(e,t,n,i){var r=null;if(e&&M(n,te)){var o=e[Z]||{};if((r=(o[n[te]]||{})[t])||K("Missing ["+t+"] "+Q),!r[ie]&&!1!==o[re]){for(var s=!M(e,t),a=j(e),c=[];s&&a&&!U(a)&&!V(c,a);){var u=a[t];if(u){s=u===i;break}c.push(a),a=j(a)}try{s&&(e[t]=r),r[ie]=1}catch(e){o[re]=!1}}}return r}function z(e,t,n){var i=t[e];return i===n&&(i=j(t)[e]),typeof i!==Q&&K("["+e+"] is not a "+Q),i}function G(e,t,n,i,r){if(!q(e)){var o=n[Z]=n[Z]||{},s=o[t]=o[t]||{};!1!==o[re]&&(o[re]=!!r),H(n,(function(t){W(n,t,!1)&&n[t]!==i[t]&&(s[t]=n[t],delete n[t],(!M(e,t)||e[t]&&!e[t][ee])&&(e[t]=function(e,t){var n=function(){var i=B(this,t,e,n)||z(t,e,n);return i.apply(this,arguments)};return n[ee]=1,n}(e,t)))}))}}function $(e,t){return M(e,J)?e.name||t||se:((e||{})[X]||{}).name||t||se}function Y(e,t,n,i){M(e,J)||K("theClass is an invalid class definition.");var r=e[J];(function(e,t){if(de)for(var n=[],i=j(t);i&&!U(i)&&!V(n,i);){if(i===e)return!0;n.push(i),i=j(i)}return!1})(r,t)||K("["+$(e)+"] is not in class hierarchy of ["+$(t)+"]");var o=null;M(r,te)?o=r[te]:(o=ne+$(e,"_")+"$"+pe,pe++,r[te]=o);var s=Y[oe],a=!!s[ce];a&&i&&void 0!==i[ce]&&(a=!!i[ce]);var c=function(e){var t={};return H(e,(function(n){!t[n]&&W(e,n,!1)&&(t[n]=e[n])})),t}(t);n(t,function(e,t,n,i){function r(e,t,n){var r=t[n];if(r[ee]&&i){var o=e[Z]||{};!1!==o[re]&&(r=(o[t[te]]||{})[n]||r)}return function(){return r.apply(e,arguments)}}var o={};H(n,(function(e){o[e]=r(t,n,e)}));for(var s=j(e),a=[];s&&!U(s)&&!V(a,s);)H(s,(function(e){!o[e]&&W(s,e,!de)&&(o[e]=r(t,s,e))})),a.push(s),s=j(s);return o}(r,t,c,a));var u=!!de&&!!s[ue];u&&i&&(u=!!i[ue]),G(r,o,t,c,!1!==u)}var X,J,Q,Z,ee,te,ne,ie,re,oe,se,ae,ce,ue,le,de,pe,fe,ge,he,me,ve=S(()=>{X="constructor",J="prototype",Q="function",Z="_dynInstFuncs",ee="_isDynProxy",te="_dynClass",ne="_dynCls$",re=ie="_dynInstChk",oe="_dfOpts",se="_unknown_",ae="__proto__",ce="useBaseInst",ue="setInstFuncs",de=(le=Object).getPrototypeOf,pe=0,fe={setInstFuncs:!0,useBaseInst:!0},Y[oe]=fe,ge=Y}),ye=S(()=>{var e;(e=he||(he={}))[e.CRITICAL=1]="CRITICAL",e[e.WARNING=2]="WARNING",me={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103}});function Te(e){return l.toString.call(e)}function Ce(e,t){return typeof e===t}function Re(e){return void 0===e||typeof e===s}function Se(e){return null===e||Re(e)}function _e(e){return!Se(e)}function Ee(e,t){return e&&g.call(e,t)}function we(e){return typeof e===o}function be(e){return typeof e===r}function Ie(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!Se(e))try{Se(e[nt])?Se(e[tt])||(e[tt](et+t,n),r=!0):(e[nt](t,n,i),r=!0)}catch(e){}return r}function xe(e,t,n,i){if(void 0===i&&(i=!1),!Se(e))try{Se(e[rt])?Se(e[it])||e[it](et+t,n):e[rt](t,n,i)}catch(e){}}function Pe(e,t){if(e)for(var n in e)g.call(e,n)&&t.call(e,n,e[n])}function De(e,t){return!(!e||!t)&&-1!==e.indexOf(t)}function Ne(e){return"[object Date]"===Te(e)}function Oe(e){return"[object Array]"===Te(e)}function ke(e){return"[object Error]"===Te(e)}function Ae(e){return"string"==typeof e}function Le(e){return"number"==typeof e}function Fe(e){return"boolean"==typeof e}function Me(e){if(Ne(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}function qe(e,t,n){for(var i=e.length,r=0;r<i&&(!(r in e)||-1!==t.call(n||e,e[r],r,e));r++);}function Ue(e,t,n){for(var i=e.length,r=n||0,o=Math.max(r>=0?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===t)return o;return-1}function je(e,t,n){for(var i=e.length,r=n||e,o=new Array(i),s=0;s<i;s++)s in e&&(o[s]=t.call(r,e[s],e));return o}function He(e,t,n){var i,r=e.length,o=0;if(arguments.length>=3)i=arguments[2];else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i}function We(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}function Ke(e){var t=typeof e;t!==r&&(t!==o||null===e)&&I("objKeys called on non-object");var n=[];for(var i in e)e&&g.call(e,i)&&n.push(i);if(st)for(var s=at.length,a=0;a<s;a++)e&&g.call(e,at[a])&&n.push(at[a]);return n}function Ve(e,t,n,i){if(ot)try{var r={enumerable:!0,configurable:!0};return n&&(r.get=n),i&&(r.set=i),ot(e,t,r),!0}catch(e){}return!1}function Be(){var e=Date;return e.now?e.now():(new e).getTime()}function ze(e){return ke(e)?e.name:""}function Ge(e,t,n,i,r){var o=n;return e&&((o=e[t])!==n&&(!r||r(o))&&(!i||i(n))&&(o=n,e[t]=o)),o}function $e(e,t,n){var i;return e?!(i=e[t])&&Se(i)&&(i=Re(n)?{}:n,e[t]=i):i=Re(n)?{}:n,i}function Ye(e){return!e}function Xe(e){return!!e}function Je(e){throw new Error(e)}function Qe(e,t,n){if(e&&t&&e!==t&&we(e)&&we(t)){var i=function(i){if(Ae(i)){var r=t[i];be(r)?(!n||n(i,!0,t,e))&&(e[i]=(o=i,function(){var e=arguments;return t[o].apply(t,e)})):(!n||n(i,!1,t,e))&&(Ee(e,i)&&delete e[i],Ve(e,i,(function(){return t[i]}),(function(e){t[i]=e}))||(e[i]=r))}var o};for(var r in t)i(r)}return e}function Ze(e){return e&&(e=u(d?d({},e):e)),e}var et,tt,nt,it,rt,ot,st,at,ct=S(()=>{F(),et="on",tt="attachEvent",nt="addEventListener",it="detachEvent",rt="removeEventListener",ot=f,u.freeze,u.seal,st=!{toString:null}.propertyIsEnumerable("toString"),at=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]});function ut(e){var t=b();return t&&t[e]?t[e]:e===_t&&lt()?window:null}function lt(){return Boolean(typeof window===o&&window)}function dt(){return lt()?window:ut(_t)}function pt(){return Boolean(typeof document===o&&document)}function ft(){return pt()?document:ut(Et)}function gt(){return Boolean(typeof navigator===o&&navigator)?navigator:ut(wt)}function ht(){return Boolean(typeof history===o&&history)?history:ut(bt)}function mt(e){if(e&&qt){var t=ut("__mockLocation");if(t)return t}return typeof location===o&&location?location:ut(It)}function vt(){return ut(Pt)}function yt(){return Boolean(typeof JSON===o&&JSON||null!==ut(Dt))}function Tt(){return yt()?JSON||ut(Dt):null}function Ct(){var e=gt();if(e&&(e.userAgent!==Mt||null===Ft)){var t=((Mt=e.userAgent)||"").toLowerCase();Ft=De(t,At)||De(t,Lt)}return Ft}function Rt(e){if(void 0===e&&(e=null),!e){var t=gt()||{};e=t?(t.userAgent||"").toLowerCase():""}var n=(e||"").toLowerCase();if(De(n,At))return parseInt(n.split(At)[1]);if(De(n,Lt)){var i=parseInt(n.split(Lt)[1]);if(i)return i+4}return null}function St(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":yt()&&(n=Tt().stringify(e)),t+n}var _t,Et,wt,bt,It,xt,Pt,Dt,Nt,Ot,kt,At,Lt,Ft,Mt,qt,Ut=S(()=>{F(),ct(),_t="window",Et="document",wt="navigator",bt="history",It="location",xt="console",Pt="performance",Dt="JSON",Nt="crypto",Ot="msCrypto",kt="ReactNative",At="msie",Lt="trident/",Ft=null,Mt=null,qt=!1});function jt(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function Ht(e,t){return(e||{}).logger||new Kt(t)}var Wt,Kt,Vt=S(()=>{ye(),Ut(),ve(),ct(),"AI (Internal): ","AI: ","AITR_",Wt=function(){function e(e,t,n,i){void 0===n&&(n=!1);var r=this;r.messageId=e,r.message=(n?"AI: ":"AI (Internal): ")+e;var o="";yt()&&(o=Tt().stringify(i));var s=(t?" message:"+jt(t):"")+(i?" props:"+jt(o):"");r.message+=s}return e.dataType="MessageData",e}(),Kt=function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n=0,i={};ge(e,this,(function(e){function r(e,n){var i=t[e];return Se(i)?n:i}Se(t)&&(t={}),e.consoleLoggingLevel=function(){return r("loggingLevelConsole",0)},e.telemetryLoggingLevel=function(){return r("loggingLevelTelemetry",1)},e.maxInternalMessageLimit=function(){return r("maxMessageLimit",25)},e.enableDebugExceptions=function(){return r("enableDebugExceptions",!1)},e.throwInternal=function(t,n,r,o,s){void 0===s&&(s=!1);var a=new Wt(n,r,s,o);if(e.enableDebugExceptions())throw a;if(!Re(a.message)){var c=e.consoleLoggingLevel();if(s){var u=+a.messageId;!i[u]&&c>=he.WARNING&&(e.warnToConsole(a.message),i[u]=!0)}else c>=he.WARNING&&e.warnToConsole(a.message);e.logInternalMessage(t,a)}},e.warnToConsole=function(e){var t=typeof console!==s?console:ut(xt);if(t){var n="log";t.warn&&(n="warn"),be(t[n])&&t[n](e)}},e.resetInternalMessageCount=function(){n=0,i={}},e.logInternalMessage=function(t,r){if(!(n>=e.maxInternalMessageLimit())){var o=!0,s="AITR_"+r.messageId;if(i[s]?o=!1:i[s]=!0,o&&(t<=e.telemetryLoggingLevel()&&(e.queue.push(r),n++),n===e.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",c=new Wt(me.MessageLimitPerPVExceeded,a,!1);e.queue.push(c),e.warnToConsole(a)}}}}))}});function Bt(e,t,n,i,r){if(e){var o=e;if(be(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var s=void 0,a=o.getCtx($t);try{if(s=o.create(t(),i,r)){if(a&&s.setCtx&&(s.setCtx(zt.ParentContextKey,a),a.getCtx&&a.setCtx)){var c=a.getCtx(zt.ChildrenContextKey);c||(c=[],a.setCtx(zt.ChildrenContextKey,c)),c.push(s)}return o.setCtx($t,s),n(s)}}catch(e){s&&s.setCtx&&s.setCtx("exception",e)}finally{s&&o.fire(s),o.setCtx($t,a)}}}return n()}var zt,Gt,$t,Yt,Xt=S(()=>{ve(),ct(),"ctx",zt=function(){function e(t,n,i){var r,o=this,s=!1;(o.start=Be(),o.name=t,o.isAsync=i,o.isChildEvt=function(){return!1},be(n))&&(s=Ve(o,"payload",(function(){return!r&&be(n)&&(r=n(),n=null),r})));o.getCtx=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?o[t]:(o.ctx||{})[t]:null},o.setCtx=function(t,n){if(t)if(t===e.ParentContextKey)o[t]||(o.isChildEvt=function(){return!0}),o[t]=n;else if(t===e.ChildrenContextKey)o[t]=n;else{(o.ctx=o.ctx||{})[t]=n}},o.complete=function(){var t=0,i=o.getCtx(e.ChildrenContextKey);if(Oe(i))for(var r=0;r<i.length;r++){var a=i[r];a&&(t+=a.time)}o.time=Be()-o.start,o.exTime=o.time-t,o.complete=function(){},!s&&be(n)&&(o.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),Gt=function e(t){this.ctx={},ge(e,this,(function(e){e.create=function(e,t,n){return new zt(e,t,n)},e.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},e.setCtx=function(t,n){t&&((e.ctx=e.ctx||{})[t]=n)},e.getCtx=function(t){return(e.ctx||{})[t]}}))},$t="CoreUtils.doPerf"}),Jt=S(()=>{Xt(),ye(),ct(),Yt=function(e,t){var n=this,i=null,r=be(e.processTelemetry),o=be(e.setNextPlugin);n._hasRun=!1,n.getPlugin=function(){return e},n.getNext=function(){return i},n.setNext=function(e){i=e},n.processTelemetry=function(s,a){a||(a=t);var c=e?e.identifier:"TelemetryPluginChain";Bt(a?a.core():null,(function(){return c+":processTelemetry"}),(function(){if(e&&r){n._hasRun=!0;try{a.setNext(i),o&&e.setNextPlugin(i),i&&(i._hasRun=!1),e.processTelemetry(s,a)}catch(n){var t=i&&i._hasRun;(!i||!t)&&a.diagLog().throwInternal(he.CRITICAL,me.PluginException,"Plugin ["+e.identifier+"] failed during processTelemetry - "+n),i&&!t&&i.processTelemetry(s,a)}}else i&&(n._hasRun=!0,i.processTelemetry(s,a))}),(function(){return{item:s}}),!s.sync)}}});function Qt(e,t){var n=[];if(e&&e.length>0)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&be(o.processTelemetry)){var s=new Yt(o,t);n.push(s),i&&i.setNext(s),i=s}}return n.length>0?n[0]:null}var Zt,en,tn,nn,rn,on=S(()=>{Vt(),Jt(),ct(),Zt=function e(t,n,i,r){var o=this,s=null;null!==r&&(t&&be(t.getPlugin)?s=function(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();(r||o===n)&&(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),Qt(i,t)}(t,o,r||t.getPlugin()):r?s=function(e,t,n){var i=e,r=!1;return n&&e&&(i=[],qe(e,(function(e){(r||e===n)&&(r=!0,i.push(e))}))),n&&!r&&(i||(i=[]),i.push(n)),Qt(i,t)}(t,o,r):Re(r)&&(s=Qt(t,o))),o.core=function(){return i},o.diagLog=function(){return Ht(i,n)},o.getCfg=function(){return n},o.getExtCfg=function(e,t){var i;if(void 0===t&&(t={}),n){var r=n.extensionConfig;r&&e&&(i=r[e])}return i||t},o.getConfig=function(e,t,i){void 0===i&&(i=!1);var r,s=o.getExtCfg(e,null);return s&&!Se(s[t])?r=s[t]:n&&!Se(n[t])&&(r=n[t]),Se(r)?i:r},o.hasNext=function(){return null!=s},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processNext=function(e){var t=s;t&&(s=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(t,r){return void 0===t&&(t=null),new e(t||s,n,i,r)}}}),sn=S(()=>{en="iKey",tn="extensionConfig"}),an=S(()=>{on(),ct(),sn(),nn="getPlugin",rn=function(){function e(){var e=this,t=!1,n=null,i=null;e.core=null,e.diagLog=function(t){return e._getTelCtx(t).diagLog()},e.isInitialized=function(){return t},e.setInitialized=function(e){t=e},e.setNextPlugin=function(e){i=e},e.processNext=function(e,t){t?t.processNext(e):i&&be(i.processTelemetry)&&i.processTelemetry(e,null)},e._getTelCtx=function(t){void 0===t&&(t=null);var r=t;if(!r){var o=n||new Zt(null,{},e.core);r=i&&i[nn]?o.createNew(null,i[nn]):o.createNew(null,i)}return r},e._baseTelInit=function(r,o,s,a){r&&Ge(r,tn,[],null,Se),!a&&o&&(a=o.getProcessTelContext().getNext());var c=i;i&&i[nn]&&(c=i[nn]()),e.core=o,n=new Zt(a,r,o,c),t=!0}}return e.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},e}()});function cn(e,t){for(var n=[],i=null,r=e.getNext();r;){var o=r.getPlugin();o&&(i&&be(i[pn])&&be(o[ln])&&i[pn](o),(!be(o[fn])||!o[fn]())&&n.push(o),i=o,r=r.getNext())}qe(n,(function(n){n.initialize(e.getCfg(),e.core(),t,e.getNext())}))}function un(e){return e.sort((function(e,t){var n=0,i=be(t[ln]);return be(e[ln])?n=i?e[dn]-t[dn]:1:i&&(n=-1),n}))}var ln,dn,pn,fn,gn,hn=S(()=>{ct(),ln="processTelemetry",dn="priority",pn="setNextPlugin",fn="isInitialized"}),mn=S(()=>{F(),ve(),an(),on(),hn(),ct(),500,"Channel has invalid priority",gn=function(e){function t(){var n,i=e.call(this)||this;function r(e){e&&e.length>0&&(function(e){qe(e,(function(e){e.priority<500&&Je("Channel has invalid priority"+e.identifier)}))}(e=e.sort((function(e,t){return e.priority-t.priority}))),n.push(e))}return i.identifier="ChannelControllerPlugin",i.priority=500,ge(t,i,(function(e,t){e.setNextPlugin=function(e){},e.processTelemetry=function(e,t){n&&qe(n,(function(n){n.length>0&&i._getTelCtx(t).createNew(n).processNext(e)}))},e.getChannelControls=function(){return n},e.initialize=function(i,o,s){e.isInitialized()||(t.initialize(i,o,s),function(e,t){if(n=[],e&&qe(e,(function(e){return r(e)})),t){var i=[];qe(t,(function(e){e.priority>500&&i.push(e)})),r(i)}}((i||{}).channels,s),qe(n,(function(e){return cn(new Zt(e,i,o),s)})))}})),i}return D(t,e),t._staticInit=(Ve(n=t.prototype,"ChannelControls",n.getChannelControls),void Ve(n,"channelQueue",n.getChannelControls)),t;var n}(rn)});function vn(e,t){var n=Cn[Ln]||Wn[Ln];return n||(n=Cn[Ln]=Cn(e,t),Wn[Ln]=n),n}function yn(e){return!e||e.isEnabled()}function Tn(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var i=t.cookieCfg;n=i[Ln]?i[Ln]:Cn(t)}return n||(n=vn(t,(e||{}).logger)),n}function Cn(e,t){var n=function(e){var t=e.cookieCfg=e.cookieCfg||{};if(Ge(t,"domain",e.cookieDomain,_e,Se),Ge(t,"path",e.cookiePath||"/",null,Se),Se(t[On])){var n=void 0;Re(e[kn])||(n=!e[kn]),Re(e[An])||(n=!e[An]),t[On]=n}return t}(e||Wn),i=n.path||"/",r=n.domain,o=!1!==n[On],s={isEnabled:function(){var e=o&&Rn(t),n=Wn[Ln];return e&&n&&s!==n&&(e=yn(n)),e},setEnabled:function(e){o=!1!==e},set:function(e,t,o,a,c){if(yn(s)){var u={},l=We(t||Fn),d=l.indexOf(";");if(-1!==d&&(l=We(t.substring(0,d)),u=Sn(t.substring(d+1))),Ge(u,"domain",a||r,Xe,Re),!Se(o)){var p=Ct();if(Re(u[Nn])){var f=Be()+1e3*o;if(f>0){var g=new Date;g.setTime(f),Ge(u,Nn,_n(g,p?xn:Pn)||_n(g,p?xn:Pn)||Fn,Xe)}}p||Ge(u,"max-age",Fn+o,null,Re)}var h=mt();h&&"https:"===h.protocol&&(Ge(u,"secure",null,null,Re),null===qn&&(qn=!In((gt()||{}).userAgent)),qn&&Ge(u,"SameSite","None",null,Re)),Ge(u,"path",c||i,null,Re),(n.setCookie||bn)(e,En(l,u))}},get:function(e){var t=Fn;return yn(s)&&(t=(n.getCookie||wn)(e)),t},del:function(e,t){yn(s)&&s.purge(e,t)},purge:function(e,i){if(Rn(t)){var r=((o={}).path=i||"/",o[Nn]="Thu, 01 Jan 1970 00:00:01 GMT",o);Ct()||(r["max-age"]="0"),(n.delCookie||bn)(e,En(Fn,r))}var o}};return s[Ln]=s,s}function Rn(e){if(null===Mn){Mn=!1;try{Mn=void 0!==(jn||{})[Dn]}catch(t){e&&e.throwInternal(he.WARNING,me.CannotAccessCookie,"Cannot access document.cookie - "+ze(t),{exception:St(t)})}}return Mn}function Sn(e){var t={};e&&e.length&&qe(We(e).split(";"),(function(e){if(e=We(e||Fn)){var n=e.indexOf("=");-1===n?t[e]=null:t[We(e.substring(0,n))]=We(e.substring(n+1))}}));return t}function _n(e,t){return be(e[t])?e[t]():null}function En(e,t){var n=e||Fn;return Pe(t,(function(e,t){n+="; "+e+(Se(t)?Fn:"="+t)})),n}function wn(e){var t=Fn;if(jn){var n=jn[Dn]||Fn;Un!==n&&(Hn=Sn(n),Un=n),t=We(Hn[e]||Fn)}return t}function bn(e,t){jn&&(jn[Dn]=e+"="+t)}function In(e){return!!Ae(e)&&!!(De(e,"CPU iPhone OS 12")||De(e,"iPad; CPU OS 12")||De(e,"Macintosh; Intel Mac OS X 10_14")&&De(e,"Version/")&&De(e,"Safari")||De(e,"Macintosh; Intel Mac OS X 10_14")&&function(e,t){if(e&&t){var n=t.length,i=e.length;if(e===t)return!0;if(i>=n){for(var r=i-1,o=n-1;o>=0;o--){if(e[r]!=t[o])return!1;r--}return!0}}return!1}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||De(e,"Chrome/5")||De(e,"Chrome/6")||De(e,"UnrealEngine")&&!De(e,"Chrome")||De(e,"UCBrowser/12")||De(e,"UCBrowser/11"))}var xn,Pn,Dn,Nn,On,kn,An,Ln,Fn,Mn,qn,Un,jn,Hn,Wn,Kn,Vn,Bn,zn,Gn=S(()=>{ye(),Ut(),ct(),xn="toGMTString",Pn="toUTCString",Dn="cookie",Nn="expires",On="enabled",kn="isCookieUseDisabled",An="disableCookiesUsage",Ln="_ckMgr",Fn="",Mn=null,qn=null,Un=null,jn=ft(),Hn={},Wn={}}),$n=S(()=>{F(),ve(),mn(),on(),hn(),Xt(),Gn(),ct(),sn(),"Extensions must provide callback to initialize",Kn="_notificationManager",Vn=function e(){var t,n,i,r,o,s=!1;ge(e,this,(function(e){e._extensions=new Array,n=new gn,e.logger=x({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),t=[],e.isInitialized=function(){return s},e.initialize=function(t,r,o,a){e.isInitialized()&&Je("Core should not be initialized more than once"),(!t||Se(t.instrumentationKey))&&Je("Please provide instrumentation key"),i=a,e[Kn]=a,e.config=t||{},t.extensions=Se(t.extensions)?[]:t.extensions,$e(t,tn).NotificationManager=a,o&&(e.logger=o);var c=[];c.push.apply(c,r.concat(t.extensions)),c=un(c);var u=[],l=[],d={};qe(c,(function(e){(Se(e)||Se(e.initialize))&&Je("Extensions must provide callback to initialize");var t=e.priority,i=e.identifier;e&&t&&(Se(d[t])?d[t]=i:o.warnToConsole("Two extensions have same priority #"+t+" - "+d[t]+", "+i)),!t||t<n.priority?u.push(e):l.push(e)})),c.push(n),u.push(n),c=un(c),e._extensions=c,cn(new Zt([n],t,e),c),cn(new Zt(u,t,e),c),e._extensions=u,0===e.getTransmissionControls().length&&Je("No channels available"),s=!0,e.releaseQueue()},e.getTransmissionControls=function(){return n.getChannelControls()},e.track=function(n){Ge(n,en,e.config.instrumentationKey,null,Ye),Ge(n,"time",Me(new Date),null,Ye),Ge(n,"ver","4.0",null,Se),e.isInitialized()?e.getProcessTelContext().processNext(n):t.push(n)},e.getProcessTelContext=function(){var t=e._extensions,i=t;return(!t||0===t.length)&&(i=[n]),new Zt(i,e.config,e)},e.getNotifyMgr=function(){return i||(i=x({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),e[Kn]=i),i},e.getCookieMgr=function(){return o||(o=Cn(e.config,e.logger)),o},e.setCookieMgr=function(e){o=e},e.getPerfMgr=function(){return r||e.config&&e.config.enablePerfMgr&&(r=new Gt(e.getNotifyMgr())),r},e.setPerfMgr=function(e){r=e},e.eventCnt=function(){return t.length},e.releaseQueue=function(){t.length>0&&(qe(t,(function(t){e.getProcessTelContext().processNext(t)})),t=[])}}))}}),Yn=S(()=>{ve(),ct(),Bn=function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;ge(e,this,(function(e){e.addNotificationListener=function(t){e.listeners.push(t)},e.removeNotificationListener=function(t){for(var n=Ue(e.listeners,t);n>-1;)e.listeners.splice(n,1),n=Ue(e.listeners,t)},e.eventsSent=function(t){qe(e.listeners,(function(e){e&&e.eventsSent&&setTimeout((function(){return e.eventsSent(t)}),0)}))},e.eventsDiscarded=function(t,n){qe(e.listeners,(function(e){e&&e.eventsDiscarded&&setTimeout((function(){return e.eventsDiscarded(t,n)}),0)}))},e.eventsSendRequest=function(t,n){qe(e.listeners,(function(e){if(e&&e.eventsSendRequest)if(n)setTimeout((function(){return e.eventsSendRequest(t,n)}),0);else try{e.eventsSendRequest(t,n)}catch(e){}}))},e.perfEvent=function(t){t&&(n||!t.isChildEvt())&&qe(e.listeners,(function(e){if(e&&e.perfEvent)if(t.isAsync)setTimeout((function(){return e.perfEvent(t)}),0);else try{e.perfEvent(t)}catch(e){}}))}}))}}),Xn=S(()=>{F(),$n(),E(),Yn(),Xt(),Vt(),ve(),ct(),zn=function(e){function t(){var n=e.call(this)||this;return ge(t,n,(function(e,t){function n(t){var n=e.getNotifyMgr();n&&n.eventsDiscarded([t],i.InvalidEvent)}e.initialize=function(e,n,i,r){t.initialize(e,n,i||new Kt(e),r||new Bn(e))},e.track=function(i){Bt(e.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){null===i&&(n(i),Je("Invalid telemetry item")),function(e){if(Se(e.name))throw n(e),Error("telemetry name required")}(i),t.track(i)}),(function(){return{item:i}}),!i.sync)},e.addNotificationListener=function(t){var n=e.getNotifyMgr();n&&n.addNotificationListener(t)},e.removeNotificationListener=function(t){var n=e.getNotifyMgr();n&&n.removeNotificationListener(t)},e.pollInternalLogs=function(t){var n=e.config.diagnosticLogInterval;return(!n||!(n>0))&&(n=1e4),setInterval((function(){var n=e.logger?e.logger.queue:[];qe(n,(function(n){var i={name:t||"InternalMessageId: "+n.messageId,iKey:e.config.instrumentationKey,time:Me(new Date),baseType:Wt.dataType,baseData:{message:n.message}};e.track(i)})),n.length=0}),n)}})),n}return D(t,e),t}(Vn)});function Jn(e){e<0&&(e>>>=0),si=123456789+e&ri,ai=987654321-e&ri,oi=!0}function Qn(){try{var e=2147483647&Be();Jn((Math.random()*ii^e)+e)}catch(e){}}function Zn(e){return e>0?Math.floor(ei()/ri*(e+1))>>>0:0}function ei(e){var t,n=ut(Nt)||ut(Ot);return n&&n.getRandomValues?t=n.getRandomValues(new Uint32Array(1))[0]&ri:Ct()?(oi||Qn(),t=ni()&ri):t=Math.floor(ii*Math.random()|0),e||(t>>>=0),t}function ti(e){e?Jn(e):Qn()}function ni(e){var t=((ai=36969*(65535&ai)+(ai>>16)&ri)<<16)+(65535&(si=18e3*(65535&si)+(si>>16)&ri))>>>0&ri|0;return e||(t>>>=0),t}var ii,ri,oi,si,ai,ci=S(()=>{Ut(),ct(),ii=4294967296,ri=4294967295,oi=!1,si=123456789,ai=987654321});function ui(e,t){var n=!1,i=dt();i&&(n=Ie(i,e,t),n=Ie(i.body,e,t)||n);var r=ft();return r&&(n=Ei.Attach(r,e,t)||n),n}function li(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(_i,(function(e){var t=0|Zn(15);return("x"===e?t:3&t|8).toString(16)}))}function di(){var e=vt();return e&&e.now?e.now():Be()}function pi(e){void 0===e&&(e=22);for(var t=ei()>>>0,n=0,i="";i.length<e;)n++,i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(ei()<<2&4294967295|3&t)>>>0,n=0);return i}function fi(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=ei())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+(3&ei())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)}function gi(e,t){var n=vn(e,t),i=Si._canUseCookies;return null===Ci&&(Ci=[],Ri=i,Ve(Si,"_canUseCookies",(function(){return Ri}),(function(e){Ri=e,qe(Ci,(function(t){t.setEnabled(e)}))}))),-1===Ue(Ci,n)&&Ci.push(n),Fe(i)&&n.setEnabled(i),Fe(Ri)&&n.setEnabled(Ri),n}function hi(){gi().setEnabled(!1)}function mi(e){return gi(null,e).isEnabled()}function vi(e,t){return gi(null,e).get(t)}function yi(e,t,n,i){gi(null,e).set(t,n,null,i)}function Ti(e,t){return gi(null,e).del(t)}var Ci,Ri,Si,_i,Ei,wi=S(()=>{F(),Gn(),Ut(),ct(),ci(),Ci=null,Si={_canUseCookies:void 0,isTypeof:Ce,isUndefined:Re,isNullOrUndefined:Se,hasOwnProperty:Ee,isFunction:be,isObject:we,isDate:Ne,isArray:Oe,isError:ke,isString:Ae,isNumber:Le,isBoolean:Fe,toISOString:Me,arrForEach:qe,arrIndexOf:Ue,arrMap:je,arrReduce:He,strTrim:We,objCreate:x,objKeys:Ke,objDefineAccessors:Ve,addEventHandler:ui,dateNow:Be,isIE:Ct,disableCookies:hi,newGuid:li,perfNow:di,newId:pi,randomValue:Zn,random32:ei,mwcRandomSeed:ti,mwcRandom32:ni,generateW3CId:fi},_i=/[xy]/g,Ei={Attach:Ie,AttachEvent:Ie,Detach:xe,DetachEvent:xe}});function bi(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Ii(e,t,n,i,r){r>=0&&r<=2&&bi(e,(function(e,o){var s=e.cbks,a=s[Ni[r]];if(a){t.ctx=function(){return i[o]=i[o]||{}};try{a.apply(t.inst,n)}catch(e){var c=t.err;try{var u=s[Ni[2]];u&&(t.err=e,u.apply(t.inst,n))}catch(e){}finally{t.err=c}}}}))}function xi(e,t,n){var i=null;return e&&(Ee(e,t)?i=e:n&&(i=xi(function(e){if(e){if(Ai)return Ai(e);var t=e[Oi]||e[a]||e[ki];if(t)return t}return null}(e),t,!1))),i}function Pi(e,t,n,i){if(void 0===i&&(i=!0),e&&t&&n){var o=xi(e,t,i);if(o){var s=o[t];if(typeof s===r){var a=s[Di];if(!a){var c=function(e){return function(){var t=this,n=arguments,i=e.h,r={name:e.n,inst:t,ctx:null,set:c},o=[],s=a([r],n);function a(e,t){return bi(t,(function(t){e.push(t)})),e}function c(e,t){(n=a([],n))[e]=t,s=a([r],n)}Ii(i,r,s,o,0);var u=e.f;try{r.rslt=u.apply(t,n)}catch(e){throw r.err=e,Ii(i,r,s,o,3),e}return Ii(i,r,s,o,1),r.rslt}}(a={i:0,n:t,f:s,h:[]});c[Di]=a,o[t]=c}var u={id:a.i,cbks:n,rm:function(){var e=this.id;bi(a.h,(function(t,n){if(t.id===e)return a.h.splice(n,1),1}))}};return a.i++,a.h.push(u),u}}}return null}var Di,Ni,Oi,ki,Ai,Li,Fi=S(()=>{F(),ct(),Di="_aiHooks",Ni=["req","rsp","hkErr","fnErr"],Oi="__proto__",ki="constructor",Ai=Object.getPrototypeOf}),Mi=S(()=>{Xn(),$n(),an(),ci(),wi(),ct(),Ut(),F(),Yn(),Xt(),Vt(),ye(),Fi(),Gn()}),qi=S(()=>{Li={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"}});function Ui(e,t,n){var i=t.length,r=ji(e,t);if(r.length!==i){for(var o=0,s=r;void 0!==n[s];)o++,s=r.substring(0,147)+Yi(o);r=s}return r}function ji(e,t){var n;return t&&((t=We(t.toString())).length>150&&(n=t.substring(0,150),e.throwInternal(he.WARNING,me.NameTooLong,"name is too long.  It has been truncated to 150 characters.",{name:t},!0))),n||t}function Hi(e,t,n){var i;return void 0===n&&(n=1024),t&&(n=n||1024,(t=We(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(he.WARNING,me.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t}function Wi(e,t){return $i(e,t,2048,me.UrlTooLong)}function Ki(e,t){var n;return t&&t.length>32768&&(n=t.substring(0,32768),e.throwInternal(he.WARNING,me.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),n||t}function Vi(e,t){var n;if(t){var i=""+t;i.length>32768&&(n=i.substring(0,32768),e.throwInternal(he.WARNING,me.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0))}return n||t}function Bi(e,t){if(t){var n={};Pe(t,(function(t,i){if(we(i)&&yt())try{i=Tt().stringify(i)}catch(t){e.throwInternal(he.WARNING,me.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}i=Hi(e,i,8192),t=Ui(e,t,n),n[t]=i})),t=n}return t}function zi(e,t){if(t){var n={};Pe(t,(function(t,i){t=Ui(e,t,n),n[t]=i})),t=n}return t}function Gi(e,t){return t&&$i(e,t,128,me.IdTooLong).toString()}function $i(e,t,n,i){var r;return t&&((t=We(t)).length>n&&(r=t.substring(0,n),e.throwInternal(he.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0))),r||t}function Yi(e){var t="00"+e;return t.substr(t.length-3)}var Xi,Ji=S(()=>{Mi(),Xi={MAX_NAME_LENGTH:150,MAX_ID_LENGTH:128,MAX_PROPERTY_LENGTH:8192,MAX_STRING_LENGTH:1024,MAX_URL_LENGTH:2048,MAX_MESSAGE_LENGTH:32768,MAX_EXCEPTION_LENGTH:32768,sanitizeKeyAndAddUniqueness:Ui,sanitizeKey:ji,sanitizeString:Hi,sanitizeUrl:Wi,sanitizeMessage:Ki,sanitizeException:Vi,sanitizeProperties:Bi,sanitizeMeasurements:zi,sanitizeId:Gi,sanitizeInput:$i,padNumber:Yi,trim:We}});function Qi(e){var t=null;if(be(Event))t=new Event(e);else{var n=ft();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t}var Zi=S(()=>{Mi()});function er(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()}function tr(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(o>0?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t}function nr(){var e=gt();return"sendBeacon"in e&&e.sendBeacon}function ir(e,t){var n=null;return qe(e,(function(e){if(e.identifier===t)return n=e,-1})),n}function rr(e,t,n,i,r){return!r&&Ae(e)&&("Script error."===e||"Script error"===e)}var or,sr,ar,cr,ur,lr,dr,pr,fr=S(()=>{Mi()}),gr=S(()=>{or="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",sr="sampleRate",ar="ProcessLegacy",cr="http.method",ur="https://dc.services.visualstudio.com",lr="not_specified"}),hr=S(()=>{var e;(e=dr||(dr={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",function(e){e[e.AI=0]="AI",e[e.AI_AND_W3C=1]="AI_AND_W3C",e[e.W3C=2]="W3C"}(pr||(pr={}))});function mr(){return Cr()?vr(dr.LocalStorage):null}function vr(e){try{if(Se(b()))return null;var t=new Date,n=ut(e===dr.LocalStorage?"localStorage":"sessionStorage");n.setItem(t.toString(),t.toString());var i=n.getItem(t.toString())!==t.toString();if(n.removeItem(t.toString()),!i)return n}catch(e){}return null}function yr(){return Er()?vr(dr.SessionStorage):null}function Tr(){Pr=!1,Dr=!1}function Cr(){return void 0===Pr&&(Pr=!!vr(dr.LocalStorage)),Pr}function Rr(e,t){var n=mr();if(null!==n)try{return n.getItem(t)}catch(t){Pr=!1,e.throwInternal(he.WARNING,me.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+ze(t),{exception:St(t)})}return null}function Sr(e,t,n){var i=mr();if(null!==i)try{return i.setItem(t,n),!0}catch(t){Pr=!1,e.throwInternal(he.WARNING,me.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+ze(t),{exception:St(t)})}return!1}function _r(e,t){var n=mr();if(null!==n)try{return n.removeItem(t),!0}catch(t){Pr=!1,e.throwInternal(he.WARNING,me.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+ze(t),{exception:St(t)})}return!1}function Er(){return void 0===Dr&&(Dr=!!vr(dr.SessionStorage)),Dr}function wr(){var e=[];return Er()&&Pe(ut("sessionStorage"),(function(t){e.push(t)})),e}function br(e,t){var n=yr();if(null!==n)try{return n.getItem(t)}catch(t){Dr=!1,e.throwInternal(he.WARNING,me.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+ze(t),{exception:St(t)})}return null}function Ir(e,t,n){var i=yr();if(null!==i)try{return i.setItem(t,n),!0}catch(t){Dr=!1,e.throwInternal(he.WARNING,me.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+ze(t),{exception:St(t)})}return!1}function xr(e,t){var n=yr();if(null!==n)try{return n.removeItem(t),!0}catch(t){Dr=!1,e.throwInternal(he.WARNING,me.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+ze(t),{exception:St(t)})}return!1}var Pr,Dr,Nr=S(()=>{Mi(),hr(),Pr=void 0,Dr=void 0});function Or(e){var t=Ur,n=jr,i=n[t];return qr.createElement?n[t]||(i=n[t]=qr.createElement("a")):i={host:Fr(e,!0)},i.href=e,++t>=n.length&&(t=0),Ur=t,i}function kr(e){var t,n=Or(e);return n&&(t=n.href),t}function Ar(e){var t,n=Or(e);return n&&(t=n.pathname),t}function Lr(e,t){return e?e.toUpperCase()+" "+t:t}function Fr(e,t){var n=Mr(e,t)||"";if(n){var i=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>3&&Ae(i[2])&&i[2].length>0)return i[2]+(i[3]||"")}return n}function Mr(e,t){var n=null;if(e){var i=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&Ae(i[2])&&i[2].length>0&&(n=i[2]||"",t&&i.length>2)){var r=(i[1]||"").toLowerCase(),o=i[3]||"";("http"===r&&":80"===o||"https"===r&&":443"===o)&&(o=""),n+=o}}return n}var qr,Ur,jr,Hr=S(()=>{Mi(),qr=ft()||{},Ur=0,jr=[null,null,null,null,null]});function Wr(e){return-1!==Br.indexOf(e.toLowerCase())}function Kr(){var e=vt();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0)return t}return Be()}function Vr(e,t){var n=null;return 0!==e&&0!==t&&!Se(e)&&!Se(t)&&(n=t-e),n}var Br,zr,Gr,$r,Yr,Xr=S(()=>{Mi(),qi(),Ji(),Zi(),fr(),gr(),Nr(),Hr(),Br=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],zr={NotSpecified:lr,createDomEvent:Qi,disableStorage:Tr,isInternalApplicationInsightsEndpoint:Wr,canUseLocalStorage:Cr,getStorage:Rr,setStorage:Sr,removeStorage:_r,canUseSessionStorage:Er,getSessionStorageKeys:wr,getSessionStorage:br,setSessionStorage:Ir,removeSessionStorage:xr,disableCookies:hi,canUseCookies:mi,disallowsSameSiteNone:In,setCookie:yi,stringToBoolOrDefault:er,getCookie:vi,deleteCookie:Ti,trim:We,newId:pi,random32:function(){return ei(!0)},generateW3CId:fi,isArray:Oe,isError:ke,isDate:Ne,toISOStringForIE8:Me,getIEVersion:Rt,msToTimeSpan:tr,isCrossOriginError:rr,dump:St,getExceptionName:ze,addEventHandler:Ie,IsBeaconApiSupported:nr,getExtension:ir},Gr={parseUrl:Or,getAbsoluteUrl:kr,getPathName:Ar,getCompleteUrl:Lr,parseHost:Fr,parseFullHost:Mr},$r={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var i=0;i<e.correlationHeaderExcludePatterns.length;i++)if(e.correlationHeaderExcludePatterns[i].test(t))return!1;var r=Or(t).host.toLowerCase();if(r&&(-1!==r.indexOf(":443")||-1!==r.indexOf(":80"))&&(r=(Mr(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&r&&r!==n)return!1;var o,s=e&&e.correlationHeaderDomains;if(s&&(qe(s,(function(e){var t=new RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));o=o||t.test(r)})),!o))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++){if(new RegExp(a[i].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(r))return!1}return r&&r.length>0},getCorrelationContext:function(e){if(e){var t=$r.getCorrelationContextValue(e,Li.requestContextTargetKey);if(t&&t!==$r.correlationIdPrefix)return t}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),i=0;i<n.length;++i){var r=n[i].split("=");if(2===r.length&&r[0]===t)return r[1]}}},Yr={Now:Kr,GetDuration:Vr}});function Jr(e){if(!e)return{};var t=He(e.split(Qr),(function(e,t){var n=t.split(Zr);if(2===n.length){var i=n[0].toLowerCase(),r=n[1];e[i]=r}return e}),{});if(Ke(t).length>0){if(t.endpointsuffix){var n=t.location?t.location+".":"";t.ingestionendpoint=t.ingestionendpoint||"https://"+n+"dc."+t.endpointsuffix}t.ingestionendpoint=t.ingestionendpoint||ur}return t}var Qr,Zr,eo,to,no,io,ro,oo,so,ao,co,uo,lo=S(()=>{gr(),Mi(),Qr=";",Zr="=",eo={parse:Jr}}),po=S(()=>{to=function(){}}),fo=S(()=>{F(),po(),no=function(e){function t(){return e.call(this)||this}return D(t,e),t}(to)}),go=S(()=>{io=function(){this.ver=1,this.sampleRate=100,this.tags={}}}),ho=S(()=>{F(),go(),Ji(),Mi(),gr(),ro=function(e){function t(t,n,i){var r=e.call(this)||this;return r.name=Hi(t,i)||lr,r.data=n,r.time=Me(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}return D(t,e),t}(io)}),mo=S(()=>{oo=function(){this.ver=2,this.properties={},this.measurements={}}}),vo=S(()=>{F(),mo(),Ji(),gr(),so=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.aiDataContract={ver:1,name:1,properties:0,measurements:0},o.name=Hi(t,n)||lr,o.properties=Bi(t,i),o.measurements=zi(t,r),o}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(oo)}),yo=S(()=>{ao=function(){}}),To=S(()=>{co=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}}),Co=S(()=>{uo=function(){this.hasFullStack=!0,this.parsedStack=[]}});function Ro(e,t){var n=e;return n&&!Ae(n)&&(JSON&&JSON.stringify?(n=JSON.stringify(e),t&&(!n||"{}"===n)&&(n=be(e.toString)?e.toString():""+e)):n=e+" - (Missing JSON.stringify)"),n||""}function So(e,t){var n=e;return e&&((n=e[Oo]||e[ko]||"")&&!Ae(n)&&(n=Ro(n,!0)),e.filename&&(n=n+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),t&&"String"!==t&&"Object"!==t&&"Error"!==t&&-1===(n||"").indexOf(t)&&(n=t+": "+n),n||""}function _o(e){return e&&e.src&&Ae(e.src)&&e.obj&&Oe(e.obj)}function Eo(e){var t=e||"";Ae(t)||(t=Ae(t[Po])?t[Po]:""+t);var n=t.split("\n");return{src:t,obj:n}}function wo(e){var t=null;if(e)try{if(e[Po])t=Eo(e[Po]);else if(e[xo]&&e[xo][Po])t=Eo(e[xo][Po]);else if(e.exception&&e.exception[Po])t=Eo(e.exception[Po]);else if(_o(e))t=e;else if(_o(e[Do]))t=e[Do];else if(window.opera&&e[Oo])t=function(e){for(var t=[],n=e.split("\n"),i=0;i<n.length;i++){var r=n[i];n[i+1]&&(r+="@"+n[i+1],i++),t.push(r)}return{src:e,obj:t}}(e.message);else if(Ae(e))t=Eo(e);else{var n=e[Oo]||e[ko]||"";Ae(e[No])&&(n&&(n+="\n"),n+=" from "+e[No]),n&&(t=Eo(n))}}catch(e){t=Eo(e)}return t||{src:"",obj:null}}function bo(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,200})\(/.exec(e.constructor.toString());t=n&&n.length>1?n[1]:""}catch(e){}return t}function Io(e){if(e)try{if(!Ae(e)){var t=bo(e),n=Ro(e,!1);return(!n||"{}"===n)&&(e[xo]&&(t=bo(e=e[xo])),n=Ro(e,!0)),0!==n.indexOf(t)&&"String"!==t?t+":"+n:n}}catch(e){}return""+(e||"")}var xo,Po,Do,No,Oo,ko,Ao,Lo,Fo,Mo,qo,Uo,jo,Ho,Wo,Ko,Vo,Bo,zo,Go,$o,Yo,Xo,Jo,Qo,Zo=S(()=>{F(),yo(),To(),Co(),Ji(),Mi(),gr(),"<no_method>",xo="error",Po="stack",Do="stackDetails",No="errorSrc",Oo="message",ko="description",Ao=function(e){function t(t,n,i,r,o,s){var a=e.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){return!!we(e)&&("ver"in e&&"exceptions"in e&&"properties"in e)}(n)?(a.exceptions=n.exceptions,a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),a.ver=2,Se(n.isManual)||(a.isManual=n.isManual)):(i||(i={}),a.exceptions=[new Lo(t,n,i)],a.properties=Bi(t,i),a.measurements=zi(t,r),o&&(a.severityLevel=o),s&&(a.id=s)),a}return D(t,e),t.CreateAutoException=function(e,t,n,i,r,o,s,a){var c=bo(r||o||e);return{message:So(e,c),url:t,lineNumber:n,columnNumber:i,error:Io(r||o||e),evt:Io(o||e),typeName:c,stackDetails:wo(s||r||o),errorSrc:a}},t.CreateFromInterface=function(e,n,i,r){var o=n.exceptions&&je(n.exceptions,(function(t){return Lo.CreateFromInterface(e,t)}));return new t(e,O({},n,{exceptions:o}),i,r)},t.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,o=(e.ver,e.problemGroup),s=e.id,a=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&je(t,(function(e){return e.toInterface()}))||void 0,severityLevel:r,properties:n,measurements:i,problemGroup:o,id:s,isManual:a}},t.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=Io,t}(co),Lo=function(e){function t(t,n,i){var r=e.call(this)||this;if(r.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){return!!we(e)&&("hasFullStack"in e&&"typeName"in e)}(n))r.typeName=n.typeName,r.message=n.message,r[Po]=n[Po],r.parsedStack=n.parsedStack,r.hasFullStack=n.hasFullStack;else{var o=n,s=o&&o.evt;ke(o)||(o=o[xo]||s||o),r.typeName=Hi(t,bo(o))||lr,r.message=Ki(t,So(n||o,r.typeName))||lr;var a=n[Do]||wo(n);r.parsedStack=function(e){var t,n=e.obj;if(n&&n.length>0){t=[];var i=0,r=0;qe(n,(function(e){var n=e.toString();if(Fo.regex.test(n)){var o=new Fo(n,i++);r+=o.sizeInBytes,t.push(o)}}));if(r>32768)for(var o=0,s=t.length-1,a=0,c=o,u=s;o<s;){if((a+=t[o].sizeInBytes+t[s].sizeInBytes)>32768){var l=u-c+1;t.splice(c,l);break}c=o,u=s,o++,s--}}return t}(a),r[Po]=Vi(t,function(e){var t="";return e&&(e.obj?qe(e.obj,(function(e){t+=e+"\n"})):t=e.src||""),t}(a)),r.hasFullStack=Oe(r.parsedStack)&&r.parsedStack.length>0,i&&(i.typeName=i.typeName||r.typeName)}return r}return D(t,e),t.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&je(this.parsedStack,(function(e){return e.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[Po],parsedStack:e||void 0}},t.CreateFromInterface=function(e,n){var i=n.parsedStack instanceof Array&&je(n.parsedStack,(function(e){return Fo.CreateFromInterface(e)}))||n.parsedStack;return new t(e,O({},n,{parsedStack:i}))},t}(uo),Fo=function(e){function t(n,i){var r=e.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof n){var o=n;r.level=i,r.method="<no_method>",r.assembly=We(o),r.fileName="",r.line=0;var s=o.match(t.regex);s&&s.length>=5&&(r.method=We(s[2])||r.method,r.fileName=We(s[4]),r.line=parseInt(s[5])||0)}else r.level=n.level,r.method=n.method,r.assembly=n.assembly,r.fileName=n.fileName,r.line=n.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=t.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return D(t,e),t.CreateFromInterface=function(e){return new t(e,null)},t.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},t.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t}(ao)}),es=S(()=>{Mo=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}}),ts=S(()=>{var e;(e=qo||(qo={}))[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}),ns=S(()=>{ts(),Uo=function(){this.kind=qo.Measurement}}),is=S(()=>{F(),ns(),jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},t}return D(t,e),t}(Uo)}),rs=S(()=>{F(),es(),Ji(),is(),gr(),Ho=function(e){function t(t,n,i,r,o,s,a,c){var u=e.call(this)||this;u.aiDataContract={ver:1,metrics:1,properties:0};var l=new jo;return l.count=r>0?r:void 0,l.max=isNaN(s)||null===s?void 0:s,l.min=isNaN(o)||null===o?void 0:o,l.name=Hi(t,n)||lr,l.value=i,u.metrics=[l],u.properties=Bi(t,a),u.measurements=zi(t,c),u}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(Mo)}),os=S(()=>{F(),mo(),Wo=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return D(t,e),t}(oo)}),ss=S(()=>{F(),os(),Ji(),fr(),gr(),Ko=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this)||this;return c.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},c.id=Gi(t,a),c.url=Wi(t,i),c.name=Hi(t,n)||lr,isNaN(r)||(c.duration=tr(r)),c.properties=Bi(t,o),c.measurements=zi(t,s),c}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(Wo)}),as=S(()=>{Vo=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}}),cs=S(()=>{F(),Ji(),Xr(),as(),fr(),Bo=function(e){function t(t,n,i,r,o,s,a,c,u,l,d,p){void 0===u&&(u="Ajax");var f=e.call(this)||this;f.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},f.id=n,f.duration=tr(o),f.success=s,f.resultCode=a+"",f.type=Hi(t,u);var g=function(e,t,n,i){var r,o=i,s=i;if(t&&t.length>0){var a=Or(t);if(r=a.host,!o)if(null!=a.pathname){var c=0===a.pathname.length?"/":a.pathname;"/"!==c.charAt(0)&&(c="/"+c),s=a.pathname,o=Hi(e,n?n+" "+c:c)}else o=Hi(e,t)}else r=i,o=i;return{target:r,name:o,data:s}}(t,i,c,r);return f.data=Wi(t,r)||g.data,f.target=Hi(t,g.target),l&&(f.target=f.target+" | "+l),f.name=Hi(t,g.name),f.properties=Bi(t,d),f.measurements=zi(t,p),f}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(Vo)}),us=S(()=>{zo=function(){this.ver=2,this.properties={},this.measurements={}}}),ls=S(()=>{F(),us(),Ji(),gr(),Go=function(e){function t(t,n,i,r,o){var s=e.call(this)||this;return s.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},n=n||lr,s.message=Ki(t,n),s.properties=Bi(t,r),s.measurements=zi(t,o),i&&(s.severityLevel=i),s}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(zo)}),ds=S(()=>{F(),os(),$o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return D(t,e),t}(Wo)}),ps=S(()=>{F(),ds(),Ji(),gr(),Yo=function(e){function t(t,n,i,r,o,s,a){var c=e.call(this)||this;return c.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},c.url=Wi(t,i),c.name=Hi(t,n)||lr,c.properties=Bi(t,o),c.measurements=zi(t,s),a&&(c.domProcessing=a.domProcessing,c.duration=a.duration,c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest),c}return D(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t}($o)}),fs=S(()=>{F(),fo(),Xo=function(e){function t(t,n){var i=e.call(this)||this;return i.aiDataContract={baseType:1,baseData:1},i.baseType=t,i.baseData=n,i}return D(t,e),t}(no)}),gs=S(()=>{var e;(e=Jo||(Jo={}))[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}),hs=S(()=>{Mi(),Qo=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!Se(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],Se(r)?i:r},e}()});function ms(e){var t="ai."+e+".";return function(e){return t+e}}var vs,ys,Ts,Cs,Rs,Ss,_s,Es,ws,bs,Is,xs,Ps,Ds,Ns,Os,ks,As,Ls,Fs=S(()=>{var e;F(),Mi(),vs=ms("application"),ys=ms("device"),Ts=ms("location"),Cs=ms("operation"),Rs=ms("session"),Ss=ms("user"),_s=ms("cloud"),Es=ms("internal"),ws=function(e){function t(){return e.call(this)||this}return D(t,e),t}((e={applicationVersion:vs("ver"),applicationBuild:vs("build"),applicationTypeId:vs("typeId"),applicationId:vs("applicationId"),applicationLayer:vs("layer"),deviceId:ys("id"),deviceIp:ys("ip"),deviceLanguage:ys("language"),deviceLocale:ys("locale"),deviceModel:ys("model"),deviceFriendlyName:ys("friendlyName"),deviceNetwork:ys("network"),deviceNetworkName:ys("networkName"),deviceOEMName:ys("oemName"),deviceOS:ys("os"),deviceOSVersion:ys("osVersion"),deviceRoleInstance:ys("roleInstance"),deviceRoleName:ys("roleName"),deviceScreenResolution:ys("screenResolution"),deviceType:ys("type"),deviceMachineName:ys("machineName"),deviceVMName:ys("vmName"),deviceBrowser:ys("browser"),deviceBrowserVersion:ys("browserVersion"),locationIp:Ts("ip"),locationCountry:Ts("country"),locationProvince:Ts("province"),locationCity:Ts("city"),operationId:Cs("id"),operationName:Cs("name"),operationParentId:Cs("parentId"),operationRootId:Cs("rootId"),operationSyntheticSource:Cs("syntheticSource"),operationCorrelationVector:Cs("correlationVector"),sessionId:Rs("id"),sessionIsFirst:Rs("isFirst"),sessionIsNew:Rs("isNew"),userAccountAcquisitionDate:Ss("accountAcquisitionDate"),userAccountId:Ss("accountId"),userAgent:Ss("userAgent"),userId:Ss("id"),userStoreRegion:Ss("storeRegion"),userAuthUserId:Ss("authUserId"),userAnonymousUserAcquisitionDate:Ss("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Ss("authUserAcquisitionDate"),cloudName:_s("name"),cloudRole:_s("role"),cloudRoleVer:_s("roleVer"),cloudRoleInstance:_s("roleInstance"),cloudEnvironment:_s("environment"),cloudLocation:_s("location"),cloudDeploymentUnit:_s("deploymentUnit"),internalNodeName:Es("nodeName"),internalSdkVersion:Es("sdkVersion"),internalAgentVersion:Es("agentVersion"),internalSnippet:Es("snippet"),internalSdkSrc:Es("sdkSrc")},function(){var t=this;e&&Pe(e,(function(e,n){t[e]=n}))}))}),Ms=S(()=>{Ji(),Mi(),gr(),bs=function(){function e(){}return e.create=function(e,t,n,i,r,o){if(n=Hi(i,n)||lr,Se(e)||Se(t)||Se(n))throw Error("Input doesn't contain all required fields");var s={name:n,time:Me(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Se(r)||Pe(r,(function(e,t){s.data[e]=t})),s},e}()}),qs=S(()=>{Fs(),Is={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},xs=new ws}),Us=S(()=>{Xr(),lo(),qi(),gr(),fo(),po(),ho(),vo(),Zo(),rs(),ss(),os(),cs(),ls(),ps(),fs(),gs(),hs(),Fs(),Ji(),Ms(),qs(),hr(),fr(),Zi(),Nr(),Hr(),Ps="AppInsightsPropertiesPlugin",Ds="AppInsightsChannelPlugin",Ns="ApplicationInsightsAnalytics"}),js=S(()=>{Us(),Mi(),ve(),Os=function e(t,n,i,r){ge(e,this,(function(e){var o,s=null,a=[],c=!1;function u(){i&&qe(i.getTransmissionControls(),(function(e){qe(e,(function(e){return e.flush(!0)}))}))}i&&(o=i.logger),e.trackPageView=function(e,i){var l=e.name;if(Se(l)||"string"!=typeof l){var d=ft();l=e.name=d&&d.title||""}var p=e.uri;if(Se(p)||"string"!=typeof p){var f=mt();p=e.uri=f&&f.href||""}if(!r.isPerformanceTimingSupported())return t.sendPageViewInternal(e,i),u(),void o.throwInternal(he.WARNING,me.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var g,h,m=!1,v=r.getPerformanceTiming().navigationStart;v>0&&(g=Vr(v,+new Date),r.shouldCollectDuration(g)||(g=void 0)),!Se(i)&&!Se(i.duration)&&(h=i.duration),(n||!isNaN(h))&&(isNaN(h)&&(i||(i={}),i.duration=g),t.sendPageViewInternal(e,i),u(),m=!0),i||(i={}),function(e){a.push(e),s||(s=setInterval((function(){var e=a.slice(0),t=!1;a=[],qe(e,(function(e){e()?t=!0:a.push(e)})),0===a.length&&(clearInterval(s),s=null),t&&u()}),100))}((function(){var n=!1;try{if(r.isPerformanceTimingDataReady()){n=!0;var s={name:l,uri:p};r.populatePageViewPerformanceEvent(s),s.isValid||m?(m||(i.duration=s.durationMs,t.sendPageViewInternal(e,i)),c||(t.sendPageViewPerformanceInternal(s,i),c=!0)):(i.duration=g,t.sendPageViewInternal(e,i))}else v>0&&Vr(v,+new Date)>6e4&&(n=!0,m||(i.duration=6e4,t.sendPageViewInternal(e,i)))}catch(e){o.throwInternal(he.CRITICAL,me.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+ze(e),{exception:St(e)})}return n}))}}))}}),Hs=S(()=>{Us(),Mi(),ks=function(){function e(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}return e.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+St(e))}},e.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+St(e)),null}},e.prototype.startPageVisitTimer=function(e,t){try{if(Er()){null!=br(this._logger,this.prevPageVisitDataKeyName)&&Je("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new As(e,t),i=Tt().stringify(n);Ir(this._logger,this.prevPageVisitDataKeyName,i)}}catch(e){this._logger.warnToConsole("Call to start failed: "+St(e))}},e.prototype.stopPageVisitTimer=function(){try{if(Er()){var e=Be(),t=br(this._logger,this.prevPageVisitDataKeyName);if(t&&yt()){var n=Tt().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,xr(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+St(e)),null}},e}(),As=function(e,t){this.pageVisitStartTime=Be(),this.pageName=e,this.pageUrl=t}}),Ws=S(()=>{Us(),Mi(),Ls=function(){function e(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}return e.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming(),i=0,r=0,o=0,s=0,a=0;(t||n)&&(t?(i=t.duration,r=0===t.startTime?t.connectEnd:Vr(t.startTime,t.connectEnd),o=Vr(t.requestStart,t.responseStart),s=Vr(t.responseStart,t.responseEnd),a=Vr(t.responseEnd,t.loadEventEnd)):(i=Vr(n.navigationStart,n.loadEventEnd),r=Vr(n.navigationStart,n.connectEnd),o=Vr(n.requestStart,n.responseStart),s=Vr(n.responseStart,n.responseEnd),a=Vr(n.responseEnd,n.loadEventEnd)),0===i?this._logger.throwInternal(he.WARNING,me.ErrorPVCalc,"error calculating page view performance.",{total:i,network:r,request:o,response:s,dom:a}):this.shouldCollectDuration(i,r,o,s,a)?i<Math.floor(r)+Math.floor(o)+Math.floor(s)+Math.floor(a)?this._logger.throwInternal(he.WARNING,me.ClientPerformanceMathError,"client performance math error.",{total:i,network:r,request:o,response:s,dom:a}):(e.durationMs=i,e.perfTotal=e.duration=tr(i),e.networkConnect=tr(r),e.sentRequest=tr(o),e.receivedResponse=tr(s),e.domProcessing=tr(a),e.isValid=!0):this._logger.throwInternal(he.WARNING,me.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:o,response:s,dom:a}))},e.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?vt().timing:null},e.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?vt().getEntriesByType("navigation")[0]:null},e.prototype.isPerformanceNavigationTimingSupported=function(){var e=vt();return e&&e.getEntriesByType&&e.getEntriesByType("navigation").length>0},e.prototype.isPerformanceTimingSupported=function(){var e=vt();return e&&e.timing},e.prototype.isPerformanceTimingDataReady=function(){var e=vt(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0},e.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=gt()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=n.userAgent,o=!1;if(r)for(var s=0;s<i.length;s++)o=o||-1!==r.toLowerCase().indexOf(i[s]);if(o)return!1;for(s=0;s<e.length;s++)if(e[s]<0||e[s]>=this.MAX_DURATION_ALLOWED)return!1;return!0},e}()});function Ks(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Vs,Bs,zs,Gs,$s,Ys,Xs=S(()=>{F(),Us(),Mi(),js(),Hs(),Ws(),ve(),Vs="duration",Bs="event",zs=function(e){function t(){var n=e.call(this)||this;n.identifier=Ns,n.priority=180,n.autoRoutePVDelay=500;var i,r,o,s,a;return ge(t,n,(function(e,c){var u=mt(!0);s=u&&u.href||"",e.getCookieMgr=function(){return Tn(e.core)},e.processTelemetry=function(t,n){Bt(e.core,(function(){return e.identifier+":processTelemetry"}),(function(){var i=!1,r=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var o=0;o<r;++o){var s=e._telemetryInitializers[o];if(s)try{if(!1===s.apply(null,[t])){i=!0;break}}catch(e){n.diagLog().throwInternal(he.CRITICAL,me.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+ze(e),{exception:St(e)},!0)}}i||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},e.trackEvent=function(t,n){try{var i=bs.create(t,so.dataType,so.envelopeType,e.diagLog(),n);e.core.track(i)}catch(t){e.diagLog().throwInternal(he.WARNING,me.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+ze(t),{exception:St(t)})}},e.startTrackEvent=function(t){try{i.start(t)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+ze(t),{exception:St(t)})}},e.stopTrackEvent=function(t,n,r){try{i.stop(t,void 0,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+ze(t),{exception:St(t)})}},e.trackTrace=function(t,n){try{var i=bs.create(t,Go.dataType,Go.envelopeType,e.diagLog(),n);e.core.track(i)}catch(t){e.diagLog().throwInternal(he.WARNING,me.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+ze(t),{exception:St(t)})}},e.trackMetric=function(t,n){try{var i=bs.create(t,Ho.dataType,Ho.envelopeType,e.diagLog(),n);e.core.track(i)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+ze(t),{exception:St(t)})}},e.trackPageView=function(t,n){try{var i=t||{};e._pageViewManager.trackPageView(i,O({},i.properties,i.measurements,n)),e.config.autoTrackPageVisitTime&&e._pageVisitTimeManager.trackPreviousPageVisit(i.name,i.uri)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.TrackPVFailed,"trackPageView failed, page view will not be collected: "+ze(t),{exception:St(t)})}},e.sendPageViewInternal=function(t,n,i){var r=ft();r&&(t.refUri=void 0===t.refUri?r.referrer:t.refUri);var o=bs.create(t,Ko.dataType,Ko.envelopeType,e.diagLog(),n,i);e.core.track(o),0},e.sendPageViewPerformanceInternal=function(t,n,i){var r=bs.create(t,Yo.dataType,Yo.envelopeType,e.diagLog(),n,i);e.core.track(r)},e.trackPageViewPerformance=function(t,n){try{e._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),e.sendPageViewPerformanceInternal(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.TrackPVFailed,"trackPageViewPerformance failed, page view will not be collected: "+ze(t),{exception:St(t)})}},e.startTrackPage=function(t){try{if("string"!=typeof t){var n=ft();t=n&&n.title||""}r.start(t)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+ze(t),{exception:St(t)})}},e.stopTrackPage=function(t,n,i,o){try{if("string"!=typeof t){var s=ft();t=s&&s.title||""}if("string"!=typeof n){var a=mt();n=a&&a.href||""}r.stop(t,n,i,o),e.config.autoTrackPageVisitTime&&e._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+ze(t),{exception:St(t)})}},e.sendExceptionInternal=function(t,n,i){var r=t.exception||t.error||new Error(lr),o=new Ao(e.diagLog(),r,t.properties||n,t.measurements,t.severityLevel,t.id).toInterface(),s=bs.create(o,Ao.dataType,Ao.envelopeType,e.diagLog(),n,i);e.core.track(s)},e.trackException=function(t,n){try{e.sendExceptionInternal(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.TrackExceptionFailed,"trackException failed, exception will not be collected: "+ze(t),{exception:St(t)})}},e._onerror=function(t){var n=t&&t.error,i=t&&t.evt;try{if(!i){var r=dt();r&&(i=r[Bs])}var o=t&&t.url||(ft()||{}).URL,s=t.errorSrc||"window.onerror@"+o+":"+(t.lineNumber||0)+":"+(t.columnNumber||0),a={errorSrc:s,url:o,lineNumber:t.lineNumber||0,columnNumber:t.columnNumber||0,message:t.message};rr(t.message,t.url,t.lineNumber,t.columnNumber,t.error)?function(t,n){var i=bs.create(t,Ao.dataType,Ao.envelopeType,e.diagLog(),n);e.core.track(i)}(Ao.CreateAutoException("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",o,t.lineNumber||0,t.columnNumber||0,n,i,null,s),a):(t.errorSrc||(t.errorSrc=s),e.trackException({exception:t,severityLevel:Jo.Error},a))}catch(t){var c=n?n.name+", "+n.message:"null";e.diagLog().throwInternal(he.CRITICAL,me.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+ze(t),{exception:St(t),errorString:c})}},e.addTelemetryInitializer=function(t){e._telemetryInitializers.push(t)},e.initialize=function(u,l,d,p){if(!e.isInitialized()){if(Se(l))throw Error("Error initializing");c.initialize(u,l,d,p),e.setInitialized(!1);var f=e._getTelCtx(),g=e.identifier;e.config=f.getExtCfg(g);var h=t.getDefaultConfig(u);void 0!==h&&Pe(h,(function(t,n){e.config[t]=f.getConfig(g,t,n),void 0===e.config[t]&&(e.config[t]=n)})),e.config.isStorageUseDisabled&&Tr();var m={instrumentationKey:function(){return u.instrumentationKey},accountId:function(){return e.config.accountId||u.accountId},sessionRenewalMs:function(){return e.config.sessionRenewalMs||u.sessionRenewalMs},sessionExpirationMs:function(){return e.config.sessionExpirationMs||u.sessionExpirationMs},sampleRate:function(){return e.config.samplingPercentage||u.samplingPercentage},sdkExtension:function(){return e.config.sdkExtension||u.sdkExtension},isBrowserLinkTrackingEnabled:function(){return e.config.isBrowserLinkTrackingEnabled||u.isBrowserLinkTrackingEnabled},appId:function(){return e.config.appId||u.appId}};e._pageViewPerformanceManager=new Ls(e.core),e._pageViewManager=new Os(n,e.config.overridePageViewDuration,e.core,e._pageViewPerformanceManager),e._pageVisitTimeManager=new ks(e.diagLog(),(function(t,n,i){return function(t,n,i){var r={PageName:t,PageUrl:n};e.trackMetric({name:"PageVisitTime",average:i,max:i,min:i,sampleCount:1},r)}(t,n,i)})),e._telemetryInitializers=e._telemetryInitializers||[],function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];!function(t){e._telemetryInitializers.push(t)}((function(e){if(e.baseType===Bo.dataType){var t=e.baseData;if(t)for(var i=0;i<n.length;i++)if(t.target&&t.target.indexOf(n[i])>=0)return!1}return!0}))}}(m),(i=new Gs(e.diagLog(),"trackEvent")).action=function(t,n,i,r){r||(r={}),r[Vs]=i.toString(),e.trackEvent({name:t,properties:r})},(r=new Gs(e.diagLog(),"trackPageView")).action=function(t,n,i,r,o){Se(r)&&(r={}),r[Vs]=i.toString();var s={name:t,uri:n,properties:r,measurements:o};e.sendPageViewInternal(s,r)};var v=dt(),y=ht(),T=mt(!0),C=n;if(!1===e.config.disableExceptionTracking&&!e.config.autoExceptionInstrumented&&v){var R=v.onerror;v.onerror=function(e,t,n,i,r){var o=v[Bs],s=R&&R(e,t,n,i,r);return!0!==s&&C._onerror(Ao.CreateAutoException(e,t,n,i,r,o)),s},e.config.autoExceptionInstrumented=!0}if(!1===e.config.disableExceptionTracking&&!0===e.config.enableUnhandledPromiseRejectionTracking&&!e.config.autoUnhandledPromiseInstrumented&&v){var S="onunhandledrejection",_=v[S];v[S]=function(e){var t=v[Bs],n=_&&_.call(v,e);return!0!==n&&C._onerror(Ao.CreateAutoException(e.reason.toString(),T?T.href:"",0,0,e,t)),n},e.config.autoUnhandledPromiseInstrumented=!0}if(!0===e.config.enableAutoRouteTracking&&y&&be(y.pushState)&&be(y.replaceState)&&v&&"undefined"!=typeof Event){var E=n;qe(d,(function(e){e.identifier===Ps&&(o=e)})),y.pushState=(w=y.pushState,function(){var e=w.apply(this,arguments);return Ks(v,Qi(E.config.namePrefix+"pushState")),Ks(v,Qi(E.config.namePrefix+"locationchange")),e}),y.replaceState=function(e){return function(){var t=e.apply(this,arguments);return Ks(v,Qi(E.config.namePrefix+"replaceState")),Ks(v,Qi(E.config.namePrefix+"locationchange")),t}}(y.replaceState),v.addEventListener&&(v.addEventListener(E.config.namePrefix+"popstate",(function(){Ks(v,Qi(E.config.namePrefix+"locationchange"))})),v.addEventListener(E.config.namePrefix+"locationchange",(function(){if(o&&o.context&&o.context.telemetryTrace){o.context.telemetryTrace.traceID=fi();var e="_unknown_";T&&T.pathname&&(e=T.pathname+(T.hash||"")),o.context.telemetryTrace.name=e}a&&(s=a),a=T&&T.href||"",setTimeout(function(e){E.trackPageView({refUri:e,properties:{duration:0}})}.bind(n,s),E.autoRoutePVDelay)})))}e.setInitialized(!0)}var w}})),n}return D(t,e),t.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=er(e.disableExceptionTracking),e.autoTrackPageVisitTime=er(e.autoTrackPageVisitTime),e.overridePageViewDuration=er(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=er(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.isStorageUseDisabled=er(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=er(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=er(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e.enableDebug=er(e.enableDebug),e.disableFlushOnBeforeUnload=er(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=er(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e},t.Version="2.6.4",t}(rn),Gs=function(e,t){var n=this,i={};n.start=function(t){void 0!==i[t]&&e.throwInternal(he.WARNING,me.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:t,key:t},!0),i[t]=+new Date},n.stop=function(t,r,o,s){var a=i[t];if(isNaN(a))e.throwInternal(he.WARNING,me.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:t,key:t},!0);else{var c=Vr(a,+new Date);n.action(t,r,c,o,s)}delete i[t],i[t]=void 0}}}),Js=S(()=>{Xs()}),Qs=S(()=>{Us(),Mi(),ve(),$s=function e(t){var n=[];ge(e,this,(function(e){e.enqueue=function(e){n.push(e)},e.count=function(){return n.length},e.clear=function(){n.length=0},e.getItems=function(){return n.slice(0)},e.batchPayloads=function(e){return e&&e.length>0?t.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.markAsSent=function(t){e.clear()},e.clearSent=function(e){}}))},Ys=function(){function e(t,n){var i,r=!1;ge(e,this,(function(o){var s=u(e.BUFFER_KEY),a=u(e.SENT_BUFFER_KEY);function c(e,t){var n=[];return qe(t,(function(t){!be(t)&&-1===Ue(e,t)&&n.push(t)})),n}function u(e){var i=e;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var r=br(t,i);if(r){var o=Tt().parse(r);if(Ae(o)&&(o=Tt().parse(o)),o&&Oe(o))return o}}catch(e){t.throwInternal(he.CRITICAL,me.FailedToRestoreStorageBuffer," storage key: "+i+", "+ze(e),{exception:St(e)})}return[]}function l(e,i){var r=e;try{r=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+r:r;var o=JSON.stringify(i);Ir(t,r,o)}catch(e){Ir(t,r,JSON.stringify([])),t.throwInternal(he.WARNING,me.FailedToSetStorageBuffer," storage key: "+r+", "+ze(e)+". Buffer cleared",{exception:St(e)})}}(i=s.concat(a)).length>e.MAX_BUFFER_SIZE&&(i.length=e.MAX_BUFFER_SIZE),l(e.SENT_BUFFER_KEY,[]),l(e.BUFFER_KEY,i),o.enqueue=function(n){i.length>=e.MAX_BUFFER_SIZE?r||(t.throwInternal(he.WARNING,me.SessionStorageBufferFull,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(n),l(e.BUFFER_KEY,i))},o.count=function(){return i.length},o.clear=function(){i=[],l(e.BUFFER_KEY,[]),l(e.SENT_BUFFER_KEY,[]),r=!1},o.getItems=function(){return i.slice(0)},o.batchPayloads=function(e){return e&&e.length>0?n.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},o.markAsSent=function(n){i=c(n,i),l(e.BUFFER_KEY,i);var r=u(e.SENT_BUFFER_KEY);r instanceof Array&&n instanceof Array&&((r=r.concat(n)).length>e.MAX_BUFFER_SIZE&&(t.throwInternal(he.CRITICAL,me.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+r.length,!0),r.length=e.MAX_BUFFER_SIZE),l(e.SENT_BUFFER_KEY,r))},o.clearSent=function(t){var n=u(e.SENT_BUFFER_KEY);n=c(t,n),l(e.SENT_BUFFER_KEY,n)}}))}return e.BUFFER_KEY="AI_buffer",e.SENT_BUFFER_KEY="AI_sentBuffer",e.MAX_BUFFER_SIZE=2e3,e}()});function Zs(e,t,n){return Ge(e,t,n,Xe)}var ea,ta,na,ia,ra,oa,sa,aa,ca,ua,la,da,pa,fa,ga,ha,ma,va=S(()=>{F(),Us(),Mi(),ea="baseType",ta="baseData",na="properties","true",ia=function(){function e(){}return e.extractPropsAndMeasurements=function(e,t,n){Se(e)||Pe(e,(function(e,i){Le(i)?n[e]=i:Ae(i)?t[e]=i:yt()&&(t[e]=Tt().stringify(i))}))},e.createEnvelope=function(t,n,i,r){var o=new ro(t,r,n);Zs(o,"sampleRate",i[sr]),(i[ta]||{}).startTime&&(o.time=Me(i[ta].startTime)),o.iKey=i.iKey;var s=i.iKey.replace(/-/g,"");return o.name=o.name.replace("{0}",s),e.extractPartAExtensions(i,o),i.tags=i.tags||[],Ze(o)},e.extractPartAExtensions=function(t,n){var i=n.tags=n.tags||{},r=t.ext=t.ext||{},o=t.tags=t.tags||[],s=r.user;s&&(Zs(i,xs.userAuthUserId,s.authId),Zs(i,xs.userId,s.id||s.localId));var a=r.app;a&&Zs(i,xs.sessionId,a.sesId);var c=r.device;c&&(Zs(i,xs.deviceId,c.id||c.localId),Zs(i,xs.deviceType,c.deviceClass),Zs(i,xs.deviceIp,c.ip),Zs(i,xs.deviceModel,c.model),Zs(i,xs.deviceType,c.deviceType));var u=t.ext.web;if(u){Zs(i,xs.deviceLanguage,u.browserLang),Zs(i,xs.deviceBrowserVersion,u.browserVer),Zs(i,xs.deviceBrowser,u.browser);var l=n.data=n.data||{},d=l[ta]=l[ta]||{},p=d[na]=d[na]||{};Zs(p,"domain",u.domain),Zs(p,"isManual",u.isManual?"true":null),Zs(p,"screenRes",u.screenRes),Zs(p,"userConsent",u.userConsent?"true":null)}var f=r.os;f&&Zs(i,xs.deviceOS,f.name);var g=r.trace;g&&(Zs(i,xs.operationParentId,g.parentID),Zs(i,xs.operationName,g.name),Zs(i,xs.operationId,g.traceID));for(var h={},m=o.length-1;m>=0;m--){Pe(o[m],(function(e,t){h[e]=t})),o.splice(m,1)}Pe(o,(function(e,t){h[e]=t}));var v=O({},i,h);v[xs.internalSdkVersion]||(v[xs.internalSdkVersion]="javascript:"+e.Version),n.tags=Ze(v)},e.prototype.Init=function(e,t){this._logger=e,Se(t[ta])&&this._logger.throwInternal(he.CRITICAL,me.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")},e.Version="2.6.4",e}(),ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i=n[ta].measurements||{},r=n[ta][na]||{};ia.extractPropsAndMeasurements(n.data,r,i);var o=n[ta];if(Se(o))return t.warnToConsole("Invalid input for dependency data"),null;var s=o[na]&&o[na][cr]?o[na][cr]:"GET",a=new Bo(t,o.id,o.target,o.name,o.duration,o.success,o.responseCode,s,o.type,o.correlationContext,r,i),c=new Xo(Bo.dataType,a);return ia.createEnvelope(t,Bo.envelopeType,n,c)},t.DependencyEnvelopeCreator=new t,t}(ia),oa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i={},r={};n[ea]!==so.dataType&&(i.baseTypeSource=n[ea]),n[ea]===so.dataType?(i=n[ta][na]||{},r=n[ta].measurements||{}):n[ta]&&ia.extractPropsAndMeasurements(n[ta],i,r),ia.extractPropsAndMeasurements(n.data,i,r);var o=n[ta].name,s=new so(t,o,i,r),a=new Xo(so.dataType,s);return ia.createEnvelope(t,so.envelopeType,n,a)},t.EventEnvelopeCreator=new t,t}(ia),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i=n[ta].measurements||{},r=n[ta][na]||{};ia.extractPropsAndMeasurements(n.data,r,i);var o=n[ta],s=Ao.CreateFromInterface(t,o,r,i),a=new Xo(Ao.dataType,s);return ia.createEnvelope(t,Ao.envelopeType,n,a)},t.ExceptionEnvelopeCreator=new t,t}(ia),aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i=n[ta],r=i[na]||{},o=i.measurements||{};ia.extractPropsAndMeasurements(n.data,r,o);var s=new Ho(t,i.name,i.average,i.sampleCount,i.min,i.max,r,o),a=new Xo(Ho.dataType,s);return ia.createEnvelope(t,Ho.envelopeType,n,a)},t.MetricEnvelopeCreator=new t,t}(ia),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i,r="duration",o=n[ta];Se(o)||Se(o[na])||Se(o[na][r])?!Se(n.data)&&!Se(n.data[r])&&(i=n.data[r],delete n.data[r]):(i=o[na][r],delete o[na][r]);var s,a=n[ta];((n.ext||{}).trace||{}).traceID&&(s=n.ext.trace.traceID);var c=a.id||s,u=a.name,l=a.uri,d=a[na]||{},p=a.measurements||{};(Se(a.refUri)||(d.refUri=a.refUri),Se(a.pageType)||(d.pageType=a.pageType),Se(a.isLoggedIn)||(d.isLoggedIn=a.isLoggedIn.toString()),Se(a[na]))||Pe(a[na],(function(e,t){d[e]=t}));ia.extractPropsAndMeasurements(n.data,d,p);var f=new Ko(t,u,l,i,d,p,c),g=new Xo(Ko.dataType,f);return ia.createEnvelope(t,Ko.envelopeType,n,g)},t.PageViewEnvelopeCreator=new t,t}(ia),ua=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i=n[ta],r=i.name,o=i.uri||i.url,s=i[na]||{},a=i.measurements||{};ia.extractPropsAndMeasurements(n.data,s,a);var c=new Yo(t,r,o,void 0,s,a,i),u=new Xo(Yo.dataType,c);return ia.createEnvelope(t,Yo.envelopeType,n,u)},t.PageViewPerformanceEnvelopeCreator=new t,t}(ia),la=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var i=n[ta].message,r=n[ta].severityLevel,o=n[ta][na]||{},s=n[ta].measurements||{};ia.extractPropsAndMeasurements(n.data,o,s);var a=new Go(t,i,r,o,s),c=new Xo(Go.dataType,a);return ia.createEnvelope(t,Go.envelopeType,n,c)},t.TraceEnvelopeCreator=new t,t}(ia)}),ya=S(()=>{Mi(),ve(),da=function e(t){ge(e,this,(function(e){function n(e,o){var s="__aiCircularRefCheck",a={};if(!e)return t.throwInternal(he.CRITICAL,me.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:o},!0),a;if(e[s])return t.throwInternal(he.WARNING,me.CircularReferenceDetected,"Circular reference detected while serializing object",{name:o},!0),a;if(!e.aiDataContract){if("measurements"===o)a=r(e,"number",o);else if("properties"===o)a=r(e,"string",o);else if("tags"===o)a=r(e,"string",o);else if(Oe(e))a=i(e,o);else{t.throwInternal(he.WARNING,me.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:o},!0);try{Tt().stringify(e),a=e}catch(e){t.throwInternal(he.CRITICAL,me.CannotSerializeObject,e&&be(e.toString)?e.toString():"Error serializing object",null,!0)}}return a}return e[s]=!0,Pe(e.aiDataContract,(function(r,s){var c=be(s)?1&s():1&s,u=be(s)?4&s():4&s,l=2&s,d=void 0!==e[r],p=we(e[r])&&null!==e[r];if(!c||d||l){if(!u){var f=void 0;void 0!==(f=p?l?i(e[r],r):n(e[r],r):e[r])&&(a[r]=f)}}else t.throwInternal(he.CRITICAL,me.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:r,name:o})})),delete e[s],a}function i(e,i){var r;if(e)if(Oe(e)){r=[];for(var o=0;o<e.length;o++){var s=n(e[o],i+"["+o+"]");r.push(s)}}else t.throwInternal(he.CRITICAL,me.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(e,n,i){var r;return e&&(r={},Pe(e,(function(e,o){if("string"===n)void 0===o?r[e]="undefined":null===o?r[e]="null":o.toString?r[e]=o.toString():r[e]="invalid field: toString() is not defined.";else if("number"===n)if(void 0===o)r[e]="undefined";else if(null===o)r[e]="null";else{var s=parseFloat(o);isNaN(s)?r[e]="NaN":r[e]=s}else r[e]="invalid field: "+i+" is of unknown type.",t.throwInternal(he.CRITICAL,r[e],null,!0)}))),r}e.serialize=function(e){var i=n(e,"root");try{return Tt().stringify(i)}catch(e){t.throwInternal(he.CRITICAL,me.CannotSerializeObject,e&&be(e.toString)?e.toString():"Error serializing object",null,!0)}}}))}}),Ta=S(()=>{Mi(),ve(),pa=function(){function e(){var t=dt(),n=ft(),i=!1,r=!0;ge(e,this,(function(e){try{if(t&&Ei.Attach(t,"online",a)&&(Ei.Attach(t,"offline",c),i=!0),n){var o=n.body||n;Re(o.ononline)||(o.ononline=a,o.onoffline=c,i=!0)}if(i){var s=gt();s&&!Se(s.onLine)&&(r=s.onLine)}}catch(e){i=!1}function a(){r=!0}function c(){r=!1}e.isListening=i,e.isOnline=function(){var e=!0,t=gt();return i?e=r:t&&!Se(t.onLine)&&(e=t.onLine),e},e.isOffline=function(){return!e.isOnline()}}))}return e.Offline=new e,e}(),fa=pa.Offline}),Ca=S(()=>{ga=function(){function e(){}return e.prototype.getHashCodeScore=function(t){return 100*(this.getHashCode(t)/e.INT_MAX_VALUE)},e.prototype.getHashCode=function(t){if(""===t)return 0;for(;t.length<e.MIN_INPUT_LENGTH;)t=t.concat(t);for(var n=5381,i=0;i<t.length;++i)n=(n<<5)+n+t.charCodeAt(i),n&=n;return Math.abs(n)},e.INT_MAX_VALUE=2147483647,e.MIN_INPUT_LENGTH=8,e}()}),Ra=S(()=>{Ca(),Us(),ha=function(){function e(){this.hashCodeGeneragor=new ga,this.keys=new ws}return e.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},e}()}),Sa=S(()=>{Ra(),Us(),Mi(),ma=function(){function e(e,t){this.INT_MAX_VALUE=2147483647,this._logger=t||Ht(null),(e>100||e<0)&&(this._logger.throwInternal(he.WARNING,me.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new ha}return e.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||t>=100||e.baseType===Ho.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},e}()});function _a(e){try{return e.responseText}catch(e){}return null}var Ea,wa,ba,Ia,xa,Pa,Da=S(()=>{F(),Qs(),va(),ya(),Us(),Mi(),Ta(),Sa(),ve(),Ea=function(e){function t(){var n=e.call(this)||this;n.priority=1001,n.identifier=Ds,n._XMLHttpRequestSupported=!1;var i,r,o,a,c,u={};return ge(t,n,(function(e,l){function d(){Je("Method not implemented.")}function p(t,n,r,o,s,a){var c=null;if(e._appId||(c=v(a))&&c.appId&&(e._appId=c.appId),(t<200||t>=300)&&0!==t){if((301===t||307===t||308===t)&&!f(r))return void e._onError(n,s);!e._senderConfig.isRetryDisabled()&&C(t)?(y(n),e.diagLog().throwInternal(he.WARNING,me.TransmissionFailed,". Response code "+t+". Will retry to send "+n.length+" items.")):e._onError(n,s)}else if(fa.isOffline()){if(!e._senderConfig.isRetryDisabled()){y(n,10),e.diagLog().throwInternal(he.WARNING,me.TransmissionFailed,". Offline - Response Code: "+t+". Offline status: "+fa.isOffline()+". Will retry to send "+n.length+" items.")}}else f(r),206===t?(c||(c=v(a)),c&&!e._senderConfig.isRetryDisabled()?e._onPartialSuccess(n,c):e._onError(n,s)):(i=0,e._onSuccess(n,o))}function f(t){return!(c>=10)&&(!Se(t)&&""!==t&&t!==e._senderConfig.endpointUrl()&&(e._senderConfig.endpointUrl=function(){return t},++c,!0))}function g(t,n){var i=e._senderConfig.endpointUrl(),r=e._buffer.batchPayloads(t),o=new Blob([r],{type:"text/plain;charset=UTF-8"});gt().sendBeacon(i,o)?(e._buffer.markAsSent(t),e._onSuccess(t,t.length)):(h(t,!0),e.diagLog().throwInternal(he.WARNING,me.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function h(t,n){var i=new XMLHttpRequest,r=e._senderConfig.endpointUrl();try{i[or]=!0}catch(e){}i.open("POST",r,n),i.setRequestHeader("Content-type","application/json"),Wr(r)&&i.setRequestHeader(Li.sdkContextHeader,Li.sdkContextHeaderAppIdRequest),qe(Ke(u),(function(e){i.setRequestHeader(e,u[e])})),i.onreadystatechange=function(){return e._xhrReadyStateChange(i,t,t.length)},i.onerror=function(n){return e._onError(t,R(i),n)};var o=e._buffer.batchPayloads(t);i.send(o),e._buffer.markAsSent(t)}function m(t,n){var i=e._senderConfig.endpointUrl(),r=e._buffer.batchPayloads(t),o=new Blob([r],{type:"text/plain;charset=UTF-8"}),s=new Headers;Wr(i)&&s.append(Li.sdkContextHeader,Li.sdkContextHeaderAppIdRequest),qe(Ke(u),(function(e){s.append(e,u[e])}));var a=new Request(i,{method:"POST",headers:s,body:o});fetch(a).then((function(n){if(!n.ok)throw Error(n.statusText);n.text().then((function(e){p(n.status,t,n.url,t.length,n.statusText,e)})),e._buffer.markAsSent(t)})).catch((function(n){e._onError(t,n.message)}))}function v(t){try{if(t&&""!==t){var n=Tt().parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){e.diagLog().throwInternal(he.CRITICAL,me.InvalidBackendResponse,"Cannot parse the response. "+ze(n),{response:t})}return null}function y(t,n){if(void 0===n&&(n=1),t&&0!==t.length){e._buffer.clearSent(t),i++;for(var o=0,s=t;o<s.length;o++){var a=s[o];e._buffer.enqueue(a)}(function(e){var t;if(i<=1)t=10;else{var n=(Math.pow(2,i)-1)/2,o=Math.floor(Math.random()*n*10)+1;o*=e,t=Math.max(Math.min(o,3600),10)}var s=Be()+1e3*t;r=s})(n),T()}}function T(){if(!o){var t=r?Math.max(0,r-Be()):0,n=Math.max(e._senderConfig.maxBatchInterval(),t);o=setTimeout((function(){e.triggerSend(!0,null,1)}),n)}}function C(e){return 408===e||429===e||500===e||503===e}function R(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+_a(e)||!1:t}function S(t,n){var i=dt(),r=new XDomainRequest;r.onload=function(){return e._xdrOnLoad(r,t)},r.onerror=function(n){return e._onError(t,_(r),n)};var o=i&&i.location&&i.location.protocol||"";if(0!==e._senderConfig.endpointUrl().lastIndexOf(o,0))return e.diagLog().throwInternal(he.WARNING,me.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void e._buffer.clear();var s=e._senderConfig.endpointUrl().replace(/^(https?:)/,"");r.open("POST",s);var a=e._buffer.batchPayloads(t);r.send(a),e._buffer.markAsSent(t)}function _(e,t){return e?"XDomainRequest,Response:"+_a(e)||!1:t}e.pause=d,e.resume=d,e.flush=function(){try{e.triggerSend(!0,null,1)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.FlushFailed,"flush failed, telemetry will not be collected: "+ze(t),{exception:St(t)})}},e.onunloadFlush=function(){if(!1!==e._senderConfig.onunloadDisableBeacon()&&!1!==e._senderConfig.isBeaconApiDisabled()||!nr())e.flush();else try{e.triggerSend(!0,g,2)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+ze(t),{exception:St(t)})}},e.teardown=d,e.addHeader=function(e,t){u[e]=t},e.initialize=function(o,u,d,p){l.initialize(o,u,d,p);var f=e._getTelCtx(),v=e.identifier;a=new da(u.logger),i=0,r=null,0,e._sender=null,c=0;var y=t._getDefaultAppInsightsChannelConfig();if(e._senderConfig=t._getEmptyAppInsightsChannelConfig(),Pe(y,(function(t,n){e._senderConfig[t]=function(){return f.getConfig(v,t,n())}})),e._buffer=e._senderConfig.enableSessionStorageBuffer()&&Er()?new Ys(e.diagLog(),e._senderConfig):new $s(e._senderConfig),e._sample=new ma(e._senderConfig.samplingPercentage(),e.diagLog()),function(e){return!(Se(e.disableInstrumentationKeyValidation)||!e.disableInstrumentationKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e.instrumentationKey)}(o)||e.diagLog().throwInternal(he.CRITICAL,me.InvalidInstrumentationKey,"Invalid Instrumentation key "+o.instrumentationKey),!Wr(e._senderConfig.endpointUrl())&&e._senderConfig.customHeaders()&&e._senderConfig.customHeaders().length>0&&qe(e._senderConfig.customHeaders(),(function(e){n.addHeader(e.header,e.value)})),!e._senderConfig.isBeaconApiDisabled()&&nr())e._sender=g;else{var T=ut("XMLHttpRequest");if(T)"withCredentials"in new T?(e._sender=h,e._XMLHttpRequestSupported=!0):typeof XDomainRequest!==s&&(e._sender=S);else ut("fetch")&&(e._sender=m)}},e.processTelemetry=function(n,i){i=e._getTelCtx(i);try{if(e._senderConfig.disableTelemetry())return;if(!n)return void i.diagLog().throwInternal(he.CRITICAL,me.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(n.baseData&&!n.baseType)return void i.diagLog().throwInternal(he.CRITICAL,me.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(n.baseType||(n.baseType="EventData"),!e._sender)return void i.diagLog().throwInternal(he.CRITICAL,me.SenderNotInitialized,"Sender was not initialized");if(!function(t){return e._sample.isSampledIn(t)}(n))return void i.diagLog().throwInternal(he.WARNING,me.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:e._sample.sampleRate});n[sr]=e._sample.sampleRate;var r=t.constructEnvelope(n,e._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(he.CRITICAL,me.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(n.tags&&n.tags[ar]&&(qe(n.tags[ar],(function(e){try{e&&!1===e(r)&&(o=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(e){i.diagLog().throwInternal(he.CRITICAL,me.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+ze(e),{exception:St(e)},!0)}})),delete n.tags[ar]),o)return;var s=a.serialize(r),c=e._buffer.getItems(),u=e._buffer.batchPayloads(c);u&&u.length+s.length>e._senderConfig.maxBatchSizeInBytes()&&e.triggerSend(!0,null,10),e._buffer.enqueue(s),T()}catch(e){i.diagLog().throwInternal(he.WARNING,me.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ze(e),{exception:St(e)})}e.processNext(n,i)},e._xhrReadyStateChange=function(e,t,n){4===e.readyState&&p(e.status,t,e.responseURL,n,R(e),_a(e)||e.response)},e.triggerSend=function(t,i,s){void 0===t&&(t=!0);try{if(e._senderConfig.disableTelemetry())e._buffer.clear();else{if(e._buffer.count()>0){var a=e._buffer.getItems();(function(t,n){var i=function(){var t="getNotifyMgr";return e.core[t]?e.core[t]():e.core._notificationManager}();if(i&&i.eventsSendRequest)try{i.eventsSendRequest(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,me.NotificationException,"send request notification failed: "+ze(t),{exception:St(t)})}})(s||0,t),i?i.call(n,a,t):e._sender(a,t)}+new Date}clearTimeout(o),o=null,r=null}catch(t){var c=Rt();(!c||c>9)&&e.diagLog().throwInternal(he.CRITICAL,me.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+ze(t),{exception:St(t)})}},e._onError=function(t,n,i){e.diagLog().throwInternal(he.WARNING,me.OnError,"Failed to send telemetry.",{message:n}),e._buffer.clearSent(t)},e._onPartialSuccess=function(t,n){for(var i=[],r=[],o=0,s=n.errors.reverse();o<s.length;o++){var a=s[o],c=t.splice(a.index,1)[0];C(a.statusCode)?r.push(c):i.push(c)}t.length>0&&e._onSuccess(t,n.itemsAccepted),i.length>0&&e._onError(i,R(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),r.length>0&&(y(r),e.diagLog().throwInternal(he.WARNING,me.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},e._onSuccess=function(t,n){e._buffer.clearSent(t)},e._xdrOnLoad=function(t,n){var r=_a(t);if(!t||r+""!="200"&&""!==r){var o=v(r);o&&o.itemsReceived&&o.itemsReceived>o.itemsAccepted&&!e._senderConfig.isRetryDisabled()?e._onPartialSuccess(n,o):e._onError(n,_(t))}else i=0,e._onSuccess(n,0)}})),n}return D(t,e),t.constructEnvelope=function(e,t,n){var i;switch((i=t===e.iKey||Se(t)?e:O({},e,{iKey:t})).baseType){case so.dataType:return oa.EventEnvelopeCreator.Create(n,i);case Go.dataType:return la.TraceEnvelopeCreator.Create(n,i);case Ko.dataType:return ca.PageViewEnvelopeCreator.Create(n,i);case Yo.dataType:return ua.PageViewPerformanceEnvelopeCreator.Create(n,i);case Ao.dataType:return sa.ExceptionEnvelopeCreator.Create(n,i);case Ho.dataType:return aa.MetricEnvelopeCreator.Create(n,i);case Bo.dataType:return ra.DependencyEnvelopeCreator.Create(n,i);default:return oa.EventEnvelopeCreator.Create(n,i)}},t._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100},customHeaders:function(){}}},t._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0,customHeaders:void 0}},t}(rn)}),Na=S(()=>{Da()}),Oa=S(()=>{ve(),Us(),Mi(),"ai_session",wa=function(){},ba=function(){function e(t,n){var i,r,o=Ht(n),s=Tn(n);ge(e,this,(function(n){t||(t={}),be(t.sessionExpirationMs)||(t.sessionExpirationMs=function(){return e.acquisitionSpan}),be(t.sessionRenewalMs)||(t.sessionRenewalMs=function(){return e.renewalSpan}),n.config=t;var a=n.config.sessionCookiePostfix&&n.config.sessionCookiePostfix()?n.config.sessionCookiePostfix():n.config.namePrefix&&n.config.namePrefix()?n.config.namePrefix():"";function c(e,t){var n=!1,i=", session will be reset",r=t.split("|");if(r.length>=2)try{var s=+r[1]||0,a=+r[2]||0;isNaN(s)||s<=0?o.throwInternal(he.WARNING,me.SessionRenewalDateIsZero,"AI session acquisition date is 0"+i):isNaN(a)||a<=0?o.throwInternal(he.WARNING,me.SessionRenewalDateIsZero,"AI session renewal date is 0"+i):r[0]&&(e.id=r[0],e.acquisitionDate=s,e.renewalDate=a,n=!0)}catch(e){o.throwInternal(he.CRITICAL,me.ErrorParsingAISessionCookie,"Error parsing ai_session value ["+(t||"")+"]"+i+" - "+ze(e),{exception:St(e)})}return n}function u(e,t){var o=e.acquisitionDate;e.renewalDate=t;var a=n.config,c=a.sessionRenewalMs(),u=o+a.sessionExpirationMs()-t,l=[e.id,o,t],d=0;d=u<c?u/1e3:c/1e3;var p=a.cookieDomain?a.cookieDomain():null;s.set(i(),l.join("|"),a.sessionExpirationMs()>0?d:null,p),r=t}i=function(){return"ai_session"+a},n.automaticSession=new wa,n.update=function(){var t=Be(),a=!1,l=n.automaticSession;l.id||(a=!function(e,t){var n=!1,r=s.get(i());if(r&&be(r.split))n=c(e,r);else{var a=Rr(o,i());a&&(n=c(e,a))}return n||!!e.id}(l));var d=n.config.sessionExpirationMs();if(!a&&d>0){var p=n.config.sessionRenewalMs(),f=t-l.acquisitionDate,g=t-l.renewalDate;a=(a=(a=f<0||g<0)||f>d)||g>p}a?function(e){var t=n.config||{},i=(t.getNewId?t.getNewId():null)||pi;n.automaticSession.id=i(t.idLength?t.idLength():22),n.automaticSession.acquisitionDate=e,u(n.automaticSession,e),Cr()||o.throwInternal(he.WARNING,me.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")}(t):(!r||t-r>e.cookieUpdateInterval)&&u(l,t)},n.backup=function(){var e=n.automaticSession;!function(e,t,n){Sr(o,i(),[e,t,n].join("|"))}(e.id,e.acquisitionDate,e.renewalDate)}}))}return e.acquisitionSpan=864e5,e.renewalSpan=18e5,e.cookieUpdateInterval=6e4,e}()}),ka=S(()=>{Ia=function(){}}),Aa=S(()=>{xa=function(){this.id="browser",this.deviceClass="Browser"}}),La=S(()=>{"2.6.4",Pa=function(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.6.4"}});function Fa(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))}var Ma,qa,Ua,ja=S(()=>{ve(),Us(),Mi(),Ma=function(){function e(t,n){this.isNewUser=!1;var i,r=Ht(n),o=Tn(n);ge(e,this,(function(n){n.config=t;var s=n.config.userCookiePostfix&&n.config.userCookiePostfix()?n.config.userCookiePostfix():"";i=function(){return e.userCookieName+s};var a=o.get(i());if(a){n.isNewUser=!1;var c=a.split(e.cookieSeparator);c.length>0&&(n.id=c[0])}if(!n.id){var u=t||{},l=(u.getNewId?u.getNewId():null)||pi;n.id=l(u.idLength?t.idLength():22);var d=Me(new Date);n.accountAcquisitionDate=d,n.isNewUser=!0;var p=[n.id,d];o.set(i(),p.join(e.cookieSeparator),31536e3);var f=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";_r(r,f)}n.accountId=t.accountId?t.accountId():void 0;var g=o.get(e.authUserCookieName);if(g){var h=(g=decodeURI(g)).split(e.cookieSeparator);h[0]&&(n.authenticatedId=h[0]),h.length>1&&h[1]&&(n.accountId=h[1])}n.setAuthenticatedUserContext=function(t,i,s){if(void 0===s&&(s=!1),!Fa(t)||i&&!Fa(i))r.throwInternal(he.WARNING,me.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{n.authenticatedId=t;var a=n.authenticatedId;i&&(n.accountId=i,a=[n.authenticatedId,n.accountId].join(e.cookieSeparator)),s&&o.set(e.authUserCookieName,encodeURI(a))}},n.clearAuthenticatedUserContext=function(){n.authenticatedId=null,n.accountId=null,o.del(e.authUserCookieName)}}))}return e.cookieSeparator="|",e.userCookieName="ai_user",e.authUserCookieName="ai_authUser",e}()}),Ha=S(()=>{qa=function(){}}),Wa=S(()=>{Us(),Mi(),Ua=function(e,t,n,i){var r=this;r.traceID=e||fi(),r.parentID=t,r.name=n;var o=mt();!n&&o&&o.pathname&&(r.name=o.pathname),r.name=Hi(i,r.name)}});function Ka(e,t){e&&e[t]&&0===Ke(e[t]).length&&delete e[t]}var Va,Ba,za,Ga,$a,Ya=S(()=>{ve(),Mi(),Oa(),Us(),ka(),Aa(),La(),ja(),Ha(),Wa(),Va="ext",Ba="tags",za=function e(t,n){var i=this,r=t.logger;this.appId=function(){return null},ge(e,this,(function(e){e.application=new Ia,e.internal=new Pa(n),lt()&&(e.sessionManager=new ba(n,t),e.device=new xa,e.location=new qa,e.user=new Ma(n,t),e.telemetryTrace=new Ua(void 0,void 0,void 0,r),e.session=new wa),e.applySessionContext=function(t,n){var i=e.session,r=e.sessionManager;i&&Ae(i.id)?Ge($e(t.ext,Is.AppExt),"sesId",i.id):r&&r.automaticSession&&Ge($e(t.ext,Is.AppExt),"sesId",r.automaticSession.id,Ae)},e.applyOperatingSystemContxt=function(t,n){Ge(t.ext,Is.OSExt,e.os)},e.applyApplicationContext=function(t,n){var i=e.application;if(i){var r=$e(t,Ba);Ge(r,xs.applicationVersion,i.ver,Ae),Ge(r,xs.applicationBuild,i.build,Ae)}},e.applyDeviceContext=function(t,n){var i=e.device;if(i){var r=$e($e(t,Va),Is.DeviceExt);Ge(r,"localId",i.id,Ae),Ge(r,"ip",i.ip,Ae),Ge(r,"model",i.model,Ae),Ge(r,"deviceClass",i.deviceClass,Ae)}},e.applyInternalContext=function(t,n){var i=e.internal;if(i){var r=$e(t,Ba);Ge(r,xs.internalAgentVersion,i.agentVersion,Ae),Ge(r,xs.internalSdkVersion,i.sdkVersion,Ae),(t.baseType===Wt.dataType||t.baseType===Ko.dataType)&&(Ge(r,xs.internalSnippet,i.snippetVer,Ae),Ge(r,xs.internalSdkSrc,i.sdkSrc,Ae))}},e.applyLocationContext=function(e,t){var n=i.location;n&&Ge($e(e,Ba,[]),xs.locationIp,n.ip,Ae)},e.applyOperationContext=function(t,n){var i=e.telemetryTrace;if(i){var r=$e($e(t,Va),Is.TraceExt,{traceID:void 0,parentID:void 0});Ge(r,"traceID",i.traceID,Ae),Ge(r,"name",i.name,Ae),Ge(r,"parentID",i.parentID,Ae)}},e.applyWebContext=function(e,t){var n=i.web;n&&Ge($e(e,Va),Is.WebExt,n)},e.applyUserContext=function(t,n){var i=e.user;if(i){Ge($e(t,Ba,[]),xs.userAccountId,i.accountId,Ae);var r=$e($e(t,Va),Is.UserExt);Ge(r,"id",i.id,Ae),Ge(r,"authId",i.authenticatedId,Ae)}},e.cleanUp=function(e,t){var n=e.ext;n&&(Ka(n,Is.DeviceExt),Ka(n,Is.UserExt),Ka(n,Is.WebExt),Ka(n,Is.OSExt),Ka(n,Is.AppExt),Ka(n,Is.TraceExt))}}))}}),Xa=S(()=>{F(),ve(),Mi(),Ya(),Us(),Ga=function(e){function t(){var n,i,r=e.call(this)||this;return r.priority=110,r.identifier=Ps,ge(t,r,(function(e,r){e.initialize=function(o,s,a,c){r.initialize(o,s,a,c);var u=e._getTelCtx(),l=e.identifier,d=t.getDefaultConfig();i=i||{},Pe(d,(function(e,t){i[e]=function(){return u.getConfig(l,e,t())}})),e.context=new za(s,i),n=ir(a,Ds),e.context.appId=function(){return n?n._appId:null},e._extConfig=i},e.processTelemetry=function(t,n){if(!Se(t)){n=e._getTelCtx(n),t.name===Ko.envelopeType&&n.diagLog().resetInternalMessageCount();var i=e.context||{};if(i.session&&"string"!=typeof e.context.session.id&&i.sessionManager&&i.sessionManager.update(),function(t,n){$e(t,"tags",[]),$e(t,"ext",{});var i=e.context;i.applySessionContext(t,n),i.applyApplicationContext(t,n),i.applyDeviceContext(t,n),i.applyOperationContext(t,n),i.applyUserContext(t,n),i.applyOperatingSystemContxt(t,n),i.applyWebContext(t,n),i.applyLocationContext(t,n),i.applyInternalContext(t,n),i.cleanUp(t,n)}(t,n),i.user&&i.user.isNewUser){i.user.isNewUser=!1;var r=new Wt(me.SendBrowserInfoOnUserInit,(gt()||{}).userAgent||"");n.diagLog().logInternalMessage(he.CRITICAL,r)}e.processNext(t,n)}}})),r}return D(t,e),t.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},sessionCookiePostfix:function(){},userCookiePostfix:function(){},idLength:function(){return 22},getNewId:function(){return null}}},t}(rn),$a=Ga}),Ja=S(()=>{Xa()});function Qa(e,t,n){var i=0,r=e[t],o=e[n];return r&&o&&(i=Vr(r,o)),i}function Za(e,t,n,i,r){var o=0,s=Qa(n,i,r);return s&&(o=ec(e,t,tr(s))),o}function ec(e,t,n){var i="ajaxPerf",r=0;e&&t&&n&&((e[i]=e[i]||{})[t]=n,r=1);return r}var tc,nc,ic,rc,oc=S(()=>{Us(),Mi(),ve(),tc="properties",nc=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},ic=function e(t,n,i){var r=this,o=i,s="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new nc,r.clientFailure=0,r.traceID=t,r.spanID=n,ge(e,r,(function(e){e.getAbsoluteUrl=function(){return e.requestUrl?kr(e.requestUrl):null},e.getPathName=function(){return e.requestUrl?Wi(o,Lr(e.method,e.requestUrl)):null},e.CreateTrackItem=function(t,n,i){if(e.ajaxTotalDuration=Math.round(1e3*Vr(e.requestSentTime,e.responseFinishedTime))/1e3,e.ajaxTotalDuration<0)return null;var r,o=((r={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:t,startTime:null,duration:e.ajaxTotalDuration,success:+e.status>=200&&+e.status<400,responseCode:+e.status,method:e.method})[tc]={HttpMethod:e.method},r);if(e.requestSentTime&&(o.startTime=new Date,o.startTime.setTime(e.requestSentTime)),function(e,t){var n=e.perfTiming,i=t[tc]||{},r=0,o="name",s="Start",a="End",c="domainLookup",u="connect",l="redirect",d="request",p="response",f="duration",g="startTime",h=u+a,m=d+s,v=p+a,y=l+s,T=l=a,C="transferSize",R="encodedBodySize",S="decodedBodySize",_="serverTiming";if(n){r|=Za(i,l,n,y,T),r|=Za(i,c,n,"domainLookupStart","domainLookupEnd"),r|=Za(i,u,n,"connectStart",h),r|=Za(i,d,n,m,"requestEnd"),r|=Za(i,p,n,"responseStart",v),r|=Za(i,"networkConnect",n,g,h),r|=Za(i,"sentRequest",n,m,v);var E=n[f];E||(E=Qa(n,g,v)||0),r|=ec(i,f,E),r|=ec(i,"perfTotal",E);var w=n[_];if(w){var b={};qe(w,(function(e,t){var n=function(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(e[o]||""+t),i=b[n]||{};Pe(e,(function(e,t){(e!==o&&Ae(t)||Le(t))&&(i[e]&&(t=i[e]+";"+t),(t||!Ae(t))&&(i[e]=t))})),b[n]=i})),r|=ec(i,_,b)}r|=ec(i,C,n[C]),r|=ec(i,R,n[R]),r|=ec(i,S,n[S])}else e.perfMark&&(r|=ec(i,"missing",e.perfAttempts));r&&(t[tc]=i)}(e,o),n&&Ke(e.requestHeaders).length>0&&(o[tc]=o[tc]||{},o[tc].requestHeaders=e.requestHeaders),i){var a=i();if(a){var c=a.correlationContext;if(c&&(o.correlationContext=c),a.headerMap&&Ke(a.headerMap).length>0&&(o[tc]=o[tc]||{},o[tc].responseHeaders=a.headerMap),e.status>=400){var u=a.type;o[tc]=o[tc]||{},(""===u||"text"===u)&&(o[tc][s]=a[s]?a.statusText+" - "+a[s]:a.statusText),"json"===u&&(o[tc][s]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return o}}))}}),sc=S(()=>{Mi(),Mi(),function(){function e(){}return e.GetLength=function(e){var t=0;if(!Se(e)){var n="";try{n=e.toString()}catch(e){}t=n.length,t=isNaN(t)?0:t}return t},e}()}),ac=S(()=>{Mi(),rc=function(){function e(t,n){var i=this;i.traceFlag=e.DEFAULT_TRACE_FLAG,i.version=e.DEFAULT_VERSION,t&&e.isValidTraceId(t)?i.traceId=t:i.traceId=fi(),n&&e.isValidSpanId(n)?i.spanId=n:i.spanId=fi().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.prototype.toString=function(){var e=this;return e.version+"-"+e.traceId+"-"+e.spanId+"-"+e.traceFlag},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}()});function cc(e){var t="";try{!Se(e)&&!Se(e[hc])&&!Se(e[hc].requestUrl)&&(t+="(url: '"+e[hc].requestUrl+"')")}catch(e){}return t}function uc(e,t,n,i,r){e[gc]()[mc](he.CRITICAL,t,n,i,r)}function lc(e,t,n,i,r){e[gc]()[mc](he.WARNING,t,n,i,r)}function dc(e,t,n){return function(i){uc(e,t,n,{ajaxDiagnosticsMessage:cc(i.inst),exception:St(i.err)})}}function pc(e,t){return e&&t?e.indexOf(t):-1}var fc,gc,hc,mc,vc,yc,Tc,Cc,Rc,Sc,_c,Ec,wc,bc,Ic=S(()=>{F(),Us(),Mi(),oc(),sc(),ac(),ve(),fc="ai.ajxmn.",gc="diagLog",hc="ajaxData",mc="throwInternal",vc="fetch",yc=0,Tc=function(e){function t(){var n=e.call(this)||this;n.identifier=t.identifier,n.priority=120;var i,r,o,c,u,l="trackDependencyDataInternal",d=mt(),p=!1,f=!1,g=d&&d.host&&d.host.toLowerCase(),h=t.getEmptyConfig(),m=!1,v=0,y=!1,T=0,C=!1,R=[],S={};return ge(t,n,(function(e,n){function d(e){var t=!0;return(e||h.ignoreHeaders)&&qe(h.ignoreHeaders,(function(n){if(n.toLowerCase()===e.toLowerCase())return t=!1,-1})),t}function _(e,t,n){R.push(function(e,t,n){return e?Pi(e[a],t,n,!1):null}(e,t,n))}function E(e,t,n){var i=!1,r=((Ae(t)?t:(t||{}).url||"")||"").toLowerCase();if(qe(u,(function(e){var t=e;Ae(e)&&(t=new RegExp(e)),i||(i=t.test(r))})),i)return i;var o=pc(r,"?"),s=pc(r,"#");return(-1===o||-1!==s&&s<o)&&(o=s),-1!==o&&(r=r.substring(0,o)),Se(e)?Se(t)||(i="object"==typeof t&&!0===t[or]||!!n&&!0===n[or]):i=!0===e[or]||!0===r[or],i?S[r]||(S[r]=1):S[r]&&(i=!0),i}function w(e,t){var n=!0,i=f;return Se(e)||(n=!0===t||!Se(e[hc])),i&&n}function I(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(e){}return null}function x(t){try{var n=t.getAllResponseHeaders();if(null!==n)if(-1!==pc(n.toLowerCase(),Li.requestContextHeaderLowerCase)){var i=t.getResponseHeader(Li.requestContextHeader);return $r.getCorrelationContext(i)}}catch(n){lc(e,me.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:cc(t),exception:St(n)})}}function P(e,t){if(t.requestUrl&&c&&y){var n=vt();if(n&&be(n.mark)){yc++;var i=c+e+"#"+yc;n.mark(i);var r=n.getEntriesByName(i);r&&1===r.length&&(t.perfMark=r[0])}}}function D(e,t,n,i){var r=t.perfMark,o=vt(),s=h.maxAjaxPerfLookupAttempts,a=h.ajaxPerfLookupDelay,c=t.requestUrl,u=0;!function l(){try{if(o&&r){u++;for(var d=null,p=o.getEntries(),f=p.length-1;f>=0;f--){var g=p[f];if(g){if("resource"===g.entryType)g.initiatorType===e&&(-1!==pc(g.name,c)||-1!==pc(c,g.name))&&(d=g);else if("mark"===g.entryType&&g.name===r.name){t.perfTiming=d;break}if(g.startTime<r.startTime-1e3)break}}}!r||t.perfTiming||u>=s||!1===t.async?(r&&be(o.clearMarks)&&o.clearMarks(r.name),t.perfAttempts=u,n()):setTimeout(l,a)}catch(e){i(e)}}()}function N(t){var n="";try{Se(t)||(n+="string"==typeof t?"(url: '"+t+"')":"(url: '"+t.url+"')")}catch(t){uc(e,me.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:St(t)})}return n}function O(t,n,i,r,o,s){function a(t,n,r){var o=r||{};o.fetchDiagnosticsMessage=N(i),n&&(o.exception=St(n)),lc(e,t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",o)}r&&(r.responseFinishedTime=Kr(),r.status=n,D("fetch",r,(function(){var t=r.CreateTrackItem("Fetch",m,o);t?e[l](t):a(me.FailedMonitorAjaxDur,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(e){a(me.FailedMonitorAjaxGetCorrelationHeader,e,null)})))}function k(t){if(t&&t.headers)try{var n=t.headers.get(Li.requestContextHeader);return $r.getCorrelationContext(n)}catch(n){lc(e,me.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:N(t),exception:St(n)})}}e.initialize=function(g,v,S,N){if(!e.isInitialized()){n.initialize(g,v,S,N);var A=e._getTelCtx();Pe(t.getDefaultConfig(),(function(e,n){h[e]=A.getConfig(t.identifier,e,n)}));var L=h.distributedTracingMode;if(m=h.enableRequestHeaderTracking,y=h.enableAjaxPerfTracking,T=h.maxAjaxCallsPerView,C=h.enableResponseHeaderTracking,u=h.excludeRequestFromAutoTrackingPatterns,o=L===pr.AI||L===pr.AI_AND_W3C,r=L===pr.AI_AND_W3C||L===pr.W3C,y){var F=g.instrumentationKey||"unkwn";c=F.length>5?fc+F.substring(F.length-5)+".":fc+F+"."}if(!1===h.disableAjaxTracking&&(function(e){var t=!1;if(typeof XMLHttpRequest!==s&&!Se(XMLHttpRequest)){var n=XMLHttpRequest[a];t=!(Se(n)||Se(n.open)||Se(n.send)||Se(n.abort))}var i=Rt();if(i&&i<9&&(t=!1),t)try{(new XMLHttpRequest)[hc]={};var r=XMLHttpRequest[a].open;XMLHttpRequest[a].open=r}catch(n){t=!1,uc(e,me.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:St(n)})}return t}(e)&&!f&&(_(XMLHttpRequest,"open",{req:function(t,n,r,o){var s=t.inst,a=s[hc];!E(s,r)&&w(s,!0)&&(!a||!a.xhrMonitoringState.openDone)&&function(t,n,r,o){var s=i&&i.telemetryTrace&&i.telemetryTrace.traceID||fi(),a=fi().substr(0,16),c=new ic(s,a,e[gc]());c.method=n,c.requestUrl=r,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=o,t[hc]=c,function(t){t[hc].xhrMonitoringState.stateChangeAttached=Ei.Attach(t,"readystatechange",(function(){try{t&&4===t.readyState&&w(t)&&function(t){var n=t[hc];function i(n,i){var r=i||{};r.ajaxDiagnosticsMessage=cc(t),n&&(r.exception=St(n)),lc(e,me.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}n.responseFinishedTime=Kr(),n.status=t.status,D("xmlhttprequest",n,(function(){try{var r=n.CreateTrackItem("Ajax",m,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:x(t),type:t.responseType,responseText:I(t),response:t.response};if(C){var n=t.getAllResponseHeaders();if(n){var i=We(n).split(/[\r\n]+/),r={};qe(i,(function(e){var t=e.split(": "),n=t.shift(),i=t.join(": ");d(n)&&(r[n]=i)})),e.headerMap=r}}return e}));r?e[l](r):i(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{t[hc]=null}catch(e){}}}),(function(e){i(e,null)}))}(t)}catch(i){var n=St(i);(!n||-1===pc(n.toLowerCase(),"c00c023f"))&&uc(e,me.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:cc(t),exception:n})}}))}(t)}(s,n,r,o)},hkErr:dc(e,me.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),_(XMLHttpRequest,"send",{req:function(t,n){var i=t.inst,r=i[hc];w(i)&&!r.xhrMonitoringState.sendDone&&(P("xhr",r),r.requestSentTime=Kr(),e.includeCorrelationHeaders(r,void 0,void 0,i),r.xhrMonitoringState.sendDone=!0)},hkErr:dc(e,me.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),_(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[hc];w(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:dc(e,me.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),m&&_(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var i=e.inst;w(i)&&d(t)&&(i[hc].requestHeaders[t]=n)},hkErr:dc(e,me.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),f=!0)),function(){var t=function(){var e=b();return!e||Se(e.Request)||Se(e.Request[a])||Se(e[vc])?null:e[vc]}();if(t){var n=b(),r=t.polyfill;!1===h.disableFetchTracking?(R.push(Pi(n,vc,{req:function(t,n,o){var s;if(p&&!E(null,n,o)&&(!r||!f)){var a=t.ctx();s=function(t,n){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||fi(),o=fi().substr(0,16),s=new ic(r,o,e[gc]());s.requestSentTime=Kr(),t instanceof Request?s.requestUrl=t?t.url:"":s.requestUrl=t;var a="GET";n&&n.method?a=n.method:t&&t instanceof Request&&(a=t.method),s.method=a;var c={};if(m){new Headers((n?n.headers:0)||t instanceof Request&&t.headers||{}).forEach((function(e,t){d(t)&&(c[t]=e)}))}return s.requestHeaders=c,P("fetch",s),s}(n,o);var c=e.includeCorrelationHeaders(s,n,o);c!==o&&t.set(1,c),a.data=s}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then((function(t){return O(e,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:k(t)};if(C){var n={};t.headers.forEach((function(e,t){d(t)&&(n[t]=e)})),e.headerMap=n}return e})),t})).catch((function(i){throw O(e,0,t,n,null,{error:i.message}),i})))},hkErr:dc(e,me.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),p=!0):r&&R.push(Pi(n,vc,{req:function(e,t,n){E(null,t,n)}})),r&&(n[vc].polyfill=r)}}(),S.length>0&&S){for(var M=void 0,q=0;!M&&q<S.length;)S[q]&&S[q].identifier===Ps&&(M=S[q]),q++;M&&(i=M.context)}}},e.teardown=function(){qe(R,(function(e){e.rm()})),R=[],p=!1,f=!1,e.setInitialized(!1)},e.trackDependencyData=function(t,n){e[l](t,n)},e.includeCorrelationHeaders=function(t,n,s,a){var c=e._currentWindowHost||g;if(n){if($r.canIncludeCorrelationHeader(h,t.getAbsoluteUrl(),c)){if(s||(s={}),s.headers=new Headers(s.headers||n instanceof Request&&n.headers||{}),o){var u="|"+t.traceID+"."+t.spanID;s.headers.set(Li.requestIdHeader,u),m&&(t.requestHeaders[Li.requestIdHeader]=u)}if((d=h.appId||i&&i.appId())&&(s.headers.set(Li.requestContextHeader,Li.requestContextAppIdFormat+d),m&&(t.requestHeaders[Li.requestContextHeader]=Li.requestContextAppIdFormat+d)),r){var l=new rc(t.traceID,t.spanID);s.headers.set(Li.traceParentHeader,l.toString()),m&&(t.requestHeaders[Li.traceParentHeader]=l.toString())}}return s}if(a){if($r.canIncludeCorrelationHeader(h,t.getAbsoluteUrl(),c)){if(o){u="|"+t.traceID+"."+t.spanID;a.setRequestHeader(Li.requestIdHeader,u),m&&(t.requestHeaders[Li.requestIdHeader]=u)}var d;if((d=h.appId||i&&i.appId())&&(a.setRequestHeader(Li.requestContextHeader,Li.requestContextAppIdFormat+d),m&&(t.requestHeaders[Li.requestContextHeader]=Li.requestContextAppIdFormat+d)),r){l=new rc(t.traceID,t.spanID);a.setRequestHeader(Li.traceParentHeader,l.toString()),m&&(t.requestHeaders[Li.traceParentHeader]=l.toString())}}return a}},e[l]=function(t,n,i){if(-1===T||v<T){(h.distributedTracingMode===pr.W3C||h.distributedTracingMode===pr.AI_AND_W3C)&&"string"==typeof t.id&&"."!==t.id[t.id.length-1]&&(t.id+="."),Se(t.startTime)&&(t.startTime=new Date);var r=bs.create(t,Bo.dataType,Bo.envelopeType,e[gc](),n,i);e.core.track(r)}else v===T&&uc(e,me.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++v}})),n}return D(t,e),t.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:void 0,disableCorrelationHeaders:!1,distributedTracingMode:pr.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,correlationHeaderExcludePatterns:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"]}},t.getEmptyConfig=function(){var e=this.getDefaultConfig();return Pe(e,(function(t){e[t]=void 0})),e},t.prototype.processTelemetry=function(e,t){this.processNext(e,t)},t.identifier="AjaxDependencyPlugin",t}(rn)}),xc=S(()=>{Ic()}),Pc=S(()=>{Mi(),Js(),Na(),Ja(),xc(),Us(),Rc=["snippet","dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],Sc={__proto__:null,PropertiesPluginIdentifier:Ps,BreezeChannelIdentifier:Ds,AnalyticsPluginIdentifier:Ns,Util:zr,CorrelationIdHelper:$r,UrlHelper:Gr,DateTimeUtils:Yr,ConnectionStringParser:eo,FieldType:{Default:0,Required:1,Array:2,Hidden:4},RequestHeaders:Li,DisabledPropertyName:or,ProcessLegacy:ar,SampleRate:sr,HttpMethod:cr,DEFAULT_BREEZE_ENDPOINT:ur,AIData:no,AIBase:to,Envelope:ro,Event:so,Exception:Ao,Metric:Ho,PageView:Ko,PageViewData:Wo,RemoteDependencyData:Bo,Trace:Go,PageViewPerformance:Yo,Data:Xo,SeverityLevel:Jo,ConfigurationManager:Qo,ContextTagKeys:ws,DataSanitizer:Xi,TelemetryItemCreator:bs,CtxTagKeys:xs,Extensions:Is,DistributedTracingModes:pr},_c=function(){function e(e){var t=this;t._snippetVersion=""+(e.sv||e.version||""),e.queue=e.queue||[],e.version=e.version||2;var n=e.config||{};if(n.connectionString){var i=Jr(n.connectionString),r=i.ingestionendpoint;n.endpointUrl=r?r+"/v2/track":n.endpointUrl,n.instrumentationKey=i.instrumentationkey||n.instrumentationKey}t.appInsights=new zs,t.properties=new $a,t.dependencies=new Tc,t.core=new zn,t._sender=new Ea,t.snippet=e,t.config=n,t.getSKUDefaults()}return e.prototype.getCookieMgr=function(){return this.appInsights.getCookieMgr()},e.prototype.trackEvent=function(e,t){this.appInsights.trackEvent(e,t)},e.prototype.trackPageView=function(e){var t=e||{};this.appInsights.trackPageView(t)},e.prototype.trackPageViewPerformance=function(e){var t=e||{};this.appInsights.trackPageViewPerformance(t)},e.prototype.trackException=function(e){e&&!e.exception&&e.error&&(e.exception=e.error),this.appInsights.trackException(e)},e.prototype._onerror=function(e){this.appInsights._onerror(e)},e.prototype.trackTrace=function(e,t){this.appInsights.trackTrace(e,t)},e.prototype.trackMetric=function(e,t){this.appInsights.trackMetric(e,t)},e.prototype.startTrackPage=function(e){this.appInsights.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,n,i){this.appInsights.stopTrackPage(e,t,n,i)},e.prototype.startTrackEvent=function(e){this.appInsights.startTrackEvent(e)},e.prototype.stopTrackEvent=function(e,t,n){this.appInsights.stopTrackEvent(e,t,n)},e.prototype.addTelemetryInitializer=function(e){return this.appInsights.addTelemetryInitializer(e)},e.prototype.setAuthenticatedUserContext=function(e,t,n){void 0===n&&(n=!1),this.properties.context.user.setAuthenticatedUserContext(e,t,n)},e.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},e.prototype.trackDependencyData=function(e){this.dependencies.trackDependencyData(e)},e.prototype.flush=function(e){var t=this;void 0===e&&(e=!0),Bt(this.core,(function(){return"AISKU.flush"}),(function(){qe(t.core.getTransmissionControls(),(function(t){qe(t,(function(t){t.flush(e)}))}))}),null,e)},e.prototype.onunloadFlush=function(e){void 0===e&&(e=!0),qe(this.core.getTransmissionControls(),(function(t){qe(t,(function(t){t.onunloadFlush?t.onunloadFlush():t.flush(e)}))}))},e.prototype.loadAppInsights=function(e,t,n){var i=this;void 0===e&&(e=!1);var r=this;return e&&r.config.extensions&&r.config.extensions.length>0&&Je("Extensions not allowed in legacy mode"),Bt(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var o=[];o.push(r._sender),o.push(r.properties),o.push(r.dependencies),o.push(r.appInsights),r.core.initialize(r.config,o,t,n),r.context=r.properties.context,Cc&&r.context&&(r.context.internal.sdkSrc=Cc),function(t){if(t){var n="";Se(r._snippetVersion)||(n+=r._snippetVersion),e&&(n+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=n||"-"),Pe(r,(function(e,n){Ae(e)&&!be(n)&&e&&"_"!==e[0]&&-1===Rc.indexOf(e)&&(t[e]=n)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},e.prototype.updateSnippetDefinitions=function(e){Qe(e,this,(function(e){return e&&-1===Rc.indexOf(e)}))},e.prototype.emptyQueue=function(){var e=this;try{if(Oe(e.snippet.queue)){for(var t=e.snippet.queue.length,n=0;n<t;n++){(0,e.snippet.queue[n])()}e.snippet.queue=void 0,delete e.snippet.queue}}catch(e){e&&be(e.toString)&&e.toString()}},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.addHousekeepingBeforeUnload=function(e){if(lt()||pt()){var t=function(){e.onunloadFlush(!1),qe(e.appInsights.core._extensions,(function(e){if(e.identifier===Ps)return e&&e.context&&e.context._sessionManager&&e.context._sessionManager.backup(),-1}))};if(!e.appInsights.config.disableFlushOnBeforeUnload){var n=ui("beforeunload",t);n=ui("unload",t)||n,n=ui("pagehide",t)||n,!(n=ui("visibilitychange",t)||n)&&!function(){var e=gt();return!(!e||!e.product)&&e.product===kt}()&&e.appInsights.core.logger.throwInternal(he.CRITICAL,me.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload and pagehide")}e.appInsights.config.disableFlushOnUnload||(ui("pagehide",t),ui("visibilitychange",t))}},e.prototype.getSender=function(){return this._sender},e.prototype.getSKUDefaults=function(){var e=this;e.config.diagnosticLogInterval=e.config.diagnosticLogInterval&&e.config.diagnosticLogInterval>0?e.config.diagnosticLogInterval:1e4},e}(),function(){var e=null,t=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var n=(document||{}).currentScript;n&&(e=n.src)}catch(e){}if(e)try{var i=e.toLowerCase();if(i)for(var r="",o=0;o<t.length;o++)if(-1!==i.indexOf(t[o])){r="cdn"+(o+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),Cc=r+"";break}}catch(e){}}()}),Dc=S(()=>{Us(),Mi(),Ec=["snippet","getDefaultConfig","_hasLegacyInitializers","_queue","_processLegacyInitializers"],wc=function(){function e(t,n){this._hasLegacyInitializers=!1,this._queue=[],this.config=e.getDefaultConfig(t.config),this.appInsightsNew=n,this.context={addTelemetryInitializer:this.addTelemetryInitializers.bind(this)}}return e.getDefaultConfig=function(e){return e||(e={}),e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.maxBatchSizeInBytes=e.maxBatchSizeInBytes>0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=er(e.enableDebug),e.disableExceptionTracking=er(e.disableExceptionTracking),e.disableTelemetry=er(e.disableTelemetry),e.verboseLogging=er(e.verboseLogging),e.emitLineDelimitedJson=er(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=er(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=er(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=er(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=er(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=er(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=er(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=er(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=er(e.isRetryDisabled),e.isCookieUseDisabled=er(e.isCookieUseDisabled),e.isStorageUseDisabled=er(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=er(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=er(e.enableCorsCorrelation),e},e.prototype.addTelemetryInitializers=function(e){var t=this;this._hasLegacyInitializers||(this.appInsightsNew.addTelemetryInitializer((function(e){t._processLegacyInitializers(e)})),this._hasLegacyInitializers=!0),this._queue.push(e)},e.prototype.getCookieMgr=function(){return this.appInsightsNew.getCookieMgr()},e.prototype.startTrackPage=function(e){this.appInsightsNew.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,n,i){this.appInsightsNew.stopTrackPage(e,t,n)},e.prototype.trackPageView=function(e,t,n,i,r){var o={name:e,uri:t,properties:n,measurements:i};this.appInsightsNew.trackPageView(o)},e.prototype.trackEvent=function(e,t,n){this.appInsightsNew.trackEvent({name:e})},e.prototype.trackDependency=function(e,t,n,i,r,o,s){this.appInsightsNew.trackDependencyData({id:e,target:n,type:i,duration:r,properties:{HttpMethod:t},success:o,responseCode:s})},e.prototype.trackException=function(e,t,n,i,r){this.appInsightsNew.trackException({exception:e})},e.prototype.trackMetric=function(e,t,n,i,r,o){this.appInsightsNew.trackMetric({name:e,average:t,sampleCount:n,min:i,max:r})},e.prototype.trackTrace=function(e,t,n){this.appInsightsNew.trackTrace({message:e,severityLevel:n})},e.prototype.flush=function(e){this.appInsightsNew.flush(e)},e.prototype.setAuthenticatedUserContext=function(e,t,n){this.appInsightsNew.context.user.setAuthenticatedUserContext(e,t,n)},e.prototype.clearAuthenticatedUserContext=function(){this.appInsightsNew.context.user.clearAuthenticatedUserContext()},e.prototype._onerror=function(e,t,n,i,r){this.appInsightsNew._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r})},e.prototype.startTrackEvent=function(e){this.appInsightsNew.startTrackEvent(e)},e.prototype.stopTrackEvent=function(e,t,n){this.appInsightsNew.stopTrackEvent(e,t,n)},e.prototype.downloadAndSetup=function(e){Je("downloadAndSetup not implemented in web SKU")},e.prototype.updateSnippetDefinitions=function(e){Qe(e,this,(function(e){return e&&-1===Ec.indexOf(e)}))},e.prototype.loadAppInsights=function(){var e=this;if(this.config.iKey){var t=this.trackPageView;this.trackPageView=function(n,i,r){t.apply(e,[null,n,i,r])}}var n="logPageView";"function"==typeof this.snippet[n]&&(this[n]=function(t,n,i){e.trackPageView(null,t,n,i)});var i="logEvent";return"function"==typeof this.snippet[i]&&(this[i]=function(t,n,i){e.trackEvent(t,n,i)}),this},e.prototype._processLegacyInitializers=function(e){return e.tags[ar]=this._queue,e},e}()}),Nc=S(()=>{Dc(),Pc(),Mi(),bc=function(){function e(){}return e.getAppInsights=function(e,t){var n=new _c(e),i=2!==t;if(gi(),2===t)return n.updateSnippetDefinitions(e),n.loadAppInsights(i),n;var r=new wc(e,n);return r.updateSnippetDefinitions(e),n.loadAppInsights(i),r},e}()}),Oc={};((e,t)=>{for(var n in(e=>{m(e,"__esModule",{value:!0})})(e),t)m(e,n,{get:t[n],enumerable:!0})})(Oc,{AppInsightsCore:()=>zn,ApplicationAnalytics:()=>zs,ApplicationInsights:()=>_c,ApplicationInsightsContainer:()=>bc,BaseCore:()=>Vn,BaseTelemetryPlugin:()=>rn,CoreUtils:()=>Si,DependenciesPlugin:()=>Tc,DistributedTracingModes:()=>pr,Event:()=>so,Exception:()=>Ao,LoggingSeverity:()=>he,Metric:()=>Ho,NotificationManager:()=>Bn,PageView:()=>Ko,PageViewPerformance:()=>Yo,PerfEvent:()=>zt,PerfManager:()=>Gt,PropertiesPlugin:()=>$a,RemoteDependencyData:()=>Bo,Sender:()=>Ea,SeverityLevel:()=>Jo,Telemetry:()=>Sc,Trace:()=>Go,Util:()=>zr,_InternalMessageId:()=>me,doPerf:()=>Bt});var kc,Ac,Lc=S(()=>{Pc(),Nc(),Mi(),Us(),Na(),Js(),Ja(),xc()});function Fc(){return void 0!==h.env.isTelemetryEnabled?h.env.isTelemetryEnabled?kc.ON:kc.OFF:h.workspace.getConfiguration("telemetry").get("enableTelemetry")?kc.ON:kc.OFF}(Ac=kc||(kc={})).ON="on",Ac.OFF="off";var Mc=e=>_(void 0,null,(function*(){let t;try{let n,i=yield Promise.resolve().then(()=>(Lc(),Oc));e&&0===e.indexOf("AIF-")&&(n="https://vortex.data.microsoft.com/collect/v1"),t=new i.ApplicationInsights({config:{instrumentationKey:e,endpointUrl:n,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!0,disableInstrumentationKeyValidation:!0}}),t.loadAppInsights();let r=Fc();n&&r===kc.ON&&fetch(n).catch(()=>t=void 0)}catch(e){return Promise.reject(e)}return{logEvent:(e,n)=>{null==t||t.trackEvent({name:e},R(R({},null==n?void 0:n.properties),null==n?void 0:n.measurements))},logException:(e,n)=>{null==t||t.trackException({exception:e,properties:R(R({},null==n?void 0:n.properties),null==n?void 0:n.measurements)})},flush:()=>_(void 0,null,(function*(){null==t||t.flush()}))}})),qc=class extends class{constructor(e,t,n,i,r){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!r,this.updateUserOptStatus(),void 0!==h.env.onDidChangeTelemetryEnabled?(this.disposables.push(h.env.onDidChangeTelemetryEnabled(()=>this.updateUserOptStatus())),this.disposables.push(h.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))):this.disposables.push(h.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))}updateUserOptStatus(){let e=Fc();this.userOptIn=e===kc.ON,this.errorOptIn=e===kc.ON,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach(n=>{0===e.indexOf(n+"+")&&(t=n)}),t}get extension(){return void 0===this._extension&&(this._extension=h.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let i in e)n[i]=t(i,e[i]);return n}shouldSendErrorTelemetry(){return!1!==this.errorOptIn&&(!this.firstParty||("other"!==this.cleanRemoteName(h.env.remoteName)||!(void 0===this.extension||this.extension.extensionKind===h.ExtensionKind.Workspace||h.env.uiKind===h.UIKind.Web)))}getCommonProperties(){let e=Object.create(null);if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,h&&h.env){switch(e["common.vscodemachineid"]=h.env.machineId,e["common.vscodesessionid"]=h.env.sessionId,e["common.vscodeversion"]=h.version,e["common.isnewappinstall"]=h.env.isNewAppInstall?h.env.isNewAppInstall.toString():"false",e["common.product"]=h.env.appHost,h.env.uiKind){case h.UIKind.Web:e["common.uikind"]="web";break;case h.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(h.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let i=[];""!==h.env.appRoot&&i.push(new RegExp(h.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&i.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let r=e;if(t){let t=[];for(let r of i)for(;(n=r.exec(e))&&n;)t.push([n.index,r.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(r="";(n=s.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every(([e,t])=>n.index<e||n.index>=t)&&(r+=e.substring(a,n.index)+"<REDACTED: user-file-path>",a=s.lastIndex);a<e.length&&(r+=e.substr(a))}for(let e of i)r=r.replace(e,"");return r}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t=Object.create(null);for(let n of Object.keys(e)){let i=e[n];if(!i)continue;let r=/@[a-zA-Z0-9-.]+/;/(key|token|sig|signature|password|passwd|pwd)[="':\s]/.test(i.toLowerCase())?t[n]="<REDACTED: secret>":r.test(i)?t[n]="<REDACTED: email>":t[n]=i}return t}sendTelemetryEvent(e,t,n){if(this.userOptIn&&""!==e){t=R(R({},t),this.getCommonProperties());let i=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:n})}}sendRawTelemetryEvent(e,t,n){this.userOptIn&&""!==e&&(t=R(R({},t),this.getCommonProperties()),this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:t,measurements:n}))}sendTelemetryErrorEvent(e,t,n,i){if(this.errorOptIn&&""!==e){t=R(R({},t),this.getCommonProperties());let r=this.cloneAndChange(t,(e,t)=>this.shouldSendErrorTelemetry()?this.anonymizeFilePaths(t,this.firstParty):void 0===i||-1!==i.indexOf(e)?"REDACTED":this.anonymizeFilePaths(t,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(r),measurements:n})}}sendTelemetryException(e,t,n){if(this.shouldSendErrorTelemetry()&&this.errorOptIn&&e){t=R(R({},t),this.getCommonProperties());let i=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),this.telemetryAppender.logException(e,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:n})}}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map(e=>e.dispose()))}}{constructor(e,t,n,i){let r=new class{constructor(e,t){this._isInstantiated=!1,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e,Fc()!==kc.OFF&&this.instantiateAppender()}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):!this._isInstantiated&&Fc()===kc.ON&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):!this._isInstantiated&&Fc()!==kc.OFF&&this._exceptionQueue.push({exception:e,data:t})}flush(){return _(this,null,(function*(){this._telemetryClient&&(yield this._telemetryClient.flush(),this._telemetryClient=void 0)}))}_flushQueues(){this._eventQueue.forEach(({eventName:e,data:t})=>this.logEvent(e,t)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:t})=>this.logException(e,t)),this._exceptionQueue=[]}instantiateAppender(){this._isInstantiated||this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._isInstantiated=!0,this._flushQueues()}).catch(e=>{console.error(e)})}}(n,Mc);n&&0===n.indexOf("AIF-")&&(i=!0),super(e,t,r,{release:navigator.appVersion,platform:"web",architecture:"web"},i)}}}.call(this,n(90))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}]);
  //# sourceMappingURL=extension.browser.js.map