module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=354)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METADATA_KEY=void 0;var r=n(33);t.METADATA_KEY=r;var i=n(387);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return i.Container}});var o=n(80);Object.defineProperty(t,"BindingScopeEnum",{enumerable:!0,get:function(){return o.BindingScopeEnum}}),Object.defineProperty(t,"BindingTypeEnum",{enumerable:!0,get:function(){return o.BindingTypeEnum}}),Object.defineProperty(t,"TargetTypeEnum",{enumerable:!0,get:function(){return o.TargetTypeEnum}});var s=n(403);Object.defineProperty(t,"AsyncContainerModule",{enumerable:!0,get:function(){return s.AsyncContainerModule}}),Object.defineProperty(t,"ContainerModule",{enumerable:!0,get:function(){return s.ContainerModule}});var a=n(404);Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return a.injectable}});var c=n(405);Object.defineProperty(t,"tagged",{enumerable:!0,get:function(){return c.tagged}});var u=n(406);Object.defineProperty(t,"named",{enumerable:!0,get:function(){return u.named}});var l=n(263);Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return l.inject}}),Object.defineProperty(t,"LazyServiceIdentifer",{enumerable:!0,get:function(){return l.LazyServiceIdentifer}});var d=n(407);Object.defineProperty(t,"optional",{enumerable:!0,get:function(){return d.optional}});var h=n(408);Object.defineProperty(t,"unmanaged",{enumerable:!0,get:function(){return h.unmanaged}});var p=n(409);Object.defineProperty(t,"multiInject",{enumerable:!0,get:function(){return p.multiInject}});var f=n(410);Object.defineProperty(t,"targetName",{enumerable:!0,get:function(){return f.targetName}});var g=n(411);Object.defineProperty(t,"postConstruct",{enumerable:!0,get:function(){return g.postConstruct}});var m=n(261);Object.defineProperty(t,"MetadataReader",{enumerable:!0,get:function(){return m.MetadataReader}});var v=n(107);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return v.id}});var y=n(92);Object.defineProperty(t,"decorate",{enumerable:!0,get:function(){return y.decorate}});var b=n(266);Object.defineProperty(t,"traverseAncerstors",{enumerable:!0,get:function(){return b.traverseAncerstors}}),Object.defineProperty(t,"taggedConstraint",{enumerable:!0,get:function(){return b.taggedConstraint}}),Object.defineProperty(t,"namedConstraint",{enumerable:!0,get:function(){return b.namedConstraint}}),Object.defineProperty(t,"typeConstraint",{enumerable:!0,get:function(){return b.typeConstraint}});var _=n(147);Object.defineProperty(t,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return _.getServiceIdentifierAsString}});var S=n(412);Object.defineProperty(t,"multiBindToService",{enumerable:!0,get:function(){return S.multiBindToService}})},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",e.Python="Python"}(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",e[e.python=29]="python"}(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){e.exports=require("vscode")},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IClipboard=t.IActiveResourceService=t.ILanguageService=t.IApplicationEnvironment=t.IDebugService=t.ITerminalManager=t.IWorkspaceService=t.IDocumentManager=t.IJupyterExtensionDependencyManager=t.IContextKeyManager=t.ICommandManager=t.IApplicationShell=void 0,t.IApplicationShell=Symbol("IApplicationShell"),t.ICommandManager=Symbol("ICommandManager"),t.IContextKeyManager=Symbol("IContextKeyManager"),t.IJupyterExtensionDependencyManager=Symbol("IJupyterExtensionDependencyManager"),t.IDocumentManager=Symbol("IDocumentManager"),t.IWorkspaceService=Symbol("IWorkspaceService"),t.ITerminalManager=Symbol("ITerminalManager"),t.IDebugService=Symbol("IDebugManager"),t.IApplicationEnvironment=Symbol("IApplicationEnvironment"),t.ILanguageService=Symbol("ILanguageService"),t.IActiveResourceService=Symbol("IActiveResourceService"),t.IClipboard=Symbol("IClipboard")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logTo=t.traceDecoratorWarn=t.traceDecoratorInfo=t.traceDecoratorError=t.traceDecoratorVerbose=t.traceVerbose=t.traceInfo=t.traceWarn=t.traceError=t.traceLog=t.initializeFileLogging=t.setLoggingLevel=t.registerLogger=void 0;const r=n(52),i=n(885),o=n(41),s=n(8),a=n(420),c=n(269),u=n(211),l=c.TraceOptions.Arguments|c.TraceOptions.ReturnValue;let d=[];function h(e){return d.push(e),{dispose:()=>{d=d.filter(t=>t!==e)}}}t.registerLogger=h;const p=new Map([["error",c.LogLevel.Error],["warn",c.LogLevel.Warn],["info",c.LogLevel.Info],["debug",c.LogLevel.Debug],["none",c.LogLevel.Off],["off",c.LogLevel.Off],[void 0,c.LogLevel.Error]]);let f;function g(...e){f>=c.LogLevel.Error&&d.forEach(t=>t.traceError(...e))}function m(...e){f>=c.LogLevel.Warn&&d.forEach(t=>t.traceWarn(...e))}function v(...e){f>=c.LogLevel.Info&&d.forEach(t=>t.traceInfo(...e))}function y(...e){f>=c.LogLevel.Debug&&d.forEach(t=>t.traceVerbose(...e))}function b(e){return function(t,n,r){const s=r.value;return r.value=function(...n){const r={kind:"Class",name:t&&t.constructor?t.constructor.name:"",args:n},a=this;return function(e,t){const n=new o.StopWatch;try{const r=t();return(0,i.isPromise)(r)?r.then(t=>(e({elapsed:n.elapsedTime,returnValue:t}),t)).catch(t=>{e({elapsed:n.elapsedTime,err:t})}):e({elapsed:n.elapsedTime,returnValue:r}),r}catch(t){throw e({elapsed:n.elapsedTime,err:t}),t}}(t=>e(r,t),()=>s.apply(a,n))},r}}function _(e){return b((t,n)=>function(e,t,n){const r=function(e,t,n){n=function(e){let{kind:t,name:n,args:r}=e;t&&""!==t||(t="Function");n&&""!==n||(n="");r||(r=[]);return{kind:t,name:n,args:r}}(n);const r=[e.message];r.push(`${n.kind} name = ${n.name}`.trim(),`completed in ${t.elapsed}ms`,`has a ${t.returnValue?"truthy":"falsy"} return value`),(e.opts&c.TraceOptions.Arguments)===c.TraceOptions.Arguments&&r.push((0,u.argsToLogString)(n.args));(e.opts&c.TraceOptions.ReturnValue)===c.TraceOptions.ReturnValue&&r.push((0,u.returnValueToLogString)(t.returnValue));return r.join(", ")}(e,t,n);void 0===t.err?(!e.level||e.level>c.LogLevel.Error)&&S(c.LogLevel.Info,[r]):(S(c.LogLevel.Error,[r,t.err]),(0,s.sendTelemetryEvent)("ERROR",void 0,void 0,t.err))}(e,n,t))}function S(e,...t){switch(e){case c.LogLevel.Error:g(...t);break;case c.LogLevel.Warn:m(...t);break;case c.LogLevel.Info:v(...t);break;case c.LogLevel.Debug:y(...t)}}t.setLoggingLevel=function(e){var t;f=null!==(t=p.get(e))&&void 0!==t?t:c.LogLevel.Error},t.initializeFileLogging=function(e){if(process.env.VSC_PYTHON_LOG_FILE){const t=new a.FileLogger((0,r.createWriteStream)(process.env.VSC_PYTHON_LOG_FILE));e.push(t),e.push(h(t))}},t.traceLog=function(...e){d.forEach(t=>t.traceLog(...e))},t.traceError=g,t.traceWarn=m,t.traceInfo=v,t.traceVerbose=y,t.traceDecoratorVerbose=function(e,t=l){return _({message:e,opts:t,level:c.LogLevel.Debug})},t.traceDecoratorError=function(e){return _({message:e,opts:l,level:c.LogLevel.Error})},t.traceDecoratorInfo=function(e){return _({message:e,opts:l,level:c.LogLevel.Info})},t.traceDecoratorWarn=function(e){return _({message:e,opts:l,level:c.LogLevel.Warn})},t.logTo=S},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{if(void 0!==t[n]&&null!==t[n])try{switch(typeof t[n]){case"string":d[n]=t[n];break;case"object":d[n]="object";break;default:d[n]=t[n].toString()}}catch(t){console.error(`Failed to serialize ${n} for ${e}`,t)}})}if(Object.assign(d,s),o){const e={errorName:o.name,errorMessage:o.message,errorStack:null!==(c=o.stack)&&void 0!==c?c:""};Object.assign(d,e);const t=Object.getOwnPropertyNames(e);u.sendTelemetryErrorEvent(h,d,l,t)}else u.sendTelemetryEvent(h,d,l);process.env&&process.env.VSC_PYTHON_LOG_TELEMETRY&&console.info(`Telemetry Event : ${h} Measures: ${JSON.stringify(l)} Props: ${JSON.stringify(d)} `)}t.setSharedProperty=function(e,t){const n=e;(0,r.isUnitTestExecution)()&&n.startsWith("ds_")||(void 0===t?delete s[n]:s[n]=t)},t._resetSharedProperties=function(){for(const e of Object.keys(s))delete s[e]},t.clearTelemetryReporter=function(){a=void 0},t.sendTelemetryEvent=c,t.captureTelemetry=function(e,t,n=!0,r,s,a){return function(u,l,d){const h=d.value;return d.value=function(...u){if(!n&&!s&&!a)return c(e,void 0,t),h.apply(this,u);const l=e=>s?{...t,...s(this,e)}:t,d=n?new i.StopWatch:void 0,p=e=>{const t=d?{duration:d.elapsedTime}:void 0;return a?{...t,...a(this,e)}:t},f=h.apply(this,u);return f&&(0,o.isPromise)(f)?f.then(t=>(c(e,p(t),l(t)),t)).catch(t=>{const n={...l(),failed:!0};c(r||e,p(),n,t)}):c(e,p(f),l(f)),f},d}},t.sendTelemetryWhenDone=function(e,t,n,r){if(n=n||new i.StopWatch,"function"!=typeof t.then)throw new Error("Method is neither a Promise nor a Theneable");t.then(t=>(c(e,n.elapsedTime,r),t),t=>(c(e,n.elapsedTime,r,t),Promise.reject(t)))}},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.ENVIRONMENT_WITHOUT_PYTHON_SELECTED="ENVIRONMENT_WITHOUT_PYTHON_SELECTED",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.CREATE_NEW_FILE_COMMAND="CREATE_NEW_FILE_COMMAND",e.LINTER_NOT_INSTALLED_PROMPT="LINTER_NOT_INSTALLED_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";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};function o(){return"1"===process.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.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.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.CreateNewFile="python.createNewFile",e.Set_Linter="python.setLinter",e.Enable_Linter="python.enableLinting",e.Run_Linter="python.runLinting",e.Enable_SourceMap_Support="python.enableSourceMapSupport",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"===process.env.TRAVIS||void 0!==process.env.TF_BUILD,t.isTestExecution=function(){return"1"===process.env.VSC_PYTHON_CI_TEST||o()},t.isUnitTestExecution=o,t.UseProposedApi=Symbol("USE_VSC_PROPOSED_API"),i(n(81),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IInterpreterStatusbarVisibilityFilter=t.IInterpreterHelper=t.IShebangCodeLensProvider=t.IInterpreterDisplay=t.IInterpreterService=t.ICondaService=t.IComponentAdapter=void 0,t.IComponentAdapter=Symbol("IComponentAdapter"),t.ICondaService=Symbol("ICondaService"),t.IInterpreterService=Symbol("IInterpreterService"),t.IInterpreterDisplay=Symbol("IInterpreterDisplay"),t.IShebangCodeLensProvider=Symbol("IShebangCodeLensProvider"),t.IInterpreterHelper=Symbol("IInterpreterHelper"),t.IInterpreterStatusbarVisibilityFilter=Symbol("IInterpreterStatusbarVisibilityFilter")},function(e,t,n){"use strict";String.prototype.splitLines=function(e={removeEmptyEntries:!0,trim:!0}){let t=this.split(/\r?\n/g);return e&&e.trim&&(t=t.map(e=>e.trim())),e&&e.removeEmptyEntries&&(t=t.filter(e=>e.length>0)),t},String.prototype.toCommandArgumentForPythonExt=function(){return this?!(this.indexOf(" ")>=0||this.indexOf("&")>=0)||this.startsWith('"')||this.endsWith('"')?this.toString():`"${this}"`:this},String.prototype.fileToCommandArgumentForPythonExt=function(){return this?this.toCommandArgumentForPythonExt().replace(/\\/g,"/"):this},String.prototype.trimQuotes=function(){return this?this.replace(/(^['"])|(['"]$)/g,""):this},String.prototype.replaceAll=function(e,t){if(!this)return this;return this.replace(new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),t)},Promise.prototype.ignoreErrors=function(){this.catch(()=>{})},String.prototype.format||(String.prototype.format=function(){const e=arguments;return this.replace(/{(\d+)}/g,(t,n)=>void 0===e[n]?t:e[n])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSystem=t.FileType=t.IFileSystemPathUtils=t.IPlatformService=t.IRegistry=t.RegistryHive=void 0;const r=n(2);!function(e){e[e.HKCU=0]="HKCU",e[e.HKLM=1]="HKLM"}(t.RegistryHive||(t.RegistryHive={})),t.IRegistry=Symbol("IRegistry"),t.IPlatformService=Symbol("IPlatformService"),t.IFileSystemPathUtils=Symbol("IFileSystemPathUtils"),t.FileType=r.FileType,t.IFileSystem=Symbol("IFileSystem")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchToPrereleaseExtension=t.SwitchToDefaultLS=t.Python27Support=t.OutdatedDebugger=t.Testing=t.DebugConfigStrings=t.Products=t.ExtensionSurveyBanner=t.Installer=t.Linters=t.Logging=t.OutputChannelNames=t.InterpreterQuickPickList=t.Interpreters=t.Experiments=t.Http=t.LanguageService=t.TensorBoard=t.Pylance=t.AttachProcess=t.CommonSurvey=t.Common=t.Diagnostics=void 0;const r=n(203),i=n(426);function o(e,t){return()=>function(e,t){(0,i.shouldLoadUsingNodeFS)()&&(0,i.loadLocalizedStringsUsingNodeFS)(new r.FileSystem);return(0,i.getLocalizedString)(e,t)}(e,t)}!function(e){e.warnSourceMaps=o("diagnostics.warnSourceMaps","Source map support is enabled in the Python Extension, this will adversely impact performance of the extension."),e.disableSourceMaps=o("diagnostics.disableSourceMaps","Disable Source Map Support"),e.warnBeforeEnablingSourceMaps=o("diagnostics.warnBeforeEnablingSourceMaps","Enabling source map support in the Python Extension will adversely impact performance of the extension."),e.enableSourceMapsAndReloadVSC=o("diagnostics.enableSourceMapsAndReloadVSC","Enable and reload Window."),e.lsNotSupported=o("diagnostics.lsNotSupported","Your operating system does not meet the minimum requirements of the Python Language Server. Reverting to the alternative autocompletion provider, Jedi."),e.removedPythonPathFromSettings=o("diagnostics.removedPythonPathFromSettings",'The "python.pythonPath" setting in your settings.json is no longer used by the Python extension. If you want, you can use a new setting called "python.defaultInterpreterPath" instead. Keep in mind that you need to change the value of this setting manually as the Python extension doesn\'t modify it when you change interpreters. [Learn more](https://aka.ms/AA7jfor).'),e.invalidPythonPathInDebuggerSettings=o("diagnostics.invalidPythonPathInDebuggerSettings",'You need to select a Python interpreter before you start debugging.\n\nTip: click on "Select Python Interpreter" in the status bar.'),e.invalidPythonPathInDebuggerLaunch=o("diagnostics.invalidPythonPathInDebuggerLaunch","The Python path in your debug configuration is invalid."),e.invalidDebuggerTypeDiagnostic=o("diagnostics.invalidDebuggerTypeDiagnostic",'Your launch.json file needs to be updated to change the "pythonExperimental" debug configurations to use the "python" debugger type, otherwise Python debugging may not work. Would you like to automatically update your launch.json file now?'),e.consoleTypeDiagnostic=o("diagnostics.consoleTypeDiagnostic",'Your launch.json file needs to be updated to change the console type string from "none" to "internalConsole", otherwise Python debugging may not work. Would you like to automatically update your launch.json file now?'),e.justMyCodeDiagnostic=o("diagnostics.justMyCodeDiagnostic",'Configuration "debugStdLib" in launch.json is no longer supported. It\'s recommended to replace it with "justMyCode", which is the exact opposite of using "debugStdLib". Would you like to automatically update your launch.json file to do that?'),e.yesUpdateLaunch=o("diagnostics.yesUpdateLaunch","Yes, update launch.json"),e.invalidTestSettings=o("diagnostics.invalidTestSettings",'Your settings needs to be updated to change the setting "python.unitTest." to "python.testing.", otherwise testing Python code using the extension may not work. Would you like to automatically update your settings now?'),e.updateSettings=o("diagnostics.updateSettings","Yes, update settings"),e.checkIsort5UpgradeGuide=o("diagnostics.checkIsort5UpgradeGuide","We found outdated configuration for sorting imports in this workspace. Check the [isort upgrade guide](https://aka.ms/AA9j5x4) to update your settings."),e.pylanceDefaultMessage=o("diagnostics.pylanceDefaultMessage","The Python extension now includes Pylance to improve completions, code navigation, overall performance and much more! You can learn more about the update and learn how to change your language server [here](https://aka.ms/new-python-bundle).\n\nRead Pylance's license [here](https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license).")}(t.Diagnostics||(t.Diagnostics={})),function(e){e.bannerLabelYes=o("Common.bannerLabelYes","Yes"),e.bannerLabelNo=o("Common.bannerLabelNo","No"),e.yesPlease=o("Common.yesPlease","Yes, please"),e.canceled=o("Common.canceled","Canceled"),e.cancel=o("Common.cancel","Cancel"),e.ok=o("Common.ok","Ok"),e.gotIt=o("Common.gotIt","Got it!"),e.install=o("Common.install","Install"),e.loadingExtension=o("Common.loadingPythonExtension","Python extension loading..."),e.openOutputPanel=o("Common.openOutputPanel","Show output"),e.noIWillDoItLater=o("Common.noIWillDoItLater","No, I will do it later"),e.notNow=o("Common.notNow","Not now"),e.doNotShowAgain=o("Common.doNotShowAgain","Do not show again"),e.reload=o("Common.reload","Reload"),e.moreInfo=o("Common.moreInfo","More Info"),e.learnMore=o("Common.learnMore","Learn more"),e.and=o("Common.and","and"),e.reportThisIssue=o("Common.reportThisIssue","Report this issue"),e.recommended=o("Common.recommended","Recommended"),e.clearAll=o("Common.clearAll","Clear all")}(t.Common||(t.Common={})),function(e){e.remindMeLaterLabel=o("CommonSurvey.remindMeLaterLabel","Remind me later"),e.yesLabel=o("CommonSurvey.yesLabel","Yes, take survey now"),e.noLabel=o("CommonSurvey.noLabel","No, thanks")}(t.CommonSurvey||(t.CommonSurvey={})),function(e){e.unsupportedOS=o("AttachProcess.unsupportedOS","Operating system '{0}' not supported."),e.attachTitle=o("AttachProcess.attachTitle","Attach to process"),e.selectProcessPlaceholder=o("AttachProcess.selectProcessPlaceholder","Select the process to attach to"),e.noProcessSelected=o("AttachProcess.noProcessSelected","No process selected"),e.refreshList=o("AttachProcess.refreshList","Refresh process list")}(t.AttachProcess||(t.AttachProcess={})),function(e){e.remindMeLater=o("Pylance.remindMeLater","Remind me later"),e.pylanceNotInstalledMessage=o("Pylance.pylanceNotInstalledMessage","Pylance extension is not installed."),e.pylanceInstalledReloadPromptMessage=o("Pylance.pylanceInstalledReloadPromptMessage","Pylance extension is now installed. Reload window to activate?"),e.pylanceRevertToJediPrompt=o("Pylance.pylanceRevertToJediPrompt",'The Pylance extension is not installed but the python.languageServer value is set to "Pylance". Would you like to install the Pylance extension to use Pylance, or revert back to Jedi?'),e.pylanceInstallPylance=o("Pylance.pylanceInstallPylance","Install Pylance"),e.pylanceRevertToJedi=o("Pylance.pylanceRevertToJedi","Revert to Jedi")}(t.Pylance||(t.Pylance={})),function(e){e.enterRemoteUrl=o("TensorBoard.enterRemoteUrl","Enter remote URL"),e.enterRemoteUrlDetail=o("TensorBoard.enterRemoteUrlDetail","Enter a URL pointing to a remote directory containing your TensorBoard log files"),e.useCurrentWorkingDirectoryDetail=o("TensorBoard.useCurrentWorkingDirectoryDetail","TensorBoard will search for tfevent files in all subdirectories of the current working directory"),e.useCurrentWorkingDirectory=o("TensorBoard.useCurrentWorkingDirectory","Use current working directory"),e.currentDirectory=o("TensorBoard.currentDirectory","Current: {0}"),e.logDirectoryPrompt=o("TensorBoard.logDirectoryPrompt","Select a log directory to start TensorBoard with"),e.progressMessage=o("TensorBoard.progressMessage","Starting TensorBoard session..."),e.failedToStartSessionError=o("TensorBoard.failedToStartSessionError","We failed to start a TensorBoard session due to the following error: {0}"),e.nativeTensorBoardPrompt=o("TensorBoard.nativeTensorBoardPrompt",'VS Code now has integrated TensorBoard support. Would you like to launch TensorBoard? (Tip: Launch TensorBoard anytime by opening the command palette and searching for "Launch TensorBoard".)'),e.selectAFolder=o("TensorBoard.selectAFolder","Select a folder"),e.selectAFolderDetail=o("TensorBoard.selectAFolderDetail","Select a log directory containing tfevent files"),e.selectAnotherFolder=o("TensorBoard.selectAnotherFolder","Select another folder"),e.selectAnotherFolderDetail=o("TensorBoard.selectAnotherFolderDetail","Use the file explorer to select another folder"),e.installPrompt=o("TensorBoard.installPrompt","The package TensorBoard is required to launch a TensorBoard session. Would you like to install it?"),e.installTensorBoardAndProfilerPluginPrompt=o("TensorBoard.installTensorBoardAndProfilerPluginPrompt","TensorBoard >= 2.4.1 and the PyTorch Profiler TensorBoard plugin >= 0.2.0 are required. Would you like to install these packages?"),e.installProfilerPluginPrompt=o("TensorBoard.installProfilerPluginPrompt","We recommend installing version >= 0.2.0 of the PyTorch Profiler TensorBoard plugin. Would you like to install the package?"),e.upgradePrompt=o("TensorBoard.upgradePrompt","Integrated TensorBoard support is only available for TensorBoard >= 2.4.1. Would you like to upgrade your copy of TensorBoard?"),e.launchNativeTensorBoardSessionCodeLens=o("TensorBoard.launchNativeTensorBoardSessionCodeLens","▶ Launch TensorBoard Session"),e.launchNativeTensorBoardSessionCodeAction=o("TensorBoard.launchNativeTensorBoardSessionCodeAction","Launch TensorBoard session"),e.missingSourceFile=o("TensorBoard.missingSourceFile","We could not locate the requested source file on disk. Please manually specify the file."),e.selectMissingSourceFile=o("TensorBoard.selectMissingSourceFile","Choose File"),e.selectMissingSourceFileDescription=o("TensorBoard.selectMissingSourceFileDescription","The source file's contents may not match the original contents in the trace.")}(t.TensorBoard||(t.TensorBoard={})),function(e){e.virtualWorkspaceStatusItem={detail:o("LanguageService.virtualWorkspaceStatusItem.detail","Limited IntelliSense supported by Jedi and Pylance")},e.statusItem={name:o("LanguageService.statusItem.name","Python IntelliSense Status"),text:o("LanguageService.statusItem.text","Partial Mode"),detail:o("LanguageService.statusItem.detail","Limited IntelliSense provided by Pylance")},e.startingPylance=o("LanguageService.startingPylance","Starting Pylance language server."),e.startingJedi=o("LanguageService.startingJedi","Starting Jedi language server."),e.startingNone=o("LanguageService.startingNone","Editor support is inactive since language server is set to None."),e.untrustedWorkspaceMessage=o("LanguageService.untrustedWorkspaceMessage","Only Pylance is supported in untrusted workspaces, setting language server to None."),e.reloadAfterLanguageServerChange=o("LanguageService.reloadAfterLanguageServerChange","Please reload the window switching between language servers."),e.lsFailedToStart=o("LanguageService.lsFailedToStart","We encountered an issue starting the language server. Reverting to Jedi language engine. Check the Python output panel for details."),e.lsFailedToDownload=o("LanguageService.lsFailedToDownload","We encountered an issue downloading the language server. Reverting to Jedi language engine. Check the Python output panel for details."),e.lsFailedToExtract=o("LanguageService.lsFailedToExtract","We encountered an issue extracting the language server. Reverting to Jedi language engine. Check the Python output panel for details."),e.downloadFailedOutputMessage=o("LanguageService.downloadFailedOutputMessage","Language server download failed."),e.extractionFailedOutputMessage=o("LanguageService.extractionFailedOutputMessage","Language server extraction failed."),e.extractionCompletedOutputMessage=o("LanguageService.extractionCompletedOutputMessage","Language server download complete."),e.extractionDoneOutputMessage=o("LanguageService.extractionDoneOutputMessage","done."),e.reloadVSCodeIfSeachPathHasChanged=o("LanguageService.reloadVSCodeIfSeachPathHasChanged","Search paths have changed for this Python interpreter. Please reload the extension to ensure that the IntelliSense works correctly.")}(t.LanguageService||(t.LanguageService={})),function(e){e.downloadingFile=o("downloading.file","Downloading {0}..."),e.downloadingFileProgress=o("downloading.file.progress","{0}{1} of {2} KB ({3}%)")}(t.Http||(t.Http={})),function(e){e.inGroup=o("Experiments.inGroup","Experiment '{0}' is active"),e.optedOutOf=o("Experiments.optedOutOf","Experiment '{0}' is inactive")}(t.Experiments||(t.Experiments={})),function(e){e.installingPython=o("Interpreters.installingPython","Installing Python into Environment..."),e.discovering=o("Interpreters.DiscoveringInterpreters","Discovering Python Interpreters"),e.refreshing=o("Interpreters.RefreshingInterpreters","Refreshing Python Interpreters"),e.condaInheritEnvMessage=o("Interpreters.condaInheritEnvMessage",'We noticed you\'re using a conda environment. If you are experiencing issues with this environment in the integrated terminal, we recommend that you let the Python extension change "terminal.integrated.inheritEnv" to false in your user settings.'),e.environmentPromptMessage=o("Interpreters.environmentPromptMessage","We noticed a new virtual environment has been created. Do you want to select it for the workspace folder?"),e.entireWorkspace=o("Interpreters.entireWorkspace","Select at workspace level"),e.clearAtWorkspace=o("Interpreters.clearAtWorkspace","Clear at workspace level"),e.selectInterpreterTip=o("Interpreters.selectInterpreterTip","Tip: you can change the Python interpreter used by the Python extension by clicking on the Python version in the status bar"),e.pythonInterpreterPath=o("Interpreters.pythonInterpreterPath","Python interpreter path: {0}")}(t.Interpreters||(t.Interpreters={})),function(e){e.globalGroupName=o("InterpreterQuickPickList.globalGroupName","Global"),e.workspaceGroupName=o("InterpreterQuickPickList.workspaceGroupName","Workspace"),e.quickPickListPlaceholder=o("InterpreterQuickPickList.quickPickListPlaceholder","Selected Interpreter: {0}"),e.enterPath={label:o("InterpreterQuickPickList.enterPath.label","Enter interpreter path..."),placeholder:o("InterpreterQuickPickList.enterPath.placeholder","Enter path to a Python interpreter.")},e.defaultInterpreterPath={label:o("InterpreterQuickPickList.defaultInterpreterPath.label","Use Python from `python.defaultInterpreterPath` setting")},e.browsePath={label:o("InterpreterQuickPickList.browsePath.label","Find..."),detail:o("InterpreterQuickPickList.browsePath.detail","Browse your file system to find a Python interpreter."),openButtonLabel:o("python.command.python.setInterpreter.title","Select Interpreter"),title:o("InterpreterQuickPickList.browsePath.title","Select Python interpreter")},e.refreshInterpreterList=o("InterpreterQuickPickList.refreshInterpreterList","Refresh Interpreter list")}(t.InterpreterQuickPickList||(t.InterpreterQuickPickList={})),function(e){e.languageServer=o("OutputChannelNames.languageServer","Python Language Server"),e.python=o("OutputChannelNames.python","Python"),e.pythonTest=o("OutputChannelNames.pythonTest","Python Test Log")}(t.OutputChannelNames||(t.OutputChannelNames={})),function(e){e.currentWorkingDirectory=o("Logging.CurrentWorkingDirectory","cwd:")}(t.Logging||(t.Logging={})),function(e){e.replaceWithSelectedLinter=o("Linter.replaceWithSelectedLinter","Multiple linters are enabled in settings. Replace with '{0}'?"),e.selectLinter=o("Linter.selectLinter","Select Linter")}(t.Linters||(t.Linters={})),function(e){e.noCondaOrPipInstaller=o("Installer.noCondaOrPipInstaller","There is no Conda or Pip installer available in the selected environment."),e.noPipInstaller=o("Installer.noPipInstaller","There is no Pip installer available in the selected environment."),e.searchForHelp=o("Installer.searchForHelp","Search for help"),e.couldNotInstallLibrary=o("Installer.couldNotInstallLibrary","Could not install {0}. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment."),e.dataScienceInstallPrompt=o("Installer.dataScienceInstallPrompt","Data Science library {0} is not installed. Install?")}(t.Installer||(t.Installer={})),function(e){e.bannerMessage=o("ExtensionSurveyBanner.bannerMessage","Can you please take 2 minutes to tell us how the Python extension is working for you?"),e.bannerLabelYes=o("ExtensionSurveyBanner.bannerLabelYes","Yes, take survey now"),e.bannerLabelNo=o("ExtensionSurveyBanner.bannerLabelNo","No, thanks"),e.maybeLater=o("ExtensionSurveyBanner.maybeLater","Maybe later")}(t.ExtensionSurveyBanner||(t.ExtensionSurveyBanner={})),function(e){e.installingModule=o("products.installingModule","Installing {0}"),e.formatterNotInstalled=o("products.formatterNotInstalled","Formatter {0} is not installed. Install?"),e.useFormatter=o("products.useFormatter","Use {0}"),e.invalidFormatterPath=o("products.invalidFormatterPath","Path to the {0} formatter is invalid ({1})")}(t.Products||(t.Products={})),function(e){let t,n,r,i,s,a,c,u;e.selectConfiguration={title:o("debug.selectConfigurationTitle"),placeholder:o("debug.selectConfigurationPlaceholder")},e.launchJsonCompletions={label:o("debug.launchJsonConfigurationsCompletionLabel"),description:o("debug.launchJsonConfigurationsCompletionDescription")},function(e){e.snippet={name:o("python.snippet.launch.standard.label")},e.selectConfiguration={label:o("debug.debugFileConfigurationLabel"),description:o("debug.debugFileConfigurationDescription")}}(t=e.file||(e.file={})),function(e){e.snippet={name:o("python.snippet.launch.module.label"),default:o("python.snippet.launch.module.default")},e.selectConfiguration={label:o("debug.debugModuleConfigurationLabel"),description:o("debug.debugModuleConfigurationDescription")},e.enterModule={title:o("debug.moduleEnterModuleTitle"),prompt:o("debug.moduleEnterModulePrompt"),default:o("debug.moduleEnterModuleDefault"),invalid:o("debug.moduleEnterModuleInvalidNameError")}}(n=e.module||(e.module={})),function(e){e.snippet={name:o("python.snippet.launch.attach.label")},e.selectConfiguration={label:o("debug.remoteAttachConfigurationLabel"),description:o("debug.remoteAttachConfigurationDescription")},e.enterRemoteHost={title:o("debug.attachRemoteHostTitle"),prompt:o("debug.attachRemoteHostPrompt"),invalid:o("debug.attachRemoteHostValidationError")},e.enterRemotePort={title:o("debug.attachRemotePortTitle"),prompt:o("debug.attachRemotePortPrompt"),invalid:o("debug.attachRemotePortValidationError")}}(r=e.attach||(e.attach={})),function(e){e.snippet={name:o("python.snippet.launch.attachpid.label")},e.selectConfiguration={label:o("debug.attachPidConfigurationLabel"),description:o("debug.attachPidConfigurationDescription")}}(i=e.attachPid||(e.attachPid={})),function(e){e.snippet={name:o("python.snippet.launch.django.label")},e.selectConfiguration={label:o("debug.debugDjangoConfigurationLabel"),description:o("debug.debugDjangoConfigurationDescription")},e.enterManagePyPath={title:o("debug.djangoEnterManagePyPathTitle"),prompt:o("debug.djangoEnterManagePyPathPrompt"),invalid:o("debug.djangoEnterManagePyPathInvalidFilePathError")}}(s=e.django||(e.django={})),function(e){e.snippet={name:o("python.snippet.launch.fastapi.label")},e.selectConfiguration={label:o("debug.debugFastAPIConfigurationLabel"),description:o("debug.debugFastAPIConfigurationDescription")},e.enterAppPathOrNamePath={title:o("debug.fastapiEnterAppPathOrNamePathTitle"),prompt:o("debug.fastapiEnterAppPathOrNamePathPrompt"),invalid:o("debug.fastapiEnterAppPathOrNamePathInvalidNameError")}}(a=e.fastapi||(e.fastapi={})),function(e){e.snippet={name:o("python.snippet.launch.flask.label")},e.selectConfiguration={label:o("debug.debugFlaskConfigurationLabel"),description:o("debug.debugFlaskConfigurationDescription")},e.enterAppPathOrNamePath={title:o("debug.flaskEnterAppPathOrNamePathTitle"),prompt:o("debug.flaskEnterAppPathOrNamePathPrompt"),invalid:o("debug.flaskEnterAppPathOrNamePathInvalidNameError")}}(c=e.flask||(e.flask={})),function(e){e.snippet={name:o("python.snippet.launch.pyramid.label")},e.selectConfiguration={label:o("debug.debugPyramidConfigurationLabel"),description:o("debug.debugPyramidConfigurationDescription")},e.enterDevelopmentIniPath={title:o("debug.pyramidEnterDevelopmentIniPathTitle"),prompt:o("debug.pyramidEnterDevelopmentIniPathPrompt"),invalid:o("debug.pyramidEnterDevelopmentIniPathInvalidFilePathError")}}(u=e.pyramid||(e.pyramid={}))}(t.DebugConfigStrings||(t.DebugConfigStrings={})),function(e){e.configureTests=o("Testing.configureTests","Configure Test Framework"),e.testNotConfigured=o("Testing.testNotConfigured","No test framework configured.")}(t.Testing||(t.Testing={})),function(e){e.outdatedDebuggerMessage=o("OutdatedDebugger.updateDebuggerMessage","We noticed you are attaching to ptvsd (Python debugger), which was deprecated on May 1st, 2020. Please switch to [debugpy](https://aka.ms/migrateToDebugpy).")}(t.OutdatedDebugger||(t.OutdatedDebugger={})),function(e){e.jediMessage=o("Python27Support.jediMessage","IntelliSense with Jedi for Python 2.7 is no longer supported. [Learn more](https://aka.ms/python-27-support).")}(t.Python27Support||(t.Python27Support={})),function(e){e.bannerMessage=o("SwitchToDefaultLS.bannerMessage","The Microsoft Python Language Server has reached end of life. Your language server has been set to the default for Python in VS Code, Pylance.\n\nIf you'd like to change your language server, you can learn about how to do so [here](https://devblogs.microsoft.com/python/python-in-visual-studio-code-may-2021-release/#configuring-your-language-server).\n\nRead Pylance's license [here](https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license).")}(t.SwitchToDefaultLS||(t.SwitchToDefaultLS={})),function(e){e.bannerMessage=o("SwitchToPrereleaseExtension.bannerMessage","We now have a new way to get pre-release/insiders version of the Python extension. See [here](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions) to learn more."),e.installPreRelease=o("SwitchToPrereleaseExtension.installPreRelease","Install Pre-Release"),e.installStable=o("SwitchToPrereleaseExtension.installStable","Install Stable")}(t.SwitchToPrereleaseExtension||(t.SwitchToPrereleaseExtension={})),(0,i.loadLocalizedStringsUsingNodeFS)(new r.FileSystem)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IServiceContainer=t.IServiceManager=void 0,t.IServiceManager=Symbol("IServiceManager"),t.IServiceContainer=Symbol("IServiceContainer")},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 r{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 i(e=null){return new r(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=i,t.createDeferredFrom=function(...e){const t=i();return Promise.all(e).then(t.resolve.bind(t)).catch(t.reject.bind(t)),t},t.createDeferredFromPromise=function(e){const t=i();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 r=e.length;for(;r>0;){const{index:i,result:a,err:c}=await Promise.race(n);null!==c?(n[i]=s,r-=1,void 0!==t&&await t(c,i)):a.done?(n[i]=s,r-=1,void 0!==a.value&&(yield a.value)):(n[i]=o(e[i],i),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";n.d(t,"a",(function(){return l}));var r=n(6),i=n(70),o=n(146),s=n(18),a=n(88),c=n(36),u=n(72),l=function(e){function t(n,r,i){var s=e.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"==typeof n){n instanceof t?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new d(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new d(s,n,r,i)}return s}return r.b(t,e),t.prototype[a.a]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.a),d=function(e){function t(t,n,r,s){var a,c=e.call(this)||this;c._parentSubscriber=t;var u=c;return Object(i.a)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==o.a&&(u=Object.create(n),Object(i.a)(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(c))),c._context=u,c._next=a,c._error=r,c._complete=s,c}return r.b(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;c.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=c.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(u.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(u.a)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};c.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),c.a.useDeprecatedSynchronousErrorHandling)throw e;Object(u.a)(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!c.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return c.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Object(u.a)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(23),i=n(103),o=n(70),s=n(89),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,a=this._unsubscribe,u=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var l=0;l * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var i="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",c="[object Array]",u="[object Boolean]",l="[object Date]",d="[object Error]",h="[object Function]",p="[object GeneratorFunction]",f="[object Map]",g="[object Number]",m="[object Object]",v="[object RegExp]",y="[object Set]",b="[object String]",_="[object Symbol]",S="[object WeakMap]",E="[object ArrayBuffer]",P="[object DataView]",w="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",R="[object Int32Array]",O="[object Uint8Array]",D="[object Uint16Array]",x="[object Uint32Array]",k=/\b__p \+= '';/g,A=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j=/&(?:amp|lt|gt|quot|#39);/g,M=/[&<>"']/g,L=RegExp(j.source),F=RegExp(M.source),q=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$=/[\\^$.*+?()[\]{}|]/g,G=RegExp($.source),K=/^\s+/,z=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Z=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,te=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ne=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,le=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",fe="["+he+"]",ge="["+de+"]",me="\\d+",ve="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",Se="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",we="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Te="(?:"+ye+"|"+be+")",Ce="(?:"+we+"|"+be+")",Ie="(?:"+ge+"|"+_e+")"+"?",Re="[\\ufe0e\\ufe0f]?"+Ie+("(?:\\u200d(?:"+[Se,Ee,Pe].join("|")+")[\\ufe0e\\ufe0f]?"+Ie+")*"),Oe="(?:"+[ve,Ee,Pe].join("|")+")"+Re,De="(?:"+[Se+ge+"?",ge,Ee,Pe,pe].join("|")+")",xe=RegExp("['’]","g"),ke=RegExp(ge,"g"),Ae=RegExp(_e+"(?="+_e+")|"+De+Re,"g"),Ne=RegExp([we+"?"+ye+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,we,"$"].join("|")+")",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,we+Te,"$"].join("|")+")",we+"?"+Te+"+(?:['’](?:d|ll|m|re|s|t|ve))?",we+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Oe].join("|"),"g"),je=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,qe={};qe[w]=qe[T]=qe[C]=qe[I]=qe[R]=qe[O]=qe["[object Uint8ClampedArray]"]=qe[D]=qe[x]=!0,qe[a]=qe[c]=qe[E]=qe[u]=qe[P]=qe[l]=qe[d]=qe[h]=qe[f]=qe[g]=qe[m]=qe[v]=qe[y]=qe[b]=qe[S]=!1;var Ue={};Ue[a]=Ue[c]=Ue[E]=Ue[P]=Ue[u]=Ue[l]=Ue[w]=Ue[T]=Ue[C]=Ue[I]=Ue[R]=Ue[f]=Ue[g]=Ue[m]=Ue[v]=Ue[y]=Ue[b]=Ue[_]=Ue[O]=Ue["[object Uint8ClampedArray]"]=Ue[D]=Ue[x]=!0,Ue[d]=Ue[h]=Ue[S]=!1;var We={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Ve=parseInt,He="object"==typeof global&&global&&global.Object===Object&&global,$e="object"==typeof self&&self&&self.Object===Object&&self,Ge=He||$e||Function("return this")(),Ke=t&&!t.nodeType&&t,ze=Ke&&"object"==typeof e&&e&&!e.nodeType&&e,Ye=ze&&ze.exports===Ke,Je=Ye&&He.process,Xe=function(){try{var e=ze&&ze.require&&ze.require("util").types;return e||Je&&Je.binding&&Je.binding("util")}catch(e){}}(),Qe=Xe&&Xe.isArrayBuffer,Ze=Xe&&Xe.isDate,et=Xe&&Xe.isMap,tt=Xe&&Xe.isRegExp,nt=Xe&&Xe.isSet,rt=Xe&&Xe.isTypedArray;function it(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Nt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function jt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Mt=Tt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Lt=Tt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ft(e){return"\\"+We[e]}function qt(e){return je.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Wt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,r=e.length,i=0,s=[];++n",""":'"',"'":"'"});var Yt=function e(t){var n,r=(t=null==t?Ge:Yt.defaults(Ge.Object(),t,Yt.pick(Ge,Le))).Array,z=t.Date,de=t.Error,he=t.Function,pe=t.Math,fe=t.Object,ge=t.RegExp,me=t.String,ve=t.TypeError,ye=r.prototype,be=he.prototype,_e=fe.prototype,Se=t["__core-js_shared__"],Ee=be.toString,Pe=_e.hasOwnProperty,we=0,Te=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ce=_e.toString,Ie=Ee.call(fe),Re=Ge._,Oe=ge("^"+Ee.call(Pe).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=Ye?t.Buffer:void 0,Ae=t.Symbol,je=t.Uint8Array,We=De?De.allocUnsafe:void 0,He=Wt(fe.getPrototypeOf,fe),$e=fe.create,Ke=_e.propertyIsEnumerable,ze=ye.splice,Je=Ae?Ae.isConcatSpreadable:void 0,Xe=Ae?Ae.iterator:void 0,vt=Ae?Ae.toStringTag:void 0,Tt=function(){try{var e=eo(fe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Jt=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,Xt=z&&z.now!==Ge.Date.now&&z.now,Qt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Zt=pe.ceil,en=pe.floor,tn=fe.getOwnPropertySymbols,nn=De?De.isBuffer:void 0,rn=t.isFinite,on=ye.join,sn=Wt(fe.keys,fe),an=pe.max,cn=pe.min,un=z.now,ln=t.parseInt,dn=pe.random,hn=ye.reverse,pn=eo(t,"DataView"),fn=eo(t,"Map"),gn=eo(t,"Promise"),mn=eo(t,"Set"),vn=eo(t,"WeakMap"),yn=eo(fe,"create"),bn=vn&&new vn,_n={},Sn=Ro(pn),En=Ro(fn),Pn=Ro(gn),wn=Ro(mn),Tn=Ro(vn),Cn=Ae?Ae.prototype:void 0,In=Cn?Cn.valueOf:void 0,Rn=Cn?Cn.toString:void 0;function On(e){if($s(e)&&!Ns(e)&&!(e instanceof An)){if(e instanceof kn)return e;if(Pe.call(e,"__wrapped__"))return Oo(e)}return new kn(e)}var Dn=function(){function e(){}return function(t){if(!Hs(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function xn(){}function kn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function An(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Xn(e,t,n,r,i,o){var s,c=1&t,d=2&t,S=4&t;if(n&&(s=i?n(e,r,i,o):n(e)),void 0!==s)return s;if(!Hs(e))return e;var k=Ns(e);if(k){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return yi(e,s)}else{var A=ro(e),N=A==h||A==p;if(Fs(e))return hi(e,c);if(A==m||A==a||N&&!i){if(s=d||N?{}:oo(e),!c)return d?function(e,t){return bi(e,no(e),t)}(e,function(e,t){return e&&bi(t,Ea(t),e)}(s,e)):function(e,t){return bi(e,to(e),t)}(e,Kn(s,e))}else{if(!Ue[A])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case E:return pi(e);case u:case l:return new r(+e);case P:return function(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case w:case T:case C:case I:case R:case O:case"[object Uint8ClampedArray]":case D:case x:return fi(e,n);case f:return new r;case g:case b:return new r(e);case v:return function(e){var t=new e.constructor(e.source,ne.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new r;case _:return i=e,In?fe(In.call(i)):{}}var i}(e,A,c)}}o||(o=new Fn);var j=o.get(e);if(j)return j;o.set(e,s),Js(e)?e.forEach((function(r){s.add(Xn(r,t,n,r,e,o))})):Gs(e)&&e.forEach((function(r,i){s.set(i,Xn(r,t,n,i,e,o))}));var M=k?void 0:(S?d?Ki:Gi:d?Ea:Sa)(e);return st(M||e,(function(r,i){M&&(r=e[i=r]),Hn(s,i,Xn(r,t,n,i,e,o))})),s}function Qn(e,t,n){var r=n.length;if(null==e)return!r;for(e=fe(e);r--;){var i=n[r],o=t[i],s=e[i];if(void 0===s&&!(i in e)||!o(s))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new ve(i);return So((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var i=-1,o=lt,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;n&&(t=ht(t,Dt(n))),r?(o=dt,s=!1):t.length>=200&&(o=kt,s=!1,t=new Ln(t));e:for(;++i-1},jn.prototype.set=function(e,t){var n=this.__data__,r=$n(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(fn||jn),string:new Nn}},Mn.prototype.delete=function(e){var t=Qi(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Qi(this,e).get(e)},Mn.prototype.has=function(e){return Qi(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Qi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.clear=function(){this.__data__=new jn,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof jn){var r=n.__data__;if(!fn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var tr=Ei(ur),nr=Ei(lr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function ir(e,t,n){for(var r=-1,i=e.length;++r0&&n(a)?t>1?sr(a,t-1,n,r,i):pt(i,a):r||(i[i.length]=a)}return i}var ar=Pi(),cr=Pi(!0);function ur(e,t){return e&&ar(e,t,Sa)}function lr(e,t){return e&&cr(e,t,Sa)}function dr(e,t){return ut(t,(function(t){return Ws(e[t])}))}function hr(e,t){for(var n=0,r=(t=ci(t,e)).length;null!=e&&nt}function mr(e,t){return null!=e&&Pe.call(e,t)}function vr(e,t){return null!=e&&t in fe(e)}function yr(e,t,n){for(var i=n?dt:lt,o=e[0].length,s=e.length,a=s,c=r(s),u=1/0,l=[];a--;){var d=e[a];a&&t&&(d=ht(d,Dt(t))),u=cn(d.length,u),c[a]=!n&&(t||o>=120&&d.length>=120)?new Ln(a&&d):void 0}d=e[0];var h=-1,p=c[0];e:for(;++h=a)return c;var u=n[r];return c*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)a!==e&&ze.call(a,c,1),ze.call(e,c,1);return e}function Mr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ao(i)?ze.call(e,i,1):ei(e,i)}}return e}function Lr(e,t){return e+en(dn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function qr(e,t){return Eo(mo(e,t,Ka),e+"")}function Ur(e){return Un(Da(e))}function Wr(e,t){var n=Da(e);return To(n,Jn(t,0,n.length))}function Br(e,t,n,r){if(!Hs(e))return e;for(var i=-1,o=(t=ci(t,e)).length,s=o-1,a=e;null!=a&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i>>1,s=e[o];null!==s&&!Qs(s)&&(n?s<=t:s=200){var u=t?null:Fi(e);if(u)return Vt(u);s=!1,i=kt,c=new Ln}else c=t?[]:a;e:for(;++r=r?e:Gr(e,t,n)}var di=Jt||function(e){return Ge.clearTimeout(e)};function hi(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function pi(e){var t=new e.constructor(e.byteLength);return new je(t).set(new je(e)),t}function fi(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function gi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Qs(e),s=void 0!==t,a=null===t,c=t==t,u=Qs(t);if(!a&&!u&&!o&&e>t||o&&s&&c&&!a&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!u&&e1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&co(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=fe(t);++r-1?i[o?t[s]:s]:void 0}}function Ri(e){return $i((function(t){var n=t.length,r=n,o=kn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new ve(i);if(o&&!a&&"wrapper"==Yi(s))var a=new kn([],!0)}for(r=a?r:n;++r1&&b.reverse(),d&&ua))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,h=!0,p=2&n?new Ln:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(J);return t?t[1].split(X):[]}(r),n)))}function wo(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function To(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Yo(e,n)}));function ns(e){var t=On(e);return t.__chain__=!0,t}function rs(e,t){return t(e)}var is=$i((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Yn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof An&&ao(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:rs,args:[i],thisArg:void 0}),new kn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var os=_i((function(e,t,n){Pe.call(e,n)?++e[n]:zn(e,n,1)}));var ss=Ii(Ao),as=Ii(No);function cs(e,t){return(Ns(e)?st:tr)(e,Xi(t,3))}function us(e,t){return(Ns(e)?at:nr)(e,Xi(t,3))}var ls=_i((function(e,t,n){Pe.call(e,n)?e[n].push(t):zn(e,n,[t])}));var ds=qr((function(e,t,n){var i=-1,o="function"==typeof t,s=Ms(e)?r(e.length):[];return tr(e,(function(e){s[++i]=o?it(t,e,n):br(e,t,n)})),s})),hs=_i((function(e,t,n){zn(e,n,t)}));function ps(e,t){return(Ns(e)?ht:Rr)(e,Xi(t,3))}var fs=_i((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var gs=qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&co(e,t[0],t[1])?t=[]:n>2&&co(t[0],t[1],t[2])&&(t=[t[0]]),Ar(e,sr(t,1),[])})),ms=Xt||function(){return Ge.Date.now()};function vs(e,t,n){return t=n?void 0:t,Ui(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ys(e,t){var n;if("function"!=typeof t)throw new ve(i);return e=ia(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var bs=qr((function(e,t,n){var r=1;if(n.length){var i=Bt(n,Ji(bs));r|=32}return Ui(e,r,t,n,i)})),_s=qr((function(e,t,n){var r=3;if(n.length){var i=Bt(n,Ji(_s));r|=32}return Ui(t,r,e,n,i)}));function Ss(e,t,n){var r,o,s,a,c,u,l=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new ve(i);function f(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function g(e){return l=e,c=So(v,t),d?f(e):a}function m(e){var n=e-u;return void 0===u||n>=t||n<0||h&&e-l>=s}function v(){var e=ms();if(m(e))return y(e);c=So(v,function(e){var n=t-(e-u);return h?cn(n,s-(e-l)):n}(e))}function y(e){return c=void 0,p&&r?f(e):(r=o=void 0,a)}function b(){var e=ms(),n=m(e);if(r=arguments,o=this,u=e,n){if(void 0===c)return g(u);if(h)return di(c),c=So(v,t),f(u)}return void 0===c&&(c=So(v,t)),a}return t=sa(t)||0,Hs(n)&&(d=!!n.leading,s=(h="maxWait"in n)?an(sa(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==c&&di(c),l=0,r=u=o=c=void 0},b.flush=function(){return void 0===c?a:y(ms())},b}var Es=qr((function(e,t){return Zn(e,1,t)})),Ps=qr((function(e,t,n){return Zn(e,sa(t)||0,n)}));function ws(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(ws.Cache||Mn),n}function Ts(e){if("function"!=typeof e)throw new ve(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ws.Cache=Mn;var Cs=ui((function(e,t){var n=(t=1==t.length&&Ns(t[0])?ht(t[0],Dt(Xi())):ht(sr(t,1),Dt(Xi()))).length;return qr((function(r){for(var i=-1,o=cn(r.length,n);++i=t})),As=_r(function(){return arguments}())?_r:function(e){return $s(e)&&Pe.call(e,"callee")&&!Ke.call(e,"callee")},Ns=r.isArray,js=Qe?Dt(Qe):function(e){return $s(e)&&fr(e)==E};function Ms(e){return null!=e&&Vs(e.length)&&!Ws(e)}function Ls(e){return $s(e)&&Ms(e)}var Fs=nn||sc,qs=Ze?Dt(Ze):function(e){return $s(e)&&fr(e)==l};function Us(e){if(!$s(e))return!1;var t=fr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!zs(e)}function Ws(e){if(!Hs(e))return!1;var t=fr(e);return t==h||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Bs(e){return"number"==typeof e&&e==ia(e)}function Vs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Hs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $s(e){return null!=e&&"object"==typeof e}var Gs=et?Dt(et):function(e){return $s(e)&&ro(e)==f};function Ks(e){return"number"==typeof e||$s(e)&&fr(e)==g}function zs(e){if(!$s(e)||fr(e)!=m)return!1;var t=He(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==Ie}var Ys=tt?Dt(tt):function(e){return $s(e)&&fr(e)==v};var Js=nt?Dt(nt):function(e){return $s(e)&&ro(e)==y};function Xs(e){return"string"==typeof e||!Ns(e)&&$s(e)&&fr(e)==b}function Qs(e){return"symbol"==typeof e||$s(e)&&fr(e)==_}var Zs=rt?Dt(rt):function(e){return $s(e)&&Vs(e.length)&&!!qe[fr(e)]};var ea=ji(Ir),ta=ji((function(e,t){return e<=t}));function na(e){if(!e)return[];if(Ms(e))return Xs(e)?Gt(e):yi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ro(e);return(t==f?Ut:t==y?Vt:Da)(e)}function ra(e){return e?(e=sa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ia(e){var t=ra(e),n=t%1;return t==t?n?t-n:t:0}function oa(e){return e?Jn(ia(e),0,4294967295):0}function sa(e){if("number"==typeof e)return e;if(Qs(e))return NaN;if(Hs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Hs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ot(e);var n=ie.test(e);return n||se.test(e)?Ve(e.slice(2),n?2:8):re.test(e)?NaN:+e}function aa(e){return bi(e,Ea(e))}function ca(e){return null==e?"":Qr(e)}var ua=Si((function(e,t){if(po(t)||Ms(t))bi(t,Sa(t),e);else for(var n in t)Pe.call(t,n)&&Hn(e,n,t[n])})),la=Si((function(e,t){bi(t,Ea(t),e)})),da=Si((function(e,t,n,r){bi(t,Ea(t),e,r)})),ha=Si((function(e,t,n,r){bi(t,Sa(t),e,r)})),pa=$i(Yn);var fa=qr((function(e,t){e=fe(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&co(t[0],t[1],i)&&(r=1);++n1),t})),bi(e,Ki(e),n),r&&(n=Xn(n,7,Vi));for(var i=t.length;i--;)ei(n,t[i]);return n}));var Ca=$i((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return va(e,n)}))}(e,t)}));function Ia(e,t){if(null==e)return{};var n=ht(Ki(e),(function(e){return[e]}));return t=Xi(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var Ra=qi(Sa),Oa=qi(Ea);function Da(e){return null==e?[]:xt(e,Sa(e))}var xa=Ti((function(e,t,n){return t=t.toLowerCase(),e+(n?ka(t):t)}));function ka(e){return Ua(ca(e).toLowerCase())}function Aa(e){return(e=ca(e))&&e.replace(ce,Mt).replace(ke,"")}var Na=Ti((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),ja=Ti((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ma=wi("toLowerCase");var La=Ti((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fa=Ti((function(e,t,n){return e+(n?" ":"")+Ua(t)}));var qa=Ti((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ua=wi("toUpperCase");function Wa(e,t,n){return e=ca(e),void 0===(t=n?void 0:t)?function(e){return Me.test(e)}(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var Ba=qr((function(e,t){try{return it(e,void 0,t)}catch(e){return Us(e)?e:new de(e)}})),Va=$i((function(e,t){return st(t,(function(t){t=Io(t),zn(e,t,bs(e[t],e))})),e}));function Ha(e){return function(){return e}}var $a=Ri(),Ga=Ri(!0);function Ka(e){return e}function za(e){return wr("function"==typeof e?e:Xn(e,1))}var Ya=qr((function(e,t){return function(n){return br(n,e,t)}})),Ja=qr((function(e,t){return function(n){return br(e,n,t)}}));function Xa(e,t,n){var r=Sa(t),i=dr(t,r);null!=n||Hs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=dr(t,Sa(t)));var o=!(Hs(n)&&"chain"in n&&!n.chain),s=Ws(e);return st(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=yi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Qa(){}var Za=ki(ht),ec=ki(ct),tc=ki(mt);function nc(e){return uo(e)?wt(Io(e)):function(e){return function(t){return hr(t,e)}}(e)}var rc=Ni(),ic=Ni(!0);function oc(){return[]}function sc(){return!1}var ac=xi((function(e,t){return e+t}),0),cc=Li("ceil"),uc=xi((function(e,t){return e/t}),1),lc=Li("floor");var dc,hc=xi((function(e,t){return e*t}),1),pc=Li("round"),fc=xi((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new ve(i);return e=ia(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=vs,On.assign=ua,On.assignIn=la,On.assignInWith=da,On.assignWith=ha,On.at=pa,On.before=ys,On.bind=bs,On.bindAll=Va,On.bindKey=_s,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ns(e)?e:[e]},On.chain=ns,On.chunk=function(e,t,n){t=(n?co(e,t,n):void 0===t)?1:an(ia(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=r(Zt(i/t));oi?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:oa(r);n>>0)?(e=ca(e))&&("string"==typeof t||null!=t&&!Ys(t))&&!(t=Qr(t))&&qt(e)?li(Gt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new ve(i);return t=null==t?0:an(ia(t),0),qr((function(n){var r=n[t],i=li(n,0,t);return r&&pt(i,r),it(e,this,i)}))},On.tail=function(e){var t=null==e?0:e.length;return t?Gr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?Gr(e,0,(t=n||void 0===t?1:ia(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Gr(e,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ve(i);return Hs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ss(e,t,{leading:r,maxWait:t,trailing:o})},On.thru=rs,On.toArray=na,On.toPairs=Ra,On.toPairsIn=Oa,On.toPath=function(e){return Ns(e)?ht(e,Io):Qs(e)?[e]:yi(Co(ca(e)))},On.toPlainObject=aa,On.transform=function(e,t,n){var r=Ns(e),i=r||Fs(e)||Zs(e);if(t=Xi(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Hs(e)&&Ws(o)?Dn(He(e)):{}}return(i?st:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},On.unary=function(e){return vs(e,1)},On.union=$o,On.unionBy=Go,On.unionWith=Ko,On.uniq=function(e){return e&&e.length?Zr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Zr(e,Xi(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},On.unset=function(e,t){return null==e||ei(e,t)},On.unzip=zo,On.unzipWith=Yo,On.update=function(e,t,n){return null==e?e:ti(e,t,ai(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ti(e,t,ai(n),r)},On.values=Da,On.valuesIn=function(e){return null==e?[]:xt(e,Ea(e))},On.without=Jo,On.words=Wa,On.wrap=function(e,t){return Is(ai(t),e)},On.xor=Xo,On.xorBy=Qo,On.xorWith=Zo,On.zip=es,On.zipObject=function(e,t){return oi(e||[],t||[],Hn)},On.zipObjectDeep=function(e,t){return oi(e||[],t||[],Br)},On.zipWith=ts,On.entries=Ra,On.entriesIn=Oa,On.extend=la,On.extendWith=da,Xa(On,On),On.add=ac,On.attempt=Ba,On.camelCase=xa,On.capitalize=ka,On.ceil=cc,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=sa(n))==n?n:0),void 0!==t&&(t=(t=sa(t))==t?t:0),Jn(sa(e),t,n)},On.clone=function(e){return Xn(e,4)},On.cloneDeep=function(e){return Xn(e,5)},On.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Qn(e,t,Sa(t))},On.deburr=Aa,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=uc,On.endsWith=function(e,t,n){e=ca(e),t=Qr(t);var r=e.length,i=n=void 0===n?r:Jn(ia(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},On.eq=Ds,On.escape=function(e){return(e=ca(e))&&F.test(e)?e.replace(M,Lt):e},On.escapeRegExp=function(e){return(e=ca(e))&&G.test(e)?e.replace($,"\\$&"):e},On.every=function(e,t,n){var r=Ns(e)?ct:rr;return n&&co(e,t,n)&&(t=void 0),r(e,Xi(t,3))},On.find=ss,On.findIndex=Ao,On.findKey=function(e,t){return yt(e,Xi(t,3),ur)},On.findLast=as,On.findLastIndex=No,On.findLastKey=function(e,t){return yt(e,Xi(t,3),lr)},On.floor=lc,On.forEach=cs,On.forEachRight=us,On.forIn=function(e,t){return null==e?e:ar(e,Xi(t,3),Ea)},On.forInRight=function(e,t){return null==e?e:cr(e,Xi(t,3),Ea)},On.forOwn=function(e,t){return e&&ur(e,Xi(t,3))},On.forOwnRight=function(e,t){return e&&lr(e,Xi(t,3))},On.get=ma,On.gt=xs,On.gte=ks,On.has=function(e,t){return null!=e&&io(e,t,mr)},On.hasIn=va,On.head=Mo,On.identity=Ka,On.includes=function(e,t,n,r){e=Ms(e)?e:Da(e),n=n&&!r?ia(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Xs(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),_t(e,t,i)},On.inRange=function(e,t,n){return t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n){return e>=cn(t,n)&&e=-9007199254740991&&e<=9007199254740991},On.isSet=Js,On.isString=Xs,On.isSymbol=Qs,On.isTypedArray=Zs,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return $s(e)&&ro(e)==S},On.isWeakSet=function(e){return $s(e)&&"[object WeakSet]"==fr(e)},On.join=function(e,t){return null==e?"":on.call(e,t)},On.kebabCase=Na,On.last=Uo,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?an(r+i,0):cn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):bt(e,Et,i,!0)},On.lowerCase=ja,On.lowerFirst=Ma,On.lt=ea,On.lte=ta,On.max=function(e){return e&&e.length?ir(e,Ka,gr):void 0},On.maxBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),gr):void 0},On.mean=function(e){return Pt(e,Ka)},On.meanBy=function(e,t){return Pt(e,Xi(t,2))},On.min=function(e){return e&&e.length?ir(e,Ka,Ir):void 0},On.minBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),Ir):void 0},On.stubArray=oc,On.stubFalse=sc,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=hc,On.nth=function(e,t){return e&&e.length?kr(e,ia(t)):void 0},On.noConflict=function(){return Ge._===this&&(Ge._=Re),this},On.noop=Qa,On.now=ms,On.pad=function(e,t,n){e=ca(e);var r=(t=ia(t))?$t(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ai(en(i),n)+e+Ai(Zt(i),n)},On.padEnd=function(e,t,n){e=ca(e);var r=(t=ia(t))?$t(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=dn();return cn(e+i*(t-e+Be("1e-"+((i+"").length-1))),t)}return Lr(e,t)},On.reduce=function(e,t,n){var r=Ns(e)?ft:Ct,i=arguments.length<3;return r(e,Xi(t,4),n,i,tr)},On.reduceRight=function(e,t,n){var r=Ns(e)?gt:Ct,i=arguments.length<3;return r(e,Xi(t,4),n,i,nr)},On.repeat=function(e,t,n){return t=(n?co(e,t,n):void 0===t)?1:ia(t),Fr(ca(e),t)},On.replace=function(){var e=arguments,t=ca(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,i=(t=ci(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=cn(e,4294967295);e-=4294967295;for(var i=Rt(r,t=Xi(t));++n=o)return e;var a=n-$t(r);if(a<1)return r;var c=s?li(s,0,a).join(""):e.slice(0,a);if(void 0===i)return c+r;if(s&&(a+=c.length-a),Ys(i)){if(e.slice(a).search(i)){var u,l=c;for(i.global||(i=ge(i.source,ca(ne.exec(i))+"g")),i.lastIndex=0;u=i.exec(l);)var d=u.index;c=c.slice(0,void 0===d?a:d)}}else if(e.indexOf(Qr(i),a)!=a){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},On.unescape=function(e){return(e=ca(e))&&L.test(e)?e.replace(j,zt):e},On.uniqueId=function(e){var t=++we;return ca(e)+t},On.upperCase=qa,On.upperFirst=Ua,On.each=cs,On.eachRight=us,On.first=Mo,Xa(On,(dc={},ur(On,(function(e,t){Pe.call(On.prototype,t)||(dc[t]=e)})),dc),{chain:!1}),On.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),st(["drop","take"],(function(e,t){An.prototype[e]=function(n){n=void 0===n?1:an(ia(n),0);var r=this.__filtered__&&!t?new An(this):this.clone();return r.__filtered__?r.__takeCount__=cn(n,r.__takeCount__):r.__views__.push({size:cn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},An.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;An.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");An.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");An.prototype[e]=function(){return this.__filtered__?new An(this):this[n](1)}})),An.prototype.compact=function(){return this.filter(Ka)},An.prototype.find=function(e){return this.filter(e).head()},An.prototype.findLast=function(e){return this.reverse().find(e)},An.prototype.invokeMap=qr((function(e,t){return"function"==typeof e?new An(this):this.map((function(n){return br(n,e,t)}))})),An.prototype.reject=function(e){return this.filter(Ts(Xi(e)))},An.prototype.slice=function(e,t){e=ia(e);var n=this;return n.__filtered__&&(e>0||t<0)?new An(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ia(t))<0?n.dropRight(-t):n.take(t-e)),n)},An.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},An.prototype.toArray=function(){return this.take(4294967295)},ur(An.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=On[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(On.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,a=t instanceof An,c=s[0],u=a||Ns(t),l=function(e){var t=i.apply(On,pt([e],s));return r&&d?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(a=u=!1);var d=this.__chain__,h=!!this.__actions__.length,p=o&&!d,f=a&&!h;if(!o&&u){t=f?t:new An(this);var g=e.apply(t,s);return g.__actions__.push({func:rs,args:[l],thisArg:void 0}),new kn(g,d)}return p&&f?e.apply(this,s):(g=this.thru(l),p?r?g.value()[0]:g.value():g)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ns(i)?i:[],e)}return this[n]((function(n){return t.apply(Ns(n)?n:[],e)}))}})),ur(An.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";Pe.call(_n,r)||(_n[r]=[]),_n[r].push({name:t,func:n})}})),_n[Oi(void 0,2).name]=[{name:"wrapper",func:void 0}],An.prototype.clone=function(){var e=new An(this.__wrapped__);return e.__actions__=yi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yi(this.__views__),e},An.prototype.reverse=function(){if(this.__filtered__){var e=new An(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},An.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ns(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof xn;){var r=Oo(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof An){var t=e;return this.__actions__.length&&(t=new An(this)),(t=t.reverse()).__actions__.push({func:rs,args:[Ho],thisArg:void 0}),new kn(t,this.__chain__)}return this.thru(Ho)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Xe&&(On.prototype[Xe]=function(){return this}),On}();Ge._=Yt,void 0===(r=function(){return Yt}.call(t,n,t,e))||(e.exports=r)}).call(this)}).call(this,n(428)(e))},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";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotebookCell=t.getURIFilter=t.isResource=t.noop=void 0;const r=n(10),i=n(63);t.noop=function(){},t.isResource=function(e){if(!e)return!0;const t=e;return"string"==typeof t.path&&"string"==typeof t.scheme},t.getURIFilter=function(e,t={checkParent:!0}){let n=e.path;for(;n.endsWith("/");)n=n.slice(0,-1);const r=n+"/";return function(o){if(o.scheme!==e.scheme)return!1;let s=o.path;for(;s.endsWith("/");)s=s.slice(0,-1);if(t.checkParent&&(0,i.isParentPath)(s,r))return!0;if(t.checkChild){const e=s+"/";if((0,i.isParentPath)(n,e))return!0}return!1}},t.isNotebookCell=function(e){const t=function(e){if(!e)return!1;const t=e;return"string"==typeof t.path&&"string"==typeof t.scheme}(e)?e:e.uri;return t.scheme.includes(r.NotebookCellScheme)||t.scheme.includes(r.InteractiveInputScheme)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onDidChangePythonSetting=t.getPythonSetting=t.getSubDirs=t.isFile=t.resolveSymbolicLink=t.getWorkspaceFolders=t.arePathsSame=t.normCasePath=t.resolvePath=t.normalizePath=t.isDirectory=t.isParentPath=t.untildify=t.readFileSync=t.readFile=t.pathExistsSync=t.pathExists=t.exec=t.shellExecute=t.initializeExternalDependencies=void 0;const r=n(52),i=n(3),o=n(2),s=n(25),a=n(1),c=n(16),u=n(19);let l;function d(e){return(0,u.getOSType)()===u.OSType.Windows?i.normalize(e).toUpperCase():i.normalize(e)}async function h(e,t){if((t=null!=t?t:await r.lstat(e)).isSymbolicLink()){const t=await r.readlink(e);return h(i.isAbsolute(t)?t:i.resolve(i.dirname(e),t))}return e}t.initializeExternalDependencies=function(e){l=e},t.shellExecute=async function(e,t={}){return(await l.get(s.IProcessServiceFactory).create()).shellExec(e,t)},t.exec=async function(e,t,n={}){return(await l.get(s.IProcessServiceFactory).create()).exec(e,t,n)},t.pathExists=function(e){return r.pathExists(e)},t.pathExistsSync=function(e){return r.pathExistsSync(e)},t.readFile=function(e){return r.readFile(e,"utf-8")},t.readFileSync=function(e){return r.readFileSync(e,"utf-8")},t.untildify=n(150),t.isParentPath=function(e,t){return t.endsWith(i.sep)||(t+=i.sep),e.endsWith(i.sep)||(e+=i.sep),d(e).startsWith(d(t))},t.isDirectory=async function(e){return(await r.lstat(e)).isDirectory()},t.normalizePath=function(e){return i.normalize(e)},t.resolvePath=function(e){return i.resolve(e)},t.normCasePath=d,t.arePathsSame=function(e,t){return d(e)===d(t)},t.getWorkspaceFolders=function(){var e,t;return null!==(t=null===(e=o.workspace.workspaceFolders)||void 0===e?void 0:e.map(e=>e.uri.fsPath))&&void 0!==t?t:[]},t.resolveSymbolicLink=h,t.isFile=async function(e){const t=await r.lstat(e);if(t.isSymbolicLink()){const n=await h(e,t);return(await r.lstat(n)).isFile()}return t.isFile()},t.getSubDirs=async function*(e,t){const n=(await r.promises.readdir(e,{withFileTypes:!0})).map(n=>async function*(){const o=i.join(e,n.name);if(n.isDirectory())yield o;else if((null==t?void 0:t.resolveSymlinks)&&n.isSymbolicLink()){const e=await h(o);(await r.lstat(e)).isDirectory()&&(yield e)}}());yield*(0,c.iterable)((0,c.chain)(n))},t.getPythonSetting=function(e){return l.get(a.IConfigurationService).getSettings()[e]},t.onDidChangePythonSetting=function(e,t){return o.workspace.onDidChangeConfiguration(n=>{n.affectsConfiguration("python."+e)&&t()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPythonToolExecutionService=t.StdErrError=t.IPythonExecutionService=t.IPythonExecutionFactory=t.IProcessServiceFactory=t.IProcessLogger=t.IBufferDecoder=void 0,t.IBufferDecoder=Symbol("IBufferDecoder"),t.IProcessLogger=Symbol("IProcessLogger"),t.IProcessServiceFactory=Symbol("IProcessServiceFactory"),t.IPythonExecutionFactory=Symbol("IPythonExecutionFactory"),t.IPythonExecutionService=Symbol("IPythonExecutionService");class r extends Error{constructor(e){super(e)}}t.StdErrError=r,t.IPythonToolExecutionService=Symbol("IPythonToolRunnerService")},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(282);i(n(282),t),i(n(485),t),t.createProtocolConnection=function(e,t,n,r){return o.createMessageConnection(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IShellDetector=t.ITerminalActivationHandler=t.ITerminalActivationCommandProvider=t.ITerminalActivator=t.ITerminalHelper=t.ITerminalServiceFactory=t.TerminalShellType=t.TerminalActivationProviders=void 0,function(e){e.bashCShellFish="bashCShellFish",e.commandPromptAndPowerShell="commandPromptAndPowerShell",e.pyenv="pyenv",e.conda="conda",e.pipenv="pipenv"}(t.TerminalActivationProviders||(t.TerminalActivationProviders={})),function(e){e.powershell="powershell",e.powershellCore="powershellCore",e.commandPrompt="commandPrompt",e.gitbash="gitbash",e.bash="bash",e.zsh="zsh",e.ksh="ksh",e.fish="fish",e.cshell="cshell",e.tcshell="tshell",e.wsl="wsl",e.xonsh="xonsh",e.other="other"}(t.TerminalShellType||(t.TerminalShellType={})),t.ITerminalServiceFactory=Symbol("ITerminalServiceFactory"),t.ITerminalHelper=Symbol("ITerminalHelper"),t.ITerminalActivator=Symbol("ITerminalActivator"),t.ITerminalActivationCommandProvider=Symbol("ITerminalActivationCommandProvider"),t.ITerminalActivationHandler=Symbol("ITerminalActivationHandler"),t.IShellDetector=Symbol("IShellDetector")},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.UNKNOWN_PYTHON_VERSION=t.PythonReleaseLevel=t.PythonEnvSource=t.globallyInstalledEnvKinds=t.virtualEnvKinds=t.PythonEnvKind=void 0,function(e){e.Unknown="unknown",e.System="global-system",e.MacDefault="global-mac-default",e.WindowsStore="global-windows-store",e.Pyenv="global-pyenv",e.CondaBase="global-conda-base",e.Poetry="global-poetry",e.Custom="global-custom",e.OtherGlobal="global-other",e.Venv="virt-venv",e.VirtualEnv="virt-virtualenv",e.VirtualEnvWrapper="virt-virtualenvwrapper",e.Pipenv="virt-pipenv",e.Conda="virt-conda",e.OtherVirtual="virt-other"}(r=t.PythonEnvKind||(t.PythonEnvKind={})),t.virtualEnvKinds=[r.Poetry,r.Pipenv,r.Venv,r.VirtualEnvWrapper,r.Conda,r.VirtualEnv],t.globallyInstalledEnvKinds=[r.OtherGlobal,r.Unknown,r.WindowsStore,r.System,r.Custom],function(e){e.PathEnvVar="path env var",e.WindowsRegistry="windows registry"}(t.PythonEnvSource||(t.PythonEnvSource={})),function(e){e.Alpha="alpha",e.Beta="beta",e.Candidate="candidate",e.Final="final"}(i=t.PythonReleaseLevel||(t.PythonReleaseLevel={})),t.UNKNOWN_PYTHON_VERSION={major:-1,minor:-1,micro:-1,release:{level:i.Final,serial:-1},sysVersion:void 0},Object.freeze(t.UNKNOWN_PYTHON_VERSION)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getEnvironmentTypeName=t.ModuleInstallerType=t.virtualEnvTypes=t.EnvironmentType=void 0,function(e){e.Unknown="Unknown",e.Conda="Conda",e.VirtualEnv="VirtualEnv",e.Pipenv="PipEnv",e.Pyenv="Pyenv",e.Venv="Venv",e.WindowsStore="WindowsStore",e.Poetry="Poetry",e.VirtualEnvWrapper="VirtualEnvWrapper",e.Global="Global",e.System="System"}(r=t.EnvironmentType||(t.EnvironmentType={})),t.virtualEnvTypes=[r.Poetry,r.Pipenv,r.Venv,r.VirtualEnvWrapper,r.Conda,r.VirtualEnv],function(e){e.Unknown="Unknown",e.Conda="Conda",e.Pip="Pip",e.Poetry="Poetry",e.Pipenv="Pipenv"}(t.ModuleInstallerType||(t.ModuleInstallerType={})),t.getEnvironmentTypeName=function(e){switch(e){case r.Conda:return"conda";case r.Pipenv:return"pipenv";case r.Pyenv:return"pyenv";case r.Venv:return"venv";case r.VirtualEnv:return"virtualenv";case r.WindowsStore:return"windows store";case r.Poetry:return"poetry";case r.VirtualEnvWrapper:return"virtualenvwrapper";default:return""}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISourceMapSupportService=t.IInvalidPythonPathInDebuggerService=t.IDiagnosticHandlerService=t.IDiagnosticFilterService=t.IDiagnosticsService=t.DiagnosticScope=void 0,function(e){e.Global="Global",e.WorkspaceFolder="WorkspaceFolder"}(t.DiagnosticScope||(t.DiagnosticScope={})),t.IDiagnosticsService=Symbol("IDiagnosticsService"),t.IDiagnosticFilterService=Symbol("IDiagnosticFilterService"),t.IDiagnosticHandlerService=Symbol("IDiagnosticHandlerService"),t.IInvalidPythonPathInDebuggerService=Symbol("IInvalidPythonPathInDebuggerService"),t.ISourceMapSupportService=Symbol("ISourceMapSupportService")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.POST_CONSTRUCT=t.DESIGN_PARAM_TYPES=t.PARAM_TYPES=t.TAGGED_PROP=t.TAGGED=t.MULTI_INJECT_TAG=t.INJECT_TAG=t.OPTIONAL_TAG=t.UNMANAGED_TAG=t.NAME_TAG=t.NAMED_TAG=void 0,t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct"},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(6),i=n(7),o=n(17),s=n(18),a=n(48),c=n(134),u=n(88),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.b(t,e),t}(o.a),d=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.b(t,e),t.prototype[u.a]=function(){return new l(this)},t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new a.a;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;ii)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(7),i=new r.a((function(e){return e.complete()}));function o(e){return e?function(e){return new r.a((function(t){return e.schedule((function(){return t.complete()}))}))}(e):i}},function(e,t,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(t,"a",(function(){return i}));var i=r()},function(e,t,n){"use strict";var r=n(344),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n{e.call(this,...t,(e,t)=>null!=e?r(e):n(t))});e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(e=>n(null,e),n)}),"name",{value:e.name})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STACK_OVERFLOW=t.CIRCULAR_DEPENDENCY_IN_FACTORY=t.POST_CONSTRUCT_ERROR=t.MULTIPLE_POST_CONSTRUCT_METHODS=t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=t.ARGUMENTS_LENGTH_MISMATCH=t.INVALID_DECORATOR_OPERATION=t.INVALID_TO_SELF_VALUE=t.INVALID_FUNCTION_BINDING=t.INVALID_MIDDLEWARE_RETURN=t.NO_MORE_SNAPSHOTS_AVAILABLE=t.INVALID_BINDING_TYPE=t.NOT_IMPLEMENTED=t.CIRCULAR_DEPENDENCY=t.UNDEFINED_INJECT_ANNOTATION=t.MISSING_INJECT_ANNOTATION=t.MISSING_INJECTABLE_ANNOTATION=t.NOT_REGISTERED=t.CANNOT_UNBIND=t.AMBIGUOUS_MATCH=t.KEY_NOT_FOUND=t.NULL_ARGUMENT=t.DUPLICATED_METADATA=t.DUPLICATED_INJECTABLE_DECORATOR=void 0,t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;tr.promises})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.swallowExceptions=t.cache=t.makeDebounceAsyncDecorator=t.makeDebounceDecorator=t.debounceAsync=t.debounceSync=void 0,n(12);const r=n(5),i=n(10),o=n(16),s=n(215),a=n(41),c=n(435);function u(e){return function(t,n,r){const i=r.value,o=c((function(){return i.apply(this,arguments)}),e,{});r.value=o}}function l(e){return function(t,n,r){const i=r.value,s={started:!1,deferred:void 0,timer:void 0};r.value=function(){const t=s.deferred;if(t&&s.started)return t.promise;const n=t&&t.completed,r=s.deferred=!t||n?(0,o.createDeferred)():t;return s.timer&&clearTimeout(s.timer),s.timer=setTimeout(async()=>{s.started=!0,i.apply(this).then(e=>{s.started=!1,r.resolve(e)}).catch(e=>{s.started=!1,r.reject(e)})},e||0),r.promise}}}t.debounceSync=function(e){return(0,i.isTestExecution)()&&(e=void 0),u(e)},t.debounceAsync=function(e){return(0,i.isTestExecution)()&&(e=void 0),l(e)},t.makeDebounceDecorator=u,t.makeDebounceAsyncDecorator=l;const d=(0,s.getGlobalCacheStore)(),h=new a.StopWatch;t.cache=function(e,t=!1,n){return function(o,a,c){const u=c.value,l=`Cache_Method_Output_${"constructor"in o&&o.constructor.name?o.constructor.name:""}.${a}`;c.value=async function(...o){if((0,i.isTestExecution)())return u.apply(this,o);let a;try{a=(0,s.getCacheKeyFromFunctionArgs)(l,o)}catch(e){return(0,r.traceError)("Error while creating key for keyPrefix:",l,e),u.apply(this,o)}const c=d.get(a);if(c&&(c.expiry>Date.now()||-1===e))return(0,r.traceVerbose)("Cached data exists "+a),Promise.resolve(c.data);const p=n&&h.elapsedTime>2e5?n:e,f=u.apply(this,o);return t?d.set(a,{data:f,expiry:Date.now()+p}):f.then(e=>d.set(a,{data:e,expiry:Date.now()+p})).ignoreErrors(),f}}},t.swallowExceptions=function(e){return function(t,n,o){const s=o.value,a=`Python Extension (Error in ${e||n}, method:${n}):`;o.value=function(...e){try{const t=s.apply(this,e);if(t&&"function"==typeof t.then&&"function"==typeof t.catch)return t.catch(e=>{(0,i.isTestExecution)()||(0,r.traceError)(a,e)})}catch(e){if((0,i.isTestExecution)())return;(0,r.traceError)(a,e)}}}}},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 r=n(2),i=n(27),o=n(287),s=n(505),a=n(506),c=n(109),u=n(507),l=n(224),d=n(293);class h{error(e){i.RAL().console.error(e)}warn(e){i.RAL().console.warn(e)}info(e){i.RAL().console.info(e)}log(e){i.RAL().console.log(e)}}var p,f,g,m,v;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(p=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(f=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?p.Continue:p.Shutdown}closed(){if(this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount)return f.Restart;return this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(r.window.showErrorMessage(`The ${this.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted.`),f.DoNotRestart):(this.restarts.shift(),f.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(g=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 b=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],_=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter],S=[i.SymbolTag.Deprecated];function E(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var P,w;!function(e){e.fromConfiguration=function(e){const t=r.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(P||(P={})),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}}(w||(w={}));class T{constructor(e,t,n,r,i,o){this._client=e,this._event=t,this._type=n,this._middleware=r,this._createParams=i,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t))return!0;return!1}register(e){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(r.languages.match(t,e))return{send:e=>{this.callback(e)}}}}class C extends T{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),T.textDocumentFilter),this._syncedDocuments=t}fillClientCapabilities(e){E(E(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 i.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;r.workspace.textDocuments.forEach(e=>{let n=e.uri.toString();if(!this._syncedDocuments.has(n)&&r.languages.match(t,e)){let t=this._client.clientOptions.middleware,r=e=>{this._client.sendNotification(this._type,this._createParams(e))};t.didOpen?t.didOpen(e,r):r(e),this._syncedDocuments.set(n,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class I extends T{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),T.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){E(E(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(r.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}})}}class R{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get registrationType(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){E(E(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.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(r.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===i.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===i.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new u.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))},-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}}}}class O extends T{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>T.textDocumentFilter(e,t.document))}get registrationType(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){E(E(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 i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){E(E(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=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(T.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class x extends T{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),T.textDocumentFilter),this._includeText=!1}get registrationType(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){E(E(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 k{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get registrationType(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){E(E(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&i.WatchKind.Create),o=0!=(n.kind&i.WatchKind.Change),s=0!=(n.kind&i.WatchKind.Delete));let a=r.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,r,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed}),null,o),r&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}}class A{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(i.TextDocumentRegistrationOptions.is(t)){const n=i.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),r=t.documentSelector||e;if(r)return[n,Object.assign({},t,{documentSelector:r})]}else if(c.boolean(t)&&!0===t||i.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&&r.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=A;class N extends A{constructor(e){super(e,i.CompletionRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[i.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[i.InsertTextMode.asIs,i.InsertTextMode.adjustIndentation]}},t.completionItemKind={valueSet:_}}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,r)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,r)=>o.sendRequest(i.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),r).then(o.protocol2CodeConverter.asCompletionResult,e=>o.handleFailedRequest(i.CompletionRequest.type,e,null));return s.provideCompletionItem?s.provideCompletionItem(e,t,r,n,a):a(e,t,r,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(i.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>n.handleFailedRequest(i.CompletionResolveRequest.type,t,e));return r.resolveCompletionItem?r.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[r.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class j extends A{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=E(E(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.HoverRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asHover,e=>r.handleFailedRequest(i.HoverRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[r.languages.registerHoverProvider(e.documentSelector,t),t]}}class M extends A{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.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,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),r).then(o.protocol2CodeConverter.asSignatureHelp,e=>o.handleFailedRequest(i.SignatureHelpRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,r,n,s):s(e,t,r,n)}};let n;if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,...i)}else{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,i)}return[n,t]}}class L extends A{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=E(E(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 r=this._client,o=(e,t,n)=>r.sendRequest(i.DefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.DefinitionRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class F extends A{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){E(E(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,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),r).then(o.protocol2CodeConverter.asReferences,e=>o.handleFailedRequest(i.ReferencesRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerReferenceProvider(e.documentSelector,t),t]}}class q extends A{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){E(E(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 r=this._client,o=(e,t,n)=>r.sendRequest(i.DocumentHighlightRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDocumentHighlights,e=>r.handleFailedRequest(i.DocumentHighlightRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class U extends A{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:b},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:S},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,r=(e,t)=>n.sendRequest(i.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return i.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>n.handleFailedRequest(i.DocumentSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,r):r(e,t)}},n=void 0!==e.label?{label:e.label}:void 0;return[r.languages.registerDocumentSymbolProvider(e.documentSelector,t,n),t]}}class W 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,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=E(E(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:b},t.tagSupport={valueSet:S}}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,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>n.handleFailedRequest(i.WorkspaceSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,r):r(e,t)}};return[r.languages.registerWorkspaceSymbolProvider(t),t]}}class B extends A{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=E(E(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[i.CodeActionKind.Empty,i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}},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,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(i.CodeActionRequest.type,s,r).then(e=>{if(null===e)return;const t=[];for(let n of e)i.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>o.handleFailedRequest(i.CodeActionRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,r,s):s(e,t,n,r)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(i.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeAction(e),t).then(n.protocol2CodeConverter.asCodeAction,t=>n.handleFailedRequest(i.CodeActionResolveRequest.type,t,e));return r.resolveCodeAction?r.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[r.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class V extends A{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){E(E(e,"textDocument"),"codeLens").dynamicRegistration=!0,E(E(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.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 r.EventEmitter,n={onDidChangeCodeLenses:t.event,provideCodeLenses:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>n.handleFailedRequest(i.CodeLensRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,r):r(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>n.handleFailedRequest(i.CodeLensResolveRequest.type,t,e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,r):r(e,t)}:void 0};return[r.languages.registerCodeLensProvider(e.documentSelector,n),{provider:n,onDidChangeCodeLensEmitter:t}]}}class H extends A{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){E(E(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 r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),options:r.code2ProtocolConverter.asFormattingOptions(t,P.fromConfiguration(e))};return r.sendRequest(i.DocumentFormattingRequest.type,o,n).then(r.protocol2CodeConverter.asTextEdits,e=>r.handleFailedRequest(i.DocumentFormattingRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class $ extends A{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){E(E(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,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,P.fromConfiguration(e))};return o.sendRequest(i.DocumentRangeFormattingRequest.type,s,r).then(o.protocol2CodeConverter.asTextEdits,e=>o.handleFailedRequest(i.DocumentRangeFormattingRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class G extends A{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){E(E(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,r,o)=>{const s=this._client,a=(e,t,n,r,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(r,P.fromConfiguration(e))};return s.sendRequest(i.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>s.handleFailedRequest(i.DocumentOnTypeFormattingRequest.type,e,null))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,r,o,a):a(e,t,n,r,o)}},n=e.moreTriggerCharacter||[];return[r.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class K extends A{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=i.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,r)=>{const o=this._client,s=(e,t,n,r)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(i.RenameRequest.type,s,r).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>o.handleFailedRequest(i.RenameRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,r,s):s(e,t,n,r)},prepareRename:e.prepareProvider?(e,t,n)=>{const r=this._client,o=(e,t,n)=>{let o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)};return r.sendRequest(i.PrepareRenameRequest.type,o,n).then(e=>i.Range.is(e)?r.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&i.Range.is(e.range)?{range:r.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>r.handleFailedRequest(i.PrepareRenameRequest.type,e,void 0))},s=r.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[r.languages.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){const t=e;return t&&c.boolean(t.defaultBehavior)}}class z extends A{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=E(E(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,r=(e,t)=>n.sendRequest(i.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>n.handleFailedRequest(i.DocumentLinkRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,r):r(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let r=(e,t)=>n.sendRequest(i.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>n.handleFailedRequest(i.DocumentLinkResolveRequest.type,t,e));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,r):r(e,t)}:void 0};return[r.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class Y{constructor(e){this._client=e,this._listeners=new Map}get registrationType(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){E(E(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=r.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 r=e=>{void 0!==e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,r):r(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e=0?r.workspace.getConfiguration(a.substr(0,c),n).get(a.substr(c+1)):r.workspace.getConfiguration(void 0,n).get(a),u){let n=e[s].split(".");t(i,n)[n[n.length-1]]=o.toJSONObject(u)}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class J{constructor(e){this._client=e,this._commands=new Map}get registrationType(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){E(E(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 r={command:e,arguments:n};return t.sendRequest(i.ExecuteCommandRequest.type,r).then(void 0,e=>t.handleFailedRequest(i.ExecuteCommandRequest.type,e,void 0))};if(e.registerOptions.commands){const t=[];for(const i of e.registerOptions.commands)t.push(r.commands.registerCommand(i,(...e)=>n.executeCommand?n.executeCommand(i,e,o):o(i,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&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class X{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 r;this._traceFormat=i.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||g.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||this.createDefaultErrorHandler(null===(r=n.connectionOptions)||void 0===r?void 0:r.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 X(e,t)}),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._trace=i.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(i.WorkDoneProgress.is(e)){const r=this._clientOptions.middleware.handleWorkDoneProgress;if(void 0!==r)return this._resolvedConnection.onProgress(e,t,e=>{r(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=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(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 i.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<=g.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<=g.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<=g.Error&&this.showNotificationMessage()}showNotificationMessage(){r.window.showInformationMessage("A request has failed. See the output for more information.","Go to output").then(()=>{this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(""+JSON.stringify(e))}needsStart(){return this.state===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 X(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection()),this.state=v.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case i.MessageType.Error:this.error(e.message,void 0,!1);break;case i.MessageType.Warning:this.warn(e.message,void 0,!1);break;case i.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:r.window.showInformationMessage(e.message);break;default:r.window.showInformationMessage(e.message)}}),e.onRequest(i.ShowMessageRequest.type,e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:t=r.window.showInformationMessage;break;default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.onRequest(i.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 r.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 r.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!0}}},i=null===(t=this._clientOptions.middleware.window)||void 0===t?void 0:t.showDocument;return void 0!==i?i(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),r.window.showErrorMessage("Couldn't start client "+this._name)}),new r.Disposable(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:null,clientInfo:{name:r.env.appName,version:r.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:c.func(t)?t():t,trace:i.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===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics(e=>this.handleDiagnostics(e)),e.onRequest(i.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(i.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(i.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t}).then(void 0,t=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))}):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===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 r(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 i=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null==i?void 0:i.didChangeWatchedFile)?i.didChangeWatchedFile(e,r):r(e)}forceDocumentSync(){void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(i.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),r=this.clientOptions.middleware;r.handleDiagnostics?r.handleDiagnostics(t,n,(e,t)=>this.setDiagnostics(e,t)):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(n=>function(e,t,n,r,o){let s=new h,a=i.createProtocolConnection(e,t,s,o);return a.onError(e=>{n(e[0],e[1],e[2])}),a.onClose(r),{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 r={sendNotification:!1,traceFormat:i.TraceFormat.Text};void 0===n?a.trace(e,t,r):(c.boolean(n),a.trace(e,t,n))},initialize:e=>a.sendRequest(i.InitializeRequest.type,e),shutdown:()=>a.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>a.sendNotification(i.ExitNotification.type),onLogMessage:e=>a.onNotification(i.LogMessageNotification.type,e),onShowMessage:e=>a.onNotification(i.ShowMessageNotification.type,e),onTelemetry:e=>a.onNotification(i.TelemetryEventNotification.type,e),didChangeConfiguration:e=>a.sendNotification(i.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>a.sendNotification(i.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>a.sendNotification(i.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>a.sendNotification(i.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>a.sendNotification(i.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>a.sendNotification(i.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>a.onNotification(i.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=f.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===f.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===f.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)===p.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){r.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=r.workspace.getConfiguration(this._id),o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=c.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),w.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 C(this,this._syncedDocuments)),this.registerFeature(new R(this)),this.registerFeature(new O(this)),this.registerFeature(new D(this)),this.registerFeature(new x(this)),this.registerFeature(new I(this,this._syncedDocuments)),this.registerFeature(new k(this,e=>this.notifyFileEvent(e))),this.registerFeature(new N(this)),this.registerFeature(new j(this)),this.registerFeature(new M(this)),this.registerFeature(new L(this)),this.registerFeature(new F(this)),this.registerFeature(new q(this)),this.registerFeature(new U(this)),this.registerFeature(new W(this)),this.registerFeature(new B(this)),this.registerFeature(new V(this)),this.registerFeature(new H(this)),this.registerFeature(new $(this)),this.registerFeature(new G(this)),this.registerFeature(new K(this)),this.registerFeature(new z(this)),this.registerFeature(new J(this))}fillInitializeParams(e){for(let t of this._features)c.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};E(e,"workspace").applyEdit=!0;const t=E(E(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=E(E(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[i.DiagnosticTag.Unnecessary,i.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const r=E(e,"window");E(r,"showMessage").messageActionItem={additionalPropertiesSupport:!0};E(r,"showDocument").support=!0;const o=E(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 r=t.registerOptions||{};r.documentSelector=r.documentSelector||this._clientOptions.documentSelector;const i={id:t.id,registerOptions:r};try{e.register(i)}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;r.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):c.asPromise(r.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}handleFailedRequest(e,t,n){if(t instanceof i.ResponseError){if(t.code===i.LSPErrorCodes.RequestCancelled)throw this.makeCancelError();if(t.code===i.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";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticCommandPromptHandlerService=t.DiagnosticCommandPromptHandlerServiceId=void 0;const o=n(0),s=n(2),a=n(4),c=n(15);t.DiagnosticCommandPromptHandlerServiceId="DiagnosticCommandPromptHandlerServiceId";let u=class{constructor(e){this.appShell=e.get(a.IApplicationShell)}async handle(e,t={commandPrompts:[]}){const n=t.commandPrompts.map(e=>e.prompt),r=await this.displayMessage(t.message?t.message:e.message,e.severity,n);if(t.onClose&&t.onClose(r),!r)return;const i=t.commandPrompts.find(e=>e.prompt===r);i&&i.command&&await i.command.invoke()}async displayMessage(e,t,n){switch(t){case s.DiagnosticSeverity.Error:return this.appShell.showErrorMessage(e,...n);case s.DiagnosticSeverity.Warning:return this.appShell.showWarningMessage(e,...n);default:return this.appShell.showInformationMessage(e,...n)}}};u=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],u),t.DiagnosticCommandPromptHandlerService=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linterScript=t.tensorboardLauncher=t.visualstudio_py_testlauncher=t.testlauncher=t.shell_exec=t.printEnvVariables=t.normalizeSelection=t.sortImports=t.interpreterInfo=t.OUTPUT_MARKER_SCRIPT=t.testingTools=void 0;const r=n(3),i=n(227),o=i._SCRIPTS_DIR;t.testingTools=n(230),t.OUTPUT_MARKER_SCRIPT=r.join(i._SCRIPTS_DIR,"get_output_via_markers.py"),t.interpreterInfo=function(){const e=[r.join(o,"interpreterInfo.py")];return[e,function(t){let n;try{n=JSON.parse(t)}catch(n){throw Error(`python ${e} returned bad JSON (${t}) (${n})`)}return n}]},t.sortImports=function(e,t){const n=[r.join(o,"sortImports.py"),e,"--diff"];return t&&n.push(...t),[n,function(e){return e}]},t.normalizeSelection=function(){return[[r.join(o,"normalizeSelection.py")],function(e){return e}]},t.printEnvVariables=function(){return[[r.join(o,"printEnvVariables.py").fileToCommandArgumentForPythonExt()],function(e){return JSON.parse(e)}]},t.shell_exec=function(e,t,n){return[r.join(o,"shell_exec.py"),e.fileToCommandArgumentForPythonExt(),...n,t.fileToCommandArgumentForPythonExt()]},t.testlauncher=function(e){return[r.join(o,"testlauncher.py"),...e]},t.visualstudio_py_testlauncher=function(e){return[r.join(o,"visualstudio_py_testlauncher.py"),...e]},t.tensorboardLauncher=function(e){return[r.join(o,"tensorboard_launcher.py"),...e]},t.linterScript=function(){return r.join(o,"linter.py")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILintingEngine=t.LintMessageSeverity=t.ILinterManager=t.LinterId=void 0,function(e){e.Flake8="flake8",e.MyPy="mypy",e.PyCodeStyle="pycodestyle",e.Prospector="prospector",e.PyDocStyle="pydocstyle",e.PyLama="pylama",e.PyLint="pylint",e.Bandit="bandit"}(t.LinterId||(t.LinterId={})),t.ILinterManager=Symbol("ILinterManager"),function(e){e[e.Hint=0]="Hint",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information"}(t.LintMessageSeverity||(t.LintMessageSeverity={})),t.ILintingEngine=Symbol("ILintingEngine")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.match=function(e){return!1},e.prototype.toString=function(){return""},e}();t.Matcher=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(6),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.b(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(17).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(133),i=n(90),o=n(7);function s(e,t,n,s,a){if(void 0===a&&(a=new r.a(e,n,s)),!a.closed)return t instanceof o.a?t.subscribe(a):Object(i.a)(t)(a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),i=n(90),o=n(200);function s(e,t){return t?Object(o.a)(e,t):e instanceof r.a?e:new r.a(Object(i.a)(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(33),i=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePathsSame=t.isParentPath=t.normCasePath=t.FileSystemPathUtils=t.Executables=t.FileSystemPaths=void 0;const r=n(3),i=n(149),o=n(19),s=n(150);class a{constructor(e,t){this.isCaseInsensitive=e,this.raw=t}static withDefaults(e){return void 0===e&&(e=(0,o.getOSType)()===o.OSType.Windows),new a(e,r)}get sep(){return this.raw.sep}join(...e){return this.raw.join(...e)}dirname(e){return this.raw.dirname(e)}basename(e,t){return this.raw.basename(e,t)}normalize(e){return this.raw.normalize(e)}normCase(e){return e=this.raw.normalize(e),this.isCaseInsensitive?e.toUpperCase():e}}t.FileSystemPaths=a;class c{constructor(e,t){this.delimiter=e,this.osType=t}static withDefaults(){return new c(r.delimiter,(0,o.getOSType)())}get envVar(){return(0,i.getSearchPathEnvVarNames)(this.osType)[0]}}t.Executables=c;class u{constructor(e,t,n,r){this.home=e,this.paths=t,this.executables=n,this.raw=r}static withDefaults(e){return void 0===e&&(e=a.withDefaults()),new u(s("~"),e,c.withDefaults(),r)}arePathsSame(e,t){return(e=this.paths.normCase(e))===(t=this.paths.normCase(t))}getDisplayName(e,t){return t&&d(e,t)?`.${this.paths.sep}${this.raw.relative(t,e)}`:d(e,this.home)?`~${this.paths.sep}${this.raw.relative(this.home,e)}`:e}}function l(e){return(0,o.getOSType)()===o.OSType.Windows?r.normalize(e).toUpperCase():r.normalize(e)}function d(e,t){return t.endsWith(r.sep)||(t+=r.sep),e.endsWith(r.sep)||(e+=r.sep),l(e).startsWith(l(t))}t.FileSystemPathUtils=u,t.normCasePath=l,t.isParentPath=d,t.arePathsSame=function(e,t){return l(e)===l(t)}},function(e,t,n){const r=n(43);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,I(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e,u[l.COMPARATORTRIM]),e=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],p)).split(/\s+/).join(" ");const c=r?u[l.COMPARATORLOOSE]:u[l.COMPARATOR],g=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>C(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new s(e,this.options)),m=(g.length,new Map);for(const e of g){if(f(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const y=[...m.values()];return i.set(t,y),y}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>m(n,t)&&e.set.some(e=>m(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=P(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,(t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),y(n)?c="":y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c})},P=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map(e=>w(e,t)).join(" ")),w=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,(n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const u=y(i),l=u||y(o),d=l||y(s),h=d;return"="===r&&h&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n})},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),C=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),I=e=>(t,n,r,i,o,s,a,c,u,l,d,h,p)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:s?">="+n:`>=${n}${e?"-0":""}`} ${c=y(u)?"":y(l)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:"<="+c}`.trim(),R=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseDiagnosticsService=t.BaseDiagnostic=void 0;const s=n(0),a=n(4),c=n(8),u=n(9),l=n(31);let d=class{constructor(e,t,n,r,i,o="default",s=!0){this.code=e,this.message=t,this.severity=n,this.scope=r,this.resource=i,this.invokeHandler=o,this.shouldShowPrompt=s}};d=i([(0,s.injectable)()],d),t.BaseDiagnostic=d;let h=r=class{constructor(e,t,n,r=!1,i=!1){this.supportedDiagnosticCodes=e,this.serviceContainer=t,this.runInBackground=r,this.runInUntrustedWorkspace=i,this.filterService=t.get(l.IDiagnosticFilterService),n.push(this)}dispose(){}async handle(e){if(0===e.length)return;const t=e.filter(e=>{if(e.invokeHandler&&"always"===e.invokeHandler)return!0;const t=this.getDiagnosticsKey(e);return-1===r.handledDiagnosticCodeKeys.indexOf(t)&&(r.handledDiagnosticCodeKeys.push(t),!0)});await this.onHandle(t)}async canHandle(e){return(0,c.sendTelemetryEvent)(u.EventName.DIAGNOSTICS_MESSAGE,void 0,{code:e.code}),this.supportedDiagnosticCodes.filter(t=>t===e.code).length>0}getDiagnosticsKey(e){if(e.scope===l.DiagnosticScope.Global)return e.code;const t=this.serviceContainer.get(a.IWorkspaceService),n=e.resource?t.getWorkspaceFolder(e.resource):void 0;return`${e.code}dbe75733-0407-4124-a1b2-ca769dc30523${n?n.uri.fsPath:""}`}};h.handledDiagnosticCodeKeys=[],h=r=i([(0,s.injectable)(),o(0,(0,s.unmanaged)()),o(1,(0,s.unmanaged)()),o(2,(0,s.unmanaged)()),o(3,(0,s.unmanaged)()),o(4,(0,s.unmanaged)())],h),t.BaseDiagnosticsService=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticCodes=void 0,function(e){e.InvalidEnvironmentPathVariableDiagnostic="InvalidEnvironmentPathVariableDiagnostic",e.InvalidDebuggerTypeDiagnostic="InvalidDebuggerTypeDiagnostic",e.NoPythonInterpretersDiagnostic="NoPythonInterpretersDiagnostic",e.MacInterpreterSelectedAndNoOtherInterpretersDiagnostic="MacInterpreterSelectedAndNoOtherInterpretersDiagnostic",e.MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic="MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic",e.InvalidPythonPathInDebuggerSettingsDiagnostic="InvalidPythonPathInDebuggerSettingsDiagnostic",e.InvalidPythonPathInDebuggerLaunchDiagnostic="InvalidPythonPathInDebuggerLaunchDiagnostic",e.EnvironmentActivationInPowerShellWithBatchFilesNotSupportedDiagnostic="EnvironmentActivationInPowerShellWithBatchFilesNotSupportedDiagnostic",e.NoCurrentlySelectedPythonInterpreterDiagnostic="InvalidPythonInterpreterDiagnostic",e.LSNotSupportedDiagnostic="LSNotSupportedDiagnostic",e.PythonPathDeprecatedDiagnostic="PythonPathDeprecatedDiagnostic",e.JustMyCodeDiagnostic="JustMyCodeDiagnostic",e.ConsoleTypeDiagnostic="ConsoleTypeDiagnostic",e.ConfigPythonPathDiagnostic="ConfigPythonPathDiagnostic",e.PylanceDefaultDiagnostic="PylanceDefaultDiagnostic",e.JediPython27NotSupportedDiagnostic="JediPython27NotSupportedDiagnostic",e.SwitchToDefaultLanguageServerDiagnostic="SwitchToDefaultLanguageServerDiagnostic",e.SwitchToPreReleaseExtensionDiagnostic="SwitchToPreReleaseExtensionDiagnostic"}(t.DiagnosticCodes||(t.DiagnosticCodes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnvironmentDirFromPath=t.getInterpreterPathFromDir=t.looksLikeBasicVirtualPython=t.looksLikeBasicGlobalPython=t.getPythonVersionFromPath=t.iterPythonExecutablesInDir=t.findInterpretersInDir=t.isPythonExecutable=void 0;const r=n(26),i=n(3),o=n(270),s=n(19),a=n(5),c=n(29),u=n(84),l=n(69),d=n(85),h=n(125),p=n(24),f=n(231),g=n(181),m=(0,s.getOSType)()===s.OSType.Windows?g.matchPythonBinFilename:f.matchPythonBinFilename;async function*v(e,t,n,r=!0){const i=(0,s.getOSType)()===s.OSType.Windows?g.matchPythonBinFilename:f.matchPythonBinFilename,a={ignoreErrors:r,filterSubDir:n,filterFile:i,maxDepth:t||0};for await(const t of async function*e(t,n,r){const i=await y(t,r);for(const t of i){yield t;const{filename:i,filetype:s}=t;s===o.FileType.Directory&&(r.maxDepth<0||n<=r.maxDepth)&&b(i,r.filterSubDir,r.ignoreErrors)&&(yield*e(i,n+1,r))}}(e,1,a)){const{filename:e,filetype:n}=t;n!==o.FileType.File&&n!==o.FileType.SymbolicLink||b(e,i,r)&&(yield t)}}async function y(e,t={ignoreErrors:!0}){const n=t.ignoreErrors||!1;if(t.filterFilename&&(0,s.getOSType)()===s.OSType.Windows){let s;try{s=await r.promises.readdir(e)}catch(t){if("ENOENT"===t.code)return[];if(n)return(0,a.traceError)(`readdir() failed for "${e}" (${t})`),[];throw t}const c=s.map(t=>i.join(e,t)).filter(e=>b(e,t.filterFilename,n));return Promise.all(c.map(async e=>({filename:e,filetype:await(0,o.getFileType)(e,t)||o.FileType.Unknown})))}let c;try{c=await r.promises.readdir(e,{withFileTypes:!0})}catch(t){if("ENOENT"===t.code)return[];if(n)return(0,a.traceError)(`readdir() failed for "${e}" (${t})`),[];throw t}const u=c.map(t=>({filename:i.join(e,t.name),filetype:(0,o.convertFileType)(t)}));return t.filterFilename?u.filter(e=>b(e.filename,t.filterFilename,n)):u}function b(e,t,n=!0){if(void 0===t)return!0;try{return t(e)}catch(t){if(n)return(0,a.traceError)(`filter failed for "${e}" (${t})`),!1;throw t}}async function _(e,t){return!!(t.matchFilename||m)("string"==typeof e?e:e.filename)&&!(t.filterFile&&!await t.filterFile(e))}t.isPythonExecutable=async function(e){return!(!m(e)||(0,s.getOSType)()!==s.OSType.Windows)||!!await(0,p.isFile)(e)},t.findInterpretersInDir=v,t.iterPythonExecutablesInDir=async function*(e,t={ignoreErrors:!0}){const n={...t,filterFile:m},r=await y(e,n);for(const e of r){const{filetype:t}=e;t!==o.FileType.File&&t!==o.FileType.SymbolicLink||(yield e)}},t.getPythonVersionFromPath=async function(e,t){let n;try{n=t?(0,l.parseVersion)(t):c.UNKNOWN_PYTHON_VERSION}catch(e){n=c.UNKNOWN_PYTHON_VERSION}const r=e?await async function(e){const t=i.dirname(e);let n=c.UNKNOWN_PYTHON_VERSION;for await(const e of v(t)){const{filename:t}=e;try{const e=(0,l.parseVersion)(i.basename(t));(0,u.comparePythonVersionSpecificity)(e,n)>0&&(n=e)}catch(e){}}return n}(e):c.UNKNOWN_PYTHON_VERSION,o=e?await(0,h.getPythonVersionFromPyvenvCfg)(e):c.UNKNOWN_PYTHON_VERSION,s=e?await(0,d.getPythonVersionFromConda)(e):c.UNKNOWN_PYTHON_VERSION;let a=c.UNKNOWN_PYTHON_VERSION;for(const e of[n,r,o,s])a=(0,u.comparePythonVersionSpecificity)(a,e)>0?a:e;return a};const S=(0,o.getFileFilter)({ignoreFileType:o.FileType.SymbolicLink});async function E(e){return _(e,{matchFilename:(0,s.getOSType)()===s.OSType.Windows?g.matchBasicPythonBinFilename:f.matchBasicPythonBinFilename,filterFile:S})}async function P(e){return _(e,{matchFilename:(0,s.getOSType)()===s.OSType.Windows?g.matchBasicPythonBinFilename:f.matchBasicPythonBinFilename,filterFile:void 0})}t.looksLikeBasicGlobalPython=E,t.looksLikeBasicVirtualPython=P,t.getInterpreterPathFromDir=async function(e,t={}){const n=t.global?E:P,r=v(e,2,(function(e){const t=i.basename(e).toLowerCase();return["bin","scripts"].includes(t)}),t.ignoreErrors);for await(const e of r)if(await n(e))return e.filename},t.getEnvironmentDirFromPath=function(e){const t=i.basename(i.dirname(e));return["bin","scripts"].map(e=>(0,p.normCasePath)(e)).includes((0,p.normCasePath)(t))?i.dirname(i.dirname(e)):i.dirname(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareSemVerLikeVersions=t.toSemverLikeVersion=t.areSimilarVersions=t.areIdenticalVersion=t.getShortVersionString=t.getVersionDisplayString=t.isVersionEmpty=t.getEmptyVersion=t.parseBasicVersion=t.parseRelease=t.parseVersion=t.getPythonVersionFromPath=void 0;const r=n(20),i=n(3),o=n(305),s=n(29),a=n(5);function c(e){const[t,n]=l(e);if(-1===t.micro)return t;const[r]=u(n);return t.release=r,t}function u(e){let t,n,r,i,o,a,c,u=e.match(/^(?:-?final|\.final(?:\.0)?)(.*)$/);if(u)[,t]=u,o="final",a="0";else for(const o of[/^(?:(a)|(b)|(rc))([1-9]\d*)(.*)$/,/^-(?:(?:(alpha)|(beta)|(candidate))([1-9]\d*))(.*)$/,/^\.(?:(?:(alpha)|(beta)|(candidate))\.([1-9]\d*))(.*)$/])if(u=e.match(o),u){[,n,r,i,a,t]=u;break}if(o)c=s.PythonReleaseLevel.Final;else if(i)c=s.PythonReleaseLevel.Candidate;else if(r)c=s.PythonReleaseLevel.Beta;else{if(!n)return[void 0,e];c=s.PythonReleaseLevel.Alpha}return[{level:c,serial:parseInt(a,10)},t]}function l(e){const t=o.parseBasicVersionInfo("ignored-"+e);if(!t){if(""===e)return[d(),""];throw Error("invalid version "+e)}const{version:n,after:r}=t;if(n.release=void 0,-1===n.minor&&n.major>9){const e=10**(n.major.toString().length-1);n.minor=n.major%e,n.major=Math.floor(n.major/e)}return[n,r]}function d(){return(0,r.cloneDeep)(o.EMPTY_VERSION)}function h(e){return o.isVersionInfoEmpty(e)}function p(e){let t=o.getVersionString(e);if(void 0===e.release)return t;if(e.release.level===s.PythonReleaseLevel.Final)return t;if(e.release.level===s.PythonReleaseLevel.Candidate)t=`${t}rc${e.release.serial}`;else if(e.release.level===s.PythonReleaseLevel.Beta)t=`${t}b${e.release.serial}`;else{if(e.release.level!==s.PythonReleaseLevel.Alpha)throw Error("unsupported release level "+e.release.level);t=`${t}a${e.release.serial}`}return t}function f(e,t){return void 0===e.release?void 0===t.release?[0,""]:[1,"level"]:void 0===t.release?[-1,"level"]:e.release.levelt.release.level?[-1,"level"]:e.release.level===s.PythonReleaseLevel.Final?[0,""]:e.release.serialt.release.serial?[-1,"serial"]:[0,""]}t.getPythonVersionFromPath=function(e){let t=s.UNKNOWN_PYTHON_VERSION;try{t=c(i.basename(e))}catch(t){(0,a.traceError)("Failed to parse version from path: "+e,t)}return t},t.parseVersion=c,t.parseRelease=u,t.parseBasicVersion=l,t.getEmptyVersion=d,t.isVersionEmpty=h,t.getVersionDisplayString=function(e){return h(e)?"":-1!==e.micro?p(e):p(e)+".x"},t.getShortVersionString=p,t.areIdenticalVersion=function(e,t){return o.areIdenticalVersion(e,t,f)},t.areSimilarVersions=function(e,t){return!!o.areSimilarVersions(e,t,f)&&(2===e.major||e.minor>-1&&t.minor>-1)},t.toSemverLikeVersion=function(e){const t=o.getVersionString(e);let n=[];return e.release&&(n=e.release.serial<0?[""+e.release.level]:[""+e.release.level,""+e.release.serial]),{raw:t,major:e.major,minor:e.minor,patch:e.micro,build:[],prerelease:n}},t.compareSemVerLikeVersions=function(e,t){return e.major===t.major?e.minor===t.minor?e.patch===t.patch?0:e.patch>t.patch?1:-1:e.minor>t.minor?1:-1:e.major>t.major?1:-1}},function(e,t,n){"use strict";function r(e){return"function"==typeof e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(78),i=new(n(77).a)(r.a)},function(e,t,n){"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";const r=n(49).fromPromise,{makeDir:i,makeDirSync:o}=n(361),s=r(i);e.exports={mkdirs:s,mkdirsSync:o,mkdirp:s,mkdirpSync:o,ensureDir:s,ensureDirSync:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemVariables=void 0;const r=n(3),i=n(2),o=n(433);t.SystemVariables=class extends class{resolve(e){return o.isString(e)?this.__resolveString(e):o.isArray(e)?this.__resolveArray(e):o.isObject(e)?this.__resolveLiteral(e):e}resolveAny(e){return o.isString(e)?this.__resolveString(e):o.isArray(e)?this.__resolveAnyArray(e):o.isObject(e)?this.__resolveAnyLiteral(e):e}__resolveString(e){return e.replace(/\$\{(.*?)\}/g,(e,t)=>{const n=this[t];return o.isString(n)?n:e&&(e.indexOf("env.")>0||e.indexOf("env:")>0)?"":e})}__resolveLiteral(e){const t=Object.create(null);return Object.keys(e).forEach(n=>{const r=e[n];t[n]=this.resolve(r)}),t}__resolveAnyLiteral(e){const t=Object.create(null);return Object.keys(e).forEach(n=>{const r=e[n];t[n]=this.resolveAny(r)}),t}__resolveArray(e){return e.map(e=>this.__resolveString(e))}__resolveAnyArray(e){return e.map(e=>this.resolveAny(e))}}{constructor(e,t,n,o){super();const s=n&&e?n.getWorkspaceFolder(e):void 0;this._workspaceFolder=s?s.uri.fsPath:t||__dirname,this._workspaceFolderName=r.basename(this._workspaceFolder),this._filePath=e?e.fsPath:void 0,o&&o.activeTextEditor&&(this._lineNumber=o.activeTextEditor.selection.anchor.line+1,this._selectedText=o.activeTextEditor.document.getText(new i.Range(o.activeTextEditor.selection.start,o.activeTextEditor.selection.end))),this._execPath=process.execPath,Object.keys(process.env).forEach(e=>{this["env:"+e]=this["env."+e]=process.env[e]})}get cwd(){return this.workspaceFolder}get workspaceRoot(){return this._workspaceFolder}get workspaceFolder(){return this._workspaceFolder}get workspaceRootFolderName(){return this._workspaceFolderName}get workspaceFolderBasename(){return this._workspaceFolderName}get file(){return this._filePath}get relativeFile(){return this.file?r.relative(this._workspaceFolder,this.file):void 0}get relativeFileDirname(){return this.relativeFile?r.dirname(this.relativeFile):void 0}get fileBasename(){return this.file?r.basename(this.file):void 0}get fileBasenameNoExtension(){return this.file?r.parse(this.file).name:void 0}get fileDirname(){return this.file?r.dirname(this.file):void 0}get fileExtname(){return this.file?r.extname(this.file):void 0}get lineNumber(){return this._lineNumber}get selectedText(){return this._selectedText}get execPath(){return this._execPath}}},function(e,t,n){"use strict";var r=n(157),i=n(257);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,a){var c=0,u=t;return c+=(u=u+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,a){return t+r+o+a>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,a,c,u){var l=0,d=t;return l+=(d=d+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,a,c,u){return t+r+o+a+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),i=n(138),o=n(143);function s(e,t){return t?Object(o.a)(e,t):new r.a(Object(i.a)(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(6),i=n(114),o=function(e){function t(n,r){void 0===r&&(r=i.a.now);var o=e.call(this,n,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.b(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.a)},function(e,t,n){"use strict";var r=n(6),i=function(e){function t(t,n){return e.call(this)||this}return r.b(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(18).a);n.d(t,"a",(function(){return o}));var o=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.b(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(i)},function(e,t){e.exports=require("assert")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=void 0;t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HiddenFilePrefix=t.EXTENSION_ROOT_DIR=void 0;const r=n(3),i=r.basename(__dirname);t.EXTENSION_ROOT_DIR="client"===i?r.join(__dirname,"..",".."):r.join(__dirname,"..","..","..",".."),t.HiddenFilePrefix="_HiddenFile_"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IInterpreterComparer=t.IInterpreterSelector=t.IPythonPathUpdaterServiceManager=t.IPythonPathUpdaterServiceFactory=void 0,t.IPythonPathUpdaterServiceFactory=Symbol("IPythonPathUpdaterServiceFactory"),t.IPythonPathUpdaterServiceManager=Symbol("IPythonPathUpdaterServiceManager"),t.IInterpreterSelector=Symbol("IInterpreterSelector"),t.IInterpreterComparer=Symbol("IInterpreterComparer")},function(e,t,n){"use strict";e.exports=n(278)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.comparePythonVersionSpecificity=t.areSameEnv=t.getEnvID=t.getEnvPath=t.setEnvDisplayString=t.copyEnvInfo=t.buildEnvInfo=void 0;const r=n(20),i=n(3),o=n(229),s=n(19),a=n(24),c=n(304),u=n(69),l=n(29);function d(e,t){void 0!==t.kind&&(e.kind=t.kind),void 0!==t.executable&&(e.executable.filename=t.executable),void 0!==t.location&&(e.location=t.location),void 0!==t.version&&(e.version=t.version),void 0!==t.searchLocation&&(e.searchLocation=t.searchLocation)}function h(e,t=!1){const n=t||e.searchLocation||l.globallyInstalledEnvKinds.includes(e.kind),r=!l.virtualEnvKinds.includes(e.kind),i=["Python"];if(e.version&&!(0,u.isVersionEmpty)(e.version)&&i.push((0,u.getVersionDisplayString)(e.version)),r){const t=(0,o.getArchitectureDisplayName)(e.arch);""!==t&&i.push(t)}const s=[];if(e.name&&""!==e.name&&s.push(`'${e.name}'`),n){const t=(0,c.getKindDisplayName)(e.kind);""!==t&&s.push(t)}const a=0===s.length?"":`(${s.join(": ")})`;return`${i.join(" ")} ${a}`.trim()}function p(e){if("string"==typeof e){if(""===e)return;return{executable:{filename:e,sysPrefix:"",ctime:-1,mtime:-1}}}return"executablePath"in e?{executable:{filename:e.executablePath,sysPrefix:"",ctime:-1,mtime:-1},location:e.envPath,kind:e.kind,source:e.source}:e}function f(e,t){let n={path:e,pathType:"interpreterPath"};return t&&!(0,a.isParentPath)(e,t)&&(n={path:t,pathType:"envFolderPath"}),n}function g(e,t){return(0,a.normCasePath)(f(e,t).path)}function m(e){var t,n;let r=0;return e.major>0&&(r+=20),e.minor>=0&&(r+=10),e.micro>=0&&(r+=5),(null===(t=e.release)||void 0===t?void 0:t.level)&&(r+=3),((null===(n=e.release)||void 0===n?void 0:n.serial)||e.sysVersion)&&(r+=1),r}t.buildEnvInfo=function(e){var t,n,r,i,o,a,c,u,h;const p={name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",location:"",kind:l.PythonEnvKind.Unknown,executable:{filename:"",sysPrefix:null!==(n=null==e?void 0:e.sysPrefix)&&void 0!==n?n:"",ctime:null!==(i=null===(r=null==e?void 0:e.fileInfo)||void 0===r?void 0:r.ctime)&&void 0!==i?i:-1,mtime:null!==(a=null===(o=null==e?void 0:e.fileInfo)||void 0===o?void 0:o.mtime)&&void 0!==a?a:-1},searchLocation:void 0,display:null==e?void 0:e.display,version:{major:-1,minor:-1,micro:-1,release:{level:l.PythonReleaseLevel.Final,serial:0}},arch:null!==(c=null==e?void 0:e.arch)&&void 0!==c?c:s.Architecture.Unknown,distro:{org:null!==(u=null==e?void 0:e.org)&&void 0!==u?u:""},source:null!==(h=null==e?void 0:e.source)&&void 0!==h?h:[]};return void 0!==e&&d(p,e),p.id=g(p.executable.filename,p.location),p},t.copyEnvInfo=function(e,t){const n=(0,r.cloneDeep)(e);return void 0!==t&&d(n,t),n},t.setEnvDisplayString=function(e){e.display=h(e),e.detailedDisplayName=h(e,!0)},t.getEnvPath=f,t.getEnvID=g,t.areSameEnv=function(e,t,n=!0){const r=p(e),o=p(t);if(void 0===r||void 0===o)return;const s=r.executable.filename,c=o.executable.filename;if(g(s,r.location)===g(c,o.location))return!0;if(n&&(0,a.arePathsSame)(i.dirname(s),i.dirname(c))){const n="string"==typeof e?void 0:r.version,i="string"==typeof t?void 0:o.version;if(n&&i&&((0,u.areIdenticalVersion)(n,i)||(0,u.areSimilarVersions)(n,i)))return!0}return!1},t.comparePythonVersionSpecificity=function(e,t){return Math.sign(m(e)-m(t))}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.Conda=t.CONDA_ACTIVATION_TIMEOUT=t.CONDA_RUN_VERSION=t.getPythonVersionFromConda=t.isCondaEnvironment=t.getCondaMetaPaths=t.parseCondaInfo=t.CONDAPATH_SETTING_KEY=t.AnacondaCompanyName=void 0;const i=n(52),o=n(3),s=n(97),a=n(19),c=n(24),u=n(29),l=n(69),d=n(181),h=n(30),p=n(53),f=n(10),g=n(5),m=n(56),v=n(99),y=n(307);function b(e){return[o.join(o.dirname(e),"conda-meta"),o.join(o.dirname(o.dirname(e)),"conda-meta"),o.join(e,"conda-meta")]}t.AnacondaCompanyName="Anaconda, Inc.",t.CONDAPATH_SETTING_KEY="condaPath",t.parseCondaInfo=async function(e,n,r,i){const o=Array.isArray(e.envs)?e.envs:[];e.default_prefix&&e.default_prefix.length>0&&o.push(e.default_prefix);const s=o.map(async e=>{const o=n(e);if(!await r(o))return;const s=await i(o);return s?{...s,path:o,companyDisplayName:t.AnacondaCompanyName,envType:h.EnvironmentType.Conda,envPath:e}:void 0});return Promise.all(s).then(e=>e.filter(e=>null!=e)).then(e=>e.map(e=>e))},t.getCondaMetaPaths=b,t.isCondaEnvironment=async function(e){const t=b(e);for(const e of t)if(await(0,c.pathExists)(e))return!0;return!1},t.getPythonVersionFromConda=async function(e){const t=b(e).map(e=>o.join(e,"history")),n=/\:python-(([\d\.a-z]?)+)/;for(const e of t)if(await(0,c.pathExists)(e))try{const t=(await(0,c.readFile)(e)).splitLines().map(e=>{const t=n.exec(e);return t?t[1]:""}).filter(e=>e.length>0);if(t.length>0){const e=t.length-1;return(0,l.parseVersion)(t[e].trim())}}catch(e){return u.UNKNOWN_PYTHON_VERSION}return u.UNKNOWN_PYTHON_VERSION},t.CONDA_RUN_VERSION="4.9.0",t.CONDA_ACTIVATION_TIMEOUT=45e3;class _{constructor(e,n){this.command=e,this.shellCommand=null!=n?n:e,(0,c.onDidChangePythonSetting)(t.CONDAPATH_SETTING_KEY,()=>{_.condaPromise=void 0})}static async getConda(){return(void 0===_.condaPromise||(0,f.isTestExecution)())&&(_.condaPromise=_.locate()),_.condaPromise}static async locate(){(0,g.traceVerbose)("Searching for conda.");const e=(0,a.getUserHomeDir)(),n=(0,c.getPythonSetting)(t.CONDAPATH_SETTING_KEY),r=(0,a.getOSType)()===a.OSType.Windows?"Scripts\\conda.exe":"bin/conda";async function s(e){const t=o.dirname(e),n=o.join(t,"..","condabin","conda.bat");if(await(0,c.pathExists)(n))return n}for await(const t of async function*(){n&&"conda"!==n&&(yield n),yield"conda",(0,a.getOSType)()===a.OSType.Windows&&(yield*async function*(){const e=(await(0,d.getRegistryInterpreters)()).filter(e=>e.interpreterPath&&"ContinuumAnalytics"===e.distroOrgName).map(e=>o.join(o.win32.dirname(e.interpreterPath),r));yield*e}()),yield*async function*(){const t=[];if((0,a.getOSType)()===a.OSType.Windows){const n=(0,a.getEnvironmentVariable)("PROGRAMDATA")||"C:\\ProgramData";if(t.push(n),e){const n=(0,a.getEnvironmentVariable)("LOCALAPPDATA")||o.join(e,"AppData","Local");t.push(e,o.join(n,"Continuum"))}}else t.push("/usr/share","/usr/local/share","/opt"),e&&t.push(e,o.join(e,"opt"));for(const e of t){let t;try{t=await i.readdir(e)}catch(e){t=void 0}void 0!==t&&(yield*t.filter(e=>e.toLowerCase().includes("conda")).map(t=>o.join(e,t,r)))}}(),yield*async function*(){if(!e)return;let t;try{t=await i.readFile(o.join(e,".conda","environments.txt"),"utf8")}catch(e){t=""}yield*t.split(/\r?\n/g).map(e=>e.trim()).filter(e=>""!==e&&!e.startsWith("#")).map(e=>o.join(e,r))}()}()){(0,g.traceVerbose)("Probing conda binary: "+t);let e=new _(t);try{if(await e.getInfo(),(0,a.getOSType)()===a.OSType.Windows&&((0,f.isTestExecution)()||t!==n)){const n=await s(t);try{if(n){const r=new _(n);await r.getInfo(),e=new _(t,n)}}catch(e){(0,g.traceVerbose)("Failed to spawn conda bat file",n,e)}}return(0,g.traceVerbose)("Found conda via filesystem probing: "+t),e}catch(e){(0,g.traceVerbose)("Failed to spawn conda binary",t,e)}}(0,g.traceVerbose)("Couldn't locate the conda binary.")}async getInfo(e){return e&&this.condaInfoCached||(this.condaInfoCached=this.getInfoImpl(this.command)),this.condaInfoCached}async getInfoImpl(e){const t=await(0,c.exec)(e,["info","--json"],{timeout:5e4});return(0,g.traceVerbose)("conda info --json: "+t.stdout),JSON.parse(t.stdout)}async getEnvList(e){const t=await this.getInfo(e),{envs:n}=t;if(void 0===n)return[];function r(e){if(t.root_prefix&&(0,c.arePathsSame)(e,t.root_prefix))return"base";const n=o.dirname(e);if(void 0!==t.envs_dirs)for(const r of t.envs_dirs)if((0,c.arePathsSame)(n,r))return o.basename(e)}return n.map(e=>({prefix:e,name:r(e)}))}async getCondaEnvironment(e){const t=await this.getEnvList(),n=t.find(t=>(0,c.arePathsSame)(e,t.prefix));return n||t.find(t=>(0,c.isParentPath)(e,t.prefix))}async getInterpreterPathForEnvironment(e){const t=await async function(e){const t=(0,a.getOSType)()===a.OSType.Windows?"python.exe":o.join("bin","python"),n=o.join(e,t);if(await(0,c.pathExists)(n))return n}(e.prefix);return t||this.getInterpreterPathUsingCondaRun(e)}async getInterpreterPathUsingCondaRun(e){const n=await this.getRunPythonArgs(e);if(n)try{const e=(0,v.buildPythonExecInfo)(n);return(0,y.getExecutablePath)(e,c.shellExecute,t.CONDA_ACTIVATION_TIMEOUT)}catch(t){(0,g.traceError)("Failed to process environment: "+JSON.stringify(e),t)}}async getRunPythonArgs(e,n){const r=await this.getCondaVersion();if(r&&(0,s.lt)(r,t.CONDA_RUN_VERSION))return;const i=[];return e.name?i.push("-n",e.name):i.push("-p",e.prefix),[n?this.shellCommand:this.command,"run",...i,"--no-capture-output","--live-stream","python",m.OUTPUT_MARKER_SCRIPT]}async getCondaVersion(){const e=await this.getInfo(!0).catch(()=>{});let t;if(e&&e.conda_version)t=e.conda_version;else{const e=await(0,c.exec)(this.command,["--version"],{timeout:5e4}).then(e=>e.stdout.trim()).catch(()=>{});t=e&&e.startsWith("conda ")?e.substring("conda ".length).trim():e}if(!t)return;const n=(0,s.parse)(t,!0);return n||((0,g.traceError)("Unable to parse version of Conda, "+t),new s.SemVer("0.0.1"))}async isCondaRunSupported(){const e=await this.getCondaVersion();return!e||!(0,s.lt)(e,t.CONDA_RUN_VERSION)}}r([(0,p.cache)(3e4,!0,1e4)],_.prototype,"getInfoImpl",null),r([(0,p.cache)(3e4,!0,1e4)],_.prototype,"getEnvList",null),r([(0,p.cache)(-1,!0)],_.prototype,"getInterpreterPathUsingCondaRun",null),r([(0,p.cache)(-1,!0)],_.prototype,"getCondaVersion",null),t.Conda=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITestRunner=t.IUnitTestSocketServer=t.ITestDebugLauncher=t.ITestConfigurationManagerFactory=t.ITestConfigSettingsService=t.ITestConfigurationService=t.ITestsHelper=t.TestFilter=void 0,function(e){e.removeTests="removeTests",e.discovery="discovery",e.runAll="runAll",e.runSpecific="runSpecific",e.debugAll="debugAll",e.debugSpecific="debugSpecific"}(t.TestFilter||(t.TestFilter={})),t.ITestsHelper=Symbol("ITestsHelper"),t.ITestConfigurationService=Symbol("ITestConfigurationService"),t.ITestConfigSettingsService=Symbol("ITestConfigSettingsService"),t.ITestConfigurationManagerFactory=Symbol("ITestConfigurationManagerFactory"),t.ITestDebugLauncher=Symbol("ITestDebugLauncher"),t.IUnitTestSocketServer=Symbol("IUnitTestSocketServer"),t.ITestRunner=Symbol("ITestRunner")},function(e,t,n){"use strict";function r(e){return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(138),i=n(135),o=n(136),s=n(195),a=n(139),c=n(140),u=n(103),l=n(45),d=n(47),h=function(e){if(e&&"function"==typeof e[d.a])return Object(s.a)(e);if(Object(a.a)(e))return Object(r.a)(e);if(Object(c.a)(e))return Object(i.a)(e);if(e&&"function"==typeof e[l.a])return Object(o.a)(e);var t=Object(u.a)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(23);function i(e){return!Object(r.a)(e)&&e-parseFloat(e)+1>=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagProperty=t.tagParameter=t.decorate=void 0;var r=n(50),i=n(33);function o(e,t,n,i,o){var s={},a="number"==typeof o,c=void 0!==o&&a?o.toString():n;if(a&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(s=Reflect.getMetadata(e,t));var u=s[c];if(Array.isArray(u))for(var l=0,d=u;l)?=?)";var P=s++;o[P]=o[c]+"|x|X|\\*";var w=s++;o[w]=o[a]+"|x|X|\\*";var T=s++;o[T]="[v=\\s]*("+o[w]+")(?:\\.("+o[w]+")(?:\\.("+o[w]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var C=s++;o[C]="[v=\\s]*("+o[P]+")(?:\\.("+o[P]+")(?:\\.("+o[P]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var I=s++;o[I]="^"+o[E]+"\\s*"+o[T]+"$";var R=s++;o[R]="^"+o[E]+"\\s*"+o[C]+"$";var O=s++;o[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=s++;o[D]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[D]+"\\s+",i[x]=new RegExp(o[x],"g");var k=s++;o[k]="^"+o[D]+o[T]+"$";var A=s++;o[A]="^"+o[D]+o[C]+"$";var N=s++;o[N]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[N]+"\\s+",i[j]=new RegExp(o[j],"g");var M=s++;o[M]="^"+o[N]+o[T]+"$";var L=s++;o[L]="^"+o[N]+o[C]+"$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var U=s++;o[U]="(\\s*)"+o[E]+"\\s*("+_+"|"+o[T]+")",i[U]=new RegExp(o[U],"g");var W=s++;o[W]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var B=s++;o[B]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var V=s++;o[V]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)n(H,o[H]),i[H]||(i[H]=new RegExp(o[H]));function $(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new G(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},t.compareIdentifiers=z;var K=/^[0-9]+$/;function z(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return Y(e,t,n)<0}function Q(e,t,n){return 0===Y(e,t,n)}function Z(e,t,n){return 0!==Y(e,t,n)}function ee(e,t,n){return Y(e,t,n)>=0}function te(e,t,n){return Y(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return Z(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return z(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=Y,t.compareLoose=function(e,t){return Y(e,t,!0)},t.rcompare=function(e,t,n){return Y(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=J,t.lt=X,t.eq=Q,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=re;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,h){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new G(e,r),t=new oe(t,r),n){case">":i=J,o=te,s=X,a=">",c=">=";break;case"<":i=X,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,r)?d=e:s(e.semver,h.semver,r)&&(h=e)})),d.operator===a||d.operator===c)return!1;if((!h.operator||h.operator===a)&&o(e,h.semver))return!1;if(h.operator===c&&s(e,h.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[F]:i[q],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new G(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[B]:i[W];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),n("comparator trim",e,i[U]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[j],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[q],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[L]:i[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[A]:i[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[R]:i[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!J(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return le(e,t,"<",n)},t.gtr=function(e,t,n){return le(e,t,">",n)},t.outside=le,t.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[O]);if(null==t)return null;return $(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDiagnosticsCommandFactory=void 0,t.IDiagnosticsCommandFactory=Symbol("IDiagnosticsCommandFactory")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyPythonExecInfo=t.buildPythonExecInfo=void 0,t.buildPythonExecInfo=function(e,t,n){if(Array.isArray(e)){const r=e.slice(1);return t&&r.push(...t),{args:r,command:e[0],python:[...e],pythonExecutable:null!=n?n:e[e.length-1]}}return{command:e,args:t||[],python:[e],pythonExecutable:e}},t.copyPythonExecInfo=function(e,t){const n={command:e.command,args:[...e.args],python:[...e.python],pythonExecutable:e.pythonExecutable};return t&&n.args.push(...t),void 0===n.pythonExecutable&&(n.pythonExecutable=n.python[n.python.length-1]),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLinter=t.parseLine=void 0;const r=n(3),i=n(4),o=n(10);n(12);const s=n(25),a=n(1),c=n(5),u=n(608),l=n(57),d=n(611);function h(e,t,n,r=0){const i=function(e,t){const n=d(t,"g").exec(e);if(null!==n)return n.groups()}(e,t);if(i)return i.line=Number(i.line),i.column=Number(i.column),{code:i.code,message:i.message,column:Number.isNaN(i.column)||i.column<=0?0:i.column-r,line:i.line,type:i.type,provider:n}}t.parseLine=h;t.BaseLinter=class{constructor(e,t,n=0){this.serviceContainer=t,this.columnOffset=n,this._info=t.get(l.ILinterManager).getLinterInfo(e),this.errorHandler=new u.ErrorHandler(this.info.product,t),this.configService=t.get(a.IConfigurationService),this.workspace=t.get(i.IWorkspaceService)}get pythonSettings(){return this._pythonSettings}get info(){return this._info}async lint(e,t){return this._pythonSettings=this.configService.getSettings(e.uri),this.runLinter(e,t)}getWorkspaceRootPath(e){const t=this.workspace.getWorkspaceFolder(e.uri),n=t&&"string"==typeof t.uri.fsPath?t.uri.fsPath:void 0;return"string"==typeof n?n:r.dirname(e.uri.fsPath)}getWorkingDirectoryPath(e){return this._pythonSettings.linting.cwd||this.getWorkspaceRootPath(e)}parseMessagesSeverity(e,t){const n=e;if(t[n]){const e=t[n];switch(e){case"Error":return l.LintMessageSeverity.Error;case"Hint":return l.LintMessageSeverity.Hint;case"Information":return l.LintMessageSeverity.Information;case"Warning":return l.LintMessageSeverity.Warning;default:if(l.LintMessageSeverity[e])return l.LintMessageSeverity[e]}}return l.LintMessageSeverity.Information}async run(e,t,n,r="(?\\d+),(?-?\\d+),(?\\w+),(?\\w+\\d+):(?.*)\\r?(\\n|$)"){if(!this.info.isEnabled(t.uri))return[];const i=this.info.getExecutionInfo(e,t.uri),o=this.getWorkingDirectoryPath(t),a=this.serviceContainer.get(s.IPythonToolExecutionService);try{const e=await a.execForLinter(i,{cwd:o,token:n,mergeStdOutErr:!1},t.uri);return this.displayLinterResultHeader(e.stdout),await this.parseMessages(e.stdout,t,n,r)}catch(e){return await this.handleError(e,t.uri,i),[]}}async parseMessages(e,t,n,r){const i=e.splitLines({removeEmptyEntries:!1,trim:!1});return this.parseLines(i,r)}async handleError(e,t,n){(0,o.isTestExecution)()?this.errorHandler.handleError(e,t,n).ignoreErrors():this.errorHandler.handleError(e,t,n).catch(e=>(0,c.traceError)("Error in errorHandler.handleError",e)).ignoreErrors()}parseLine(e,t){return h(e,t,this.info.id,this.columnOffset)}parseLines(e,t){const n=[];for(const r of e)try{const e=this.parseLine(r,t);if(e&&(n.push(e),n.length>=this.pythonSettings.linting.maxNumberOfProblems))break}catch(e){(0,c.traceError)(`Linter '${this.info.id}' failed to parse the line '${r}.`,e)}return n}displayLinterResultHeader(e){(0,c.traceLog)(`${"#".repeat(10)}Linting Output - ${this.info.id}${"#".repeat(10)}\n`),(0,c.traceLog)(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNITTEST_PROVIDER=t.PYTEST_PROVIDER=t.UNIT_TEST_PRODUCTS=void 0;const r=n(1);t.UNIT_TEST_PRODUCTS=[r.Product.pytest,r.Product.unittest],t.PYTEST_PROVIDER="pytest",t.UNITTEST_PROVIDER="unittest"},function(e,t,n){"use strict";function r(){}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";const r=n(49).fromPromise,i=n(164);e.exports={pathExists:r((function(e){return i.access(e).then(()=>!0).catch(()=>!1)})),pathExistsSync:i.existsSync}},function(e,t,n){e.exports=l,l.Minimatch=d;var r={sep:"/"};try{r=n(3)}catch(e){}var i=l.GLOBSTAR=d.GLOBSTAR={},o=n(381),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(),"/"!==r.sep&&(e=e.split(r.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 h(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,r,i){return l(n,e,t)}},l.defaults=function(e){if(!e||!Object.keys(e).length)return l;var t=l,n=function(n,r,i){return t.minimatch(n,r,u(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,u(e,r))},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,r=0;if(n.nonegate)return;for(var i=0,o=e.length;i65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",c=!!n.nocase,u=!1,l=[],d=[],h=!1,f=-1,g=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(r){switch(r){case"*":o+="[^/]*?",c=!0;break;case"?":o+="[^/]",c=!0;break;default:o+="\\"+r}v.debug("clearStateChar %j %j",r,o),r=!1}}for(var b,_=0,S=e.length;_-1;R--){var O=d[R],D=o.slice(0,O.reStart),x=o.slice(O.reStart,O.reEnd-8),k=o.slice(O.reEnd-8,O.reEnd),A=o.slice(O.reEnd);k+=A;var N=D.split("(").length-1,j=A;for(_=0;_=0&&!(i=e[o]);o--);for(o=0;o>> no match, partial?",e,h,t,p),h!==a))}if("string"==typeof l?(u=r.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){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;var r=0;t.id=function(){return r++}},function(e,t){e.exports=require("url")},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardEntrypoint=t.TensorBoardSessionStartResult=t.TensorBoardEntrypointTrigger=t.TensorBoardPromptSelection=void 0,function(e){e.Yes="yes",e.No="no",e.DoNotAskAgain="doNotAskAgain",e.None="none"}(t.TensorBoardPromptSelection||(t.TensorBoardPromptSelection={})),function(e){e.tfeventfiles="tfeventfiles",e.fileimport="fileimport",e.nbextension="nbextension",e.palette="palette"}(t.TensorBoardEntrypointTrigger||(t.TensorBoardEntrypointTrigger={})),function(e){e.cancel="canceled",e.success="success",e.error="error"}(t.TensorBoardSessionStartResult||(t.TensorBoardSessionStartResult={})),function(e){e.prompt="prompt",e.codelens="codelens",e.palette="palette"}(t.TensorBoardEntrypoint||(t.TensorBoardEntrypoint={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearAllChildren=t.checkForFailedTests=t.updateTestResultMap=t.getNodeByUri=t.getWorkspaceNode=t.getTestCaseNodes=t.getUri=t.updateTestItemFromRawData=t.getRunIdFromRawData=t.createWorkspaceRootTestItem=t.createErrorTestItem=t.removeItemByIdFromChildren=t.DebugTestTag=t.RunTestTag=void 0;const r=n(3),i=n(2),o=n(112),s=n(5),a=n(127);function c(e){const t=[];return e.forEach(e=>{t.push(e)}),t}function u(e,t,n){n.forEach(n=>{t.children.delete(n),e.delete(n)})}function l(e,t,n){const i=e.get(r.join(t,n.parentid));let o;return i&&(o="."===i.id?t:i.id),o}function d(e){try{const t=e.source.substr(e.source.indexOf(":")+1),n=Number.parseInt(t,10);return new i.Range(new i.Position(n-1,0),new i.Position(n,0))}catch(e){}}function h(e){const t=e.replace(/\.py[^\w\-]/g,"").replace(/[\\\:\/]/g,".").replace(/\:\:/g,".").replace(/\.\./g,".");return t.startsWith(".")?t.substr(1):t}function p(e,n,o,s){const c=r.join(o,s.relpath),u=i.Uri.file(c),d=l(n,o,s),h=r.basename(c),p=e.createTestItem(c,h,u);return p.canResolveChildren=!0,n.set(p.id,{id:p.id,rawId:s.id,runId:s.relpath,uri:u,kind:a.TestDataKinds.FolderOrFile,parentId:d}),p.tags=[t.RunTestTag,t.DebugTestTag],p}function f(e,n,o,s){const c=r.join(o,s.relpath),u=i.Uri.file(c),d=l(n,o,s);e.label=r.basename(c),e.canResolveChildren=!0,n.set(e.id,{id:e.id,rawId:s.id,runId:s.relpath,uri:u,kind:a.TestDataKinds.FolderOrFile,parentId:d}),e.tags=[t.RunTestTag,t.DebugTestTag]}function g(e,n,o,s){const c=r.join(o,s.id),u=r.join(o,s.id.substr(0,s.id.indexOf(":"))),d=i.Uri.file(u),p=s.name,f=l(n,o,s),g=h(s.id),m=e.createTestItem(c,p,d);return m.canResolveChildren=!0,n.set(m.id,{id:m.id,rawId:s.id,runId:g,uri:d,kind:a.TestDataKinds.Collection,parentId:f}),m.tags=[t.RunTestTag,t.DebugTestTag],m}function m(e,n,o,s){const c=r.join(o,s.id.substr(0,s.id.indexOf(":"))),u=i.Uri.file(c);e.label=s.name;const d=l(n,o,s),p=h(s.id);e.canResolveChildren=!0,n.set(e.id,{id:e.id,rawId:s.id,runId:p,uri:u,kind:a.TestDataKinds.Collection,parentId:d}),e.tags=[t.RunTestTag,t.DebugTestTag]}async function v(e,n,v,b,_,S){var E;if(null==S?void 0:S.isCancellationRequested)return;const P=null===(E=v.get(e.id))||void 0===E?void 0:E.rawId;if(!P)return void(0,s.traceError)("Unknown node id: "+e.id);const w=_.filter(e=>e.root===P||e.rootid===P||e.parents.find(e=>e.id===P)||e.tests.find(e=>e.id===P));if(0===w.length&&e.parent)return u(v,e.parent,[e.id]),void(0,s.traceVerbose)("Following test item was removed Reason: No-Raw-Data "+e.id);if(w.length>1)return void(0,s.traceError)(`Multiple (${w.length}) raw data nodes had the same id: ${P}`);if(P===w[0].root||P===w[0].rootid){await(0,o.asyncForEach)(c(e.children),async e=>{await y(e,n,v,b,w,S)});const t=w[0].parents.filter(e=>"."===e.parentid||e.parentid===P),r=[];return e.children.forEach(e=>{var t,n;return r.push(null!==(n=null===(t=v.get(e.id))||void 0===t?void 0:t.rawId)&&void 0!==n?n:"")}),void await(0,o.asyncForEach)(t.filter(e=>!r.includes(e.id)),async t=>{const r=(t.kind,p(n,v,b,t));e.children.add(r),await y(r,n,v,b,w,S)})}const T=w[0].parents.filter(e=>e.id===P);if(1===T.length){switch(T[0].kind){case"file":case"folder":f(e,v,b,T[0]);break;case"suite":case"function":m(e,v,b,T[0])}await(0,o.asyncForEach)(c(e.children),async e=>{await y(e,n,v,b,w,S)});const s=[];e.children.forEach(e=>{var t,n;return s.push(null!==(n=null===(t=v.get(e.id))||void 0===t?void 0:t.rawId)&&void 0!==n?n:"")});const u=w[0].parents.filter(e=>e.parentid===P);await(0,o.asyncForEach)(u.filter(e=>!s.includes(e.id)),async t=>{let r;switch(t.kind){case"file":case"folder":r=p(n,v,b,t);break;case"suite":case"function":r=g(n,v,b,t)}r&&(e.children.add(r),await y(r,n,v,b,w,S))});return void w[0].tests.filter(e=>e.parentid===P).filter(e=>!s.includes(e.id)).forEach(o=>{const s=function(e,n,o,s){const c=r.join(o,s.id),u=r.join(o,s.source.substr(0,s.source.indexOf(":"))),p=i.Uri.file(u),f=s.name,g=l(n,o,s),m=h(s.id),v=e.createTestItem(c,f,p);return v.canResolveChildren=!1,v.range=d(s),n.set(v.id,{id:v.id,rawId:s.id,runId:m,uri:p,kind:a.TestDataKinds.Case,parentId:g}),v.tags=[t.RunTestTag,t.DebugTestTag],v}(n,v,b,o);e.children.add(s)})}if(T.length>1)return void(0,s.traceError)(`Multiple (${T.length}) raw data nodes had the same id: ${P}`);const C=w[0].tests.filter(e=>e.id===P);1!==C.length?C.length>1&&(0,s.traceError)(`Multiple (${C.length}) raw data nodes had the same id: ${P}`):function(e,n,o,s){const c=r.join(o,s.source.substr(0,s.source.indexOf(":"))),u=i.Uri.file(c);e.label=s.name;const p=l(n,o,s),f=h(s.id);e.canResolveChildren=!1,e.range=d(s),n.set(e.id,{id:e.id,rawId:s.id,runId:f,uri:u,kind:a.TestDataKinds.Case,parentId:p}),e.tags=[t.RunTestTag,t.DebugTestTag]}(e,v,b,C[0])}async function y(e,t,n,r,i,o){e.busy=!0,await v(e,t,n,r,i,o),e.busy=!1}t.RunTestTag={id:"python-run"},t.DebugTestTag={id:"python-debug"},t.removeItemByIdFromChildren=u,t.createErrorTestItem=function(e,n){const r=e.createTestItem(n.id,n.label);return r.canResolveChildren=!1,r.error=n.error,r.tags=[t.RunTestTag,t.DebugTestTag],r},t.createWorkspaceRootTestItem=function(e,n,r){var i;const o=e.createTestItem(r.id,r.label,r.uri);return o.canResolveChildren=!0,n.set(r.id,{...r,rawId:null!==(i=r.rawId)&&void 0!==i?i:r.id,kind:a.TestDataKinds.Workspace}),o.tags=[t.RunTestTag,t.DebugTestTag],o},t.getRunIdFromRawData=h,t.updateTestItemFromRawData=y,t.getUri=function e(t){return!t.uri&&t.parent?e(t.parent):t.uri},t.getTestCaseNodes=function e(t,n=[]){return!t.canResolveChildren&&t.tags.length>0&&n.push(t),t.children.forEach(r=>{t.canResolveChildren?e(r,n):n.push(t)}),n},t.getWorkspaceNode=function e(t,n){const r=n.get(t.id);if(r){if(r.kind===a.TestDataKinds.Workspace)return t;if(t.parent)return e(t.parent,n)}},t.getNodeByUri=function e(t,n){var r,i;if((null===(r=t.uri)||void 0===r?void 0:r.fsPath)===n.fsPath)return t;const o=[];t.children.forEach(e=>o.push(e));for(const e of o)if((null===(i=e.uri)||void 0===i?void 0:i.fsPath)===n.fsPath)return e;for(const t of o){const r=e(t,n);if(r)return r}},t.updateTestResultMap=function(e,t){new Array(...t).sort((e,t)=>e.completedAt-t.completedAt).forEach(t=>{t.results.forEach(t=>function e(t,n){for(const e of n.taskStates)t.set(n.id,e.state);n.children.forEach(n=>e(t,n))}(e,t))})},t.checkForFailedTests=function(e){return void 0!==Array.from(e.values()).find(e=>e===i.TestResultState.Failed||e===i.TestResultState.Errored)},t.clearAllChildren=function(e){const t=[];e.children.forEach(e=>t.push(e.id)),t.forEach(e.children.delete)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncForEach=t.asyncFilter=void 0,t.asyncFilter=async function(e,t){const n=await Promise.all(e.map(t));return e.filter((e,t)=>n[t])},t.asyncForEach=async function(e,t){await Promise.all(e.map(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposables=void 0;const r=n(5);t.Disposables=class{constructor(...e){this.disposables=[],this.disposables.push(...e)}push(...e){this.disposables.push(...e)}async dispose(){const{disposables:e}=this;this.disposables=[],await async function(e){await Promise.all(e.map(async(e,t)=>{try{await e.dispose()}catch(e){(0,r.traceWarn)(`dispose() #${t} failed (${e})`)}}))}(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r,i=n(44),o=n(137),s=n(194);r||(r={});var a=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("https")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoSelectionRule=t.IInterpreterAutoSelectionService=t.IInterpreterAutoSelectionProxyService=void 0,t.IInterpreterAutoSelectionProxyService=Symbol("IInterpreterAutoSelectionProxyService"),t.IInterpreterAutoSelectionService=Symbol("IInterpreterAutoSelectionService"),function(e){e.all="all",e.currentPath="currentPath",e.workspaceVirtualEnvs="workspaceEnvs",e.settings="settings",e.cachedInterpreters="cachedInterpreters",e.systemWide="system",e.windowsRegistry="windowsRegistry"}(t.AutoSelectionRule||(t.AutoSelectionRule={}))},function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(174),i=n(175),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const u=(e,t,n)=>{const r=c++;i(r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),u("XRANGEIDENTIFIER",s[a.NUMERICIDENTIFIER]+"|x|X|\\*"),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,n){const{MAX_LENGTH:r}=n(174),{re:i,t:o}=n(121),s=n(43),a=n(176);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPipenvEnvironmentRelatedToFolder=t.isPipenvEnvironment=t._getAssociatedPipfile=void 0;const r=n(3),i=n(19),o=n(5),s=n(24);async function a(e,t){const n=(0,i.getEnvironmentVariable)("PIPENV_PIPFILE")||"Pipfile";let a=t.lookIntoParentDirectories?function(){const e=(0,i.getEnvironmentVariable)("PIPENV_MAX_DEPTH");if(void 0===e)return 3;const t=parseInt(e,10);return isNaN(t)?((0,o.traceError)(`PIPENV_MAX_DEPTH is incorrectly set. Converting value '${e}' to number results in NaN`),1):t}():1;for(;a>0&&!(0,s.arePathsSame)(e,r.dirname(e));){const t=r.join(e,n);if(await(0,s.pathExists)(t))return t;e=r.dirname(e),a-=1}}async function c(e){const t=r.dirname(r.dirname(e)),n=await async function(e){const t=r.join(e,".project");if(!await(0,s.pathExists)(t))return;const n=(await(0,s.readFile)(t)).trim();if(await(0,s.pathExists)(n))return n;(0,o.traceError)(`The .project file inside environment folder: ${e} doesn't contain a valid path to the project`)}(t);if(void 0===n)return;return r.basename((0,s.normCasePath)(t)).startsWith(r.basename((0,s.normCasePath)(n))+"-")?a(n,{lookIntoParentDirectories:!1}):void 0}t._getAssociatedPipfile=a,t.isPipenvEnvironment=async function(e){return!!await async function(e){const t=r.dirname(r.dirname(e));if(".venv"!==r.basename(t))return;return a(r.dirname(t),{lookIntoParentDirectories:!1})}(e)||!!await c(e)},t.isPipenvEnvironmentRelatedToFolder=async function(e,t){const n=await c(e);if(!n)return!1;const r=void 0===(0,i.getEnvironmentVariable)("PIPENV_NO_INHERIT"),o=await a(t,{lookIntoParentDirectories:r});return!!o&&(0,s.arePathsSame)(n,o)}},function(e,t,n){var r=n(32),i=n(3),o=n(93).spawn,s=["HKLM","HKCU","HKCR","HKU","HKCC"],a=["REG_SZ","REG_MULTI_SZ","REG_EXPAND_SZ","REG_DWORD","REG_QWORD","REG_BINARY","REG_NONE"],c=/(\\[a-zA-Z0-9_\s]+)*/,u=/^(HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(.*)$/,l=/^(.*)\s(REG_SZ|REG_MULTI_SZ|REG_EXPAND_SZ|REG_DWORD|REG_QWORD|REG_BINARY|REG_NONE)\s+([^\s].*)$/;function d(e,t){if(!(this instanceof d))return new d(e,t);Error.captureStackTrace(this,d),this.__defineGetter__("name",(function(){return d.name})),this.__defineGetter__("message",(function(){return e})),this.__defineGetter__("code",(function(){return t}))}function h(e){var t={stdout:"",stderr:""};return e.stdout.on("data",(function(e){t.stdout+=e.toString()})),e.stderr.on("data",(function(e){t.stderr+=e.toString()})),t}function p(e,t,n){var i=n.stdout.trim(),o=n.stderr.trim();return new d(r.format("%s command exited with code %d:\n%s\n%s",e,t,i,o),t)}function f(e,t){t&&e.push("/reg:"+function(e){if("x64"==e)return"64";if("x86"==e)return"32";throw new Error("illegal architecture: "+e+" (use x86 or x64)")}(t))}function g(){return"win32"===process.platform?i.join(process.env.windir,"system32","reg.exe"):"REG"}function m(e,t,n,r,i,o,s){if(!(this instanceof m))return new m(e,t,n,r,i,o,s);var a=e,c=t,u=n,l=r,d=i,h=o,p=s;this.__defineGetter__("host",(function(){return a})),this.__defineGetter__("hive",(function(){return c})),this.__defineGetter__("key",(function(){return u})),this.__defineGetter__("name",(function(){return l})),this.__defineGetter__("type",(function(){return d})),this.__defineGetter__("value",(function(){return h})),this.__defineGetter__("arch",(function(){return p}))}function v(e){if(!(this instanceof v))return new v(e);var t=e||{},n=""+(t.host||""),r=""+(t.hive||"HKLM"),i=""+(t.key||""),o=t.arch||null;if(this.__defineGetter__("host",(function(){return n})),this.__defineGetter__("hive",(function(){return r})),this.__defineGetter__("key",(function(){return i})),this.__defineGetter__("path",(function(){return(0==n.length?"":"\\\\"+n+"\\")+r+i})),this.__defineGetter__("arch",(function(){return o})),this.__defineGetter__("parent",(function(){var e=i.lastIndexOf("\\");return new v({host:this.host,hive:this.hive,key:-1==e?"":i.substring(0,e),arch:this.arch})})),-1==s.indexOf(r))throw new Error("illegal hive specified.");if(!c.test(i))throw new Error("illegal key specified.");if(o&&"x64"!=o&&"x86"!=o)throw new Error("illegal architecture specified (use x86 or x64)")}r.inherits(d,Error),r.inherits(m,Object),v.HKLM="HKLM",v.HKCU="HKCU",v.HKCR="HKCR",v.HKU="HKU",v.HKCC="HKCC",v.HIVES=s,v.REG_SZ="REG_SZ",v.REG_MULTI_SZ="REG_MULTI_SZ",v.REG_EXPAND_SZ="REG_EXPAND_SZ",v.REG_DWORD="REG_DWORD",v.REG_QWORD="REG_QWORD",v.REG_BINARY="REG_BINARY",v.REG_NONE="REG_NONE",v.REG_TYPES=a,v.DEFAULT_VALUE="",v.prototype.values=function(e){if("function"!=typeof e)throw new TypeError("must specify a callback");var t=["QUERY",this.path];f(t,this.arch);var n=o(g(),t,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),r="",i=this,s=null,a=h(n);return n.on("close",(function(t){if(!s)if(0!==t)e(p("QUERY",t,a),null);else{for(var n=[],o=[],c=r.split("\n"),u=0,d=0,h=c.length;d0&&(0!=u&&n.push(f),++u)}for(d=0,h=n.length;d0&&t.push(c)}for(s=0,a=t.length;s0&&(0!=u&&n.push(f),++u)}var g,v,y,b=n[n.length-1]||"",_=l.exec(b);_&&(g=_[1].trim(),v=_[2].trim(),y=_[3],r=new m(s.host,s.hive,s.key,g,v,y,s.arch)),t(null,r)}})),r.stdout.on("data",(function(e){i+=e.toString()})),r.on("error",(function(e){a=e,t(e)})),this},v.prototype.set=function(e,t,n,r){if("function"!=typeof r)throw new TypeError("must specify a callback");if(-1==a.indexOf(t))throw Error("illegal type specified.");var i=["ADD",this.path];""==e?i.push("/ve"):i=i.concat(["/v",e]),f(i=i.concat(["/t",t,"/d",n,"/f"]),this.arch);var s=o(g(),i,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),c=null,u=h(s);return s.on("close",(function(e){c||r(0!==e?p("ADD",e,u):null)})),s.stdout.on("data",(function(e){})),s.on("error",(function(e){c=e,r(e)})),this},v.prototype.remove=function(e,t){if("function"!=typeof t)throw new TypeError("must specify a callback");var n=e?["DELETE",this.path,"/f","/v",e]:["DELETE",this.path,"/f","/ve"];f(n,this.arch);var r=o(g(),n,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),i=null,s=h(r);return r.on("close",(function(e){i||(0!==e?t(p("DELETE",e,s),null):t(null))})),r.stdout.on("data",(function(e){})),r.on("error",(function(e){i=e,t(e)})),this},v.prototype.clear=function(e){if("function"!=typeof e)throw new TypeError("must specify a callback");var t=["DELETE",this.path,"/f","/va"];f(t,this.arch);var n=o(g(),t,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),r=null,i=h(n);return n.on("close",(function(t){r||(0!==t?e(p("DELETE",t,i),null):e(null))})),n.stdout.on("data",(function(e){})),n.on("error",(function(t){r=t,e(t)})),this},v.prototype.erase=v.prototype.clear,v.prototype.destroy=function(e){if("function"!=typeof e)throw new TypeError("must specify a callback");var t=["DELETE",this.path,"/f"];f(t,this.arch);var n=o(g(),t,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),r=null,i=h(n);return n.on("close",(function(t){r||(0!==t?e(p("DELETE",t,i),null):e(null))})),n.stdout.on("data",(function(e){})),n.on("error",(function(t){r=t,e(t)})),this},v.prototype.create=function(e){if("function"!=typeof e)throw new TypeError("must specify a callback");var t=["ADD",this.path,"/f"];f(t,this.arch);var n=o(g(),t,{cwd:void 0,env:process.env,stdio:["ignore","pipe","pipe"]}),r=null,i=h(n);return n.on("close",(function(t){r||(0!==t?e(p("ADD",t,i),null):e(null))})),n.stdout.on("data",(function(e){})),n.on("error",(function(t){r=t,e(t)})),this},v.prototype.keyExists=function(e){return this.values((function(t,n){if(t)return 1==t.code?e(null,!1):e(t);e(null,!0)})),this},v.prototype.valueExists=function(e,t){return this.get(e,(function(e,n){if(e)return 1==e.code?t(null,!1):t(e);t(null,!0)})),this},e.exports=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPythonVersionFromPyvenvCfg=t.isVirtualenvwrapperEnvironment=t.isVirtualenvEnvironment=t.isVenvEnvironment=void 0;const r=n(52),i=n(3);n(12);const o=n(19),s=n(29),a=n(84),c=n(69),u=n(24);function l(e){return[i.join(i.dirname(i.dirname(e)),"pyvenv.cfg"),i.join(i.dirname(e),"pyvenv.cfg")]}async function d(e){const t=i.dirname(e),n=await r.readdir(t),o=/^activate(\.([A-z]|\d)+)?$/i;return void 0!==n.find(e=>o.test(e))}function h(){const e=(0,o.getEnvironmentVariable)("WORKON_HOME");return e?Promise.resolve(e):async function(){const e=(0,o.getUserHomeDir)()||"";if((0,o.getOSType)()===o.OSType.Windows){const t=i.join(e,"Envs");if(await(0,u.pathExists)(t))return t}return i.join(e,".virtualenvs")}()}function p(e){let t,n;try{[t,n]=(0,c.parseBasicVersion)(e)}catch(e){return s.UNKNOWN_PYTHON_VERSION}return-1!==t.micro&&n.startsWith(".")&&([t.release]=(0,c.parseRelease)(n)),t}t.isVenvEnvironment=async function(e){const t=l(e);for(const e of t)if(await(0,u.pathExists)(e))return!0;return!1},t.isVirtualenvEnvironment=d,t.isVirtualenvwrapperEnvironment=async function(e){const t=await h();return await(0,u.pathExists)(t)&&(0,u.isParentPath)(e,t)&&d(e)},t.getPythonVersionFromPyvenvCfg=async function(e){const t=l(e);let n=s.UNKNOWN_PYTHON_VERSION;for(const e of t)if(await(0,u.pathExists)(e))try{const t=(await(0,u.readFile)(e)).splitLines().map(e=>{const t=e.split("=");if(2===t.length){const e=t[0].toLowerCase().trim(),n=t[1].trim();if("version"===e)try{return(0,c.parseVersion)(n)}catch(e){return}else if("version_info"===e)try{return p(n)}catch(e){return}}}).filter(e=>void 0!==e).map(e=>e);if(t.length>0)for(const e of t)(0,a.comparePythonVersionSpecificity)(e,n)>0&&(n=e)}catch(e){return s.UNKNOWN_PYTHON_VERSION}return n}},function(e,t){e.exports=require("./node_modules/diff-match-patch")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITestsRunner=t.ITestFrameworkController=t.ITestController=t.ITestDiscoveryHelper=t.TestDataKinds=void 0,function(e){e[e.Workspace=0]="Workspace",e[e.FolderOrFile=1]="FolderOrFile",e[e.Collection=2]="Collection",e[e.Case=3]="Case"}(t.TestDataKinds||(t.TestDataKinds={})),t.ITestDiscoveryHelper=Symbol("ITestDiscoveryHelper"),t.ITestController=Symbol("ITestController"),t.ITestFrameworkController=Symbol("ITestFrameworkController"),t.ITestsRunner=Symbol("ITestsRunner")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePyenvVersion=t.isPyenvEnvironment=t.isPyenvShimDir=t.getPyenvVersionsDir=t.getPyenvDir=void 0;const r=n(3),i=n(19),o=n(24);function s(){var e;let t=null!==(e=(0,i.getEnvironmentVariable)("PYENV_ROOT"))&&void 0!==e?e:(0,i.getEnvironmentVariable)("PYENV");if(!t){const e=(0,i.getUserHomeDir)()||"";t=(0,i.getOSType)()===i.OSType.Windows?r.join(e,".pyenv","pyenv-win"):r.join(e,".pyenv")}return t}t.getPyenvDir=s,t.getPyenvVersionsDir=function(){return r.join(s(),"versions")},t.isPyenvShimDir=function(e){const t=r.join(s(),"shims");return(0,o.arePathsSame)(t,e)||(0,o.arePathsSame)(`${t}${r.sep}`,e)},t.isPyenvEnvironment=async function(e){const t=e,n=s();return!!await(0,o.pathExists)(n)&&(0,o.isParentPath)(t,n)},t.parsePyenvVersion=function(e){const t=function(){function e(e){return{pythonVer:e,distro:void 0,distroVer:void 0}}function t(e){const t=e.split("-");return 3===t.length?{pythonVer:void 0,distroVer:`${t[1]}-${t[2]}`,distro:t[0]}:2===t.length?{pythonVer:void 0,distroVer:t[1],distro:t[0]}:{pythonVer:void 0,distroVer:void 0,distro:e}}const n=new Map;return n.set("activepython",t),n.set("anaconda",t),n.set("graalpython",t),n.set("ironpython",t),n.set("jython",t),n.set("micropython",t),n.set("miniconda",t),n.set("miniforge",t),n.set("pypy",(function(e){const t=e.split("-"),n=t[0].search(/[0-9\.]+/)>0?t[0].substr("pypy".length):void 0;if(2===t.length)return{pythonVer:n,distroVer:t[1],distro:"pypy"};if(3===t.length&&(t[2].startsWith("src")||t[2].startsWith("beta")||t[2].startsWith("alpha")||t[2].startsWith("win64"))){return{pythonVer:n,distroVer:`${t[1].startsWith("v")?t[1].substr(1):t[1]}-${t[2]}`,distro:"pypy"}}return 3===t.length&&"stm"===t[1]?{pythonVer:n,distroVer:t[2],distro:`${t[0]}-${t[1]}`}:4===t.length&&"c"===t[1]?{pythonVer:n,distroVer:t[3],distro:`pypy-${t[1]}-${t[2]}`}:4===t.length&&t[3].startsWith("src")?{pythonVer:n,distroVer:`${t[1]}-${t[2]}-${t[3]}`,distro:"pypy"}:{pythonVer:n,distroVer:void 0,distro:"pypy"}})),n.set("pyston",t),n.set("stackless",t),n.set("3",e),n.set("2",e),n}(),n=Array.from(t.keys()).filter(t=>e.startsWith(t)).map(e=>t.get(e)).filter(e=>void 0!==e);if(n.length>0&&n[0])return n[0](e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FSWatchingLocator=t.FSWatcherKind=void 0;const r=n(26),i=n(3),o=n(2),s=n(243),a=n(16),c=n(5),u=n(68),l=n(331),d=n(332);var h;!function(e){e[e.Global=0]="Global",e[e.Workspace=1]="Workspace"}(h=t.FSWatcherKind||(t.FSWatcherKind={}));class p extends d.LazyResourceBasedLocator{constructor(e,t,n={},r=h.Global){super(),this.getRoots=e,this.getKind=t,this.opts=n,this.watcherKind=r}async initWatchers(){if(this.watcherKind===h.Global)return;(0,c.traceVerbose)("Getting roots");let e=await this.getRoots();(0,c.traceVerbose)("Found roots"),"string"==typeof e&&(e=[e]);const t=e.map(async e=>{const t=await function(e){let t;try{t=r.readdirSync(e)}catch(e){const t=e;if((0,c.traceError)("Reading directory to watch failed",t),"ENOENT"===t.code)return"directory does not exist";throw e}if(t.length>200)return"too many files"}(e);if(!t)return e;(0,c.traceError)(`Dir "${e}" is not watchable (${t})`)});(await Promise.all(t)).filter(e=>!!e).forEach(e=>this.startWatchers(e))}startWatchers(e){const t=async(e,t)=>{var n;e===s.FileChangeType.Created&&void 0!==this.opts.delayOnCreated&&await(0,a.sleep)(this.opts.delayOnCreated);const r=await this.getKind(t).catch(()=>{}),l=o.Uri.file(null!==(n=this.opts.searchLocation)&&void 0!==n?n:i.dirname((0,u.getEnvironmentDirFromPath)(t)));(0,c.traceVerbose)("Fired event ",JSON.stringify({type:e,kind:r,searchLocation:l}),"from locator"),this.emitter.fire({type:e,kind:r,searchLocation:l})},n=(0,l.resolvePythonExeGlobs)(this.opts.baseGlob,this.opts.envStructure);(0,c.traceVerbose)("Start watching root",e,"for globs",JSON.stringify(n));const r=n.map(n=>(0,l.watchLocationForPythonBinaries)(e,t,n));this.disposables.push(...r)}}t.FSWatchingLocator=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceService=void 0;const i=n(0),o=n(3),s=n(2),a=n(19);let c=class{get onDidChangeConfiguration(){return s.workspace.onDidChangeConfiguration}get rootPath(){return Array.isArray(s.workspace.workspaceFolders)&&s.workspace.workspaceFolders.length>0?s.workspace.workspaceFolders[0].uri.fsPath:void 0}get workspaceFolders(){return s.workspace.workspaceFolders}get onDidChangeWorkspaceFolders(){return s.workspace.onDidChangeWorkspaceFolders}get hasWorkspaceFolders(){return Array.isArray(s.workspace.workspaceFolders)&&s.workspace.workspaceFolders.length>0}get workspaceFile(){return s.workspace.workspaceFile}getConfiguration(e,t){return s.workspace.getConfiguration(e,t||null)}getWorkspaceFolder(e){return e?s.workspace.getWorkspaceFolder(e):void 0}asRelativePath(e,t){return s.workspace.asRelativePath(e,t)}createFileSystemWatcher(e,t,n,r){return s.workspace.createFileSystemWatcher(e,t,n,r)}findFiles(e,t,n,r){const i=void 0===t?this.searchExcludes:t;return s.workspace.findFiles(e,i,n,r)}getWorkspaceFolderIdentifier(e,t=""){const n=e?s.workspace.getWorkspaceFolder(e):void 0;return n?o.normalize((0,a.getOSType)()===a.OSType.Windows?n.uri.fsPath.toUpperCase():n.uri.fsPath):t}get isVirtualWorkspace(){return!!(s.workspace.workspaceFolders&&s.workspace.workspaceFolders.every(e=>"file"!==e.uri.scheme))}get isTrusted(){return s.workspace.isTrusted}get onDidGrantWorkspaceTrust(){return s.workspace.onDidGrantWorkspaceTrust}openTextDocument(e){return s.workspace.openTextDocument(e)}get searchExcludes(){const e=this.getConfiguration("search.exclude");return`{${Object.keys(e).filter(t=>!0===e.get(t)).join(",")}}`}};c=r([(0,i.injectable)()],c),t.WorkspaceService=c},function(e,t,n){"use strict";var r,i=n(162),o=i.Buffer,s={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=i[r]);var a=s.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(a[r]=o[r]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),a.alloc||(a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(102);function i(){for(var e=[],t=0;t0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=i.a.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(i.a.clearImmediate(n),t.scheduled=void 0)},t}(n(78).a),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.b(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++rthis._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new f(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new d.a;if(this.isStopped||this.hasError?t=s.a.EMPTY:(this.observers.push(e),t=new h.a(this,e)),i&&e.add(e=new u(e,i)),n)for(var a=0;at&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(i.b),f=function(){return function(e,t){this.time=e,this.value=t}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(36),i=n(72),o={closed:!0,next:function(e){},error:function(e){if(r.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.circularDependencyToException=t.listMetadataForTarget=t.listRegisteredBindingsForServiceIdentifier=t.getServiceIdentifierAsString=t.getFunctionName=void 0;var r=n(50);function i(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function o(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}t.getServiceIdentifierAsString=i,t.listRegisteredBindingsForServiceIdentifier=function(e,t,n){var r="",i=n(e,t);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(e){var t="Object";null!==e.implementationType&&(t=o(e.implementationType)),r=r+"\n "+t,e.constraint.metaData&&(r=r+" - "+e.constraint.metaData)}))),r},t.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(function e(t,n){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===n||e(t.parentRequest,n))}(t,t.serviceIdentifier)){var n=function(e){return function e(t,n){void 0===n&&(n=[]);var r=i(t.serviceIdentifier);return n.push(r),null!==t.parentRequest?e(t.parentRequest,n):n}(e).reverse().join(" --\x3e ")}(t);throw new Error(r.CIRCULAR_DEPENDENCY+" "+n)}e(t)}))},t.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(e){n+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+n}return" "+e},t.getFunctionName=o},function(e,t){e.exports=require("net")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidAndExecutable=t.getSearchPathEntries=t.getSearchPathEnvVarNames=void 0;const r=n(26),i=n(3),o=n(19);function s(e=(0,o.getOSType)()){return e===o.OSType.Windows?["Path","PATH"]:["PATH"]}t.getSearchPathEnvVarNames=s,t.getSearchPathEntries=function(){const e=s();for(const t of e){const e=(0,o.getEnvironmentVariable)(t);if(void 0!==e)return e.split(i.delimiter).map(e=>e.trim()).filter(e=>e.length>0)}return[]},t.isValidAndExecutable=async function(e){try{await r.promises.access(e,r.constants.X_OK)}catch(e){return!1}if((0,o.getOSType)()!==o.OSType.Windows)return!0}},function(e,t,n){"use strict";const r=n(37).homedir();e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string, got "+typeof e);return r?e.replace(/^~(?=$|\/|\\)/,r):e}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(478);o.default.install();const s=n(284),a=n(3),c=n(37),u=n(104),l=n(148);i(n(284),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),s.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=d;class h extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),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.IPCMessageWriter=h;class p extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=p;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const v=process.env.XDG_RUNTIME_DIR,y=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=u.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=v?a.join(v,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=y.get(process.platform);return void 0!==n&&t.length>=n&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((i,o)=>{let s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),i({onConnected:()=>r})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=l.createConnection(e);return[new p(n,t),new f(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((i,o)=>{const s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>r})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=l.createConnection(e,"127.0.0.1");return[new p(n,t),new f(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=s.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),s.createMessageConnection(i,o,n,r)}},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(96);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{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 r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),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";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.translateProductToModule=t.ModuleInstaller=void 0;const i=n(0),o=n(3),s=n(2),a=n(11),c=n(5),u=n(30),l=n(8),d=n(9),h=n(4),p=n(226),f=n(10),g=n(13),m=n(155),v=n(25),y=n(28),b=n(1),_=n(14),S=n(22),E=n(180);let P=class{constructor(e){this.serviceContainer=e}async installModule(e,t,n,r,i){const c=!(null==i?void 0:i.installAsProcess),f="string"==typeof e?e:w(e),v="string"==typeof e?f:E.ProductNames.get(e);(0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:this.displayName,productName:v});const y=(0,S.isResource)(t)?t:void 0,P=await this.getExecutionInfo(f,t,r),T=async e=>{var n;const r=await this.processInstallArgs(P.args,t);if(P.moduleName){const i=this.serviceContainer.get(b.IConfigurationService).getSettings(y),s=this.serviceContainer.get(a.IInterpreterService),l=(0,S.isResource)(t)?await s.getActiveInterpreter(t):t,d=null!==(n=null==l?void 0:l.path)&&void 0!==n?n:i.pythonPath,h=(0,S.isResource)(t)?d:t.path,p=m.execModule(P.moduleName,r);if(l&&l.envType===u.EnvironmentType.Unknown)if(i.globalModuleInstallation){const n=this.serviceContainer.get(g.IFileSystem);await n.isDirReadonly(o.dirname(h)).catch(e=>!0)?this.elevatedInstall(h,p):await this.executeCommand(c,t,h,p,e,P.useShell)}else f===w(b.Product.pip)?await this.executeCommand(c,t,h,p,e,P.useShell):await this.executeCommand(c,t,h,p.concat(["--user"]),e,P.useShell);else await this.executeCommand(c,t,h,p,e,P.useShell)}else await this.executeCommand(c,t,P.execPath,r,e,P.useShell)};if(n){const e=this.serviceContainer.get(h.IApplicationShell),t={location:s.ProgressLocation.Notification,cancellable:!0,title:_.Products.installingModule().format(f)};await e.withProgress(t,async(e,t)=>T((0,p.wrapCancellationTokens)(t,n)))}else await T(n)}elevatedInstall(e,t){const r=this.serviceContainer.get(b.IOutputChannel,f.STANDARD_OUTPUT_CHANNEL),i=`"${e.replace(/\\/g,"/")}" ${t.join(" ")}`;(0,c.traceLog)("[Elevated] "+i);n(562).exec(i,{name:"VS Code Python"},async(e,t,n)=>{if(e){const t=this.serviceContainer.get(h.IApplicationShell);await t.showErrorMessage(e)}else r.show(),t&&(0,c.traceLog)(t),n&&(0,c.traceError)("Warning: "+n)})}async processInstallArgs(e,t){const n=e.findIndex(e=>"PYLINT"===e.toUpperCase());if(-1===n)return e;const r=this.serviceContainer.get(a.IInterpreterService),i=(0,S.isResource)(t)?await r.getActiveInterpreter(t):t;if(i&&i.version&&2===i.version.major){const t=[...e];return t[n]='"pylint<2.0.0"',t}return e}async executeCommand(e,t,n,r,i,o){const s={};if((0,S.isResource)(t)?s.resource=t:s.interpreter=t,e){this.serviceContainer.get(y.ITerminalServiceFactory).getTerminalService(s).sendCommand(n,r,i)}else{const e=this.serviceContainer.get(v.IProcessServiceFactory),t=await e.create(s.resource);if(o){const e=[n,...r].reduce((e,t)=>e?`${e} ${t.toCommandArgumentForPythonExt()}`:""+t.toCommandArgumentForPythonExt(),"");await t.shellExec(e)}else await t.exec(n,r)}}};function w(e){switch(e){case b.Product.mypy:return"mypy";case b.Product.pylama:return"pylama";case b.Product.prospector:return"prospector";case b.Product.pylint:return"pylint";case b.Product.pytest:return"pytest";case b.Product.autopep8:return"autopep8";case b.Product.black:return"black";case b.Product.pycodestyle:return"pycodestyle";case b.Product.pydocstyle:return"pydocstyle";case b.Product.yapf:return"yapf";case b.Product.flake8:return"flake8";case b.Product.unittest:return"unittest";case b.Product.bandit:return"bandit";case b.Product.jupyter:return"jupyter";case b.Product.notebook:return"notebook";case b.Product.pandas:return"pandas";case b.Product.ipykernel:return"ipykernel";case b.Product.nbconvert:return"nbconvert";case b.Product.kernelspec:return"kernelspec";case b.Product.tensorboard:return"tensorboard";case b.Product.torchProfilerInstallName:return"torch-tb-profiler";case b.Product.torchProfilerImportName:return"torch_tb_profiler";case b.Product.pip:return"pip";case b.Product.ensurepip:return"ensurepip";case b.Product.python:return"python";default:throw new Error(`Product ${e} cannot be installed as a Python Module.`)}}P=r([(0,i.injectable)()],P),t.ModuleInstaller=P,t.translateProductToModule=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getModuleVersion=t.isModuleInstalled=t.isValid=t.getUserSitePackages=t.getSitePackages=t.getExecutable=t.getSysPrefix=t.execModule=t.execCode=void 0,t.execCode=function(e){return["-c",e]},t.execModule=function(e,t){return["-m",e,...t]},t.getSysPrefix=function(){return[["-c","import sys;print(sys.prefix)"],function(e){return e.trim()}]},t.getExecutable=function(){return[["-c","import sys;print(sys.executable)"],function(e){return e.trim()}]},t.getSitePackages=function(){return[["-c","from distutils.sysconfig import get_python_lib; print(get_python_lib())"],function(e){return e.trim()}]},t.getUserSitePackages=function(){return[["site","--user-site"],function(e){return e.trim()}]},t.isValid=function(){return[["-c","print(1234)"],function(e){return e.startsWith("1234")}]},t.isModuleInstalled=function(e){return[["-c","import "+e],function(e){return!0}]},t.getModuleVersion=function(e){return[["-c",`import ${e}; print(${e}.__version__)`],function(e){return e.trim()}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalAutoActivation=t.ICodeExecutionManager=t.ICodeExecutionHelper=t.ICodeExecutionService=void 0,t.ICodeExecutionService=Symbol("ICodeExecutionService"),t.ICodeExecutionHelper=Symbol("ICodeExecutionHelper"),t.ICodeExecutionManager=Symbol("ICodeExecutionManager"),t.ITerminalAutoActivation=Symbol("ITerminalAutoActivation")},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=n(75),i=n(157);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o"function"==typeof i[e]);Object.keys(i).forEach(e=>{"promises"!==e&&(t[e]=i[e])}),o.forEach(e=>{t[e]=r(i[e])}),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise(t=>i.exists(e,t))},t.read=function(e,t,n,r,o,s){return"function"==typeof s?i.read(e,t,n,r,o,s):new Promise((s,a)=>{i.read(e,t,n,r,o,(e,t,n)=>{if(e)return a(e);s({bytesRead:t,buffer:n})})})},t.write=function(e,t,...n){return"function"==typeof n[n.length-1]?i.write(e,t,...n):new Promise((r,o)=>{i.write(e,t,...n,(e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffer:n})})})},"function"==typeof i.writev&&(t.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?i.writev(e,t,...n):new Promise((r,o)=>{i.writev(e,t,...n,(e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffers:n})})})}),"function"==typeof i.realpath.native&&(t.realpath.native=r(i.realpath.native))},function(e,t,n){"use strict";const r=n(164),i=n(3),o=n(32),s=n(252)("10.5.0"),a=e=>s?r.stat(e,{bigint:!0}):r.stat(e),c=e=>s?r.statSync(e,{bigint:!0}):r.statSync(e);function u(e,t){return Promise.all([a(e),a(t).catch(e=>{if("ENOENT"===e.code)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function l(e,t){if(t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev){if(s||t.inoe),r=i.resolve(t).split(i.sep).filter(e=>e);return n.reduce((e,t,n)=>e&&r[n]===t,!0)}function h(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:function(e,t,n,r){o.callbackify(u)(e,t,(i,o)=>{if(i)return r(i);const{srcStat:s,destStat:a}=o;return a&&l(s,a)?r(new Error("Source and destination must not be the same.")):s.isDirectory()&&d(e,t)?r(new Error(h(e,t,n))):r(null,{srcStat:s,destStat:a})})},checkPathsSync:function(e,t,n){const{srcStat:r,destStat:i}=function(e,t){let n;const r=c(e);try{n=c(t)}catch(e){if("ENOENT"===e.code)return{srcStat:r,destStat:null};throw e}return{srcStat:r,destStat:n}}(e,t);if(i&&l(r,i))throw new Error("Source and destination must not be the same.");if(r.isDirectory()&&d(e,t))throw new Error(h(e,t,n));return{srcStat:r,destStat:i}},checkParentPaths:function e(t,n,o,a,c){const u=i.resolve(i.dirname(t)),d=i.resolve(i.dirname(o));if(d===u||d===i.parse(d).root)return c();const p=(r,i)=>r?"ENOENT"===r.code?c():c(r):l(n,i)?c(new Error(h(t,o,a))):e(t,n,d,a,c);s?r.stat(d,{bigint:!0},p):r.stat(d,p)},checkParentPathsSync:function e(t,n,r,o){const s=i.resolve(i.dirname(t)),a=i.resolve(i.dirname(r));if(a===s||a===i.parse(a).root)return;let u;try{u=c(a)}catch(e){if("ENOENT"===e.code)return;throw e}if(l(n,u))throw new Error(h(t,r,o));return e(t,n,a,o)},isSrcSubdir:d}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(364);e.exports={remove:r(i),removeSync:i.sync}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d}));var r=n(6),i=n(40),o=n(23),s=n(59),a=n(60),c=n(76),u={};function l(){for(var e=[],t=0;t=t){r.complete();break}if(r.next(s++),r.closed)break}}))}function o(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(17),o=n(18),s=n(7),a=n(34);i.a;var c=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.key=t,i.group=n,i.parent=r,i}return r.b(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.a),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return r.b(t,e),t.prototype._subscribe=function(e){var t=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new l(n)),t.add(r.subscribe(e)),t},t}(s.a),l=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.b(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},function(e,t){e.exports=require("timers")},function(e,t){const n=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},function(e,t){const n=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:n.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>r(e,t,n)>0},function(e,t,n){const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&s||a||u}}e.exports=i;const o=n(176),{re:s,t:a}=n(121),c=n(280),u=n(175),l=n(43),d=n(65)},function(e,t,n){const r=n(65);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProductNames=void 0;const r=n(1);t.ProductNames=new Map,t.ProductNames.set(r.Product.autopep8,"autopep8"),t.ProductNames.set(r.Product.bandit,"bandit"),t.ProductNames.set(r.Product.black,"black"),t.ProductNames.set(r.Product.flake8,"flake8"),t.ProductNames.set(r.Product.mypy,"mypy"),t.ProductNames.set(r.Product.pycodestyle,"pycodestyle"),t.ProductNames.set(r.Product.pylama,"pylama"),t.ProductNames.set(r.Product.prospector,"prospector"),t.ProductNames.set(r.Product.pydocstyle,"pydocstyle"),t.ProductNames.set(r.Product.pylint,"pylint"),t.ProductNames.set(r.Product.pytest,"pytest"),t.ProductNames.set(r.Product.yapf,"yapf"),t.ProductNames.set(r.Product.tensorboard,"tensorboard"),t.ProductNames.set(r.Product.torchProfilerInstallName,"torch-tb-profiler"),t.ProductNames.set(r.Product.torchProfilerImportName,"torch_tb_profiler"),t.ProductNames.set(r.Product.jupyter,"jupyter"),t.ProductNames.set(r.Product.notebook,"notebook"),t.ProductNames.set(r.Product.ipykernel,"ipykernel"),t.ProductNames.set(r.Product.nbconvert,"nbconvert"),t.ProductNames.set(r.Product.kernelspec,"kernelspec"),t.ProductNames.set(r.Product.pandas,"pandas"),t.ProductNames.set(r.Product.pip,"pip"),t.ProductNames.set(r.Product.ensurepip,"ensurepip")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRegistryInterpreters=t.getRegistryInterpretersSync=t.getInterpreterDataFromRegistry=t.matchPythonBinFilename=t.matchBasicPythonBinFilename=void 0;const r=n(20),i=n(3),o=n(10),s=n(5),a=n(566);async function c(e,t,n){const r=await(0,a.readRegistryKeys)({arch:e,hive:t,key:n}),i=n.substr(n.lastIndexOf("\\")+1);return(await Promise.all(r.map(e=>async function({arch:e,hive:t,key:n},r){const i={interpreterPath:"",distroOrgName:r},o=await(0,a.readRegistryValues)({arch:e,hive:t,key:n});for(const e of o)switch(e.name){case"SysArchitecture":i.bitnessStr=e.value;break;case"SysVersion":i.sysVersionStr=e.value;break;case"Version":i.versionStr=e.value;break;case"DisplayName":i.companyDisplayName=e.value}const c=(await(0,a.readRegistryKeys)({arch:e,hive:t,key:n})).map(e=>e.key).find(e=>e.endsWith("InstallPath"));if(c){const n=(await(0,a.readRegistryValues)({arch:e,hive:t,key:c})).find(e=>"ExecutablePath"===e.name);n&&(i.interpreterPath=n.value,n.type!==a.REG_SZ&&(0,s.traceVerbose)(`Registry interpreter path type [${n.type}]: ${n.value}`))}if(i.interpreterPath.length>0)return i}(e,i)))).filter(e=>void 0!==e)||[]}let u,l;t.matchBasicPythonBinFilename=function(e){return"python.exe"===i.basename(e).toLowerCase()},t.matchPythonBinFilename=function(e){return/^python(\d+(.\d+)?)?\.exe$/.test(i.basename(e))},t.getInterpreterDataFromRegistry=c,t.getRegistryInterpretersSync=function(){return(0,o.isTestExecution)()?void 0:u},t.getRegistryInterpreters=async function(){return(0,o.isTestExecution)()||void 0===l?(l=async function(){let e=[];for(const t of["x64","x86"])for(const n of[a.HKLM,a.HKCU]){const r="\\SOFTWARE\\Python";let i=[];try{i=(await(0,a.readRegistryKeys)({arch:t,hive:n,key:r})).map(e=>e.key)}catch(e){(0,s.traceError)(`Failed to access Registry: ${t}\\${n}\\${r}`,e)}for(const r of i)e=e.concat(await c(t,n,r))}return u=(0,r.uniqBy)(e,e=>e.interpreterPath),u}(),l):l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REFRESH_BUTTON_ICON=t.IAttachProcessProviderFactory=void 0,t.IAttachProcessProviderFactory=Symbol("IAttachProcessProviderFactory"),t.REFRESH_BUTTON_ICON="refresh.svg"},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiStepInputFactory=t.IMultiStepInputFactory=t.MultiStepInput=void 0;const o=n(0),s=n(2),a=n(4);class c{constructor(){}}c.back=new c,c.cancel=new c,c.resume=new c;class u{constructor(e){this.shell=e,this.steps=[]}run(e,t){return this.stepThrough(e,t)}async showQuickPick({title:e,step:t,totalSteps:n,items:r,activeItem:i,placeholder:o,customButtonSetup:a,matchOnDescription:u,matchOnDetail:l,acceptFilterBoxTextAsSelection:d,onChangeItem:h,keepScrollPosition:p,sortByLabel:f}){const g=[];try{return await new Promise((m,v)=>{const y=this.shell.createQuickPick();y.title=e,y.step=t,y.sortByLabel=f||!1,y.totalSteps=n,y.placeholder=o,y.ignoreFocusOut=!0,y.items=r,y.matchOnDescription=u||!1,y.matchOnDetail=l||!1,y.activeItems=i?[i]:[],y.buttons=this.steps.length>1?[s.QuickInputButtons.Back]:[],a&&(y.buttons=[...y.buttons,a.button]),g.push(y.onDidTriggerButton(async e=>{e===s.QuickInputButtons.Back?v(c.back):e===(null==a?void 0:a.button)?await a.callback(y):m(e)}),y.onDidChangeSelection(e=>m(e[0])),y.onDidHide(()=>{m(void 0)})),d&&g.push(y.onDidAccept(()=>{m(y.value)})),this.current&&this.current.dispose(),this.current=y,h&&g.push(h.event(e=>h.callback(e,y))),this.current.show(),y.keepScrollPosition=p})}finally{g.forEach(e=>e.dispose())}}async showInputBox({title:e,step:t,totalSteps:n,value:r,prompt:i,validate:o,password:a,buttons:u}){const l=[];try{return await new Promise((d,h)=>{const p=this.shell.createInputBox();p.title=e,p.step=t,p.totalSteps=n,p.password=!!a,p.value=r||"",p.prompt=i,p.ignoreFocusOut=!0,p.buttons=[...this.steps.length>1?[s.QuickInputButtons.Back]:[],...u||[]];let f=o("");l.push(p.onDidTriggerButton(e=>{e===s.QuickInputButtons.Back?h(c.back):d(e)}),p.onDidAccept(async()=>{const e=p.value;p.enabled=!1,p.busy=!0,await o(e)||d(e),p.enabled=!0,p.busy=!1}),p.onDidChangeValue(async e=>{const t=o(e);f=t;const n=await t;t===f&&(p.validationMessage=n)}),p.onDidHide(()=>{d(void 0)})),this.current&&this.current.dispose(),this.current=p,this.current.show()})}finally{l.forEach(e=>e.dispose())}}async stepThrough(e,t){let n=e;for(;n;){this.steps.push(n),this.current&&(this.current.enabled=!1,this.current.busy=!0);try{n=await n(this,t)}catch(e){if(e===c.back)this.steps.pop(),n=this.steps.pop();else if(e===c.resume)n=this.steps.pop();else{if(e!==c.cancel)throw e;n=void 0}}}this.current&&this.current.dispose()}}t.MultiStepInput=u,t.IMultiStepInputFactory=Symbol("IMultiStepInputFactory");let l=class{constructor(e){this.shell=e}create(){return new u(this.shell)}};l=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IApplicationShell))],l),t.MultiStepInputFactory=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILaunchJsonReader=t.IDebugConfigurationProviderFactory=t.IDebugConfigurationResolver=void 0,t.IDebugConfigurationResolver=Symbol("IDebugConfigurationResolver"),t.IDebugConfigurationProviderFactory=Symbol("IDebugConfigurationProviderFactory"),t.ILaunchJsonReader=Symbol("ILaunchJsonReader")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugPurpose=t.DebugOptions=void 0,function(e){e.RedirectOutput="RedirectOutput",e.Django="Django",e.Jinja="Jinja",e.DebugStdLib="DebugStdLib",e.Sudo="Sudo",e.Pyramid="Pyramid",e.FixFilePathCase="FixFilePathCase",e.WindowsClient="WindowsClient",e.UnixClient="UnixClient",e.StopOnEntry="StopOnEntry",e.ShowReturnValue="ShowReturnValue",e.SubProcess="Multiprocess"}(t.DebugOptions||(t.DebugOptions={})),function(e){e.DebugTest="debug-test",e.DebugInTerminal="debug-in-terminal"}(t.DebugPurpose||(t.DebugPurpose={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IChildProcessAttachService=t.IDebugSessionEventHandlers=void 0,t.IDebugSessionEventHandlers=Symbol("IDebugSessionEventHandlers"),t.IChildProcessAttachService=Symbol("IChildProcessAttachService")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseFormatter=void 0;const r=n(3),i=n(2),o=n(4);n(12);const s=n(624),a=n(13),c=n(25),u=n(1),l=n(22),d=n(5),h=n(313),p=n(232);t.BaseFormatter=class{constructor(e,t,n){this.Id=e,this.product=t,this.serviceContainer=n,this.helper=n.get(p.IFormatterHelper),this.workspace=n.get(o.IWorkspaceService)}getDocumentPath(e,t){return r.basename(e.uri.fsPath)===e.uri.fsPath?t:r.dirname(e.fileName)}getWorkspaceUri(e){const t=this.workspace.getWorkspaceFolder(e.uri);if(t)return t.uri;const n=this.workspace.workspaceFolders;return Array.isArray(n)&&n.length>0?n[0].uri:i.Uri.file(__dirname)}async provideDocumentFormattingEdits(e,t,n,r,i){"string"==typeof i&&0!==i.length||(i=this.getWorkspaceUri(e).fsPath);const s=await this.createTempFile(e);if(this.checkCancellation(e.fileName,s,n))return[];const a=this.helper.getExecutionInfo(this.product,r,e.uri);a.args.push(s);const l=this.serviceContainer.get(c.IPythonToolExecutionService).exec(a,{cwd:i,throwOnStdErr:!1,token:n},e.uri).then(e=>e.stdout).then(t=>this.checkCancellation(e.fileName,s,n)?[]:(0,h.getTextEditsFromPatch)(e.getText(),t)).catch(t=>(this.checkCancellation(e.fileName,s,n)||this.handleError(this.Id,t,e.uri).catch(()=>{}),[])).then(t=>(this.deleteTempFile(e.fileName,s).ignoreErrors(),t)),d=this.serviceContainer.get(o.IApplicationShell),p=this.serviceContainer.get(u.IDisposableRegistry),f=d.setStatusBarMessage("Formatting with "+this.Id,l);return p.push(f),l}async handleError(e,t,n){let r=`Formatting with ${this.Id} failed.`;if((0,s.isNotInstalledError)(t)){const e=this.serviceContainer.get(u.IInstaller);await e.isInstalled(this.product,n)||(r+=`\nYou could either install the '${this.Id}' formatter, turn it off or use another formatter.`,e.promptToInstall(this.product,n).catch(e=>(0,d.traceError)("Python Extension: promptToInstall",e)))}(0,d.traceLog)(`\n${r}\n${t}`)}async createTempFile(e){const t=this.serviceContainer.get(a.IFileSystem);return e.isDirty||(0,l.isNotebookCell)(e)?(0,h.getTempFileWithDocumentContents)(e,t):e.fileName}deleteTempFile(e,t){if(e!==t){return this.serviceContainer.get(a.IFileSystem).deleteFile(t)}return Promise.resolve()}checkCancellation(e,t,n){return!(!n||!n.isCancellationRequested)&&(this.deleteTempFile(e,t).ignoreErrors(),!0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containsNotebookExtension=t.containsTensorBoardImport=t.TorchProfilerImportRegEx=void 0;const r=n(22);t.TorchProfilerImportRegEx=/^\s*(?:import (?:(\w+, )*torch\.profiler(, \w+)*))|(?:from torch import (?:(\w+, )*profiler(, \w+)*))/;const i=/^\s*(?:from torch\.utils\.tensorboard import \w+)|(?:from torch\.utils import (?:(\w+, )*tensorboard(, \w+)*))|(?:from tensorboardX import \w+)|(?:import (\w+, )*((torch\.utils\.tensorboard)|(tensorboardX)|(tensorboard))(, \w+)*)/;t.containsTensorBoardImport=function(e){try{for(const n of e)if(n&&(i.test(n)||t.TorchProfilerImportRegEx.test(n)))return!0}catch(e){(0,r.noop)()}return!1},t.containsNotebookExtension=function(e){for(const t of e)if((null==t?void 0:t.startsWith("%tensorboard"))||(null==t?void 0:t.startsWith("%load_ext tensorboard")))return!0;return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindowsStoreEnvironment=t.isStorePythonInstalled=t.isWindowsStoreDir=t.getWindowsStoreAppsRoot=void 0;const r=n(3),i=n(19),o=n(5),s=n(24);function a(){const e=(0,i.getEnvironmentVariable)("LOCALAPPDATA")||"";return r.join(e,"Microsoft","WindowsApps")}function c(e){const t=r.join((0,i.getEnvironmentVariable)("ProgramFiles")||"Program Files","WindowsApps").normalize().toUpperCase();return r.normalize(e).toUpperCase().includes(t)}async function u(e){let t=await Promise.all([(0,s.pathExists)(r.join(a(),"idle.exe")),(0,s.pathExists)(r.join(a(),"pip.exe"))]);return!!t.includes(!0)||!!e&&(t=await Promise.all([(0,s.pathExists)(r.join(r.dirname(e),"idle.exe")),(0,s.pathExists)(r.join(r.dirname(e),"pip.exe"))]),t.includes(!0))}t.getWindowsStoreAppsRoot=a,t.isWindowsStoreDir=function(e){const t=r.normalize(a()).toUpperCase();return r.normalize(e).toUpperCase().includes(t)||c(e)},t.isStorePythonInstalled=u,t.isWindowsStoreEnvironment=async function(e){if(await u(e)){const t=r.normalize(e).toUpperCase(),n=r.normalize(a()).toUpperCase();if(t.includes(n))return!0;if(c(t))return(0,o.traceWarn)("isWindowsStoreEnvironment called with Program Files store path."),!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locator=t.NOOP_ITERATOR=void 0;const r=n(16),i=n(159);t.NOOP_ITERATOR=(0,r.iterEmpty)();t.Locator=class extends class{constructor(e){this.emitter=e,this.onChanged=e.onChanged}}{constructor(){super(new i.PythonEnvsWatcher)}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseShellDetector=void 0;const o=n(0),s=n(5),a=n(28),c=new Map;c.set(a.TerminalShellType.powershell,/(powershell$)/i),c.set(a.TerminalShellType.gitbash,/(gitbash$)/i),c.set(a.TerminalShellType.bash,/(bash$)/i),c.set(a.TerminalShellType.wsl,/(wsl$)/i),c.set(a.TerminalShellType.zsh,/(zsh$)/i),c.set(a.TerminalShellType.ksh,/(ksh$)/i),c.set(a.TerminalShellType.commandPrompt,/(cmd$)/i),c.set(a.TerminalShellType.fish,/(fish$)/i),c.set(a.TerminalShellType.tcshell,/(tcsh$)/i),c.set(a.TerminalShellType.cshell,/(csh$)/i),c.set(a.TerminalShellType.powershellCore,/(pwsh$)/i),c.set(a.TerminalShellType.xonsh,/(xonsh$)/i);let u=class{constructor(e){this.priority=e}identifyShellFromShellPath(e){const t=e.replace(/\.exe$/,""),n=Array.from(c.keys()).reduce((e,n)=>{if(e===a.TerminalShellType.other){const e=c.get(n);if(e&&e.test(t))return n}return e},a.TerminalShellType.other);return(0,s.traceVerbose)(`Shell path '${e}', base path '${t}'`),(0,s.traceVerbose)(`Shell path identified as shell '${n}'`),n}};u=r([(0,o.injectable)(),i(0,(0,o.unmanaged)())],u),t.BaseShellDetector=u},function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=0,r=e.length,a="",c=0,u=16,l=0,d=0,h=0,p=0,f=0;function g(t,r){for(var i=0,o=0;i=48&&s<=57)o=16*o+s-48;else if(s>=65&&s<=70)o=16*o+s-65+10;else{if(!(s>=97&&s<=102))break;o=16*o+s-97+10}n++,i++}return i=r)return c=r,u=17;var t=e.charCodeAt(n);if(i(t)){do{n++,a+=String.fromCharCode(t),t=e.charCodeAt(n)}while(i(t));return u=15}if(o(t))return n++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,a+="\n"),l++,h=n,u=14;switch(t){case 123:return n++,u=1;case 125:return n++,u=2;case 91:return n++,u=3;case 93:return n++,u=4;case 58:return n++,u=6;case 44:return n++,u=5;case 34:return n++,a=function(){for(var t="",i=n;;){if(n>=r){t+=e.substring(i,n),f=2;break}var s=e.charCodeAt(n);if(34===s){t+=e.substring(i,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(o(s)){t+=e.substring(i,n),f=2;break}f=6}n++}else{if(t+=e.substring(i,n),++n>=r){f=2;break}switch(s=e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=g(4,!0);a>=0?t+=String.fromCharCode(a):f=4;break;default:f=5}i=n}}return t}(),u=10;case 47:var m=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:m,getToken:function(){return u},getTokenValue:function(){return a},getTokenOffset:function(){return c},getTokenLength:function(){return n-c},getTokenStartLine:function(){return d},getTokenStartCharacter:function(){return c-p},getTokenError:function(){return f}}}function i(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function o(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function a(e,t,n){var i,o,s,a,l;if(t){for(a=t.offset,l=a+t.length,s=a;s>0&&!u(e,s-1);)s--;for(var d=l;da&&e.substring(n,r)!==t&&_.push({offset:n,length:r-n,content:t})}var E=b();if(17!==E){var P=m.getTokenOffset()+s;S(c(h,i),s,P)}for(;17!==E;){for(var w=m.getTokenOffset()+m.getTokenLength()+s,T=b(),C="";!f&&(12===T||13===T);){S(" ",w,m.getTokenOffset()+s),w=m.getTokenOffset()+m.getTokenLength()+s,C=12===T?y():"",T=b()}if(2===T)1!==E&&(g--,C=y());else if(4===T)3!==E&&(g--,C=y());else{switch(E){case 3:case 1:g++,C=y();break;case 5:case 12:C=y();break;case 13:C=f?y():" ";break;case 6:C=" ";break;case 10:if(6===T){C="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===T||13===T?C=" ":5!==T&&17!==T&&(v=!0);break;case 16:v=!0}!f||12!==T&&13!==T||(C=y())}S(C,w,m.getTokenOffset()+s),E=T}return _}function c(e,t){for(var n="",r=0;r=n.children.length)return;n=n.children[l]}}return n}}function p(e,t,n){void 0===n&&(n=l.DEFAULT);var i=r(e,!1);function o(e){return e?function(){return e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function s(e){return e?function(t){return e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var a=o(t.onObjectBegin),c=s(t.onObjectProperty),u=o(t.onObjectEnd),d=o(t.onArrayBegin),h=o(t.onArrayEnd),p=s(t.onLiteralValue),f=s(t.onSeparator),g=o(t.onComment),m=s(t.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function b(){for(;;){var e=i.scan();switch(i.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:v||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:v?_(10):g();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),m(e),t.length+n.length>0)for(var r=i.getToken();17!==r;){if(-1!==t.indexOf(r)){b();break}if(-1!==n.indexOf(r))break;r=b()}}function S(e){var t=i.getTokenValue();return e?p(t):c(t),b(),!0}function E(){switch(i.getToken()){case 3:return function(){d(),b();for(var e=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||_(4,[],[]),f(","),b(),4===i.getToken()&&y)break}else e&&_(6,[],[]);E()||_(4,[],[4,5]),e=!0}return h(),4!==i.getToken()?_(8,[4],[]):b(),!0}();case 1:return function(){a(),b();for(var e=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||_(4,[],[]),f(","),b(),2===i.getToken()&&y)break}else e&&_(6,[],[]);(10!==i.getToken()?(_(3,[],[2,5]),0):(S(!1),6===i.getToken()?(f(":"),b(),E()||_(4,[],[2,5])):_(5,[],[2,5]),1))||_(4,[],[2,5]),e=!0}return u(),2!==i.getToken()?_(7,[2],[]):b(),!0}();case 10:return S(!0);default:return function(){switch(i.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(i.getTokenValue()))&&(_(2),e=0)}catch(e){_(2)}p(e);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return b(),!0}()}}return b(),17===i.getToken()||(E()?(17!==i.getToken()&&_(9,[],[]),!0):(_(4,[],[]),!1))}function f(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function g(e,t,n,r,i){for(var o,s=t.slice(),a=d(e,[]),c=void 0,u=void 0;s.length>0&&(u=s.pop(),void 0===(c=h(a,s))&&void 0!==n);)"string"==typeof u?((o={})[u]=n,n=o):n=[n];if(c){if("object"===c.type&&"string"==typeof u&&Array.isArray(c.children)){var l=h(c,[u]);if(void 0!==l){if(void 0===n){if(!l.parent)throw new Error("Malformed AST");var p=c.children.indexOf(l.parent),f=void 0,g=l.parent.offset+l.parent.length;if(p>0)f=(E=c.children[p-1]).offset+E.length;else if(f=c.offset+1,c.children.length>1)g=c.children[1].offset;return m(e,{offset:f,length:g-f,content:""},r)}return m(e,{offset:l.offset,length:l.length,content:JSON.stringify(n)},r)}if(void 0===n)return[];var v=JSON.stringify(u)+": "+JSON.stringify(n),y=i?i(c.children.map((function(e){return e.children[0].value}))):c.children.length,b=void 0;return m(e,b=y>0?{offset:(E=c.children[y-1]).offset+E.length,length:0,content:","+v}:0===c.children.length?{offset:c.offset+1,length:0,content:v}:{offset:c.offset+1,length:0,content:v+","},r)}if("array"===c.type&&"number"==typeof u&&Array.isArray(c.children)){if(-1===u){v=""+JSON.stringify(n),b=void 0;if(0===c.children.length)b={offset:c.offset+1,length:0,content:v};else b={offset:(E=c.children[c.children.length-1]).offset+E.length,length:0,content:","+v};return m(e,b,r)}if(void 0===n&&c.children.length>=0){var _=u,S=c.children[_];b=void 0;if(1===c.children.length)b={offset:c.offset+1,length:c.length-2,content:""};else if(c.children.length-1===_){var E,P=(E=c.children[_-1]).offset+E.length;b={offset:P,length:c.offset+c.length-2-P,content:""}}else b={offset:S.offset,length:c.children[_+1].offset-S.offset,content:""};return m(e,b,r)}throw new Error("Array modification not supported yet")}throw new Error("Can not add "+("number"!=typeof u?"index":"property")+" to parent of type "+c.type)}if(void 0===n)throw new Error("Can not delete in empty document");return m(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}function m(e,t,n){var r=v(e,t),i=t.offset,o=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;i>0&&!u(r,i-1);)i--;for(;o=0;c--){var l=s[c];r=v(r,l),i=Math.min(i,l.offset),o=Math.max(o,l.offset+l.length),o+=l.content.length-l.length}return[{offset:i,length:e.length-(r.length-o)-i,content:r.substring(i,o)}]}function v(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}n.r(t),function(e){e.DEFAULT={allowTrailingComma:!1}}(l||(l={})),n.d(t,"createScanner",(function(){return y})),n.d(t,"getLocation",(function(){return b})),n.d(t,"parse",(function(){return _})),n.d(t,"parseTree",(function(){return S})),n.d(t,"findNodeAtLocation",(function(){return E})),n.d(t,"findNodeAtOffset",(function(){return P})),n.d(t,"getNodePath",(function(){return w})),n.d(t,"getNodeValue",(function(){return T})),n.d(t,"visit",(function(){return C})),n.d(t,"stripComments",(function(){return I})),n.d(t,"printParseErrorCode",(function(){return R})),n.d(t,"format",(function(){return O})),n.d(t,"modify",(function(){return D})),n.d(t,"applyEdits",(function(){return x}));var y=r,b=function(e,t){var n=[],r=new Object,i=void 0,o={value:{},offset:0,length:0,type:"object",parent:void 0},s=!1;function a(e,t,n,r){o.value=e,o.offset=t,o.length=n,o.type=r,o.colonOffset=void 0,i=o}try{p(e,{onObjectBegin:function(e,o){if(t<=e)throw r;i=void 0,s=t>e,n.push("")},onObjectProperty:function(e,i,o){if(t=e.offset&&t"}function O(e,t,n){return a(e,t,n)}function D(e,t,n,r){return g(e,t,n,r.formattingOptions,r.getInsertionIndex)}function x(e,t){for(var n=t.length-1;n>=0;n--)e=v(e,t[n]);return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(17),i=n(88),o=n(146);function s(e,t,n){if(e){if(e instanceof r.a)return e;if(e[i.a])return e[i.a]()}return e||t||n?new r.a(e,t,n):new r.a(o.a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7);function i(e,t){return t?new r.a((function(n){return t.schedule(o,0,{error:e,subscriber:n})})):new r.a((function(t){return t.error(e)}))}function o(e){var t=e.error;e.subscriber.error(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47),i=function(e){return function(t){var n=e[r.a]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47);function i(e){return e&&"function"==typeof e[r.a]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(45);function i(e){return e&&"function"==typeof e[r.a]}},function(e,t,n){"use strict";function r(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(6),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.b(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(78).a),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.b(t,e),t}(n(77).a);n.d(t,"a",(function(){return s}));var s=new o(i)},function(e,t,n){"use strict";var r=n(7),i=n(18),o=n(47);var s=n(201),a=n(143),c=n(202),u=n(196),l=n(140),d=n(139),h=n(197);function p(e,t){if(null!=e){if(Object(u.a)(e))return function(e,t){return new r.a((function(n){var r=new i.a;return r.add(t.schedule((function(){var i=e[o.a]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(Object(l.a)(e))return Object(s.a)(e,t);if(Object(d.a)(e))return Object(a.a)(e,t);if(Object(h.a)(e)||"string"==typeof e)return Object(c.a)(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}n.d(t,"a",(function(){return p}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(7),i=n(18);function o(e,t){return new r.a((function(n){var r=new i.a;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),i=n(18),o=n(45);function s(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,s=new i.a;return s.add((function(){r&&"function"==typeof r.return&&r.return()})),s.add(t.schedule((function(){r=e[o.a](),s.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}})))}))),s}))}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystem=t.getHashString=t.FileSystemUtils=t.RawFileSystem=t.convertStat=void 0;const i=n(104),o=n(52),s=n(255),a=n(0),c=n(32),u=n(2),l=n(5);n(12);const d=n(270),h=n(421),p=n(63),f=n(423),g=n(13);function m(e,t){return{type:t,size:e.size,ctime:Math.round(e.ctimeMs),mtime:Math.round(e.mtimeMs)}}function v(e,t){return t===g.FileType.Unknown?e.filter(([e,t])=>t===g.FileType.Unknown||t===(g.FileType.SymbolicLink&g.FileType.Unknown)):e.filter(([e,n])=>(n&t)>0)}t.convertStat=m;class y{constructor(e,t,n){this.paths=e,this.vscfs=t,this.fsExtra=n}static withDefaults(e,t,n){return new y(e||p.FileSystemPaths.withDefaults(),t||u.workspace.fs,n||o)}async pathExists(e){return this.fsExtra.pathExists(e)}async stat(e){const t=u.Uri.file(e);return this.vscfs.stat(t)}async lstat(e){const t=await this.fsExtra.lstat(e);return m(t,(0,d.convertFileType)(t))}async chmod(e,t){return this.fsExtra.chmod(e,t)}async move(e,t){const n=u.Uri.file(e),r=u.Uri.file(t);await this.vscfs.stat(u.Uri.file(this.paths.dirname(t)));const i={overwrite:!1};try{await this.vscfs.rename(n,r,i)}catch(e){if(!(0,h.isFileExistsError)(e))throw e;if((await this.vscfs.stat(r)).type===g.FileType.Directory)throw e;i.overwrite=!0,await this.vscfs.rename(n,r,i)}}async readData(e){const t=u.Uri.file(e),n=await this.vscfs.readFile(t);return Buffer.from(n)}async readText(e){const t=u.Uri.file(e),n=await this.vscfs.readFile(t);return Buffer.from(n).toString("utf8")}async writeText(e,t){const n=u.Uri.file(e),r=Buffer.from(t);await this.vscfs.writeFile(n,r)}async appendText(e,t){return this.fsExtra.appendFile(e,t)}async copyFile(e,t){const n=u.Uri.file(e),r=u.Uri.file(t);await this.vscfs.stat(u.Uri.file(this.paths.dirname(t))),await this.vscfs.copy(n,r,{overwrite:!0})}async rmfile(e){const t=u.Uri.file(e);return this.vscfs.delete(t,{recursive:!1,useTrash:!1})}async rmdir(e){const t=u.Uri.file(e),n=await this.vscfs.readDirectory(t);if(n&&n.length>0)throw(0,h.createDirNotEmptyError)(e);return this.vscfs.delete(t,{recursive:!0,useTrash:!1})}async rmtree(e){const t=u.Uri.file(e);return await this.vscfs.stat(t),this.vscfs.delete(t,{recursive:!0,useTrash:!1})}async mkdirp(e){const t=u.Uri.file(e);await this.vscfs.createDirectory(t)}async listdir(e){const t=u.Uri.file(e);return(await this.vscfs.readDirectory(t)).map(([t,n])=>[this.paths.join(e,t),n])}statSync(e){let t=this.fsExtra.lstatSync(e),n=g.FileType.Unknown;return t.isSymbolicLink()&&(n=g.FileType.SymbolicLink,t=this.fsExtra.statSync(e)),n|=(0,d.convertFileType)(t),m(t,n)}readTextSync(e){return this.fsExtra.readFileSync(e,"utf8")}createReadStream(e){return this.fsExtra.createReadStream(e)}createWriteStream(e){return this.fsExtra.createWriteStream(e)}}t.RawFileSystem=y;class b{constructor(e,t,n,r,i,o){this.raw=e,this.pathUtils=t,this.paths=n,this.tmp=r,this.getHash=i,this.globFiles=o}static withDefaults(e,t,n,r,i){return t=t||p.FileSystemPathUtils.withDefaults(),new b(e||y.withDefaults(t.paths),t,t.paths,n||f.TemporaryFileSystem.withDefaults(),r||_,i||(0,c.promisify)(s))}async createDirectory(e){return this.raw.mkdirp(e)}async deleteDirectory(e){return this.raw.rmdir(e)}async deleteFile(e){return this.raw.rmfile(e)}async pathExists(e,t){if(void 0===t)return this.raw.pathExists(e);let n;try{n=await this.raw.stat(e)}catch(t){return(0,h.isFileNotFoundError)(t)||(0,l.traceError)(`stat() failed for "${e}"`,t),!1}return t===g.FileType.Unknown?n.type===g.FileType.Unknown:(n.type&t)===t}async fileExists(e){return this.pathExists(e,g.FileType.File)}async directoryExists(e){return this.pathExists(e,g.FileType.Directory)}async listdir(e){try{return await this.raw.listdir(e)}catch(t){if(!await this.pathExists(e))return[];throw t}}async getSubDirectories(e){return v(await this.listdir(e),g.FileType.Directory).map(([e,t])=>e)}async getFiles(e){return v(await this.listdir(e),g.FileType.File).map(([e,t])=>e)}async isDirReadonly(e){const t=`${e}${this.paths.sep}___vscpTest___`;try{await this.raw.stat(e),await this.raw.writeText(t,"")}catch(e){if((0,h.isNoPermissionsError)(e))return!0;throw e}return this.raw.rmfile(t).ignoreErrors(),!1}async getFileHash(e){const t=await this.raw.lstat(e),n=`${t.ctime}-${t.mtime}`;return this.getHash(n)}async search(e,t,n){let r;t&&(r={...r,cwd:t}),n&&(r={...r,dot:n});const i=await this.globFiles(e,r);return Array.isArray(i)?i:[]}fileExistsSync(e){try{this.raw.statSync(e)}catch(e){if((0,h.isFileNotFoundError)(e))return!1;throw e}return!0}}function _(e){const t=(0,i.createHash)("sha512");return t.update(e),t.digest("hex")}t.FileSystemUtils=b,t.getHashString=_;let S=class{constructor(){this.utils=b.withDefaults()}get directorySeparatorChar(){return this.utils.paths.sep}arePathsSame(e,t){return this.utils.pathUtils.arePathsSame(e,t)}getDisplayName(e){return this.utils.pathUtils.getDisplayName(e)}async stat(e){return this.utils.raw.stat(e)}async createDirectory(e){return this.utils.createDirectory(e)}async deleteDirectory(e){return this.utils.deleteDirectory(e)}async listdir(e){return this.utils.listdir(e)}async readFile(e){return this.utils.raw.readText(e)}async readData(e){return this.utils.raw.readData(e)}async writeFile(e,t){return this.utils.raw.writeText(e,t)}async appendFile(e,t){return this.utils.raw.appendText(e,t)}async copyFile(e,t){return this.utils.raw.copyFile(e,t)}async deleteFile(e){return this.utils.deleteFile(e)}async chmod(e,t){return this.utils.raw.chmod(e,t)}async move(e,t){await this.utils.raw.move(e,t)}readFileSync(e){return this.utils.raw.readTextSync(e)}createReadStream(e){return this.utils.raw.createReadStream(e)}createWriteStream(e){return this.utils.raw.createWriteStream(e)}async fileExists(e){return this.utils.fileExists(e)}pathExists(e){return this.utils.pathExists(e)}fileExistsSync(e){return this.utils.fileExistsSync(e)}async directoryExists(e){return this.utils.directoryExists(e)}async getSubDirectories(e){return this.utils.getSubDirectories(e)}async getFiles(e){return this.utils.getFiles(e)}async getFileHash(e){return this.utils.getFileHash(e)}async search(e,t,n){return this.utils.search(e,t,n)}async createTemporaryFile(e,t){return this.utils.tmp.createFile(e,t)}async isDirReadonly(e){return this.utils.isDirReadonly(e)}};S=r([(0,a.injectable)()],S),t.FileSystem=S},function(e,t){e.exports=require("constants")},function(e,t){e.exports={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:i}={}){const o=n?t:"";return JSON.stringify(e,r,i).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(42),o=n(3),s=n(73),a=n(105).pathExists;e.exports={outputFile:r((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const c=o.dirname(e);a(c,(o,a)=>o?r(o):a?i.writeFile(e,t,n,r):void s.mkdirs(c,o=>{if(o)return r(o);i.writeFile(e,t,n,r)}))})),outputFileSync:function(e,...t){const n=o.dirname(e);if(i.existsSync(n))return i.writeFileSync(e,...t);s.mkdirsSync(n),i.writeFileSync(e,...t)}}},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),n=t[1]||"",r=Boolean(n&&":"!==n.charAt(1));return Boolean(t[2]||r)}e.exports="win32"===process.platform?i:r,e.exports.posix=r,e.exports.win32=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingOnSyntax=void 0;var r=n(209),i=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new r.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingWhenSyntax=void 0;var r=n(208),i=n(266),o=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=i.namedConstraint(e),new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new r.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=i.taggedConstraint(e)(t),new r.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return i.typeConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return i.namedConstraint(e)(t.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return i.taggedConstraint(e)(t)(n.parentRequest)},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.typeConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.namedConstraint(e))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!i.traverseAncerstors(n,i.taggedConstraint(e)(t))},new r.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,e)},new r.BindingOnSyntax(this._binding)},e}();t.BindingWhenSyntax=o},function(e,t){e.exports=require("zlib")},function(e,t,n){"use strict";function r(e,t){if(void 0===e)return"undefined";if(null===e)return"null";try{return e&&e.fsPath?``:JSON.stringify(e)}catch(e){return`<${t} cannot be serialized for logging>`}}Object.defineProperty(t,"__esModule",{value:!0}),t.getTimeForLogging=t.returnValueToLogString=t.argsToLogString=void 0,t.argsToLogString=function(e){if(!e)return"";try{return e.map((e,t)=>`Arg ${t+1}: ${r(e,"argument")}`).join(", ")}catch(e){return""}},t.returnValueToLogString=function(e){return"Return Value: "+r(e,"Return value")},t.getTimeForLogging=function(){const e=new Date;return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()} ${e.getHours()}:${e.getMinutes()}:${e.getSeconds()}.${e.getMilliseconds()}`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentActivationService=void 0,t.IEnvironmentActivationService=Symbol("IEnvironmentActivationService")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IApplicationDiagnostics=void 0,t.IApplicationDiagnostics=Symbol("IApplicationDiagnostics")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvFileTelemetryTests=t.sendActivationTelemetry=t.sendFileCreationTelemetry=t.sendSettingTelemetry=void 0;const r=n(74),i=n(8),o=n(9);let s,a=!1;function c(e=!1){(0,i.sendTelemetryEvent)(o.EventName.ENVFILE_WORKSPACE,void 0,{hasCustomEnvPath:e}),a=!0}function u(){return!a}function l(e){var t;if(!s){const n=e.getConfiguration("python");s=(null===(t=n.inspect("envFile"))||void 0===t?void 0:t.defaultValue)||""}return s}t.sendSettingTelemetry=function(e,t){u()&&t!==l(e)&&c(!0)},t.sendFileCreationTelemetry=function(){u()&&c()},t.sendActivationTelemetry=async function(e,t,n){if(u()){const i=new r.SystemVariables(n,void 0,t).resolveAny(l(t));await e.fileExists(i)&&c()}},t.EnvFileTelemetryTests={setState:({telemetrySent:e,defaultSetting:t})=>{void 0!==e&&(a=e),void 0!==l&&(s=t)},resetState:()=>{s=void 0,a=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryCache=t.clearCache=t.getCacheKeyFromFunctionArgs=t.getGlobalCacheStore=void 0;const r=new Map;t.getGlobalCacheStore=function(){return r},t.getCacheKeyFromFunctionArgs=function(e,t){return`KeyPrefix=${e}-Args=${t.map(e=>""+JSON.stringify(e)).join("-Arg-Separator-")}`},t.clearCache=function(){r.clear()};t.InMemoryCache=class{constructor(e){this.expiryDurationMs=e}get hasData(){return!(!this.cacheData||this.hasExpired(this.cacheData.expiry))||(this.cacheData=void 0,!1)}get data(){var e;if(this.hasData)return null===(e=this.cacheData)||void 0===e?void 0:e.value}set data(e){this.cacheData=void 0!==e?{expiry:this.calculateExpiry(),value:e}:void 0}clear(){this.cacheData=void 0}hasExpired(e){return e<=Date.now()}calculateExpiry(){return Date.now()+this.expiryDurationMs}}},function(e,t){const n=/^[0-9]+$/,r=(e,t)=>{const r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:er(t,e)}},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>0===r(e,t,n)},function(e,t,n){const r=n(43);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>r(e,t,n)<0},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>r(e,t,n)>=0},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>r(e,t,n)<=0},function(e,t,n){const r=n(43),i=n(178),{ANY:o}=i,s=n(65),a=n(179),c=n(177),u=n(219),l=n(221),d=n(220);e.exports=(e,t,n,h)=>{let p,f,g,m,v;switch(e=new r(e,h),t=new s(t,h),n){case">":p=c,f=l,g=u,m=">",v=">=";break;case"<":p=u,f=d,g=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)}),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},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 r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends r{constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}}function o(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return o().asHex()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseDiagnosticCommand=void 0;t.BaseDiagnosticCommand=class{constructor(e){this.diagnostic=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cancellation=t.wrapCancellationTokens=t.createPromiseFromCancellation=t.CancellationError=void 0;const r=n(2),i=n(16),o=n(14);class s extends Error{constructor(){super(o.Common.canceled())}}t.CancellationError=s,t.createPromiseFromCancellation=function(e){return new Promise((t,n)=>{if(!e.token)return;e.token.onCancellationRequested(()=>{if(e.token.isCancellationRequested){if("resolve"===e.cancelAction)return t(e.defaultValue);if("reject"===e.cancelAction)return n(new s)}})})},t.wrapCancellationTokens=function(...e){const t=new r.CancellationTokenSource;for(const n of e)if(n){if(n.isCancellationRequested)return n;n.onCancellationRequested(()=>t.cancel())}return t.token},function(e){function t(e){return!!e&&e.isCancellationRequested}e.race=function(e,t){if(t){const n=(0,i.createDeferred)();return t.onCancellationRequested(()=>{n.completed||n.reject(new s)}),t.isCancellationRequested?n.reject(new s):e(t).then(e=>{n.completed||n.resolve(e)}).catch(e=>{n.completed||n.reject(e)}),n.promise}return e()},e.isCanceled=t,e.throwIfCanceled=function(e){if(t(e))throw new s}}(t.Cancellation||(t.Cancellation={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._SCRIPTS_DIR=void 0;const r=n(3),i=n(10);t._SCRIPTS_DIR=r.join(i.EXTENSION_ROOT_DIR,"pythonFiles")},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.isPoetryEnvironmentRelatedToFolder=t.Poetry=t.isPoetryEnvironment=t.localPoetryEnvDirName=void 0;const i=n(3),o=n(19),s=n(24),a=n(68),c=n(125),u=n(41),l=n(53),d=n(10),h=n(5),p=/^(.+)-(.+)-py(\d).(\d){1,2}$/;t.localPoetryEnvDirName=".venv",t.isPoetryEnvironment=async function(e){return!!await async function(e){const t=(0,a.getEnvironmentDirFromPath)(e);return!!p.test(i.basename(t))&&(0,c.isVirtualenvEnvironment)(e)}(e)||!!await async function(e){const n=(0,a.getEnvironmentDirFromPath)(e);return i.basename(n)===t.localPoetryEnvDirName&&!!g(i.dirname(n))}(e)};class f{constructor(e,t){this.command=e,this.cwd=t,this.fixCwd()}static async getPoetry(e){if(g(e))return(void 0===f.poetryPromise.get(e)||(0,d.isTestExecution)())&&f.poetryPromise.set(e,f.locate(e)),f.poetryPromise.get(e)}static async locate(e){(0,h.traceVerbose)("Getting poetry for cwd "+e);for(const t of function*(){const e=(0,s.getPythonSetting)("poetryPath");e&&"poetry"!==e&&(yield e),yield"poetry";const t=(0,o.getUserHomeDir)();if(t){const e=i.join(t,".poetry","bin","poetry");(0,s.pathExistsSync)(e)&&(yield e)}}()){(0,h.traceVerbose)(`Probing poetry binary for ${e}: ${t}`);const n=new f(t,e);if(void 0!==await n.getEnvList())return(0,h.traceVerbose)(`Found poetry via filesystem probing for ${e}: ${t}`),n;(0,h.traceVerbose)(`Failed to find poetry for ${e}: ${t}`)}(0,h.traceVerbose)("No poetry binary found for "+e)}async getEnvList(){return this.getEnvListCached(this.cwd)}async getEnvListCached(e){const t=await this.safeShellExecute(this.command+" env list --full-path");if(!t)return;return(await Promise.all(t.stdout.splitLines().map(async e=>{e.endsWith("(Activated)")&&(e=e.slice(0,-"(Activated)".length));const t=e.trim();return await(0,s.pathExists)(t)?t:void 0}))).filter(e=>void 0!==e).map(e=>e)}async getActiveEnvPath(){return this.getActiveEnvPathCached(this.cwd)}async getActiveEnvPathCached(e){const t=await this.safeShellExecute(this.command+" env info -p",!0);if(t)return t.stdout.trim()}async getVirtualenvsPathSetting(){const e=await this.safeShellExecute(this.command+" config virtualenvs.path");if(e)return e.stdout.trim()}fixCwd(){if((0,o.getOSType)()===o.OSType.Windows&&/^[a-z]:/.test(this.cwd)){const e=this.cwd.split(":");e[0]=e[0].toUpperCase(),this.cwd=e.join(":")}}async safeShellExecute(e,t=!1){const n=new u.StopWatch,r=await(0,s.shellExecute)(e,{cwd:this.cwd,throwOnStdErr:!0,timeout:5e4}).catch(e=>{t?(0,h.traceVerbose)(e):(0,h.traceError)(e)});return(0,h.traceVerbose)(`Time taken to run ${e} in ms`,n.elapsedTime),r}}function g(e){const t=i.join(e,"pyproject.toml");if(!(0,s.pathExistsSync)(t))return!1;return!!(0,s.readFileSync)(t).includes("[tool.poetry]")}f.poetryPromise=new Map,r([(0,l.cache)(3e4,!0,1e4)],f.prototype,"getEnvListCached",null),r([(0,l.cache)(2e4,!0,1e4)],f.prototype,"getActiveEnvPathCached",null),t.Poetry=f,t.isPoetryEnvironmentRelatedToFolder=async function(e,t,n){const r=n?new f(n,t):await f.getPoetry(t),i=await(null==r?void 0:r.getActiveEnvPath());return!!i&&(0,s.isParentPath)(e,i)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.getArchitectureDisplayName=t.RegistryImplementation=void 0;const i=n(0),o=n(5),s=n(19),a=n(13);var c;!function(e){e.x86="x86",e.x64="x64"}(c||(c={}));let u=class{async getKeys(e,t,r){return async function(e){const t=n(124);return new Promise(n=>{new t(e).keys((e,t)=>{if(e||!Array.isArray(t))return n([]);n(t.filter(e=>"string"==typeof e.key).map(e=>e.key))})})}({hive:d(t),arch:l(r),key:e}).catch(e=>((0,o.traceError)("Fetching keys from windows registry resulted in an error",e),[]))}async getValue(e,t,r,i=""){return async function(e,t=""){const r=n(124);return new Promise(n=>{new r(e).get(t,(e,t)=>{if(e||!t||"string"!=typeof t.value)return n(void 0);n(t.value)})})}({hive:d(t),arch:l(r),key:e},i).catch(e=>{(0,o.traceError)("Fetching key value from windows registry resulted in an error",e)})}};function l(e){switch(e){case s.Architecture.x86:return c.x86;case s.Architecture.x64:return c.x64;default:return}}function d(e){const t=n(124);switch(e){case a.RegistryHive.HKCU:return t.HKCU;case a.RegistryHive.HKLM:return t.HKLM;default:return}}u=r([(0,i.injectable)()],u),t.RegistryImplementation=u,t.getArchitectureDisplayName=function(e){switch(e){case s.Architecture.x64:return"64-bit";case s.Architecture.x86:return"32-bit";default:return""}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unittestDiscovery=t.runAdapter=void 0;const r=n(3),i=n(227),o=r.join(i._SCRIPTS_DIR,"testing_tools");t.runAdapter=function(e){return[r.join(o,"run_adapter.py"),...e]},t.unittestDiscovery=function(e){return[r.join(o,"unittest_discovery.py"),...e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPythonBinFromPosixPaths=t.commonPosixBinPaths=t.matchPythonBinFilename=t.matchBasicPythonBinFilename=void 0;const r=n(26),i=n(52),o=n(3),s=n(20),a=n(149),c=n(24),u=n(5);function l(e){return/^python(\d+(\.\d+)?)?$/.test(o.basename(e))}async function d(e){return(await r.promises.readdir(e,{withFileTypes:!0})).filter(e=>!e.isDirectory()).map(t=>o.join(e,t.name)).filter(l)}t.matchBasicPythonBinFilename=function(e){return"python"===o.basename(e)},t.matchPythonBinFilename=l,t.commonPosixBinPaths=async function(){const e=(0,a.getSearchPathEntries)(),t=Array.from(new Set(["/bin","/etc","/lib","/lib/x86_64-linux-gnu","/lib64","/sbin","/snap/bin","/usr/bin","/usr/games","/usr/include","/usr/lib","/usr/lib/x86_64-linux-gnu","/usr/lib64","/usr/libexec","/usr/local","/usr/local/bin","/usr/local/etc","/usr/local/games","/usr/local/lib","/usr/local/sbin","/usr/sbin","/usr/share","~/.local/bin"].concat(e))),n=await Promise.all(t.map(e=>i.pathExists(e)));return t.filter((e,t)=>n[t])},t.getPythonBinFromPosixPaths=async function(e){var t;const n=new Map;for(const r of e){const e=await d(r);for(const r of e)try{const e=await(0,c.resolveSymbolicLink)(r);n.has(e)?null===(t=n.get(e))||void 0===t||t.push(r):n.set(e,[r]),(0,u.traceInfo)(`Found: ${r} --\x3e ${e}`)}catch(e){(0,u.traceError)("Failed to resolve symbolic link: ",e)}}const r=Array.from(n.keys()).map(e=>{var t;return function(e){let t=e[0].length,n=e[0];for(const r of e)r.length<=t&&(t=r.length,n=r);return n}([e,...null!==(t=n.get(e))&&void 0!==t?t:[]])});return(0,s.uniq)(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFormatterHelper=void 0,t.IFormatterHelper=Symbol("IFormatterHelper")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IS_WINDOWS=void 0,t.IS_WINDOWS=/^win/.test(process.platform)},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductInstaller=t.PythonInstaller=t.DataScienceInstaller=t.TestFrameworkInstaller=t.LinterInstaller=t.FormatterInstaller=t.Product=void 0;const o=n(0),s=n(97);n(12);const a=n(11),c=n(15),u=n(30),l=n(8),d=n(9),h=n(4),p=n(10),f=n(25),g=n(1),m=n(14),v=n(22),y=n(154),b=n(180),_=n(94),S=n(5),E=n(63);var P=n(1);Object.defineProperty(t,"Product",{enumerable:!0,get:function(){return P.Product}});const w=new Map([[g.Product.torchProfilerInstallName,new Set([u.EnvironmentType.Conda])]]);class T{constructor(e){this.serviceContainer=e,this.appShell=e.get(h.IApplicationShell),this.configService=e.get(g.IConfigurationService),this.workspaceService=e.get(h.IWorkspaceService),this.productService=e.get(_.IProductService),this.persistentStateFactory=e.get(g.IPersistentStateFactory)}promptToInstall(e,t,n,r){const i=t&&(0,v.isResource)(t)?this.workspaceService.getWorkspaceFolder(t):void 0,o=`${e}${i?i.uri.fsPath:""}`;if(T.PromptPromises.has(o))return T.PromptPromises.get(o);const s=this.promptToInstallImplementation(e,t,n,r);return T.PromptPromises.set(o,s),s.then(()=>T.PromptPromises.delete(o)).ignoreErrors(),s.catch(()=>T.PromptPromises.delete(o)).ignoreErrors(),s}async install(e,t,n,r,i){if(e===g.Product.unittest)return g.InstallerResponse.Installed;const o=this.serviceContainer.get(_.IInstallationChannelManager),s=await o.getInstallationChannel(e,t);return s?(await s.installModule(e,t,n,r,i).catch(t=>(0,S.traceError)(`Error in installing the product '${b.ProductNames.get(e)}', ${t}`)),this.isInstalled(e,t).then(t=>((0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:s.displayName,productName:b.ProductNames.get(e),isInstalled:t}),t?g.InstallerResponse.Installed:g.InstallerResponse.Ignore))):((0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:"unavailable",productName:b.ProductNames.get(e)}),g.InstallerResponse.Ignore)}async isProductVersionCompatible(e,t,n){const r=await this.getProductSemVer(e,n);return r?s.satisfies(r,t)?g.ProductInstallStatus.Installed:g.ProductInstallStatus.NeedsUpgrade:g.ProductInstallStatus.NotInstalled}async getProductSemVer(e,t){const n=(0,v.isResource)(t)?void 0:t,r=(0,v.isResource)(t)?t:void 0,i=this.getExecutableNameFromSettings(e,r);let o;if(this.isExecutableAModule(e,r)){const e=await this.serviceContainer.get(f.IPythonExecutionFactory).createActivatedEnvironment({resource:r,interpreter:n,allowEnvironmentFetchExceptions:!0});o=await e.getModuleVersion(i)}else{const e=await this.serviceContainer.get(f.IProcessServiceFactory).create(r);o=(await e.exec(i,["--version"],{mergeStdOutErr:!0})).stdout.trim()}if(!o)return null;try{return s.coerce(o)}catch(t){return(0,S.traceError)(`Unable to parse version ${o} for product ${e}: `,t),null}}async isInstalled(e,t){if(e===g.Product.unittest)return!0;const n=(0,v.isResource)(t)?void 0:t,r=(0,v.isResource)(t)?t:void 0,i=this.getExecutableNameFromSettings(e,r);if(this.isExecutableAModule(e,r)){return(await this.serviceContainer.get(f.IPythonExecutionFactory).createActivatedEnvironment({resource:r,interpreter:n,allowEnvironmentFetchExceptions:!0})).isModuleInstalled(i)}return(await this.serviceContainer.get(f.IProcessServiceFactory).create(r)).exec(i,["--version"],{mergeStdOutErr:!0}).then(()=>!0).catch(()=>!1)}getExecutableNameFromSettings(e,t){const n=this.productService.getProductType(e);return this.serviceContainer.get(_.IProductPathService,n).getExecutableNameFromSettings(e,t)}isExecutableAModule(e,t){const n=this.productService.getProductType(e);return this.serviceContainer.get(_.IProductPathService,n).isExecutableAModule(e,t)}}T.PromptPromises=new Map;class C extends T{async promptToInstallImplementation(e,t,n,r){const i=this.persistentStateFactory.createGlobalPersistentState("FORMATTER_NOT_INSTALLED_KEY",!1);if(i.value)return g.InstallerResponse.Ignore;const o=[g.Product.autopep8,g.Product.black,g.Product.yapf],s=o.map(e=>b.ProductNames.get(e)),a=b.ProductNames.get(e);s.splice(s.indexOf(a),1);const c=s.map(e=>m.Products.useFormatter().format(e)),u=m.Common.bannerLabelYes(),l=[...c,m.Common.doNotShowAgain()];let d=m.Products.formatterNotInstalled().format(a);if(this.isExecutableAModule(e,t))l.splice(0,0,u);else{const n=this.getExecutableNameFromSettings(e,t);d=m.Products.invalidFormatterPath().format(a,n)}const h=await this.appShell.showErrorMessage(d,...l);if(h===u)return this.install(e,t,n);if(h===m.Common.doNotShowAgain())return i.updateValue(!0),g.InstallerResponse.Ignore;if("string"==typeof h)for(const e of o){const r=b.ProductNames.get(e);if(h.endsWith(r))return await this.configService.updateSetting("formatting.provider",r,t),this.install(e,t,n)}return g.InstallerResponse.Ignore}}t.FormatterInstaller=C;class I extends T{constructor(e){super(e),this.serviceContainer=e}async promptToInstallImplementation(e,t,n,r){return this.oldPromptForInstallation(e,t,n)}getStoredResponse(e){return!0===this.serviceContainer.get(g.IPersistentStateFactory).createGlobalPersistentState(e,void 0).value}async oldPromptForInstallation(e,t,n){const r=b.ProductNames.get(e),i=m.Common.install(),o=m.Common.doNotShowAgain(),s=r+"_DisableLinterInstallPrompt",a=m.Linters.selectLinter();if(!0===this.getStoredResponse(s))return g.InstallerResponse.Ignore;const c=[a,o];let u=`Linter ${r} is not installed.`;if(this.isExecutableAModule(e,t))c.splice(0,0,i);else{u=`Path to the ${r} linter is invalid (${this.getExecutableNameFromSettings(e,t)})`}const f=await this.appShell.showErrorMessage(u,...c);if(f===i)return(0,l.sendTelemetryEvent)(d.EventName.LINTER_NOT_INSTALLED_PROMPT,void 0,{tool:r,action:"install"}),this.install(e,t,n);if(f===o)return await this.setStoredResponse(s,!0),(0,l.sendTelemetryEvent)(d.EventName.LINTER_NOT_INSTALLED_PROMPT,void 0,{tool:r,action:"disablePrompt"}),g.InstallerResponse.Ignore;if(f===a){(0,l.sendTelemetryEvent)(d.EventName.LINTER_NOT_INSTALLED_PROMPT,void 0,{action:"select"});const e=this.serviceContainer.get(h.ICommandManager);await e.executeCommand(p.Commands.Set_Linter)}return g.InstallerResponse.Ignore}async setStoredResponse(e,t){const n=this.serviceContainer.get(g.IPersistentStateFactory).createGlobalPersistentState(e,void 0);n&&n.value!==t&&await n.updateValue(t)}}t.LinterInstaller=I;class R extends T{async promptToInstallImplementation(e,t,n,r){const i=b.ProductNames.get(e),o=[];let s=`Test framework ${i} is not installed. Install?`;if(this.isExecutableAModule(e,t))o.push("Yes","No");else{s=`Path to the ${i} test framework is invalid (${this.getExecutableNameFromSettings(e,t)})`}return"Yes"===await this.appShell.showErrorMessage(s,...o)?this.install(e,t,n):g.InstallerResponse.Ignore}}t.TestFrameworkInstaller=R;class O extends T{async install(e,t,n,r){var i,o,s,a;if((0,v.isResource)(t))throw new Error("All data science packages require an interpreter be passed in");const c=t;let h=await this.serviceContainer.get(_.IInstallationChannelManager).getInstallationChannels(c);const p=(0,y.translateProductToModule)(e),f=`${(null===(i=c.version)||void 0===i?void 0:i.major)||""}.${(null===(o=c.version)||void 0===o?void 0:o.minor)||""}.${(null===(s=c.version)||void 0===s?void 0:s.patch)||""}`;if(r&&r&_.ModuleInstallFlags.installPipIfRequired&&c.envType!==u.EnvironmentType.Conda&&!h.some(e=>e.type===u.ModuleInstallerType.Pip)){const e=this.serviceContainer.getAll(_.IModuleInstaller).find(e=>e.type===u.ModuleInstallerType.Pip);e?((0,S.traceInfo)(`Installing pip as its not available to install ${p}.`),await e.installModule(g.Product.pip,c,n).catch(e=>(0,S.traceError)(`Error in installing the module '${p} as Pip could not be installed', ${e}`)),await this.isInstalled(g.Product.pip,c).then(t=>{(0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:e.displayName,requiredInstaller:u.ModuleInstallerType.Pip,version:f,envType:c.envType,isInstalled:t,productName:b.ProductNames.get(g.Product.pip)})}).catch(v.noop),h=await this.serviceContainer.get(_.IInstallationChannelManager).getInstallationChannels(c)):((0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:"unavailable",requiredInstaller:u.ModuleInstallerType.Pip,productName:b.ProductNames.get(g.Product.pip),version:f,envType:c.envType}),(0,S.traceError)("Unable to install pip when its required."))}const E=!(null===(a=w.get(e))||void 0===a?void 0:a.has(u.EnvironmentType.Conda));let P=u.ModuleInstallerType.Unknown;if(c.envType===u.EnvironmentType.Conda&&E)P=u.ModuleInstallerType.Conda;else if(c.envType!==u.EnvironmentType.Conda||E)switch(c.envType){case u.EnvironmentType.Pipenv:P=u.ModuleInstallerType.Pipenv;break;case u.EnvironmentType.Poetry:P=u.ModuleInstallerType.Poetry;break;default:P=u.ModuleInstallerType.Pip}else(0,S.traceInfo)(`Interpreter type is conda but package ${p} is not available through conda, using pip instead.`),P=u.ModuleInstallerType.Pip;const T=h.find(e=>e.type===P);return T?(await T.installModule(e,c,n,r).catch(e=>(0,S.traceError)(`Error in installing the module '${p}', ${e}`)),this.isInstalled(e,c).then(t=>((0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:T.displayName||"",requiredInstaller:P,version:f,envType:c.envType,isInstalled:t,productName:b.ProductNames.get(e)}),t?g.InstallerResponse.Installed:g.InstallerResponse.Ignore))):(this.appShell.showErrorMessage(m.Installer.couldNotInstallLibrary().format(p)).then(v.noop,v.noop),(0,l.sendTelemetryEvent)(d.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:"unavailable",requiredInstaller:P,productName:b.ProductNames.get(e),version:f,envType:c.envType}),g.InstallerResponse.Ignore)}async promptToInstallImplementation(e,t,n,r){const i=b.ProductNames.get(e);return"Yes"===await this.appShell.showErrorMessage(m.Installer.dataScienceInstallPrompt().format(i),"Yes","No")?this.install(e,t,n):g.InstallerResponse.Ignore}}t.DataScienceInstaller=O;let D=class{constructor(e){this.serviceContainer=e}async isInstalled(e,t){var n;if(e!==g.Product.python)throw new Error(e+" cannot be installed via conda python installer");const r=this.serviceContainer.get(a.IInterpreterService),i=(0,v.isResource)(t)?await r.getActiveInterpreter(t):t;return!i||!((null===(n=i.envPath)||void 0===n?void 0:n.length)&&i.envType===u.EnvironmentType.Conda&&!(0,E.isParentPath)(null==i?void 0:i.path,i.envPath))}async install(e,t,n,r){if(e!==g.Product.python)throw new Error(e+" cannot be installed via python installer");const i=this.serviceContainer.getAll(_.IModuleInstaller).find(e=>e.type===u.ModuleInstallerType.Conda);if(!i||!await i.isSupported(t))return(0,S.traceError)("Conda installer not available for installing python in the given environment"),g.InstallerResponse.Ignore;const o=(0,y.translateProductToModule)(e);return await i.installModule(g.Product.python,t,void 0,void 0,{installAsProcess:!0}).catch(e=>(0,S.traceError)(`Error in installing the module '${o}', ${e}`)),this.isInstalled(e,t).then(e=>e?g.InstallerResponse.Installed:g.InstallerResponse.Ignore)}async promptToInstall(e,t,n,r){return g.InstallerResponse.Ignore}async isProductVersionCompatible(e,t,n){return g.ProductInstallStatus.Installed}};D=r([i(0,(0,o.inject)(c.IServiceContainer))],D),t.PythonInstaller=D;let x=class{constructor(e){this.serviceContainer=e,this.productService=e.get(_.IProductService),this.interpreterService=this.serviceContainer.get(a.IInterpreterService)}dispose(){}async promptToInstall(e,t,n,r){return((0,v.isResource)(t)?await this.interpreterService.getActiveInterpreter(t):t)?this.createInstaller(e).promptToInstall(e,t,n,r):g.InstallerResponse.Ignore}async isProductVersionCompatible(e,t,n){return this.createInstaller(e).isProductVersionCompatible(e,t,n)}async install(e,t,n,r,i){return this.createInstaller(e).install(e,t,n,r,i)}async isInstalled(e,t){return this.createInstaller(e).isInstalled(e,t)}translateProductToModuleName(e){return(0,y.translateProductToModule)(e)}createInstaller(e){switch(this.productService.getProductType(e)){case g.ProductType.Formatter:return new C(this.serviceContainer);case g.ProductType.Linter:return new I(this.serviceContainer);case g.ProductType.TestFramework:return new R(this.serviceContainer);case g.ProductType.DataScience:return new O(this.serviceContainer);case g.ProductType.Python:return new D(this.serviceContainer)}throw new Error("Unknown product "+e)}};x=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],x),t.ProductInstaller=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleNotInstalledError=void 0;class r extends Error{constructor(e){super(`Module '${e}' not installed.`)}}t.ModuleNotInstalledError=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedError=t.ErrorUtils=void 0;const r=n(37);t.ErrorUtils=class{static outputHasModuleNotInstalledError(e,t){return!(!t||!(t.indexOf("No module named "+e)>0||t.indexOf(`No module named '${e}'`)>0))}};class i extends Error{constructor(e,t){super(e),this.stack=`${new Error("").stack}${r.EOL}${r.EOL}${t.stack}`}}t.WrappedError=i},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardPrompt=void 0;const o=n(0),s=n(20),a=n(4),c=n(10),u=n(1),l=n(14),d=n(8),h=n(9),p=n(110);var f;!function(e){e.ShowNativeTensorBoardPrompt="showNativeTensorBoardPrompt"}(f||(f={}));let g=class{constructor(e,t,n){this.applicationShell=e,this.commandManager=t,this.persistentStateFactory=n,this.enabledInCurrentSession=!0,this.waitingForUserSelection=!1,this.sendTelemetryOnce=(0,s.once)(e=>{(0,d.sendTelemetryEvent)(h.EventName.TENSORBOARD_ENTRYPOINT_SHOWN,void 0,{entrypoint:p.TensorBoardEntrypoint.prompt,trigger:e})}),this.state=this.persistentStateFactory.createWorkspacePersistentState(f.ShowNativeTensorBoardPrompt,!0),this.enabled=this.isPromptEnabled()}async showNativeTensorBoardPrompt(e){if(this.enabled&&this.enabledInCurrentSession&&!this.waitingForUserSelection){const t=l.Common.bannerLabelYes(),n=l.Common.bannerLabelNo(),r=l.Common.doNotShowAgain(),i=[t,n,r];this.waitingForUserSelection=!0,this.sendTelemetryOnce(e);const o=await this.applicationShell.showInformationMessage(l.TensorBoard.nativeTensorBoardPrompt(),...i);this.waitingForUserSelection=!1,this.enabledInCurrentSession=!1;let s=p.TensorBoardPromptSelection.None;switch(o){case t:s=p.TensorBoardPromptSelection.Yes,await this.commandManager.executeCommand(c.Commands.LaunchTensorBoard,p.TensorBoardEntrypoint.prompt,e);break;case r:s=p.TensorBoardPromptSelection.DoNotAskAgain,await this.disablePrompt();break;case n:s=p.TensorBoardPromptSelection.No}(0,d.sendTelemetryEvent)(h.EventName.TENSORBOARD_LAUNCH_PROMPT_SELECTION,void 0,{selection:s})}}isPromptEnabled(){return this.state.value}async disablePrompt(){await this.state.updateValue(!1)}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IApplicationShell)),i(1,(0,o.inject)(a.ICommandManager)),i(2,(0,o.inject)(u.IPersistentStateFactory))],g),t.TensorBoardPrompt=g},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDocumentLines=t.ImportTracker=void 0;const s=n(0),a=n(3),c=n(173),u=n(8),l=n(4),d=n(10);n(12);const h=n(1),p=n(22),f=n(188),g=n(9),m=/^\s*(from (?\w+)(?:\.\w+)* import \w+(?:, \w+)*(?: as \w+)?|import (?\w+(?:, \w+)*)(?: as \w+)?)$/,v=(0,d.isTestExecution)();let y=r=class{constructor(e,t){this.documentManager=e,this.disposables=t,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!0},this.pendingChecks=new Map,this.hashFn=n(642).sha256,this.documentManager.onDidOpenTextDocument(e=>this.onOpenedOrSavedDocument(e),this,this.disposables),this.documentManager.onDidSaveTextDocument(e=>this.onOpenedOrSavedDocument(e),this,this.disposables)}dispose(){this.pendingChecks.clear()}async activate(){this.documentManager.textDocuments.forEach(e=>this.onOpenedOrSavedDocument(e))}static hasModuleImport(e){return this.sentMatches.has(e)}onOpenedOrSavedDocument(e){".py"===a.extname(e.fileName).toLowerCase()&&this.scheduleDocument(e)}scheduleDocument(e){this.scheduleCheck(e.fileName,this.checkDocument.bind(this,e))}scheduleCheck(e,t){const n=this.pendingChecks.get(e);n&&((0,c.clearTimeout)(n),this.pendingChecks.delete(e)),v?t():this.pendingChecks.set(e,(0,c.setTimeout)(t,5e3))}checkDocument(e){this.pendingChecks.delete(e.fileName);const t=b(e);this.lookForImports(t)}sendTelemetry(e){if(r.sentMatches.has(e))return;r.sentMatches.add(e);const t=this.hashFn().update(e).digest("hex");(0,u.sendTelemetryEvent)(g.EventName.HASHED_PACKAGE_NAME,void 0,{hashedName:t})}lookForImports(e){try{for(const t of e){const e=t?m.exec(t):null;if(null!==e&&void 0!==e.groups)if(void 0!==e.groups.fromImport)this.sendTelemetry(e.groups.fromImport);else if(void 0!==e.groups.importImport){e.groups.importImport.split(",").map(e=>e.trim()).forEach(e=>this.sendTelemetry(e))}t&&f.TorchProfilerImportRegEx.test(t)&&(0,u.sendTelemetryEvent)(g.EventName.TENSORBOARD_TORCH_PROFILER_IMPORT)}}catch(e){(0,p.noop)()}}};function b(e){return Array(Math.min(e.lineCount,1e3)).fill("").map((t,n)=>{const r=e.lineAt(n);if(r&&!r.isEmptyOrWhitespace)return r.text}).filter(e=>e)}y.sentMatches=new Set,i([(0,u.captureTelemetry)(g.EventName.HASHED_PACKAGE_PERF)],y.prototype,"checkDocument",null),y=r=i([(0,s.injectable)(),o(0,(0,s.inject)(l.IDocumentManager)),o(1,(0,s.inject)(h.IDisposableRegistry))],y),t.ImportTracker=y,t.getDocumentLines=b},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalCodeExecutionProvider=void 0;const o=n(0),s=n(3),a=n(4);n(12);const c=n(13),u=n(28),l=n(1),d=n(11),h=n(99);let p=class{constructor(e,t,n,r,i,o){this.terminalServiceFactory=e,this.configurationService=t,this.workspace=n,this.disposables=r,this.platformService=i,this.interpreterService=o,this.hasRanOutsideCurrentDrive=!1}async executeFile(e){await this.setCwdForFileExecution(e);const t=e.fsPath.fileToCommandArgumentForPythonExt(),{command:n,args:r}=await this.getExecuteFileArgs(e,[t]);await this.getTerminalService(e).sendCommand(n,r)}async execute(e,t){e&&0!==e.trim().length&&(await this.initializeRepl(),await this.getTerminalService(t).sendText(e))}async initializeRepl(e){this.replActive&&await this.replActive?await this._terminalService.show():(this.replActive=new Promise(async t=>{const n=await this.getExecutableInfo(e);await this.getTerminalService(e).sendCommand(n.command,n.args),setTimeout(()=>t(!0),1e3)}),await this.replActive)}async getExecutableInfo(e,t=[]){var n;const r=this.configurationService.getSettings(e),i=await this.interpreterService.getActiveInterpreter(e),o=null!==(n=null==i?void 0:i.path)&&void 0!==n?n:r.pythonPath,s=this.platformService.isWindows?o.replace(/\\/g,"/"):o,a=r.terminal.launchArgs;return(0,h.buildPythonExecInfo)(s,[...a,...t])}async getExecuteFileArgs(e,t=[]){return this.getExecutableInfo(e,t)}getTerminalService(e){return this._terminalService||(this._terminalService=this.terminalServiceFactory.getTerminalService({resource:e,title:this.terminalTitle}),this.disposables.push(this._terminalService.onDidCloseTerminal(()=>{this.replActive=void 0}))),this._terminalService}async setCwdForFileExecution(e){if(!this.configurationService.getSettings(e).terminal.executeInFileDir)return;const t=s.dirname(e.fsPath);if(t.length>0){if(this.platformService.isWindows&&/[a-z]\:/i.test(t)){const n="string"==typeof this.workspace.rootPath?this.workspace.rootPath.replace(/\:.*/g,""):void 0,r=t.replace(/\:.*/g,"");(r!==n||this.hasRanOutsideCurrentDrive)&&(this.hasRanOutsideCurrentDrive=!0,await this.getTerminalService(e).sendText(r+":"))}await this.getTerminalService(e).sendText("cd "+t.fileToCommandArgumentForPythonExt())}}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(u.ITerminalServiceFactory)),i(1,(0,o.inject)(l.IConfigurationService)),i(2,(0,o.inject)(a.IWorkspaceService)),i(3,(0,o.inject)(l.IDisposableRegistry)),i(4,(0,o.inject)(c.IPlatformService)),i(5,(0,o.inject)(d.IInterpreterService))],p),t.TerminalCodeExecutionProvider=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterArguments=t.getPositionalArguments=t.getOptionValues=void 0;const r=n(5);t.getOptionValues=function(e,t){const n=[];let r=!1;for(const i of e)r?(n.push(i),r=!1):i.startsWith(t+"=")?n.push(i.substring((t+"=").length)):i===t&&(r=!0);return n},t.getPositionalArguments=function(e,t=[],n=[]){const i=[];return e.forEach((e,o)=>{-1!==n.indexOf(e)?i.push(o):-1!==t.indexOf(e)?(i.push(o),i.push(o+1)):-1!==t.findIndex(t=>e.startsWith(t+"="))?i.push(o):(e.startsWith("-")||e.indexOf("=")>0)&&((0,r.traceWarn)(`Unknown command line option passed into args parser for tests '${e}'. Please report on https://github.com/Microsoft/vscode-python/issues/new`),i.push(o))}),e.filter((e,t)=>-1===i.indexOf(t))},t.filterArguments=function(e,t=[],n=[]){let r=-1;return e.filter((e,i)=>r!==i&&(!(n.indexOf(e)>=0||n.filter(t=>t.endsWith("*")&&e.startsWith(t.slice(0,-1))).length>0)&&(t.indexOf(e)>=0?(r=i+1,!1):!(t.filter(t=>e.startsWith(t+"=")).length>0)&&(-1===e.indexOf("=")&&n.filter(t=>t.endsWith("*")&&e.startsWith(t.slice(0,-1))).length>0?(r=i+1,!1):!(e.indexOf("=")>=0&&n.filter(t=>t.endsWith("*")&&e.startsWith(t.slice(0,-1))).length>0)))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_OUTPUT_CHANNEL=void 0,t.TEST_OUTPUT_CHANNEL="TEST_OUTPUT_CHANNEL"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildProposedApi=t.reportActiveInterpreterChanged=t.reportInterpretersChanged=void 0;const r=n(2),i=n(63),o=n(1),s=n(11),a=n(84),c=new r.EventEmitter;t.reportInterpretersChanged=function(e){c.fire(e)};const u=new r.EventEmitter;function l(e){const t=[""+e.version.major,""+e.version.minor,""+e.version.micro];return e.version.release&&(t.push(""+e.version.release),e.version.sysVersion&&t.push(""+e.version.release)),t}t.reportActiveInterpreterChanged=function(e){u.fire(e)},t.buildProposedApi=function(e,t){const n=t.get(o.IInterpreterPathService),d=t.get(s.IInterpreterService);return{environment:{async getActiveEnvironmentPath(e){const t=await d.getActiveInterpreter(e);if(t)return(0,a.getEnvPath)(t.path,t.envPath)},async getEnvironmentDetails(t,n){let r;if((null==n?void 0:n.useCache)&&(r=e.getEnvs().find(e=>function(e,t){return(0,i.arePathsSame)(e,t.location)||(0,i.arePathsSame)(e,t.executable.filename)}(t,e))),r||(r=await e.resolveEnv(t),r))return{interpreterPath:r.executable.filename,envFolderPath:r.location.length?r.location:void 0,version:l(r),environmentType:[r.kind],metadata:{sysPrefix:r.executable.sysPrefix,bitness:r.arch}}},getEnvironmentPaths(){const t=e.getEnvs().map(e=>(0,a.getEnvPath)(e.executable.filename,e.location));return Promise.resolve(t)},setActiveEnvironment:(e,t)=>n.update(t,r.ConfigurationTarget.WorkspaceFolder,e),async refreshEnvironment(t){await e.triggerRefresh(t?{clearCache:t.clearCache}:void 0);const n=e.getEnvs().map(e=>(0,a.getEnvPath)(e.executable.filename,e.location));return Promise.resolve(n)},getRefreshPromise:()=>e.refreshPromise,onDidEnvironmentsChanged:c.event,onDidActiveEnvironmentChanged:u.event}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchLocationForPattern=t.FileChangeType=void 0;const r=n(2),i=n(5),o=n(113);var s;!function(e){e.Changed="changed",e.Created="created",e.Deleted="deleted"}(s=t.FileChangeType||(t.FileChangeType={})),t.watchLocationForPattern=function(e,t,n){const a=new r.RelativePattern(e,t),c=new o.Disposables;(0,i.traceVerbose)(`Start watching: ${e} with pattern ${t} using VSCode API`);const u=r.workspace.createFileSystemWatcher(a);return c.push(u.onDidCreate(e=>n(s.Created,e.fsPath))),c.push(u.onDidChange(e=>n(s.Changed,e.fsPath))),c.push(u.onDidDelete(e=>n(s.Deleted,e.fsPath))),c}},function(e){e.exports=JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]')},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.PythonSettings=void 0;const i=n(3),o=n(26),s=n(2),a=n(21);n(12);const c=n(8),u=n(9),l=n(214),d=n(130),h=n(10),p=n(233),f=n(53),g=n(74),m=n(19),v=n(150);class y{constructor(e,t,n,r,i){this.interpreterAutoSelectionService=t,this.interpreterPathService=r,this.defaultLS=i,this.downloadLanguageServer=!0,this.envFile="",this.venvPath="",this.venvFolders=[],this.condaPath="",this.pipenvPath="",this.poetryPath="",this.devOptions=[],this.disableInstallationChecks=!1,this.globalModuleInstallation=!1,this.autoUpdateLanguageServer=!0,this.languageServer=a.LanguageServerType.Node,this.languageServerIsDefault=!0,this.changed=new s.EventEmitter,this.disposables=[],this._pythonPath="python",this._defaultInterpreterPath="",this.workspace=n||new d.WorkspaceService,this.workspaceRoot=e,this.initialize()}get onDidChange(){return this.changed.event}get pythonPath(){return this._pythonPath}set pythonPath(e){if(this._pythonPath!==e)try{this._pythonPath=this.getPythonExecutable(e)}catch(t){this._pythonPath=e}}get defaultInterpreterPath(){return this._defaultInterpreterPath}set defaultInterpreterPath(e){if(this._defaultInterpreterPath!==e)try{this._defaultInterpreterPath=this.getPythonExecutable(e)}catch(t){this._defaultInterpreterPath=e}}static getInstance(e,t,n,r,i){n=n||new d.WorkspaceService;const o=y.getSettingsUriAndTarget(e,n).uri,s=o?o.fsPath:"";if(!y.pythonSettings.has(s)){const a=new y(o,t,n,r,i);y.pythonSettings.set(s,a);const l=n.getConfiguration("editor",e||null),d=!!l&&l.get("formatOnType",!1);(0,c.sendTelemetryEvent)(u.EventName.FORMAT_ON_TYPE,void 0,{enabled:d})}return y.pythonSettings.get(s)}static getSettingsUriAndTarget(e,t){t=t||new d.WorkspaceService;const n=e?t.getWorkspaceFolder(e):void 0;let r=n?n.uri:void 0;!r&&Array.isArray(t.workspaceFolders)&&t.workspaceFolders.length>0&&(r=t.workspaceFolders[0].uri);return{uri:r,target:r?s.ConfigurationTarget.WorkspaceFolder:s.ConfigurationTarget.Global}}static dispose(){if(!(0,h.isTestExecution)())throw new Error("Dispose can only be called from unit tests");y.pythonSettings.forEach(e=>e&&e.dispose()),y.pythonSettings.clear()}static toSerializable(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;n.includes("Manager")||n.includes("Service")||n.includes("onDid")||(t[n]=r)}),t}dispose(){this.disposables.forEach(e=>e&&e.dispose()),this.disposables=[]}update(e){var t,n,r,i;const o=null===(t=this.workspaceRoot)||void 0===t?void 0:t.fsPath,c=new g.SystemVariables(void 0,o,this.workspace);this.pythonPath=this.getPythonPath(c,o);const u=c.resolveAny(e.get("defaultInterpreterPath"));if(this.defaultInterpreterPath=u||h.DEFAULT_INTERPRETER_SETTING,this.defaultInterpreterPath===h.DEFAULT_INTERPRETER_SETTING){const e=this.interpreterAutoSelectionService.getAutoSelectedInterpreter(this.workspaceRoot);this.defaultInterpreterPath=null!==(n=null==e?void 0:e.path)&&void 0!==n?n:this.defaultInterpreterPath}this.defaultInterpreterPath=b(this.defaultInterpreterPath,o),this.venvPath=c.resolveAny(e.get("venvPath")),this.venvFolders=c.resolveAny(e.get("venvFolders"));const d=c.resolveAny(e.get("condaPath"));this.condaPath=d&&d.length>0?b(d,o):d;const p=c.resolveAny(e.get("pipenvPath"));this.pipenvPath=p&&p.length>0?b(p,o):p;const f=c.resolveAny(e.get("poetryPath"));this.poetryPath=f&&f.length>0?b(f,o):f,this.downloadLanguageServer=c.resolveAny(e.get("downloadLanguageServer",!0)),this.autoUpdateLanguageServer=c.resolveAny(e.get("autoUpdateLanguageServer",!0));let m=e.get("languageServer");m=c.resolveAny(m),m&&"Default"!==m&&"Microsoft"!==m&&Object.values(a.LanguageServerType).includes(m)?"JediLSP"===m?(this.languageServer=a.LanguageServerType.Jedi,this.languageServerIsDefault=!1):(this.languageServer=m,this.languageServerIsDefault=!1):(this.languageServer=null!==(i=null===(r=this.defaultLS)||void 0===r?void 0:r.defaultLSType)&&void 0!==i?i:a.LanguageServerType.None,this.languageServerIsDefault=!0);const v=c.resolveAny(e.get("autoComplete"));this.autoComplete?Object.assign(this.autoComplete,v):this.autoComplete=v;const y=e.get("envFile");this.envFile=c.resolveAny(y),(0,l.sendSettingTelemetry)(this.workspace,y),this.devOptions=c.resolveAny(e.get("devOptions")),this.devOptions=Array.isArray(this.devOptions)?this.devOptions:[];const _=c.resolveAny(e.get("linting"));this.linting?Object.assign(this.linting,_):this.linting=_,this.disableInstallationChecks=!0===e.get("disableInstallationCheck"),this.globalModuleInstallation=!0===e.get("globalModuleInstallation");const S=c.resolveAny(e.get("sortImports"));this.sortImports?Object.assign(this.sortImports,S):this.sortImports=S,this.sortImports=this.sortImports?this.sortImports:{path:"",args:[]},this.linting=this.linting?this.linting:{enabled:!1,cwd:void 0,ignorePatterns:[],flake8Args:[],flake8Enabled:!1,flake8Path:"flake8",lintOnSave:!1,maxNumberOfProblems:100,mypyArgs:[],mypyEnabled:!1,mypyPath:"mypy",banditArgs:[],banditEnabled:!1,banditPath:"bandit",pycodestyleArgs:[],pycodestyleEnabled:!1,pycodestylePath:"pycodestyle",pylamaArgs:[],pylamaEnabled:!1,pylamaPath:"pylama",prospectorArgs:[],prospectorEnabled:!1,prospectorPath:"prospector",pydocstyleArgs:[],pydocstyleEnabled:!1,pydocstylePath:"pydocstyle",pylintArgs:[],pylintEnabled:!1,pylintPath:"pylint",pylintCategorySeverity:{convention:s.DiagnosticSeverity.Hint,error:s.DiagnosticSeverity.Error,fatal:s.DiagnosticSeverity.Error,refactor:s.DiagnosticSeverity.Hint,warning:s.DiagnosticSeverity.Warning},pycodestyleCategorySeverity:{E:s.DiagnosticSeverity.Error,W:s.DiagnosticSeverity.Warning},flake8CategorySeverity:{E:s.DiagnosticSeverity.Error,W:s.DiagnosticSeverity.Warning,F:s.DiagnosticSeverity.Warning},mypyCategorySeverity:{error:s.DiagnosticSeverity.Error,note:s.DiagnosticSeverity.Hint}},this.linting.pylintPath=b(c.resolveAny(this.linting.pylintPath),o),this.linting.flake8Path=b(c.resolveAny(this.linting.flake8Path),o),this.linting.pycodestylePath=b(c.resolveAny(this.linting.pycodestylePath),o),this.linting.pylamaPath=b(c.resolveAny(this.linting.pylamaPath),o),this.linting.prospectorPath=b(c.resolveAny(this.linting.prospectorPath),o),this.linting.pydocstylePath=b(c.resolveAny(this.linting.pydocstylePath),o),this.linting.mypyPath=b(c.resolveAny(this.linting.mypyPath),o),this.linting.banditPath=b(c.resolveAny(this.linting.banditPath),o),this.linting.cwd&&(this.linting.cwd=b(c.resolveAny(this.linting.cwd),o));const E=c.resolveAny(e.get("formatting"));this.formatting?Object.assign(this.formatting,E):this.formatting=E,this.formatting=this.formatting?this.formatting:{autopep8Args:[],autopep8Path:"autopep8",provider:"autopep8",blackArgs:[],blackPath:"black",yapfArgs:[],yapfPath:"yapf"},this.formatting.autopep8Path=b(c.resolveAny(this.formatting.autopep8Path),o),this.formatting.yapfPath=b(c.resolveAny(this.formatting.yapfPath),o),this.formatting.blackPath=b(c.resolveAny(this.formatting.blackPath),o);const P=c.resolveAny(e.get("testing"));this.testing?Object.assign(this.testing,P):(this.testing=P,(0,h.isTestExecution)()&&!this.testing&&(this.testing={pytestArgs:[],unittestArgs:[],promptToConfigure:!0,debugPort:3e3,pytestEnabled:!1,unittestEnabled:!1,pytestPath:"pytest",autoTestDiscoverOnSaveEnabled:!0})),this.testing=this.testing?this.testing:{promptToConfigure:!0,debugPort:3e3,pytestArgs:[],pytestEnabled:!1,pytestPath:"pytest",unittestArgs:[],unittestEnabled:!1,autoTestDiscoverOnSaveEnabled:!0},this.testing.pytestPath=b(c.resolveAny(this.testing.pytestPath),o),this.testing.cwd&&(this.testing.cwd=b(c.resolveAny(this.testing.cwd),o)),this.testing.pytestArgs=this.testing.pytestArgs.map(e=>c.resolveAny(e)),this.testing.unittestArgs=this.testing.unittestArgs.map(e=>c.resolveAny(e));const w=c.resolveAny(e.get("terminal"));this.terminal?Object.assign(this.terminal,w):(this.terminal=w,(0,h.isTestExecution)()&&!this.terminal&&(this.terminal={})),this.terminal=this.terminal?this.terminal:{executeInFileDir:!0,launchArgs:[],activateEnvironment:!0,activateEnvInCurrentTerminal:!1};const T=c.resolveAny(e.get("experiments"));this.experiments?Object.assign(this.experiments,T):this.experiments=T,this.experiments=this.experiments?this.experiments:{enabled:!0,optInto:[],optOutFrom:[]},this.tensorBoard=e.get("tensorBoard")}getPythonExecutable(e){return function(e){if("python"===(e=v(e))||-1===e.indexOf(i.sep)||i.basename(e)===i.dirname(e))return e;if(_(e))return e;const t=["python","python4","python3.6","python3.5","python3","python2.7","python2","python3.7","python3.8","python3.9"];for(let n of t)if(p.IS_WINDOWS){if(n+=".exe",_(i.join(e,n)))return i.join(e,n);if(_(i.join(e,"Scripts",n)))return i.join(e,"Scripts",n)}else{if(_(i.join(e,n)))return i.join(e,n);if(_(i.join(e,"bin",n)))return i.join(e,"bin",n)}return e}(e)}onWorkspaceFoldersChanged(){const e=this.workspace.workspaceFolders.map(e=>e.uri.fsPath),t=Array.from(y.pythonSettings.keys()).filter(t=>e.indexOf(t)<0);if(t.length>0)for(const e of t)y.pythonSettings.delete(e)}initialize(){const e=()=>{const e=this.workspace.getConfiguration("python",this.workspaceRoot);this.update(e),this.debounceChangeNotification()};this.disposables.push(this.workspace.onDidChangeWorkspaceFolders(this.onWorkspaceFoldersChanged,this)),this.disposables.push(this.interpreterAutoSelectionService.onDidChangeAutoSelectedInterpreter(e.bind(this))),this.disposables.push(this.workspace.onDidChangeConfiguration(t=>{t.affectsConfiguration("python")&&e()})),this.interpreterPathService&&this.disposables.push(this.interpreterPathService.onDidChange(e.bind(this)));const t=this.workspace.getConfiguration("python",this.workspaceRoot);t&&this.update(t)}debounceChangeNotification(){this.changed.fire()}getPythonPath(e,t){if(this.pythonPath=e.resolveAny(this.interpreterPathService.get(this.workspaceRoot)),!process.env.CI_DISABLE_AUTO_SELECTION&&(0===this.pythonPath.length||"python"===this.pythonPath)&&this.interpreterAutoSelectionService){const e=this.interpreterAutoSelectionService.getAutoSelectedInterpreter(this.workspaceRoot);e&&(this.pythonPath=e.path,this.workspaceRoot&&this.interpreterAutoSelectionService.setWorkspaceInterpreter(this.workspaceRoot,e).ignoreErrors())}return b(this.pythonPath,t)}}function b(e,t){return t||(t=__dirname),e=v(e),(0,h.isTestExecution)()&&!e?t:-1===e.indexOf(i.sep)||i.isAbsolute(e)?e:i.resolve(t,e)}function _(e){return o.existsSync(e)&&i.basename((0,m.getOSType)()===m.OSType.Windows?e.toLowerCase():e).startsWith("python")}y.pythonSettings=new Map,r([(0,f.debounceSync)(1)],y.prototype,"debounceChangeNotification",null),t.PythonSettings=y},function(e,t,n){"use strict";var r=n(46);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";var r=n(46),i=n(824),o=n(248),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=n(825):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=n(831)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(s)})),e.exports=u},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(248);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},function(e,t){e.exports=require("./node_modules/request")},function(e,t,n){"use strict";e.exports={copySync:n(360)}},function(e,t){e.exports=e=>{const t=process.versions.node.split(".").map(e=>parseInt(e,10));return e=e.split(".").map(e=>parseInt(e,10)),t[0]>e[0]||t[0]===e[0]&&(t[1]>e[1]||t[1]===e[1]&&t[2]>=e[2])}},function(e,t,n){"use strict";const r=n(42);e.exports={utimesMillis:function(e,t,n,i){r.open(e,"r+",(e,o)=>{if(e)return i(e);r.futimes(o,t,n,e=>{r.close(o,t=>{i&&i(e||t)})})})},utimesMillisSync:function(e,t,n){const i=r.openSync(e,"r+");return r.futimesSync(i,t,n),r.closeSync(i)}}},function(e,t,n){"use strict";const r=n(49).fromCallback;e.exports={copy:r(n(362))}},function(e,t,n){e.exports=b;var r=n(26),i=n(256),o=n(106),s=(o.Minimatch,n(257)),a=n(117).EventEmitter,c=n(3),u=n(79),l=n(207),d=n(385),h=n(258),p=(h.alphasort,h.alphasorti,h.setopts),f=h.ownProp,g=n(386),m=(n(32),h.childrenIgnored),v=h.isIgnored,y=n(260);function b(e,t,n){if("function"==typeof t&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return d(e,t)}return new S(e,t,n)}b.sync=d;var _=b.GlobSync=d.GlobSync;function S(e,t,n){if("function"==typeof t&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new _(e,t)}if(!(this instanceof S))return new S(e,t,n);p(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),"function"==typeof n&&(n=y(n),this.on("error",n),this.on("end",(function(e){n(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===r)return s();for(var o=0;o1)return!0;for(var i=0;ithis.maxLength)return t();if(!this.stat&&f(this.cache,n)){var o=this.cache[n];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return t(null,o);if(i&&"FILE"===o)return t()}var s=this.statCache[n];if(void 0!==s){if(!1===s)return t(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?t():t(null,a,s)}var c=this,u=g("stat\0"+n,(function(i,o){if(o&&o.isSymbolicLink())return r.stat(n,(function(r,i){r?c._stat2(e,n,null,o,t):c._stat2(e,n,r,i,t)}));c._stat2(e,n,i,o,t)}));u&&r.lstat(n,u)},S.prototype._stat2=function(e,t,n,r,i){if(n&&("ENOENT"===n.code||"ENOTDIR"===n.code))return this.statCache[t]=!1,i();var o="/"===e.slice(-1);if(this.statCache[t]=r,"/"===t.slice(-1)&&r&&!r.isDirectory())return i(null,!1,r);var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,o&&"FILE"===s?i():i(null,s,r)}},function(e,t,n){e.exports=l,l.realpath=l,l.sync=d,l.realpathSync=d,l.monkeypatch=function(){r.realpath=l,r.realpathSync=d},l.unmonkeypatch=function(){r.realpath=i,r.realpathSync=o};var r=n(26),i=r.realpath,o=r.realpathSync,s=process.version,a=/^v[0-5]\./.test(s),c=n(380);function u(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function l(e,t,n){if(a)return i(e,t,n);"function"==typeof t&&(n=t,t=null),i(e,t,(function(r,i){u(r)?c.realpath(e,t,n):n(r,i)}))}function d(e,t){if(a)return o(e,t);try{return o(e,t)}catch(n){if(u(n))return c.realpathSync(e,t);throw n}}},function(e,t,n){try{var r=n(32);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(384)}},function(e,t,n){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.alphasort=u,t.alphasorti=c,t.setopts=function(e,t,n){n||(n={});if(n.matchBase&&-1===t.indexOf("/")){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!n.silent,e.pattern=t,e.strict=!1!==n.strict,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0);e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(l))}(e,n),e.changedCwd=!1;var o=process.cwd();r(n,"cwd")?(e.cwd=i.resolve(n.cwd),e.changedCwd=e.cwd!==o):e.cwd=o;e.root=n.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:d(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!n.nomount,n.nonegate=!0,n.nocomment=!0,e.minimatch=new a(t,n),e.options=e.minimatch.options},t.ownProp=r,t.makeAbs=d,t.finish=function(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;rt in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&d(e,n,t[n]);if(a)for(var n of a(t))l.call(t,n)&&d(e,n,t[n]);return e},p=e=>i(e,"__esModule",{value:!0}),f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),g=e=>((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of s(t))!u.call(e,r)&&"default"!==r&&i(e,r,{get:()=>t[r],enumerable:!(n=o(t,r))||n.enumerable});return e})(p(i(null!=e?r(c(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),m=f((e,t)=>{"use strict";var n=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r{"use strict";var t=e&&e.__assign||function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{var n;e=t.exports=G,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var h=s++;o[h]="(?:"+o[a]+"|"+o[u]+")";var p=s++;o[p]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[h]+"(?:\\."+o[h]+")*))";var g=s++;o[g]="(?:-?("+o[p]+"(?:\\."+o[p]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,b="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+b+"$";var _="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+_+"$";var E=s++;o[E]="((?:<|>)?=?)";var P=s++;o[P]=o[c]+"|x|X|\\*";var w=s++;o[w]=o[a]+"|x|X|\\*";var T=s++;o[T]="[v=\\s]*("+o[w]+")(?:\\.("+o[w]+")(?:\\.("+o[w]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var C=s++;o[C]="[v=\\s]*("+o[P]+")(?:\\.("+o[P]+")(?:\\.("+o[P]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var I=s++;o[I]="^"+o[E]+"\\s*"+o[T]+"$";var R=s++;o[R]="^"+o[E]+"\\s*"+o[C]+"$";var O=s++;o[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=s++;o[D]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[D]+"\\s+",i[x]=new RegExp(o[x],"g");var k=s++;o[k]="^"+o[D]+o[T]+"$";var A=s++;o[A]="^"+o[D]+o[C]+"$";var N=s++;o[N]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[N]+"\\s+",i[j]=new RegExp(o[j],"g");var M=s++;o[M]="^"+o[N]+o[T]+"$";var L=s++;o[L]="^"+o[N]+o[C]+"$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var U=s++;o[U]="(\\s*)"+o[E]+"\\s*("+_+"|"+o[T]+")",i[U]=new RegExp(o[U],"g");var W=s++;o[W]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var B=s++;o[B]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var V,H=s++;for(o[H]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new G(e,n).inc(t,r).version}catch(e){return null}},e.diff=function(e,t){if(Q(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var K=/^[0-9]+$/;function z(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return Y(e,t,n)<0}function Q(e,t,n){return 0===Y(e,t,n)}function Z(e,t,n){return 0!==Y(e,t,n)}function ee(e,t,n){return Y(e,t,n)>=0}function te(e,t,n){return Y(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return Z(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=Y,e.compareLoose=function(e,t){return Y(e,t,!0)},e.rcompare=function(e,t,n){return Y(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=J,e.lt=X,e.eq=Q,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,h){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new G(e,r),t=new oe(t,r),n){case">":i=J,o=te,s=X,a=">",c=">=";break;case"<":i=X,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,r)?d=e:s(e.semver,h.semver,r)&&(h=e)})),d.operator===a||d.operator===c||(!h.operator||h.operator===a)&&o(e,h.semver))return!1;if(h.operator===c&&s(e,h.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[F]:i[q],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new G(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[B]:i[W];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),n("comparator trim",e,i[U]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[j],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[q],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[L]:i[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[A]:i[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[R]:i[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||J(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),b=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=n(3),r=y(),i=n(268),o=Object.keys(process.binding("natives")),s=i.prototype.require;e.makePatchingRequire=function(e){var n={};return function(a){var c=s.apply(this,arguments);if(e[a]){var u=i._resolveFilename(a,this);if(n.hasOwnProperty(u))return n[u];var l=void 0;if(o.indexOf(a)<0)try{l=s.call(this,t.join(a,"package.json")).version}catch(e){return c}else l=process.version.substring(1);var d=l.indexOf("-");d>=0&&(l=l.substring(0,d));for(var h=c,p=0,f=e[a];p{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}}),S=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=b(),r=b();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return r.makePatchingRequire}});var i=function(e){return!0},o=function(){function e(){this.version=_().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch(e){}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=i),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=i);var r=this.subscribers[e];if(r)for(var o=0;o{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),P=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global}),w=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(P(),e)}),T=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(w(),e)}),C=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"}),I=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=C(),n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function r(e){var t=new Set([e]),r=new Set,i=e.match(n);if(!i)return function(){return!1};var o=+i[1],s=+i[2],a=+i[3];if(null!=i[4])return function(t){return t===e};function c(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var i=e.match(n);if(!i)return c(e);var l=+i[1],d=+i[2],h=+i[3];return null!=i[4]||o!==l?c(e):0===o?s===d&&a<=h?u(e):c(e):s<=d?u(e):c(e)}}e._makeCompatibilityCheck=r,e.isCompatible=r(t.VERSION)}),R=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=T(),n=C(),r=I(),i=n.VERSION.split(".")[0],o=Symbol.for("opentelemetry.js.api."+i),s=t._globalThis;e.registerGlobal=function(e,t,r,i){var a;void 0===i&&(i=!1);var c=s[o]=null!==(a=s[o])&&void 0!==a?a:{version:n.VERSION};if(!i&&c[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}if(c.version!==n.VERSION){u=new Error("@opentelemetry/api: All API registration versions must match");return r.error(u.stack||u.message),!1}return c[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+n.VERSION+"."),!0},e.getGlobal=function(e){var t,n,i=null===(t=s[o])||void 0===t?void 0:t.version;if(i&&r.isCompatible(i))return null===(n=s[o])||void 0===n?void 0:n[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+n.VERSION+".");var r=s[o];r&&delete r[e]}}),O=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=R(),n=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}),x=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=D();e.createLogLevelDiagLogger=function(e,n){function r(t,r){var i=n[t];return"function"==typeof i&&e>=r?i.bind(n):function(){}}return et.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),n=n||{},{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}}),k=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=O(),n=x(),r=D(),i=R(),o=function(){function e(){function e(e){return function(){var t=i.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var o=this;o.setLogger=function(e,t){var s,a;if(void 0===t&&(t=r.DiagLogLevel.INFO),e===o){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error(null!==(s=c.stack)&&void 0!==s?s:c.message),!1}var u=i.getGlobal("diag"),l=n.createLogLevelDiagLogger(t,e);if(u){var d=null!==(a=(new Error).stack)&&void 0!==a?a:"";u.warn("Current logger will be overwritten from "+d),l.warn("Current logger will overwrite one already registered from "+d)}return i.registerGlobal("diag",l,o,!0)},o.disable=function(){i.unregisterGlobal("diag",o)},o.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},o.verbose=e("verbose"),o.debug=e("debug"),o.info=e("info"),o.warn=e("warn"),o.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=o}),A=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")}),j=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=k(),n=A(),r=N(),i=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new n.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:r.baggageEntryMetadataSymbol,toString:function(){return e}}}}),M=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),L=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),F=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],n=function(){function e(e){return function(){var t=arguments;if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var n=0;n{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(F(),e),n(D(),e)}),U=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,n){null!=e&&(e[t]=n)}}}),W=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),B=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),V=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};var t=function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}};e.ROOT_CONTEXT=new t}),H=f(e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}),K=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=G();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}}),z=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=K(),n=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=n}),Y=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=V(),n=z(),r=t.createContextKey("OpenTelemetry Context Key SPAN");function i(e){return e.getValue(r)||void 0}function o(e,t){return e.setValue(r,t)}e.getSpan=i,e.setSpan=o,e.deleteSpan=function(e){return e.deleteValue(r)},e.setSpanContext=function(e,t){return o(e,new n.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=i(e))||void 0===t?void 0:t.spanContext()}}),J=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=K(),n=z(),r=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function o(e){return r.test(e)&&e!==t.INVALID_TRACEID}function s(e){return i.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=o,e.isValidSpanId=s,e.isSpanContextValid=function(e){return o(e.traceId)&&s(e.spanId)},e.wrapSpanContext=function(e){return new n.NonRecordingSpan(e)}}),X=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=$(),n=Y(),r=z(),i=J(),o=t.ContextAPI.getInstance(),s=function(){function e(){}return e.prototype.startSpan=function(e,t,o){if(Boolean(null==t?void 0:t.root))return new r.NonRecordingSpan;var s=o&&n.getSpanContext(o);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(s)&&i.isSpanContextValid(s)?new r.NonRecordingSpan(s):new r.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,r,i){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=r):(s=t,a=r,c=i);var u=null!=a?a:o.active(),l=this.startSpan(e,s,u),d=n.setSpan(u,l);return o.with(d,c,void 0,l)}},e}();e.NoopTracer=s}),Q=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(X().NoopTracer),n=function(){function e(e,t,n){this._provider=e,this.name=t,this.version=n}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=n}),Z=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=X(),n=function(){function e(){}return e.prototype.getTracer=function(e,n){return new t.NoopTracer},e}();e.NoopTracerProvider=n}),ee=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=Q(),n=new(Z().NoopTracerProvider),r=function(){function e(){}return e.prototype.getTracer=function(e,n){var r;return null!==(r=this.getDelegateTracer(e,n))&&void 0!==r?r:new t.ProxyTracer(this,e,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:n},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t)},e}();e.ProxyTracerProvider=r}),te=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ne=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}),re=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ie=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}),oe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),se=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ae=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}),ce=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ue=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),le=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),de=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),he=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=R(),n=ee(),r=J(),i=Y(),o=k(),s="trace",a=function(){function e(){this._proxyTracerProvider=new n.ProxyTracerProvider,this.wrapSpanContext=r.wrapSpanContext,this.isSpanContextValid=r.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var n=t.registerGlobal(s,this._proxyTracerProvider,o.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},e.prototype.getTracerProvider=function(){return t.getGlobal(s)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(s,o.DiagAPI.instance()),this._proxyTracerProvider=new n.ProxyTracerProvider},e}();e.TraceAPI=a}),pe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t}),fe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=V().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,n){return e.setValue(t,n)},e.deleteBaggage=function(e){return e.deleteValue(t)}}),ge=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=R(),n=pe(),r=U(),i=fe(),o=j(),s=k(),a="propagation",c=new n.NoopTextMapPropagator,u=function(){function e(){this.createBaggage=o.createBaggage,this.getBaggage=i.getBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(a,e,s.DiagAPI.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=r.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=r.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(a,s.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(a)||c},e}();e.PropagationAPI=u}),me=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,n(E(),e);var r=j();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return r.baggageEntryMetadataFromString}}),n(M(),e),n(L(),e),n(q(),e),n(U(),e),n(W(),e),n(B(),e),n(Q(),e),n(ee(),e),n(te(),e),n(ne(),e),n(re(),e),n(ie(),e),n(oe(),e),n(se(),e),n(ae(),e),n(G(),e),n(ce(),e),n(ue(),e),n(le(),e);var i=J();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return i.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return i.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return i.isValidSpanId}});var o=K();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return o.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return o.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return o.INVALID_SPAN_CONTEXT}}),n(V(),e),n(de(),e);var s=$();e.context=s.ContextAPI.getInstance();var a=he();e.trace=a.TraceAPI.getInstance();var c=ge();e.propagation=c.PropagationAPI.getInstance();var u=k();e.diag=u.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}}),ve=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=me().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}}),ye=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192}),be=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=me(),n=ye();e.serializeKeyPairs=e=>e.reduce((e,t)=>{let r=`${e}${""!==e?n.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return r.length>n.BAGGAGE_MAX_TOTAL_LENGTH?e:r},"");e.getKeyPairs=e=>e.getAllEntries().map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`);e.parsePairKeyValue=e=>{let r=e.split(n.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let i=r.shift();if(!i)return;let o=i.split(n.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==o.length)return;let s,a=decodeURIComponent(o[0].trim()),c=decodeURIComponent(o[1].trim());return r.length>0&&(s=t.baggageEntryMetadataFromString(r.join(n.BAGGAGE_PROPERTIES_SEPARATOR))),{key:a,value:c,metadata:s}};e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(n.BAGGAGE_ITEMS_SEPARATOR).map(t=>e.parsePairKeyValue(t)).filter(e=>void 0!==e&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}),_e=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=me(),n=ve(),r=ye(),i=be();e.HttpBaggagePropagator=class{inject(e,o,s){let a=t.propagation.getBaggage(e);if(!a||n.isTracingSuppressed(e))return;let c=i.getKeyPairs(a).filter(e=>e.length<=r.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,r.BAGGAGE_MAX_NAME_VALUE_PAIRS),u=i.serializeKeyPairs(c);u.length>0&&s.set(o,r.BAGGAGE_HEADER,u)}extract(e,n,o){let s=o.get(n,r.BAGGAGE_HEADER);if(!s)return e;let a={};return 0===s.length||(s.split(r.BAGGAGE_ITEMS_SEPARATOR).forEach(e=>{let t=i.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}}),0===Object.entries(a).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(a))}fields(){return[r.BAGGAGE_HEADER]}}}),Se=f(e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let r of e)if(null!=r){if(!t){if(n(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}(e):n(e))}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let n={};if(null==e||"object"!=typeof e)return n;for(let[r,i]of Object.entries(e))t(i)&&(Array.isArray(i)?n[r]=i.slice():n[r]=i);return n},e.isAttributeValue=t}),Ee=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=me();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}(e))}(e))}}}),Pe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=Ee().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e};e.globalErrorHandler=e=>{try{t(e)}catch(e){}}}),we=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}),Te=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=me(),n=we(),r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function i(e){return r.indexOf(e)>-1}var o=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function s(e){return o.indexOf(e)>-1}function a(e,t,n,r=-1/0,i=1/0){if(void 0!==n[e]){let o=Number(n[e]);isNaN(o)||(t[e]=oi?i:o)}}function c(e,t,n,r=","){let i=n[e];"string"==typeof i&&(t[e]=i.split(r).map(e=>e.trim()))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:n.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var u={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function l(e,t,n){let r=n[e];if("string"==typeof r){let n=u[r.toUpperCase()];null!=n&&(t[e]=n)}}e.parseEnvironment=function(t){let n={};for(let r in e.DEFAULT_ENVIRONMENT){let e=r;switch(e){case"OTEL_LOG_LEVEL":l(e,n,t);break;default:if(i(e))a(e,n,t);else if(s(e))c(e,n,t);else{let r=t[e];null!=r&&(n[e]=String(r))}}}return n}}),Ce=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=n(37),r=Te();e.getEnv=function(){let e=r.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},r.DEFAULT_ENVIRONMENT,e)}}),Ie=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,n="";for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0;e.RandomIdGenerator=class{constructor(){this.generateTraceId=n(16),this.generateSpanId=n(8)}};var t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n>>0,4*n);for(let n=0;n0);n++)n===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}}),Oe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=n(413);e.otperformance=t.performance}),De=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"}),xe=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))}),ke=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(xe(),e)}),Ae=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))}),Ne=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ae(),e)}),je=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ke(),e),n(Ne(),e)}),Me=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=De(),n=je();e.SDK_INFO={[n.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[n.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[n.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.TelemetrySdkLanguageValues.NODEJS,[n.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}}),Le=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}}),Fe=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ce(),e),n(Ie(),e),n(Re(),e),n(Oe(),e),n(Me(),e),n(Le(),e)}),qe=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Fe(),e)}),Ue=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=qe(),n=Math.pow(10,9);function r(e){let t=e/1e3,r=Math.trunc(t);return[r,Number((t-r).toFixed(9))*n]}function i(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let n=t.otperformance;e=n.timing&&n.timing.fetchStart}return e}function o(e){let o=r(i()),s=r("number"==typeof e?e:t.otperformance.now()),a=o[0]+s[0],c=o[1]+s[1];return c>n&&(c-=n,a+=1),[a,c]}function s(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=o,e.timeInputToHrTime=function(e){if(s(e))return e;if("number"==typeof e)return e{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Be=f(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}),Ve=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=me();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map(e=>"function"==typeof e.fields?e.fields():[]).reduce((e,t)=>e.concat(t),[])))}inject(e,n,r){for(let i of this._propagators)try{i.inject(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}}extract(e,n,r){return this._propagators.reduce((e,i)=>{try{return i.extract(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}}}),He=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",n=new RegExp(`^(?:${`[a-z]${t}{0,255}`}|${`[a-z0-9]${t}{0,240}@[a-z]${t}{0,13}`})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;e.validateKey=function(e){return n.test(e)},e.validateValue=function(e){return r.test(e)&&!i.test(e)}}),$e=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=He(),n=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+"="+this.get(t)),e),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((e,n)=>{let r=n.trim(),i=r.indexOf("=");if(-1!==i){let o=r.slice(0,i),s=r.slice(i+1,n.length);t.validateKey(o)&&t.validateValue(s)&&e.set(o,s)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};e.TraceState=n}),Ge=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=me(),n=ve(),r=$e();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function o(e){let t=i.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=o;e.HttpTraceContextPropagator=class{inject(r,i,o){let s=t.trace.getSpanContext(r);if(!s||n.isTracingSuppressed(r)||!t.isSpanContextValid(s))return;let a=`00-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||t.TraceFlags.NONE).toString(16)}`;o.set(i,e.TRACE_PARENT_HEADER,a),s.traceState&&o.set(i,e.TRACE_STATE_HEADER,s.traceState.serialize())}extract(n,i,s){let a=s.get(i,e.TRACE_PARENT_HEADER);if(!a)return n;let c=Array.isArray(a)?a[0]:a;if("string"!=typeof c)return n;let u=o(c);if(!u)return n;u.isRemote=!0;let l=s.get(i,e.TRACE_STATE_HEADER);if(l){let e=Array.isArray(l)?l.join(","):l;u.traceState=new r.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(n,u)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}}),Ke=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ze=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=me().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,n){return e.setValue(t,n)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}}),Ye=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=me();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}}),Je=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=me();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}}),Xe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=me(),n=Pe(),r=Ye(),i=Je();e.ParentBasedSampler=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(n.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new i.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new i.AlwaysOnSampler,this._remoteParentNotSampled=null!==(o=e.remoteParentNotSampled)&&void 0!==o?o:new r.AlwaysOffSampler,this._localParentSampled=null!==(s=e.localParentSampled)&&void 0!==s?s:new i.AlwaysOnSampler,this._localParentNotSampled=null!==(a=e.localParentNotSampled)&&void 0!==a?a:new r.AlwaysOffSampler}shouldSample(e,n,r,i,o,s){let a=t.trace.getSpanContext(e);return a&&t.isSpanContextValid(a)?a.isRemote?a.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s):this._root.shouldSample(e,n,r,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}}),Qe=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=me();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,n){return{decision:t.isValidTraceId(n)&&this._accumulate(n)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n>>0}return t}}}),Ze=f(e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,n){if(!n)return!1;for(let r of n)if(t(e,r))return!0;return!1}}),et=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}}),tt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,n(_e(),e),n(Se(),e),n(Pe(),e),n(Ee(),e),n(Ue(),e),n(We(),e),n(Be(),e),n(De(),e),e.baggageUtils=be(),n(qe(),e),n(Ve(),e),n(Ge(),e),n(Ke(),e),n(ze(),e),n(Ye(),e),n(Je(),e),n(Xe(),e),n(Qe(),e),n(ve(),e),n($e(),e),n(Te(),e),n(we(),e),n(Ze(),e),n(et(),e),n(De(),e)}),nt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"}),rt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=me(),n=tt(),r=je(),i=nt();e.Span=class{constructor(e,r,i,o,s,a,c=[],u=n.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=o,this.parentSpanId=a,this.kind=s,this.links=c,this.startTime=n.timeInputToHrTime(u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return null==r||this._isSpanEnded()?this:0===e.length?(t.diag.warn("Invalid attribute key: "+e),this):n.isAttributeValue(r)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=r),this):(t.diag.warn("Invalid attribute value set for key: "+e),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,r,i){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),n.isTimeInput(r)&&(void 0===i&&(i=r),r=void 0),void 0===i&&(i=n.hrTime()),this.events.push({name:e,attributes:r,time:n.timeInputToHrTime(i)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=n.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=n.timeInputToHrTime(e),this._duration=n.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,o=n.hrTime()){let s={};"string"==typeof e?s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?s[r.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(s[r.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(s[r.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),s[r.SemanticAttributes.EXCEPTION_TYPE]||s[r.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(i.ExceptionEventName,s,o):t.diag.warn("Failed to record an exception "+e)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}}),it=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=me(),n=tt(),r=n.getEnv(),i=n.TracesSamplerValues.AlwaysOn;function o(e=n.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case n.TracesSamplerValues.AlwaysOn:return new n.AlwaysOnSampler;case n.TracesSamplerValues.AlwaysOff:return new n.AlwaysOffSampler;case n.TracesSamplerValues.ParentBasedAlwaysOn:return new n.ParentBasedSampler({root:new n.AlwaysOnSampler});case n.TracesSamplerValues.ParentBasedAlwaysOff:return new n.ParentBasedSampler({root:new n.AlwaysOffSampler});case n.TracesSamplerValues.TraceIdRatio:return new n.TraceIdRatioBasedSampler(s(e));case n.TracesSamplerValues.ParentBasedTraceIdRatio:return new n.ParentBasedSampler({root:new n.TraceIdRatioBasedSampler(s(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${i}".`),new n.AlwaysOnSampler}}e.DEFAULT_CONFIG={sampler:o(r),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:n.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:n.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:n.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=o;function s(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;let n=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to 1.`),1):n<0||n>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to 1.`),1):n}}),ot=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=it();e.mergeConfig=function(e){let n={sampler:t.buildSamplerFromEnv()},r=Object.assign({},t.DEFAULT_CONFIG,n,e);return r.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),r}}),st=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=me(),n=tt(),r=rt(),i=ot();e.Tracer=class{constructor(e,t,r){this._tracerProvider=r;let o=i.mergeConfig(t);this._sampler=o.sampler,this._spanLimits=o.spanLimits,this._idGenerator=t.idGenerator||new n.RandomIdGenerator,this.resource=r.resource,this.instrumentationLibrary=e}startSpan(e,i={},o=t.context.active()){var s,a;if(n.isTracingSuppressed(o))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let c,u,l,d=function(e,n){if(!e.root)return t.trace.getSpanContext(n)}(i,o),h=this._idGenerator.generateSpanId();d&&t.trace.isSpanContextValid(d)?(c=d.traceId,u=d.traceState,l=d.spanId):c=this._idGenerator.generateTraceId();let p=null!==(s=i.kind)&&void 0!==s?s:t.SpanKind.INTERNAL,f=null!==(a=i.links)&&void 0!==a?a:[],g=n.sanitizeAttributes(i.attributes),m=this._sampler.shouldSample(i.root?t.trace.setSpanContext(o,t.INVALID_SPAN_CONTEXT):o,c,e,p,g,f),v={traceId:c,spanId:h,traceFlags:m.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:u};if(m.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(v);let y=new r.Span(this,o,e,v,p,l,f,i.startTime);return y.setAttributes(Object.assign(g,m.attributes)),y}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;2===arguments.length?a=n:3===arguments.length?(o=n,a=r):(o=n,s=r,a=i);let c=null!=s?s:t.context.active(),u=this.startSpan(e,o,c),l=t.trace.setSpan(c,u);return t.context.with(l,a,void 0,u)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}}),at=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return"unknown_service:"+process.argv0}}),ct=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=ft(),r=me(),i=n(32);e.detectResources=async(e={})=>{let n=Object.assign(e),i=await Promise.all((n.detectors||[]).map(async e=>{try{let t=await e.detect(n);return r.diag.debug(e.constructor.name+" found resource.",t),t}catch(n){return r.diag.debug(`${e.constructor.name} failed: ${n.message}`),t.Resource.empty()}}));return o(i),i.reduce((e,t)=>e.merge(t),t.Resource.empty())};var o=e=>{e.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=i.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});r.diag.verbose(t)}})}}),ut=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=me(),n=tt(),r=je(),i=vt();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let o={},s=n.getEnv(),a=s.OTEL_RESOURCE_ATTRIBUTES,c=s.OTEL_SERVICE_NAME;if(a)try{let e=this._parseResourceAttributes(a);Object.assign(o,e)}catch(e){t.diag.debug("EnvDetector failed: "+e.message)}return c&&(o[r.ResourceAttributes.SERVICE_NAME]=c),new i.Resource(o)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==n.length)continue;let[r,i]=n;if(r=r.trim(),i=i.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(r))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(i))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);t[r]=i}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}}),lt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=me(),n=je(),r=vt();e.processDetector=new class{async detect(e){let t={[n.ResourceAttributes.PROCESS_PID]:process.pid,[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[n.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[n.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,i){return""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[n.ResourceAttributes.PROCESS_COMMAND]||""===e[n.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),r.Resource.empty()):new r.Resource(Object.assign({},e))}}}),dt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ut(),e),n(lt(),e)}),ht=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(at(),e),n(ct(),e),n(dt(),e)}),pt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ht(),e)}),ft=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=je(),n=tt(),r=pt(),i=class{constructor(e){this.attributes=e}static empty(){return i.EMPTY}static default(){return new i({[t.ResourceAttributes.SERVICE_NAME]:r.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new i(t)}};e.Resource=i,i.EMPTY=new i({})}),gt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),mt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),vt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ft(),e),n(pt(),e),n(gt(),e),n(mt(),e)}),yt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=tt();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(n=>{Promise.all(e).then(()=>{n()}).catch(e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),n()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}}}),bt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0;e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}}),_t=f((e,t)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var l="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,h=l||d||Function("return this")(),p="object"==typeof e&&e&&!e.nodeType&&e,f=p&&"object"==typeof t&&t&&!t.nodeType&&t,g=f&&f.exports===p,m=g&&l.process,v=function(){try{return f&&f.require&&f.require("util").types||m&&m.binding&&m.binding("util")}catch(e){}}(),y=v&&v.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var _,S=Array.prototype,E=Function.prototype,P=Object.prototype,w=h["__core-js_shared__"],T=E.toString,C=P.hasOwnProperty,I=(_=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",R=P.toString,O=T.call(Object),D=RegExp("^"+T.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=g?h.Buffer:void 0,k=h.Symbol,A=h.Uint8Array,N=x?x.allocUnsafe:void 0,j=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),M=Object.create,L=P.propertyIsEnumerable,F=S.splice,q=k?k.toStringTag:void 0,U=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),W=x?x.isBuffer:void 0,B=Math.max,V=Date.now,H=le(h,"Map"),$=le(Object,"create"),G=function(){function e(){}return function(t){if(!Ee(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},z.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(H||z),string:new K}},Y.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return ue(this,e).get(e)},Y.prototype.has=function(e){return ue(this,e).has(e)},Y.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},J.prototype.clear=function(){this.__data__=new z,this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},J.prototype.get=function(e){return this.__data__.get(e)},J.prototype.has=function(e){return this.__data__.has(e)},J.prototype.set=function(e,t){var n=this.__data__;if(n instanceof z){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Y(r)}return n.set(e,t),this.size=n.size,this};var ne=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}();function re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=C.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var i=R.call(e);return r&&(t?e[q]=n:delete e[q]),i}(e):function(e){return R.call(e)}(e)}function ie(e){return Pe(e)&&re(e)==i}function oe(e){return!(!Ee(e)||function(e){return!!I&&I in e}(e))&&(_e(e)?D:a).test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function se(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=he(e),n=[];for(var r in e)"constructor"==r&&(t||!C.call(e,r))||n.push(r);return n}function ae(e,t,n,r,i){e!==t&&ne(t,(function(o,a){if(i||(i=new J),Ee(o))!function(e,t,n,r,i,o,a){var c=pe(e,n),u=pe(t,n),l=a.get(u);if(l)return void Q(e,n,l);var d=o?o(c,u,n+"",e,t,a):void 0,h=void 0===d;if(h){var p=ve(u),f=!p&&be(u),g=!p&&!f&&we(u);d=u,p||f||g?ve(c)?d=c:function(e){return Pe(e)&&ye(e)}(c)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(U?function(e,t){return U(e,"toString",{configurable:!0,enumerable:!1,value:Ie(t),writable:!0})}:Re);function ge(e,t){return e===t||e!=e&&t!=t}var me=ie(function(){return arguments}())?ie:function(e){return Pe(e)&&C.call(e,"callee")&&!L.call(e,"callee")},ve=Array.isArray;function ye(e){return null!=e&&Se(e.length)&&!_e(e)}var be=W||function(){return!1};function _e(e){if(!Ee(e))return!1;var t=re(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pe(e){return null!=e&&"object"==typeof e}var we=y?function(e){return function(t){return e(t)}}(y):function(e){return Pe(e)&&Se(e.length)&&!!u[re(e)]};function Te(e){return ye(e)?X(e,!0):se(e)}var Ce=function(e){return ce((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?ye(n)&&de(t,n.length):"string"==r&&t in n)&&ge(n[t],e)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=me(),n=tt();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let r=n.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise((e,t)=>{Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown()).then(e).catch(e=>{t(e)})})),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,t)=>{let n=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((e,r)=>{let i=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);t.context.with(n.suppressTracing(t.context.active()),()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),t=>{var o;clearTimeout(i),t.code===n.ExportResultCode.SUCCESS?e():r(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))})})})}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{n.globalErrorHandler(e)})},this._scheduledDelayMillis),n.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}}),Et=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=St(),n=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=n}),Pt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Et(),e)}),wt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pt(),e)}),Tt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,n,r=me(),i=tt(),o=vt(),s=Nt(),a=it(),c=yt(),u=bt(),l=_t(),d=wt();(n=t=e.ForceFlushState||(e.ForceFlushState={}))[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved";var h=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=l({},a.DEFAULT_CONFIG,e);this.resource=null!==(t=n.resource)&&void 0!==t?t:o.Resource.empty(),this.resource=o.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let r=this._buildExporterFromEnv();if(void 0!==r){let e=new d.BatchSpanProcessor(r);this.activeSpanProcessor=e}else this.activeSpanProcessor=new u.NoopSpanProcessor}getTracer(e,t){let n=`${e}@${t||""}`;return this._tracers.has(n)||this._tracers.set(n,new s.Tracer({name:e,version:t},this._config,this)),this._tracers.get(n)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch(e=>r.diag.error("Error while trying to shutdown current span processor",e)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new c.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){r.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&r.context.setGlobalContextManager(e.contextManager),e.propagator&&r.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(n=>new Promise(r=>{let i,o=setTimeout(()=>{r(new Error(`Span processor did not completed within timeout period of ${e} ms`)),i=t.timeout},e);n.forceFlush().then(()=>{clearTimeout(o),i!==t.timeout&&(i=t.resolved,r(i))}).catch(e=>{clearTimeout(o),i=t.error,r(e)})}));return new Promise((e,r)=>{Promise.all(n).then(n=>{let i=n.filter(e=>e!==t.resolved);i.length>0?r(i):e()}).catch(e=>r([e]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=h._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=h._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(i.getEnv().OTEL_PROPAGATORS)),t=e.map(e=>{let t=this._getPropagator(e);return t||r.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t}).reduce((e,t)=>(t&&e.push(t),e),[]);if(0!==t.length)return 1===e.length?t[0]:new i.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=i.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||r.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=h,h._registeredPropagators=new Map([["tracecontext",()=>new i.HttpTraceContextPropagator],["baggage",()=>new i.HttpBaggagePropagator]]),h._registeredExporters=new Map}),Ct=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=tt();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,n){for(let t of e)console.log(this._exportInfo(t));if(n)return n({code:t.ExportResultCode.SUCCESS})}}}),It=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=tt();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>n({code:t.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}}),Rt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ot=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=me(),n=tt();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(n.suppressTracing(t.context.active()),()=>{this._exporter.export([e],e=>{var t;e.code!==n.ExportResultCode.SUCCESS&&n.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))})})}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise((e,t)=>{Promise.resolve().then(()=>this._exporter.shutdown()).then(e).catch(e=>{t(e)})})),this._shuttingDownPromise}}}),Dt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),xt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),kt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),At=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Nt=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(st(),e),n(Tt(),e),n(wt(),e),n(Ct(),e),n(It(),e),n(Rt(),e),n(Ot(),e),n(Dt(),e),n(bt(),e),n(rt(),e),n(xt(),e),n(kt(),e),n(At(),e)}),jt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=S();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var n=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(r){if(n)return r;try{var i=Nt(),o=me(),s=(new i.BasicTracerProvider).getTracer("applicationinsights tracer"),a=r.setTracer;r.setTracer=function(n){var r=n.startSpan;n.startSpan=function(e,n,i){var o=r.call(this,e,n,i),s=o.end;return o.end=function(){var e=s.apply(this,arguments);return t.channel.publish("azure-coretracing",o),e},o},n[e.AzureMonitorSymbol]=!0,a.call(this,n)},o.trace.getSpan(o.context.active()),r.setTracer(s),n=!0}catch(e){}return r}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}}),Mt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=S();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var n=e.prototype._emit;return e.prototype._emit=function(e,r){var i=n.apply(this,arguments);if(!r){var o=i;o||(o=n.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}}),Lt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=S(),r=n(116);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var n=new r.Writable,i=new r.Writable;n.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n}),!0},i.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n,stderr:!0}),!0};for(var o=new e.Console(n,i),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch(e){}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=S();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=n.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}}),qt=f(e=>{"use strict";var t=e&&e.__assign||function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n= 2.0.0 <= 3.0.5",patch:function(e){var r=e.instrument({operationIdGenerator:{next:function(){return n.channel.bindToContext((function(e){return e()}))}}}),i={};return r.on("started",(function(e){i[e.requestId]||(i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var r=e.instrument(),i={},o={};return r.on("started",(function(e){i[e.requestId]||(o[e.requestId]=n.channel.bindToContext((function(e){return e()})),i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},i={};return t.on("started",(function(e){r[e.requestId]||(i[e.requestId]=n.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete i[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete i[e.requestId])})),e}},e.enable=function(){n.channel.registerMonkeyPatch("mongodb",e.mongo2),n.channel.registerMonkeyPatch("mongodb",e.mongo3),n.channel.registerMonkeyPatch("mongodb",e.mongo330)}}),Ut=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=S(),r=n(3);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,i){var o=function(e,n){return function(n,r){var i=e[n];i&&(e[n]=function(){for(var e=arguments.length-1,n=arguments.length-1;n>=0;--n){if("function"==typeof arguments[n]){e=n;break}if(void 0!==arguments[n])break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=t.channel.bindToContext(r(s,o))):arguments[e]=t.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(415)(r.dirname(i)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,n){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),n.apply(this,arguments)}}));var c=n(416)(r.dirname(i)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}}),Wt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=S();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var n=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),n.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}}),Bt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=S(),r=n(117);e.postgres6={versionSpecifier:"6.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},u=process.hrtime();function l(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(u);if(c.result=i&&{rowCount:i.rowCount,command:i.command},c.error=n,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",c),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch(t){return e}}try{"string"==typeof e?n instanceof Array?(c.query.preparable={text:e,args:n},s=l(s)):(c.query.text=e,s?s=l(s):n=l(n)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=l(s):n?n=l(n):e.callback=l(e.callback))}catch(e){return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c=this,u=!!s,l={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function h(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(d);if(l.result=i&&{rowCount:i.rowCount,command:i.command},l.error=n,l.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",l),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch(t){return e}}try{"string"==typeof e?n instanceof Array?(l.query.preparable={text:e,args:n},s=(u="function"==typeof s)?h(s):s):(l.query.text=e,s?s=(u="function"==typeof s)?h(s):s:n=(u="function"==typeof n)?h(n):n):("string"==typeof e.name?l.query.plan=e.name:e.values instanceof Array?l.query.preparable={text:e.text,args:e.values}:l.query.text=e.text,s?(u="function"==typeof s,s=h(s)):n?n=(u="function"==typeof n)?h(n):n:(u="function"==typeof e.callback,e.callback=u?h(e.callback):e.callback))}catch(e){return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments),u?a:a.then((function(e){return h()(void 0,e),new c._Promise((function(t,n){t(e)}))})).catch((function(e){return h()(e,void 0),new c._Promise((function(t,n){n(e)}))}))},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}}),Vt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=S();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=t.channel.bindToContext((function(n,a){var c=process.hrtime(o),u=1e3*c[0]+c[1]/1e6|0;t.channel.publish("redis",{duration:u,address:i,commandObj:e,err:n,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return n.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}}),Ht=f(e=>{"use strict";var t=e&&e.__assign||function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n= 6.0.0 < 9.0.0",patch:function(e){var r=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var r=process.hrtime(),i={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return n.channel.bindToContext((function(o,s,a){var c=process.hrtime(r);i=t(t({},i),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!o&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:o,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),n.channel.publish("tedious",i),e.call(this,o,s,a)}))}var i=arguments[0];arguments[0].callback=e(i.callback),r.apply(this,arguments)},e}},e.enable=function(){n.channel.registerMonkeyPatch("tedious",e.tedious)}}),$t=f(e=>{"use strict";var t,n=e&&e.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,n)},function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ir[n]?i:n);this.add(new t(e,{level:n}))}var s=e.createLogger;e.createLogger=function(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);var a=s.apply(this,arguments);a.add(new t(e,{level:n}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},a};var a=e.configure;return e.configure=function(){a.apply(this,arguments),o.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,o){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",i.channel.publish("winston",{level:n,message:r,meta:o,levelKind:s}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},e.enable=function(){i.channel.registerMonkeyPatch("winston",e.winston2),i.channel.registerMonkeyPatch("winston",e.winston3)}}),Gt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=jt();e.azuresdk=t;var n=Mt();e.bunyan=n;var r=Lt();e.console=r;var i=Ft();e.mongodbCore=i;var o=qt();e.mongodb=o;var s=Ut();e.mysql=s;var a=Wt();e.pgPool=a;var c=Bt();e.pg=c;var u=Vt();e.redis=u;var l=Ht();e.tedious=l;var d=$t();e.winston=d,e.enable=function(){n.enable(),r.enable(),i.enable(),o.enable(),s.enable(),c.enable(),a.enable(),u.enable(),d.enable(),t.enable(),l.enable()}}),Kt=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=v(),n=m();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var r,i,o,s,a="DiagnosticChannel";if(e.IsInitialized){for(s in r=Gt(),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),o={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk})-1===i.indexOf(s)&&(o[s].enable(),n.info(a,"Subscribed to "+s+" events"));i.length>0&&n.info(a,"Some modules will not be patched",i)}else n.info(a,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(n){if(e.IsInitialized){var r=S();r.channel.addContextPreservation(n),r.channel.spanContextPropagator=t.AsyncScopeManager}}}),zt=f((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}}),Yt=f((e,t)=>{"use strict";var r=e&&e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r{"use strict";var n=Yt(),r=m(),i=function(){function e(){}return e.queryCorrelationId=function(t,i){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))i(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(i);else{e.pendingLookups[o]=[i];var s=function(){if(e.pendingLookups[o]){var i={method:"GET",disableAppInsightsAutoCollection:!0};r.info(e.TAG,i);var a=n.makeRequest(t,o,i,(function(n){if(200===n.statusCode){var i="";n.setEncoding("utf-8"),n.on("data",(function(e){i+=e})),n.on("end",(function(){r.info(e.TAG,i);var t=e.correlationIdPrefix+i;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){r.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.lengtho)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,o)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();t.exports=i}),Xt=f((e,t)=>{"use strict";var n=Yt(),r=Jt(),i=function(){function e(t,i){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16);else{var o=t.trim().split("-"),s=o.length;s>=4?(this.version=o[0],this.traceId=o[1],this.spanId=o[2],this.traceFlag=o[3]):(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=n.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=n.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=n.w3cTraceId().substr(0,16),this.traceId=n.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(i){this.parentId=i.slice();var a=r.getRootId(i);e.isValidTraceId(a)||(this.legacyRootId=a,a=n.w3cTraceId()),-1!==i.indexOf("|")&&(i=i.substring(1+i.substring(0,i.length-1).lastIndexOf("."),i.length-1)),this.traceId=a,this.spanId=i}else this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().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.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=n.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=i}),Qt=f((e,t)=>{"use strict";var n=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&o}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var o=0,s=i;o{"use strict";var n=function(){};t.exports=n}),en=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(Zt());t.exports=i}),tn=f((e,t)=>{"use strict";var n=function(){};t.exports=n}),nn=f((e,t)=>{"use strict";var n=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"};t.exports=n}),rn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(tn());t.exports=i}),on=f((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation",t.exports=n}),sn=f((e,t)=>{"use strict";var n=on(),r=function(){this.kind=n.Measurement};t.exports=r}),an=f((e,t)=>{"use strict";var n=function(){this.ver=1,this.sampleRate=100,this.tags={}};t.exports=n}),cn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(Zt());t.exports=i}),un=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(Zt());t.exports=i}),ln=f((e,t)=>{"use strict";var n=function(){this.hasFullStack=!0,this.parsedStack=[]};t.exports=n}),dn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(Zt());t.exports=i}),hn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(Zt());t.exports=i}),pn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(cn());t.exports=i}),fn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(Zt());t.exports=i}),gn=f((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(Zt());t.exports=i}),mn=f((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical",t.exports=n}),vn=f((e,t)=>{"use strict";var n=function(){};t.exports=n}),yn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=en(),e.Base=tn(),e.ContextTagKeys=nn(),e.Data=rn(),e.DataPoint=sn(),e.DataPointType=on(),e.Domain=Zt(),e.Envelope=an(),e.EventData=cn(),e.ExceptionData=un(),e.ExceptionDetails=ln(),e.MessageData=dn(),e.MetricData=hn(),e.PageViewData=pn(),e.RemoteDependencyData=fn(),e.RequestData=gn(),e.SeverityLevel=mn(),e.StackFrame=vn()}),bn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=yn(),n=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=n,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}}),_n=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Sn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),En=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Pn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),wn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Tn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Cn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),In=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Rn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),On=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Dn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),xn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),kn=f(e=>{"use strict";var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(n=t=e.TelemetryType||(e.TelemetryType={}))[n.Event=0]="Event",n[n.Exception=1]="Exception",n[n.Trace=2]="Trace",n[n.Metric=3]="Metric",n[n.Request=4]="Request",n[n.Dependency=5]="Dependency",n[n.Availability=6]="Availability",n[n.PageView=7]="PageView"}),An=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(_n(),e),n(Sn(),e),n(En(),e),n(Pn(),e),n(wn(),e),n(Tn(),e),n(Cn(),e),n(In(),e),n(Rn(),e),n(On(),e),n(Dn(),e),n(xn(),e),n(kn(),e)}),Nn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),jn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Mn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ln=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Fn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),qn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Un=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Wn=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Bn=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Nn(),e),n(jn(),e),n(Mn(),e),n(Ln(),e),n(Fn(),e),n(qn(),e),n(Un(),e),n(Wn(),e)}),Vn=f(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(bn(),e),n(yn(),e),n(An(),e),n(Bn(),e)}),Hn=f((e,t)=>{"use strict";var n=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(108),s=Vn(),a=Yt(),c=zt(),u=Hn(),l=Jt(),d=Qt(),h=Xt(),p=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+o.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+o.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=o.parse(e.url),r=n.pathname,i=n.search,s=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return o.format({protocol:s,host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var n=e.headers[c.traceStateHeader]?e.headers[c.traceStateHeader].toString():null,r=e.headers[c.traceparentHeader]?e.headers[c.traceparentHeader].toString():null,i=e.headers[c.requestIdHeader]?e.headers[c.requestIdHeader].toString():null,o=e.headers[c.parentIdHeader]?e.headers[c.parentIdHeader].toString():null,s=e.headers[c.rootIdHeader]?e.headers[c.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[c.correlationContextHeader]?e.headers[c.correlationContextHeader].toString():null,l.w3cEnabled&&(r||n)?(this.traceparent=new h(r?r.toString():null),this.tracestate=r&&n&&new d(n?n.toString():null),this.setBackCompatFromThisTraceContext()):i?l.w3cEnabled?(this.traceparent=new h(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=l.generateRequestId(this.parentId),this.operationId=l.getRootId(this.requestId)):l.w3cEnabled?(this.traceparent=new h,this.traceparent.parentId=o,this.traceparent.legacyRootId=s||o,this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=l.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=l.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=l.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(u);t.exports=p}),Gn=f((e,t)=>{var n;e=t.exports=G,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var h=s++;o[h]="(?:"+o[a]+"|"+o[u]+")";var p=s++;o[p]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[h]+"(?:\\."+o[h]+")*))";var g=s++;o[g]="(?:-?("+o[p]+"(?:\\."+o[p]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,b="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+b+"$";var _="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+_+"$";var E=s++;o[E]="((?:<|>)?=?)";var P=s++;o[P]=o[c]+"|x|X|\\*";var w=s++;o[w]=o[a]+"|x|X|\\*";var T=s++;o[T]="[v=\\s]*("+o[w]+")(?:\\.("+o[w]+")(?:\\.("+o[w]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var C=s++;o[C]="[v=\\s]*("+o[P]+")(?:\\.("+o[P]+")(?:\\.("+o[P]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var I=s++;o[I]="^"+o[E]+"\\s*"+o[T]+"$";var R=s++;o[R]="^"+o[E]+"\\s*"+o[C]+"$";var O=s++;o[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=s++;o[D]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[D]+"\\s+",i[x]=new RegExp(o[x],"g");var k=s++;o[k]="^"+o[D]+o[T]+"$";var A=s++;o[A]="^"+o[D]+o[C]+"$";var N=s++;o[N]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[N]+"\\s+",i[j]=new RegExp(o[j],"g");var M=s++;o[M]="^"+o[N]+o[T]+"$";var L=s++;o[L]="^"+o[N]+o[C]+"$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var U=s++;o[U]="(\\s*)"+o[E]+"\\s*("+_+"|"+o[T]+")",i[U]=new RegExp(o[U],"g");var W=s++;o[W]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var B=s++;o[B]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var V,H=s++;for(o[H]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new G(e,n).inc(t,r).version}catch(e){return null}},e.diff=function(e,t){if(Q(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var K=/^[0-9]+$/;function z(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return Y(e,t,n)<0}function Q(e,t,n){return 0===Y(e,t,n)}function Z(e,t,n){return 0!==Y(e,t,n)}function ee(e,t,n){return Y(e,t,n)>=0}function te(e,t,n){return Y(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return Z(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=Y,e.compareLoose=function(e,t){return Y(e,t,!0)},e.rcompare=function(e,t,n){return Y(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=J,e.lt=X,e.eq=Q,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,h){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new G(e,r),t=new oe(t,r),n){case">":i=J,o=te,s=X,a=">",c=">=";break;case"<":i=X,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,r)?d=e:s(e.semver,h.semver,r)&&(h=e)})),d.operator===a||d.operator===c||(!h.operator||h.operator===a)&&o(e,h.semver))return!1;if(h.operator===c&&s(e,h.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[F]:i[q],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new G(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[B]:i[W];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),n("comparator trim",e,i[U]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[j],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[q],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[L]:i[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[A]:i[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[R]:i[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||J(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),Kn=f((e,t)=>{"use strict";function n(e){return"function"==typeof e}var r=console.error.bind(console);function i(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function o(e){e&&e.logger&&(n(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function s(e,t,o){if(e&&e[t]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(n(e[t])&&n(o)){var s=e[t],a=o(s,t);return i(a,"__original",s),i(a,"__unwrap",(function(){e[t]===a&&i(e,t,s)})),i(a,"__wrapped",!0),i(e,t,a),a}r("original object and wrapper must be functions")}else r("no original function "+t+" to wrap")}function a(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}o.wrap=s,o.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},o.unwrap=a,o.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){a(e,t)}))})):r("must provide one or more functions to unwrap on modules")},t.exports=o}),zn=f((e,t)=>{"use strict";var n=Kn(),r=n.wrap,i=n.unwrap,o="wrap@before";function s(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function a(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function c(e,t,n){var r=a(e,t).filter((function(e){return-1===n.indexOf(e)}));r.length>0&&function(e,t){for(var n=t.length,r=0;r{"use strict";var r=n(32),i=n(79),o=zn(),s=n(417),a="cls@contexts",c="error@context",u=process.env.DEBUG_CLS_HOOKED,l=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function h(e){return process.namespaces[e]}function p(e){let t=h(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function f(...e){u&&process._rawDebug(""+r.format(...e))}t.exports={getNamespace:h,createNamespace:function(e){i.ok(e,"namespace must be given a name."),u&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=l,s.createHook({init(n,i,o,a){if(l=s.executionAsyncId(),t.active){if(t._contexts.set(n,t.active),u){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(0===l){let o=s.triggerAsyncId(),c=t._contexts.get(o);if(c){if(t._contexts.set(n,c),u){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(u){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}if(u&&"PROMISE"===i){f(r.inspect(a,{showHidden:!0}));let s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(n){let i;if(l=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(l),i){if(u){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`),t._indent+=2}t.enter(i)}else if(u){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${l} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${r.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(n){let i;if(l=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(l),i){if(u){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}t.exit(i)}else if(u){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}},destroy(n){if(l=s.executionAsyncId(),u){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${l} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(t._contexts.get(l))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:p,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){p(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");if(this.active[e]=t,u){f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+l+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0}))}return t},d.prototype.get=function(e){if(this.active){if(u){let t=s.executionAsyncId(),n=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+l+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(u){let t=s.currentId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=l,u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(u){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${l} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(u){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${l} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return u&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),n.then(e=>(u&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e)).catch(e=>{throw e[c]=t,u&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e})},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${l} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${l} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(u&&f("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}}),Jn=f((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=process.nextTick;process.nextTick=function(){if(!t.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let e=0;e0&&process.once("uncaughtException",(function(){e.post.call(s,a,!0),e.destroy.call(null,a)}))}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}}),Xn=f((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=global.Promise,i=r.prototype.then;function o(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,s){if(!t.enabled)return i.call(this,r,s);let a=new n,c=--t.counter;return e.init.call(a,c,0,null,null),i.call(this,o(r,a,c,!0),o(s,a,c,!1))}}}),Qn=f((e,t)=>{"use strict";var r=n(173);function i(){}function o(){}function s(){}var a=new Map,c=new Map,u=new Map,l=null,d=!1;function h(e,t,n,i,o,s,a){let c=r[n],u=r[i];r[n]=function(){if(!t.enabled)return c.apply(r,arguments);let n=new Array(arguments.length);for(let e=0;e0&&process.once("uncaughtException",(function(){e.post.call(h,p,!0),s.delete(u),e.destroy.call(null,p)}))}e.post.call(h,p,!1),l=null,(a||d)&&(d=!1,s.delete(u),e.destroy.call(null,p))},u=c.apply(r,n),s.set(u,p),u},r[i]=function(t){if(l===t&&null!==t)d=!0;else if(s.has(t)){let n=s.get(t);s.delete(t),e.destroy.call(null,n)}u.apply(r,arguments)}}t.exports=function(){h(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),h(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),h(this._hooks,this._state,"setImmediate","clearImmediate",s,u,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}}),Zn=f((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen ",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}}),er=f((e,t)=>{"use strict";var n=process.binding("async_wrap"),r=n.Providers.TIMERWRAP,i={nextTick:Jn(),promise:Xn(),timers:Qn()},o=new Set;function s(){this.enabled=!1,this.counter=0}function a(){let e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],i=this.destroyFns=[];this.init=function(t,n,i,s){if(n!==r)for(let r of e)r(t,this,n,i,s);else o.add(t)},this.pre=function(e){if(!o.has(e))for(let n of t)n(e,this)},this.post=function(e,t){if(!o.has(e))for(let r of n)r(e,this,t)},this.destroy=function(e){if(o.has(e))o.delete(e);else for(let t of i)t(e)}}function c(e,t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}function u(){this._state=new s,this._hooks=new a,this.version=Zn().version,this.providers=n.Providers;for(let e of Object.keys(i))i[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),n.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},a.prototype.remove=function(e){e.init&&c(this.initFns,e.init),e.pre&&c(this.preFns,e.pre),e.post&&c(this.postFns,e.post),e.destroy&&c(this.destroyFns,e.destroy)},t.exports=u,u.prototype.addHooks=function(e){this._hooks.add(e)},u.prototype.removeHooks=function(e){this._hooks.remove(e)},u.prototype.enable=function(){this._state.enabled=!0,n.enable()},u.prototype.disable=function(){this._state.enabled=!1,n.disable()}}),tr=f((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen ",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}}),nr=f((e,t)=>{t.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return""}catch(e){return""}}}(e));for(var r=0;r"}catch(e){i=""}}n.push(" at "+i)}return n.join("\n")}}),rr=f((e,t)=>{var n=nr();function r(){this.extend=new s,this.filter=new s,this.format=new a,this.version=tr().version}var i=!1;r.prototype.callSite=function e(t){t||(t={}),i=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return i=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var o=new r;function s(){this._modifiers=[]}function a(){this._formater=n,this._previous=void 0}s.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n{if(global._stackChain){if(global._stackChain.version!==tr().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=rr()}),or=f((e,t)=>{"use strict";var n=er();if(global._asyncHook){if(global._asyncHook.version!==Zn().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else ir().filter.attach((function(e,t){return t.filter((function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),t.exports=global._asyncHook=new n}),sr=f((e,t)=>{"use strict";var r=n(32),i=n(79),o=zn(),s=or(),a="cls@contexts",c="error@context",u=[];for(let e in s.providers)u[s.providers[e]]=e;var l,d,h=process.env.DEBUG_CLS_HOOKED,p=-1;function f(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function g(e){return process.namespaces[e]}function m(e){let t=g(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function v(e){process.env.DEBUG&&process._rawDebug(e)}function y(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:g,createNamespace:function(e){i.ok(e,"namespace must be given a name."),h&&v("CREATING NAMESPACE "+e);let t=new f(e);return t.id=p,s.addHooks({init(n,i,o,s,a){p=n,s?(t._contexts.set(n,t._contexts.get(s)),h&&v("PARENTID: "+e+" uid:"+n+" parent:"+s+" provider:"+o)):t._contexts.set(p,t.active),h&&v("INIT "+e+" uid:"+n+" parent:"+s+" provider:"+u[o]+" active:"+r.inspect(t.active,!0))},pre(n,i){p=n;let o=t._contexts.get(n);o?(h&&v(" PRE "+e+" uid:"+n+" handle:"+y(i)+" context:"+r.inspect(o)),t.enter(o)):h&&v(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+y(i))},post(n,i){p=n;let o=t._contexts.get(n);o?(h&&v(" POST "+e+" uid:"+n+" handle:"+y(i)+" context:"+r.inspect(o)),t.exit(o)):h&&v(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+y(i))},destroy(n){p=n,h&&v("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(p))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:m,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){m(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},f.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return h&&v(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+p+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},f.prototype.get=function(e){if(this.active)return h&&v(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+p+" active:"+r.inspect(this.active,!0)),this.active[e];h&&v(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+p+" active:"+r.inspect(this.active,!0))},f.prototype.createContext=function(){h&&v(" CREATING Context: "+this.name+" uid:"+p+" len:"+this._set.length+" active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=p,h&&v(" CREATED Context: "+this.name+" uid:"+p+" len:"+this._set.length+" context:"+r.inspect(e,!0,2,!0)),e},f.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return h&&v(" BEFORE RUN: "+this.name+" uid:"+p+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{h&&v(" AFTER RUN: "+this.name+" uid:"+p+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},f.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},f.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return h&&v(" BEFORE runPromise: "+this.name+" uid:"+p+" len:"+this._set.length+" "+r.inspect(t)),n.then(e=>(h&&v(" AFTER runPromise: "+this.name+" uid:"+p+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e)).catch(e=>{throw e[c]=t,h&&v(" AFTER runPromise: "+this.name+" uid:"+p+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e})},f.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},f.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),h&&v(" ENTER "+this.name+" uid:"+p+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},f.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),h&&v(" EXIT "+this.name+" uid:"+p+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(h&&v("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},f.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},f.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),h)for(d in(l=ir()).filter._modifiers)l.filter.deattach(d)}),ar=f((e,t)=>{"use strict";var n=Gn();process&&n.gte(process.versions.node,"8.0.0")?t.exports=Yn():t.exports=sr()}),cr=f((e,t)=>{var n;e=t.exports=G,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var h=s++;o[h]="(?:"+o[a]+"|"+o[u]+")";var p=s++;o[p]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[h]+"(?:\\."+o[h]+")*))";var g=s++;o[g]="(?:-?("+o[p]+"(?:\\."+o[p]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,b="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+b+"$";var _="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+_+"$";var E=s++;o[E]="((?:<|>)?=?)";var P=s++;o[P]=o[c]+"|x|X|\\*";var w=s++;o[w]=o[a]+"|x|X|\\*";var T=s++;o[T]="[v=\\s]*("+o[w]+")(?:\\.("+o[w]+")(?:\\.("+o[w]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var C=s++;o[C]="[v=\\s]*("+o[P]+")(?:\\.("+o[P]+")(?:\\.("+o[P]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var I=s++;o[I]="^"+o[E]+"\\s*"+o[T]+"$";var R=s++;o[R]="^"+o[E]+"\\s*"+o[C]+"$";var O=s++;o[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=s++;o[D]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[D]+"\\s+",i[x]=new RegExp(o[x],"g");var k=s++;o[k]="^"+o[D]+o[T]+"$";var A=s++;o[A]="^"+o[D]+o[C]+"$";var N=s++;o[N]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[N]+"\\s+",i[j]=new RegExp(o[j],"g");var M=s++;o[M]="^"+o[N]+o[T]+"$";var L=s++;o[L]="^"+o[N]+o[C]+"$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var U=s++;o[U]="(\\s*)"+o[E]+"\\s*("+_+"|"+o[T]+")",i[U]=new RegExp(o[U],"g");var W=s++;o[W]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var B=s++;o[B]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var V,H=s++;for(o[H]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new G(e,n).inc(t,r).version}catch(e){return null}},e.diff=function(e,t){if(Q(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var K=/^[0-9]+$/;function z(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return Y(e,t,n)<0}function Q(e,t,n){return 0===Y(e,t,n)}function Z(e,t,n){return 0!==Y(e,t,n)}function ee(e,t,n){return Y(e,t,n)>=0}function te(e,t,n){return Y(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return Z(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=Y,e.compareLoose=function(e,t){return Y(e,t,!0)},e.rcompare=function(e,t,n){return Y(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=J,e.lt=X,e.eq=Q,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,h){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new G(e,r),t=new oe(t,r),n){case">":i=J,o=te,s=X,a=">",c=">=";break;case"<":i=X,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,r)?d=e:s(e.semver,h.semver,r)&&(h=e)})),d.operator===a||d.operator===c||(!h.operator||h.operator===a)&&o(e,h.semver))return!1;if(h.operator===c&&s(e,h.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[F]:i[q],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new G(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[B]:i[W];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),n("comparator trim",e,i[U]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[j],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[q],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[L]:i[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[A]:i[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[R]:i[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||J(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),ur=f((e,t)=>{var n,r,i,o,s,a=Kn().wrap,c=[],u=0,l=!1,d=[];function h(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var o=0;o0&&(c=d.pop()),o=void 0,n&&!l},r=function(e,t,n){var r=[];l=!0;for(var i=0;i0&&t[i].before(this,r[t[i].uid]);l=!1;var s=e.apply(this,arguments);for(l=!0,i=0;i0&&t[i].after(this,r[t[i].uid]);return l=!1,c=d.pop(),o=void 0,s}},a(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))):(s=!1,n=function(e){if(s)throw e;for(var t=!1,n=c.length,r=0;r0&&t[p].before(this,i[t[p].uid]);l=!1;try{o=e.apply(this,arguments)}catch(e){a=!0;for(p=0;p0&&t[p].after(this,i[t[p].uid]);l=!1}c=d.pop()}return o}},process.addListener("uncaughtException",n)),p.prototype.create=void 0,p.prototype.before=void 0,p.prototype.after=void 0,p.prototype.error=void 0,p.prototype.data=void 0,p.prototype.uid=0,p.prototype.flags=0,process.createAsyncListener=f,process.addAsyncListener=function(e,t){var n;n=e instanceof p?e:f(e,t);for(var r=!1,i=0;i0)return r(e,n,t);return function(e,t,n){l=!0;for(var r=0;r{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,o){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}}),dr=f(()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=Kn(),t=cr(),r=e.wrap,i=e.massWrap,o=ur(),s=n(32),a=t.gte(process.version,"6.0.0"),c=t.gte(process.version,"7.0.0"),u=t.gte(process.version,"8.0.0"),l=t.gte(process.version,"11.0.0"),d=n(148);function h(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=o(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=o(this._handle.onconnection))}}}function p(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=o(t._originalOnread)}}c&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],n={};"object"==typeof t&&null!==t?n=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?n.path=t:(n.port=t,e.length>1&&"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"!=typeof r?[n,null]:[n,r]}:!c&&!d._normalizeConnectArgs&&(d._normalizeConnectArgs=function(e){var t,n={};"object"==typeof e[0]&&null!==e[0]?n=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?n.path=e[0]:(n.port=e[0],"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"==typeof r?[n,r]:[n]}),"_setUpListenHandle"in d.Server.prototype?r(d.Server.prototype,"_setUpListenHandle",h):r(d.Server.prototype,"_listen2",h),r(d.Socket.prototype,"connect",(function(e){return function(){var t;(t=u&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:c?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=o(t[1]));var n=e.apply(this,t);return p(this),n}}));var f=n(118);r(f.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=o((function(e){return p(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var g=n(93);function m(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=o(e._handle.onread),r(e._handle,"close",D))})),e._handle&&(e._handle.onexit=o(e._handle.onexit))}g.ChildProcess?r(g.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return m(this),t}})):i(g,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return m(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var v=[];process._nextDomainTick&&v.push("_nextDomainTick"),process._tickDomainCallback&&v.push("_tickDomainCallback"),i(process,v,O),r(process,"nextTick",D);var y=["setTimeout","setInterval"];global.setImmediate&&y.push("setImmediate");var b=n(173),_=global.setTimeout===b.setTimeout;i(b,y,D),_&&i(global,y,D);var S=n(418);i(S,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],O),S.resolveNaptr&&r(S,"resolveNaptr",O);var E,P,w,T=n(26);i(T,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],O),T.lchown&&r(T,"lchown",O),T.lchmod&&r(T,"lchmod",O),T.ftruncate&&r(T,"ftruncate",O);try{E=n(210)}catch(e){}E&&E.Deflate&&E.Deflate.prototype&&((P=Object.getPrototypeOf(E.Deflate.prototype))._transform?r(P,"_transform",O):P.write&&P.flush&&P.end&&i(P,["write","flush","end"],O));try{w=n(104)}catch(e){}w&&(C=["pbkdf2","randomBytes"],l||C.push("pseudoRandomBytes"),i(w,C,O));var C,I,R=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function O(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r{"use strict";var r=n(79),i=zn(),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function u(e){var t=c(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function l(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){u(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||dr(),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{n.exit(t)}}},a.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){!e||(e[o]||(e[o]=Object.create(null)),e[o][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,n=e[o];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||l(),t.exports={getNamespace:c,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:u,reset:l}}),pr=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=m(),n=Kt(),r=Xt(),i=Qt(),o=$n(),s=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new a(r)}:null},e.spanToContextObject=function(t,n,i){var o=new r;return o.traceId=t.traceId,o.spanId=t.spanId,o.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,o.parentId=n,e.generateContextObject(o.traceId,o.parentId,i,null,o)},e.runWithContext=function(t,n){var r;return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,n){var r;return e.enabled?e.session.bind(t,n?((r={})[e.CONTEXT_NAME]=n,r):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=ar():this.cls=hr()),e.session=this.cls.createNamespace("AI-CLS-Session"),n.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0}},e.startOperation=function(n,s){var a=n&&n.traceContext||null,c=n&&n.traceId?n:null,u=n&&n.headers;if(c){var l=new r("00-"+c.traceId+"-"+c.spanId+"-01"),d=new i(c.traceState?c.traceState.serialize():null);return e.generateContextObject(c.traceId,"|"+c.traceId+"."+c.spanId+".","string"==typeof s?s:"",void 0,l,d)}if(a){l=new r(a.traceparent),d=new i(a.tracestate);var h="object"==typeof s?new o(s):null;return e.generateContextObject(l.traceId,l.parentId,"string"==typeof s?s:h.getOperationName({}),h&&h.getCorrelationContextHeader()||void 0,l,d)}if(u){l=new r(u.traceparent?u.traceparent.toString():null),d=new i(u.tracestate?u.tracestate.toString():null),h=new o(n);return e.generateContextObject(l.traceId,l.parentId,h.getOperationName({}),h.getCorrelationContextHeader(),l,d)}return t.warn("startOperation was called with invalid arguments",arguments),null},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=s;var a=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Vr(),e),n(Hr(),e),n($r(),e),n(Gr(),e)}),zr=f((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,l.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,o,s,a,u=this;return i(this,(function(i){return t&&(r=this._redirectedHost||this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s="",t.forEach((function(e){var t=u._stringify(e);"string"==typeof t&&(s+=t+"\n")})),s.length>0&&(s=s.substring(0,s.length-1)),a=Buffer.from?Buffer.from(s):new Buffer(s),c.gzip(a,(function(i,s){var c=s;i?(l.warn(i),c=a,o.headers["Content-Length"]=a.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=s.length.toString()),l.info(e.TAG,o),o[d.disableCollectionRequestOption]=!0;var p=h.makeRequest(u._config,r,o,(function(r){r.setEncoding("utf-8");var i="";r.on("data",(function(e){i+=e})),r.on("end",(function(){if(u._numConsecutiveFailures=0,u._enableDiskRetryMode)if(200===r.statusCode)u._resendTimer||(u._resendTimer=setTimeout((function(){u._resendTimer=null,u._sendFirstFileOnDisk()}),u._resendInterval),u._resendTimer.unref());else if(u._isRetriable(r.statusCode))try{var o=JSON.parse(i),s=[];o.errors.forEach((function(e){u._isRetriable(e.statusCode)&&s.push(t[e.index])})),s.length>0&&u._storeToDisk(s)}catch(e){u._storeToDisk(t)}if(307===r.statusCode||308===r.statusCode)if(u._numConsecutiveRedirects++,u._numConsecutiveRedirects<10){var a=r.headers.location?r.headers.location.toString():null;a&&(u._redirectedHost=a,u.send(t,n))}else"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else u._numConsecutiveRedirects=0,"function"==typeof n&&n(i),l.info(e.TAG,i),"function"==typeof u._onSuccess&&u._onSuccess(i)}))}));p.on("error",(function(r){if(u._numConsecutiveFailures++,!u._enableDiskRetryMode||u._numConsecutiveFailures>0&&u._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";u._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+u._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),l.warn(e.TAG,i,h.dumpObj(r))}else{i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";l.info(e.TAG,i,h.dumpObj(r))}u._onErrorHelper(r),"function"==typeof n&&(r&&n(h.dumpObj(r)),n("Error sending telemetry")),u._enableDiskRetryMode&&u._storeToDisk(t)})),p.write(c),p.end()}))),[2]}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,n){var r=u.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!u.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=u.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=u.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(u.spawnSync){var t=u.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;o.lstat(e,(function(r,i){r&&"ENOENT"===r.code?o.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!r&&i.isDirectory()?n._applyACLRules(e,t):t(r||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){o.readdir(e,(function(n,r){if(n)return t(n,-1);var i=null,s=0,c=0;if(0!==r.length)for(var u=0;un._maxBytesOnDisk)l.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+i);else{var s=(new Date).getTime()+".ai.json",c=a.join(n._tempDir,s);l.info(e.TAG,"saving data to disk at: "+c),o.writeFile(c,n._stringify(t),{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){try{l.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var n=this._getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk)return void l.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+n);var r=(new Date).getTime()+".ai.json",i=a.join(this._tempDir,r);l.info(e.TAG,"saving data before crash to disk at: "+i),o.writeFileSync(i,t,{mode:384})}catch(t){l.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;o.exists(this._tempDir,(function(t){t&&o.readdir(e._tempDir,(function(t,n){if(t)e._onErrorHelper(t);else if((n=n.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0){var r=n[0],i=a.join(e._tempDir,r);o.readFile(i,(function(t,n){t?e._onErrorHelper(t):o.unlink(i,(function(t){if(t)e._onErrorHelper(t);else try{var r=JSON.parse(n.toString());e.send(r)}catch(e){l.warn("Failed to read persisted file",e)}}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){l.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;o.exists(this._tempDir,(function(n){n&&o.readdir(t._tempDir,(function(n,r){n?t._onErrorHelper(n):(r=r.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0&&r.forEach((function(n){var r=new Date(parseInt(n.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>r){var i=a.join(t._tempDir,n);o.unlink(i,(function(e){e&&t._onErrorHelper(e)}))}}))}))}))},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===s.type(),e}();t.exports=p}),Yr=f((e,t)=>{"use strict";var n=Vn(),r=Yt(),i=pr(),o=function(){function e(){}return e.createEnvelope=function(t,i,o,s,a){var c=null;switch(i){case n.TelemetryType.Trace:c=e.createTraceData(t);break;case n.TelemetryType.Dependency:c=e.createDependencyData(t);break;case n.TelemetryType.Event:c=e.createEventData(t);break;case n.TelemetryType.Exception:c=e.createExceptionData(t);break;case n.TelemetryType.Request:c=e.createRequestData(t);break;case n.TelemetryType.Metric:c=e.createMetricData(t);break;case n.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:c=e.createPageViewData(t)}if(o&&n.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var u in o)c.baseData.properties[u]||(c.baseData.properties[u]=o[u]);else c.baseData.properties=o;c.baseData.properties=r.validateStringMap(c.baseData.properties)}var l=a&&a.instrumentationKey||"",d=new n.Envelope;return d.data=c,d.iKey=l,d.name="Microsoft.ApplicationInsights."+l.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,i===n.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),r.baseData=t,r},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=r.w3cTraceId();var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),i.baseData=t,i},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),r.baseData=t,r},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var i=e.exception.stack,o=new n.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(i),o.hasFullStack=r.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new n.Data;return s.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=r.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),i.baseData=t,i},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var r=new n.DataPoint;r.count=isNaN(e.count)?1:e.count,r.kind=n.DataPointType.Aggregation,r.max=isNaN(e.max)?e.value:e.max,r.min=isNaN(e.min)?e.value:e.min,r.name=e.name,r.stdDev=isNaN(e.stdDev)?0:e.stdDev,r.value=e.value,t.metrics.push(r),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),i.baseData=t,i},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),i.baseData=t,i},e.getTags=function(e,t){var n=i.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var o in e.tags)r[o]=e.tags[o];if(t)for(var o in t)r[o]=t[o];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var a=n[o];if(s.regex.test(a)){var c=new s(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var u=0,l=t.length-1,d=0,h=u,p=l;u32768){var f=p-h+1;t.splice(h,f);break}h=u,p=l,u++,l--}}return t},e}(),s=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="",this.assembly=r.trim(t);var i=t.match(e.regex);i&&i.length>=5&&(this.method=r.trim(i[2])||this.method,this.fileName=r.trim(i[4])||"",this.line=parseInt(i[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=o}),Jr=f((e,t)=>{"use strict";var r=n(108),i=Ur(),o=wr(),s=Vn(),a=Br(),c=Kr(),u=pr(),l=zr(),d=Yt(),h=m(),p=Yr(),f=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new l(this.config);this.channel=new a((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,s.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=p.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString()),this._enableAzureProperties&&c.azureRoleEnvironmentTelemetryProcessor(n,this.context);var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&c.samplingTelemetryProcessor(n,{correlationContext:u.CorrelationContextManager.getCurrentContext()}),c.preAggregatedMetricsTelemetryProcessor(n,this.context),r&&(c.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else h.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=u.CorrelationContextManager.getCurrentContext();for(var i=0;i{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=Jr(),o=Nr(),s=kr(),a=m(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?o.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?o.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);t.exports=c}),Qr=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Zr=f(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,n,r=pr(),i=vr(),o=yr(),s=_r(),a=Pr(),c=Ar(),u=kr(),l=Nr(),d=Jt(),h=m(),p=Fr(),f=Wr();e.TelemetryClient=Xr(),e.Contracts=Vn(),e.azureFunctionsTypes=Qr(),(n=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[n.AI=0]="AI",n[n.AI_AND_W3C=1]="AI_AND_W3C";var g,v,y,b,_,S,E,P,w,T,C,I=!0,R=!1,O=!0,D=!0,x=!0,k=!1,A=!0,N=!0,j=!0,M=!0,L=!1,F=!0,q=void 0,U=void 0,W=!1;function B(){return e.defaultClient?(W=!0,y.enable(I,R),b.enable(O),_.enable(D),S.enable(x),E.enable(k,e.defaultClient.config),P.enable(F,v),w.useAutoCorrelation(M,g),w.enable(A),T.enable(N),e.liveMetricsClient&&L&&e.liveMetricsClient.enable(L)):h.warn("Start cannot be called before setup"),V}e.setup=function(t){return e.defaultClient?h.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),y=new i(e.defaultClient),b=new o(e.defaultClient),_=new s(e.defaultClient),S=new a(e.defaultClient),E=new c(e.defaultClient),w=new l(e.defaultClient),T=new u(e.defaultClient),P||(P=new f.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(j,q,U),V},e.start=B,e.getCorrelationContext=function(){return M?r.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return r.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return r.CorrelationContextManager.wrapCallback(e,t)};var V=function(){function n(){}return n.setDistributedTracingMode=function(e){return d.w3cEnabled=e===t.AI_AND_W3C,n},n.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),I=e,R=t,W&&y.enable(e,t),n},n.setAutoCollectExceptions=function(e){return O=e,W&&b.enable(e),n},n.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),D=e;var r=f.AutoCollectNativePerformance.parseEnabled(t);return F=r.isEnabled,v=r.disabledMetrics,W&&(_.enable(e),P.enable(r.isEnabled,r.disabledMetrics)),n},n.setAutoCollectPreAggregatedMetrics=function(e){return x=e,W&&S.enable(e),n},n.setAutoCollectHeartbeat=function(t){return k=t,W&&E.enable(t,e.defaultClient.config),n},n.setAutoCollectRequests=function(e){return A=e,W&&w.enable(e),n},n.setAutoCollectDependencies=function(e){return N=e,W&&T.enable(e),n},n.setAutoDependencyCorrelation=function(e,t){return M=e,g=t,W&&w.useAutoCorrelation(e,t),n},n.setUseDiskRetryCaching=function(t,r,i){return j=t,q=r,U=i,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,r,i),n},n.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),h.enableDebug=e,h.disableWarnings=!t,n},n.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new p(e.defaultClient.config,null),C=new s(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(C),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),L=t,n):(h.warn("Live metrics client cannot be setup without the default client"),n)},n.start=B,n}();e.Configuration=V,e.dispose=function(){d.w3cEnabled=!0,e.defaultClient=null,W=!1,y&&y.dispose(),b&&b.dispose(),_&&_.dispose(),S&&S.dispose(),E&&E.dispose(),P&&P.dispose(),w&&w.dispose(),T&&T.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),L=!1,e.liveMetricsClient=void 0)}});((e,t)=>{for(var n in p(e),t)i(e,n,{get:t[n],enumerable:!0})})(t,{default:()=>ci});var ei,ti,ni=g(n(37)),ri=g(n(2)),ii=g(n(2)),oi=g(n(2));function si(){return void 0!==oi.env.isTelemetryEnabled?oi.env.isTelemetryEnabled?ei.ON:ei.OFF:oi.workspace.getConfiguration("telemetry").get("enableTelemetry")?ei.ON:ei.OFF}(ti=ei||(ei={})).ON="on",ti.OFF="off";var ai=async e=>{let t;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let n=await Promise.resolve().then(()=>g(Zr()));n.defaultClient?(t=new n.TelemetryClient(e),t.channel.setUseDiskRetryCaching(!0)):(n.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),t=n.defaultClient),ri&&ri.env&&(t.context.tags[t.context.keys.userId]=ri.env.machineId,t.context.tags[t.context.keys.sessionId]=ri.env.sessionId,t.context.tags[t.context.keys.cloudRole]=ri.env.appName,t.context.tags[t.context.keys.cloudRoleInstance]=ri.env.appName),e&&0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1")}catch(e){return Promise.reject(e)}return{logEvent:(e,n)=>{null==t||t.trackEvent({name:e,properties:null==n?void 0:n.properties,measurements:null==n?void 0:n.measurements})},logException:(e,n)=>{null==t||t.trackException({exception:e,properties:null==n?void 0:n.properties,measurements:null==n?void 0:n.measurements})},flush:async()=>{null==t||t.flush()}}},ci=class extends class{constructor(e,t,n,r,i){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!i,this.updateUserOptStatus(),void 0!==ii.env.onDidChangeTelemetryEnabled?(this.disposables.push(ii.env.onDidChangeTelemetryEnabled(()=>this.updateUserOptStatus())),this.disposables.push(ii.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))):this.disposables.push(ii.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))}updateUserOptStatus(){let e=si();this.userOptIn=e===ei.ON,this.errorOptIn=e===ei.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=ii.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!1!==this.errorOptIn&&(!this.firstParty||("other"!==this.cleanRemoteName(ii.env.remoteName)||!(void 0===this.extension||this.extension.extensionKind===ii.ExtensionKind.Workspace||ii.env.uiKind===ii.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,ii&&ii.env){switch(e["common.vscodemachineid"]=ii.env.machineId,e["common.vscodesessionid"]=ii.env.sessionId,e["common.vscodeversion"]=ii.version,e["common.isnewappinstall"]=ii.env.isNewAppInstall?ii.env.isNewAppInstall.toString():"false",e["common.product"]=ii.env.appHost,ii.env.uiKind){case ii.UIKind.Web:e["common.uikind"]="web";break;case ii.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(ii.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==ii.env.appRoot&&r.push(new RegExp(ii.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(i="";(n=s.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every(([e,t])=>n.index=t)&&(i+=e.substring(a,n.index)+"",a=s.lastIndex);a":i.test(r)?t[n]="":t[n]=r}return t}sendTelemetryEvent(e,t,n){if(this.userOptIn&&""!==e){t=h(h({},t),this.getCommonProperties());let r=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(r),measurements:n})}}sendRawTelemetryEvent(e,t,n){this.userOptIn&&""!==e&&(t=h(h({},t),this.getCommonProperties()),this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:t,measurements:n}))}sendTelemetryErrorEvent(e,t,n,r){if(this.errorOptIn&&""!==e){t=h(h({},t),this.getCommonProperties());let i=this.cloneAndChange(t,(e,t)=>this.shouldSendErrorTelemetry()?this.anonymizeFilePaths(t,this.firstParty):void 0===r||-1!==r.indexOf(e)?"REDACTED":this.anonymizeFilePaths(t,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:n})}}sendTelemetryException(e,t,n){if(this.shouldSendErrorTelemetry()&&this.errorOptIn&&e){t=h(h({},t),this.getCommonProperties());let r=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(r),measurements:n})}}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map(e=>e.dispose()))}}{constructor(e,t,n,r){let i=new class{constructor(e,t){this._isInstantiated=!1,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e,si()!==ei.OFF&&this.instantiateAppender()}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):!this._isInstantiated&&si()===ei.ON&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):!this._isInstantiated&&si()!==ei.OFF&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await 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,ai);n&&0===n.indexOf("AIF-")&&(r=!0),super(e,t,i,{release:ni.release(),platform:ni.platform(),architecture:ni.arch()},r)}}},function(e,t){e.exports=require("module")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TraceOptions=t.LogLevel=void 0,function(e){e[e.Off=0]="Off",e[e.Error=10]="Error",e[e.Warn=20]="Warn",e[e.Info=30]="Info",e[e.Debug=40]="Debug"}(t.LogLevel||(t.LogLevel={})),function(e){e[e.None=0]="None",e[e.Arguments=1]="Arguments",e[e.ReturnValue=2]="ReturnValue"}(t.TraceOptions||(t.TraceOptions={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFileFilter=t.getFileType=t.convertFileType=t.FileType=void 0;const r=n(26),i=n(2),o=n(5);function s(e){return e.isFile()?t.FileType.File:e.isDirectory()?t.FileType.Directory:e.isSymbolicLink()?t.FileType.SymbolicLink:t.FileType.Unknown}async function a(e,n={ignoreErrors:!0}){let i;try{i=await r.promises.lstat(e)}catch(r){if("ENOENT"===r.code)return;if(n.ignoreErrors)return(0,o.traceError)(`lstat() failed for "${e}" (${r})`),t.FileType.Unknown;throw r}return s(i)}t.FileType=i.FileType,t.convertFileType=s,t.getFileType=a,t.getFileFilter=function(e={ignoreMissing:!0}){const n=function(e){if(void 0!==e){if(Array.isArray(e)){if(0===e.length)return;return e}return[e]}}(e.ignoreFileType);if(e.ignoreMissing||n)return async function(r){let i=await async function(e,t={}){let n;if("string"!=typeof e){if(!t.ensure){if(void 0===t.onMissing)return e;if(void 0!==await a(e.filename))return e}n=e.filename}else n=e;const r=await a(n)||t.onMissing;if(void 0!==r)return{filename:n,filetype:r}}(r,{ensure:e.ensureEntry});if(!i){if(e.ignoreMissing)return!1;i={filename:"string"==typeof r?r:r.filename,filetype:t.FileType.Unknown}}return!n||!n.includes(i.filetype)}}},function(e,t,n){ /*! * Tmp * * Copyright (c) 2011-2015 KARASZI Istvan * * MIT Licensed */ var r=n(26),i=n(3),o=n(104),s=n(424),a=n(204),c=s(),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,d=a.O_CREAT|a.O_EXCL|a.O_RDWR,h=[],p=!1,f=!1;function g(e){var t=[],n=null;try{n=o.randomBytes(e)}catch(t){n=o.pseudoRandomBytes(e)}for(var r=0;r0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}()}function b(e){var t=m(e)[0],n=t.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(t.template&&!t.template.match(l))throw new Error("Invalid template provided");do{var i=v(t);try{r.statSync(i)}catch(e){return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function _(e){var t=[e];do{for(var n=t.pop(),o=!1,s=r.readdirSync(n),a=0,c=s.length;a=0&&h.splice(i,1),n=!0,e(t)}}}function w(){if(!f||p)for(var e=0,t=h.length;e{await this.extensionsChangeHandler()}))}dispose(){for(var e;this.disposables.length;)null===(e=this.disposables.pop())||void 0===e||e.dispose()}get pylanceInstallCompleted(){return this.pylanceInstallCompletedDeferred.promise}async handleLanguageServerChange(e){if(this.currentLsType===e||e===a.LanguageServerType.Microsoft)return;let t;e!==a.LanguageServerType.Node||this.isPylanceInstalled()?(t=await this.appShell.showInformationMessage(s.LanguageService.reloadAfterLanguageServerChange(),s.Common.reload()),t===s.Common.reload()&&this.commands.executeCommand("workbench.action.reloadWindow")):await c(this.appShell,this.commands,this.workspace,this.configService),this.currentLsType=e}async extensionsChangeHandler(){const e=this.pylanceInstalled;if(this.pylanceInstalled=this.isPylanceInstalled(),e===this.pylanceInstalled)return void this.pylanceInstallCompletedDeferred.resolve();const t=await this.appShell.showWarningMessage(s.Pylance.pylanceInstalledReloadPromptMessage(),s.Common.bannerLabelYes(),s.Common.bannerLabelNo());this.pylanceInstallCompletedDeferred.resolve(),t===s.Common.bannerLabelYes()&&this.commands.executeCommand("workbench.action.reloadWindow")}isPylanceInstalled(){return!!this.extensions.getExtension(i.PYLANCE_EXTENSION_ID)}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageServerAnalysisOptionsWithEnv=t.LanguageServerAnalysisOptionsBase=void 0;const i=n(2),o=n(83),s=n(10),a=n(53),c=n(5);class u{constructor(e,t){this.workspace=t,this.didChange=new i.EventEmitter,this.output=e.channel}async initialize(e,t){}get onDidChange(){return this.didChange.event}dispose(){this.didChange.dispose()}async getAnalysisOptions(){const e=this.getWorkspaceFolder();return{documentSelector:this.getDocumentFilters(e),workspaceFolder:e,synchronize:{configurationSection:s.PYTHON_LANGUAGE},outputChannel:this.output,revealOutputChannelOn:o.RevealOutputChannelOn.Never,initializationOptions:await this.getInitializationOptions()}}getWorkspaceFolder(){}getDocumentFilters(e){return this.workspace.isVirtualWorkspace?[{language:s.PYTHON_LANGUAGE}]:s.PYTHON}async getInitializationOptions(){}}r([(0,c.traceDecoratorError)("Failed to get analysis options")],u.prototype,"getAnalysisOptions",null),t.LanguageServerAnalysisOptionsBase=u;class l extends u{constructor(e,t,n){super(t,n),this.envVarsProvider=e,this.disposables=[],this.envPythonPath=""}async initialize(e,t){const n=this.envVarsProvider.onDidEnvironmentVariablesChange(this.onEnvVarChange,this);this.disposables.push(n)}dispose(){super.dispose(),this.disposables.forEach(e=>e.dispose())}async getEnvPythonPath(){const e=await this.envVarsProvider.getEnvironmentVariables();return this.envPythonPath=e.PYTHONPATH||"",this.envPythonPath}onEnvVarChange(){this.notifyifEnvPythonPathChanged().ignoreErrors()}async notifyifEnvPythonPathChanged(){const e=(await this.envVarsProvider.getEnvironmentVariables()).PYTHONPATH||"";this.envPythonPath!==e&&this.didChange.fire()}}r([(0,a.debounceSync)(1e3)],l.prototype,"onEnvVarChange",null),t.LanguageServerAnalysisOptionsWithEnv=l},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const o=n(93),s=n(26),a=n(3),c=n(451),u=n(2),l=n(109),d=n(281),h=n(54),p=n(520),f=n(294);i(n(294),t),i(n(521),t);var g,m,v,y,b,_;!function(e){e.is=function(e){return l.string(e.command)}}(g||(g={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(m=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===m.socket&&l.number(t.port)}}(v||(v={})),function(e){e.is=function(e){return l.string(e.module)}}(y||(y={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(b||(b={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(_||(_={}));class S extends d.CommonLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,u;l.string(t)?(o=e,s=t,a=n,c=r,u=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,u=r),void 0===u&&(u=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=u;try{this.checkVersion()}catch(e){throw l.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=c.parse(u.version);if(!e)throw new Error("No valid VS Code version detected. Version string is: "+u.version);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!c.satisfies(e,"^1.52.0"))throw new Error("The language client requires VS Code version ^1.52.0 but received version "+u.version)}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}})}checkProcessDied(e){e&&setTimeout(()=>{try{process.kill(e.pid,0),p.terminate(e)}catch(e){}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;let n=Object.create(null);return Object.keys(process.env).forEach(e=>n[e]=process.env[e]),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach(t=>n[t]=e[t]),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function i(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}let s,a=this._serverOptions;if(l.func(a))return a().then(t=>{if(h.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(b.is(t))return this._isDetached=!!t.detached,{reader:new f.StreamMessageReader(t.reader),writer:new f.StreamMessageWriter(t.writer)};{let n;return _.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),{reader:new f.StreamMessageReader(n.stdout),writer:new f.StreamMessageWriter(n.stdin)}}});let c=a;return s=c.run||c.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some(e=>n.some(t=>e.startsWith(t))||r.some(t=>e===t))}()?c.debug:c.run:a,this._getServerWorkingDir(s.options).then(n=>{if(y.is(s)&&s.module){let r=s,a=r.transport||m.stdio;if(!r.runtime){let s=void 0;return new Promise((c,u)=>{let d=r.args&&r.args.slice()||[];a===m.ipc?d.push("--node-ipc"):a===m.stdio?d.push("--stdio"):a===m.pipe?(s=f.generateRandomPipeName(),d.push("--pipe="+s)):v.isSocket(a)&&d.push("--socket="+a.port),d.push("--clientProcessId="+process.pid.toString());let h=r.options||Object.create(null);if(h.env=t(h.env,!0),h.execArgv=h.execArgv||[],h.cwd=n,h.silent=!0,a===m.ipc||a===m.stdio){let t=o.fork(r.module,d||[],h);i(t),this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),c({reader:new f.IPCMessageReader(this._serverProcess),writer:new f.IPCMessageWriter(this._serverProcess)})):c({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})}else a===m.pipe?f.createClientPipeTransport(s).then(t=>{let n=o.fork(r.module,d||[],h);i(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})}):v.isSocket(a)&&f.createClientSocketTransport(a.port).then(t=>{let n=o.fork(r.module,d||[],h);i(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})})})}{let i=[],s=r.options||Object.create(null);s.execArgv&&s.execArgv.forEach(e=>i.push(e)),i.push(r.module),r.args&&r.args.forEach(e=>i.push(e));const c=Object.create(null);c.cwd=n,c.env=t(s.env,!1);const u=this._getRuntimePath(r.runtime,n);let d=void 0;if(a===m.ipc?(c.stdio=[null,null,null,"ipc"],i.push("--node-ipc")):a===m.stdio?i.push("--stdio"):a===m.pipe?(d=f.generateRandomPipeName(),i.push("--pipe="+d)):v.isSocket(a)&&i.push("--socket="+a.port),i.push("--clientProcessId="+process.pid.toString()),a===m.ipc||a===m.stdio){let t=o.spawn(u,i,c);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),Promise.resolve({reader:new f.IPCMessageReader(t),writer:new f.IPCMessageWriter(t)})):Promise.resolve({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})):Promise.reject(`Launching server using runtime ${u} failed.`)}if(a===m.pipe)return f.createClientPipeTransport(d).then(t=>{let n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)});if(v.isSocket(a))return f.createClientSocketTransport(a.port).then(t=>{let n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)})}}else if(g.is(s)&&s.command){let t=s,r=t.args||[],i=Object.assign({},t.options);i.cwd=i.cwd||n;let a=o.spawn(t.command,r,i);return a&&a.pid?(a.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),this._serverProcess=a,this._isDetached=!!i.detached,Promise.resolve({reader:new f.StreamMessageReader(a.stdout),writer:new f.StreamMessageWriter(a.stdin)})):Promise.reject(`Launching server using command ${t.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(a,null,4)))})}_getRuntimePath(e,t){if(a.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=a.join(n,e);if(s.existsSync(t))return t}if(void 0!==t){const n=a.join(t,e);if(s.existsSync(n))return n}return e}_mainGetRootPath(){let e=u.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(e=>{s.lstat(t,(n,r)=>{e(!n&&r.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}getLocale(){const e=process.env.VSCODE_NLS_CONFIG;if(void 0===e)return"en";let t=void 0;try{t=JSON.parse(e)}catch(e){}return void 0===t||"string"!=typeof t.locale?"en":t.locale}}t.LanguageClient=S;t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return u.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new u.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?u.workspace.getConfiguration(t).get(n,!1):u.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}}},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>0!==r(e,t,n)},function(e,t,n){const r=n(217),i=n(279),o=n(177),s=n(220),a=n(219),c=n(221);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.CommonLanguageClient=void 0;const r=n(54),i=n(508),o=n(287),s=n(509),a=n(510),c=n(511),u=n(512),l=n(513),d=n(514),h=n(515),p=n(516),f=n(517),g=n(518),m=n(519);class v extends r.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 i.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 h.ProgressFeature(this)),this.registerFeature(new p.CallHierarchyFeature(this)),this.registerFeature(new f.SemanticTokensFeature(this)),this.registerFeature(new m.LinkedEditingFeature(this)),this.registerFeature(new g.DidCreateFilesFeature(this)),this.registerFeature(new g.DidRenameFilesFeature(this)),this.registerFeature(new g.DidDeleteFilesFeature(this)),this.registerFeature(new g.WillCreateFilesFeature(this)),this.registerFeature(new g.WillRenameFilesFeature(this)),this.registerFeature(new g.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";e.exports=n(151)},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 r=n(285);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(283);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=n(153);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(286);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(480);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(481);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(483);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(96);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 r=n(152);var i;!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}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){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&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(96),i=n(152),o=n(153);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||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=r.default().timer.setTimeout(e.bind(t),0);return{dispose(){r.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 r=n(2),i=n(27);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(i.ConfigurationRequest.type,(t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.clientOptions.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)})}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=o(r.workspace.getConfiguration(void 0,e).get(t));else{let s=r.workspace.getConfiguration(t.substr(0,i),e);s&&(n=o(s.get(t.substr(i+1))))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=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 r=n(2);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);class i extends r.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const r=n(2),i=n(109);!function(e){e.is=function(e){const t=e;return null!=t&&(i.number(t.value)||i.string(t.value))&&i.string(t.target)}}(t.DiagnosticCode||(t.DiagnosticCode={}));class o extends r.Diagnostic{constructor(e,t,n,r){super(e,t,n),this.data=r,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);class i extends r.CallHierarchyItem{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,o),void 0!==s&&(this.data=s)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const r=n(2),i=n(27),o=n(109);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(i.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}})}begin(e){r.window.withProgress({location:r.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(i.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})))}report(e){if(this._infinite&&o.string(e.message))this._progress.report({message:e.message});else if(o.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._progress.report({message:e.message,increment:n}),this._reported+=n}}cancel(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}}},function(e,t,n){"use strict";e.exports=n(27)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBasedCancellationStrategy=void 0;const r=n(104),i=n(26),o=n(37),s=n(3),a=n(83);function c(e){return s.join(o.tmpdir(),"python-languageserver-cancellation",e)}function u(e,t){return s.join(c(e),`cancellation-${String(t)}.tmp`)}function l(e){try{e()}catch(e){}}class d{constructor(e){this.folderName=e;const t=c(e);l(()=>i.mkdirSync(t,{recursive:!0}))}sendCancellation(e,t){const n=u(this.folderName,t);l(()=>i.writeFileSync(n,"",{flag:"w"}))}cleanup(e){l(()=>i.unlinkSync(u(this.folderName,e)))}dispose(){const e=c(this.folderName);l(()=>function e(t){const n=i.lstatSync(t);if(n)if(n.isDirectory()&&!n.isSymbolicLink()){for(const n of i.readdirSync(t))e(s.join(t,n));i.rmdirSync(t)}else i.unlinkSync(t)}(e))}}t.FileBasedCancellationStrategy=class{constructor(){const e=(0,r.randomBytes)(21).toString("hex");this._sender=new d(e)}get receiver(){return a.CancellationReceiverStrategy.Message}get sender(){return this._sender}getCommandLineArguments(){return["--cancellationReceive=file:"+this._sender.folderName]}dispose(){this._sender.dispose()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressReporting=void 0;const r=n(2),i=n(16);t.ProgressReporting=class{constructor(e){this.languageClient=e,this.languageClient.onNotification("python/setStatusBarMessage",e=>{this.statusBarMessage&&this.statusBarMessage.dispose(),this.statusBarMessage=r.window.setStatusBarMessage(e)}),this.languageClient.onNotification("python/beginProgress",e=>{this.progressDeferred||this.beginProgress()}),this.languageClient.onNotification("python/reportProgress",e=>{this.progress||this.beginProgress(),this.progress.report({message:e})}),this.languageClient.onNotification("python/endProgress",e=>{this.progressDeferred&&(this.progressDeferred.resolve(),this.progressDeferred=void 0,this.progress=void 0)})}dispose(){this.statusBarMessage&&this.statusBarMessage.dispose()}beginProgress(){this.progressDeferred=(0,i.createDeferred)(),r.window.withProgress({location:r.ProgressLocation.Window,title:""},e=>(this.progress=e,this.progressDeferred.promise))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killPid=t.execObservable=t.plainExec=t.shellExec=void 0;const r=n(93),i=n(524),o=n(16),s=n(298),a=n(25),c=n(22);function u(e,t){const n={...e},r=n;if(r){r.encoding="string"==typeof r.encoding&&r.encoding.length>0?r.encoding:s.DEFAULT_ENCODING;const{encoding:e}=r;delete r.encoding,r.encoding=e}if(n.env&&0!==Object.keys(n.env).length)n.env={...n.env};else{const e=t||process.env;n.env={...e}}return r&&r.extraVariables&&(n.env={...n.env,...r.extraVariables}),n.env.PYTHONUNBUFFERED="1",n.env.PYTHONIOENCODING||(n.env.PYTHONIOENCODING="utf-8"),n}function l(e){const t=e.match(/>>>PYTHON-EXEC-OUTPUT([\s\S]*)<<=2?t[1].trim():void 0;return void 0!==n?n:e}function d(e){try{"win32"===process.platform?(0,r.execSync)(`taskkill /pid ${e} /T /F`):process.kill(e)}catch(e){}}t.shellExec=function(e,t={},n,i){const o=u(t,n);return new Promise((t,n)=>{const s=(0,r.exec)(e,o,(e,r,i)=>{e&&null!==e?n(e):o.throwOnStdErr&&i&&i.length?n(new Error(i)):(r=l(r),t({stderr:i&&i.length>0?i:void 0,stdout:r}))}),a={dispose:()=>{s.killed||s.kill()}};i&&i.add(a)})},t.plainExec=function(e,t,n={},i,s,d){var h,p;const f=u(n,s),g=f.encoding?f.encoding:"utf8",m=(0,r.spawn)(e,t,f);null===(h=m.stdout)||void 0===h||h.on("error",c.noop),null===(p=m.stderr)||void 0===p||p.on("error",c.noop);const v=(0,o.createDeferred)(),y={dispose:()=>{m.killed||v.completed||m.kill()}};null==d||d.add(y);const b=[],_=(e,t,n)=>{null==e||e.on(t,n),b.push({dispose:()=>null==e?void 0:e.removeListener(t,n)})};n.token&&b.push(n.token.onCancellationRequested(y.dispose));const S=[];_(m.stdout,"data",e=>S.push(e));const E=[];return _(m.stderr,"data",e=>{n.mergeStdOutErr?(S.push(e),E.push(e)):E.push(e)}),m.once("close",()=>{if(v.completed)return;const e=0===E.length||null==i?void 0:i.decode(E,g);if(e&&e.length>0&&n.throwOnStdErr)v.reject(new a.StdErrError(e));else{let t=i?i.decode(S,g):"";t=l(t),v.resolve({stdout:t,stderr:e})}b.forEach(e=>e.dispose())}),m.once("error",e=>{v.reject(e),b.forEach(e=>e.dispose())}),v.promise},t.execObservable=function(e,t,n={},o,s,c){const l=u(n,s),h=l.encoding?l.encoding:"utf8",p=(0,r.spawn)(e,t,l);let f=!1;const g={dispose(){!p||p.killed||f||d(p.pid),p&&p.unref()}};null==c||c.add(g);const m=new i.Observable(e=>{const t=[],r=(e,n,r)=>{null==e||e.on(n,r),t.push({dispose:()=>null==e?void 0:e.removeListener(n,r)})};n.token&&t.push(n.token.onCancellationRequested(()=>{f||p.killed||(p.kill(),f=!0)}));const i=(t,r)=>{let i=o?o.decode([r],h):"";"stderr"===t&&n.throwOnStdErr?e.error(new a.StdErrError(i)):(i=function(e){return(e=e.replace(">>>PYTHON-EXEC-OUTPUT\r\n","").replace(">>>PYTHON-EXEC-OUTPUT\n","")).replace("<<i("stdout",e)),r(p.stderr,"data",e=>i("stderr",e)),p.once("close",()=>{f=!0,e.complete(),t.forEach(e=>e.dispose())}),p.once("exit",()=>{f=!0,e.complete(),t.forEach(e=>e.dispose())}),p.once("error",n=>{f=!0,e.error(n),t.forEach(e=>e.dispose())})});return{proc:p,out:m,dispose:g.dispose}},t.killPid=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_ENCODING=void 0,t.DEFAULT_ENCODING="utf8"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Commands=void 0,function(e){e.RestartLS="python.analysis.restartLanguageServer"}(t.Commands||(t.Commands={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClientMiddleware=void 0;const r=n(4),i=n(1),o=n(8),s=n(527),a=n(21),c=n(528);class u extends s.LanguageClientMiddlewareBase{constructor(e,t,n){if(super(e,t,o.sendTelemetryEvent,n),t===a.LanguageServerType.None)return;const s=e.get(r.IJupyterExtensionDependencyManager),u=e.get(i.IDisposableRegistry)||[],l=e.get(i.IExtensions);s&&s.isJupyterExtensionInstalled&&(this.notebookAddon=(0,c.createHidingMiddleware)()),u.push(null==l?void 0:l.onDidChange(()=>{s&&(this.notebookAddon&&!s.isJupyterExtensionInstalled?this.notebookAddon=void 0:!this.notebookAddon&&s.isJupyterExtensionInstalled&&(this.notebookAddon=(0,c.createHidingMiddleware)()))}))}}t.LanguageClientMiddleware=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageServerActivatorBase=void 0;const i=n(83),o=n(0),s=n(5);let a=class{constructor(e,t,n,r){this.manager=e,this.workspace=t,this.fs=n,this.configurationService=r}async start(e,t){e||(e=this.workspace.hasWorkspaceFolders?this.workspace.workspaceFolders[0].uri:void 0),this.resource=e,await this.ensureLanguageServerIsAvailable(e),await this.manager.start(e,t)}dispose(){this.manager.dispose()}activate(){this.manager.connect()}deactivate(){this.manager.disconnect()}get connection(){const e=this.getLanguageClient();if(e)return{sendNotification:e.sendNotification.bind(e),sendRequest:e.sendRequest.bind(e),sendProgress:e.sendProgress.bind(e),onRequest:e.onRequest.bind(e),onNotification:e.onNotification.bind(e),onProgress:e.onProgress.bind(e)}}get capabilities(){var e;const t=this.getLanguageClient();if(t)return null===(e=t.initializeResult)||void 0===e?void 0:e.capabilities}provideRenameEdits(e,t,n,r){return this.handleProvideRenameEdits(e,t,n,r)}provideDefinition(e,t,n){return this.handleProvideDefinition(e,t,n)}provideHover(e,t,n){return this.handleProvideHover(e,t,n)}provideReferences(e,t,n,r){return this.handleProvideReferences(e,t,n,r)}provideCompletionItems(e,t,n,r){return this.handleProvideCompletionItems(e,t,n,r)}provideCodeLenses(e,t){return this.handleProvideCodeLenses(e,t)}provideDocumentSymbols(e,t){return this.handleProvideDocumentSymbols(e,t)}provideSignatureHelp(e,t,n,r){return this.handleProvideSignatureHelp(e,t,n,r)}getLanguageClient(){const e=this.manager.languageProxy;if(e)return e.languageClient}async handleProvideRenameEdits(e,t,n,r){const o=this.getLanguageClient();if(o){const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n},a=await o.sendRequest(i.RenameRequest.type,s,r);if(a)return o.protocol2CodeConverter.asWorkspaceEdit(a)}}async handleProvideDefinition(e,t,n){const r=this.getLanguageClient();if(r){const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)},s=await r.sendRequest(i.DefinitionRequest.type,o,n);if(s)return r.protocol2CodeConverter.asDefinitionResult(s)}}async handleProvideHover(e,t,n){const r=this.getLanguageClient();if(r){const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)},s=await r.sendRequest(i.HoverRequest.type,o,n);if(s)return r.protocol2CodeConverter.asHover(s)}}async handleProvideReferences(e,t,n,r){const o=this.getLanguageClient();if(o){const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),context:n},a=await o.sendRequest(i.ReferencesRequest.type,s,r);if(a)return a.map(e=>o.protocol2CodeConverter.asLocation(e))}}async handleProvideCodeLenses(e,t){const n=this.getLanguageClient();if(n){const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)},o=await n.sendRequest(i.CodeLensRequest.type,r,t);if(o)return n.protocol2CodeConverter.asCodeLenses(o)}}async handleProvideCompletionItems(e,t,n,r){const o=this.getLanguageClient();if(o){const s=o.code2ProtocolConverter.asCompletionParams(e,t,r),a=await o.sendRequest(i.CompletionRequest.type,s,n);if(a)return o.protocol2CodeConverter.asCompletionResult(a)}}async handleProvideDocumentSymbols(e,t){const n=this.getLanguageClient();if(n){const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)},o=await n.sendRequest(i.DocumentSymbolRequest.type,r,t);if(o&&o.length){if(o[0].range){const e=o;return n.protocol2CodeConverter.asDocumentSymbols(e)}{const e=o;return n.protocol2CodeConverter.asSymbolInformations(e)}}}}async handleProvideSignatureHelp(e,t,n,r){const o=this.getLanguageClient();if(o){const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t)},s=await o.sendRequest(i.SignatureHelpRequest.type,r,n);if(s)return o.protocol2CodeConverter.asSignatureHelp(s)}}};r([(0,s.traceDecoratorError)("Failed to activate language server")],a.prototype,"start",null),a=r([(0,o.injectable)()],a),t.LanguageServerActivatorBase=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidPythonPathInDebuggerService=t.InvalidPythonPathInDebuggerServiceId=void 0;const o=n(0),s=n(3),a=n(2),c=n(4);n(12);const u=n(1),l=n(14),d=n(74),h=n(39),p=n(11),f=n(15),g=n(5),m=n(66),v=n(98),y=n(67),b=n(55),_=n(31),S={[y.DiagnosticCodes.InvalidPythonPathInDebuggerSettingsDiagnostic]:l.Diagnostics.invalidPythonPathInDebuggerSettings(),[y.DiagnosticCodes.InvalidPythonPathInDebuggerLaunchDiagnostic]:l.Diagnostics.invalidPythonPathInDebuggerLaunch()};class E extends m.BaseDiagnostic{constructor(e,t){super(e,S[e],a.DiagnosticSeverity.Error,_.DiagnosticScope.WorkspaceFolder,t,"always")}}t.InvalidPythonPathInDebuggerServiceId="InvalidPythonPathInDebuggerServiceId";let P=class extends m.BaseDiagnosticsService{constructor(e,t,n,r,i,o,s,a){super([y.DiagnosticCodes.InvalidPythonPathInDebuggerSettingsDiagnostic,y.DiagnosticCodes.InvalidPythonPathInDebuggerLaunchDiagnostic],e,s,!0),this.workspace=t,this.commandFactory=n,this.interpreterHelper=r,this.documentManager=i,this.configService=o,this.messageService=a}async diagnose(){return[]}async validatePythonPath(e,t,n){return"${command:python.interpreterPath}"!==(e=e?this.resolveVariables(e,n):void 0)&&e||(e=this.configService.getSettings(n).pythonPath),!!await this.interpreterHelper.getInterpreterInformation(e).catch(()=>{})||((0,g.traceError)(`Invalid Python Path '${e}'`),t===h.PythonPathSource.launchJson?this.handle([new E(y.DiagnosticCodes.InvalidPythonPathInDebuggerLaunchDiagnostic,n)]).catch(e=>(0,g.traceError)("Failed to handle invalid python path in launch.json debugger",e)).ignoreErrors():this.handle([new E(y.DiagnosticCodes.InvalidPythonPathInDebuggerSettingsDiagnostic,n)]).catch(e=>(0,g.traceError)("Failed to handle invalid python path in settings.json debugger",e)).ignoreErrors(),!1)}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0],n=this.getCommandPrompts(t);await this.messageService.handle(t,{commandPrompts:n})}resolveVariables(e,t){return new d.SystemVariables(t,void 0,this.workspace).resolveAny(e)}getCommandPrompts(e){switch(e.code){case y.DiagnosticCodes.InvalidPythonPathInDebuggerSettingsDiagnostic:return[{prompt:"Select Python Interpreter",command:this.commandFactory.createCommand(e,{type:"executeVSCCommand",options:"python.setInterpreter"})}];case y.DiagnosticCodes.InvalidPythonPathInDebuggerLaunchDiagnostic:return[{prompt:"Open launch.json",command:{diagnostic:e,invoke:async()=>{const e=(t=a.workspace.workspaceFolders[0],s.join(t.uri.fsPath,".vscode","launch.json"));var t;const n=await this.documentManager.openTextDocument(e);await this.documentManager.showTextDocument(n)}}}];default:throw new Error("Invalid diagnostic for 'InvalidPythonPathInDebuggerService'")}}};P=r([(0,o.injectable)(),i(0,(0,o.inject)(f.IServiceContainer)),i(1,(0,o.inject)(c.IWorkspaceService)),i(2,(0,o.inject)(v.IDiagnosticsCommandFactory)),i(3,(0,o.inject)(p.IInterpreterHelper)),i(4,(0,o.inject)(c.IDocumentManager)),i(5,(0,o.inject)(u.IConfigurationService)),i(6,(0,o.inject)(u.IDisposableRegistry)),i(7,(0,o.inject)(_.IDiagnosticHandlerService)),i(7,(0,o.named)(b.DiagnosticCommandPromptHandlerServiceId))],P),t.InvalidPythonPathInDebuggerService=P},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PowerShellActivationHackDiagnosticsService=t.PowerShellActivationHackDiagnosticsServiceId=t.PowershellActivationNotAvailableDiagnostic=void 0;const o=n(0),s=n(2);n(12);const a=n(547),c=n(1),u=n(15),l=n(5),d=n(8),h=n(9),p=n(66),f=n(98),g=n(67),m=n(55),v=n(31);class y extends p.BaseDiagnostic{constructor(e){super(g.DiagnosticCodes.EnvironmentActivationInPowerShellWithBatchFilesNotSupportedDiagnostic,"Activation of the selected Python environment is not supported in PowerShell. Consider changing your shell to Command Prompt.",s.DiagnosticSeverity.Warning,v.DiagnosticScope.Global,e,"always")}}t.PowershellActivationNotAvailableDiagnostic=y,t.PowerShellActivationHackDiagnosticsServiceId="EnvironmentActivationInPowerShellWithBatchFilesNotSupportedDiagnostic";let b=class extends p.BaseDiagnosticsService{constructor(e,t){super([g.DiagnosticCodes.EnvironmentActivationInPowerShellWithBatchFilesNotSupportedDiagnostic],e,t,!0),this.messageService=e.get(v.IDiagnosticHandlerService,m.DiagnosticCommandPromptHandlerServiceId)}async diagnose(){return[]}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];if(await this.filterService.shouldIgnoreDiagnostic(t.code))return;const n=this.serviceContainer.get(f.IDiagnosticsCommandFactory),r=this.serviceContainer.get(c.ICurrentProcess),i=this.serviceContainer.get(c.IConfigurationService),o=[{prompt:"Use Command Prompt",command:{diagnostic:t,invoke:async()=>{(0,d.sendTelemetryEvent)(h.EventName.DIAGNOSTICS_ACTION,void 0,{action:"switchToCommandPrompt"}),(0,a.useCommandPromptAsDefaultShell)(r,i).catch(e=>(0,l.traceError)("Use Command Prompt as default shell",e))}}},{prompt:"Ignore"},{prompt:"Always Ignore",command:n.createCommand(t,{type:"ignore",options:v.DiagnosticScope.Global})},{prompt:"More Info",command:n.createCommand(t,{type:"launch",options:"https://aka.ms/CondaPwsh"})}];await this.messageService.handle(t,{commandPrompts:o})}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IServiceContainer)),i(1,(0,o.inject)(c.IDisposableRegistry))],b),t.PowerShellActivationHackDiagnosticsService=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrioritizedEnvKinds=t.getKindDisplayName=void 0;const r=n(29);t.getKindDisplayName=function(e){for(const[t,n]of[[r.PythonEnvKind.System,"system"],[r.PythonEnvKind.MacDefault,"mac default"],[r.PythonEnvKind.WindowsStore,"windows store"],[r.PythonEnvKind.Pyenv,"pyenv"],[r.PythonEnvKind.CondaBase,"conda"],[r.PythonEnvKind.Poetry,"poetry"],[r.PythonEnvKind.Custom,"custom"],[r.PythonEnvKind.Venv,"venv"],[r.PythonEnvKind.VirtualEnv,"virtualenv"],[r.PythonEnvKind.VirtualEnvWrapper,"virtualenv"],[r.PythonEnvKind.Pipenv,"pipenv"],[r.PythonEnvKind.Conda,"conda"]])if(e===t)return n;return""},t.getPrioritizedEnvKinds=function(){return[r.PythonEnvKind.Pyenv,r.PythonEnvKind.CondaBase,r.PythonEnvKind.Conda,r.PythonEnvKind.WindowsStore,r.PythonEnvKind.Pipenv,r.PythonEnvKind.Poetry,r.PythonEnvKind.Venv,r.PythonEnvKind.VirtualEnvWrapper,r.PythonEnvKind.VirtualEnv,r.PythonEnvKind.OtherVirtual,r.PythonEnvKind.OtherGlobal,r.PythonEnvKind.MacDefault,r.PythonEnvKind.System,r.PythonEnvKind.Custom,r.PythonEnvKind.Unknown]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSemVerSafe=t.areSimilarVersions=t.areIdenticalVersion=t.parseVersionInfo=t.validateVersionInfo=t.normalizeVersionInfo=t.compareVersions=t.isVersionInfoEmpty=t.parseBasicVersionInfo=t.getVersionString=t.EMPTY_VERSION=void 0;const r=n(97),i=n(306);function o(e){if("number"==typeof e)return Number.isNaN(e)?[-1,"missing"]:e<0?[-1,""]:[e,""];if("string"==typeof e){const t=parseInt(e,10);return Number.isNaN(t)?[-1,"string not numeric"]:t<0?[-1,""]:[t,""]}return null==e?[-1,"missing"]:[-1,"unsupported type"]}function s(e,t,n){if(!(0===t||t>0)&&n&&""!==n)throw Error(`invalid ${e} version (failed to normalize; ${n})`)}t.EMPTY_VERSION={major:-1,minor:-1,micro:-1,unnormalized:{major:void 0,minor:void 0,micro:void 0}},Object.freeze(t.EMPTY_VERSION),t.getVersionString=function(e){return e.major<0?"":e.minor<0?""+e.major:e.micro<0?`${e.major}.${e.minor}`:`${e.major}.${e.minor}.${e.micro}`};const a=(0,i.verboseRegExp)("\n ^\n (.*?) # \n (\\d+) # \n (?:\n [.]\n (\\d+) # \n (?:\n [.]\n (\\d+) # \n )?\n )?\n ([^\\d].*)? # \n $\n","s");function c(e){const t=e.match(a);if(!t)return;const[,n,r,i,o,s]=t;if(n&&n.endsWith("."))return;if(s&&""!==s){if("."===s)return;if(!(n&&""!==n||o&&""!==o))return}return{version:{major:parseInt(r,10),minor:i?parseInt(i,10):-1,micro:o?parseInt(o,10):-1},before:n||"",after:s||""}}function u(e,t,n){return e.majort.major?[-1,"major"]:-1===e.major?[0,""]:e.minort.minor?[-1,"minor"]:-1===e.minor?[0,""]:e.microt.micro?[-1,"micro"]:void 0!==n?n(e,t):[0,""]}t.parseBasicVersionInfo=c,t.isVersionInfoEmpty=function(e){return!!e&&("number"==typeof e.major&&"number"==typeof e.minor&&"number"==typeof e.micro&&(e.major<0&&e.minor<0&&e.micro<0))},t.compareVersions=u,t.normalizeVersionInfo=function(e){const n=function(e){if(!e)return t.EMPTY_VERSION;const n=function(e){const t={major:e.major,minor:e.minor,micro:e.micro},{unnormalized:n}=e;return void 0!==n&&(t.unnormalized={major:n.major,minor:n.minor,micro:n.micro}),t}(e);return void 0===n.unnormalized&&(n.unnormalized={},[n.major,n.unnormalized.major]=o(n.major),[n.minor,n.unnormalized.minor]=o(n.minor),[n.micro,n.unnormalized.micro]=o(n.micro)),n}(e);return n.raw=e.raw,n.raw||(n.raw=""),n},t.validateVersionInfo=function(e){!function(e){var t,n,r;const i=e;if(s("major",e.major,null===(t=i.unnormalized)||void 0===t?void 0:t.major),s("minor",e.minor,null===(n=i.unnormalized)||void 0===n?void 0:n.minor),s("micro",e.micro,null===(r=i.unnormalized)||void 0===r?void 0:r.micro),e.major<0)throw Error("missing major version");if(e.minor<0&&(0===e.micro||e.micro>0))throw Error("missing minor version")}(e)},t.parseVersionInfo=function(e){const t=c(e);if(void 0!==t)return t.version.raw=e,t},t.areIdenticalVersion=function(e,t,n){const[r]=u(e,t,n);return 0===r},t.areSimilarVersions=function(e,t,n){const[r,i]=u(e,t,n);return 0===r||"major"!==i&&(r<0?-1===t[i]:-1===e[i])},t.parseSemVerSafe=function(e){e=e.replace(/\.00*(?=[1-9]|0\.)/,".");const t=r.coerce(e);return null!==t&&r.valid(t)?t:new r.SemVer("0.0.0")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verboseRegExp=void 0,t.verboseRegExp=function(e,t){return e=(e=e.replace(/(^| {2})# .*$/gm,"")).replace(/\s+?/g,""),RegExp(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExecutablePath=void 0;const r=n(155),i=n(99);t.getExecutablePath=async function(e,t,n){const[o,s]=(0,r.getExecutable)(),a=(0,i.copyPythonExecInfo)(e,o),c=[a.command,...a.args].reduce((e,t)=>e?`${e} ${t.toCommandArgumentForPythonExt()}`:""+t.toCommandArgumentForPythonExt(),""),u=s((await t(c,{timeout:null!=n?n:15e3})).stdout.trim());if(""===u)throw new Error(c+" resulted in empty stdout");return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITestingService=void 0,t.ITestingService=Symbol("ITestingService")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcon=void 0;const r=n(3),i=n(2),o=n(81),s=r.join(o.EXTENSION_ROOT_DIR,"resources","dark"),a=r.join(o.EXTENSION_ROOT_DIR,"resources","light");t.getIcon=function(e){return{dark:i.Uri.file(r.join(s,e)),light:i.Uri.file(r.join(a,e))}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConfigurationResolver=void 0;const i=n(0),o=n(3),s=n(2),a=n(10),c=n(74),u=n(8),l=n(9),d=n(39);let h=class{constructor(e,t,n,r,i){this.workspaceService=e,this.documentManager=t,this.platformService=n,this.configurationService=r,this.interpreterService=i,this.pythonPathSource=d.PythonPathSource.launchJson}async resolveDebugConfiguration(e,t,n){return t}getWorkspaceFolder(e){if(e)return e.uri;const t=this.getProgram();if(!Array.isArray(this.workspaceService.workspaceFolders)||0===this.workspaceService.workspaceFolders.length)return t?s.Uri.file(o.dirname(t)):void 0;if(1===this.workspaceService.workspaceFolders.length)return this.workspaceService.workspaceFolders[0].uri;if(t){const e=this.workspaceService.getWorkspaceFolder(s.Uri.file(t));if(e)return e.uri}}getProgram(){const e=this.documentManager.activeTextEditor;if(e&&e.document.languageId===a.PYTHON_LANGUAGE)return e.document.fileName}async resolveAndUpdatePaths(e,t){this.resolveAndUpdateEnvFilePath(e,t),await this.resolveAndUpdatePythonPath(e,t)}resolveAndUpdateEnvFilePath(e,t){if(t&&t.envFile&&(e||t.cwd)){const n=new c.SystemVariables(void 0,(e?e.fsPath:void 0)||t.cwd);t.envFile=n.resolveAny(t.envFile)}}async resolveAndUpdatePythonPath(e,t){var n,r;if(!t)return;const i=new c.SystemVariables(void 0,null==e?void 0:e.fsPath,this.workspaceService);if("${command:python.interpreterPath}"!==t.pythonPath&&t.pythonPath)t.pythonPath=i.resolveAny(t.pythonPath),this.pythonPathSource=d.PythonPathSource.launchJson;else{const i=null!==(r=null===(n=await this.interpreterService.getActiveInterpreter(e))||void 0===n?void 0:n.path)&&void 0!==r?r:"python";t.pythonPath=i,this.pythonPathSource=d.PythonPathSource.settingsJson}t.python=i.resolveAny(t.python)}debugOption(e,t){e.indexOf(t)>=0||e.push(t)}isLocalHost(e){return!!(e&&["localhost","127.0.0.1","::1"].indexOf(e.toLowerCase())>=0)}fixUpPathMappings(e,t,n){if(!t)return[];if(n||(n=t),0===e.length)e=[{localRoot:t,remoteRoot:n}];else{const n=new c.SystemVariables(void 0,t);e=e.map(({localRoot:e,remoteRoot:t})=>({localRoot:n.resolveAny(e),remoteRoot:t}))}return this.platformService.isWindows&&(e=e.map(({localRoot:e,remoteRoot:t})=>{let n=e;return e.match(/^[A-Z]:/)&&(n=`${e[0].toLowerCase()}${e.substr(1)}`),{localRoot:n,remoteRoot:t}})),e}isDebuggingFastAPI(e){return!(!e.module||"FASTAPI"!==e.module.toUpperCase())}isDebuggingFlask(e){return!(!e.module||"FLASK"!==e.module.toUpperCase())}sendTelemetry(e,t){const n=t.name||"",r=t.module||"",i={trigger:e,console:t.console,hasEnvVars:"object"==typeof t.env&&Object.keys(t.env).length>0,django:!!t.django,fastapi:this.isDebuggingFastAPI(t),flask:this.isDebuggingFlask(t),hasArgs:Array.isArray(t.args)&&t.args.length>0,isLocalhost:this.isLocalHost(t.host),isModule:r.length>0,isSudo:!!t.sudo,jinja:!!t.jinja,pyramid:!!t.pyramid,stopOnEntry:!!t.stopOnEntry,showReturnValue:!!t.showReturnValue,subProcess:!!t.subProcess,watson:n.toLowerCase().indexOf("watson")>=0,pyspark:n.toLowerCase().indexOf("pyspark")>=0,gevent:n.toLowerCase().indexOf("gevent")>=0,scrapy:"scrapy"===r.toLowerCase()};(0,u.sendTelemetryEvent)(l.EventName.DEBUGGER,void 0,i)}};h=r([(0,i.injectable)()],h),t.BaseConfigurationResolver=h},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEnvironmentVariablesHelper=t.IDebugEnvironmentVariablesService=void 0;const o=n(0),s=n(1),a=n(95);t.IDebugEnvironmentVariablesService=Symbol("IDebugEnvironmentVariablesService");let c=class{constructor(e,t,n){this.envParser=e,this.pathUtils=t,this.process=n}async getEnvironmentVariables(e){const t=this.pathUtils.getPathVariableName(),n=e.env&&Object.keys(e.env).length>0?{...e.env}:{},r=await this.envParser.parseFile(e.envFile,n),i=r?{...r}:{};return this.envParser.mergeVariables(n,i,{overwrite:!0}),this.envParser.appendPath(i,n[t]),this.envParser.appendPythonPath(i,n.PYTHONPATH),"string"==typeof i[t]&&i[t].length>0&&this.envParser.appendPath(i,this.process.env[t]),"string"==typeof i.PYTHONPATH&&i.PYTHONPATH.length>0&&this.envParser.appendPythonPath(i,this.process.env.PYTHONPATH),"internalConsole"===e.console&&(this.envParser.mergeVariables(this.process.env,i),void 0===i[t]&&"string"==typeof this.process.env[t]&&(i[t]=this.process.env[t]),void 0===i.PYTHONPATH&&"string"==typeof this.process.env.PYTHONPATH&&(i.PYTHONPATH=this.process.env.PYTHONPATH)),i.hasOwnProperty("PYTHONIOENCODING")||(i.PYTHONIOENCODING="UTF-8"),i.hasOwnProperty("PYTHONUNBUFFERED")||(i.PYTHONUNBUFFERED="1"),e.gevent&&(i.GEVENT_SUPPORT="True"),i}};c=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IEnvironmentVariablesService)),i(1,(0,o.inject)(s.IPathUtils)),i(2,(0,o.inject)(s.ICurrentProcess))],c),t.DebugEnvironmentVariablesHelper=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseErrorHandler=void 0;const r=n(1);t.BaseErrorHandler=class{constructor(e,t){this.product=e,this.serviceContainer=t,this.installer=this.serviceContainer.get(r.IInstaller)}get nextHandler(){return this.handler}setNextHandler(e){this.handler=e}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.EditorUtils=t.getTempFileWithDocumentContents=t.getWorkspaceEditsFromPatch=t.getTextEditsFromPatch=void 0;const i=n(126),o=n(0),s=n(625),a=n(37),c=n(3),u=n(2),l=n(5),d=n(236),h=n(22);var p;!function(e){e[e.Delete=0]="Delete",e[e.Insert=1]="Insert",e[e.Replace=2]="Replace"}(p||(p={}));const f=a.EOL.length;class g{constructor(e,t){this.action=e,this.start=t,this.text=""}apply(){switch(this.action){case p.Insert:return u.TextEdit.insert(this.start,this.text);case p.Delete:return u.TextEdit.delete(new u.Range(this.start,this.end));case p.Replace:return u.TextEdit.replace(new u.Range(this.start,this.end),this.text);default:return new u.TextEdit(new u.Range(new u.Position(0,0),new u.Position(0,0)),"")}}}function m(e,t,r=0){let i=r,o=0;const s=e.split(/\r?\n/g);i>0&&s.filter((e,t)=>to+=e.length+f);const a=[];let c,l=null;for(let e=0;e{t.diffs.forEach(e=>{e[1]+=a.EOL}),m(e,t.diffs,t.start1).forEach(e=>o.push(e.apply()))}),o},t.getWorkspaceEditsFromPatch=function(e,t,r){const i=new u.WorkspaceEdit;return e.forEach(e=>{const o=e.indexOf("@@");if(-1===o)return;const s=e.substring(0,o).split(/\r?\n/g).map(e=>e.trim()).filter(e=>e.length>0&&e.toLowerCase().endsWith(".py")&&e.indexOf(" a")>0);if(e.startsWith("---")&&(e=e.substring(o)),0===e.length)return;if(0===s.length)return;let l=s[0].substring(s[0].indexOf(" a")+3).trim();if(l=t&&!c.isAbsolute(l)?c.resolve(t,l):l,!r.fileExistsSync(l))return;e=e.replace(/\\ No newline at end of file[\r\n]/,"");const d=new(n(126).diff_match_patch),h=v.call(d,e);if(!Array.isArray(h)||0===h.length)throw new Error("Unable to parse Patch string");const f=r.readFileSync(l),g=u.Uri.file(l);h.forEach(e=>{e.diffs.forEach(e=>{e[1]+=a.EOL}),m(f,e.diffs,e.start1).forEach(e=>{switch(e.action){case p.Delete:i.delete(g,new u.Range(e.start,e.end));break;case p.Insert:i.insert(g,e.start,e.text);break;case p.Replace:i.replace(g,new u.Range(e.start,e.end),e.text)}})})}),i},t.getTempFileWithDocumentContents=async function(e,t){let n=`${e.uri.fsPath}.${s(e.uri.fsPath+e.uri.fragment)}.tmp`;try{(0,h.isNotebookCell)(e.uri)&&!await t.fileExists(e.uri.fsPath)&&(n=(await t.createTemporaryFile(`${c.basename(e.uri.fsPath)}-${e.uri.fragment}.tmp`)).filePath),await t.writeFile(n,e.getText())}catch(e){(0,l.traceError)("Failed to create a temporary file",e);const t=e;throw new d.WrappedError("Failed to create a temporary file, "+t.message,t)}return n};let y=class{getWorkspaceEditsFromPatch(e,t,r){const i=new u.WorkspaceEdit;if(t.startsWith("---")&&(t=t.substring(t.indexOf("@@"))),0===t.length)return i;t=t.replace(/\\ No newline at end of file[\r\n]/,"");const o=new(n(126).diff_match_patch),s=v.call(o,t);if(!Array.isArray(s)||0===s.length)throw new Error("Unable to parse Patch string");return s.forEach(t=>{t.diffs.forEach(e=>{e[1]+=a.EOL}),m(e,t.diffs,t.start1).forEach(e=>{switch(e.action){case p.Delete:i.delete(r,new u.Range(e.start,e.end));break;case p.Insert:i.insert(r,e.start,e.text);break;case p.Replace:i.replace(r,new u.Range(e.start,e.end),e.text)}})}),i}};y=r([(0,o.injectable)()],y),t.EditorUtils=y},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(75),i=n(158),o=n(316),s=n(157),a=r.sum32,c=r.sum32_4,u=r.sum32_5,l=o.ch32,d=o.maj32,h=o.s0_256,p=o.s1_256,f=o.g0_256,g=o.g1_256,m=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,m),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.TestsHelper=t.selectTestWorkspace=void 0;const i=n(0),o=n(2),s=n(1);t.selectTestWorkspace=async function(e){if(Array.isArray(o.workspace.workspaceFolders)&&0!==o.workspace.workspaceFolders.length){if(1===o.workspace.workspaceFolders.length)return o.workspace.workspaceFolders[0].uri;{const t=await e.showWorkspaceFolderPick({placeHolder:"Select a workspace"});return t?t.uri:void 0}}};let a=class{parseProviderName(e){switch(e){case s.Product.pytest:return"pytest";case s.Product.unittest:return"unittest";default:throw new Error("Unknown Test Product "+e)}}parseProduct(e){switch(e){case"pytest":return s.Product.pytest;case"unittest":return s.Product.unittest;default:throw new Error("Unknown Test Provider "+e)}}getSettingsPropertyNames(e){switch(this.parseProviderName(e)){case"pytest":return{argsName:"pytestArgs",pathName:"pytestPath",enabledName:"pytestEnabled"};case"unittest":return{argsName:"unittestArgs",enabledName:"unittestEnabled"};default:throw new Error(`Unknown Test Provider '${e}'`)}}};a=r([(0,i.injectable)()],a),t.TestsHelper=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestConfigurationManager=void 0;const r=n(3),i=n(4),o=n(13),s=n(1),a=n(16),c=n(5),u=n(101),l=n(86);function d(){throw(0,c.traceInfo)("testing configuration (in UI) cancelled"),Error("cancelled")}t.TestConfigurationManager=class{constructor(e,t,n,r){this.workspace=e,this.product=t,this.serviceContainer=n,this.handleCancelled=d,this.installer=n.get(s.IInstaller),this.testConfigSettingsService=r||n.get(l.ITestConfigSettingsService)}async enable(){await Promise.all(u.UNIT_TEST_PRODUCTS.filter(e=>e!==this.product).map(e=>this.testConfigSettingsService.disable(this.workspace,e))),await this.testConfigSettingsService.enable(this.workspace,this.product)}async disable(){return this.testConfigSettingsService.enable(this.workspace,this.product)}selectTestDir(e,t,n=[]){let i=t.map(t=>{const n=r.relative(e,t);if(0!==n.indexOf("."))return{label:n,description:""}}).filter(e=>void 0!==e).map(e=>e);return i=[{label:".",description:"Root directory"},...i],i=n.concat(i),this.showQuickPick(i,{ignoreFocusOut:!0,matchOnDescription:!0,matchOnDetail:!0,placeHolder:"Select the directory containing the tests"})}selectTestFilePattern(){return this.showQuickPick([{label:"*test.py",description:"Python files ending with 'test'"},{label:"*_test.py",description:"Python files ending with '_test'"},{label:"test*.py",description:"Python files beginning with 'test'"},{label:"test_*.py",description:"Python files beginning with 'test_'"},{label:"*test*.py",description:"Python files containing the word 'test'"}],{ignoreFocusOut:!0,matchOnDescription:!0,matchOnDetail:!0,placeHolder:"Select the pattern to identify test files"})}getTestDirs(e){return this.serviceContainer.get(o.IFileSystem).getSubDirectories(e).then(e=>{e.sort();const t=e.filter(e=>e.match(/test/i)),n=e.filter(e=>-1===t.indexOf(e));return t.push(...n),t})}showQuickPick(e,t){const n=(0,a.createDeferred)();return this.serviceContainer.get(i.IApplicationShell).showQuickPick(e,t).then(e=>{e?n.resolve(e.label):this.handleCancelled()}),n.promise}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelayedTrigger=void 0;const r=n(173),i=n(5);t.DelayedTrigger=class{constructor(e,t,n){this.callback=e,this.ms=t,this.name=n,this.triggeredCounter=0,this.calledCounter=0}trigger(...e){this.triggeredCounter+=1,this.timerId&&(0,r.clearTimeout)(this.timerId),this.timerId=(0,r.setTimeout)(()=>{this.calledCounter+=1,(0,i.traceVerbose)(`Delay Trigger[${this.name}]: triggered=${this.triggeredCounter}, called=${this.calledCounter}`),this.callback(...e)},this.ms)}dispose(){this.timerId&&(0,r.clearTimeout)(this.timerId)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preparePytestArgumentsForDiscovery=t.removePositionalFoldersAndFiles=t.pytestGetTestFilesAndFolders=void 0;const r=n(86),i=n(240),o=["-c","-k","-m","-o","-p","-r","-W","-n","--assert","--basetemp","--cache-show","--capture","--code-highlight","--color","--confcutdir","--cov","--cov-config","--cov-fail-under","--cov-report","--deselect","--dist","--doctest-glob","--doctest-report","--durations","--durations-min","--ignore","--ignore-glob","--import-mode","--junit-prefix","--junit-xml","--last-failed-no-failures","--lfnf","--log-auto-indent","--log-cli-date-format","--log-cli-format","--log-cli-level","--log-date-format","--log-file","--log-file-date-format","--log-file-format","--log-file-level","--log-format","--log-level","--maxfail","--override-ini","--pastebin","--pdbcls","--pythonwarnings","--result-log","--rootdir","--show-capture","--tb","--verbosity","--max-slave-restart","--numprocesses","--rsyncdir","--rsyncignore","--tx"],s=["--cache-clear","--collect-in-virtualenv","--collect-only","--co","--continue-on-collection-errors","--cov-append","--cov-branch","--debug","--disable-pytest-warnings","--disable-warnings","--doctest-continue-on-failure","--doctest-ignore-import-errors","--doctest-modules","--exitfirst","--failed-first","--ff","--fixtures","--fixtures-per-test","--force-sugar","--full-trace","--funcargs","--help","--keep-duplicates","--last-failed","--lf","--markers","--new-first","--nf","--no-cov","--no-cov-on-fail","--no-header","--no-print-logs","--no-summary","--noconftest","--old-summary","--pdb","--pyargs","-PyTest, Unittest-pyargs","--quiet","--runxfail","--setup-only","--setup-plan","--setup-show","--showlocals","--stepwise","--sw","--stepwise-skip","--strict","--strict-config","--strict-markers","--trace-config","--verbose","--version","-V","-h","-l","-q","-s","-v","-x","--boxed","--forked","--looponfail","--trace","--tx","-d"];function a(e,t){const n=[],a=[];let c=!1;if(Array.isArray(t))t.forEach(e=>{o.indexOf(e)>=0&&a.push(e),s.indexOf(e)>=0&&n.push(e)});else switch(t){case r.TestFilter.removeTests:n.push("--lf","--last-failed","--ff","--failed-first","--nf","--new-first"),a.push("-k","-m","--lfnf","--last-failed-no-failures"),c=!0;break;case r.TestFilter.discovery:n.push("-x","--exitfirst","--fixtures","--funcargs","--fixtures-per-test","--pdb","--lf","--last-failed","--ff","--failed-first","--nf","--new-first","--cache-show","-v","--verbose","-q","-quiet","-l","--showlocals","--no-print-logs","--debug","--setup-only","--setup-show","--setup-plan","--trace"),a.push("-m","--maxfail","--pdbcls","--capture","--lfnf","--last-failed-no-failures","--verbosity","-r","--tb","--show-capture","--durations","--junit-xml","--junit-prefix","--result-log","-W","--pythonwarnings","--log-*"),c=!0;break;case r.TestFilter.debugAll:case r.TestFilter.runAll:n.push("--collect-only","--trace");break;case r.TestFilter.debugSpecific:case r.TestFilter.runSpecific:n.push("--collect-only","--lf","--last-failed","--ff","--failed-first","--nf","--new-first","--trace"),a.push("-k","-m","--lfnf","--last-failed-no-failures"),c=!0;break;default:throw new Error(`Unsupported Filter '${t}'`)}let u=e.slice();if(c){const e=(0,i.getPositionalArguments)(u,o,s);u=u.filter(t=>-1===e.indexOf(t))}return(0,i.filterArguments)(u,a,n)}t.pytestGetTestFilesAndFolders=function(e){return(0,i.getPositionalArguments)(e,o,s)},t.removePositionalFoldersAndFiles=function(e){return a(e,r.TestFilter.removeTests)},t.preparePytestArgumentsForDiscovery=function(e){const t=a(e.args,r.TestFilter.discovery);return e.ignoreCache&&-1===t.indexOf("--cache-clear")&&t.splice(0,0,"--cache-clear"),-1===t.indexOf("-s")&&t.splice(0,0,"-s"),0===t.filter(e=>e.startsWith("--rootdir")).length&&t.splice(0,0,"--rootdir",e.cwd),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixLogLines=void 0,t.fixLogLines=function(e){return e.split(/\r?\n/g).join("\r\n")+"\r\n"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTestRunArgs=t.unittestGetTestPattern=t.unittestGetTestFolders=t.unittestFilterArguments=void 0;const r=n(240),i=["-k","-p","-s","-t","--pattern","--start-directory","--top-level-directory"],o=["-b","-c","-f","-h","-q","-v","--buffer","--catch","--failfast","--help","--locals","--quiet","--verbose"];function s(e){const t=(0,r.getOptionValues)(e,"-s");if(1===t.length)return t;const n=(0,r.getOptionValues)(e,"--start-directory");return 1===n.length?n:["."]}function a(e){const t=(0,r.getOptionValues)(e,"-p");if(1===t.length)return t[0];const n=(0,r.getOptionValues)(e,"--pattern");return 1===n.length?n[0]:"test*.py"}t.unittestFilterArguments=function(e,t){const n=[],s=[];let a=!1;Array.isArray(t)?t.forEach(e=>{i.indexOf(e)>=0&&s.push(e),o.indexOf(e)>=0&&n.push(e)}):a=!0;let c=e.slice();if(a){const e=(0,r.getPositionalArguments)(c,i,o);c=c.filter(t=>-1===e.indexOf(t))}return(0,r.filterArguments)(c,s,n)},t.unittestGetTestFolders=s,t.unittestGetTestPattern=a,t.getTestRunArgs=function(e){const t=s(e)[0],n=a(e),r=e.some(e=>"-f"===e.trim()||"--failfast"===e.trim()),i=["--us="+t,"--up="+n,"--uvInt="+(e.some(e=>0===e.trim().indexOf("-v"))?2:1)];return r&&i.push("--uf"),i}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseInterpreterSelectorCommand=void 0;const o=n(0),s=n(3),a=n(2),c=n(14);let u=class{constructor(e,t,n,r,i,o){this.pythonPathUpdaterService=e,this.commandManager=t,this.applicationShell=n,this.workspaceService=r,this.pathUtils=i,this.configurationService=o,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!0},this.disposables=[],this.disposables.push(this)}dispose(){this.disposables.forEach(e=>e.dispose())}async getConfigTargets(e){const t=this.workspaceService.workspaceFolders;if(void 0===t||0===t.length)return[{folderUri:void 0,configTarget:a.ConfigurationTarget.Global}];if(!this.workspaceService.workspaceFile&&1===t.length)return[{folderUri:t[0].uri,configTarget:a.ConfigurationTarget.WorkspaceFolder}];let n=(null==e?void 0:e.resetTarget)?[{label:c.Common.clearAll()}]:[];n.push(...t.map(e=>{const t=this.pathUtils.getDisplayName(this.configurationService.getSettings(e.uri).pythonPath,e.uri.fsPath);return{label:e.name,description:this.pathUtils.getDisplayName(s.dirname(e.uri.fsPath)),uri:e.uri,detail:t}}),{label:(null==e?void 0:e.resetTarget)?c.Interpreters.clearAtWorkspace():c.Interpreters.entireWorkspace(),uri:t[0].uri});const r=await this.applicationShell.showQuickPick(n,{placeHolder:(null==e?void 0:e.resetTarget)?"Select the workspace folder to clear the interpreter for":"Select the workspace folder to set the interpreter"});if((null==r?void 0:r.label)===c.Common.clearAll()){return[...t.map(e=>({folderUri:e.uri,configTarget:a.ConfigurationTarget.WorkspaceFolder})),{folderUri:t[0].uri,configTarget:a.ConfigurationTarget.Workspace}]}return r?r.label===c.Interpreters.entireWorkspace()||r.label===c.Interpreters.clearAtWorkspace()?[{folderUri:r.uri,configTarget:a.ConfigurationTarget.Workspace}]:[{folderUri:r.uri,configTarget:a.ConfigurationTarget.WorkspaceFolder}]:void 0}};u=r([(0,o.injectable)(),i(0,(0,o.unmanaged)()),i(1,(0,o.unmanaged)()),i(2,(0,o.unmanaged)()),i(3,(0,o.unmanaged)()),i(4,(0,o.unmanaged)()),i(5,(0,o.unmanaged)())],u),t.BaseInterpreterSelectorCommand=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activate=t.initialize=void 0;const r=n(2),i=n(328),o=n(19),s=n(703),a=n(704),c=n(709),u=n(712),l=n(24),d=n(713),h=n(714),p=n(715),f=n(716),g=n(717),m=n(718),v=n(719),y=n(720),b=n(334),_=n(723),S=n(725),E=n(726),P=n(727),w=n(728);function T(e){const{initRoot:t,addRoot:n,removeRoot:i}=e,o=r.workspace.workspaceFolders;return o&&o.map(e=>e.uri).forEach(t),r.workspace.onDidChangeWorkspaceFolders(e=>{for(const t of e.removed)i(t.uri);for(const t of e.added)n(t.uri)})}t.initialize=async function(e){const t=await(0,E.createPythonEnvironments)(()=>async function(e){let t=new d.ExtensionLocators(function(e){const t=[];t.push(new m.PyenvLocator,new p.CondaEnvironmentLocator,new f.GlobalVirtualEnvironmentLocator,new h.CustomVirtualEnvironmentLocator),(0,o.getOSType)()===o.OSType.Windows?t.push(new v.WindowsRegistryLocator,new y.WindowsStoreLocator,new c.WindowsPathEnvVarLocator):t.push(new g.PosixKnownPathsLocator);const n=t.filter(e=>void 0!==e.dispose);return e.disposables.push(...n),t}(e),function(e){const t=new d.WorkspaceLocators(T,[e=>[new u.WorkspaceVirtualEnvironmentLocator(e.fsPath),new S.PoetryLocator(e.fsPath)]]);return e.disposables.push(t),t}(e));const n=(0,b.getEnvironmentInfoService)(e.disposables);t=new s.PythonEnvsReducer(t);const r=new a.PythonEnvsResolver(t,n);return new w.EnvsCollectionService(await async function(e){const t=(0,i.getGlobalStorage)(e.context,"PYTHON_ENV_INFO_CACHE",[]);return await(0,P.createCollectionCache)({load:async()=>t.get(),store:async e=>t.set(e)})}(e),r)}(e));return(0,l.initializeExternalDependencies)(e.legacyIOC.serviceContainer),(0,_.registerNewDiscoveryForIOC)(e.legacyIOC.serviceManager,t),t},t.activate=async function(e,t){return e.triggerRefresh().ignoreErrors(),{fullyReady:Promise.resolve()}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalStorage=t.PersistentStateFactory=t.WORKSPACE_PERSISTENT_KEYS_DEPRECATED=t.GLOBAL_PERSISTENT_KEYS_DEPRECATED=t.PersistentState=void 0;const o=n(0),s=n(5),a=n(4),c=n(10),u=n(1),l=n(53);class d{constructor(e,t,n,r){this.storage=e,this.key=t,this.defaultValue=n,this.expiryDurationMs=r}get value(){if(this.expiryDurationMs){const e=this.storage.get(this.key,{data:this.defaultValue});return!e||!e.expiry||e.expiry0&&n.updateValue([]).ignoreErrors(),r.value.length>0&&r.updateValue([]).ignoreErrors()}createGlobalPersistentState(e,t,n){return this.addKeyToStorage("global",e,t).ignoreErrors(),new d(this.globalState,e,t,n)}createWorkspacePersistentState(e,t,n){return this.addKeyToStorage("workspace",e,t).ignoreErrors(),new d(this.workspaceState,e,t,n)}async addKeyToStorage(e,t,n){const r="global"===e?this._globalKeysStorage:this._workspaceKeysStorage;r.value.find(e=>e.key===t)||await r.updateValue([{key:t,defaultValue:n},...r.value])}async cleanAllPersistentStates(){this.cleanedOnce?(0,s.traceError)("Storage can only be cleaned once per session, reload window."):(await Promise.all(this._globalKeysStorage.value.map(async e=>{const t=this.createGlobalPersistentState(e.key);await t.updateValue(e.defaultValue)})),await Promise.all(this._workspaceKeysStorage.value.map(async e=>{const t=this.createWorkspacePersistentState(e.key);await t.updateValue(e.defaultValue)})),await this._globalKeysStorage.updateValue([]),await this._workspaceKeysStorage.updateValue([]),this.cleanedOnce=!0,(0,s.traceVerbose)("Finished clearing storage."))}};r([(0,l.cache)(-1,!0)],h.prototype,"addKeyToStorage",null),h=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IMemento)),i(0,(0,o.named)(u.GLOBAL_MEMENTO)),i(1,(0,o.inject)(u.IMemento)),i(1,(0,o.named)(u.WORKSPACE_MEMENTO)),i(2,(0,o.inject)(a.ICommandManager))],h),t.PersistentStateFactory=h,t.getGlobalStorage=function(e,t,n){const r=new d(e.globalState,"PYTHON_GLOBAL_STORAGE_KEYS",[]);if(!r.value.find(e=>e.key===t&&e.defaultValue===n)){const e=[{key:t,defaultValue:n},...r.value];r.updateValue(e).ignoreErrors()}const i=new d(e.globalState,t,n);return{get:()=>i.value,set:e=>i.updateValue(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locators=t.combineIterators=void 0;const r=n(16),i=n(113),o=n(710);function s(e){const t=(0,r.chain)(e),n=e.map(e=>e.onUpdated).filter(e=>e);return n&&0!==n.length?(t.onUpdated=e=>{const t=new i.Disposables;let r=n.length;return n.forEach(n=>{const i=n(t=>{null===t?(r-=1,0===r&&e(null)):e(t)});t.push(i)}),t},t):t}t.combineIterators=s;class a extends o.PythonEnvsWatchers{constructor(e){super(e),this.locators=e}iterEnvs(e){return s(this.locators.map(t=>t.iterEnvs(e)))}}t.Locators=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnvs=t.getQueryFilter=void 0;const r=n(16),i=n(22),o=n(5);t.getQueryFilter=function(e){var t;const n=void 0!==e.kinds&&e.kinds.length>0?e.kinds:void 0,r=!(null===(t=e.searchLocations)||void 0===t?void 0:t.doNotIncludeNonRooted),o=function(e){if(void 0===e.searchLocations)return;if(0===e.searchLocations.roots.length)return[];return e.searchLocations.roots.map(e=>(0,i.getURIFilter)(e,{checkParent:!0}))}(e);return e=>!!function(e){return void 0===n||n.includes(e.kind)}(e)&&!!function(e){if(void 0===e.searchLocation)return r;const t=e.searchLocation;return void 0===o||o.some(e=>e(t))}(e)},t.getEnvs=async function(e){const t=[],n=(0,r.createDeferred)();if(void 0===e.onUpdated)n.resolve();else{const r=e.onUpdated(e=>{if(null===e)n.resolve(),r.dispose();else{const{index:n,update:r}=e;if(void 0===t[n]){const e=JSON.stringify(r);(0,o.traceVerbose)("Updates sent for an env which was classified as invalid earlier, currently not expected, "+e)}t[n]=r}})}let i=0;for await(const n of e)void 0===t[i]&&(t[i]=n),i+=1;return await n.promise,t.filter(e=>void 0!==e).map(e=>e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolvePythonExeGlobs=t.PythonEnvStructure=t.watchLocationForPythonBinaries=void 0;const r=n(106),i=n(3),o=n(243),s=n(19),a=n(5),[c,u]=(0,s.getOSType)()===s.OSType.Windows?["python.exe","Scripts"]:["python","bin"];var l;t.watchLocationForPythonBinaries=function(e,t,n=c){const u=i.posix.normalize(n),[l]=u.split("/").slice(-1);return(0,o.watchLocationForPattern)(e,u,(function(e,n){(0,a.traceVerbose)("Received event",e,JSON.stringify(n),"for baseglob",l),r(i.basename(n),l,{nocase:(0,s.getOSType)()===s.OSType.Windows})&&t(e,n)}))},function(e){e.Standard="standard",e.Flat="flat"}(l=t.PythonEnvStructure||(t.PythonEnvStructure={})),t.resolvePythonExeGlobs=function(e=c,t=l.Standard){if(i.posix.normalize(e).includes("/"))throw Error(`invalid basename glob "${e}"`);const n=[];return t===l.Standard?n.push(e,"*/"+e,`*/${u}/${e}`):t===l.Flat&&n.push(e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LazyResourceBasedLocator=void 0;const r=n(16),i=n(113),o=n(190);class s extends o.Locator{constructor(){super(...arguments),this.disposables=new i.Disposables}async dispose(){await this.disposables.dispose()}async*iterEnvs(e){await this.ensureResourcesReady(),yield*this.doIterEnvs(e),this.ensureWatchersReady().ignoreErrors()}async initResources(){}async initWatchers(){}async ensureResourcesReady(){void 0===this.resourcesReady?(this.resourcesReady=(0,r.createDeferred)(),await this.initResources(),this.resourcesReady.resolve()):await this.resourcesReady.promise}async ensureWatchersReady(){void 0===this.watchersReady?(this.watchersReady=(0,r.createDeferred)(),await this.initWatchers(),this.watchersReady.resolve()):await this.watchersReady.promise}}t.LazyResourceBasedLocator=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMacDefaultPythonPath=void 0;const r=n(19);t.isMacDefaultPythonPath=function(e){return(0,r.getOSType)()===r.OSType.OSX&&(["python","/usr/bin/python"].includes(e)||e.startsWith("/usr/bin/python2"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnvironmentInfoService=t.EnvironmentInfoServiceQueuePriority=void 0;const r=n(16),i=n(721),o=n(722),s=n(99),a=n(5),c=n(85),u=n(29),l=n(24),d=n(56);var h;async function p(e){const t=[e.executable.filename,d.OUTPUT_MARKER_SCRIPT];return await(0,o.getInterpreterInfo)((0,s.buildPythonExecInfo)(t,void 0,e.executable.filename))}async function f(e){const t=await c.Conda.getConda(),n=e.location.length?e.location:e.executable.filename,r=await(null==t?void 0:t.getCondaEnvironment(n));if(!r)return;const i=await(null==t?void 0:t.getRunPythonArgs(r,!0));if(!i)return;return await(0,o.getInterpreterInfo)((0,s.buildPythonExecInfo)(i,void 0,e.executable.filename),c.CONDA_ACTIVATION_TIMEOUT)}!function(e){e[e.Default=0]="Default",e[e.High=1]="High"}(h=t.EnvironmentInfoServiceQueuePriority||(t.EnvironmentInfoServiceQueuePriority={}));class g{constructor(){this.cache=new Map}dispose(){void 0!==this.workerPool&&(this.workerPool.stop(),this.workerPool=void 0),void 0!==this.condaRunWorkerPool&&(this.condaRunWorkerPool.stop(),this.condaRunWorkerPool=void 0)}async getEnvironmentInfo(e,t){const n=e.executable.filename,i=this.cache.get((0,l.normCasePath)(n));if(void 0!==i)return i.promise;const o=(0,r.createDeferred)();return this.cache.set((0,l.normCasePath)(n),o),this._getEnvironmentInfo(e,t).then(e=>{o.resolve(e)}).catch(e=>{o.reject(e)}),o.promise}async _getEnvironmentInfo(e,t){let n;void 0===this.workerPool&&(this.workerPool=(0,i.createRunningWorkerPool)(p));let r=await m(this.workerPool,e,t).catch(e=>{n=e});if(void 0===r){e.kind===u.PythonEnvKind.Conda||await(0,c.isCondaEnvironment)(e.executable.filename)?((0,a.traceInfo)(`Validating ${e.executable.filename} normally failed with error, falling back to using conda run: (${n})`),void 0===this.condaRunWorkerPool&&(this.condaRunWorkerPool=(0,i.createRunningWorkerPool)(f)),r=await m(this.condaRunWorkerPool,e,t).catch(e=>{(0,a.traceError)(e)})):n&&(0,a.traceError)(n)}return r}}function m(e,t,n){return n===h.High?e.addToQueue(t,i.QueuePosition.Front):e.addToQueue(t,i.QueuePosition.Back)}let v;t.getEnvironmentInfoService=function(e){if(void 0===v){const t=new g;null==e||e.push({dispose:()=>{t.dispose(),v=void 0}}),v=t}return v}},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugService=void 0;const o=n(0),s=n(2);let a=r=class{get activeDebugConsole(){return s.debug.activeDebugConsole}get activeDebugSession(){return s.debug.activeDebugSession}get breakpoints(){return s.debug.breakpoints}get onDidChangeActiveDebugSession(){return s.debug.onDidChangeActiveDebugSession}get onDidStartDebugSession(){return s.debug.onDidStartDebugSession}get onDidReceiveDebugSessionCustomEvent(){return s.debug.onDidReceiveDebugSessionCustomEvent}get onDidTerminateDebugSession(){return s.debug.onDidTerminateDebugSession}get onDidChangeBreakpoints(){return s.debug.onDidChangeBreakpoints}registerDebugConfigurationProvider(e,t){return s.debug.registerDebugConfigurationProvider(e,t)}registerDebugAdapterTrackerFactory(e,t){return s.debug.registerDebugAdapterTrackerFactory(e,t)}startDebugging(e,t,n){return s.debug.startDebugging(e,t,n)}addBreakpoints(e){s.debug.addBreakpoints(e)}removeBreakpoints(e){s.debug.removeBreakpoints(e)}registerDebugAdapterDescriptorFactory(e,t){return s.debug.registerDebugAdapterDescriptorFactory(e,t)}};a.instance=new r,a=r=i([(0,o.injectable)()],a),t.DebugService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(733),i=n(734),o=n(735),s=n(736),a=n(737),c=n(738),u=n(739),l=n(740),d=n(741),h=n(742),p=n(743),f=n(744),g=n(745),m=n(750),v=n(338),y=n(339),b=n(757);function _(e){return new b.Spy(e).getMock()}function S(e){return new y.Mocker(e).getMock()}function E(e){return new m.MethodStubVerificator(e)}function P(e){return new g.MethodStubSetter(e)}function w(e){return e.__tsmockitoInstance}function T(e){var t=e();if(t instanceof v.MethodToStub){var n=t.mocker.getActionsByName(t.name);return new r.ArgCaptor(n)}throw Error("Cannot capture from not mocked object.")}function C(e){e.__tsmockitoMocker.reset()}function I(e){e.__tsmockitoMocker.resetCalls()}function R(e){return new s.AnyOfClassMatcher(e)}function O(){return new i.AnyFunctionMatcher}function D(){return new o.AnyNumberMatcher}function x(){return new a.AnyStringMatcher}function k(){return new c.AnythingMatcher}function A(e,t){return new u.BetweenMatcher(e,t)}function N(e){return new l.DeepEqualMatcher(e)}function j(){return new h.NotNullMatcher}function M(e){return new f.StrictEqualMatcher(e)}function L(e){return new d.MatchingStringMatcher(e)}function F(e){return new p.ObjectContainingMatcher(e)}t.spy=_,t.mock=S,t.verify=E,t.when=P,t.instance=w,t.capture=T,t.reset=C,t.resetCalls=I,t.anyOfClass=R,t.anyFunction=O,t.anyNumber=D,t.anyString=x,t.anything=k,t.between=A,t.deepEqual=N,t.notNull=j,t.strictEqual=M,t.match=L,t.objectContaining=F,t.default={spy:_,mock:S,verify:E,when:P,instance:w,capture:T,reset:C,resetCalls:I,anyOfClass:R,anyFunction:O,anyNumber:D,anyString:x,anything:k,between:A,deepEqual:N,notNull:j,strictEqual:M,match:L,objectContaining:F}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(160),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.returns=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){},t.prototype.getValue=function(){return this.returns},t}(n(161).AbstractMethodStub);t.ReturnValueMethodStub=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n,r){this.methodStubCollection=e,this.matchers=t,this.mocker=n,this.name=r};t.MethodToStub=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),i=n(58),o=n(752),s=n(753),a=n(338),c=n(337),u=n(336),l=n(754),d=n(755),h=n(756),p=function(){function e(e,t){void 0===t&&(t={});var n=this;this.clazz=e,this.instance=t,this.mock={},this.objectInspector=new d.ObjectInspector,this.methodStubCollections={},this.methodActions=[],this.mockableFunctionsFinder=new l.MockableFunctionsFinder,this.objectPropertyCodeRetriever=new h.ObjectPropertyCodeRetriever,this.excludedPropertyNames=["hasOwnProperty"],this.mock.__tsmockitoInstance=this.instance,this.mock.__tsmockitoMocker=this,r.isObject(this.clazz)&&r.isObject(this.instance)&&(this.processProperties(this.clazz.prototype),this.processClassCode(this.clazz),this.processFunctionsCode(this.clazz.prototype)),"undefined"!=typeof Proxy&&this.clazz?this.mock.__tsmockitoInstance=new Proxy(this.instance,this.createCatchAllHandlerForRemainingPropertiesWithoutGetters()):"undefined"==typeof Proxy||this.clazz||(this.instance=new Proxy(this.instance,{get:function(e,t){return n.excludedPropertyNames.indexOf(t.toString())>=0||t in e?e[t]:n.createActionListener(t.toString())}}),this.mock.__tsmockitoInstance=this.instance)}return e.prototype.getMock=function(){var e=this;return"undefined"==typeof Proxy?this.mock:"undefined"!=typeof Proxy&&this.clazz?new Proxy(this.mock,this.createCatchAllHandlerForRemainingPropertiesWithoutGetters()):new Proxy(this.mock,{get:function(t,n){return n in t?t[n]:(n in t||(e.createMethodStub(n.toString()),e.createInstanceActionListener(n.toString(),{})),e.mock[n.toString()])}})},e.prototype.createCatchAllHandlerForRemainingPropertiesWithoutGetters=function(){var e=this;return{get:function(t,n){return n in t||(e.createPropertyStub(n.toString()),e.createInstancePropertyDescriptorListener(n.toString(),{},e.clazz.prototype)),t[n]}}},e.prototype.reset=function(){this.methodStubCollections={},this.methodActions=[]},e.prototype.resetCalls=function(){this.methodActions=[]},e.prototype.getAllMatchingActions=function(e,t){var n=[];return this.methodActions.forEach((function(r){r.isApplicable(e,t)&&n.push(r)})),n},e.prototype.getFirstMatchingAction=function(e,t){return this.getAllMatchingActions(e,t)[0]},e.prototype.getActionsByName=function(e){return this.methodActions.filter((function(t){return t.methodName===e}))},e.prototype.processProperties=function(e){var t=this;this.objectInspector.getObjectPrototypes(e).forEach((function(e){t.objectInspector.getObjectOwnPropertyNames(e).forEach((function(n){if(!(t.excludedPropertyNames.indexOf(n)>=0)){var r=Object.getOwnPropertyDescriptor(e,n);r.get?(t.createPropertyStub(n),t.createInstancePropertyDescriptorListener(n,r,e),t.createInstanceActionListener(n,e)):"function"==typeof r.value&&(t.createMethodStub(n),t.createInstanceActionListener(n,e))}}))}))},e.prototype.createInstancePropertyDescriptorListener=function(e,t,n){this.instance.hasOwnProperty(e)||Object.defineProperty(this.instance,e,{get:this.createActionListener(e)})},e.prototype.createInstanceActionListener=function(e,t){this.instance.hasOwnProperty(e)||(this.instance[e]=this.createActionListener(e))},e.prototype.createActionListener=function(e){var t=this;return function(){for(var n=[],r=0;r{try{e.dispose()}catch(e){}})}execObservable(e,t,n={}){const r=(0,o.execObservable)(e,t,n,this.decoder,this.env,this.processesToKill);return this.emit("exec",e,t,n),r}exec(e,t,n={}){const r=(0,o.plainExec)(e,t,n,this.decoder,this.env,this.processesToKill);return this.emit("exec",e,t,n),r}shellExec(e,t={}){this.emit("exec",e,void 0,t);const n=new Set;return(0,o.shellExec)(e,t,this.env,n).finally(()=>{n.forEach(t=>{try{t.dispose()}catch(t){(0,i.traceError)("Unable to kill process for "+e)}})})}}t.ProcessService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);class i{constructor(e,t,n){this.extensionName=e,this.extensionVersion=t,this.targetPopulation=n}static trimVersionSuffix(e){return e.split(/\-[a-zA-Z0-9]+$/)[0]}getFilterValue(e){switch(e){case o.ApplicationVersion:return i.trimVersionSuffix(r.version);case o.Build:return r.env.appName;case o.ClientId:return r.env.machineId;case o.ExtensionName:return this.extensionName;case o.ExtensionVersion:return i.trimVersionSuffix(this.extensionVersion);case o.Language:return r.env.language;case o.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,t=Object.values(o);for(let n of t)e.set(n,this.getFilterValue(n));return e}}var o;t.VSCodeFilterProvider=i,function(e){e.Market="X-MSEdge-Market",e.CorpNet="X-FD-Corpnet",e.ApplicationVersion="X-VSCode-AppVersion",e.Build="X-VSCode-Build",e.ClientId="X-MSEdge-ClientId",e.ExtensionName="X-VSCode-ExtensionName",e.ExtensionVersion="X-VSCode-ExtensionVersion",e.Language="X-VSCode-Language",e.TargetPopulation="X-VSCode-TargetPopulation"}(o=t.Filters||(t.Filters={})),function(e){e.Team="team",e.Internal="internal",e.Insiders="insider",e.Public="public"}(t.TargetPopulation||(t.TargetPopulation={}))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=300&&t<400){if(E(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new p);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_(/^content-/i,this._options.headers));var i,o=_(/^host$/i,this._options.headers),s=r.parse(this._currentUrl),a=o||s.host,c=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(s,{host:a}));try{i=r.resolve(c,n)}catch(e){return void this.emit("error",new h(e))}u("redirecting to",i),this._isRedirect=!0;var l=r.parse(i);if(Object.assign(this._options,l),l.protocol===s.protocol&&function(e,t){if(e===t)return!0;const n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(l.host,a)||_(/^(?:authorization|cookie)$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var d={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,d)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new h(e))}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=v({http:o,https:s}),e.exports.wrap=v},function(e,t,n){var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.VenvBaseActivationCommandProvider=void 0;const o=n(0),s=n(3),a=n(11),c=n(15),u=n(13);let l=class{constructor(e){this.serviceContainer=e}async getActivationCommands(e,t){const n=await this.serviceContainer.get(a.IInterpreterService).getActiveInterpreter(e);if(n)return this.getActivationCommandsForInterpreter(n.path,t)}};l=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],l);t.VenvBaseActivationCommandProvider=class extends l{isShellSupported(e){return void 0!==this.scripts[e]}async findScriptFile(e,t){const n=this.serviceContainer.get(u.IFileSystem),r=this.scripts[t];if(!r)return;return function(e,t,n,r){const i="string"==typeof e?[e]:e;return async e=>{const o=t(e);for(const e of i){const t=n(o,e);if(await r(t))return t}}}(r,s.dirname,s.join,e=>n.fileExists(e))(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deactivate=t.activate=void 0,void 0===Reflect.metadata&&n(355);(0,n(356).initialize)(n(2));const r={},i=new(n(41).StopWatch),o=n(5),s=[];(0,o.initializeFileLogging)(s);const a=n(2),c=n(427),u=n(4),l=n(1),d=n(16),h=n(14),p=n(430),f=n(732),g=n(882),m=n(883),v=n(11),y=n(242),b=n(130);let _;function S(){if(_){const e=_.get(l.IAsyncDisposableRegistry),t=_.get(l.IDisposableRegistry);return Promise.all(t.map(e=>e.dispose())).then(()=>{if(e)return e.dispose()})}return Promise.resolve()}r.codeLoadingTime=i.elapsedTime,t.activate=async function e(t){let n,E,P;try{const g=new b.WorkspaceService;t.subscriptions.push(g.onDidGrantWorkspaceTrust(async()=>{await S(),await e(t)})),[n,E,P]=await async function(e,t,n){e.subscriptions.push(...s);const r=(0,d.createDeferred)();(function(e){const t={location:a.ProgressLocation.Window,title:h.Common.loadingExtension()};a.window.withProgress(t,()=>e)})(r.promise),n.startActivateTime=t.elapsedTime;const i=(0,f.initializeGlobals)(e);_=i.legacyIOC.serviceContainer,(0,f.initializeStandard)(i);const g=_.get(l.IExperimentService);await g.activate();const b=await(0,f.initializeComponents)(i),S=(await(0,p.activateComponents)(i,b)).map(e=>e.fullyReady),E=(async()=>{await Promise.all(S)})();n.totalActivateTime=t.elapsedTime-n.startActivateTime,r.resolve(),setTimeout(async()=>{var e;if(_){const t=_.get(u.IWorkspaceService);if(t.isTrusted){const n=_.get(v.IInterpreterService),r=null!==(e=t.workspaceFolders)&&void 0!==e?e:[];await n.refresh(r.length>0?r[0].uri:void 0).catch(e=>(0,o.traceError)("Python Extension: interpreterManager.refresh",e))}}(0,m.runAfterActivation)()});const P=(0,c.buildApi)(E,i.legacyIOC.serviceManager,i.legacyIOC.serviceContainer),w=(0,y.buildProposedApi)(b.pythonEnvs,i.legacyIOC.serviceContainer);return[{...P,...w},E,i.legacyIOC.serviceContainer]}(t,i,r)}catch(e){throw await async function(e,t){(function(e){try{let t=a.window;_&&(t=_.get(u.IApplicationShell)),t.showErrorMessage(e).ignoreErrors()}catch(e){(0,o.traceError)("Failed to Notify User",e)}})("Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information."),(0,o.traceError)("extension activation failed",e),await(0,g.sendErrorTelemetry)(e,t,_)}(e,r),e}return(0,g.sendStartupTelemetry)(E,r,i,P).ignoreErrors(),n},t.deactivate=S},function(e,t){ /*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var n;!function(e){!function(t){var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,a=!o&&!s,c={create:o?function(){return k(Object.create(null))}:s?function(){return k({__proto__:null})}:function(){return k({})},has:a?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:a?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i=0;--n){var r=(0,e[n])(t);if(!_(r)&&!S(r)){if(!I(r))throw new TypeError;t=r}}return t}(e,t)}if(!T(e))throw new TypeError;if(!E(t))throw new TypeError;if(!E(r)&&!_(r)&&!S(r))throw new TypeError;return S(r)&&(r=void 0),function(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!_(o)&&!S(o)){if(!E(o))throw new TypeError;r=o}}return r}(e,t,n=w(n),r)})),e("metadata",(function(e,t){return function(n,r){if(!E(n))throw new TypeError;if(!_(r)&&!function(e){switch(b(e)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;v(e,t,n,r)}})),e("defineMetadata",(function(e,t,n,r){if(!E(n))throw new TypeError;return _(r)||(r=w(r)),v(e,t,n,r)})),e("hasMetadata",(function(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=w(n)),function e(t,n,r){if(g(t,n,r))return!0;var i=x(n);return!S(i)&&e(t,i,r)}(e,t,n)})),e("hasOwnMetadata",(function(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=w(n)),g(e,t,n)})),e("getMetadata",(function(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=w(n)),function e(t,n,r){if(g(t,n,r))return m(t,n,r);var i=x(n);return S(i)?void 0:e(t,i,r)}(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=w(n)),m(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!E(e))throw new TypeError;return _(t)||(t=w(t)),function e(t,n){var r=y(t,n),i=x(t);if(null===i)return r;var o=e(i,n);if(o.length<=0)return r;if(r.length<=0)return o;for(var s=new h,a=[],c=0,u=r;c0)return!0;var i=p.get(t);return i.delete(n),i.size>0||p.delete(t),!0}))}(r)}()}(n||(n={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=t.SourceMapSupport=void 0;const r=n(3);n(12);const i=n(203),o=n(81),s=n(5);class a{constructor(e){this.vscode=e,this.config=this.vscode.workspace.getConfiguration("python.diagnostics",null)}async initialize(){if(!this.enabled)return;await this.enableSourceMaps(!0),n(425).install();const e=n(14),t=e.Diagnostics.disableSourceMaps();this.vscode.window.showWarningMessage(e.Diagnostics.warnSourceMaps(),t).then(e=>{e===t&&this.disable().ignoreErrors()})}get enabled(){return this.config.get("sourceMapsEnabled",!1)}async disable(){this.enabled&&await this.config.update("sourceMapsEnabled",!1,this.vscode.ConfigurationTarget.Global),await this.enableSourceMaps(!1)}async enableSourceMaps(e){const t=r.join(o.EXTENSION_ROOT_DIR,"out","client","extension.js"),n=r.join(o.EXTENSION_ROOT_DIR,"out","client","debugger","debugAdapter","main.js");await Promise.all([this.enableSourceMap(e,t),this.enableSourceMap(e,n)])}async enableSourceMap(e,t){const n=t+".map",r=t+".map.disabled";e?await this.rename(r,n):await this.rename(n,r)}async rename(e,t){const n=new i.FileSystem;await n.fileExists(t)||await n.move(e,t)}}t.SourceMapSupport=a,t.initialize=function(e=n(2)){e.workspace.getConfiguration("python.diagnostics",null).get("sourceMapsEnabled",!1)?new a(e).initialize().catch(e=>{(0,s.traceError)("Failed to initialize source map support in extension")}):new a(e).disable().ignoreErrors()}},function(e,t,n){var r=n(204),i=process.cwd,o=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return o||(o=i.call(process)),o};try{process.cwd()}catch(e){}var a=process.chdir;process.chdir=function(e){o=null,a.call(process,e)},e.exports=function(e){r.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,(function(t,r){t?i&&i(t):e.fchmod(r,n,(function(t){e.close(r,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,n){var i,o=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),s=!0;try{i=e.fchmodSync(o,n),s=!1}finally{if(s)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}}(e);e.lutimes||function(e){r.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,n,i,o){e.open(t,r.O_SYMLINK,(function(t,r){t?o&&o(t):e.futimes(r,n,i,(function(t){e.close(r,(function(e){o&&o(t||e)}))}))}))},e.lutimesSync=function(t,n,i){var o,s=e.openSync(t,r.O_SYMLINK),a=!0;try{o=e.futimesSync(s,n,i),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return o}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===s&&(e.rename=(t=e.rename,function(n,r,i){var o=Date.now(),s=0;t(n,r,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,a):i(c)}))}),s),void(s<100&&(s+=10));i&&i(c)}))}));var t;function n(t){return t?function(n,r,i){return t.call(e,n,r,(function(e){l(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function i(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!l(e))throw e}}:t}function o(t){return t?function(n,r,i,o){return t.call(e,n,r,i,(function(e){l(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function a(t){return t?function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!l(e))throw e}}:t}function c(t){return t?function(n,r,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof r&&(i=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function u(t){return t?function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:t}function l(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=(h=e.read,function(t,n,r,i,o,s){var a;if(s&&"function"==typeof s){var c=0;a=function(u,l,d){if(u&&"EAGAIN"===u.code&&c<10)return c++,h.call(e,t,n,r,i,o,a);s.apply(this,arguments)}}return h.call(e,t,n,r,i,o,a)}),e.readSync=(d=e.readSync,function(t,n,r,i,o){for(var s=0;;)try{return d.call(e,t,n,r,i,o)}catch(e){if("EAGAIN"===e.code&&s<10){s++;continue}throw e}});var d;var h}},function(e,t,n){var r=n(116).Stream;e.exports=function(e){return{ReadStream:function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){o._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()}))},WriteStream:function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},function(e,t,n){"use strict";e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}},function(e,t,n){"use strict";const r=n(42),i=n(3),o=n(73).mkdirsSync,s=n(253).utimesMillisSync,a=n(165);function c(e,t,n,o){if(!o.filter||o.filter(t,n))return function(e,t,n,o){const s=(o.dereference?r.statSync:r.lstatSync)(t);if(s.isDirectory())return function(e,t,n,i,o){if(!t)return function(e,t,n,i){return r.mkdirSync(n),d(t,n,i),l(n,e)}(e.mode,n,i,o);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`);return d(n,i,o)}(s,e,t,n,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,n,i,o){return t?function(e,t,n,i){if(i.overwrite)return r.unlinkSync(n),u(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,i,o):u(e,n,i,o)}(s,e,t,n,o);if(s.isSymbolicLink())return function(e,t,n,o){let s=r.readlinkSync(t);o.dereference&&(s=i.resolve(process.cwd(),s));if(e){let e;try{e=r.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return r.symlinkSync(s,n);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(r.statSync(n).isDirectory()&&a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return r.unlinkSync(t),r.symlinkSync(e,t)}(s,n)}return r.symlinkSync(s,n)}(e,t,n,o)}(e,t,n,o)}function u(e,t,n,i){return r.copyFileSync(t,n),i.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){l(e,128|t)}(n,e);(function(e,t){const n=r.statSync(e);s(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),l(n,e.mode)}function l(e,t){return r.chmodSync(e,t)}function d(e,t,n){r.readdirSync(e).forEach(r=>function(e,t,n,r){const o=i.join(t,e),s=i.join(n,e),{destStat:u}=a.checkPathsSync(o,s,"copy");return c(u,o,s,r)}(r,e,t,n))}e.exports=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:s,destStat:u}=a.checkPathsSync(e,t,"copy");return a.checkParentPathsSync(e,s,t,"copy"),function(e,t,n,s){if(s.filter&&!s.filter(t,n))return;const a=i.dirname(n);r.existsSync(a)||o(a);return c(e,t,n,s)}(u,e,t,n)}},function(e,t,n){"use strict";const r=n(164),i=n(3),o=n(252)("10.12.0"),s=e=>{if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error("Path contains invalid characters: "+e);throw t.code="EINVAL",t}}},a=e=>("number"==typeof e&&(e={mode:e}),{mode:511,...e}),c=e=>{const t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};e.exports.makeDir=async(e,t)=>{if(s(e),t=a(t),o){const n=i.resolve(e);return r.mkdir(n,{mode:t.mode,recursive:!0})}const n=async e=>{try{await r.mkdir(e,t.mode)}catch(t){if("EPERM"===t.code)throw t;if("ENOENT"===t.code){if(i.dirname(e)===e)throw c(e);if(t.message.includes("null bytes"))throw t;return await n(i.dirname(e)),n(e)}try{if(!(await r.stat(e)).isDirectory())throw new Error("The path is not a directory")}catch{throw t}}};return n(i.resolve(e))},e.exports.makeDirSync=(e,t)=>{if(s(e),t=a(t),o){const n=i.resolve(e);return r.mkdirSync(n,{mode:t.mode,recursive:!0})}const n=e=>{try{r.mkdirSync(e,t.mode)}catch(t){if("EPERM"===t.code)throw t;if("ENOENT"===t.code){if(i.dirname(e)===e)throw c(e);if(t.message.includes("null bytes"))throw t;return n(i.dirname(e)),n(e)}try{if(!r.statSync(e).isDirectory())throw new Error("The path is not a directory")}catch{throw t}}};return n(i.resolve(e))}},function(e,t,n){"use strict";const r=n(42),i=n(3),o=n(73).mkdirs,s=n(105).pathExists,a=n(253).utimesMillis,c=n(165);function u(e,t,n,r,a){const c=i.dirname(n);s(c,(i,s)=>i?a(i):s?d(e,t,n,r,a):void o(c,i=>i?a(i):d(e,t,n,r,a)))}function l(e,t,n,r,i,o){Promise.resolve(i.filter(n,r)).then(s=>s?e(t,n,r,i,o):o(),e=>o(e))}function d(e,t,n,r,i){return r.filter?l(h,e,t,n,r,i):h(e,t,n,r,i)}function h(e,t,n,i,o){(i.dereference?r.stat:r.lstat)(t,(s,a)=>s?o(s):a.isDirectory()?function(e,t,n,i,o,s){if(!t)return function(e,t,n,i,o){r.mkdir(n,r=>{if(r)return o(r);m(t,n,i,t=>t?o(t):g(n,e,o))})}(e.mode,n,i,o,s);if(t&&!t.isDirectory())return s(new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`));return m(n,i,o,s)}(a,e,t,n,i,o):a.isFile()||a.isCharacterDevice()||a.isBlockDevice()?function(e,t,n,i,o,s){return t?function(e,t,n,i,o){if(!i.overwrite)return i.errorOnExist?o(new Error(`'${n}' already exists`)):o();r.unlink(n,r=>r?o(r):p(e,t,n,i,o))}(e,n,i,o,s):p(e,n,i,o,s)}(a,e,t,n,i,o):a.isSymbolicLink()?y(e,t,n,i,o):void 0)}function p(e,t,n,i,o){r.copyFile(t,n,r=>r?o(r):i.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return g(e,128|t,n)}(n,e,i=>i?r(i):f(e,t,n,r));return f(e,t,n,r)}(e.mode,t,n,o):g(n,e.mode,o))}function f(e,t,n,i){!function(e,t,n){r.stat(e,(e,r)=>e?n(e):a(t,r.atime,r.mtime,n))}(t,n,t=>t?i(t):g(n,e,i))}function g(e,t,n){return r.chmod(e,t,n)}function m(e,t,n,i){r.readdir(e,(r,o)=>r?i(r):v(o,e,t,n,i))}function v(e,t,n,r,o){const s=e.pop();return s?function(e,t,n,r,o,s){const a=i.join(n,t),u=i.join(r,t);c.checkPaths(a,u,"copy",(t,i)=>{if(t)return s(t);const{destStat:c}=i;d(c,a,u,o,t=>t?s(t):v(e,n,r,o,s))})}(e,s,t,n,r,o):o()}function y(e,t,n,o,s){r.readlink(t,(t,a)=>t?s(t):(o.dereference&&(a=i.resolve(process.cwd(),a)),e?void r.readlink(n,(t,u)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?r.symlink(a,n,s):s(t):(o.dereference&&(u=i.resolve(process.cwd(),u)),c.isSrcSubdir(a,u)?s(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${u}'.`)):e.isDirectory()&&c.isSrcSubdir(u,a)?s(new Error(`Cannot overwrite '${u}' with '${a}'.`)):function(e,t,n){r.unlink(t,i=>i?n(i):r.symlink(e,t,n))}(a,n,s))):r.symlink(a,n,s)))}e.exports=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),c.checkPaths(e,t,"copy",(i,o)=>{if(i)return r(i);const{srcStat:s,destStat:a}=o;c.checkParentPaths(e,s,t,"copy",i=>i?r(i):n.filter?l(u,a,e,t,n,r):u(a,e,t,n,r))})}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(42),o=n(3),s=n(73),a=n(166),c=r((function(e,t){t=t||function(){},i.readdir(e,(n,r)=>{if(n)return s.mkdirs(e,t);r=r.map(t=>o.join(e,t)),function e(){const n=r.pop();if(!n)return t();a.remove(n,n=>{if(n)return t(n);e()})}()})}));function u(e){let t;try{t=i.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach(t=>{t=o.join(e,t),a.removeSync(t)})}e.exports={emptyDirSync:u,emptydirSync:u,emptyDir:c,emptydir:c}},function(e,t,n){"use strict";const r=n(42),i=n(3),o=n(79),s="win32"===process.platform;function a(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{e[t]=e[t]||r[t],e[t+="Sync"]=e[t]||r[t]}),e.maxBusyTries=e.maxBusyTries||3}function c(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),o(e,"rimraf: missing path"),o.strictEqual(typeof e,"string","rimraf: path should be a string"),o.strictEqual(typeof n,"function","rimraf: callback function required"),o(t,"rimraf: invalid options argument provided"),o.strictEqual(typeof t,"object","rimraf: options should be object"),a(t),u(e,t,(function i(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&ru(e,t,i),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function u(e,t,n){o(e),o(t),o("function"==typeof n),t.lstat(e,(r,i)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&s?l(e,t,r,n):i&&i.isDirectory()?h(e,t,r,n):void t.unlink(e,r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return s?l(e,t,r,n):h(e,t,r,n);if("EISDIR"===r.code)return h(e,t,r,n)}return n(r)}))}function l(e,t,n,r){o(e),o(t),o("function"==typeof r),t.chmod(e,438,i=>{i?r("ENOENT"===i.code?null:n):t.stat(e,(i,o)=>{i?r("ENOENT"===i.code?null:n):o.isDirectory()?h(e,t,n,r):t.unlink(e,r)})})}function d(e,t,n){let r;o(e),o(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?f(e,t,n):t.unlinkSync(e)}function h(e,t,n,r){o(e),o(t),o("function"==typeof r),t.rmdir(e,s=>{!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?r(n):r(s):function(e,t,n){o(e),o(t),o("function"==typeof n),t.readdir(e,(r,o)=>{if(r)return n(r);let s,a=o.length;if(0===a)return t.rmdir(e,n);o.forEach(r=>{c(i.join(e,r),t,r=>{if(!s)return r?n(s=r):void(0==--a&&t.rmdir(e,n))})})})}(e,t,r)})}function p(e,t){let n;a(t=t||{}),o(e,"rimraf: missing path"),o.strictEqual(typeof e,"string","rimraf: path should be a string"),o(t,"rimraf: missing options"),o.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&s&&d(e,t,n)}try{n&&n.isDirectory()?f(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return s?d(e,t,n):f(e,t,n);if("EISDIR"!==n.code)throw n;f(e,t,n)}}function f(e,t,n){o(e),o(t);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(o(e),o(t),t.readdirSync(e).forEach(n=>p(i.join(e,n),t)),!s){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}e.exports=c,c.sync=p},function(e,t,n){"use strict";const r=n(366),i=n(367),o=n(368);e.exports={createFile:r.createFile,createFileSync:r.createFileSync,ensureFile:r.createFile,ensureFileSync:r.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:o.createSymlink,createSymlinkSync:o.createSymlinkSync,ensureSymlink:o.createSymlink,ensureSymlinkSync:o.createSymlinkSync}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(3),o=n(42),s=n(73);e.exports={createFile:r((function(e,t){function n(){o.writeFile(e,"",e=>{if(e)return t(e);t()})}o.stat(e,(r,a)=>{if(!r&&a.isFile())return t();const c=i.dirname(e);o.stat(c,(e,r)=>{if(e)return"ENOENT"===e.code?s.mkdirs(c,e=>{if(e)return t(e);n()}):t(e);r.isDirectory()?n():o.readdir(c,e=>{if(e)return t(e)})})})})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const n=i.dirname(e);try{o.statSync(n).isDirectory()||o.readdirSync(n)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(n)}o.writeFileSync(e,"")}}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(3),o=n(42),s=n(73),a=n(105).pathExists;e.exports={createLink:r((function(e,t,n){function r(e,t){o.link(e,t,e=>{if(e)return n(e);n(null)})}a(t,(c,u)=>c?n(c):u?n(null):void o.lstat(e,o=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),n(o);const c=i.dirname(t);a(c,(i,o)=>i?n(i):o?r(e,t):void s.mkdirs(c,i=>{if(i)return n(i);r(e,t)}))}))})),createLinkSync:function(e,t){if(o.existsSync(t))return;try{o.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return o.existsSync(n)||s.mkdirsSync(n),o.linkSync(e,t)}}},function(e,t,n){"use strict";const r=n(49).fromCallback,i=n(3),o=n(42),s=n(73),a=s.mkdirs,c=s.mkdirsSync,u=n(369),l=u.symlinkPaths,d=u.symlinkPathsSync,h=n(370),p=h.symlinkType,f=h.symlinkTypeSync,g=n(105).pathExists;e.exports={createSymlink:r((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,g(t,(s,c)=>s?r(s):c?r(null):void l(e,t,(s,c)=>{if(s)return r(s);e=c.toDst,p(c.toCwd,n,(n,s)=>{if(n)return r(n);const c=i.dirname(t);g(c,(n,i)=>n?r(n):i?o.symlink(e,t,s,r):void a(c,n=>{if(n)return r(n);o.symlink(e,t,s,r)}))})}))})),createSymlinkSync:function(e,t,n){if(o.existsSync(t))return;const r=d(e,t);e=r.toDst,n=f(r.toCwd,n);const s=i.dirname(t);return o.existsSync(s)||c(s),o.symlinkSync(e,t,n)}}},function(e,t,n){"use strict";const r=n(3),i=n(42),o=n(105).pathExists;e.exports={symlinkPaths:function(e,t,n){if(r.isAbsolute(e))return i.lstat(e,t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e}));{const s=r.dirname(t),a=r.join(s,e);return o(a,(t,o)=>t?n(t):o?n(null,{toCwd:a,toDst:e}):i.lstat(e,t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:r.relative(s,e)})))}},symlinkPathsSync:function(e,t){let n;if(r.isAbsolute(e)){if(n=i.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const o=r.dirname(t),s=r.join(o,e);if(n=i.existsSync(s),n)return{toCwd:s,toDst:e};if(n=i.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:r.relative(o,e)}}}}},function(e,t,n){"use strict";const r=n(42);e.exports={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);r.lstat(e,(e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)})},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=r.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}}},function(e,t,n){"use strict";const r=n(49).fromPromise,i=n(372);i.outputJson=r(n(374)),i.outputJsonSync=n(375),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},function(e,t,n){"use strict";const r=n(373);e.exports={readJson:r.readFile,readJsonSync:r.readFileSync,writeJson:r.writeFile,writeJsonSync:r.writeFileSync}},function(e,t,n){let r;try{r=n(42)}catch(e){r=n(26)}const i=n(49),{stringify:o,stripBom:s}=n(205);const a={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||r,o=!("throws"in t)||t.throws;let a,c=await i.fromCallback(n.readFile)(e,t);c=s(c);try{a=JSON.parse(c,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||r,i=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=s(r),JSON.parse(r,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,n={}){const s=n.fs||r,a=o(t,n);await i.fromCallback(s.writeFile)(e,a,n)})),writeFileSync:function(e,t,n={}){const i=n.fs||r,s=o(t,n);return i.writeFileSync(e,s,n)}};e.exports=a},function(e,t,n){"use strict";const{stringify:r}=n(205),{outputFile:i}=n(206);e.exports=async function(e,t,n={}){const o=r(t,n);await i(e,o,n)}},function(e,t,n){"use strict";const{stringify:r}=n(205),{outputFileSync:i}=n(206);e.exports=function(e,t,n){const o=r(t,n);i(e,o,n)}},function(e,t,n){"use strict";e.exports={moveSync:n(377)}},function(e,t,n){"use strict";const r=n(42),i=n(3),o=n(251).copySync,s=n(166).removeSync,a=n(73).mkdirpSync,c=n(165);function u(e,t,n){try{r.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){return o(e,t,{overwrite:n,errorOnExist:true}),s(e)}(e,t,n)}}e.exports=function(e,t,n){const o=(n=n||{}).overwrite||n.clobber||!1,{srcStat:l}=c.checkPathsSync(e,t,"move");return c.checkParentPathsSync(e,l,t,"move"),a(i.dirname(t)),function(e,t,n){if(n)return s(t),u(e,t,n);if(r.existsSync(t))throw new Error("dest already exists.");return u(e,t,n)}(e,t,o)}},function(e,t,n){"use strict";const r=n(49).fromCallback;e.exports={move:r(n(379))}},function(e,t,n){"use strict";const r=n(42),i=n(3),o=n(254).copy,s=n(166).remove,a=n(73).mkdirp,c=n(105).pathExists,u=n(165);function l(e,t,n,i){r.rename(e,t,r=>r?"EXDEV"!==r.code?i(r):function(e,t,n,r){o(e,t,{overwrite:n,errorOnExist:!0},t=>t?r(t):s(e,r))}(e,t,n,i):i())}e.exports=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const o=n.overwrite||n.clobber||!1;u.checkPaths(e,t,"move",(n,d)=>{if(n)return r(n);const{srcStat:h}=d;u.checkParentPaths(e,h,t,"move",n=>{if(n)return r(n);a(i.dirname(t),n=>n?r(n):function(e,t,n,r){if(n)return s(t,i=>i?r(i):l(e,t,n,r));c(t,(i,o)=>i?r(i):o?r(new Error("dest already exists.")):l(e,t,n,r))}(e,t,o,r))})})}},function(e,t,n){var r=n(3),i="win32"===process.platform,o=n(26),s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function a(e){return"function"==typeof e?e:function(){var e;if(s){var t=new Error;e=function(e){e&&(t.message=e.message,n(e=t))}}else e=n;return e;function n(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}()}r.normalize;if(i)var c=/(.*?)(?:[\/\\]+|$)/g;else c=/(.*?)(?:[\/]+|$)/g;if(i)var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else u=/^[\/]*/;t.realpathSync=function(e,t){if(e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var n,s,a,l,d=e,h={},p={};function f(){var t=u.exec(e);n=t[0].length,s=t[0],a=t[0],l="",i&&!p[a]&&(o.lstatSync(a),p[a]=!0)}for(f();n=e.length)return t&&(t[p]=e),n(null,e);c.lastIndex=s;var r=c.exec(e);return h=l,l+=r[0],d=h+r[1],s=c.lastIndex,g[d]||t&&t[d]===d?process.nextTick(v):t&&Object.prototype.hasOwnProperty.call(t,d)?_(t[d]):o.lstat(d,y)}function y(e,r){if(e)return n(e);if(!r.isSymbolicLink())return g[d]=!0,t&&(t[d]=d),process.nextTick(v);if(!i){var s=r.dev.toString(32)+":"+r.ino.toString(32);if(f.hasOwnProperty(s))return b(null,f[s],d)}o.stat(d,(function(e){if(e)return n(e);o.readlink(d,(function(e,t){i||(f[s]=t),b(e,t)}))}))}function b(e,i,o){if(e)return n(e);var s=r.resolve(h,i);t&&(t[o]=s),_(s)}function _(t){e=r.resolve(t,e.slice(s)),m()}m()}},function(e,t,n){var r=n(382),i=n(383);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var o=[],s=i("{","}",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=[],r=i("{","}",t);if(!r)return t.split(",");var o=r.pre,s=r.body,a=r.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(h)).length)return(_=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+c[0]+e}))}var y,b=s.pre,_=s.post.length?e(s.post,!1):[""];if(m){var S=l(c[0]),E=l(c[1]),P=Math.max(c[0].length,c[1].length),w=3==c.length?Math.abs(l(c[2])):1,T=f;E0){var D=new Array(O+1).join("0");R=I<0?"-"+D+R.slice(1):D+R}}y.push(R)}}else y=r(c,(function(t){return e(t,!1)}));for(var x=0;x=t}},function(e,t){e.exports=function(e,t){for(var r=[],i=0;i=0&&u>0){for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())=0?c:u;r.length&&(a=[o,s])}return a}e.exports=r,r.range=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){e.exports=f,f.GlobSync=g;var r=n(26),i=n(256),o=n(106),s=(o.Minimatch,n(255).Glob,n(32),n(3)),a=n(79),c=n(207),u=n(258),l=(u.alphasort,u.alphasorti,u.setopts),d=u.ownProp,h=u.childrenIgnored,p=u.isIgnored;function f(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new g(e,t).found}function g(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof g))return new g(e,t);if(l(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;rthis.maxLength)return!1;if(!this.stat&&d(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return i;if(n&&"FILE"===i)return!1}var o=this.statCache[t];if(!o){var s;try{s=r.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{o=r.statSync(t)}catch(e){o=s}else o=s}this.statCache[t]=o;i=!0;return o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||i,(!n||"FILE"!==i)&&i},g.prototype._mark=function(e){return u.mark(this,e)},g.prototype._makeAbs=function(e){return u.makeAbs(this,e)}},function(e,t,n){var r=n(259),i=Object.create(null),o=n(260);function s(e){for(var t=e.length,n=[],r=0;rr?(n.splice(0,r),process.nextTick((function(){t.apply(null,o)}))):delete i[e]}}))}(e))}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?f.length:n.length),m=function e(t,n){for(var i=t.getPropertiesMetadata(n),o=[],a=Object.keys(i),c=0,l=a;c0?u:e(t,r)}return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryableString=void 0;var r=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,n=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},n)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();t.QueryableString=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;var r=n(107),i=function(){function e(e,t,n,i,o){this.id=r.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===n?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();t.Request=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=void 0;var r=n(50),i=n(80),o=n(262),s=n(147),a=n(397),c=function(e,t,n){try{return n()}catch(n){throw o.isStackOverflowExeption(n)?new Error(r.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},u=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,o=t.childRequests,l=t.target&&t.target.isArray(),d=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(l&&d)return o.map((function(t){return u(e)(t)}));var h=null;if(!t.target.isOptional()||0!==n.length){var p=n[0],f=p.scope===i.BindingScopeEnum.Singleton,g=p.scope===i.BindingScopeEnum.Request;if(f&&p.activated)return p.cache;if(g&&null!==e&&e.has(p.id))return e.get(p.id);if(p.type===i.BindingTypeEnum.ConstantValue)h=p.cache;else if(p.type===i.BindingTypeEnum.Function)h=p.cache;else if(p.type===i.BindingTypeEnum.Constructor)h=p.implementationType;else if(p.type===i.BindingTypeEnum.DynamicValue&&null!==p.dynamicValue)h=c("toDynamicValue",p.serviceIdentifier,(function(){return p.dynamicValue(t.parentContext)}));else if(p.type===i.BindingTypeEnum.Factory&&null!==p.factory)h=c("toFactory",p.serviceIdentifier,(function(){return p.factory(t.parentContext)}));else if(p.type===i.BindingTypeEnum.Provider&&null!==p.provider)h=c("toProvider",p.serviceIdentifier,(function(){return p.provider(t.parentContext)}));else{if(p.type!==i.BindingTypeEnum.Instance||null===p.implementationType){var m=s.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(r.INVALID_BINDING_TYPE+" "+m)}h=a.resolveInstance(p.implementationType,o,u(e))}return"function"==typeof p.onActivation&&(h=p.onActivation(t.parentContext,h)),f&&(p.cache=h,p.activated=!0),g&&null!==e&&!e.has(p.id)&&e.set(p.id,h),h}}};t.resolve=function(e){return u(e.plan.rootRequest.requestScope)(e.plan.rootRequest)}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0){var l=t.filter((function(e){return null!==e.target&&e.target.type===o.TargetTypeEnum.ConstructorArgument})).map(n);c=l,u=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===o.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var o=i[n];e[r]=o})),e}(u=new((a=e).bind.apply(a,r([void 0],c))),t,n)}else u=new e;return function(e,t){if(Reflect.hasMetadata(s.POST_CONSTRUCT,e)){var n=Reflect.getMetadata(s.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(i.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,u),u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingToSyntax=void 0;var r=n(50),i=n(80),o=n(399),s=n(265),a=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=e,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+r.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(r.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=i.BindingTypeEnum.Function,t},e.prototype.toAutoFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},new s.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=e,new s.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();t.BindingToSyntax=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInWhenOnSyntax=void 0;var r=n(400),i=n(208),o=n(209),s=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingInWhenOnSyntax=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInSyntax=void 0;var r=n(80),i=n(265),o=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},e}();t.BindingInSyntax=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerSnapshot=void 0;var r=function(){function e(){}return e.of=function(t,n){var r=new e;return r.bindings=t,r.middleware=n,r},e}();t.ContainerSnapshot=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lookup=void 0;var r=n(50),i=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(r.NULL_ARGUMENT);if(null==t)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(e);void 0!==n?(n.push(t),this._map.set(e,n)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(r.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(r.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(n,r){var i=n.filter((function(t){return!e(t)}));i.length>0?t._map.set(r,i):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();t.Lookup=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncContainerModule=t.ContainerModule=void 0;var r=n(107),i=function(e){this.id=r.id(),this.registry=e};t.ContainerModule=i;var o=function(e){this.id=r.id(),this.registry=e};t.AsyncContainerModule=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=void 0;var r=n(50),i=n(33);t.injectable=function(){return function(e){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,e))throw new Error(r.DUPLICATED_INJECTABLE_DECORATOR);var t=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,e)||[];return Reflect.defineMetadata(i.PARAM_TYPES,t,e),e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagged=void 0;var r=n(62),i=n(92);t.tagged=function(e,t){return function(n,o,s){var a=new r.Metadata(e,t);"number"==typeof s?i.tagParameter(n,o,s,a):i.tagProperty(n,o,a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.named=void 0;var r=n(33),i=n(62),o=n(92);t.named=function(e){return function(t,n,s){var a=new i.Metadata(r.NAMED_TAG,e);"number"==typeof s?o.tagParameter(t,n,s,a):o.tagProperty(t,n,a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optional=void 0;var r=n(33),i=n(62),o=n(92);t.optional=function(){return function(e,t,n){var s=new i.Metadata(r.OPTIONAL_TAG,!0);"number"==typeof n?o.tagParameter(e,t,n,s):o.tagProperty(e,t,s)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unmanaged=void 0;var r=n(33),i=n(62),o=n(92);t.unmanaged=function(){return function(e,t,n){var s=new i.Metadata(r.UNMANAGED_TAG,!0);o.tagParameter(e,t,n,s)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiInject=void 0;var r=n(33),i=n(62),o=n(92);t.multiInject=function(e){return function(t,n,s){var a=new i.Metadata(r.MULTI_INJECT_TAG,e);"number"==typeof s?o.tagParameter(t,n,s,a):o.tagProperty(t,n,a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.targetName=void 0;var r=n(33),i=n(62),o=n(92);t.targetName=function(e){return function(t,n,s){var a=new i.Metadata(r.NAME_TAG,e);o.tagParameter(t,n,s,a)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postConstruct=void 0;var r=n(50),i=n(33),o=n(62);t.postConstruct=function(){return function(e,t,n){var s=new o.Metadata(i.POST_CONSTRUCT,t);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,e.constructor))throw new Error(r.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,s,e.constructor)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=void 0,t.multiBindToService=function(e){return function(t){return function(){for(var n=[],r=0;r{this.raw.file(n,(n,r,i,o)=>{if(n)return t(n);e({filePath:r,dispose:o})})})}}t.TemporaryFileSystem=i},function(e,t,n){"use strict";var r="win32"===process.platform,i=r?/[^:]\\$/:/.\/$/;e.exports=function(){var e;return e=r?process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",i.test(e)&&(e=e.slice(0,-1)),e}},function(e,t){e.exports=require("./node_modules/source-map-support")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadLocalizedStringsForBrowser=t.loadLocalizedStringsUsingNodeFS=t.getLocalizedString=t.shouldLoadUsingNodeFS=t._getAskedForCollection=t._resetCollections=void 0;const r=n(2),i=n(3),o=n(81);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 e=process.env.VSCODE_NLS_CONFIG;return e?JSON.parse(e).locale:"en-us"}async function d(e){try{const t=e?`package.nls.${e}.json`:"package.nls.json",n=r.Uri.joinPath(r.Uri.file(o.EXTENSION_ROOT_DIR),t),i=await r.workspace.fs.readFile(n),s=(new TextDecoder).decode(i);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 r=n[e];return!r&&t&&(r=t),u[e]=r,r},t.loadLocalizedStringsUsingNodeFS=function(e){c=l();const t=i.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=i.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())}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildApi=void 0;const r=n(20),i=n(10),o=n(1),s=n(272),a=n(11),c=n(429),u=n(5);t.buildApi=function(e,t,n){const l=n.get(o.IConfigurationService),d=n.get(a.IInterpreterService);t.addSingleton(c.JupyterExtensionIntegration,c.JupyterExtensionIntegration);const h=n.get(c.JupyterExtensionIntegration),p={ready:e.catch(e=>((0,u.traceError)("Failure during activation.",e),Promise.reject(e))),jupyter:{registerHooks:()=>h.integrateWithJupyterExtension()},debug:{getRemoteLauncherCommand:async(e,t,n=!0)=>(0,s.getDebugpyLauncherArgs)({host:e,port:t,waitUntilDebuggerAttaches:n}),getDebuggerPackagePath:async()=>(0,s.getDebugpyPackagePath)()},settings:{onDidChangeExecutionDetails:d.onDidChangeInterpreterConfiguration,getExecutionDetails(e){const t=l.getSettings(e).pythonPath;return{execCommand:""===t?void 0:[t]}}},datascience:{registerRemoteServerProvider:h?h.registerRemoteServerProvider.bind(h):r.noop,showDataViewer:h?h.showDataViewer.bind(h):r.noop}};return(0,i.isTestExecution)()&&(p.serviceContainer=n,p.serviceManager=t),p}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JupyterExtensionIntegration=void 0;const o=n(0),s=n(3),a=n(21),c=n(4),u=n(10),l=n(94),d=n(1),h=n(22),p=n(272),f=n(212),g=n(82),m=n(11);var v;!function(e){e.jupyter="jupyter",e.ipykernel="ipykernel",e.notebook="notebook",e.kernelspec="kernelspec",e.nbconvert="nbconvert",e.pandas="pandas",e.pip="pip"}(v||(v={}));const y={[v.ipykernel]:d.Product.ipykernel,[v.jupyter]:d.Product.jupyter,[v.kernelspec]:d.Product.kernelspec,[v.nbconvert]:d.Product.nbconvert,[v.notebook]:d.Product.notebook,[v.pandas]:d.Product.pandas,[v.pip]:d.Product.pip};let b=class{constructor(e,t,n,r,i,o,s,a,c,u,l){this.extensions=e,this.interpreterService=t,this.interpreterSelector=n,this.installer=r,this.envActivation=i,this.languageServerCache=o,this.globalState=s,this.interpreterDisplay=a,this.pyenvs=c,this.workspaceService=u,this.condaService=l}registerApi(e){this.workspaceService.isTrusted&&e.registerPythonApi({onDidChangeInterpreter:this.interpreterService.onDidChangeInterpreter,getActiveInterpreter:async e=>this.interpreterService.getActiveInterpreter(e),getInterpreterDetails:async e=>this.interpreterService.getInterpreterDetails(e),refreshPromise:this.interpreterService.refreshPromise,onDidChangeInterpreters:this.interpreterService.onDidChangeInterpreters,getKnownInterpreters:e=>this.pyenvs.getInterpreters(e),getInterpreters:async e=>this.interpreterService.getAllInterpreters(e),getActivatedEnvironmentVariables:async(e,t,n)=>this.envActivation.getActivatedEnvironmentVariables(e,t,n),isWindowsStoreInterpreter:async e=>this.pyenvs.isWindowsStoreInterpreter(e),getSuggestions:async e=>this.interpreterSelector.getAllSuggestions(e),getKnownSuggestions:e=>this.interpreterSelector.getSuggestions(e),suggestionToQuickPickItem:(e,t)=>this.interpreterSelector.suggestionToQuickPickItem(e,t),install:async(e,t,n,r,i)=>{let o=!0===r?l.ModuleInstallFlags.updateDependencies|l.ModuleInstallFlags.reInstall:void 0;return!0===i&&(o=o?o|l.ModuleInstallFlags.installPipIfRequired:l.ModuleInstallFlags.installPipIfRequired),this.installer.install(y[e],t,n,o)},isProductVersionCompatible:async(e,t,n)=>this.installer.isProductVersionCompatible(e,t,n),getDebuggerPath:async()=>(0,s.dirname)((0,p.getDebugpyPackagePath)()),getInterpreterPathSelectedForJupyterServer:()=>this.globalState.get("INTERPRETER_PATH_SELECTED_FOR_JUPYTER_SERVER"),getLanguageServer:async e=>{const t=(0,h.isResource)(e)?e:void 0,n=(0,h.isResource)(e)?void 0:e,r=await this.languageServerCache.get(t,n);if(r&&r.connection&&r.capabilities)return{connection:r.connection,capabilities:r.capabilities,dispose:r.dispose}},registerInterpreterStatusFilter:this.interpreterDisplay.registerVisibilityFilter.bind(this.interpreterDisplay),getCondaFile:()=>this.condaService.getCondaFile(),getCondaVersion:()=>this.condaService.getCondaVersion(),getEnvironmentActivationShellCommands:(e,t)=>this.envActivation.getEnvironmentActivationShellCommands(e,t)})}async integrateWithJupyterExtension(){const e=await this.getExtensionApi();e&&this.registerApi(e)}registerRemoteServerProvider(e){this.getExtensionApi().then(t=>{t&&t.registerRemoteServerProvider(e)}).ignoreErrors()}async showDataViewer(e,t){const n=await this.getExtensionApi();if(n)return n.showDataViewer(e,t)}async getExtensionApi(){if(this.jupyterExtension)return this.jupyterExtension.exports;{const e=this.extensions.getExtension(u.JUPYTER_EXTENSION_ID);if(!e)return;if(await e.activate(),e.isActive)return this.jupyterExtension=e,this.jupyterExtension.exports}}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(d.IExtensions)),i(1,(0,o.inject)(m.IInterpreterService)),i(2,(0,o.inject)(g.IInterpreterSelector)),i(3,(0,o.inject)(d.IInstaller)),i(4,(0,o.inject)(f.IEnvironmentActivationService)),i(5,(0,o.inject)(a.ILanguageServerCache)),i(6,(0,o.inject)(d.IMemento)),i(6,(0,o.named)(d.GLOBAL_MEMENTO)),i(7,(0,o.inject)(m.IInterpreterDisplay)),i(8,(0,o.inject)(m.IComponentAdapter)),i(9,(0,o.inject)(c.IWorkspaceService)),i(10,(0,o.inject)(m.ICondaService))],b),t.JupyterExtensionIntegration=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateComponents=void 0;const r=n(2),i=n(431),o=n(21),s=n(540),a=n(213),c=n(4),u=n(10),l=n(559),d=n(13),h=n(1),p=n(22),f=n(51),g=n(569),m=n(39),v=n(600),y=n(11),b=n(602),_=n(603),S=n(604),E=n(5),P=n(621),w=n(622),T=n(631),C=n(632),I=n(636),R=n(315),O=n(637),D=n(638),x=n(653),k=n(156),A=n(660),N=n(682),j=n(327),M=n(729),L=n(730),F=n(335),q=n(731),U=n(186),W=n(130);t.activateComponents=async function(e,t){const n=await async function(e){const{context:t,legacyIOC:n}=e,{serviceManager:j,serviceContainer:W}=n,B=j.get(d.IFileSystem);await(0,O.setExtensionInstallTelemetryProperties)(B);const V=j.get(c.IApplicationEnvironment),{enableProposedApi:H}=V.packageJson;j.addSingletonInstance(u.UseProposedApi,H),(0,A.registerTypes)(j),(0,S.registerTypes)(j),(0,N.registerTypes)(j),(0,v.registerTypes)(j),(0,l.registerTypes)(j),(0,x.registerTypes)(j),(0,g.registerTypes)(j),(0,D.registerTypes)(j);const $=W.get(h.IExtensions);await(0,M.setDefaultLanguageServer)($,j),(0,E.setLoggingLevel)((0,L.getLoggingLevel)());const G=j.get(h.IConfigurationService);W.get(h.IConfigurationService).getSettings().initialize();const K=G.getSettings().languageServer;(0,s.registerTypes)(j),(0,C.registerTypes)(j),(0,i.registerTypes)(j,K);const z=j.get(h.IDisposableRegistry),Y=W.get(c.IWorkspaceService),J=W.get(c.ICommandManager);if(r.languages.setLanguageConfiguration(u.PYTHON_LANGUAGE,(0,b.getLanguageConfiguration)()),Y.isTrusted){if(W.get(y.IInterpreterService).initialize(),!Y.isVirtualWorkspace){const e=j.getAll(U.IDebugSessionEventHandlers);new q.DebugSessionEventDispatcher(e,F.DebugService.instance,z).registerEventHandlers();const n=j.get(h.IOutputChannel,u.STANDARD_OUTPUT_CHANNEL);z.push(J.registerCommand(u.Commands.ViewOutput,()=>n.show())),J.executeCommand("setContext","python.vscode.channel",V.channel).then(p.noop,p.noop),W.get(a.IApplicationDiagnostics).register(),j.get(k.ITerminalAutoActivation).register();const i=G.getSettings();if(W.get(R.ISortImportsEditingProvider).registerCommands(),j.get(k.ICodeExecutionManager).registerCommands(),t.subscriptions.push(new _.LinterCommands(j)),i&&i.formatting&&"internalConsole"!==i.formatting.provider){const e=new w.PythonFormattingEditProvider(t,W);t.subscriptions.push(r.languages.registerDocumentFormattingEditProvider(u.PYTHON,e)),t.subscriptions.push(r.languages.registerDocumentRangeFormattingEditProvider(u.PYTHON,e))}t.subscriptions.push(new T.ReplProvider(W));const o=new I.TerminalProvider(W);o.initialize(r.window.activeTerminal).ignoreErrors(),t.subscriptions.push(o),t.subscriptions.push(r.languages.registerCodeActionsProvider(u.PYTHON,new P.PythonCodeActionProvider,{providedCodeActionKinds:[r.CodeActionKind.SourceOrganizeImports]})),W.getAll(m.IDebugConfigurationService).forEach(e=>{t.subscriptions.push(r.debug.registerDebugConfigurationProvider(f.DebuggerTypeName,e))}),W.get(m.IDebuggerBanner).initialize()}}const X=W.get(o.IExtensionActivationManager);t.subscriptions.push(X);return{fullyReady:X.activate()}}(e);if(!(new W.WorkspaceService).isTrusted)return[n];const B=[j.activate(t.pythonEnvs,e)];return Promise.all([n,...B])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(432),i=n(434),o=n(447),s=n(450),a=n(522),c=n(523),u=n(526),l=n(529),d=n(530),h=n(531),p=n(532),f=n(533),g=n(534),m=n(535),v=n(536),y=n(21),b=n(537),_=n(538),S=n(539);t.registerTypes=function(e,t){e.addSingleton(y.IExtensionActivationService,S.PartialModeStatusItem),e.addSingleton(y.ILanguageServerCache,i.LanguageServerExtensionActivationService),e.addBinding(y.ILanguageServerCache,y.IExtensionActivationService),e.add(y.IExtensionActivationManager,r.ExtensionActivationManager),e.add(y.ILanguageServerActivator,v.NoLanguageServerExtensionActivator,y.LanguageServerType.None),e.addSingleton(y.ILanguageServerOutputChannel,l.LanguageServerOutputChannel),e.addSingleton(y.IExtensionSingleActivationService,o.ExtensionSurveyPrompt),e.addSingleton(y.IExtensionSingleActivationService,_.LoadLanguageServerExtension),t===y.LanguageServerType.Node?(e.add(y.ILanguageServerAnalysisOptions,h.NodeLanguageServerAnalysisOptions,y.LanguageServerType.Node),e.add(y.ILanguageServerActivator,d.NodeLanguageServerActivator,y.LanguageServerType.Node),e.addSingleton(y.ILanguageClientFactory,p.NodeLanguageClientFactory),e.add(y.ILanguageServerManager,m.NodeLanguageServerManager),e.add(y.ILanguageServerProxy,g.NodeLanguageServerProxy),e.addSingleton(y.ILanguageServerFolderService,f.NodeLanguageServerFolderService)):t===y.LanguageServerType.Jedi&&(e.add(y.ILanguageServerActivator,b.JediLanguageServerActivator,y.LanguageServerType.Jedi),e.add(y.ILanguageServerAnalysisOptions,s.JediLanguageServerAnalysisOptions,y.LanguageServerType.Jedi),e.addSingleton(y.ILanguageClientFactory,a.JediLanguageClientFactory),e.add(y.ILanguageServerManager,u.JediLanguageServerManager),e.add(y.ILanguageServerProxy,c.JediLanguageServerProxy))}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionActivationManager=void 0;const o=n(0),s=n(213),a=n(4),c=n(10),u=n(13),l=n(120),d=n(5),h=n(214),p=n(21);let f=class{constructor(e,t,n,r,i,o,s,a){this.activationServices=e,this.singleActivationServices=t,this.documentManager=n,this.autoSelection=r,this.appDiagnostics=i,this.workspaceService=o,this.fileSystem=s,this.activeResourceService=a,this.activatedWorkspaces=new Set,this.isInterpreterSetForWorkspacePromises=new Map,this.disposables=[],this.workspaceService.isTrusted||(this.activationServices=this.activationServices.filter(e=>e.supportedWorkspaceTypes.untrustedWorkspace),this.singleActivationServices=this.singleActivationServices.filter(e=>e.supportedWorkspaceTypes.untrustedWorkspace)),this.workspaceService.isVirtualWorkspace&&(this.activationServices=this.activationServices.filter(e=>e.supportedWorkspaceTypes.virtualWorkspace),this.singleActivationServices=this.singleActivationServices.filter(e=>e.supportedWorkspaceTypes.virtualWorkspace))}dispose(){for(;this.disposables.length>0;){this.disposables.shift().dispose()}this.docOpenedHandler&&(this.docOpenedHandler.dispose(),this.docOpenedHandler=void 0)}async activate(){await this.initialize(),await Promise.all([...this.singleActivationServices.map(e=>e.activate()),this.activateWorkspace(this.activeResourceService.getActiveResource())])}async activateWorkspace(e){const t=this.getWorkspaceKey(e);this.activatedWorkspaces.has(t)||(this.activatedWorkspaces.add(t),this.workspaceService.isTrusted&&await this.autoSelection.autoSelectInterpreter(e),await(0,h.sendActivationTelemetry)(this.fileSystem,this.workspaceService,e),await Promise.all(this.activationServices.map(t=>t.activate(e))),await this.appDiagnostics.performPreStartupHealthCheck(e))}async initialize(){this.addHandlers(),this.addRemoveDocOpenedHandlers()}onDocOpened(e){if(e.languageId!==c.PYTHON_LANGUAGE)return;const t=this.getWorkspaceKey(e.uri);if(""===t&&this.workspaceService.hasWorkspaceFolders)return;if(this.activatedWorkspaces.has(t))return;const n=this.workspaceService.getWorkspaceFolder(e.uri);this.activateWorkspace(n?n.uri:void 0).ignoreErrors()}addHandlers(){this.disposables.push(this.workspaceService.onDidChangeWorkspaceFolders(this.onWorkspaceFoldersChanged,this))}addRemoveDocOpenedHandlers(){this.hasMultipleWorkspaces()?this.docOpenedHandler||(this.docOpenedHandler=this.documentManager.onDidOpenTextDocument(this.onDocOpened,this)):this.docOpenedHandler&&(this.docOpenedHandler.dispose(),this.docOpenedHandler=void 0)}onWorkspaceFoldersChanged(){const e=this.workspaceService.workspaceFolders.map(e=>this.getWorkspaceKey(e.uri)),t=Array.from(this.activatedWorkspaces.keys()).filter(t=>e.indexOf(t)<0);if(t.length>0)for(const e of t)this.activatedWorkspaces.delete(e);this.addRemoveDocOpenedHandlers()}hasMultipleWorkspaces(){return this.workspaceService.hasWorkspaceFolders&&this.workspaceService.workspaceFolders.length>1}getWorkspaceKey(e){return this.workspaceService.getWorkspaceFolderIdentifier(e,"")}};r([(0,d.traceDecoratorError)("Failed to activate a workspace")],f.prototype,"activateWorkspace",null),f=r([(0,o.injectable)(),i(0,(0,o.multiInject)(p.IExtensionActivationService)),i(1,(0,o.multiInject)(p.IExtensionSingleActivationService)),i(2,(0,o.inject)(a.IDocumentManager)),i(3,(0,o.inject)(l.IInterpreterAutoSelectionService)),i(4,(0,o.inject)(s.IApplicationDiagnostics)),i(5,(0,o.inject)(a.IWorkspaceService)),i(6,(0,o.inject)(u.IFileSystem)),i(7,(0,o.inject)(a.IActiveResourceService))],f),t.ExtensionActivationManager=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=t.isObject=t.isString=t.isArray=void 0;const r="number",i="string",o="object";t.isArray=function(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==r||e.constructor!==Array)},t.isString=function(e){return typeof e===i||e instanceof String},t.isObject=function(e){return!(typeof e!==o||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)},t.isNumber=function(e){return(typeof e===r||e instanceof Number)&&!isNaN(e)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageServerExtensionActivationService=void 0,n(12);const o=n(0),s=n(4),a=n(1),c=n(53),u=n(14),l=n(11),d=n(15),h=n(8),p=n(9),f=n(276),g=n(446),m=n(21),v=n(41),y=n(5);let b=class{constructor(e,t){this.serviceContainer=e,this.stateFactory=t,this.cache=new Map,this.supportedWorkspaceTypes={untrustedWorkspace:!0,virtualWorkspace:!0},this.workspaceService=this.serviceContainer.get(s.IWorkspaceService),this.configurationService=this.serviceContainer.get(a.IConfigurationService),this.interpreterService=this.serviceContainer.get(l.IInterpreterService);const n=e.get(a.IDisposableRegistry);n.push(this),n.push(this.workspaceService.onDidChangeConfiguration(this.onDidChangeConfiguration.bind(this))),n.push(this.workspaceService.onDidChangeWorkspaceFolders(this.onWorkspaceFoldersChanged,this)),this.workspaceService.isTrusted&&(this.interpreterService=this.serviceContainer.get(l.IInterpreterService),n.push(this.interpreterService.onDidChangeInterpreter(this.onDidChangeInterpreter.bind(this)))),this.languageServerChangeHandler=new f.LanguageServerChangeHandler(this.getCurrentLanguageServerType(),this.serviceContainer.get(a.IExtensions),this.serviceContainer.get(s.IApplicationShell),this.serviceContainer.get(s.ICommandManager),this.workspaceService,this.configurationService),n.push(this.languageServerChangeHandler)}async activate(e){var t;const n=new v.StopWatch;this.resource=e;const r=await(null===(t=this.interpreterService)||void 0===t?void 0:t.getActiveInterpreter(e)),i=await this.getKey(e,r);this.activatedServer&&this.activatedServer.key!==i&&this.activatedServer.server.deactivate();const o=await this.get(e,r);this.activatedServer&&this.activatedServer.server.dispose(),this.activatedServer={key:i,server:o,jedi:o.type===m.LanguageServerType.Jedi},this.activatedServer.server.activate(),(0,h.sendTelemetryEvent)(p.EventName.PYTHON_LANGUAGE_SERVER_STARTUP_DURATION,n.elapsedTime,{languageServerType:o.type})}async get(e,t){const n=await this.getKey(e,t);let r=this.cache.get(n);return r?r=r.then(e=>(e.increment(),e)):(r=this.createRefCountedServer(e,t,n),this.cache.set(n,r)),r}dispose(){this.activatedServer&&this.activatedServer.server.dispose()}async sendTelemetryForChosenLanguageServer(e){const t=this.stateFactory.createGlobalPersistentState("SWITCH_LS",void 0);"string"!=typeof t.value&&await t.updateValue(e),t.value!==e?(await t.updateValue(e),(0,h.sendTelemetryEvent)(p.EventName.PYTHON_LANGUAGE_SERVER_CURRENT_SELECTION,void 0,{switchTo:e})):(0,h.sendTelemetryEvent)(p.EventName.PYTHON_LANGUAGE_SERVER_CURRENT_SELECTION,void 0,{lsStartup:e})}isJediUsingDefaultConfiguration(e){const t=this.workspaceService.getConfiguration("python",e).inspect("languageServer");return t?void 0===t.globalValue&&void 0===t.workspaceValue&&void 0===t.workspaceFolderValue:((0,y.traceError)("WorkspaceConfiguration.inspect returns `undefined` for setting `python.languageServer`"),!1)}async onWorkspaceFoldersChanged(){const e=await Promise.all(this.workspaceService.workspaceFolders.map(e=>this.getKey(e.uri))),t=Array.from(this.cache.keys()).filter(t=>e.indexOf(t)<0);if(t.length>0)for(const e of t){const t=await this.cache.get(e);null==t||t.dispose()}}async onDidChangeInterpreter(){return this.activate(this.resource)}getCurrentLanguageServerType(){return this.serviceContainer.get(a.IConfigurationService).getSettings(this.resource).languageServer}getCurrentLanguageServerTypeIsDefault(){return this.serviceContainer.get(a.IConfigurationService).getSettings(this.resource).languageServerIsDefault}async createRefCountedServer(e,t,n){var r,i;let o=this.getCurrentLanguageServerType();t&&(null!==(i=null===(r=t.version)||void 0===r?void 0:r.major)&&void 0!==i?i:0)<3&&(o===m.LanguageServerType.Jedi?o=m.LanguageServerType.None:this.getCurrentLanguageServerTypeIsDefault()&&(o=m.LanguageServerType.Node)),this.workspaceService.isTrusted||o===m.LanguageServerType.Node||o===m.LanguageServerType.None||((0,y.traceLog)(u.LanguageService.untrustedWorkspaceMessage()),o=m.LanguageServerType.None),this.sendTelemetryForChosenLanguageServer(o).ignoreErrors(),function(e){let t;switch(e){case m.LanguageServerType.Jedi:t=u.LanguageService.startingJedi();break;case m.LanguageServerType.Node:t=u.LanguageService.startingPylance();break;case m.LanguageServerType.None:t=u.LanguageService.startingNone();break;default:throw new Error("Unknown language server type in activator.")}(0,y.traceLog)(t)}(o);let s=this.serviceContainer.get(m.ILanguageServerActivator,o);try{await s.start(e,t)}catch(n){if(o===m.LanguageServerType.Jedi)throw n;(0,y.traceError)(n),(0,y.traceLog)(u.LanguageService.lsFailedToStart()),o=m.LanguageServerType.Jedi,s=this.serviceContainer.get(m.ILanguageServerActivator,o),await s.start(e,t)}return new g.RefCountedLanguageServer(s,o,()=>{this.cache.delete(n),s.dispose()})}async onDidChangeConfiguration(e){var t;if(-1===(this.workspaceService.hasWorkspaceFolders?this.workspaceService.workspaceFolders.map(e=>e.uri):[void 0]).findIndex(t=>e.affectsConfiguration("python.languageServer",t)))return;const n=this.getCurrentLanguageServerType();(null===(t=this.activatedServer)||void 0===t?void 0:t.key)!==n&&await this.languageServerChangeHandler.handleLanguageServerChange(n)}async getKey(e,t){var n;if(this.serviceContainer.get(a.IConfigurationService).getSettings(this.resource).languageServer===m.LanguageServerType.Node)return m.LanguageServerType.Node;return`${this.workspaceService.getWorkspaceFolderIdentifier(e,"")}-${(t=t||await(null===(n=this.interpreterService)||void 0===n?void 0:n.getActiveInterpreter(e)))?`${t.path}-${t.envName}`:""}`}};r([(0,c.swallowExceptions)("Send telemetry for language server current selection")],b.prototype,"sendTelemetryForChosenLanguageServer",null),b=r([(0,o.injectable)(),i(0,(0,o.inject)(d.IServiceContainer)),i(1,(0,o.inject)(a.IPersistentStateFactory))],b),t.LanguageServerExtensionActivationService=b},function(e,t,n){var r=n(273),i=n(436),o=n(438),s=Math.max,a=Math.min;e.exports=function(e,t,n){var c,u,l,d,h,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=c,r=u;return c=u=void 0,f=t,d=e.apply(r,n)}function b(e){return f=e,h=setTimeout(S,t),g?y(e):d}function _(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-f>=l}function S(){var e=i();if(_(e))return E(e);h=setTimeout(S,function(e){var n=t-(e-p);return m?a(n,l-(e-f)):n}(e))}function E(e){return h=void 0,v&&c?y(e):(c=u=void 0,d)}function P(){var e=i(),n=_(e);if(c=arguments,u=this,p=e,n){if(void 0===h)return b(p);if(m)return clearTimeout(h),h=setTimeout(S,t),y(p)}return void 0===h&&(h=setTimeout(S,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,l=(m="maxWait"in n)?s(o(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),P.cancel=function(){void 0!==h&&clearTimeout(h),f=0,c=p=u=h=void 0},P.flush=function(){return void 0===h?d:E(i())},P}},function(e,t,n){var r=n(274);e.exports=function(){return r.Date.now()}},function(e,t){var n="object"==typeof global&&global&&global.Object===Object&&global;e.exports=n},function(e,t,n){var r=n(439),i=n(273),o=n(441),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var r=n(440),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},function(e,t,n){var r=n(442),i=n(445);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(275),i=n(443),o=n(444),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(275),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RefCountedLanguageServer=void 0;t.RefCountedLanguageServer=class{constructor(e,t,n){this.impl=e,this._type=t,this.disposeCallback=n,this.refCount=1,this.increment=()=>{this.refCount+=1}}get type(){return this._type}dispose(){this.refCount=Math.max(0,this.refCount-1),0===this.refCount&&this.disposeCallback()}start(e,t){throw new Error("Server should have already been started. Do not start the wrapper.")}activate(){this.impl.activate()}deactivate(){this.impl.deactivate()}get connection(){return this.impl.connection}get capabilities(){return this.impl.capabilities}provideRenameEdits(e,t,n,r){return this.impl.provideRenameEdits(e,t,n,r)}provideDefinition(e,t,n){return this.impl.provideDefinition(e,t,n)}provideHover(e,t,n){return this.impl.provideHover(e,t,n)}provideReferences(e,t,n,r){return this.impl.provideReferences(e,t,n,r)}provideCompletionItems(e,t,n,r){return this.impl.provideCompletionItems(e,t,n,r)}resolveCompletionItem(e,t){if(this.impl.resolveCompletionItem)return this.impl.resolveCompletionItem(e,t)}provideCodeLenses(e,t){return this.impl.provideCodeLenses(e,t)}provideDocumentSymbols(e,t){return this.impl.provideDocumentSymbols(e,t)}provideSignatureHelp(e,t,n,r){return this.impl.provideSignatureHelp(e,t,n,r)}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionSurveyPrompt=t.extensionSurveyStateKeys=void 0;const o=n(0),s=n(448),a=n(2),c=n(4),u=n(449);n(12);const l=n(13),d=n(1),h=n(14),p=n(5),f=n(8),g=n(9);var m;!function(e){e.doNotShowAgain="doNotShowExtensionSurveyAgain",e.disableSurveyForTime="doNotShowExtensionSurveyUntilTime"}(m=t.extensionSurveyStateKeys||(t.extensionSurveyStateKeys={}));let v=class{constructor(e,t,n,r,i,o,s,a=10,c=108e5){this.appShell=e,this.browserService=t,this.persistentState=n,this.random=r,this.experiments=i,this.appEnvironment=o,this.platformService=s,this.sampleSizePerOneHundredUsers=a,this.waitTimeToShowSurvey=c,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!0}}async activate(){if(!await this.experiments.inExperiment(u.ShowExtensionSurveyPrompt.experiment))return;this.shouldShowBanner()&&setTimeout(()=>this.showSurvey().ignoreErrors(),this.waitTimeToShowSurvey)}shouldShowBanner(){if(a.env.uiKind===(null===a.UIKind||void 0===a.UIKind?void 0:a.UIKind.Web))return!1;if(this.persistentState.createGlobalPersistentState(m.doNotShowAgain,!1).value)return!1;if(this.persistentState.createGlobalPersistentState(m.disableSurveyForTime,!1,72576e5).value)return!1;return!(this.random.getRandomInt(0,100)>=this.sampleSizePerOneHundredUsers)}async showSurvey(){const e=[h.ExtensionSurveyBanner.bannerLabelYes(),h.ExtensionSurveyBanner.maybeLater(),h.Common.doNotShowAgain()],t=await this.appShell.showInformationMessage(h.ExtensionSurveyBanner.bannerMessage(),...e);(0,f.sendTelemetryEvent)(g.EventName.EXTENSION_SURVEY_PROMPT,void 0,{selection:t?["Yes","Maybe later","Do not show again"][e.indexOf(t)]:void 0}),t&&(t===h.ExtensionSurveyBanner.bannerLabelYes()?(this.launchSurvey(),await this.persistentState.createGlobalPersistentState(m.disableSurveyForTime,!1,72576e5).updateValue(!0)):t===h.Common.doNotShowAgain()&&await this.persistentState.createGlobalPersistentState(m.doNotShowAgain,!1).updateValue(!0))}launchSurvey(){const e="https://aka.ms/AA5rjx5?"+s.stringify({o:encodeURIComponent(this.platformService.osType),v:encodeURIComponent(this.appEnvironment.vscodeVersion),e:encodeURIComponent(this.appEnvironment.packageJson.version),m:encodeURIComponent(this.appEnvironment.sessionId)});this.browserService.launch(e)}};r([(0,p.traceDecoratorError)("Failed to check whether to display prompt for extension survey")],v.prototype,"shouldShowBanner",null),r([(0,p.traceDecoratorError)("Failed to display prompt for extension survey")],v.prototype,"showSurvey",null),v=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IApplicationShell)),i(1,(0,o.inject)(d.IBrowserService)),i(2,(0,o.inject)(d.IPersistentStateFactory)),i(3,(0,o.inject)(d.IRandom)),i(4,(0,o.inject)(d.IExperimentService)),i(5,(0,o.inject)(c.IApplicationEnvironment)),i(6,(0,o.inject)(l.IPlatformService)),i(7,(0,o.optional)()),i(8,(0,o.optional)())],v),t.ExtensionSurveyPrompt=v},function(e,t){e.exports=require("querystring")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExtensionSurveyPrompt=void 0,function(e){e.experiment="pythonSurveyNotification"}(t.ShowExtensionSurveyPrompt||(t.ShowExtensionSurveyPrompt={}))},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediLanguageServerAnalysisOptions=void 0;const o=n(0),s=n(3),a=n(4),c=n(1),u=n(95),l=n(277),d=n(21);let h=class extends l.LanguageServerAnalysisOptionsWithEnv{constructor(e,t,n,r){super(e,t,r),this.configurationService=n,this.resource=void 0}async initialize(e,t){return this.resource=e,super.initialize(e,t)}getWorkspaceFolder(){return this.workspace.getWorkspaceFolder(this.resource)}async getInitializationOptions(){var e;const t=this.configurationService.getSettings(this.resource),n=null===(e=this.getWorkspaceFolder())||void 0===e?void 0:e.uri.fsPath,r=t.autoComplete?t.autoComplete.extraPaths.map(e=>s.isAbsolute(e)?e:n?s.join(n,e):""):[];n&&r.unshift(n);return{markupKindPreferred:"markdown",completion:{resolveEagerly:!1,disableSnippets:!1},diagnostics:{enable:!0,didOpen:!0,didSave:!0,didChange:!0},workspace:{extraPaths:r.filter(e=>e.length>0).filter((e,t,n)=>n.indexOf(e)===t),symbols:{maxSymbols:0}}}}};h=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IEnvironmentVariablesProvider)),i(1,(0,o.inject)(d.ILanguageServerOutputChannel)),i(2,(0,o.inject)(c.IConfigurationService)),i(3,(0,o.inject)(a.IWorkspaceService))],h),t.JediLanguageServerAnalysisOptions=h},function(e,t,n){const r=n(121);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(174).SEMVER_SPEC_VERSION,SemVer:n(43),compareIdentifiers:n(216).compareIdentifiers,rcompareIdentifiers:n(216).rcompareIdentifiers,parse:n(122),valid:n(452),clean:n(453),inc:n(454),diff:n(455),major:n(456),minor:n(457),patch:n(458),prerelease:n(459),compare:n(64),rcompare:n(460),compareLoose:n(461),compareBuild:n(218),sort:n(462),rsort:n(463),gt:n(177),lt:n(219),eq:n(217),neq:n(279),gte:n(220),lte:n(221),cmp:n(280),coerce:n(464),Comparator:n(178),Range:n(65),satisfies:n(179),toComparators:n(468),maxSatisfying:n(469),minSatisfying:n(470),minVersion:n(471),validRange:n(472),outside:n(222),gtr:n(473),ltr:n(474),intersects:n(475),simplifyRange:n(476),subset:n(477)}},function(e,t,n){const r=n(122);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){const r=n(122);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){const r=n(43);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},function(e,t,n){const r=n(122),i=n(217);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),o=n.prerelease.length||i.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return s+e;return a}}},function(e,t,n){const r=n(43);e.exports=(e,t)=>new r(e,t).major},function(e,t,n){const r=n(43);e.exports=(e,t)=>new r(e,t).minor},function(e,t,n){const r=n(43);e.exports=(e,t)=>new r(e,t).patch},function(e,t,n){const r=n(122);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){const r=n(64);e.exports=(e,t,n)=>r(t,e,n)},function(e,t,n){const r=n(64);e.exports=(e,t)=>r(e,t,!0)},function(e,t,n){const r=n(218);e.exports=(e,t)=>e.sort((e,n)=>r(e,n,t))},function(e,t,n){const r=n(218);e.exports=(e,t)=>e.sort((e,n)=>r(n,e,t))},function(e,t,n){const r=n(43),i=n(122),{re:o,t:s}=n(121);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},function(e,t,n){"use strict";const r=n(466),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1;const g=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(m(e,t)){if(y(e,r),!e[a])return}else n&&(e[p]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const _=(e,t,n,r)=>{let i=n.value;m(e,i)&&(y(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach(e=>{e.length=this[s](e.value,e.key),this[o]+=e.length})),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;_(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;_(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[h]=new Map,this[d]=new r,this[o]=0}dump(){return this[d].map(e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[i])return y(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const p=new b(e,t,a,r,n);return p.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=p.length,this[d].unshift(p),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[h].forEach((e,t)=>g(this,t,!1))}}},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&rnew r(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,n){const r=n(43),i=n(65);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))}),o}},function(e,t,n){const r=n(43),i=n(65);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))}),o}},function(e,t,n){const r=n(43),i=n(65),o=n(177);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},function(e,t,n){const r=n(65);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},function(e,t,n){const r=n(222);e.exports=(e,t,n)=>r(e,t,">",n)},function(e,t,n){const r=n(222);e.exports=(e,t,n)=>r(e,t,"<",n)},function(e,t,n){const r=n(65);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},function(e,t,n){const r=n(179),i=n(64);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort((e,t)=>i(e,t,n));for(const e of c){r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push("<="+t):u.push(`${e} - ${t}`):u.push(">="+e):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length{if(e===t)return!0;if(1===e.length&&e[0].semver===i)return 1===t.length&&t[0].semver===i;const r=new Set;let a,l,d,h,p,f,g;for(const t of e)">"===t.operator||">="===t.operator?a=c(a,t,n):"<"===t.operator||"<="===t.operator?l=u(l,t,n):r.add(t.semver);if(r.size>1)return null;if(a&&l){if(d=s(a.semver,l.semver,n),d>0)return null;if(0===d&&(">="!==a.operator||"<="!==l.operator))return null}for(const e of r){if(a&&!o(e,String(a),n))return null;if(l&&!o(e,String(l),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,a)if(">"===e.operator||">="===e.operator){if(h=c(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!o(a.semver,String(e),n))return!1;if(l)if("<"===e.operator||"<="===e.operator){if(p=u(l,e,n),p===e&&p!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),n))return!1;if(!e.operator&&(l||a)&&0!==d)return!1}return!(a&&f&&!l&&0!==d)&&!(l&&g&&!a&&0!==d)},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n)=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=a(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(96),i=n(32),o=n(283),s=n(479);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),o.Disposable.create(()=>this.stream.off("data",e))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((n,r)=>{const i=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)})}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(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)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return l}!function(e){e.install=function(){r.default.install(l)}}(d||(d={})),t.default=d},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,r=0;e:for(;tthis._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 r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(96),i=n(152),o=n(153);var s;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class 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: "+(i.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,i;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&&(i=e.contentDecoder,o.set(i.name,i)),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=r.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:i,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=r.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&&(r.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=r.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 r=n(96),i=n(152),o=n(482),s=n(153);var a;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class 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: "+(i.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:r.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:r.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 r=n(96);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&&r.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 r=n(96),i=n(152),o=n(285),s=n(484),a=n(153),c=n(286);var u,l,d,h,p,f,g,m,v,y,b,_,S;!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 i.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"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=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 E extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E,function(e){e.is=function(e){const t=e;return t&&i.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&&i.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&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:b.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&b.is(t.sender)}}(_=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&(_.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"}(S||(S={})),t.createMessageConnection=function(e,n,v,y){const b=void 0!==v?v:t.NullLogger;let P=0,w=0,T=0,C=void 0;const I=Object.create(null);let R=void 0;const O=Object.create(null),D=new Map;let x,k,A=new s.LinkedMap,N=Object.create(null),j=Object.create(null),M=h.Off,L=p.Text,F=S.New;const q=new a.Emitter,U=new a.Emitter,W=new a.Emitter,B=new a.Emitter,V=new a.Emitter,H=y&&y.cancellationStrategy?y.cancellationStrategy:_.Message;function $(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 G(e,t){var n;o.isRequestMessage(t)?e.set($(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++T).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}function K(e){}function z(){return F===S.Listening}function Y(){return F===S.Closed}function J(){return F===S.Disposed}function X(){F!==S.New&&F!==S.Listening||(F=S.Closed,U.fire(void 0))}function Q(){x||0===A.size||(x=r.default().timer.setImmediate(()=>{x=void 0,function(){if(0===A.size)return;const e=A.shift();try{o.isRequestMessage(e)?function(e){if(J())return;function t(t,r,i){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,r,i),n.write(s)}function r(t,r,i){const o={jsonrpc:"2.0",id:e.id,error:t.toJson()};ee(o,r,i),n.write(o)}!function(e){if(M===h.Off||!k)return;if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.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||C){const s=String(e.id),l=H.receiver.createCancellationTokenSource(s);j[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(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 r(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 r(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 C&&(d=C(e.method,e.params,l.token));const h=d;d?h.then?h.then(n=>{delete j[s],t(n,e.method,u)},t=>{delete j[s],t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete j[s],t(d,e.method,u)):(delete j[s],function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:"2.0",id:e.id,result:t};ee(o,r,i),n.write(o)}(d,e.method,u))}catch(n){delete j[s],n instanceof o.ResponseError?t(n,e.method,u):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(J())return;let t,n=void 0;if(e.method===u.type.method)t=e=>{const t=e.id,n=j[String(t)];n&&n.cancel()};else{const r=O[e.method];r&&(t=r.handler,n=r.type)}if(t||R)try{!function(e){if(M===h.Off||!k||e.method===g.type.method)return;if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.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&&b.error(`Notification ${e.method} defines ${n.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==n&&(n.parameterStructures===o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),n.numberOfParams!==e.params.length&&b.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&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):R&&R(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):o.isResponseMessage(e)?function(e){if(J())return;if(null===e.id)e.error?b.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):b.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=N[t];if(function(e,t){if(M===h.Off||!k)return;if(L===p.Text){let n=void 0;if(M===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else te("receive-response",e)}(e,n),n){delete N[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?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void b.error("Received empty message.");b.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),n=N[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{Q()}}()}))}e.onClose(X),e.onError((function(e){q.fire([e,void 0,void 0])})),n.onClose(X),n.onError((function(e){q.fire(e)}));const Z=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=$(e.params.id),r=A.get(t);if(o.isRequestMessage(r)){const i=null==y?void 0:y.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(r,K):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return A.delete(t),o.id=r.id,ee(o,e.method,Date.now()),void n.write(o)}}G(A,e)}finally{Q()}};function ee(e,t,n){if(M!==h.Off&&k)if(L===p.Text){let r=void 0;M===h.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else te("send-response",e)}function te(e,t){if(!k||M===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}function ne(){if(Y())throw new E(m.Closed,"Connection is closed.");if(J())throw new E(m.Disposed,"Connection is disposed.")}function re(e){return void 0===e?null:e}function ie(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)?ie(t):[re(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ie(t);case o.ParameterStructures.byPosition:return[re(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function ae(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=se(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,s;if(ne(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const u=c-i;switch(u){case 0:s=void 0;break;case 1:s=se(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map(e=>re(e))}}else{const n=t;r=e.method,s=ae(e,n)}const a={jsonrpc:"2.0",method:r,params:s};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ne(),i.func(e)?R=e:t&&(i.string(e)?(n=e,O[e]={type:void 0,handler:t}):(n=e.method,O[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete O[n]:R=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:B.event,sendRequest:(e,...t)=>{let r,s;ne(),function(){if(!z())throw new Error("Call listen() first.")}();let a=void 0;if(i.string(e)){r=e;const n=t[0],i=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(i)&&(d-=1,a=i);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=se(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map(e=>re(e))}}else{const n=t;r=e.method,s=ae(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const u=P++;let l;a&&(l=a.onCancellationRequested(()=>{H.sender.sendCancellation(ce,u)}));return new Promise((e,t)=>{const i={jsonrpc:"2.0",id:u,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),H.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),H.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(i);try{n.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(u)]=a)})},onRequest:(e,t)=>{ne();let n=null;return d.is(e)?(n=void 0,C=e):i.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]:C=void 0)}}},trace:(e,t,n)=>{let r=!1,o=p.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||p.Text)),M=e,L=o,k=M===h.Off?void 0:t,!r||Y()||J()||ce.sendNotification(f.type,{value:h.toString(e)})},onError:q.event,onClose:U.event,onUnhandledNotification:W.event,onDispose:V.event,end:()=>{n.end()},dispose:()=>{if(J())return;F=S.Disposed,V.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(N).forEach(e=>{N[e].reject(t)}),N=Object.create(null),j=Object.create(null),A=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ne(),function(){if(z())throw new E(m.AlreadyListening,"Connection is already listening")}(),F=S.Listening,e.listen(Z)},inspect:()=>{r.default().console.log("inspect")}};return ce.onNotification(g.type,e=>{M!==h.Off&&k&&k.log(e.message,M===h.Verbose?e.verbose:void 0)}),ce.onNotification(l.type,e=>{const t=D.get(e.token);t?t(e.value):B.fire(e)}),ce}},function(e,t,n){"use strict";var r;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}(r=t.Touch||(t.Touch={}));class i{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=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}[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===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,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=i;t.LRUCache=class extends i{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=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(151),t),i(n(486),t),i(n(38),t),i(n(487),t);var o=n(504);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 r,i,o,s,a,c,u,l,d,h,p,f,g,m,v,y,b,_,S,E,P,w,T,C,I,R;n.r(t),n.d(t,"integer",(function(){return r})),n.d(t,"uinteger",(function(){return i})),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 h})),n.d(t,"FoldingRange",(function(){return p})),n.d(t,"DiagnosticRelatedInformation",(function(){return f})),n.d(t,"DiagnosticSeverity",(function(){return g})),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 b})),n.d(t,"TextEdit",(function(){return _})),n.d(t,"ChangeAnnotation",(function(){return S})),n.d(t,"ChangeAnnotationIdentifier",(function(){return E})),n.d(t,"AnnotatedTextEdit",(function(){return P})),n.d(t,"TextDocumentEdit",(function(){return w})),n.d(t,"CreateFile",(function(){return T})),n.d(t,"RenameFile",(function(){return C})),n.d(t,"DeleteFile",(function(){return I})),n.d(t,"WorkspaceEdit",(function(){return R})),n.d(t,"WorkspaceChange",(function(){return ae})),n.d(t,"TextDocumentIdentifier",(function(){return O})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return D})),n.d(t,"OptionalVersionedTextDocumentIdentifier",(function(){return x})),n.d(t,"TextDocumentItem",(function(){return k})),n.d(t,"MarkupKind",(function(){return A})),n.d(t,"MarkupContent",(function(){return N})),n.d(t,"CompletionItemKind",(function(){return j})),n.d(t,"InsertTextFormat",(function(){return M})),n.d(t,"CompletionItemTag",(function(){return L})),n.d(t,"InsertReplaceEdit",(function(){return F})),n.d(t,"InsertTextMode",(function(){return q})),n.d(t,"CompletionItem",(function(){return U})),n.d(t,"CompletionList",(function(){return W})),n.d(t,"MarkedString",(function(){return B})),n.d(t,"Hover",(function(){return V})),n.d(t,"ParameterInformation",(function(){return H})),n.d(t,"SignatureInformation",(function(){return $})),n.d(t,"DocumentHighlightKind",(function(){return G})),n.d(t,"DocumentHighlight",(function(){return K})),n.d(t,"SymbolKind",(function(){return z})),n.d(t,"SymbolTag",(function(){return Y})),n.d(t,"SymbolInformation",(function(){return J})),n.d(t,"DocumentSymbol",(function(){return X})),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 re})),n.d(t,"SelectionRange",(function(){return ie})),n.d(t,"EOL",(function(){return ue})),n.d(t,"TextDocument",(function(){return ce})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.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,r){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return 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,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},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,r){return{red:e,green:t,blue:n,alpha:r}},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)||_.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,_.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(r)&&(o.endCharacter=r),le.defined(i)&&(o.kind=i),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))}}(p||(p={})),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)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),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,r,i,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(r)&&(s.code=r),le.defined(i)&&(s.source=i),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,f.is))}}(y||(y={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(b||(b={})),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)}}(_||(_={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},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)}}(S||(S={})),function(e){e.is=function(e){return"string"==typeof e}}(E||(E={})),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 _.is(t)&&(S.is(t.annotationId)||E.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&x.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},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||E.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.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)?T.is(e)||C.is(e)||I.is(e):w.is(e)})))}}(R||(R={}));var O,D,x,k,A,N,j,M,L,F,q,U,W,B,V,H,$,G,K,z,Y,J,X,Q,Z,ee,te,ne,re,ie,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=_.insert(e,t):E.is(n)?(i=n,r=P.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=_.replace(e,t):E.is(n)?(i=n,r=P.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=_.del(e):E.is(t)?(r=t,n=P.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=P.del(e,r)),this.edits.push(n),void 0!==r)return r},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(E.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(w.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 r=new oe(e.changes[n]);t._textEditChanges[n]=r}))):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(x.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new oe(i),this._textEditChanges[e]=r}return r},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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=T.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=T.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(S.is(n)||E.is(n)?i=n:r=n,void 0===i?o=C.create(e,t,r):(s=E.is(i)?i:this._changeAnnotations.manage(i),o=C.create(e,t,r,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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=I.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),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)}}(O||(O={})),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))}}(x||(x={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(k||(k={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(A||(A={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(A||(A={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&A.is(t.kind)&&le.string(t.value)}}(N||(N={})),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}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(L||(L={})),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)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(q||(q={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),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)}}(B||(B={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(N.is(t.contents)||B.is(t.contents)||le.typedArray(t.contents,B.is))&&(void 0===e.range||s.is(e.range))}}(V||(V={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(H||(H={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var s=r[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(ce||(ce={}));var le,de=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!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,r=0;r0&&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,r=t.length;if(0===r)return o.create(0,e);for(;ne?r=i:n=i+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],r=e.line+10}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||S.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new i.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new i.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new i.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new i.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new i.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 i.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new i.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new i.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 i.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 i.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new i.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 i.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new i.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new i.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 i.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 i.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new i.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new i.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new i.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new i.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(38);!function(e){e.method="textDocument/implementation",e.type=new r.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(38);!function(e){e.method="textDocument/typeDefinition",e.type=new r.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 r=n(38);!function(e){e.type=new r.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(38);!function(e){e.type=new r.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(38);!function(e){e.method="textDocument/documentColor",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new r.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 r=n(38);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new r.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(38);!function(e){e.method="textDocument/declaration",e.type=new r.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(38);!function(e){e.method="textDocument/selectionRange",e.type=new r.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 r=n(151),i=n(38);!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new i.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(38);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const r=n(38);!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 r.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(38);!function(e){e.method="window/showDocument",e.type=new r.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(38);!function(e){e.method="textDocument/linkedEditingRange",e.type=new r.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 r=n(38);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new r.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 r=n(38);!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 r.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(151);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),r.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(2),i=n(27),o=n(109),s=n(223),a=n(288),c=n(289),u=n(290),l=n(291),d=n(292),h=n(27);var p;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(p||(p={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function f(e){return{uri:t(e.uri)}}function g(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function m(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function v(e){switch(e){case r.SignatureHelpTriggerKind.Invoke:return i.SignatureHelpTriggerKind.Invoked;case r.SignatureHelpTriggerKind.TriggerCharacter:return i.SignatureHelpTriggerKind.TriggerCharacter;case r.SignatureHelpTriggerKind.ContentChange:return i.SignatureHelpTriggerKind.ContentChange}}function y(e){return{label:e.label}}function b(e){return{label:e.label,parameters:(t=e.parameters,t.map(y))};var t}function _(e){return{line:e.line,character:e.character}}function S(e){return null==e?e:{line:e.line,character:e.character}}function E(e){return null==e?e:{start:S(e.start),end:S(e.end)}}function P(e){return null==e?e:i.Location.create(n(e.uri),E(e.range))}function w(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function T(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function C(e){return{message:e.message,location:P(e.location)}}function I(e){const t=i.Diagnostic.create(E(e.range),e.message),r=e instanceof l.ProtocolDiagnostic?e:void 0;void 0!==r&&void 0!==r.data&&(t.data=r.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!==r&&r.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=w(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=T(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(C)),e.source&&(t.source=e.source),t}function R(e){return null==e?e:e.map(I)}function O(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function D(e){return{range:E(e.range),newText:e.newText}}function x(e){return e<=r.SymbolKind.TypeParameter?e+1:i.SymbolKind.Property}function k(e){return e}function A(e){return e.map(k)}function N(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:f,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:f(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:f(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:f(e.document),reason:g(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:f(e),position:_(t)}},asCompletionParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{triggerKind:m(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:v(n.triggerKind),activeSignatureHelp:(r=n.activeSignatureHelp,void 0===r?r:{signatures:(i=r.signatures,i.map(b)),activeSignature:r.activeSignature,activeParameter:r.activeParameter})}};var r,i},asWorkerPosition:_,asRange:E,asPosition:S,asPositions:function(e){let t=[];for(let n of e)t.push(S(n));return t},asLocation:P,asDiagnosticSeverity:w,asDiagnosticTag:T,asDiagnostic:I,asDiagnostics:R,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 i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n=i.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=t.textEdit.range):t.insertText instanceof r.SnippetString?(n=i.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 p.is(t)?i.InsertReplaceEdit.create(e,E(t.inserting),E(t.replacing)):{newText:e,range:E(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=N(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=O(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(r.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=h.InsertTextMode.adjustIndentation),t},asTextEdit:D,asSymbolKind:x,asSymbolTag:k,asSymbolTags:A,asReferenceParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:function(e){let t=i.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=R(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=N(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]),i.CodeActionContext.create(R(e.diagnostics),t)},asCommand:N,asCodeLens:function(e){let t=i.CodeLens.create(E(e.range));return e.command&&(t.command=N(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:f(e)}},asCodeLensParams:function(e){return{textDocument:f(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(E(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:f(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:x(e.kind),uri:n(e.uri),range:E(e.range),selectionRange:E(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=A(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 r=n(2),i=n(27),o=n(109),s=n(223),a=n(288),c=n(289),u=n(290),l=n(291),d=n(292),h=n(27);var p;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(p||(p={})),t.createConverter=function(e,t){const n=e||(e=>r.Uri.parse(e));function f(e){return n(e)}function g(e){return e.map(m)}function m(e){let t=new l.ProtocolDiagnostic(_(e.range),e.message,E(e.severity),e.data);return void 0!==e.code&&(i.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:f(e.codeDescription.href)}:l.DiagnosticCode.is(e.code)?(t.hasDiagnosticCode=!0,t.code={value:e.code.value,target:f(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 r.DiagnosticRelatedInformation(N(e.location),e.message)}function y(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function b(e){if(e)return new r.Position(e.line,e.character)}function _(e){if(e)return new r.Range(b(e.start),b(e.end))}function S(e){return e.map(e=>_(e))}function E(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function P(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return w(e.value);case i.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function w(e){const n=new r.MarkdownString(e);return!0===t&&(n.isTrusted=t),n}function T(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function C(e){let t=function(e){if(null==e)return[];const t=[];for(let n of e){const e=T(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=P(e.documentation),n.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(n.filterText=e.filterText);let a=function(e){return e.textEdit?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.textEdit.newText),range:I(e.textEdit),fromEdit:!0}:{text:e.textEdit.newText,range:I(e.textEdit),fromEdit:!0}:e.insertText?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(a&&(n.insertText=a.text,n.range=a.range,n.fromEdit=a.fromEdit),o.number(e.kind)){let[t,o]=(c=e.kind,i.CompletionItemKind.Text<=c&&c<=i.CompletionItemKind.TypeParameter?[c-1,void 0]:[r.CompletionItemKind.Text,c]);n.kind=t,o&&(n.originalItemKind=o)}var c;return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=O(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=$(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(r.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),t.length>0&&(n.tags=t),void 0!==e.insertTextMode&&(n.insertTextMode=e.insertTextMode,e.insertTextMode===h.InsertTextMode.asIs&&(n.keepWhitespace=!0)),n}function I(e){return i.InsertReplaceEdit.is(e)?{inserting:_(e.insert),replacing:_(e.replace)}:_(e.range)}function R(e){if(e)return new r.TextEdit(_(e.range),e.newText)}function O(e){if(e)return e.map(R)}function D(e){return e.map(x)}function x(e){let t=new r.SignatureInformation(e.label);return void 0!==e.documentation&&(t.documentation=P(e.documentation)),void 0!==e.parameters&&(t.parameters=k(e.parameters)),void 0!==e.activeParameter&&(t.activeParameter=e.activeParameter),t}function k(e){return e.map(A)}function A(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=P(e.documentation)),t}function N(e){if(e)return new r.Location(n(e.uri),_(e.range))}function j(e){if(!e)return;let t={targetUri:n(e.targetUri),targetRange:_(e.targetRange),originSelectionRange:_(e.originSelectionRange),targetSelectionRange:_(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}function M(e){if(e){if(o.array(e)){if(0===e.length)return[];if(i.LocationLink.is(e[0])){return e.map(e=>j(e))}return e.map(e=>N(e))}return i.LocationLink.is(e)?[j(e)]:N(e)}}function L(e){let t=new r.DocumentHighlight(_(e.range));return o.number(e.kind)&&(t.kind=F(e.kind)),t}function F(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function q(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function U(e){switch(e){case i.SymbolTag.Deprecated:return r.SymbolTag.Deprecated;default:return}}function W(e){if(null==e)return;const t=[];for(const n of e){const e=U(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function B(e,t){let i=new r.SymbolInformation(e.name,q(e.kind),_(e.location.range),e.location.uri?n(e.location.uri):t);return H(i,e),e.containerName&&(i.containerName=e.containerName),i}function V(e){let t=new r.DocumentSymbol(e.name,e.detail||"",q(e.kind),_(e.range),_(e.selectionRange));if(H(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(V(t));t.children=n}return t}function H(e,t){e.tags=W(t.tags),t.deprecated&&(e.tags?e.tags.includes(r.SymbolTag.Deprecated)||(e.tags=e.tags.concat(r.SymbolTag.Deprecated)):e.tags=[r.SymbolTag.Deprecated])}function $(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const G=new Map;function K(e){if(null==e)return;let t=G.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function z(e){if(!e)return;let t=new a.default(_(e.range));return e.command&&(t.command=$(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 r=J(e.changeAnnotations[n]);t.set(n,r)}const o=e=>void 0===e?void 0:t.get(e),s=new r.WorkspaceEdit;if(e.documentChanges)for(const t of e.documentChanges)if(i.CreateFile.is(t))s.createFile(n(t.uri),t.options,o(t.annotationId));else if(i.RenameFile.is(t))s.renameFile(n(t.oldUri),n(t.newUri),t.options,o(t.annotationId));else if(i.DeleteFile.is(t))s.deleteFile(n(t.uri),t.options,o(t.annotationId));else{if(!i.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)h.AnnotatedTextEdit.is(n)?s.replace(e,_(n.range),n.newText,o(n.annotationId)):s.replace(e,_(n.range),n.newText)}}else e.changes&&Object.keys(e.changes).forEach(t=>{s.set(n(t),O(e.changes[t]))});return s}function J(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}function X(e){let t=_(e.range),n=e.target?f(e.target):void 0,r=new c.default(t,n);return void 0!==e.tooltip&&(r.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(r.data=e.data),r}function Q(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function Z(e){return new r.ColorInformation(_(e.range),Q(e.color))}function ee(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=O(e.additionalTextEdits),e.textEdit&&(t.textEdit=R(e.textEdit)),t}function te(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function ne(e){return new r.FoldingRange(e.startLine,e.endLine,te(e.kind))}function re(e){return new r.SelectionRange(_(e.range),e.parent?re(e.parent):void 0)}function ie(e){if(null===e)return;let t=new d.default(q(e.kind),e.name,e.detail||"",f(e.uri),_(e.range),_(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=W(e.tags)),t}function oe(e){return new r.CallHierarchyIncomingCall(ie(e.from),S(e.fromRanges))}function se(e){return new r.CallHierarchyOutgoingCall(ie(e.to),S(e.fromRanges))}function ae(e){return new r.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}return G.set(i.CodeActionKind.Empty,r.CodeActionKind.Empty),G.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),G.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),G.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),G.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),G.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),G.set(i.CodeActionKind.Source,r.CodeActionKind.Source),G.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:f,asDiagnostics:g,asDiagnostic:m,asRange:_,asRanges:S,asPosition:b,asDiagnosticSeverity:E,asDiagnosticTag:y,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return w(e);if(p.is(e)){return w().appendCodeblock(e.value,e.language)}if(Array.isArray(e)){let t=[];for(let n of e){let e=w();p.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case i.MarkupKind.Markdown:return w(e.value);case i.MarkupKind.PlainText:return t=w(),t.appendText(e.value),t;default:return t=w(),t.appendText("Unsupported Markup content received. Kind is: "+e.kind),t}}}(e.contents),_(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e)){return e.map(C)}let t=e;return new r.CompletionList(t.items.map(C),t.isIncomplete)},asCompletionItem:C,asTextEdit:R,asTextEdits:O,asSignatureHelp:function(e){if(!e)return;let t=new r.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=D(e.signatures)),t},asSignatureInformations:D,asSignatureInformation:x,asParameterInformations:k,asParameterInformation:A,asDeclarationResult:function(e){if(e)return M(e)},asDefinitionResult:function(e){if(e)return M(e)},asLocation:N,asReferences:function(e){if(e)return e.map(e=>N(e))},asDocumentHighlights:function(e){if(e)return e.map(L)},asDocumentHighlight:L,asDocumentHighlightKind:F,asSymbolKind:q,asSymbolTag:U,asSymbolTags:W,asSymbolInformations:function(e,t){if(e)return e.map(e=>B(e,t))},asSymbolInformation:B,asDocumentSymbols:function(e){if(null!=e)return e.map(V)},asDocumentSymbol:V,asCommand:$,asCommands:function(e){if(e)return e.map($)},asCodeAction:function(e){if(null==e)return;let t=new u.default(e.title,e.data);return void 0!==e.kind&&(t.kind=K(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=g(e.diagnostics)),void 0!==e.edit&&(t.edit=Y(e.edit)),void 0!==e.command&&(t.command=$(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionKind:K,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>K(e))},asCodeLens:z,asCodeLenses:function(e){if(e)return e.map(e=>z(e))},asWorkspaceEdit:Y,asDocumentLink:X,asDocumentLinks:function(e){if(e)return e.map(X)},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:re,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push(re(n));return t},asSemanticTokensLegend:function(e){return e},asSemanticTokens:function(e){if(null!=e)return new r.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ae,asSemanticTokensEdits:function(e){if(null!=e)return new r.SemanticTokensEdits(e.edits.map(ae),e.resultId)},asCallHierarchyItem:ie,asCallHierarchyItems:function(e){if(null!==e)return e.map(e=>ie(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 r.LinkedEditingRanges(S(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 r=n(27);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=r.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&&(r.RAL().timer.clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.colorProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={color:e,textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:r.code2ProtocolConverter.asRange(t.range)};return r.sendRequest(i.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>r.handleFailedRequest(i.ColorPresentationRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,r=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.DocumentColorRequest.type,r,t).then(this.asColorInformations.bind(this),e=>n.handleFailedRequest(i.ColorPresentationRequest.type,e,null))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,r):r(e,t)}};return[r.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new r.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}t.ColorProviderFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.implementationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.ImplementationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.ImplementationRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[r.languages.registerImplementationProvider(e.documentSelector,t),t]}}t.ImplementationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.TypeDefinitionRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=s(s(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.typeDefinitionProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.TypeDefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.TypeDefinitionRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}t.TypeDefinitionFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const r=n(224),i=n(2),o=n(27);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=i.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map(e=>this.asProtocol(e))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{const n=()=>{const e=i.workspace.workspaceFolders;if(void 0===e)return null;return e.map(e=>this.asProtocol(e))},r=t.clientOptions.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()});const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=r.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,r=i.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},r=n.clientOptions.middleware.workspace;r&&r.didChangeWorkspaceFolders?r.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(t,r),this.sendInitialEvent(i.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.foldingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e)};return r.sendRequest(i.FoldingRangeRequest.type,o,n).then(a.asFoldingRanges,e=>r.handleFailedRequest(i.FoldingRangeRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[r.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}static asFoldingRangeKind(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}static asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new r.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 r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.declarationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DeclarationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDeclarationResult,e=>r.handleFailedRequest(i.DeclarationRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[r.languages.registerDeclarationProvider(e.documentSelector,t),t]}}t.DeclarationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const r=n(2),i=n(27),o=n(54);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,i.SelectionRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.selectionRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideSelectionRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:r.code2ProtocolConverter.asPositions(t)};return r.sendRequest(i.SelectionRangeRequest.type,o,n).then(e=>r.protocol2CodeConverter.asSelectionRanges(e),e=>r.handleFailedRequest(i.SelectionRangeRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[r.languages.registerSelectionRangeProvider(e.documentSelector,t),t]}}t.SelectionRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const r=n(27),i=n(293);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(r.WorkDoneProgressCreateRequest.type,e=>{this.activeParts.add(new i.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 r=n(2),i=n(27),o=n(54);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 r=this.client,o=this.middleware,s=(e,t,n)=>{const o=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.CallHierarchyPrepareRequest.type,o,n).then(e=>r.protocol2CodeConverter.asCallHierarchyItems(e),e=>r.handleFailedRequest(i.CallHierarchyPrepareRequest.type,e,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyIncomingCallsRequest.type,r,t).then(e=>n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e),e=>n.handleFailedRequest(i.CallHierarchyIncomingCallsRequest.type,e,null))};return r.provideCallHierarchyIncomingCalls?r.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyOutgoingCallsRequest.type,r,t).then(e=>n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e),e=>n.handleFailedRequest(i.CallHierarchyOutgoingCallsRequest.type,e,null))};return r.provideCallHierarchyOutgoingCalls?r.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class c extends o.TextDocumentFeature{constructor(e){super(e,i.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.callHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new a(t);return[r.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 r=n(2),i=n(54),o=n(27),s=n(109);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class c extends i.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,r]=this.getRegistration(t,e.semanticTokensProvider);n&&r&&this.register({id:n,registerOptions:r})}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,i=new r.EventEmitter,a=t?{onDidChangeSemanticTokens:i.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,r=n.clientOptions.middleware,i=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,r,t).then(e=>n.protocol2CodeConverter.asSemanticTokens(e),e=>n.handleFailedRequest(o.SemanticTokensRequest.type,e,null))};return r.provideDocumentSemanticTokens?r.provideDocumentSemanticTokens(e,t,i):i(e,t)},provideDocumentSemanticTokensEdits:n?(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return r.sendRequest(o.SemanticTokensDeltaRequest.type,i,n).then(e=>o.SemanticTokens.is(e)?r.protocol2CodeConverter.asSemanticTokens(e):r.protocol2CodeConverter.asSemanticTokensEdits(e),e=>r.handleFailedRequest(o.SemanticTokensDeltaRequest.type,e,null))};return i.provideDocumentSemanticTokensEdits?i.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};return r.sendRequest(o.SemanticTokensRangeRequest.type,i,n).then(e=>r.protocol2CodeConverter.asSemanticTokens(e),e=>r.handleFailedRequest(o.SemanticTokensRangeRequest.type,e,null))};return i.provideDocumentRangeSemanticTokens?i.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(r.languages.registerDocumentSemanticTokensProvider(e.documentSelector,a,l)),void 0!==c&&u.push(r.languages.registerDocumentRangeSemanticTokensProvider(e.documentSelector,c,l)),[new r.Disposable(()=>u.forEach(e=>e.dispose())),{range:c,full:a,onDidChangeSemanticTokensEmitter:i}]}}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 r=n(2),i=n(106),o=n(27),s=n(224);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,r,i){this._filters=new Map,this._client=e,this._event=t,this._registrationType=n,this._clientCapability=r,this._serverCapability=i}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,r=void 0!==n?(i=n,o=this._serverCapability,i[o]):void 0;var i,o;if(void 0!==(null==r?void 0:r.filters))try{this.register({id:s.generateUuid(),registerOptions:{filters:r.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 i.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),i=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(i)){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===r.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===r.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder){if(await u.getFileType(n)===r.FileType.Directory&&t.matcher.match(i+"/"))return!0}return!1})),i=e.files.filter((e,t)=>n[t]);return Object.assign(Object.assign({},e),{files:i})}static async getFileType(e){try{return(await r.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,r,i,o,s){super(e,t,n,r,i),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,r.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",e=>e,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didCreateFiles)?r.didCreateFiles(e,t):t(e)}};t.DidRenameFilesFeature=class extends l{constructor(e){super(e,r.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",e=>e.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didRenameFiles)?r.didRenameFiles(e,t):t(e)}};t.DidDeleteFilesFeature=class extends l{constructor(e){super(e,r.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",e=>e,e.code2ProtocolConverter.asDidDeleteFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didDeleteFiles)?r.didDeleteFiles(e,t):t(e)}};class d extends u{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i),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,r.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",e=>e,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willCreateFiles)?r.willCreateFiles(e,t):t(e)}};t.WillRenameFilesFeature=class extends d{constructor(e){super(e,r.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",e=>e.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willRenameFiles)?r.willRenameFiles(e,t):t(e)}};t.WillDeleteFilesFeature=class extends d{constructor(e){super(e,r.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",e=>e,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willDeleteFiles)?r.willDeleteFiles(e,t):t(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const r=n(2),i=n(27),o=n(54);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideLinkedEditingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.LinkedEditingRangeRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asLinkedEditingRanges,e=>r.handleFailedRequest(i.LinkedEditingRangeRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[r.languages.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}t.LinkedEditingFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const r=n(93),i=n(3),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=i.join(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(27),t),i(n(54),t),i(n(281),t)},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediLanguageClientFactory=void 0;const o=n(0),s=n(3),a=n(10),c=n(11);let u=class{constructor(e){this.interpreterService=e}async createLanguageClient(e,t,r){const i=s.join(a.EXTENSION_ROOT_DIR,"pythonFiles","run-jedi-language-server.py"),o=await this.interpreterService.getActiveInterpreter(e),c={command:o?o.path:"python",args:[i]};return new(n(83).LanguageClient)(a.PYTHON_LANGUAGE,"Python Tools",c,r)}};u=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IInterpreterService))],u),t.JediLanguageClientFactory=u},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediLanguageServerProxy=void 0,n(12);const s=n(0),a=n(83),c=n(1),u=n(8),l=n(9),d=n(295),h=n(296),p=n(21),f=n(297),g=n(5);let m=r=class{constructor(e,t){this.factory=e,this.interpreterPathService=t,this.disposables=[],this.disposed=!1}static versionTelemetryProps(e){return{lsVersion:e.lsVersion}}dispose(){var e;if(this.languageClient){const t=null===(e=this.languageClient._serverProcess)||void 0===e?void 0:e.pid,n=()=>{t&&(0,f.killPid)(t)};this.languageClient.stop().then(()=>n(),e=>{(0,g.traceError)("Stopping language client failed",e),n()}),this.languageClient=void 0}for(this.cancellationStrategy&&(this.cancellationStrategy.dispose(),this.cancellationStrategy=void 0);this.disposables.length>0;){this.disposables.shift().dispose()}this.disposed=!0}async start(e,t,n){var r;return this.languageClient?this.serverReady():(this.lsVersion=null!==(r=n.middleware?n.middleware.serverVersion:void 0)&&void 0!==r?r:"0.19.3",this.cancellationStrategy=new d.FileBasedCancellationStrategy,n.connectionOptions={cancellationStrategy:this.cancellationStrategy},this.languageClient=await this.factory.createLanguageClient(e,t,n),this.languageClient.onDidChangeState(e=>{e.newState===a.State.Running&&this.registerHandlers()}),this.disposables.push(this.languageClient.start()),await this.serverReady(),Promise.resolve())}loadExtension(){}async serverReady(){this.languageClient&&await this.languageClient.onReady()}registerHandlers(){if(this.disposed)return;const e=new h.ProgressReporting(this.languageClient);this.disposables.push(e),this.disposables.push(this.interpreterPathService.onDidChange(()=>{this.languageClient.sendNotification(a.DidChangeConfigurationNotification.type,{settings:null})}))}};i([(0,g.traceDecoratorVerbose)("Stopping language server")],m.prototype,"dispose",null),i([(0,g.traceDecoratorError)("Failed to start language server"),(0,u.captureTelemetry)(l.EventName.JEDI_LANGUAGE_SERVER_ENABLED,void 0,!0,void 0,r.versionTelemetryProps)],m.prototype,"start",null),i([(0,u.captureTelemetry)(l.EventName.JEDI_LANGUAGE_SERVER_READY,void 0,!0,void 0,r.versionTelemetryProps)],m.prototype,"serverReady",null),m=r=i([(0,s.injectable)(),o(0,(0,s.inject)(p.ILanguageClientFactory)),o(1,(0,s.inject)(c.IInterpreterPathService))],m),t.JediLanguageServerProxy=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(525))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(884);t.Observable=r.Observable},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediLanguageServerManager=void 0;const s=n(52),a=n(3);n(12);const c=n(0),u=n(4),l=n(53),d=n(81),h=n(15),p=n(8),f=n(9),g=n(299),m=n(300),v=n(21),y=n(5);let b=r=class{constructor(e,t,n){this.serviceContainer=e,this.analysisOptions=t,this.disposables=[],this.connected=!1,r.commandDispose&&r.commandDispose.dispose(),r.commandDispose=n.registerCommand(g.Commands.RestartLS,()=>{this.restartLanguageServer().ignoreErrors()})}static versionTelemetryProps(e){return{lsVersion:e.lsVersion}}dispose(){this.languageProxy&&this.languageProxy.dispose(),r.commandDispose.dispose(),this.disposables.forEach(e=>e.dispose())}get languageProxy(){return this.languageServerProxy}async start(e,t){if(this.languageProxy)throw new Error("Language server already started");this.resource=e,this.interpreter=t,this.analysisOptions.onDidChange(this.restartLanguageServerDebounced,this,this.disposables);try{const e=await s.readFile(a.join(d.EXTENSION_ROOT_DIR,"pythonFiles","jedilsp_requirements","requirements.txt"),"utf-8"),t=/jedi-language-server==([0-9\.]*)/.exec(e);t&&2===t.length&&([,this.lsVersion]=t)}catch(e){(0,y.traceVerbose)("Failed to get jedi-language-server version: ",e)}await this.analysisOptions.initialize(e,t),await this.startLanguageServer()}connect(){var e;this.connected=!0,null===(e=this.middleware)||void 0===e||e.connect()}disconnect(){var e;this.connected=!1,null===(e=this.middleware)||void 0===e||e.disconnect()}restartLanguageServerDebounced(){this.restartLanguageServer().ignoreErrors()}async restartLanguageServer(){this.languageProxy&&this.languageProxy.dispose(),await this.startLanguageServer()}async startLanguageServer(){this.languageServerProxy=this.serviceContainer.get(v.ILanguageServerProxy);const e=await this.analysisOptions.getAnalysisOptions();this.middleware=new m.LanguageClientMiddleware(this.serviceContainer,v.LanguageServerType.Jedi,this.lsVersion),e.middleware=this.middleware,this.connected&&this.middleware.connect(),await this.languageServerProxy.start(this.resource,this.interpreter,e)}};i([(0,y.traceDecoratorError)("Failed to start language server")],b.prototype,"start",null),i([(0,l.debounceSync)(1e3)],b.prototype,"restartLanguageServerDebounced",null),i([(0,y.traceDecoratorError)("Failed to restart language server"),(0,y.traceDecoratorVerbose)("Restarting language server")],b.prototype,"restartLanguageServer",null),i([(0,p.captureTelemetry)(f.EventName.JEDI_LANGUAGE_SERVER_STARTUP,void 0,!0,void 0,r.versionTelemetryProps),(0,y.traceDecoratorVerbose)("Starting language server")],b.prototype,"startLanguageServer",null),b=r=i([(0,c.injectable)(),o(0,(0,c.inject)(h.IServiceContainer)),o(1,(0,c.inject)(v.ILanguageServerAnalysisOptions)),o(1,(0,c.named)(v.LanguageServerType.Jedi)),o(2,(0,c.inject)(u.ICommandManager))],b),t.JediLanguageServerManager=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClientMiddlewareBase=void 0;const r=n(3),i=n(2),o=n(278),s=n(10),a=n(1),c=n(16),u=n(41),l=n(95),d=n(9),h=n(21);t.LanguageClientMiddlewareBase=class{constructor(e,t,n,r){this.serviceContainer=e,this.sendTelemetryEventFunc=n,this.serverVersion=r,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 r=this.serviceContainer.get(a.IConfigurationService),s=this.serviceContainer.get(l.IEnvironmentVariablesProvider);let u=n(e,t);if((0,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?i.Uri.parse(n.scopeUri):void 0;u[t].pythonPath=r.getSettings(e).pythonPath;const o=(await s.getEnvironmentVariables(e)).PYTHONPATH;o&&(u[t]._envPYTHONPATH=o)}return u}},this.connectedPromise=(0,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===h.LanguageServerType.Node?this.eventName=d.EventName.LANGUAGE_SERVER_REQUEST:t===h.LanguageServerType.Jedi&&(this.eventName=d.EventName.JEDI_LANGUAGE_SERVER_REQUEST)}get connected(){return this.connectedPromise.promise}connect(){this.connectedPromise.resolve(!0)}disconnect(){this.connectedPromise=(0,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?r.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,r,i){const o=Date.now(),s=new u.StopWatch;let a=!1;const l=[...r];l[l.length-1]=(...e)=>(a=!0,r[r.length-1](...e)),o>this.nextWindow&&(this.nextWindow=o+36e5,this.eventCount=0);const d=this.lastCaptured.get(e),h=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,"."),r={lsVersion:this.serverVersion||"unknown",method:t};let a=s.elapsedTime;i&&(a={duration:a,...i(this,n)}),this.sendTelemetryEventFunc(this.eventName,a,r)}return n},p=this.callNext(n,l);return(0,c.isThenable)(p)?p.then(h):h(p)}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=130)}([function(e,t){e.exports=n(2)},function(e,t,n){"use strict";e.exports=n(4)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(36);i(n(36),t),i(n(89),t),t.createProtocolConnection=function(e,t,n,r){return o.createMessageConnection(e,t,n,r)}},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 r=n(13);t.RegistrationType=class{constructor(e){this.method=e}};class i extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const o=n(32),s=n(51),a=n(16),c=n(52),u=n(0),l=n(10),d=n(35),h=n(6),p=n(128),f=n(49);var g,m,v,y,b,_;i(n(49),t),i(n(129),t),function(e){e.is=function(e){return l.string(e.command)}}(g||(g={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(m=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===m.socket&&l.number(t.port)}}(v||(v={})),function(e){e.is=function(e){return l.string(e.module)}}(y||(y={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(b||(b={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(_||(_={}));class S extends d.CommonLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,u;l.string(t)?(o=e,s=t,a=n,c=r,u=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,u=r),void 0===u&&(u=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=u;try{this.checkVersion()}catch(e){throw l.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=c.parse(u.version);if(!e)throw new Error("No valid VS Code version detected. Version string is: "+u.version);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!c.satisfies(e,"^1.52.0"))throw new Error("The language client requires VS Code version ^1.52.0 but received version "+u.version)}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}})}checkProcessDied(e){e&&setTimeout(()=>{try{process.kill(e.pid,0),p.terminate(e)}catch(e){}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;let n=Object.create(null);return Object.keys(process.env).forEach(e=>n[e]=process.env[e]),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach(t=>n[t]=e[t]),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function i(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}let s,a=this._serverOptions;if(l.func(a))return a().then(t=>{if(h.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(b.is(t))return this._isDetached=!!t.detached,{reader:new f.StreamMessageReader(t.reader),writer:new f.StreamMessageWriter(t.writer)};{let n;return _.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),{reader:new f.StreamMessageReader(n.stdout),writer:new f.StreamMessageWriter(n.stdin)}}});let c=a;return s=c.run||c.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some(e=>n.some(t=>e.startsWith(t))||r.some(t=>e===t))}()?c.debug:c.run:a,this._getServerWorkingDir(s.options).then(n=>{if(y.is(s)&&s.module){let r=s,a=r.transport||m.stdio;if(!r.runtime){let s=void 0;return new Promise((c,u)=>{let d=r.args&&r.args.slice()||[];a===m.ipc?d.push("--node-ipc"):a===m.stdio?d.push("--stdio"):a===m.pipe?(s=f.generateRandomPipeName(),d.push("--pipe="+s)):v.isSocket(a)&&d.push("--socket="+a.port),d.push("--clientProcessId="+process.pid.toString());let h=r.options||Object.create(null);if(h.env=t(h.env,!0),h.execArgv=h.execArgv||[],h.cwd=n,h.silent=!0,a===m.ipc||a===m.stdio){let t=o.fork(r.module,d||[],h);i(t),this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),c({reader:new f.IPCMessageReader(this._serverProcess),writer:new f.IPCMessageWriter(this._serverProcess)})):c({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})}else a===m.pipe?f.createClientPipeTransport(s).then(t=>{let n=o.fork(r.module,d||[],h);i(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})}):v.isSocket(a)&&f.createClientSocketTransport(a.port).then(t=>{let n=o.fork(r.module,d||[],h);i(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})})})}{let i=[],s=r.options||Object.create(null);s.execArgv&&s.execArgv.forEach(e=>i.push(e)),i.push(r.module),r.args&&r.args.forEach(e=>i.push(e));const c=Object.create(null);c.cwd=n,c.env=t(s.env,!1);const u=this._getRuntimePath(r.runtime,n);let d=void 0;if(a===m.ipc?(c.stdio=[null,null,null,"ipc"],i.push("--node-ipc")):a===m.stdio?i.push("--stdio"):a===m.pipe?(d=f.generateRandomPipeName(),i.push("--pipe="+d)):v.isSocket(a)&&i.push("--socket="+a.port),i.push("--clientProcessId="+process.pid.toString()),a===m.ipc||a===m.stdio){let t=o.spawn(u,i,c);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),Promise.resolve({reader:new f.IPCMessageReader(t),writer:new f.IPCMessageWriter(t)})):Promise.resolve({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})):Promise.reject(`Launching server using runtime ${u} failed.`)}if(a===m.pipe)return f.createClientPipeTransport(d).then(t=>{let n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)});if(v.isSocket(a))return f.createClientSocketTransport(a.port).then(t=>{let n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)})}}else if(g.is(s)&&s.command){let t=s,r=t.args||[],i=Object.assign({},t.options);i.cwd=i.cwd||n;let a=o.spawn(t.command,r,i);return a&&a.pid?(a.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),this._serverProcess=a,this._isDetached=!!i.detached,Promise.resolve({reader:new f.StreamMessageReader(a.stdout),writer:new f.StreamMessageWriter(a.stdin)})):Promise.reject(`Launching server using command ${t.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(a,null,4)))})}_getRuntimePath(e,t){if(a.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=a.join(n,e);if(s.existsSync(t))return t}if(void 0!==t){const n=a.join(t,e);if(s.existsSync(n))return n}return e}_mainGetRootPath(){let e=u.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(e=>{s.lstat(t,(n,r)=>{e(!n&&r.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}getLocale(){const e=process.env.VSCODE_NLS_CONFIG;if(void 0===e)return"en";let t=void 0;try{t=JSON.parse(e)}catch(e){}return void 0===t||"string"!=typeof t.locale?"en":t.locale}}t.LanguageClient=S,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return u.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new u.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?u.workspace.getConfiguration(t).get(n,!1):u.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}}},function(e,t,n){const r=n(18),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(17),{re:s,t:a}=n(11),c=n(19),{compareIdentifiers:u}=n(23);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=l},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 r=n(0),i=n(2),o=n(41),s=n(109),a=n(110),c=n(10),u=n(111),l=n(30),d=n(48);class h{error(e){i.RAL().console.error(e)}warn(e){i.RAL().console.warn(e)}info(e){i.RAL().console.info(e)}log(e){i.RAL().console.log(e)}}var p,f,g,m,v;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(p=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(f=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?p.Continue:p.Shutdown}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?f.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(r.window.showErrorMessage(`The ${this.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted.`),f.DoNotRestart):(this.restarts.shift(),f.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(g=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 b=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],_=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter],S=[i.SymbolTag.Deprecated];function E(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var P,w;!function(e){e.fromConfiguration=function(e){const t=r.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(P||(P={})),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}}(w||(w={}));class T{constructor(e,t,n,r,i,o){this._client=e,this._event=t,this._type=n,this._middleware=r,this._createParams=i,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t))return!0;return!1}register(e){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(r.languages.match(t,e))return{send:e=>{this.callback(e)}}}}class C extends T{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),T.textDocumentFilter),this._syncedDocuments=t}fillClientCapabilities(e){E(E(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 i.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;r.workspace.textDocuments.forEach(e=>{let n=e.uri.toString();if(!this._syncedDocuments.has(n)&&r.languages.match(t,e)){let t=this._client.clientOptions.middleware,r=e=>{this._client.sendNotification(this._type,this._createParams(e))};t.didOpen?t.didOpen(e,r):r(e),this._syncedDocuments.set(n,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class I extends T{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),T.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){E(E(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(r.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}})}}class R{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get registrationType(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){E(E(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.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(r.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===i.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===i.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new u.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))},-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}}}}class O extends T{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>T.textDocumentFilter(e,t.document))}get registrationType(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){E(E(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 i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){E(E(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=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(T.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class x extends T{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),T.textDocumentFilter),this._includeText=!1}get registrationType(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){E(E(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 k{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get registrationType(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){E(E(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&i.WatchKind.Create),o=0!=(n.kind&i.WatchKind.Change),s=0!=(n.kind&i.WatchKind.Delete));let a=r.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,r,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed}),null,o),r&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}}class A{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(i.TextDocumentRegistrationOptions.is(t)){const n=i.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),r=t.documentSelector||e;if(r)return[n,Object.assign({},t,{documentSelector:r})]}else if(c.boolean(t)&&!0===t||i.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&&r.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=A;class N extends A{constructor(e){super(e,i.CompletionRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[i.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[i.InsertTextMode.asIs,i.InsertTextMode.adjustIndentation]}},t.completionItemKind={valueSet:_}}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,r)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,r)=>o.sendRequest(i.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),r).then(o.protocol2CodeConverter.asCompletionResult,e=>o.handleFailedRequest(i.CompletionRequest.type,e,null));return s.provideCompletionItem?s.provideCompletionItem(e,t,r,n,a):a(e,t,r,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(i.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>n.handleFailedRequest(i.CompletionResolveRequest.type,t,e));return r.resolveCompletionItem?r.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[r.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class j extends A{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=E(E(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.HoverRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asHover,e=>r.handleFailedRequest(i.HoverRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[r.languages.registerHoverProvider(e.documentSelector,t),t]}}class M extends A{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.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,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),r).then(o.protocol2CodeConverter.asSignatureHelp,e=>o.handleFailedRequest(i.SignatureHelpRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,r,n,s):s(e,t,r,n)}};let n;if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,...i)}else{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=r.languages.registerSignatureHelpProvider(e.documentSelector,t,i)}return[n,t]}}class L extends A{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=E(E(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 r=this._client,o=(e,t,n)=>r.sendRequest(i.DefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.DefinitionRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class F extends A{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){E(E(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,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),r).then(o.protocol2CodeConverter.asReferences,e=>o.handleFailedRequest(i.ReferencesRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerReferenceProvider(e.documentSelector,t),t]}}class q extends A{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){E(E(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 r=this._client,o=(e,t,n)=>r.sendRequest(i.DocumentHighlightRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDocumentHighlights,e=>r.handleFailedRequest(i.DocumentHighlightRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class U extends A{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:b},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:S},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,r=(e,t)=>n.sendRequest(i.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return i.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>n.handleFailedRequest(i.DocumentSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,r):r(e,t)}},n=void 0!==e.label?{label:e.label}:void 0;return[r.languages.registerDocumentSymbolProvider(e.documentSelector,t,n),t]}}class W 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,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=E(E(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:b},t.tagSupport={valueSet:S}}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,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>n.handleFailedRequest(i.WorkspaceSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,r):r(e,t)}};return[r.languages.registerWorkspaceSymbolProvider(t),t]}}class B extends A{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=E(E(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[i.CodeActionKind.Empty,i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}},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,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(i.CodeActionRequest.type,s,r).then(e=>{if(null===e)return;const t=[];for(let n of e)i.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>o.handleFailedRequest(i.CodeActionRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,r,s):s(e,t,n,r)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(i.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeAction(e),t).then(n.protocol2CodeConverter.asCodeAction,t=>n.handleFailedRequest(i.CodeActionResolveRequest.type,t,e));return r.resolveCodeAction?r.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[r.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class V extends A{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){E(E(e,"textDocument"),"codeLens").dynamicRegistration=!0,E(E(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.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 r.EventEmitter,n={onDidChangeCodeLenses:t.event,provideCodeLenses:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>n.handleFailedRequest(i.CodeLensRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,r):r(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>n.handleFailedRequest(i.CodeLensResolveRequest.type,t,e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,r):r(e,t)}:void 0};return[r.languages.registerCodeLensProvider(e.documentSelector,n),{provider:n,onDidChangeCodeLensEmitter:t}]}}class H extends A{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){E(E(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 r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),options:r.code2ProtocolConverter.asFormattingOptions(t,P.fromConfiguration(e))};return r.sendRequest(i.DocumentFormattingRequest.type,o,n).then(r.protocol2CodeConverter.asTextEdits,e=>r.handleFailedRequest(i.DocumentFormattingRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class $ extends A{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){E(E(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,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,P.fromConfiguration(e))};return o.sendRequest(i.DocumentRangeFormattingRequest.type,s,r).then(o.protocol2CodeConverter.asTextEdits,e=>o.handleFailedRequest(i.DocumentRangeFormattingRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class G extends A{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){E(E(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,r,o)=>{const s=this._client,a=(e,t,n,r,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(r,P.fromConfiguration(e))};return s.sendRequest(i.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>s.handleFailedRequest(i.DocumentOnTypeFormattingRequest.type,e,null))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,r,o,a):a(e,t,n,r,o)}},n=e.moreTriggerCharacter||[];return[r.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class K extends A{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=E(E(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=i.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,r)=>{const o=this._client,s=(e,t,n,r)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(i.RenameRequest.type,s,r).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>o.handleFailedRequest(i.RenameRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,r,s):s(e,t,n,r)},prepareRename:e.prepareProvider?(e,t,n)=>{const r=this._client,o=(e,t,n)=>{let o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)};return r.sendRequest(i.PrepareRenameRequest.type,o,n).then(e=>i.Range.is(e)?r.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&i.Range.is(e.range)?{range:r.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>r.handleFailedRequest(i.PrepareRenameRequest.type,e,void 0))},s=r.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[r.languages.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){const t=e;return t&&c.boolean(t.defaultBehavior)}}class z extends A{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=E(E(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,r=(e,t)=>n.sendRequest(i.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>n.handleFailedRequest(i.DocumentLinkRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,r):r(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let r=(e,t)=>n.sendRequest(i.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>n.handleFailedRequest(i.DocumentLinkResolveRequest.type,t,e));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,r):r(e,t)}:void 0};return[r.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class Y{constructor(e){this._client=e,this._listeners=new Map}get registrationType(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){E(E(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=r.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&&!n.some(e=>t.affectsConfiguration(e)))return;let r=e=>{void 0!==e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,r):r(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e=0?r.workspace.getConfiguration(a.substr(0,c),n).get(a.substr(c+1)):r.workspace.getConfiguration(void 0,n).get(a),u){let n=e[s].split(".");t(i,n)[n[n.length-1]]=o.toJSONObject(u)}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class J{constructor(e){this._client=e,this._commands=new Map}get registrationType(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){E(E(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 r={command:e,arguments:n};return t.sendRequest(i.ExecuteCommandRequest.type,r).then(void 0,e=>t.handleFailedRequest(i.ExecuteCommandRequest.type,e,void 0))};if(e.registerOptions.commands){const t=[];for(const i of e.registerOptions.commands)t.push(r.commands.registerCommand(i,(...e)=>n.executeCommand?n.executeCommand(i,e,o):o(i,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&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class X{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 r;this._traceFormat=i.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||g.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||this.createDefaultErrorHandler(null===(r=n.connectionOptions)||void 0===r?void 0:r.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 X(e,t)}),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._trace=i.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(i.WorkDoneProgress.is(e)){const r=this._clientOptions.middleware.handleWorkDoneProgress;if(void 0!==r)return this._resolvedConnection.onProgress(e,t,e=>{r(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=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(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 i.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<=g.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<=g.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<=g.Error&&this.showNotificationMessage()}showNotificationMessage(){r.window.showInformationMessage("A request has failed. See the output for more information.","Go to output").then(()=>{this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(""+JSON.stringify(e))}needsStart(){return this.state===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 X(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection()),this.state=v.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case i.MessageType.Error:this.error(e.message,void 0,!1);break;case i.MessageType.Warning:this.warn(e.message,void 0,!1);break;case i.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:r.window.showInformationMessage(e.message);break;default:r.window.showInformationMessage(e.message)}}),e.onRequest(i.ShowMessageRequest.type,e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:t=r.window.showInformationMessage;break;default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.onRequest(i.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 r.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 r.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!0}}},i=null===(t=this._clientOptions.middleware.window)||void 0===t?void 0:t.showDocument;return void 0!==i?i(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),r.window.showErrorMessage("Couldn't start client "+this._name)}),new r.Disposable(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:null,clientInfo:{name:r.env.appName,version:r.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:c.func(t)?t():t,trace:i.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===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics(e=>this.handleDiagnostics(e)),e.onRequest(i.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(i.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(i.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t}).then(void 0,t=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))}):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===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 r(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 i=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null==i?void 0:i.didChangeWatchedFile)?i.didChangeWatchedFile(e,r):r(e)}forceDocumentSync(){void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(i.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),r=this.clientOptions.middleware;r.handleDiagnostics?r.handleDiagnostics(t,n,(e,t)=>this.setDiagnostics(e,t)):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(n=>function(e,t,n,r,o){let s=new h,a=i.createProtocolConnection(e,t,s,o);return a.onError(e=>{n(e[0],e[1],e[2])}),a.onClose(r),{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 r={sendNotification:!1,traceFormat:i.TraceFormat.Text};void 0===n?a.trace(e,t,r):(c.boolean(n),a.trace(e,t,n))},initialize:e=>a.sendRequest(i.InitializeRequest.type,e),shutdown:()=>a.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>a.sendNotification(i.ExitNotification.type),onLogMessage:e=>a.onNotification(i.LogMessageNotification.type,e),onShowMessage:e=>a.onNotification(i.ShowMessageNotification.type,e),onTelemetry:e=>a.onNotification(i.TelemetryEventNotification.type,e),didChangeConfiguration:e=>a.sendNotification(i.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>a.sendNotification(i.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>a.sendNotification(i.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>a.sendNotification(i.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>a.sendNotification(i.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>a.sendNotification(i.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>a.onNotification(i.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=f.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===f.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===f.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)===p.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){r.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=r.workspace.getConfiguration(this._id),o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=c.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),w.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 C(this,this._syncedDocuments)),this.registerFeature(new R(this)),this.registerFeature(new O(this)),this.registerFeature(new D(this)),this.registerFeature(new x(this)),this.registerFeature(new I(this,this._syncedDocuments)),this.registerFeature(new k(this,e=>this.notifyFileEvent(e))),this.registerFeature(new N(this)),this.registerFeature(new j(this)),this.registerFeature(new M(this)),this.registerFeature(new L(this)),this.registerFeature(new F(this)),this.registerFeature(new q(this)),this.registerFeature(new U(this)),this.registerFeature(new W(this)),this.registerFeature(new B(this)),this.registerFeature(new V(this)),this.registerFeature(new H(this)),this.registerFeature(new $(this)),this.registerFeature(new G(this)),this.registerFeature(new K(this)),this.registerFeature(new z(this)),this.registerFeature(new J(this))}fillInitializeParams(e){for(let t of this._features)c.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};E(e,"workspace").applyEdit=!0;const t=E(E(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=E(E(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[i.DiagnosticTag.Unnecessary,i.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const r=E(e,"window");E(r,"showMessage").messageActionItem={additionalPropertiesSupport:!0},E(r,"showDocument").support=!0;const o=E(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 r=t.registerOptions||{};r.documentSelector=r.documentSelector||this._clientOptions.documentSelector;const i={id:t.id,registerOptions:r};try{e.register(i)}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;r.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):c.asPromise(r.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}handleFailedRequest(e,t,n){if(t instanceof i.ResponseError){if(t.code===i.LSPErrorCodes.RequestCancelled)throw this.makeCancelError();if(t.code===i.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){const r=n(5);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,I(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e,u[l.COMPARATORTRIM]),e=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],p)).split(/\s+/).join(" ");const c=r?u[l.COMPARATORLOOSE]:u[l.COMPARATOR],g=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>C(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new s(e,this.options)),m=(g.length,new Map);for(const e of g){if(f(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const y=[...m.values()];return i.set(t,y),y}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>m(n,t)&&e.set.some(e=>m(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=P(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,(t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),y(n)?c="":y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c})},P=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map(e=>w(e,t)).join(" ")),w=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,(n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const u=y(i),l=u||y(o),d=l||y(s),h=d;return"="===r&&h&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n})},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),C=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),I=e=>(t,n,r,i,o,s,a,c,u,l,d,h,p)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:s?">="+n:`>=${n}${e?"-0":""}`} ${c=y(u)?"":y(l)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:"<="+c}`.trim(),R=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},function(e,t,n){"use strict";let r;function i(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(i||(i={})),t.default=i},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(17),i=n(18),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const u=(e,t,n)=>{const r=c++;i(r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),u("XRANGEIDENTIFIER",s[a.NUMERICIDENTIFIER]+"|x|X|\\*"),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,n){const{MAX_LENGTH:r}=n(17),{re:i,t:o}=n(11),s=n(5),a=n(19);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(79);o.default.install();const s=n(38),a=n(16),c=n(31),u=n(87),l=n(88);i(n(38),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),s.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=d;class h extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),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.IPCMessageWriter=h;class p extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=p;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const v=process.env.XDG_RUNTIME_DIR,y=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=u.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=v?a.join(v,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=y.get(process.platform);return void 0!==n&&t.length>=n&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((i,o)=>{let s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),i({onConnected:()=>r})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=l.createConnection(e);return[new p(n,t),new f(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((i,o)=>{const s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>r})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=l.createConnection(e,"127.0.0.1");return[new p(n,t),new f(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=s.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),s.createMessageConnection(i,o,n,r)}},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{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 r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),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){e.exports=n(3)},function(e,t){const n=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},function(e,t){const n=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:n.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>r(e,t,n)>0},function(e,t,n){const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&s||a||u}}e.exports=i;const o=n(19),{re:s,t:a}=n(11),c=n(34),u=n(18),l=n(5),d=n(8)},function(e,t,n){const r=n(8);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},function(e,t){const n=/^[0-9]+$/,r=(e,t)=>{const r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:er(t,e)}},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>0===r(e,t,n)},function(e,t,n){const r=n(5);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>r(e,t,n)<0},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>r(e,t,n)>=0},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>r(e,t,n)<=0},function(e,t,n){const r=n(5),i=n(21),{ANY:o}=i,s=n(8),a=n(22),c=n(20),u=n(26),l=n(28),d=n(27);e.exports=(e,t,n,h)=>{let p,f,g,m,v;switch(e=new r(e,h),t=new s(t,h),n){case">":p=c,f=l,g=u,m=">",v=">=";break;case"<":p=u,f=d,g=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)}),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},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 r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends r{constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}}function o(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return o().asHex()}},function(e,t){e.exports=n(37)},function(e,t){e.exports=n(93)},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>0!==r(e,t,n)},function(e,t,n){const r=n(24),i=n(33),o=n(20),s=n(27),a=n(26),c=n(28);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.CommonLanguageClient=void 0;const r=n(6),i=n(112),o=n(41),s=n(113),a=n(114),c=n(115),u=n(116),l=n(117),d=n(118),h=n(119),p=n(120),f=n(121),g=n(122),m=n(127);class v extends r.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 i.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 h.ProgressFeature(this)),this.registerFeature(new p.CallHierarchyFeature(this)),this.registerFeature(new f.SemanticTokensFeature(this)),this.registerFeature(new m.LinkedEditingFeature(this)),this.registerFeature(new g.DidCreateFilesFeature(this)),this.registerFeature(new g.DidRenameFilesFeature(this)),this.registerFeature(new g.DidDeleteFilesFeature(this)),this.registerFeature(new g.WillCreateFilesFeature(this)),this.registerFeature(new g.WillRenameFilesFeature(this)),this.registerFeature(new g.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";e.exports=n(13)},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 r=n(39);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(37);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=n(15);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(40);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(82);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(83);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(85);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(9);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 r=n(14);var i;!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}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){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&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9),i=n(14),o=n(15);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||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=r.default().timer.setTimeout(e.bind(t),0);return{dispose(){r.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 r=n(0),i=n(2);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(i.ConfigurationRequest.type,(t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.clientOptions.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)})}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=o(r.workspace.getConfiguration(void 0,e).get(t));else{let s=r.workspace.getConfiguration(t.substr(0,i),e);s&&(n=o(s.get(t.substr(i+1))))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=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 r=n(0);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);class i extends r.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const r=n(0),i=n(10);!function(e){e.is=function(e){const t=e;return null!=t&&(i.number(t.value)||i.string(t.value))&&i.string(t.target)}}(t.DiagnosticCode||(t.DiagnosticCode={}));class o extends r.Diagnostic{constructor(e,t,n,r){super(e,t,n),this.data=r,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0);class i extends r.CallHierarchyItem{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,o),void 0!==s&&(this.data=s)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const r=n(0),i=n(2),o=n(10);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(i.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}})}begin(e){r.window.withProgress({location:r.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(i.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})))}report(e){if(this._infinite&&o.string(e.message))this._progress.report({message:e.message});else if(o.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._progress.report({message:e.message,increment:n}),this._reported+=n}}cancel(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}}},function(e,t,n){"use strict";e.exports=n(2)},function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=56)}([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 r=n(7);t.RegistrationType=class{constructor(e){this.method=e}};class i extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=a},function(e,t,n){"use strict";(function(e){var r;n.d(t,"a",(function(){return i})),r=(()=>{var t={470:t=>{function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,r="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var i={resolve:function(){for(var t,i="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var a;s>=0?a=arguments[s]:(void 0===t&&(t=e.cwd()),a=t),n(a),0!==a.length&&(i=a+"/"+i,o=47===a.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;ru){if(47===t.charCodeAt(a+d))return t.slice(a+d+1);if(0===d)return t.slice(a+d)}else s>u&&(47===e.charCodeAt(r+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(r+d);if(h!==t.charCodeAt(a+d))break;47===h&&(l=d)}var p="";for(d=r+l+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(a+l):(a+=l,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){i=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===t.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=c))}return i===o?o=c:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(o=!1,i=a+1),46===c?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){r=a+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(t.base=t.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(t.name=e.slice(1,s),t.base=e.slice(1,c)):(t.name=e.slice(a,s),t.base=e.slice(a,c)),t.ext=e.slice(s,c)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i},447:(t,n,r)=>{var i;if(r.r(n),r.d(n,{URI:()=>m,Utils:()=>C}),"object"==typeof e)i="win32"===e.platform;else if("object"==typeof navigator){var o=navigator.userAgent;i=o.indexOf("Windows")>=0}var s,a,c=(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=/^\w[\w\d+.-]*$/,l=/^\//,d=/^\/\//;function h(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(d.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var p="",f="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,n,r,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||p,this.authority=e.authority||p,this.path=e.path||p,this.query=e.query||p,this.fragment=e.fragment||p):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||p,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==f&&(t=f+t):t=f}return t}(this.scheme,n||p),this.query=r||p,this.fragment=i||p,h(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return E(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=p),void 0===n?n=this.authority:null===n&&(n=p),void 0===r?r=this.path:null===r&&(r=p),void 0===i?i=this.query:null===i&&(i=p),void 0===o?o=this.fragment:null===o&&(o=p),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new y(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=g.exec(e);return n?new y(n[2]||p,T(n[4]||p),T(n[5]||p),T(n[7]||p),T(n[9]||p),t):new y(p,p,p,p,p)},e.file=function(e){var t=p;if(i&&(e=e.replace(/\\/g,f)),e[0]===f&&e[1]===f){var n=e.indexOf(f,2);-1===n?(t=e.substring(2),e=f):(t=e.substring(2,n),e=e.substring(n)||f)}return new y("file",t,e,p,p)},e.from=function(e){var t=new y(e.scheme,e.authority,e.path,e.query,e.fragment);return h(t,!0),t},e.prototype.toString=function(e){return void 0===e&&(e=!1),P(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new y(t);return n._formatted=t.external,n._fsPath=t._sep===v?t.fsPath:null,n}return t},e}(),v=i?1:void 0,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return c(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=E(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?P(this,!0):(this._formatted||(this._formatted=P(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=v),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(m),b=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function _(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=b[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function S(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,"\\")),n}function P(e,t){var n=t?S:_,r="",i=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=f,r+=f),o){var u=o.indexOf("@");if(-1!==u){var l=o.substr(0,u);o=o.substr(u+1),-1===(u=l.indexOf(":"))?r+=n(l,!1):(r+=n(l.substr(0,u),!1),r+=":",r+=n(l.substr(u+1),!1)),r+="@"}-1===(u=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,u),!1),r+=o.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/".concat(String.fromCharCode(d+32),":").concat(s.substr(3)));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s="".concat(String.fromCharCode(d+32),":").concat(s.substr(2)))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),c&&(r+="#",r+=t?c:_(c,!1)),r}var w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(w)?e.replace(w,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}var C,I=r(470),R=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(447)})();const{URI:i,Utils:o}=r}).call(this,n(15))},function(e,t,n){"use strict";let r;function i(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(i||(i={})),t.default=i},function(e,t,n){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var r=n(48),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(2);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{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 r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),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){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){var r=n(3).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(20).default.install();const o=n(12);i(n(12),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,r){return void 0===n&&(n=o.NullLogger),o.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),o.createMessageConnection(e,t,n,r)}},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;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,i="/"===s.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=n(r(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(r(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 r(e){for(var t=0;t=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 i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(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,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="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(15))},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 r=n(13);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(11);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=n(4);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(14);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(22);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(23);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(25);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(2);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 r=n(8);var i;!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}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){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&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(2),i=n(8),o=n(4);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||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=r.default().timer.setTimeout(e.bind(t),0);return{dispose(){r.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){var n,r,i=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{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],l=!1,d=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d1)for(var n=1;n>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,f=0|this._f,g=0|this._g,m=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+p(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=m+h(c)+u(c,f,g)+s[y]+n[y]|0,_=d(r)+l(r,i,o)|0;m=g,g=f,f=c,c=a+b|0,a=o,o=i,i=r,r=b+_|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,n){var r=n(5),i=n(6),o=n(3).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,y=0|this._gh,b=0|this._hh,_=0|this._al,S=0|this._bl,E=0|this._cl,P=0|this._dl,w=0|this._el,T=0|this._fl,C=0|this._gl,I=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var O=t[R-30],D=t[R-30+1],x=p(O,D),k=f(D,O),A=g(O=t[R-4],D=t[R-4+1]),N=m(D,O),j=t[R-14],M=t[R-14+1],L=t[R-32],F=t[R-32+1],q=k+M|0,U=x+j+v(q,k)|0;U=(U=U+A+v(q=q+N|0,N)|0)+L+v(q=q+F|0,F)|0,t[R]=U,t[R+1]=q}for(var W=0;W<160;W+=2){U=t[W],q=t[W+1];var B=l(n,r,i),V=l(_,S,E),H=d(n,_),$=d(_,n),G=h(a,w),K=h(w,a),z=s[W],Y=s[W+1],J=u(a,c,y),X=u(w,T,C),Q=I+K|0,Z=b+G+v(Q,I)|0;Z=(Z=(Z=Z+J+v(Q=Q+X|0,X)|0)+z+v(Q=Q+Y|0,Y)|0)+U+v(Q=Q+q|0,q)|0;var ee=$+V|0,te=H+B+v(ee,$)|0;b=y,I=C,y=c,C=T,c=a,T=w,a=o+Z+v(w=P+Q|0,P)|0,o=i,P=E,i=r,E=S,r=n,S=_,n=Z+te+v(_=Q+ee|0,Q)|0}this._al=this._al+_|0,this._bl=this._bl+S|0,this._cl=this._cl+E|0,this._dl=this._dl+P|0,this._el=this._el+w|0,this._fl=this._fl+T|0,this._gl=this._gl+C|0,this._hl=this._hl+I|0,this._ah=this._ah+n+v(this._al,_)|0,this._bh=this._bh+r+v(this._bl,S)|0,this._ch=this._ch+i+v(this._cl,E)|0,this._dh=this._dh+o+v(this._dl,P)|0,this._eh=this._eh+a+v(this._el,w)|0,this._fh=this._fh+c+v(this._fl,T)|0,this._gh=this._gh+y+v(this._gl,C)|0,this._hh=this._hh+b+v(this._hl,I)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(10);i(n(10),t),i(n(27),t),t.createProtocolConnection=function(e,t,n,r){return o.createMessageConnection(e,t,n,r)}},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(47),t.sha1=n(53),t.sha224=n(54),t.sha256=n(16),t.sha384=n(55),t.sha512=n(17)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2),i=n(11),o=n(4),s=n(21);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),i.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),i.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),i.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),i.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 h(){return d}!function(e){e.install=function(){r.default.install(d)}}(h||(h={})),t.default=h},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,r=0;e:for(;tthis._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 r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(2),i=n(8),o=n(4);var s;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class 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: "+(i.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,i;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&&(i=e.contentDecoder,o.set(i.name,i)),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=r.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:i,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=r.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&&(r.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=r.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 r=n(2),i=n(8),o=n(24),s=n(4);var a;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class 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: "+(i.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:r.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:r.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 r=n(2);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&&r.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 r=n(2),i=n(8),o=n(13),s=n(26),a=n(4),c=n(14);var u,l,d,h,p,f,g,m,v,y,b,_,S;!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 i.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"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=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 E extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E,function(e){e.is=function(e){const t=e;return t&&i.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&&i.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&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:b.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&b.is(t.sender)}}(_=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&(_.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"}(S||(S={})),t.createMessageConnection=function(e,n,v,y){const b=void 0!==v?v:t.NullLogger;let P=0,w=0,T=0,C=void 0;const I=Object.create(null);let R=void 0;const O=Object.create(null),D=new Map;let x,k,A=new s.LinkedMap,N=Object.create(null),j=Object.create(null),M=h.Off,L=p.Text,F=S.New;const q=new a.Emitter,U=new a.Emitter,W=new a.Emitter,B=new a.Emitter,V=new a.Emitter,H=y&&y.cancellationStrategy?y.cancellationStrategy:_.Message;function $(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 G(e){}function K(){return F===S.Listening}function z(){return F===S.Closed}function Y(){return F===S.Disposed}function J(){F!==S.New&&F!==S.Listening||(F=S.Closed,U.fire(void 0))}e.onClose(J),e.onError((function(e){q.fire([e,void 0,void 0])})),n.onClose(J),n.onError((function(e){q.fire(e)}));const X=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=$(e.params.id),r=A.get(t);if(o.isRequestMessage(r)){const i=null==y?void 0:y.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(r,G):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return A.delete(t),o.id=r.id,Q(o,e.method,Date.now()),void n.write(o)}}!function(e,t){var n;o.isRequestMessage(t)?e.set($(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++T).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}(A,e)}finally{!function e(){x||0===A.size||(x=r.default().timer.setImmediate(()=>{x=void 0,function(){if(0===A.size)return;const t=A.shift();try{o.isRequestMessage(t)?function(e){if(Y())return;function t(t,r,i){const s={jsonrpc:"2.0",id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,Q(s,r,i),n.write(s)}function r(t,r,i){const o={jsonrpc:"2.0",id:e.id,error:t.toJson()};Q(o,r,i),n.write(o)}!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.log(`Received request '${e.method} - (${e.id})'.`,t)}else Z("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||C){const s=String(e.id),l=H.receiver.createCancellationTokenSource(s);j[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(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 r(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 r(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 C&&(d=C(e.method,e.params,l.token));const h=d;d?h.then?h.then(n=>{delete j[s],t(n,e.method,u)},t=>{delete j[s],t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete j[s],t(d,e.method,u)):(delete j[s],function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:"2.0",id:e.id,result:t};Q(o,r,i),n.write(o)}(d,e.method,u))}catch(n){delete j[s],n instanceof o.ResponseError?t(n,e.method,u):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(t):o.isNotificationMessage(t)?function(e){if(Y())return;let t,n=void 0;if(e.method===u.type.method)t=e=>{const t=e.id,n=j[String(t)];n&&n.cancel()};else{const r=O[e.method];r&&(t=r.handler,n=r.type)}if(t||R)try{!function(e){if(M!==h.Off&&k&&e.method!==g.type.method)if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.log(`Received notification '${e.method}'.`,t)}else Z("receive-notification",e)}(e),t?void 0===e.params?(void 0!==n&&0!==n.numberOfParams&&n.parameterStructures!==o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${n.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==n&&(n.parameterStructures===o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),n.numberOfParams!==e.params.length&&b.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&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):R&&R(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(t):o.isResponseMessage(t)?function(e){if(!Y())if(null===e.id)e.error?b.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):b.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=N[t];if(function(e,t){if(M!==h.Off&&k)if(L===p.Text){let n=void 0;if(M===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else Z("receive-response",e)}(e,n),n){delete N[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?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(t):function(e){if(!e)return void b.error("Received empty message.");b.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),n=N[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(t)}finally{e()}}()}))}()}};function Q(e,t,n){if(M!==h.Off&&k)if(L===p.Text){let r=void 0;M===h.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Z("send-response",e)}function Z(e,t){if(!k||M===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}function ee(){if(z())throw new E(m.Closed,"Connection is closed.");if(Y())throw new E(m.Disposed,"Connection is disposed.")}function te(e){return void 0===e?null:e}function ne(e){return null===e?void 0:e}function re(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ie(e,t){switch(e){case o.ParameterStructures.auto:return re(t)?ne(t):[te(t)];case o.ParameterStructures.byName:if(!re(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ne(t);case o.ParameterStructures.byPosition:return[te(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function oe(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ie(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,s;if(ee(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const u=c-i;switch(u){case 0:s=void 0;break;case 1:s=ie(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map(e=>te(e))}}else{const n=t;r=e.method,s=oe(e,n)}const a={jsonrpc:"2.0",method:r,params:s};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.log(`Sending notification '${e.method}'.`,t)}else Z("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ee(),i.func(e)?R=e:t&&(i.string(e)?(n=e,O[e]={type:void 0,handler:t}):(n=e.method,O[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete O[n]:R=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)=>{se.sendNotification(l.type,{token:t,value:n})},onUnhandledProgress:B.event,sendRequest:(e,...t)=>{let r,s;ee(),function(){if(!K())throw new Error("Call listen() first.")}();let a=void 0;if(i.string(e)){r=e;const n=t[0],i=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(i)&&(d-=1,a=i);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=ie(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map(e=>te(e))}}else{const n=t;r=e.method,s=oe(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const u=P++;let l;return a&&(l=a.onCancellationRequested(()=>{H.sender.sendCancellation(se,u)})),new Promise((e,t)=>{const i={jsonrpc:"2.0",id:u,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),H.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),H.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Z("send-request",e)}(i);try{n.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(u)]=a)})},onRequest:(e,t)=>{ee();let n=null;return d.is(e)?(n=void 0,C=e):i.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]:C=void 0)}}},trace:(e,t,n)=>{let r=!1,o=p.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||p.Text)),M=e,L=o,k=M===h.Off?void 0:t,!r||z()||Y()||se.sendNotification(f.type,{value:h.toString(e)})},onError:q.event,onClose:U.event,onUnhandledNotification:W.event,onDispose:V.event,end:()=>{n.end()},dispose:()=>{if(Y())return;F=S.Disposed,V.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(N).forEach(e=>{N[e].reject(t)}),N=Object.create(null),j=Object.create(null),A=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ee(),function(){if(K())throw new E(m.AlreadyListening,"Connection is already listening")}(),F=S.Listening,e.listen(X)},inspect:()=>{r.default().console.log("inspect")}};return se.onNotification(g.type,e=>{M!==h.Off&&k&&k.log(e.message,M===h.Verbose?e.verbose:void 0)}),se.onNotification(l.type,e=>{const t=D.get(e.token);t?t(e.value):B.fire(e)}),se}},function(e,t,n){"use strict";var r;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}(r=t.Touch||(t.Touch={}));class i{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=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}[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===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,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=i,t.LRUCache=class extends i{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=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(7),t),i(n(28),t),i(n(0),t),i(n(29),t);var o=n(46);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 r,i,o,s,a,c,u,l,d,h,p,f,g,m,v,y,b,_,S,E,P,w,T,C,I,R;n.r(t),n.d(t,"integer",(function(){return r})),n.d(t,"uinteger",(function(){return i})),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 h})),n.d(t,"FoldingRange",(function(){return p})),n.d(t,"DiagnosticRelatedInformation",(function(){return f})),n.d(t,"DiagnosticSeverity",(function(){return g})),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 b})),n.d(t,"TextEdit",(function(){return _})),n.d(t,"ChangeAnnotation",(function(){return S})),n.d(t,"ChangeAnnotationIdentifier",(function(){return E})),n.d(t,"AnnotatedTextEdit",(function(){return P})),n.d(t,"TextDocumentEdit",(function(){return w})),n.d(t,"CreateFile",(function(){return T})),n.d(t,"RenameFile",(function(){return C})),n.d(t,"DeleteFile",(function(){return I})),n.d(t,"WorkspaceEdit",(function(){return R})),n.d(t,"WorkspaceChange",(function(){return ae})),n.d(t,"TextDocumentIdentifier",(function(){return O})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return D})),n.d(t,"OptionalVersionedTextDocumentIdentifier",(function(){return x})),n.d(t,"TextDocumentItem",(function(){return k})),n.d(t,"MarkupKind",(function(){return A})),n.d(t,"MarkupContent",(function(){return N})),n.d(t,"CompletionItemKind",(function(){return j})),n.d(t,"InsertTextFormat",(function(){return M})),n.d(t,"CompletionItemTag",(function(){return L})),n.d(t,"InsertReplaceEdit",(function(){return F})),n.d(t,"InsertTextMode",(function(){return q})),n.d(t,"CompletionItem",(function(){return U})),n.d(t,"CompletionList",(function(){return W})),n.d(t,"MarkedString",(function(){return B})),n.d(t,"Hover",(function(){return V})),n.d(t,"ParameterInformation",(function(){return H})),n.d(t,"SignatureInformation",(function(){return $})),n.d(t,"DocumentHighlightKind",(function(){return G})),n.d(t,"DocumentHighlight",(function(){return K})),n.d(t,"SymbolKind",(function(){return z})),n.d(t,"SymbolTag",(function(){return Y})),n.d(t,"SymbolInformation",(function(){return J})),n.d(t,"DocumentSymbol",(function(){return X})),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 re})),n.d(t,"SelectionRange",(function(){return ie})),n.d(t,"EOL",(function(){return ue})),n.d(t,"TextDocument",(function(){return ce})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.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,r){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return 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,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},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,r){return{red:e,green:t,blue:n,alpha:r}},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)||_.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,_.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(r)&&(o.endCharacter=r),le.defined(i)&&(o.kind=i),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))}}(p||(p={})),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)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),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,r,i,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(r)&&(s.code=r),le.defined(i)&&(s.source=i),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,f.is))}}(y||(y={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(b||(b={})),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)}}(_||(_={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},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)}}(S||(S={})),function(e){e.is=function(e){return"string"==typeof e}}(E||(E={})),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 _.is(t)&&(S.is(t.annotationId)||E.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&x.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},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||E.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.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)?T.is(e)||C.is(e)||I.is(e):w.is(e)})))}}(R||(R={}));var O,D,x,k,A,N,j,M,L,F,q,U,W,B,V,H,$,G,K,z,Y,J,X,Q,Z,ee,te,ne,re,ie,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=_.insert(e,t):E.is(n)?(i=n,r=P.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=_.replace(e,t):E.is(n)?(i=n,r=P.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=_.del(e):E.is(t)?(r=t,n=P.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=P.del(e,r)),this.edits.push(n),void 0!==r)return r},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(E.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(w.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 r=new oe(e.changes[n]);t._textEditChanges[n]=r}))):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(x.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new oe(i),this._textEditChanges[e]=r}return r},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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=T.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=T.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(S.is(n)||E.is(n)?i=n:r=n,void 0===i?o=C.create(e,t,r):(s=E.is(i)?i:this._changeAnnotations.manage(i),o=C.create(e,t,r,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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=I.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),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)}}(O||(O={})),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))}}(x||(x={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(k||(k={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(A||(A={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(A||(A={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&A.is(t.kind)&&le.string(t.value)}}(N||(N={})),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}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(L||(L={})),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)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(q||(q={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),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)}}(B||(B={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(N.is(t.contents)||B.is(t.contents)||le.typedArray(t.contents,B.is))&&(void 0===e.range||s.is(e.range))}}(V||(V={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(H||(H={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var s=r[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(ce||(ce={}));var le,de=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!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,r=0;r0&&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,r=t.length;if(0===r)return o.create(0,e);for(;ne?r=i:n=i+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],r=e.line+10}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||S.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new i.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new i.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new i.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new i.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new i.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 i.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new i.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new i.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 i.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 i.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new i.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 i.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new i.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new i.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 i.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 i.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new i.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new i.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new i.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new i.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(0);!function(e){e.method="textDocument/implementation",e.type=new r.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(0);!function(e){e.method="textDocument/typeDefinition",e.type=new r.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 r=n(0);!function(e){e.type=new r.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(0);!function(e){e.type=new r.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(0);!function(e){e.method="textDocument/documentColor",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new r.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 r=n(0);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new r.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(0);!function(e){e.method="textDocument/declaration",e.type=new r.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(0);!function(e){e.method="textDocument/selectionRange",e.type=new r.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 r=n(7),i=n(0);!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new i.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(0);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const r=n(0);!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 r.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(0);!function(e){e.method="window/showDocument",e.type=new r.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(0);!function(e){e.method="textDocument/linkedEditingRange",e.type=new r.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 r=n(0);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new r.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 r=n(0);!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 r.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(7);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),r.createMessageConnection(e,t,n,i)}},function(e,t,n){var r=n(5),i=n(6),o=n(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function l(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var h=0;h<80;++h){var p=~~(h/20),f=0|((t=r)<<5|t>>>27)+l(p,i,o,a)+c+n[h]+s[p];c=a,a=o,o=u(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var r=n(50),i=n(51),o=n(52);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;oa&&(n=a-c),o=n;o>=0;o--){for(var d=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function A(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||x(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||x(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||x(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||x(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||x(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||x(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||x(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||x(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||x(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||x(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(49))},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},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,d=a>0?s-4:s;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<>1,l=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=u}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=f,s/=256,u-=8);e[n+p-f]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(5),i=n(6),o=n(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function d(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=(t=n[h-3]^n[h-8]^n[h-14]^n[h-16])<<1|t>>>31;for(var p=0;p<80;++p){var f=~~(p/20),g=u(r)+d(f,i,o,a)+c+n[p]+s[f]|0;c=a,a=o,o=l(i),i=r,r=g}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,n){var r=n(5),i=n(16),o=n(6),s=n(3).Buffer,a=new Array(64);function c(){this.init(),this._w=a,o.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,n){var r=n(5),i=n(17),o=n(6),s=n(3).Buffer,a=new Array(160);function c(){this.init(),this._w=a,o.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,n){"use strict";n.r(t),n.d(t,"isNotebookCell",(function(){return o})),n.d(t,"getConcatDocumentRoot",(function(){return v})),n.d(t,"createConverter",(function(){return _}));var r=n(1),i=n(18);function o(e){return e.scheme.includes("vscode-notebook-cell")||e.scheme.includes("vscode-interactive-input")}function s(e){let t=e.split(/\r?\n/g);return t.slice(0,t.length-1)}var a=n(9),c=n(19);const u=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}(),l=/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g;function d(e,t){return{start:e,end:t}}function h(e,t){return{line:e,character:t}}function p(e,t){return{uri:e,range:t}}class f{constructor(e,t,n,r){this.cellUri=e,this._contents=t,this._line=n,this._offset=r,this._range=d(h(n,0),h(n,t.length)),this._rangeWithLineBreak=d(this.range.start,h(n,t.length+1))}get offset(){return this._offset}get endOffset(){return this._offset+this._contents.length+1}get lineNumber(){return this._line}get text(){return this._contents}get range(){return this._range}get rangeIncludingLineBreak(){return this._rangeWithLineBreak}get firstNonWhitespaceCharacterIndex(){return void 0===this._firstNonWhitespaceIndex&&(this._firstNonWhitespaceIndex=this._contents.trimLeft().length-this._contents.length),this._firstNonWhitespaceIndex}get isEmptyOrWhitespace(){return void 0===this._isEmpty&&(this._isEmpty=0===this._contents.length||0===this._contents.trim().length),this._isEmpty}}const g="import IPython\nIPython.get_ipython()\n",m=[{regex:/(^\s*%.*)/},{regex:/(^\s*!.*)/},{regex:/(^\s*await\s+.*)/}];function v(e){return a.dirname(e.fsPath)}class y{constructor(e,t){this.key=e,this.getNotebookHeader=t,this._interactiveWindow=!1,this._version=1,this._closed=!0,this._spans=[],this._lines=[],this._realLines=[]}get uri(){return this.concatUri}get fileName(){return this.uri.fsPath}get isUntitled(){return!0}get languageId(){return"python"}get version(){return this._version}get isDirty(){return!0}get isClosed(){return this._closed}get isOpen(){return!this.isClosed}get eol(){return 1}get notebook(){}get lineCount(){return this._lines.length}get concatUri(){return this._concatUri||r.a.parse("")}get notebookUri(){return this._notebookUri||r.a.parse("")}handleChange(e){this._version++;const t=[],n=this._spans.findIndex(t=>t.uri.toString()===e.textDocument.uri);if(n>=0)return e.contentChanges.forEach(r=>{try{const i=this._spans.filter(t=>t.uri.toString()===e.textDocument.uri),o=this._lines.filter(t=>t.cellUri.toString()===e.textDocument.uri),s=r.text.replace(/\r/g,""),a="range"in r?r.range:d(h(0,0),h(0,0)),c=this.getRealText(i[0].uri),u=this._realLines.filter(t=>t.cellUri.toString()===e.textDocument.uri),l=u[0].offset,p=u[a.start.line].offset+a.start.character-l,f=u[a.end.line].offset+a.end.character-l,g=`${c.slice(0,p)}${s}${c.slice(f)}`,m=this.createSpans(i[0].uri,g,i[0].startOffset,i[0].realOffset),v=m.map(e=>e.text).join(""),y=i.find(e=>!e.inRealCell&&!e.text.endsWith("\n")),b=m.find(e=>!e.inRealCell&&!e.text.endsWith("\n"));if(y||b||m.length!=i.length){const e=o[0].range.start,n={line:o.length,character:0};t.push({text:v,range:this.createSerializableRange(e,n),rangeLength:o[o.length-1].endOffset+1-o[0].offset})}else{const e=this.mapRealToConcatOffset(p+l),n=this.mapRealToConcatOffset(f+l),r=o.find(t=>e>=t.offset&&en>=e.offset&&n{var n;return(null===(n=t.uri)||void 0===n?void 0:n.toString())==e.textDocument.uri}))return;this._version=Math.max(e.textDocument.version,this._version+1),this._closed=!1,this.initialize(n);const i=e.textDocument.text.replace(/\r/g,"")+"\n",o="vscode-interactive-input"===n.scheme?-1:parseInt(n.fragment.substring(2)||"0"),s=t?this._spans.length:this.computeInsertionIndex(o),a=s=0?this._spans[s].startOffset:this.getEndOffset(),c=s=0?this._spans[s].realOffset:this.getRealEndOffset(),u=s=0?this._lines.find(e=>e.offset==a).range.start:h(this._lines.length,0),l=this.createSpans(n,i,a,c),d=l[l.length-1].endOffset-a,p=l[l.length-1].realEndOffset-c;for(let e=s;e<=this._spans.length-1;e+=1)this._spans[e].startOffset+=d,this._spans[e].endOffset+=d,this._spans[e].realOffset+=p,this._spans[e].realEndOffset+=p;this._spans.splice(s,0,...l),this.computeLines();const f=[{range:this.createSerializableRange(u,u),rangeOffset:a,rangeLength:0,text:l.map(e=>e.text).join("")}];return this.toDidChangeTextDocumentParams(f)}handleClose(e){const t=this._spans.findIndex(t=>t.uri.toString()===e.textDocument.uri),n=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}(this._spans,t=>t.uri.toString()===e.textDocument.uri);if(this.initialize(r.a.parse(e.textDocument.uri)),t>=0&&n>=0&&!this._interactiveWindow){this._version+=1;const r=this._spans[t].startOffset,i=this._spans[n].endOffset,o=this._lines.find(e=>e.offset==r).range.start,s=this._lines.find(e=>e.endOffset==i).range.end,a=i-r;this._spans=this._spans.filter(t=>t.uri.toString()!==e.textDocument.uri);for(let e=t;e0?this._lines[this._lines.length-1].rangeIncludingLineBreak.end:t,r=this.getEndOffset(),i=this.getRealText();if(e.cells.map(e=>e.textDocument.text.replace(/\r/g,"")).join("\n")+"\n"!=i){this._version++,this._closed=!1,this._spans=[],this._lines=[],this._realLines=[],this._concatUri=void 0,e.cells.forEach(e=>{this.handleOpen({textDocument:e.textDocument},!0)});const i=[{range:this.createSerializableRange(t,n),rangeOffset:0,rangeLength:r,text:this.getContents()}];return this.toDidChangeTextDocumentParams(i)}}}dispose(){}contains(e){return void 0!==this._spans.find(t=>t.uri.toString()===e.toString())}save(){return Promise.resolve(!1)}lineAt(e){return"number"==typeof e?this._lines[e]:this._lines[e.line]}offsetAt(e){throw new Error("offsetAt should not be used on concat document. Use a more specific offset computation")}positionAt(e){throw new Error("positionAt should not be used on concat document. Use a more specific position computation")}getText(e){const t=this.getContents();if(e){const n=this._lines[e.start.line].offset+e.start.character,r=this._lines[e.end.line].offset+e.end.character;return t.substring(n,r-n)}return t}concatPositionAt(e){const t=this._realLines.find(t=>t.cellUri.toString()===e.uri.toString());if(t){const n=this._realLines[e.range.start.line+t.lineNumber],r=this.mapRealToConcatOffset(n.offset+e.range.start.character),i=this._lines.find(e=>r>=e.offset&&rt.cellUri.toString()===e.uri.toString());if(t){const n=this._realLines[e.range.start.line+t.lineNumber];return this.mapRealToConcatOffset(n.offset+e.range.start.character)}return 0}concatRangeOf(e){const t=this._lines.filter(t=>t.cellUri.toString()===e.toString()),n=t[0],r=t[t.length-1];return n&&r?d(n.range.start,r.rangeIncludingLineBreak.end):d(h(0,0),h(0,0))}realRangeOf(e){const t=this._spans.filter(t=>t.uri.toString()==e.toString()&&t.inRealCell),n=t[0].startOffset||0,r=t.length>0?t[t.length-1].endOffset:n,i=this._lines.find(e=>n>=e.offset&&nr>=e.offset&&r<=e.endOffset);return i&&o?d(i.range.start,o.rangeIncludingLineBreak.end):d(h(0,0),h(0,0))}getCells(){return[...new Set(this._spans.map(e=>e.uri))]}notebookLocationAt(e){const t="line"in e?d(e,e):e;let n=this._lines[t.start.line],r=this._lines[t.end.line];if(n&&r){let e=n.offset+t.start.character,i=r.offset+t.end.character;const o=this._spans.filter(t=>t.inRealCell&&(e>=t.startOffset&&e=t.startOffset&&i<=t.endOffset));if(e=o.length>0?Math.max(e,o[0].startOffset):-1,n=this._lines.find(t=>e>=t.offset&&en>=e.offset&&ne.cellUri.toString()===(null==r?void 0:r.cellUri.toString()));return h(i&&r?r.lineNumber-i.lineNumber:0,this.mapConcatToClosestRealOffset(t+e.character)-((null==r?void 0:r.offset)||0))}notebookOffsetAt(e,t){const n=this.mapConcatToClosestRealOffset(t),r=this._spans.find(t=>t.uri.toString()===e.toString());return r?n-r.realOffset:n}getWordRangeAtPosition(e,t){t?function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}(t)&&(console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${t.source}' because it matches the empty string.`),t=l):t=l;const n=function(e,t,n,r){t.lastIndex=0;const i=t.exec(n);if(!i)return null;const o=i[0].indexOf(" ")>=0?function(e,t,n,r){const i=e-1-0;t.lastIndex=0;let o=t.exec(n);for(;o;){const e=o.index||0;if(e>i)return null;if(t.lastIndex>=i)return{word:o[0],startColumn:1+e,endColumn:1+t.lastIndex};o=t.exec(n)}return null}(e,t,n):function(e,t,n,r){const i=e-1-0,o=n.lastIndexOf(" ",i-1)+1;t.lastIndex=o;let s=t.exec(n);for(;s;){const e=s.index||0;if(e<=i&&t.lastIndex>=i)return{word:s[0],startColumn:1+e,endColumn:1+t.lastIndex};s=t.exec(n)}return null}(e,t,n);return t.lastIndex=0,o}(e.character+1,function(e){let t=u;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}(t),this._lines[e.line].text);if(n)return d(h(e.line,n.startColumn-1),h(e.line,n.endColumn-1))}validateRange(e){return e}validatePosition(e){return e}get textDocumentItem(){return{uri:this.concatUri.toString(),languageId:this.languageId,version:this.version,text:this.getText()}}get textDocumentId(){return{uri:this.concatUri.toString(),version:this.version}}getContents(){return this._spans.map(e=>e.text).join("")}toDidChangeTextDocumentParams(e){return{textDocument:{version:this.version,uri:this.concatUri.toString()},contentChanges:e}}mapRealToConcatOffset(e){const t=this._spans.find(t=>t.inRealCell&&e>=t.realOffset&&ee>=t.startOffset&&e{m.find(e=>e.regex.test(r))?(o.push(this.createSpan(e,t.substring(c,u+r.length),t.substring(c,u+r.length),n,c+a)),n=o[o.length-1].endOffset,u+=r.length,c=u,o.push(this.createTypeIgnoreSpan(e,n,c+a)),n=o[o.length-1].endOffset,u+=1):u+=r.length+1}),ct.inRealCell&&t.uri.toString()===e.toString()).map(e=>e.realText).join(""):this._spans.filter(e=>e.inRealCell).map(e=>e.realText).join("")}createTextLines(e,t,n){return s(t).map(t=>{const r=this.createTextLine(e,t,n);return n=r,r})}computeLinesUsingFunc(e,t){const n=[];let r;return e.forEach(e=>{const i=this._spans.filter(t=>t.uri.toString()==e.toString()).map(t).join("");n.push(...this.createTextLines(e,i,r)),r=n[n.length-1]}),n}computeLines(){const e=this.getCells();this._lines=this.computeLinesUsingFunc(e,e=>e.text),this._realLines=this.computeLinesUsingFunc(e,e=>e.realText)}createTextLine(e,t,n){return new f(e,t,n?n.lineNumber+1:0,n?n.offset+n.rangeIncludingLineBreak.end.character:0)}getEndOffset(){return this._spans.length>0?this._spans[this._spans.length-1].endOffset:0}getRealEndOffset(){return this._spans.length>0?this._spans[this._spans.length-1].realEndOffset:0}createSerializableRange(e,t){return{start:{line:e.line,character:e.character},end:{line:t.line,character:t.character}}}computeInsertionIndex(e){var t,n;const r="vscode-interactive-input"===(null===(n=null===(t=this._spans[this._spans.length-1])||void 0===t?void 0:t.uri)||void 0===n?void 0:n.scheme)?this._spans.length-1:this._spans.length,i=-1==e?this._spans.length:this._spans.findIndex(t=>t.fragment>e);return i<0?r:i}initialize(e){var t;if(!(null===(t=this._concatUri)||void 0===t?void 0:t.fsPath)){this._interactiveWindow=function(e){return e.fragment.includes("vscode-interactive")||e.scheme.includes("vscode-interactive-input")||e.scheme.includes("vscode-interactive")}(e);const t=v(e),n=a.join(t,`_NotebookConcat_${c("sha1").update(e.fsPath).digest("hex").substring(0,12)}.py`);this._concatUri=r.a.file(n),this._notebookUri=this._interactiveWindow?e.with({scheme:"vscode-interactive",path:e.fsPath,fragment:""}):e.fragment.includes("untitled")?e.with({scheme:"untitled",path:e.fsPath,fragment:"",query:""}):r.a.file(e.fsPath)}}}class b{constructor(e,t){this.getNotebookHeader=e,this.platformGetter=t,this.activeConcats=new Map,this.activeConcatsOutgoingMap=new Map,this.disposables=[],this.mapOfConcatDocumentsWithCellUris=new Map}getDocumentKey(e){if("vscode-interactive-input"===e.scheme){const t=/InteractiveInput-(\d+)/.exec(e.path);if(t&&t[1])return`interactive-${t[1]}.interactive`}return"vscode-interactive"===e.scheme?e.path.toLowerCase():"win32"===this.platformGetter()?e.fsPath.toLowerCase():e.fsPath}dispose(){this.disposables.forEach(e=>e.dispose())}hasCell(e){return this.getConcatDocument(e).contains(e.uri)}isOpen(e){const t=this.toURI(e),n=this.getDocumentKey(t),r=this.activeConcats.get(n);return!!r&&r.isOpen}handleOpen(e){const t=this.getConcatDocument(e.textDocument),n=null==t?void 0:t.handleOpen(e);return this.activeConcatsOutgoingMap.set(this.getDocumentKey(t.concatUri),t),n}handleRefresh(e){const t=e.cells.length?this.getConcatDocument(e.cells[0].textDocument):void 0;return null==t?void 0:t.handleRefresh(e)}handleClose(e){return this.getConcatDocument(e.textDocument.uri).handleClose(e)}handleChange(e){return this.getConcatDocument(e.textDocument.uri).handleChange(e)}toNotebookDiagnosticsMap(e,t){const n=this.getConcatDocumentForUri(e),i=new Map;if(n){const o=[],s=this.mapOfConcatDocumentsWithCellUris.get(e.toString())||[];n.getCells().forEach(e=>{i.set(e.toString(),[]),o.push(e.toString())});const a=new Set(o);s.filter(e=>!a.has(e)).forEach(e=>i.set(e,[])),this.mapOfConcatDocumentsWithCellUris.set(e.toString(),o),t.forEach(e=>{const t=n.notebookLocationAt(e.range);if(r.a.parse(t.uri).fragment){let n=i.get(t.uri);n||(n=[],i.set(t.uri,n)),n.push(this.toNotebookDiagnostic(t.uri,e))}})}else this.mapOfConcatDocumentsWithCellUris.has(e.toString())?((this.mapOfConcatDocumentsWithCellUris.get(e.toString())||[]).forEach(e=>i.set(e,[])),this.mapOfConcatDocumentsWithCellUris.delete(e.toString())):i.set(this.toURI(e).toString(),t);return i}toNotebookWorkspaceSymbols(e){return Array.isArray(e)?e.map(this.toNotebookWorkspaceSymbol.bind(this)):null!=e?e:void 0}toNotebookWorkspaceEdit(e){if(e){const t=new Map;(e.changes?Object.keys(e.changes):[]).forEach(n=>{e.changes[n].forEach(e=>{const r=this.toNotebookLocationFromRange(n,e.range);let i=t.get(r.uri);i||(i=[],t.set(r.uri,i)),i.push({...e,range:r.range})})});const n={changes:{}};return t.forEach((e,t)=>n.changes[t]=e),n}return null!=e?e:void 0}toConcatDocument(e){const t=this.getConcatDocument(e);return{text:t.getText(),uri:t.uri.toString(),languageId:t.languageId,version:t.version}}toConcatTextDocument(e){return this.getConcatDocument(e)}toConcatUri(e){return this.getConcatDocument(e).concatUri.toString()}toConcatPosition(e,t){return this.getConcatDocument(e).concatPositionAt(p(e.uri,d(t,t)))}toConcatPositions(e,t){return t.map(t=>this.toConcatPosition(e,t))}toConcatRange(e,t){const n=this.getConcatDocument(e),r=this.toURI(e);return n.concatRangeOf(r)||t||d(h(0,0),h(0,0))}toRealRange(e,t){const n=this.getConcatDocument(e),r=this.toURI(e);return n.realRangeOf(r)||t||d(h(0,0),h(0,0))}toConcatContext(e,t){return{...t,diagnostics:t.diagnostics.map(this.toConcatDiagnostic.bind(this,e))}}toNotebookHover(e,t){return t&&t.range?{...t,range:this.toNotebookRange(e,t.range)}:null!=t?t:void 0}toNotebookCompletions(e,t){return t?Array.isArray(t)?t.map(this.toNotebookCompletion.bind(this,e)):{...t,items:t.items.map(this.toNotebookCompletion.bind(this,e))}:t}toNotebookLocations(e){return Array.isArray(e)?e.map(this.toNotebookLocationOrLink.bind(this)):(null==e?void 0:e.range)?this.toNotebookRange(e.uri,e.range):e}toNotebookHighlight(e,t){if(!t)return;const n=this.getConcatDocument(e),r=[];for(let i of t){const t=n.notebookLocationAt(i.range);t.uri.toString()===e.uri.toString()&&r.push({...i,range:t.range})}return r}toNotebookSymbols(e,t){return t&&Array.isArray(t)&&t.length?"kind"in t[0]?t.map(this.toNotebookSymbolFromSymbolInformation.bind(this,e.uri)):t.map(this.toNotebookSymbolFromDocumentSymbol.bind(this,e)):null!=t?t:void 0}toNotebookSymbolFromSymbolInformation(e,t){return{...t,location:this.toNotebookLocationFromRange(e,t.location.range)}}toNotebookDiagnostic(e,t){return{...t,range:this.toNotebookRange(e,t.range),relatedInformation:t.relatedInformation?t.relatedInformation.map(this.toNotebookRelatedInformation.bind(this,e)):void 0}}toNotebookActions(e,t){if(!Array.isArray(t))return null!=t?t:void 0}toNotebookCodeLenses(e,t){return Array.isArray(t)?t.map(t=>({...t,range:this.toNotebookRange(e,t.range)})):null!=t?t:void 0}toNotebookEdits(e,t){return Array.isArray(t)?t.map(t=>({...t,range:this.toNotebookRange(e,t.range)})):null!=t?t:void 0}toNotebookRename(e,t){return t?"range"in t?{...t,range:this.toNotebookRange(e,t.range)}:this.toNotebookRange(e,t):null!=t?t:void 0}toNotebookDocumentLinks(e,t){return t&&Array.isArray(t)?t.map(t=>{const n=t.target?t.target:e.uri,r=this.toNotebookLocationFromRange(n,t.range);return{...t,range:r.range,target:t.target?r.uri:void 0}}):null!=t?t:void 0}toNotebookRange(e,t){const n=this.getConcatDocumentForUri(e);if(n){const e=n.notebookLocationAt(t.start),r=n.notebookLocationAt(t.end);return d(e.range.start,r.range.end)}return t}toNotebookPosition(e,t){return this.toNotebookRange(e,d(t,t)).start}toNotebookOffset(e,t){const n=this.toURI(e);return this.getConcatDocument(e).notebookOffsetAt(n,t)}toNotebookUri(e,t){const n=this.getConcatDocumentForUri(e);let r;return n&&(r=t?n.notebookLocationAt(t).uri:n.notebookUri.toString()),r||e}toNotebookColorInformations(e,t){if(Array.isArray(t)){const n=this.toURI(e);return t.map(t=>({color:t.color,location:this.toNotebookLocationFromRange(e,t.range)})).filter(e=>r.a.parse(e.location.uri).fragment==n.fragment).map(e=>({color:e.color,range:e.location.range}))}}toNotebookColorPresentations(e,t){if(Array.isArray(t))return t.map(t=>({...t,additionalTextEdits:t.additionalTextEdits?this.toNotebookTextEdits(e,t.additionalTextEdits):void 0,textEdit:t.textEdit?this.toNotebookTextEdit(e,t.textEdit):void 0}))}toNotebookTextEdits(e,t){if(Array.isArray(t))return t.map(t=>this.toNotebookTextEdit(e,t))}toNotebookTextEdit(e,t){return{...t,range:this.toNotebookRange(e,t.range)}}toNotebookFoldingRanges(e,t){if(Array.isArray(t)){const n=this.toURI(e);return t.map(t=>this.toNotebookLocationFromRange(e,d(h(t.startLine,0),h(t.endLine,0)))).filter(e=>e.uri==n.toString()).map(e=>({startLine:e.range.start.line,endLine:e.range.end.line}))}}toNotebookSelectionRanges(e,t){if(Array.isArray(t))return t.map(t=>this.toNotebookSelectionRange(e,t))}toNotebookSelectionRange(e,t){return{parent:t.parent?this.toNotebookSelectionRange(e,t.parent):void 0,range:this.toNotebookRange(e,t.range)}}toNotebookCallHierarchyItems(e,t){return Array.isArray(t)?t.map(t=>this.toNotebookCallHierarchyItem(e,t)):t?[this.toNotebookCallHierarchyItem(e,t)]:null}toNotebookCallHierarchyItem(e,t){return{...t,uri:this.toURI(e).toString(),range:this.toNotebookRange(e,t.range),selectionRange:this.toNotebookRange(e,t.selectionRange)}}toNotebookCallHierarchyIncomingCallItems(e,t){return Array.isArray(t)?t.map(t=>this.toNotebookCallHierarchyIncomingCallItem(e,t)):null}toNotebookCallHierarchyIncomingCallItem(e,t){return{from:this.toNotebookCallHierarchyItem(e,t.from),fromRanges:t.fromRanges.map(t=>this.toNotebookRange(e,t))}}toNotebookCallHierarchyOutgoingCallItems(e,t){return Array.isArray(t)?t.map(t=>this.toNotebookCallHierarchyOutgoingCallItem(e,t)):null}toNotebookCallHierarchyOutgoingCallItem(e,t){return{to:this.toNotebookCallHierarchyItem(e,t.to),fromRanges:t.fromRanges.map(t=>this.toNotebookRange(e,t))}}toNotebookSemanticEdit(e,t){return{...t,start:this.toNotebookOffset(e,t.start)}}toNotebookSemanticTokens(e,t){if(t){const n=this.getConcatDocument(e),r=this.toURI(e);if(n&&t.data.length>0){const e=n.concatPositionAt(p(r.toString(),d(h(0,0),h(0,0))));return t.data[0]=t.data[0]-e.line,t}}}toNotebookLinkedEditingRanges(e,t){if(t)return{...t,ranges:t.ranges.map(t=>this.toNotebookRange(e,t))}}remove(e){const t=this.toURI(e),n=this.getDocumentKey(t),r=this.activeConcats.get(n);r&&this.deleteConcatDocument(r)}toURI(e){return r.a.isUri(e)?e:"string"==typeof e?r.a.parse(e):r.a.parse(e.uri)}toNotebookWorkspaceSymbol(e){return this.toNotebookSymbolFromSymbolInformation(e.location.uri,e)}toConcatDiagnostic(e,t){return{...t,range:this.toConcatRange(e,t.range),relatedInformation:t.relatedInformation?t.relatedInformation.map(this.toConcatRelatedInformation.bind(this,e)):void 0}}toConcatRelatedInformation(e,t){const n=this.toConcatDocument(e);return{...t,location:t.location.uri===n.uri?this.toConcatLocation(e,t.location):t.location}}toConcatLocation(e,t){return{uri:this.toConcatDocument(e).uri,range:this.toConcatRange(e,t.range)}}toNotebookRelatedInformation(e,t){const n=this.toConcatUri(e);return{...t,location:t.location.uri===n?this.toNotebookLocationFromLocation(t.location):t.location}}toNotebookSymbolFromDocumentSymbol(e,t){return t.children?{...t,range:this.toNotebookRange(e,t.range),selectionRange:this.toNotebookRange(e,t.selectionRange),children:t.children.map(this.toNotebookSymbolFromDocumentSymbol.bind(this,e))}:{...t,range:this.toNotebookRange(e,t.range),selectionRange:this.toNotebookRange(e,t.selectionRange)}}toNotebookLocationFromLocation(e){const t=this.toNotebookUri(e.uri,e.range);return{uri:t,range:this.toNotebookRange(t,e.range)}}toNotebookLocationLinkFromLocationLink(e){const t=this.toNotebookUri(e.targetUri,e.targetRange);return{originSelectionRange:e.originSelectionRange?this.toNotebookRange(t,e.originSelectionRange):void 0,targetUri:t,targetRange:this.toNotebookRange(t,e.targetRange),targetSelectionRange:this.toNotebookRange(t,e.targetSelectionRange)}}toNotebookLocationOrLink(e){return"targetUri"in e?this.toNotebookLocationLinkFromLocationLink(e):this.toNotebookLocationFromLocation(e)}toNotebookCompletion(e,t){const n=t;return n.range?n.range.inserting?{...t,range:{inserting:this.toNotebookRange(e,n.range.inserting),replacing:this.toNotebookRange(e,n.range.replacing)}}:{...t,range:this.toNotebookRange(e,n.range)}:t}toNotebookLocationFromRange(e,t){const n=this.getConcatDocumentForUri(e);if(n){const e=n.notebookLocationAt(t.start),r=n.notebookLocationAt(t.end);return{uri:e.uri,range:d(e.range.start,r.range.end)}}return{uri:i.TextDocumentIdentifier.is(e)?e.uri:e,range:t}}deleteConcatDocument(e){this.activeConcatsOutgoingMap.delete(this.getDocumentKey(e.concatUri)),this.activeConcats.delete(e.key),e.dispose()}getConcatDocumentForUri(e){const t=this.toURI(e);return o(t)?this.getConcatDocument(t):this.getConcatFromOutgoingUri(t)}getConcatFromOutgoingUri(e){const t=this.toURI(e);return this.activeConcatsOutgoingMap.get(this.getDocumentKey(t))}getConcatDocument(e){const t=this.toURI(e),n=this.getDocumentKey(t);let r=this.activeConcats.get(n);return r||(r=new y(n,this.getNotebookHeader),this.activeConcats.set(n,r)),r}}function _(e,t){return new b(e,t)}}])},function(e,t){e.exports=n(26)},function(e,t,n){const r=n(11);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(17).SEMVER_SPEC_VERSION,SemVer:n(5),compareIdentifiers:n(23).compareIdentifiers,rcompareIdentifiers:n(23).rcompareIdentifiers,parse:n(12),valid:n(53),clean:n(54),inc:n(55),diff:n(56),major:n(57),minor:n(58),patch:n(59),prerelease:n(60),compare:n(7),rcompare:n(61),compareLoose:n(62),compareBuild:n(25),sort:n(63),rsort:n(64),gt:n(20),lt:n(26),eq:n(24),neq:n(33),gte:n(27),lte:n(28),cmp:n(34),coerce:n(65),Comparator:n(21),Range:n(8),satisfies:n(22),toComparators:n(69),maxSatisfying:n(70),minSatisfying:n(71),minVersion:n(72),validRange:n(73),outside:n(29),gtr:n(74),ltr:n(75),intersects:n(76),simplifyRange:n(77),subset:n(78)}},function(e,t,n){const r=n(12);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){const r=n(12);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){const r=n(5);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},function(e,t,n){const r=n(12),i=n(24);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),o=n.prerelease.length||i.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return s+e;return a}}},function(e,t,n){const r=n(5);e.exports=(e,t)=>new r(e,t).major},function(e,t,n){const r=n(5);e.exports=(e,t)=>new r(e,t).minor},function(e,t,n){const r=n(5);e.exports=(e,t)=>new r(e,t).patch},function(e,t,n){const r=n(12);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){const r=n(7);e.exports=(e,t,n)=>r(t,e,n)},function(e,t,n){const r=n(7);e.exports=(e,t)=>r(e,t,!0)},function(e,t,n){const r=n(25);e.exports=(e,t)=>e.sort((e,n)=>r(e,n,t))},function(e,t,n){const r=n(25);e.exports=(e,t)=>e.sort((e,n)=>r(n,e,t))},function(e,t,n){const r=n(5),i=n(12),{re:o,t:s}=n(11);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},function(e,t,n){"use strict";const r=n(67),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(m(e,t)){if(y(e,r),!e[a])return}else n&&(e[p]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const _=(e,t,n,r)=>{let i=n.value;m(e,i)&&(y(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach(e=>{e.length=this[s](e.value,e.key),this[o]+=e.length})),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;_(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;_(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[h]=new Map,this[d]=new r,this[o]=0}dump(){return this[d].map(e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[i])return y(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const p=new b(e,t,a,r,n);return p.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=p.length,this[d].unshift(p),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[h].forEach((e,t)=>g(this,t,!1))}}},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&rnew r(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,n){const r=n(5),i=n(8);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))}),o}},function(e,t,n){const r=n(5),i=n(8);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))}),o}},function(e,t,n){const r=n(5),i=n(8),o=n(20);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},function(e,t,n){const r=n(8);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},function(e,t,n){const r=n(29);e.exports=(e,t,n)=>r(e,t,">",n)},function(e,t,n){const r=n(29);e.exports=(e,t,n)=>r(e,t,"<",n)},function(e,t,n){const r=n(8);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},function(e,t,n){const r=n(22),i=n(7);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort((e,t)=>i(e,t,n));for(const e of c)r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push("<="+t):u.push(`${e} - ${t}`):u.push(">="+e):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}const r=new Set;let c,d,h,p,f,g,m;for(const t of e)">"===t.operator||">="===t.operator?c=u(c,t,n):"<"===t.operator||"<="===t.operator?d=l(d,t,n):r.add(t.semver);if(r.size>1)return null;if(c&&d){if(h=a(c.semver,d.semver,n),h>0)return null;if(0===h&&(">="!==c.operator||"<="!==d.operator))return null}for(const e of r){if(c&&!s(e,String(c),n))return null;if(d&&!s(e,String(d),n))return null;for(const r of t)if(!s(e,String(r),n))return!1;return!0}let v=!(!d||n.includePrerelease||!d.semver.prerelease.length)&&d.semver,y=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,c)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(p=u(c,e,n),p===e&&p!==c)return!1}else if(">="===c.operator&&!s(c.semver,String(e),n))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=l(d,e,n),f===e&&f!==d)return!1}else if("<="===d.operator&&!s(d.semver,String(e),n))return!1;if(!e.operator&&(d||c)&&0!==h)return!1}return!(c&&g&&!d&&0!==h||d&&m&&!c&&0!==h||y||v)},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9),i=n(80),o=n(37),s=n(81);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),o.Disposable.create(()=>this.stream.off("data",e))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((n,r)=>{const i=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)})}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(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)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return l}!function(e){e.install=function(){r.default.install(l)}}(d||(d={})),t.default=d},function(e,t){e.exports=n(32)},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,r=0;e:for(;tthis._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 r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9),i=n(14),o=n(15);var s;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class 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: "+(i.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,i;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&&(i=e.contentDecoder,o.set(i.name,i)),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=r.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:i,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=r.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&&(r.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=r.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 r=n(9),i=n(14),o=n(84),s=n(15);var a;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class 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: "+(i.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:r.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:r.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 r=n(9);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&&r.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 r=n(9),i=n(14),o=n(39),s=n(86),a=n(15),c=n(40);var u,l,d,h,p,f,g,m,v,y,b,_,S;!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 i.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"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=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 E extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E,function(e){e.is=function(e){const t=e;return t&&i.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&&i.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&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:b.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&b.is(t.sender)}}(_=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&(_.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"}(S||(S={})),t.createMessageConnection=function(e,n,v,y){const b=void 0!==v?v:t.NullLogger;let P=0,w=0,T=0,C=void 0;const I=Object.create(null);let R=void 0;const O=Object.create(null),D=new Map;let x,k,A=new s.LinkedMap,N=Object.create(null),j=Object.create(null),M=h.Off,L=p.Text,F=S.New;const q=new a.Emitter,U=new a.Emitter,W=new a.Emitter,B=new a.Emitter,V=new a.Emitter,H=y&&y.cancellationStrategy?y.cancellationStrategy:_.Message;function $(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 G(e){}function K(){return F===S.Listening}function z(){return F===S.Closed}function Y(){return F===S.Disposed}function J(){F!==S.New&&F!==S.Listening||(F=S.Closed,U.fire(void 0))}e.onClose(J),e.onError((function(e){q.fire([e,void 0,void 0])})),n.onClose(J),n.onError((function(e){q.fire(e)}));const X=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=$(e.params.id),r=A.get(t);if(o.isRequestMessage(r)){const i=null==y?void 0:y.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(r,G):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return A.delete(t),o.id=r.id,Q(o,e.method,Date.now()),void n.write(o)}}!function(e,t){var n;o.isRequestMessage(t)?e.set($(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++T).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}(A,e)}finally{!function e(){x||0===A.size||(x=r.default().timer.setImmediate(()=>{x=void 0,function(){if(0===A.size)return;const t=A.shift();try{o.isRequestMessage(t)?function(e){if(Y())return;function t(t,r,i){const s={jsonrpc:"2.0",id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,Q(s,r,i),n.write(s)}function r(t,r,i){const o={jsonrpc:"2.0",id:e.id,error:t.toJson()};Q(o,r,i),n.write(o)}!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.log(`Received request '${e.method} - (${e.id})'.`,t)}else Z("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||C){const s=String(e.id),l=H.receiver.createCancellationTokenSource(s);j[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(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 r(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 r(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 C&&(d=C(e.method,e.params,l.token));const h=d;d?h.then?h.then(n=>{delete j[s],t(n,e.method,u)},t=>{delete j[s],t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete j[s],t(d,e.method,u)):(delete j[s],function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:"2.0",id:e.id,result:t};Q(o,r,i),n.write(o)}(d,e.method,u))}catch(n){delete j[s],n instanceof o.ResponseError?t(n,e.method,u):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(t):o.isNotificationMessage(t)?function(e){if(Y())return;let t,n=void 0;if(e.method===u.type.method)t=e=>{const t=e.id,n=j[String(t)];n&&n.cancel()};else{const r=O[e.method];r&&(t=r.handler,n=r.type)}if(t||R)try{!function(e){if(M!==h.Off&&k&&e.method!==g.type.method)if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.log(`Received notification '${e.method}'.`,t)}else Z("receive-notification",e)}(e),t?void 0===e.params?(void 0!==n&&0!==n.numberOfParams&&n.parameterStructures!==o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${n.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==n&&(n.parameterStructures===o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),n.numberOfParams!==e.params.length&&b.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&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):R&&R(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(t):o.isResponseMessage(t)?function(e){if(!Y())if(null===e.id)e.error?b.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):b.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=N[t];if(function(e,t){if(M!==h.Off&&k)if(L===p.Text){let n=void 0;if(M===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else Z("receive-response",e)}(e,n),n){delete N[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?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(t):function(e){if(!e)return void b.error("Received empty message.");b.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),n=N[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(t)}finally{e()}}()}))}()}};function Q(e,t,n){if(M!==h.Off&&k)if(L===p.Text){let r=void 0;M===h.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Z("send-response",e)}function Z(e,t){if(!k||M===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}function ee(){if(z())throw new E(m.Closed,"Connection is closed.");if(Y())throw new E(m.Disposed,"Connection is disposed.")}function te(e){return void 0===e?null:e}function ne(e){return null===e?void 0:e}function re(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ie(e,t){switch(e){case o.ParameterStructures.auto:return re(t)?ne(t):[te(t)];case o.ParameterStructures.byName:if(!re(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ne(t);case o.ParameterStructures.byPosition:return[te(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function oe(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ie(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,s;if(ee(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const u=c-i;switch(u){case 0:s=void 0;break;case 1:s=ie(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map(e=>te(e))}}else{const n=t;r=e.method,s=oe(e,n)}const a={jsonrpc:"2.0",method:r,params:s};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),k.log(`Sending notification '${e.method}'.`,t)}else Z("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ee(),i.func(e)?R=e:t&&(i.string(e)?(n=e,O[e]={type:void 0,handler:t}):(n=e.method,O[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete O[n]:R=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)=>{se.sendNotification(l.type,{token:t,value:n})},onUnhandledProgress:B.event,sendRequest:(e,...t)=>{let r,s;ee(),function(){if(!K())throw new Error("Call listen() first.")}();let a=void 0;if(i.string(e)){r=e;const n=t[0],i=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(i)&&(d-=1,a=i);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=ie(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map(e=>te(e))}}else{const n=t;r=e.method,s=oe(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const u=P++;let l;return a&&(l=a.onCancellationRequested(()=>{H.sender.sendCancellation(se,u)})),new Promise((e,t)=>{const i={jsonrpc:"2.0",id:u,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),H.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),H.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(M!==h.Off&&k)if(L===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Z("send-request",e)}(i);try{n.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(u)]=a)})},onRequest:(e,t)=>{ee();let n=null;return d.is(e)?(n=void 0,C=e):i.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]:C=void 0)}}},trace:(e,t,n)=>{let r=!1,o=p.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||p.Text)),M=e,L=o,k=M===h.Off?void 0:t,!r||z()||Y()||se.sendNotification(f.type,{value:h.toString(e)})},onError:q.event,onClose:U.event,onUnhandledNotification:W.event,onDispose:V.event,end:()=>{n.end()},dispose:()=>{if(Y())return;F=S.Disposed,V.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(N).forEach(e=>{N[e].reject(t)}),N=Object.create(null),j=Object.create(null),A=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ee(),function(){if(K())throw new E(m.AlreadyListening,"Connection is already listening")}(),F=S.Listening,e.listen(X)},inspect:()=>{r.default().console.log("inspect")}};return se.onNotification(g.type,e=>{M!==h.Off&&k&&k.log(e.message,M===h.Verbose?e.verbose:void 0)}),se.onNotification(l.type,e=>{const t=D.get(e.token);t?t(e.value):B.fire(e)}),se}},function(e,t,n){"use strict";var r;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}(r=t.Touch||(t.Touch={}));class i{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=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}[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===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,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=i,t.LRUCache=class extends i{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=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t){e.exports=n(104)},function(e,t){e.exports=n(148)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(13),t),i(n(90),t),i(n(3),t),i(n(91),t);var o=n(108);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 r,i,o,s,a,c,u,l,d,h,p,f,g,m,v,y,b,_,S,E,P,w,T,C,I,R;n.r(t),n.d(t,"integer",(function(){return r})),n.d(t,"uinteger",(function(){return i})),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 h})),n.d(t,"FoldingRange",(function(){return p})),n.d(t,"DiagnosticRelatedInformation",(function(){return f})),n.d(t,"DiagnosticSeverity",(function(){return g})),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 b})),n.d(t,"TextEdit",(function(){return _})),n.d(t,"ChangeAnnotation",(function(){return S})),n.d(t,"ChangeAnnotationIdentifier",(function(){return E})),n.d(t,"AnnotatedTextEdit",(function(){return P})),n.d(t,"TextDocumentEdit",(function(){return w})),n.d(t,"CreateFile",(function(){return T})),n.d(t,"RenameFile",(function(){return C})),n.d(t,"DeleteFile",(function(){return I})),n.d(t,"WorkspaceEdit",(function(){return R})),n.d(t,"WorkspaceChange",(function(){return ae})),n.d(t,"TextDocumentIdentifier",(function(){return O})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return D})),n.d(t,"OptionalVersionedTextDocumentIdentifier",(function(){return x})),n.d(t,"TextDocumentItem",(function(){return k})),n.d(t,"MarkupKind",(function(){return A})),n.d(t,"MarkupContent",(function(){return N})),n.d(t,"CompletionItemKind",(function(){return j})),n.d(t,"InsertTextFormat",(function(){return M})),n.d(t,"CompletionItemTag",(function(){return L})),n.d(t,"InsertReplaceEdit",(function(){return F})),n.d(t,"InsertTextMode",(function(){return q})),n.d(t,"CompletionItem",(function(){return U})),n.d(t,"CompletionList",(function(){return W})),n.d(t,"MarkedString",(function(){return B})),n.d(t,"Hover",(function(){return V})),n.d(t,"ParameterInformation",(function(){return H})),n.d(t,"SignatureInformation",(function(){return $})),n.d(t,"DocumentHighlightKind",(function(){return G})),n.d(t,"DocumentHighlight",(function(){return K})),n.d(t,"SymbolKind",(function(){return z})),n.d(t,"SymbolTag",(function(){return Y})),n.d(t,"SymbolInformation",(function(){return J})),n.d(t,"DocumentSymbol",(function(){return X})),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 re})),n.d(t,"SelectionRange",(function(){return ie})),n.d(t,"EOL",(function(){return ue})),n.d(t,"TextDocument",(function(){return ce})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.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,r){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return 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,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},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,r){return{red:e,green:t,blue:n,alpha:r}},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)||_.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,_.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(r)&&(o.endCharacter=r),le.defined(i)&&(o.kind=i),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))}}(p||(p={})),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)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),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,r,i,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(r)&&(s.code=r),le.defined(i)&&(s.source=i),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,f.is))}}(y||(y={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(b||(b={})),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)}}(_||(_={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},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)}}(S||(S={})),function(e){e.is=function(e){return"string"==typeof e}}(E||(E={})),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 _.is(t)&&(S.is(t.annotationId)||E.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&x.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},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||E.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},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||E.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)?T.is(e)||C.is(e)||I.is(e):w.is(e)})))}}(R||(R={}));var O,D,x,k,A,N,j,M,L,F,q,U,W,B,V,H,$,G,K,z,Y,J,X,Q,Z,ee,te,ne,re,ie,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=_.insert(e,t):E.is(n)?(i=n,r=P.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=_.replace(e,t):E.is(n)?(i=n,r=P.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=P.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=_.del(e):E.is(t)?(r=t,n=P.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=P.del(e,r)),this.edits.push(n),void 0!==r)return r},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(E.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(w.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 r=new oe(e.changes[n]);t._textEditChanges[n]=r}))):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(x.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new oe(i),this._textEditChanges[e]=r}return r},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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=T.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=T.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(S.is(n)||E.is(n)?i=n:r=n,void 0===i?o=C.create(e,t,r):(s=E.is(i)?i:this._changeAnnotations.manage(i),o=C.create(e,t,r,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 r,i,o;if(S.is(t)||E.is(t)?r=t:n=t,void 0===r?i=I.create(e,n):(o=E.is(r)?r:this._changeAnnotations.manage(r),i=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),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)}}(O||(O={})),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))}}(x||(x={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(k||(k={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(A||(A={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(A||(A={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&A.is(t.kind)&&le.string(t.value)}}(N||(N={})),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}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(L||(L={})),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)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(q||(q={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),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)}}(B||(B={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(N.is(t.contents)||B.is(t.contents)||le.typedArray(t.contents,B.is))&&(void 0===e.range||s.is(e.range))}}(V||(V={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(H||(H={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var s=r[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(ce||(ce={}));var le,de=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!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,r=0;r0&&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,r=t.length;if(0===r)return o.create(0,e);for(;ne?r=i:n=i+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],r=e.line+10}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||S.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new i.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new i.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new i.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new i.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new i.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 i.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new i.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new i.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 i.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 i.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new i.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 i.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new i.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new i.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 i.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 i.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new i.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new i.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new i.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new i.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 i.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new i.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.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=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every(e=>r(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(3);!function(e){e.method="textDocument/implementation",e.type=new r.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(3);!function(e){e.method="textDocument/typeDefinition",e.type=new r.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 r=n(3);!function(e){e.type=new r.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(3);!function(e){e.type=new r.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(3);!function(e){e.method="textDocument/documentColor",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new r.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 r=n(3);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new r.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(3);!function(e){e.method="textDocument/declaration",e.type=new r.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(3);!function(e){e.method="textDocument/selectionRange",e.type=new r.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 r=n(13),i=n(3);!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new i.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(3);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const r=n(3);!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 r.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(3);!function(e){e.method="window/showDocument",e.type=new r.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(3);!function(e){e.method="textDocument/linkedEditingRange",e.type=new r.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 r=n(3);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new r.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 r=n(3);!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 r.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(13);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),r.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(0),i=n(2),o=n(10),s=n(42),a=n(43),c=n(44),u=n(45),l=n(46),d=n(47),h=n(2);var p;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(p||(p={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function f(e){return{uri:t(e.uri)}}function g(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function m(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function v(e){switch(e){case r.SignatureHelpTriggerKind.Invoke:return i.SignatureHelpTriggerKind.Invoked;case r.SignatureHelpTriggerKind.TriggerCharacter:return i.SignatureHelpTriggerKind.TriggerCharacter;case r.SignatureHelpTriggerKind.ContentChange:return i.SignatureHelpTriggerKind.ContentChange}}function y(e){return{label:e.label}}function b(e){return{label:e.label,parameters:(t=e.parameters,t.map(y))};var t}function _(e){return{line:e.line,character:e.character}}function S(e){return null==e?e:{line:e.line,character:e.character}}function E(e){return null==e?e:{start:S(e.start),end:S(e.end)}}function P(e){return null==e?e:i.Location.create(n(e.uri),E(e.range))}function w(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function T(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function C(e){return{message:e.message,location:P(e.location)}}function I(e){const t=i.Diagnostic.create(E(e.range),e.message),r=e instanceof l.ProtocolDiagnostic?e:void 0;void 0!==r&&void 0!==r.data&&(t.data=r.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!==r&&r.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=w(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=T(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(C)),e.source&&(t.source=e.source),t}function R(e){return null==e?e:e.map(I)}function O(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function D(e){return{range:E(e.range),newText:e.newText}}function x(e){return e<=r.SymbolKind.TypeParameter?e+1:i.SymbolKind.Property}function k(e){return e}function A(e){return e.map(k)}function N(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:f,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:f(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:f(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:f(e.document),reason:g(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:f(e),position:_(t)}},asCompletionParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{triggerKind:m(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:v(n.triggerKind),activeSignatureHelp:(r=n.activeSignatureHelp,void 0===r?r:{signatures:(i=r.signatures,i.map(b)),activeSignature:r.activeSignature,activeParameter:r.activeParameter})}};var r,i},asWorkerPosition:_,asRange:E,asPosition:S,asPositions:function(e){let t=[];for(let n of e)t.push(S(n));return t},asLocation:P,asDiagnosticSeverity:w,asDiagnosticTag:T,asDiagnostic:I,asDiagnostics:R,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 i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n=i.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=t.textEdit.range):t.insertText instanceof r.SnippetString?(n=i.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 p.is(t)?i.InsertReplaceEdit.create(e,E(t.inserting),E(t.replacing)):{newText:e,range:E(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){return null==e?e:e.map(D)}(e.additionalTextEdits)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=N(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=O(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(r.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=h.InsertTextMode.adjustIndentation),t},asTextEdit:D,asSymbolKind:x,asSymbolTag:k,asSymbolTags:A,asReferenceParams:function(e,t,n){return{textDocument:f(e),position:_(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:function(e){let t=i.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 e.value}(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=R(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=N(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]),i.CodeActionContext.create(R(e.diagnostics),t)},asCommand:N,asCodeLens:function(e){let t=i.CodeLens.create(E(e.range));return e.command&&(t.command=N(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:f(e)}},asCodeLensParams:function(e){return{textDocument:f(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(E(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:f(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:x(e.kind),uri:n(e.uri),range:E(e.range),selectionRange:E(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=A(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 r=n(0),i=n(2),o=n(10),s=n(42),a=n(43),c=n(44),u=n(45),l=n(46),d=n(47),h=n(2);var p;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(p||(p={})),t.createConverter=function(e,t){const n=e||(e=>r.Uri.parse(e));function f(e){return n(e)}function g(e){return e.map(m)}function m(e){let t=new l.ProtocolDiagnostic(_(e.range),e.message,E(e.severity),e.data);return void 0!==e.code&&(i.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:f(e.codeDescription.href)}:l.DiagnosticCode.is(e.code)?(t.hasDiagnosticCode=!0,t.code={value:e.code.value,target:f(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 r.DiagnosticRelatedInformation(N(e.location),e.message)}function y(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function b(e){if(e)return new r.Position(e.line,e.character)}function _(e){if(e)return new r.Range(b(e.start),b(e.end))}function S(e){return e.map(e=>_(e))}function E(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function P(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return w(e.value);case i.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function w(e){const n=new r.MarkdownString(e);return!0===t&&(n.isTrusted=t),n}function T(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function C(e){let t=function(e){if(null==e)return[];const t=[];for(let n of e){const e=T(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=P(e.documentation),n.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(n.filterText=e.filterText);let a=function(e){return e.textEdit?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.textEdit.newText),range:I(e.textEdit),fromEdit:!0}:{text:e.textEdit.newText,range:I(e.textEdit),fromEdit:!0}:e.insertText?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(a&&(n.insertText=a.text,n.range=a.range,n.fromEdit=a.fromEdit),o.number(e.kind)){let[t,o]=(c=e.kind,i.CompletionItemKind.Text<=c&&c<=i.CompletionItemKind.TypeParameter?[c-1,void 0]:[r.CompletionItemKind.Text,c]);n.kind=t,o&&(n.originalItemKind=o)}var c;return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=O(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=$(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(r.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),t.length>0&&(n.tags=t),void 0!==e.insertTextMode&&(n.insertTextMode=e.insertTextMode,e.insertTextMode===h.InsertTextMode.asIs&&(n.keepWhitespace=!0)),n}function I(e){return i.InsertReplaceEdit.is(e)?{inserting:_(e.insert),replacing:_(e.replace)}:_(e.range)}function R(e){if(e)return new r.TextEdit(_(e.range),e.newText)}function O(e){if(e)return e.map(R)}function D(e){return e.map(x)}function x(e){let t=new r.SignatureInformation(e.label);return void 0!==e.documentation&&(t.documentation=P(e.documentation)),void 0!==e.parameters&&(t.parameters=k(e.parameters)),void 0!==e.activeParameter&&(t.activeParameter=e.activeParameter),t}function k(e){return e.map(A)}function A(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=P(e.documentation)),t}function N(e){if(e)return new r.Location(n(e.uri),_(e.range))}function j(e){if(!e)return;let t={targetUri:n(e.targetUri),targetRange:_(e.targetRange),originSelectionRange:_(e.originSelectionRange),targetSelectionRange:_(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}function M(e){if(e)return o.array(e)?0===e.length?[]:i.LocationLink.is(e[0])?e.map(e=>j(e)):e.map(e=>N(e)):i.LocationLink.is(e)?[j(e)]:N(e)}function L(e){let t=new r.DocumentHighlight(_(e.range));return o.number(e.kind)&&(t.kind=F(e.kind)),t}function F(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function q(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function U(e){switch(e){case i.SymbolTag.Deprecated:return r.SymbolTag.Deprecated;default:return}}function W(e){if(null==e)return;const t=[];for(const n of e){const e=U(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function B(e,t){let i=new r.SymbolInformation(e.name,q(e.kind),_(e.location.range),e.location.uri?n(e.location.uri):t);return H(i,e),e.containerName&&(i.containerName=e.containerName),i}function V(e){let t=new r.DocumentSymbol(e.name,e.detail||"",q(e.kind),_(e.range),_(e.selectionRange));if(H(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(V(t));t.children=n}return t}function H(e,t){e.tags=W(t.tags),t.deprecated&&(e.tags?e.tags.includes(r.SymbolTag.Deprecated)||(e.tags=e.tags.concat(r.SymbolTag.Deprecated)):e.tags=[r.SymbolTag.Deprecated])}function $(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const G=new Map;function K(e){if(null==e)return;let t=G.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function z(e){if(!e)return;let t=new a.default(_(e.range));return e.command&&(t.command=$(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 r=J(e.changeAnnotations[n]);t.set(n,r)}const o=e=>void 0===e?void 0:t.get(e),s=new r.WorkspaceEdit;if(e.documentChanges)for(const t of e.documentChanges)if(i.CreateFile.is(t))s.createFile(n(t.uri),t.options,o(t.annotationId));else if(i.RenameFile.is(t))s.renameFile(n(t.oldUri),n(t.newUri),t.options,o(t.annotationId));else if(i.DeleteFile.is(t))s.deleteFile(n(t.uri),t.options,o(t.annotationId));else{if(!i.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)h.AnnotatedTextEdit.is(n)?s.replace(e,_(n.range),n.newText,o(n.annotationId)):s.replace(e,_(n.range),n.newText)}}else e.changes&&Object.keys(e.changes).forEach(t=>{s.set(n(t),O(e.changes[t]))});return s}function J(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}function X(e){let t=_(e.range),n=e.target?f(e.target):void 0,r=new c.default(t,n);return void 0!==e.tooltip&&(r.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(r.data=e.data),r}function Q(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function Z(e){return new r.ColorInformation(_(e.range),Q(e.color))}function ee(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=O(e.additionalTextEdits),e.textEdit&&(t.textEdit=R(e.textEdit)),t}function te(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function ne(e){return new r.FoldingRange(e.startLine,e.endLine,te(e.kind))}function re(e){return new r.SelectionRange(_(e.range),e.parent?re(e.parent):void 0)}function ie(e){if(null===e)return;let t=new d.default(q(e.kind),e.name,e.detail||"",f(e.uri),_(e.range),_(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=W(e.tags)),t}function oe(e){return new r.CallHierarchyIncomingCall(ie(e.from),S(e.fromRanges))}function se(e){return new r.CallHierarchyOutgoingCall(ie(e.to),S(e.fromRanges))}function ae(e){return new r.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}return G.set(i.CodeActionKind.Empty,r.CodeActionKind.Empty),G.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),G.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),G.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),G.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),G.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),G.set(i.CodeActionKind.Source,r.CodeActionKind.Source),G.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:f,asDiagnostics:g,asDiagnostic:m,asRange:_,asRanges:S,asPosition:b,asDiagnosticSeverity:E,asDiagnosticTag:y,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return w(e);if(p.is(e))return w().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=w();p.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case i.MarkupKind.Markdown:return w(e.value);case i.MarkupKind.PlainText:return t=w(),t.appendText(e.value),t;default:return t=w(),t.appendText("Unsupported Markup content received. Kind is: "+e.kind),t}}}(e.contents),_(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e))return e.map(C);let t=e;return new r.CompletionList(t.items.map(C),t.isIncomplete)},asCompletionItem:C,asTextEdit:R,asTextEdits:O,asSignatureHelp:function(e){if(!e)return;let t=new r.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=D(e.signatures)),t},asSignatureInformations:D,asSignatureInformation:x,asParameterInformations:k,asParameterInformation:A,asDeclarationResult:function(e){if(e)return M(e)},asDefinitionResult:function(e){if(e)return M(e)},asLocation:N,asReferences:function(e){if(e)return e.map(e=>N(e))},asDocumentHighlights:function(e){if(e)return e.map(L)},asDocumentHighlight:L,asDocumentHighlightKind:F,asSymbolKind:q,asSymbolTag:U,asSymbolTags:W,asSymbolInformations:function(e,t){if(e)return e.map(e=>B(e,t))},asSymbolInformation:B,asDocumentSymbols:function(e){if(null!=e)return e.map(V)},asDocumentSymbol:V,asCommand:$,asCommands:function(e){if(e)return e.map($)},asCodeAction:function(e){if(null==e)return;let t=new u.default(e.title,e.data);return void 0!==e.kind&&(t.kind=K(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=g(e.diagnostics)),void 0!==e.edit&&(t.edit=Y(e.edit)),void 0!==e.command&&(t.command=$(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionKind:K,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>K(e))},asCodeLens:z,asCodeLenses:function(e){if(e)return e.map(e=>z(e))},asWorkspaceEdit:Y,asDocumentLink:X,asDocumentLinks:function(e){if(e)return e.map(X)},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:re,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push(re(n));return t},asSemanticTokensLegend:function(e){return e},asSemanticTokens:function(e){if(null!=e)return new r.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ae,asSemanticTokensEdits:function(e){if(null!=e)return new r.SemanticTokensEdits(e.edits.map(ae),e.resultId)},asCallHierarchyItem:ie,asCallHierarchyItems:function(e){if(null!==e)return e.map(e=>ie(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 r.LinkedEditingRanges(S(e.ranges),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delayer=void 0;const r=n(2);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=r.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&&(r.RAL().timer.clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.colorProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={color:e,textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:r.code2ProtocolConverter.asRange(t.range)};return r.sendRequest(i.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>r.handleFailedRequest(i.ColorPresentationRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,r=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.DocumentColorRequest.type,r,t).then(this.asColorInformations.bind(this),e=>n.handleFailedRequest(i.ColorPresentationRequest.type,e,null))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,r):r(e,t)}};return[r.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new r.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}t.ColorProviderFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.implementationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.ImplementationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.ImplementationRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[r.languages.registerImplementationProvider(e.documentSelector,t),t]}}t.ImplementationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.TypeDefinitionRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=s(s(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.typeDefinitionProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.TypeDefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDefinitionResult,e=>r.handleFailedRequest(i.TypeDefinitionRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[r.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}t.TypeDefinitionFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const r=n(30),i=n(0),o=n(2);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=i.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map(e=>this.asProtocol(e))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{const n=()=>{const e=i.workspace.workspaceFolders;return void 0===e?null:e.map(e=>this.asProtocol(e))},r=t.clientOptions.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()});const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=r.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,r=i.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},r=n.clientOptions.middleware.workspace;r&&r.didChangeWorkspaceFolders?r.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(t,r),this.sendInitialEvent(i.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.foldingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e)};return r.sendRequest(i.FoldingRangeRequest.type,o,n).then(a.asFoldingRanges,e=>r.handleFailedRequest(i.FoldingRangeRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[r.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}static asFoldingRangeKind(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}static asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new r.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 r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.declarationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DeclarationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asDeclarationResult,e=>r.handleFailedRequest(i.DeclarationRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[r.languages.registerDeclarationProvider(e.documentSelector,t),t]}}t.DeclarationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const r=n(0),i=n(2),o=n(6);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,i.SelectionRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.selectionRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideSelectionRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:r.code2ProtocolConverter.asPositions(t)};return r.sendRequest(i.SelectionRangeRequest.type,o,n).then(e=>r.protocol2CodeConverter.asSelectionRanges(e),e=>r.handleFailedRequest(i.SelectionRangeRequest.type,e,null))},s=r.clientOptions.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[r.languages.registerSelectionRangeProvider(e.documentSelector,t),t]}}t.SelectionRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const r=n(2),i=n(48);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(r.WorkDoneProgressCreateRequest.type,e=>{this.activeParts.add(new i.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 r=n(0),i=n(2),o=n(6);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 r=this.client,o=this.middleware,s=(e,t,n)=>{const o=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.CallHierarchyPrepareRequest.type,o,n).then(e=>r.protocol2CodeConverter.asCallHierarchyItems(e),e=>r.handleFailedRequest(i.CallHierarchyPrepareRequest.type,e,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyIncomingCallsRequest.type,r,t).then(e=>n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e),e=>n.handleFailedRequest(i.CallHierarchyIncomingCallsRequest.type,e,null))};return r.provideCallHierarchyIncomingCalls?r.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyOutgoingCallsRequest.type,r,t).then(e=>n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e),e=>n.handleFailedRequest(i.CallHierarchyOutgoingCallsRequest.type,e,null))};return r.provideCallHierarchyOutgoingCalls?r.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class c extends o.TextDocumentFeature{constructor(e){super(e,i.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.callHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new a(t);return[r.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 r=n(0),i=n(6),o=n(2),s=n(10);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class c extends i.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,r]=this.getRegistration(t,e.semanticTokensProvider);n&&r&&this.register({id:n,registerOptions:r})}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,i=new r.EventEmitter,a=t?{onDidChangeSemanticTokens:i.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,r=n.clientOptions.middleware,i=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,r,t).then(e=>n.protocol2CodeConverter.asSemanticTokens(e),e=>n.handleFailedRequest(o.SemanticTokensRequest.type,e,null))};return r.provideDocumentSemanticTokens?r.provideDocumentSemanticTokens(e,t,i):i(e,t)},provideDocumentSemanticTokensEdits:n?(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return r.sendRequest(o.SemanticTokensDeltaRequest.type,i,n).then(e=>o.SemanticTokens.is(e)?r.protocol2CodeConverter.asSemanticTokens(e):r.protocol2CodeConverter.asSemanticTokensEdits(e),e=>r.handleFailedRequest(o.SemanticTokensDeltaRequest.type,e,null))};return i.provideDocumentSemanticTokensEdits?i.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const r=this._client,i=r.clientOptions.middleware,s=(e,t,n)=>{const i={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};return r.sendRequest(o.SemanticTokensRangeRequest.type,i,n).then(e=>r.protocol2CodeConverter.asSemanticTokens(e),e=>r.handleFailedRequest(o.SemanticTokensRangeRequest.type,e,null))};return i.provideDocumentRangeSemanticTokens?i.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(r.languages.registerDocumentSemanticTokensProvider(e.documentSelector,a,l)),void 0!==c&&u.push(r.languages.registerDocumentRangeSemanticTokensProvider(e.documentSelector,c,l)),[new r.Disposable(()=>u.forEach(e=>e.dispose())),{range:c,full:a,onDidChangeSemanticTokensEmitter:i}]}}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 r=n(0),i=n(123),o=n(2),s=n(30);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,r,i){this._filters=new Map,this._client=e,this._event=t,this._registrationType=n,this._clientCapability=r,this._serverCapability=i}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,r=void 0!==n?n[this._serverCapability]:void 0;if(void 0!==(null==r?void 0:r.filters))try{this.register({id:s.generateUuid(),registerOptions:{filters:r.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 i.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),i=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(i)){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===r.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===r.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder&&await u.getFileType(n)===r.FileType.Directory&&t.matcher.match(i+"/"))return!0;return!1})),i=e.files.filter((e,t)=>n[t]);return Object.assign(Object.assign({},e),{files:i})}static async getFileType(e){try{return(await r.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,r,i,o,s){super(e,t,n,r,i),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,r.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",e=>e,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didCreateFiles)?r.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends l{constructor(e){super(e,r.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",e=>e.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didRenameFiles)?r.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends l{constructor(e){super(e,r.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",e=>e,e.code2ProtocolConverter.asDidDeleteFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.didDeleteFiles)?r.didDeleteFiles(e,t):t(e)}};class d extends u{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i),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,r.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",e=>e,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willCreateFiles)?r.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends d{constructor(e){super(e,r.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",e=>e.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willRenameFiles)?r.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends d{constructor(e){super(e,r.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",e=>e,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){var n;const r=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==r?void 0:r.willDeleteFiles)?r.willDeleteFiles(e,t):t(e)}}},function(e,t,n){e.exports=l,l.Minimatch=d;var r={sep:"/"};try{r=n(16)}catch(e){}var i=l.GLOBSTAR=d.GLOBSTAR={},o=n(124),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),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(),"/"!==r.sep&&(e=e.split(r.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 h(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,r,i){return l(n,e,t)}},l.defaults=function(e){if(!e||!Object.keys(e).length)return l;var t=l,n=function(n,r,i){return t.minimatch(n,r,u(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,u(e,r))},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){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){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}else this.empty=!0;else this.comment=!0}},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",c=!!n.nocase,u=!1,l=[],d=[],h=!1,f=-1,g=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(r){switch(r){case"*":o+="[^/]*?",c=!0;break;case"?":o+="[^/]",c=!0;break;default:o+="\\"+r}v.debug("clearStateChar %j %j",r,o),r=!1}}for(var b,_=0,S=e.length;_-1;R--){var O=d[R],D=o.slice(0,O.reStart),x=o.slice(O.reStart,O.reEnd-8),k=o.slice(O.reEnd-8,O.reEnd),A=o.slice(O.reEnd);k+=A;var N=D.split("(").length-1,j=A;for(_=0;_=0&&!(i=e[o]);o--);for(o=0;o>> no match, partial?",e,h,t,p),h!==a))}if("string"==typeof l?(u=r.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 r=n(125),i=n(126);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),function e(t,n){var o=[],s=i("{","}",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=[],r=i("{","}",t);if(!r)return t.split(",");var o=r.pre,s=r.body,a=r.post,c=o.split(",");c[c.length-1]+="{"+s+"}";var u=e(a);return a.length&&(c[c.length-1]+=u.shift(),c.push.apply(c,u)),n.push.apply(n,c),n}(s.body)).length&&1===(c=e(c[0],!1).map(h)).length)return(_=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+c[0]+e}));var y,b=s.pre,_=s.post.length?e(s.post,!1):[""];if(m){var S=l(c[0]),E=l(c[1]),P=Math.max(c[0].length,c[1].length),w=3==c.length?Math.abs(l(c[2])):1,T=f;E0){var D=new Array(O+1).join("0");R=I<0?"-"+D+R.slice(1):D+R}}y.push(R)}}else y=r(c,(function(t){return e(t,!1)}));for(var x=0;x=t}},function(e,t){e.exports=function(e,t){for(var r=[],i=0;i=0&&u>0){if(e===t)return[c,u];for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())=0?c:u;r.length&&(a=[o,s])}return a}e.exports=r,r.range=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const r=n(0),i=n(2),o=n(6);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,i.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t={provideLinkedEditingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.LinkedEditingRangeRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(r.protocol2CodeConverter.asLinkedEditingRanges,e=>r.handleFailedRequest(i.LinkedEditingRangeRequest.type,e,null)),s=r.clientOptions.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[r.languages.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}t.LinkedEditingFeature=a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const r=n(32),i=n(16),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(t,n){if(o)try{let e={stdio:["pipe","pipe","ignore"]};return n&&(e.cwd=n),r.execFileSync("taskkill",["/T","/F","/PID",t.pid.toString()],e),!0}catch(e){return!1}else{if(!a&&!s)return t.kill("SIGKILL"),!0;try{var c=i.join(e,"terminateProcess.sh");return!r.spawnSync(c,[t.pid.toString()]).error}catch(e){return!1}}}}).call(this,"/")},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2),t),i(n(6),t),i(n(35),t)},function(e,t,n){"use strict";function r(e){return"function"==typeof(null==e?void 0:e.then)}function i(e){return e.scheme.includes("vscode-notebook-cell")||e.scheme.includes("vscode-interactive-input")}n.r(t),n.d(t,"createHidingMiddleware",(function(){return f})),n.d(t,"createNotebookMiddleware",(function(){return g})),n.d(t,"createPylanceMiddleware",(function(){return m}));class o{constructor(){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)}dispose(){}didChange(e,t){i(e.document.uri)||t(e)}didOpen(e,t){i(e.uri)||t(e)}didClose(e,t){i(e.uri)||t(e)}didSave(e,t){i(e.uri)||t(e)}provideCompletionItem(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}provideHover(e,t,n,r){if(!i(e.uri))return r(e,t,n)}resolveCompletionItem(e,t,n){return n(e,t)}provideSignatureHelp(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}provideDefinition(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideReferences(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}provideDocumentHighlights(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideDocumentSymbols(e,t,n){if(!i(e.uri))return n(e,t)}provideCodeActions(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}provideCodeLenses(e,t,n){if(!i(e.uri))return n(e,t)}provideDocumentFormattingEdits(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideDocumentRangeFormattingEdits(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}provideOnTypeFormattingEdits(e,t,n,r,o,s){if(!i(e.uri))return s(e,t,n,r,o)}provideRenameEdits(e,t,n,r,o){if(!i(e.uri))return o(e,t,n,r)}prepareRename(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideDocumentLinks(e,t,n){if(!i(e.uri))return n(e,t)}provideDeclaration(e,t,n,r){if(!i(e.uri))return r(e,t,n)}handleDiagnostics(e,t,n){i(e)?n(e,[]):n(e,t)}provideTypeDefinition(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideImplementation(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideDocumentColors(e,t,n){if(!i(e.uri))return n(e,t)}provideColorPresentations(e,t,n,r){if(!i(t.document.uri))return r(e,t,n)}provideFoldingRanges(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideSelectionRanges(e,t,n,r){if(!i(e.uri))return r(e,t,n)}prepareCallHierarchy(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideCallHierarchyIncomingCalls(e,t,n){if(!i(e.uri))return n(e,t)}provideCallHierarchyOutgoingCalls(e,t,n){if(!i(e.uri))return n(e,t)}provideDocumentSemanticTokens(e,t,n){if(!i(e.uri))return n(e,t)}provideDocumentSemanticTokensEdits(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideDocumentRangeSemanticTokens(e,t,n,r){if(!i(e.uri))return r(e,t,n)}provideLinkedEditingRange(e,t,n,r){if(!i(e.uri))return r(e,t,n)}}var s=n(0),a=n(4),c=n(1),u=n(31),l=n(50);function d(e,t){return s.languages.match(t,e)}class h{constructor(e,t,n,i,o,s){this.getClient=e,this.traceInfo=t,this.cellSelector=n,this.pythonPath=i,this.isDocumentAllowed=o,this.disposables=[],this.workspace={configuration:async(e,t,n)=>{let i=n(e,t);if(r(i)&&(i=await i),i instanceof a.ResponseError)return i;for(const[t,n]of e.items.entries())"python"===n.section&&(i[t].pythonPath=this.pythonPath);return i}},this.converter=l.createConverter(s,()=>u.platform()),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)}dispose(){this.disposables.forEach(e=>e.dispose()),this.disposables=[],this.converter.dispose()}refresh(e){const t=this.getClient();if(t&&e.cellCount>0){const n=this.asTextDocumentIdentifier(e.cellAt(0).document);if(this.converter.isOpen(n)){const n=this.converter.handleRefresh(function(e,t){return{cells:e.getCells().filter(e=>d(e.document,t)>0).map(e=>({textDocument:{uri:e.document.uri.toString(),text:e.document.getText(),languageId:e.document.languageId,version:e.document.version}}))}}(e,this.cellSelector));n&&t.sendNotification(a.DidChangeTextDocumentNotification.type,n)}}}stopWatching(e){const t=this.getClient();if(t&&e.cellCount>0){const n=this.asTextDocumentIdentifier(e.cellAt(0).document),r={textDocument:this.converter.toConcatDocument(n)};t.sendNotification(a.DidCloseTextDocumentNotification.type,r),t.diagnostics&&e.getCells().forEach(e=>{var n;null===(n=t.diagnostics)||void 0===n||n.set(e.document.uri,[])}),e.getCells().forEach(e=>{this.converter.handleClose({textDocument:{uri:e.document.uri.toString()}})})}}startWatching(e){const t=this.getClient();t&&e.cellCount>0&&e.getCells().forEach(e=>{this.didOpen(e.document,e=>{const n=t.code2ProtocolConverter.asOpenTextDocumentParams(e);t.sendNotification(a.DidOpenTextDocumentNotification.type,n)})})}didChange(e){const t=this.getClient();if(i(e.document.uri)&&t&&d(e.document,this.cellSelector)){const n=this.asTextDocumentIdentifier(e.document),r=this.converter.isOpen(n),i=this.converter.handleChange(t.code2ProtocolConverter.asChangeTextDocumentParams(e));if(r)i&&t.sendNotification(a.DidChangeTextDocumentNotification.type,i);else{const e={textDocument:this.converter.toConcatDocument(n)};t.sendNotification(a.DidOpenTextDocumentNotification.type,e)}}}didOpen(e,t){const n=this.getClient();if(i(e.uri)&&this.isDocumentAllowed(e.uri)&&n&&d(e,this.cellSelector)){const t=this.asTextDocumentIdentifier(e),r=this.asTextDocumentItem(e),i=this.converter.isOpen(t),o=this.converter.handleOpen({textDocument:r});if(i)o&&n.sendNotification(a.DidChangeTextDocumentNotification.type,o);else{const e=this.converter.toConcatDocument(t);n.sendNotification(a.DidOpenTextDocumentNotification.type,{textDocument:e})}}return()=>{}}didClose(e,t){const n=this.getClient();if(i(e.uri)&&n&&d(e,this.cellSelector)){const t=this.asTextDocumentItem(e),r=this.converter.isOpen(t),i=this.converter.handleClose({textDocument:t}),o=!this.converter.isOpen(t);if(o&&r){const e=this.converter.toConcatDocument(t);n.sendNotification(a.DidCloseTextDocumentNotification.type,{textDocument:e})}else!o&&i&&n.sendNotification(a.DidChangeTextDocumentNotification.type,i)}return()=>{}}didSave(e,t){return t(e)}willSave(e,t){return t(e)}willSaveWaitUntil(e,t){return t(e)}async provideCompletionItem(e,t,n,r,i){const o=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&o){const i=this.asTextDocumentIdentifier(e),s={textDocument:this.converter.toConcatDocument(i),position:this.converter.toConcatPosition(i,t),context:o.code2ProtocolConverter.asCompletionParams(e,t,n).context},a=await o.sendRequest(c.CompletionRequest.type,s,r),u=this.converter.toNotebookCompletions(i,a);return o.protocol2CodeConverter.asCompletionResult(u)}}async provideHover(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.HoverRequest.type,o,n),a=this.converter.toNotebookHover(r,s);return i.protocol2CodeConverter.asHover(a)}}resolveCompletionItem(e,t,n){return n(e,t)}async provideSignatureHelp(e,t,n,r,i){const o=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&o){const i=this.asTextDocumentIdentifier(e),s={textDocument:this.converter.toConcatDocument(i),position:this.converter.toConcatPosition(i,t),context:o.code2ProtocolConverter.asSignatureHelpParams(e,t,n).context},a=await o.sendRequest(c.SignatureHelpRequest.type,s,r);return o.protocol2CodeConverter.asSignatureHelp(a)}}async provideDefinition(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.DefinitionRequest.type,o,n),a=this.converter.toNotebookLocations(s);return i.protocol2CodeConverter.asDefinitionResult(a)}}async provideReferences(e,t,n,r,i){const o=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&o){const i=this.asTextDocumentIdentifier(e),s={textDocument:this.converter.toConcatDocument(i),position:this.converter.toConcatPosition(i,t),context:{includeDeclaration:n.includeDeclaration}},a=await o.sendRequest(c.ReferencesRequest.type,s,r),u=this.converter.toNotebookLocations(a);return o.protocol2CodeConverter.asReferences(u)}}async provideDocumentHighlights(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.DocumentHighlightRequest.type,o,n),a=this.converter.toNotebookHighlight(r,s);return i.protocol2CodeConverter.asDocumentHighlights(a)}}async provideDocumentSymbols(e,t,n){const r=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&r){const n=this.asTextDocumentIdentifier(e),i={textDocument:this.converter.toConcatDocument(n)},o=await r.sendRequest(c.DocumentSymbolRequest.type,i,t),s=this.converter.toNotebookSymbols(n,o),u=s?s[0]:void 0;if(a.DocumentSymbol.is(u))return r.protocol2CodeConverter.asDocumentSymbols(s);if(u)return r.protocol2CodeConverter.asSymbolInformations(s)}}async provideWorkspaceSymbols(e,t,n){const r=this.getClient();if(r){const n={query:e},i=await r.sendRequest(c.WorkspaceSymbolRequest.type,n,t),o=this.converter.toNotebookWorkspaceSymbols(i);return r.protocol2CodeConverter.asSymbolInformations(o)}}provideCodeActions(e,t,n,r,i){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideCodeActions not currently supported for notebooks")}provideCodeLenses(e,t,n){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideCodeLenses not currently supported for notebooks")}resolveCodeLens(e,t,n){return n(e,t)}provideDocumentFormattingEdits(e,t,n,r){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideDocumentFormattingEdits not currently supported for notebooks")}provideDocumentRangeFormattingEdits(e,t,n,r,i){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideDocumentRangeFormattingEdits not currently supported for notebooks")}provideOnTypeFormattingEdits(e,t,n,r,i,o){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideOnTypeFormattingEdits not currently supported for notebooks")}provideRenameEdits(e,t,n,r,i){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideRenameEdits not currently supported for notebooks")}prepareRename(e,t,n,r){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("prepareRename not currently supported for notebooks")}provideDocumentLinks(e,t,n){this.shouldProvideIntellisense(e.uri)&&this.traceInfo("provideDocumentLinks not currently supported for notebooks")}resolveDocumentLink(e,t,n){return n(e,t)}handleDiagnostics(e,t,n){try{const i=this.converter.toNotebookUri(e.toString()),o=i?s.Uri.parse(i):void 0,a=this.getClient();if(a&&o&&i!=e.toString()&&this.shouldProvideIntellisense(o)&&!((r=o).fragment.includes("vscode-interactive")||r.scheme.includes("vscode-interactive-input")||r.scheme.includes("vscode-interactive"))){const r=a.code2ProtocolConverter.asDiagnostics(t),i=this.converter.toNotebookDiagnosticsMap(e.toString(),r);[...i.keys()].forEach(e=>n(s.Uri.parse(e),a.protocol2CodeConverter.asDiagnostics(i.get(e))))}else n(e,[])}catch(t){this.traceInfo("Error during handling diagnostics: "+t),n(e,[])}var r}async provideTypeDefinition(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.TypeDefinitionRequest.type,o,n),a=this.converter.toNotebookLocations(s);return i.protocol2CodeConverter.asDefinitionResult(a)}}async provideImplementation(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.ImplementationRequest.type,o,n),a=this.converter.toNotebookLocations(s);return i.protocol2CodeConverter.asDefinitionResult(a)}}async provideDocumentColors(e,t,n){const r=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&r){const n=this.asTextDocumentIdentifier(e),i={textDocument:this.converter.toConcatDocument(n)},o=await r.sendRequest(c.DocumentColorRequest.type,i,t),s=this.converter.toNotebookColorInformations(n,o);return r.protocol2CodeConverter.asColorInformations(s)}}async provideColorPresentations(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(t.document.uri)&&i){const r=this.asTextDocumentIdentifier(t.document),o={textDocument:this.converter.toConcatDocument(r),range:this.converter.toRealRange(r,t.range),color:e},s=await i.sendRequest(c.ColorPresentationRequest.type,o,n),a=this.converter.toNotebookColorPresentations(r,s);return i.protocol2CodeConverter.asColorPresentations(a)}}async provideFoldingRanges(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const t=this.asTextDocumentIdentifier(e),r={textDocument:this.converter.toConcatDocument(t)},o=await i.sendRequest(c.FoldingRangeRequest.type,r,n),s=this.converter.toNotebookFoldingRanges(t,o);return i.protocol2CodeConverter.asFoldingRanges(s)}}async provideDeclaration(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.DeclarationRequest.type,o,n),a=this.converter.toNotebookLocations(s);return i.protocol2CodeConverter.asDeclarationResult(a)}}async provideSelectionRanges(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),positions:this.converter.toConcatPositions(r,t)},s=await i.sendRequest(c.SelectionRangeRequest.type,o,n),a=this.converter.toNotebookSelectionRanges(r,s);return i.protocol2CodeConverter.asSelectionRanges(a)}}async prepareCallHierarchy(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(c.CallHierarchyPrepareRequest.type,o,n),a=this.converter.toNotebookCallHierarchyItems(r,s);return i.protocol2CodeConverter.asCallHierarchyItems(a)}}async provideCallHierarchyIncomingCalls(e,t,n){const r=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&r){const n=this.asTextDocumentIdentifier(e.uri),i=this.converter.toConcatDocument(n),o=this.converter.toRealRange(n,e.range),s=this.converter.toRealRange(n,e.selectionRange),a={item:{...r.code2ProtocolConverter.asCallHierarchyItem(e),uri:i.uri,range:o,selectionRange:s}},u=await r.sendRequest(c.CallHierarchyIncomingCallsRequest.type,a,t),l=this.converter.toNotebookCallHierarchyIncomingCallItems(n,u);return r.protocol2CodeConverter.asCallHierarchyIncomingCalls(l)}}async provideCallHierarchyOutgoingCalls(e,t,n){const r=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&r){const n=this.asTextDocumentIdentifier(e.uri),i=this.converter.toConcatDocument(n),o=this.converter.toRealRange(n,e.range),s=this.converter.toRealRange(n,e.selectionRange),a={item:{...r.code2ProtocolConverter.asCallHierarchyItem(e),uri:i.uri,range:o,selectionRange:s}},u=await r.sendRequest(c.CallHierarchyOutgoingCallsRequest.type,a,t),l=this.converter.toNotebookCallHierarchyOutgoingCallItems(n,u);return r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l)}}async provideDocumentSemanticTokens(e,t,n){const r=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&r){const n=this.asTextDocumentIdentifier(e),i={textDocument:this.converter.toConcatDocument(n),range:this.converter.toRealRange(n,void 0)},o=await r.sendRequest(a.SemanticTokensRangeRequest.type,i,t),s=this.converter.toNotebookSemanticTokens(n,o);return r.protocol2CodeConverter.asSemanticTokens(s)}}async provideDocumentSemanticTokensEdits(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const t=this.asTextDocumentIdentifier(e),r={textDocument:this.converter.toConcatDocument(t),range:this.converter.toRealRange(t,void 0)},o=await i.sendRequest(a.SemanticTokensRangeRequest.type,r,n),s=this.converter.toNotebookSemanticTokens(t,o);return i.protocol2CodeConverter.asSemanticTokens(s)}}async provideDocumentRangeSemanticTokens(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),range:this.converter.toRealRange(r,t)},s=await i.sendRequest(a.SemanticTokensRangeRequest.type,o,n),c=this.converter.toNotebookSemanticTokens(r,s);return i.protocol2CodeConverter.asSemanticTokens(c)}}async provideLinkedEditingRange(e,t,n,r){const i=this.getClient();if(this.shouldProvideIntellisense(e.uri)&&i){const r=this.asTextDocumentIdentifier(e),o={textDocument:this.converter.toConcatDocument(r),position:this.converter.toConcatPosition(r,t)},s=await i.sendRequest(a.LinkedEditingRangeRequest.type,o,n),c=this.converter.toNotebookLinkedEditingRanges(r,s);return i.protocol2CodeConverter.asLinkedEditingRanges(c)}}shouldProvideIntellisense(e){return this.isDocumentAllowed(e)}asTextDocumentIdentifier(e){return{uri:"uri"in e?e.uri.toString():e.toString()}}asTextDocumentItem(e){return{uri:e.uri.toString(),text:e.getText(),languageId:e.languageId,version:e.version}}}class p{constructor(e,t,n,i,o){this.getClient=e,this.selector=t,this.pythonPath=n,this.isDocumentAllowed=i,this.getNotebookHeader=o,this.workspace={configuration:async(e,t,n)=>{let i=n(e,t);if(r(i)&&(i=await i),i instanceof c.ResponseError)return i;for(const[t,n]of e.items.entries())"python"===n.section&&(i[t].pythonPath=this.pythonPath,i[t].notebookHeader=this.getNotebookHeader(n.scopeUri?s.Uri.parse(n.scopeUri):s.Uri.parse("")));return i}},this.handleDiagnostics=this.handleDiagnostics.bind(this),this.didOpen=this.didOpen.bind(this)}dispose(){}stopWatching(e){const t=this.getClient();t&&e.cellCount>0&&(e.getCells().forEach(e=>{const n=t.code2ProtocolConverter.asCloseTextDocumentParams(e.document);t.sendNotification(c.DidCloseTextDocumentNotification.type,n)}),t.diagnostics&&e.getCells().forEach(e=>{var n;null===(n=t.diagnostics)||void 0===n||n.set(e.document.uri,[])}))}startWatching(e){const t=this.getClient();t&&e.cellCount>0&&e.getCells().forEach(e=>{this.didOpen(e.document,e=>{const n=t.code2ProtocolConverter.asOpenTextDocumentParams(e);t.sendNotification(c.DidOpenTextDocumentNotification.type,n)})})}didOpen(e,t){t(e)}refresh(e){const t=this.getClient();if(t){const n={cells:e.getCells().filter(e=>d(e.document,this.selector)).map(e=>({textDocument:{uri:e.document.uri.toString(),version:e.document.version,languageId:e.document.languageId,text:e.document.getText()}}))};t.sendNotification("notebook/refresh",n)}}provideCompletionItem(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}provideHover(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}resolveCompletionItem(e,t,n){return n(e,t)}provideSignatureHelp(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}provideDefinition(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideReferences(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}provideDocumentHighlights(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDocumentSymbols(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}provideWorkspaceSymbols(e,t,n){return n(e,t)}provideCodeActions(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}provideCodeLenses(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}resolveCodeLens(e,t,n){return n(e,t)}provideDocumentFormattingEdits(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDocumentRangeFormattingEdits(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}provideOnTypeFormattingEdits(e,t,n,r,i,o){if(this.shouldProvideIntellisense(e.uri))return o(e,t,n,r,i)}provideRenameEdits(e,t,n,r,i){if(this.shouldProvideIntellisense(e.uri))return i(e,t,n,r)}prepareRename(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDocumentLinks(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}resolveDocumentLink(e,t,n){return n(e,t)}handleDiagnostics(e,t,n){if(this.shouldProvideIntellisense(e))return n(e,t);n(e,[])}provideTypeDefinition(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideImplementation(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDocumentColors(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}provideColorPresentations(e,t,n,r){if(this.shouldProvideIntellisense(t.document.uri))return r(e,t,n)}provideFoldingRanges(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDeclaration(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideSelectionRanges(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}prepareCallHierarchy(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideCallHierarchyIncomingCalls(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}provideCallHierarchyOutgoingCalls(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}provideDocumentSemanticTokens(e,t,n){if(this.shouldProvideIntellisense(e.uri))return n(e,t)}provideDocumentSemanticTokensEdits(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideDocumentRangeSemanticTokens(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}provideLinkedEditingRange(e,t,n,r){if(this.shouldProvideIntellisense(e.uri))return r(e,t,n)}shouldProvideIntellisense(e){return this.isDocumentAllowed(e)}}function f(){return new o}function g(e,t,n,r,i,o){return new h(e,t,n,r,i,o)}function m(e,t,n,r,i){return new p(e,t,n,r,i)}}])},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageServerOutputChannel=void 0;const o=n(0),s=n(4);n(12);const a=n(14);let c=class{constructor(e,t){this.appShell=e,this.commandManager=t,this.registered=!1}get channel(){return this.output||(this.output=this.appShell.createOutputChannel(a.OutputChannelNames.languageServer()),this.registerCommand().ignoreErrors()),this.output}async registerCommand(){this.registered||(this.registered=!0,await this.commandManager.executeCommand("setContext","python.hasLanguageServerOutputChannel",!0),this.commandManager.registerCommand("python.viewLanguageServerOutput",()=>this.output.show(!0)))}};c=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IApplicationShell)),i(1,(0,o.inject)(s.ICommandManager))],c),t.LanguageServerOutputChannel=c},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageServerActivator=void 0;const o=n(0),s=n(223),a=n(83),c=n(4),u=n(10),l=n(13),d=n(1),h=n(14),p=n(301),f=n(276),g=n(21);let m=class extends p.LanguageServerActivatorBase{constructor(e,t,n,r,i,o,s){super(e,t,n,r),this.extensions=i,this.appShell=o,this.commandManager=s}async ensureLanguageServerIsAvailable(e){if(!1!==this.configurationService.getSettings(e).downloadLanguageServer&&!this.extensions.getExtension(u.PYLANCE_EXTENSION_ID))throw await(0,f.promptForPylanceInstall)(this.appShell,this.commandManager,this.workspace,this.configurationService),new Error(h.Pylance.pylanceNotInstalledMessage())}resolveCompletionItem(e,t){return this.handleResolveCompletionItem(e,t)}async handleResolveCompletionItem(e,t){const n=this.getLanguageClient();if(n){const r=new s.default("string"==typeof e.label?e.label:e.label.label);Object.assign(r,e);const i=n.code2ProtocolConverter.asCompletionItem(r),o=await n.sendRequest(a.CompletionResolveRequest.type,i,t);if(o)return n.protocol2CodeConverter.asCompletionItem(o)}}};m=r([(0,o.injectable)(),i(0,(0,o.inject)(g.ILanguageServerManager)),i(1,(0,o.inject)(c.IWorkspaceService)),i(2,(0,o.inject)(l.IFileSystem)),i(3,(0,o.inject)(d.IConfigurationService)),i(4,(0,o.inject)(d.IExtensions)),i(5,(0,o.inject)(c.IApplicationShell)),i(6,(0,o.inject)(c.ICommandManager))],m),t.NodeLanguageServerActivator=m},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageServerAnalysisOptions=void 0;const o=n(0),s=n(4),a=n(277),c=n(21);let u=class extends a.LanguageServerAnalysisOptionsBase{constructor(e,t){super(e,t)}async getInitializationOptions(){return{experimentationSupport:!0,trustedWorkspaceSupport:!0}}};u=r([(0,o.injectable)(),i(0,(0,o.inject)(c.ILanguageServerOutputChannel)),i(1,(0,o.inject)(s.IWorkspaceService))],u),t.NodeLanguageServerAnalysisOptions=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageClientFactory=void 0;const o=n(0),s=n(3),a=n(83),c=n(10),u=n(13),l=n(21);let d=class{constructor(e,t){this.fs=e,this.languageServerFolderService=t}async createLanguageClient(e,t,r){var i;const o=(null===(i=r.connectionOptions)||void 0===i?void 0:i.cancellationStrategy).getCommandLineArguments(),u=await this.languageServerFolderService.getLanguageServerFolderName(e),l=s.isAbsolute(u)?u:s.join(c.EXTENSION_ROOT_DIR,u),d=s.join(l,"server.bundle.js"),h=s.join(l,"server.js"),p=await this.fs.fileExists(h)?h:d,f={run:{module:d,transport:a.TransportKind.ipc,args:o},debug:{module:p,transport:a.TransportKind.ipc,options:{execArgv:["--nolazy","--inspect=6600"]},args:o}};return new(n(83).LanguageClient)(c.PYTHON_LANGUAGE,"Python Tools",f,r)}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IFileSystem)),i(1,(0,o.inject)(l.ILanguageServerFolderService))],d),t.NodeLanguageClientFactory=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageServerFolderService=void 0;const o=n(79),s=n(0),a=n(3),c=n(97),u=n(10),l=n(1);let d=class{constructor(e){this.extensions=e}async skipDownload(){return void 0!==await this.lsExtensionApi()}async getLanguageServerFolderName(e){const t=await this.languageServerFolder();if(t)return o.ok(a.isAbsolute(t.path)),t.path;throw new Error(u.PYLANCE_EXTENSION_ID+" not installed")}async getCurrentLanguageServerDirectory(){const e=await this.languageServerFolder();if(e)return o.ok(a.isAbsolute(e.path)),{path:e.path,version:new c.SemVer(e.version)};throw new Error(u.PYLANCE_EXTENSION_ID+" not installed")}async languageServerFolder(){const e=await this.lsExtensionApi();if(null==e?void 0:e.languageServerFolder)return e.languageServerFolder()}async lsExtensionApi(){const e=this.extensions.getExtension(u.PYLANCE_EXTENSION_ID);if(e)return e.isActive?e.exports:e.activate()}};d=r([(0,s.injectable)(),i(0,(0,s.inject)(l.IExtensions))],d),t.NodeLanguageServerFolderService=d},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageServerProxy=void 0,n(12);const s=n(0),a=n(83),c=n(1),u=n(16),l=n(22),d=n(95),h=n(8),p=n(9),f=n(295),g=n(296),m=n(21),v=n(5),y=n(4);var b,_;!function(e){e.Method="python/inExperiment"}(b||(b={})),function(e){e.Method="python/getExperimentValue"}(_||(_={}));let S=r=class{constructor(e,t,n,r,i,o,s){this.factory=e,this.configurationService=t,this.folderService=n,this.experimentService=r,this.interpreterPathService=i,this.environmentService=o,this.workspace=s,this.disposables=[],this.disposed=!1,this.startupCompleted=(0,u.createDeferred)()}static versionTelemetryProps(e){return{lsVersion:e.lsVersion}}dispose(){for(this.languageClient&&(this.languageClient.stop().then(l.noop,e=>(0,v.traceError)("Stopping language client failed",e)),this.languageClient=void 0),this.cancellationStrategy&&(this.cancellationStrategy.dispose(),this.cancellationStrategy=void 0);this.disposables.length>0;){this.disposables.shift().dispose()}this.startupCompleted.completed&&(this.startupCompleted.reject(new Error("Disposed language server")),this.startupCompleted=(0,u.createDeferred)()),this.disposed=!0}async start(e,t,n){if(this.languageClient)await this.startupCompleted.promise;else{const r=await this.folderService.getCurrentLanguageServerDirectory();if(this.lsVersion=null==r?void 0:r.version.format(),this.cancellationStrategy=new f.FileBasedCancellationStrategy,n.connectionOptions={cancellationStrategy:this.cancellationStrategy},this.languageClient=await this.factory.createLanguageClient(e,t,n),this.languageClient.onDidChangeState(t=>{t.newState===a.State.Running&&this.registerHandlers(e)}),this.disposables.push(this.workspace.onDidGrantWorkspaceTrust(()=>{this.languageClient.onReady().then(()=>{this.languageClient.sendNotification("python/workspaceTrusted",{isTrusted:!0})})})),this.disposables.push(this.languageClient.start()),await this.serverReady(),this.disposed)return}}loadExtension(e){}async serverReady(){for(;this.languageClient&&!this.languageClient.initializeResult;)await(0,u.sleep)(100);this.languageClient&&await this.languageClient.onReady(),this.startupCompleted.resolve()}registerHandlers(e){if(this.disposed)return;const t=new g.ProgressReporting(this.languageClient);this.disposables.push(t),this.disposables.push(this.interpreterPathService.onDidChange(()=>{this.languageClient.sendNotification(a.DidChangeConfigurationNotification.type,{settings:null})})),this.disposables.push(this.environmentService.onDidEnvironmentVariablesChange(()=>{this.languageClient.sendNotification(a.DidChangeConfigurationNotification.type,{settings:null})}));this.configurationService.getSettings(e).downloadLanguageServer&&this.languageClient.onTelemetry(e=>{var t;const n=e.EventName||p.EventName.LANGUAGE_SERVER_TELEMETRY,r={...e.Properties,method:null===(t=e.Properties.method)||void 0===t?void 0:t.replace(/\//g,".")};(0,h.sendTelemetryEvent)(n,e.Measurements,r,e.Exception)}),this.languageClient.onRequest(b.Method,async e=>({inExperiment:await this.experimentService.inExperiment(e.experimentName)})),this.languageClient.onRequest(_.Method,async e=>({value:await this.experimentService.getExperimentValue(e.experimentName)})),this.disposables.push(this.languageClient.onRequest("python/isTrustedWorkspace",async()=>({isTrusted:this.workspace.isTrusted})))}};i([(0,v.traceDecoratorVerbose)("Stopping language server")],S.prototype,"dispose",null),i([(0,v.traceDecoratorError)("Failed to start language server"),(0,h.captureTelemetry)(p.EventName.LANGUAGE_SERVER_ENABLED,void 0,!0,void 0,r.versionTelemetryProps)],S.prototype,"start",null),i([(0,h.captureTelemetry)(p.EventName.LANGUAGE_SERVER_READY,void 0,!0,void 0,r.versionTelemetryProps)],S.prototype,"serverReady",null),S=r=i([(0,s.injectable)(),o(0,(0,s.inject)(m.ILanguageClientFactory)),o(1,(0,s.inject)(c.IConfigurationService)),o(2,(0,s.inject)(m.ILanguageServerFolderService)),o(3,(0,s.inject)(c.IExperimentService)),o(4,(0,s.inject)(c.IInterpreterPathService)),o(5,(0,s.inject)(d.IEnvironmentVariablesProvider)),o(6,(0,s.inject)(y.IWorkspaceService))],S),t.NodeLanguageServerProxy=S},function(e,t,n){"use strict";var r,i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLanguageServerManager=void 0,n(12);const s=n(0),a=n(4),c=n(53),u=n(15),l=n(8),d=n(9),h=n(299),p=n(300),f=n(21),g=n(5);let m=r=class{constructor(e,t,n,r){this.serviceContainer=e,this.analysisOptions=t,this.folderService=n,this.disposables=[],this.connected=!1,this.disposables.push(r.registerCommand(h.Commands.RestartLS,()=>{this.restartLanguageServer().ignoreErrors()}))}static versionTelemetryProps(e){return{lsVersion:e.lsVersion}}dispose(){this.languageProxy&&this.languageProxy.dispose(),this.disposables.forEach(e=>e.dispose())}get languageProxy(){return this.languageServerProxy}async start(e,t){if(this.languageProxy)throw new Error("Language server already started");this.resource=e,this.interpreter=t,this.analysisOptions.onDidChange(this.restartLanguageServerDebounced,this,this.disposables);const n=await this.folderService.getCurrentLanguageServerDirectory();this.lsVersion=null==n?void 0:n.version.format(),await this.analysisOptions.initialize(e,t),await this.startLanguageServer()}connect(){var e;this.connected=!0,null===(e=this.middleware)||void 0===e||e.connect()}disconnect(){var e;this.connected=!1,null===(e=this.middleware)||void 0===e||e.disconnect()}restartLanguageServerDebounced(){this.restartLanguageServer().ignoreErrors()}async restartLanguageServer(){this.languageProxy&&this.languageProxy.dispose(),await this.startLanguageServer()}async startLanguageServer(){this.languageServerProxy=this.serviceContainer.get(f.ILanguageServerProxy);const e=await this.analysisOptions.getAnalysisOptions();e.middleware=this.middleware=new p.LanguageClientMiddleware(this.serviceContainer,f.LanguageServerType.Node,this.lsVersion),this.connected&&this.middleware.connect(),await this.languageServerProxy.start(this.resource,this.interpreter,e)}};i([(0,g.traceDecoratorError)("Failed to start language server")],m.prototype,"start",null),i([(0,c.debounceSync)(1e3)],m.prototype,"restartLanguageServerDebounced",null),i([(0,g.traceDecoratorError)("Failed to restart language server"),(0,g.traceDecoratorVerbose)("Restarting language server")],m.prototype,"restartLanguageServer",null),i([(0,l.captureTelemetry)(d.EventName.LANGUAGE_SERVER_STARTUP,void 0,!0,void 0,r.versionTelemetryProps),(0,g.traceDecoratorVerbose)("Starting language server")],m.prototype,"startLanguageServer",null),m=r=i([(0,s.injectable)(),o(0,(0,s.inject)(u.IServiceContainer)),o(1,(0,s.inject)(f.ILanguageServerAnalysisOptions)),o(1,(0,s.named)(f.LanguageServerType.Node)),o(2,(0,s.inject)(f.ILanguageServerFolderService)),o(3,(0,s.inject)(a.ICommandManager))],m),t.NodeLanguageServerManager=m},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.NoLanguageServerExtensionActivator=void 0;const i=n(0);let o=class{async start(e,t){}dispose(){}activate(){}deactivate(){}provideRenameEdits(e,t,n,r){return null}provideDefinition(e,t,n){return null}provideHover(e,t,n){return null}provideReferences(e,t,n,r){return null}provideCompletionItems(e,t,n,r){return null}provideCodeLenses(e,t){return null}provideDocumentSymbols(e,t){return null}provideSignatureHelp(e,t,n,r){return null}};o=r([(0,i.injectable)()],o),t.NoLanguageServerExtensionActivator=o},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediLanguageServerActivator=void 0;const o=n(0),s=n(4),a=n(13),c=n(1),u=n(301),l=n(21);let d=class extends u.LanguageServerActivatorBase{constructor(e,t,n,r){super(e,t,n,r)}async ensureLanguageServerIsAvailable(e){}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(l.ILanguageServerManager)),i(1,(0,o.inject)(s.IWorkspaceService)),i(2,(0,o.inject)(a.IFileSystem)),i(3,(0,o.inject)(c.IConfigurationService))],d),t.JediLanguageServerActivator=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadLanguageServerExtension=void 0;const o=n(0),s=n(4),a=n(1);let c=class{constructor(e,t){this.commandManager=e,this.disposables=t,this.supportedWorkspaceTypes={untrustedWorkspace:!0,virtualWorkspace:!0}}activate(){const e=this.commandManager.registerCommand("python._loadLanguageServerExtension",()=>{});return this.disposables.push(e),Promise.resolve()}};c=r([(0,o.injectable)(),i(0,(0,o.inject)(s.ICommandManager)),i(1,(0,o.inject)(a.IDisposableRegistry))],c),t.LoadLanguageServerExtension=c},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PartialModeStatusItem=void 0;const o=n(0),s=n(4),a=n(1),c=n(14);let u=class{constructor(e,t){this.workspace=e,this.disposables=t,this.supportedWorkspaceTypes={untrustedWorkspace:!0,virtualWorkspace:!0}}async activate(){const{isTrusted:e,isVirtualWorkspace:t}=this.workspace;if(e&&!t)return;const n=this.createStatusItem();n&&this.disposables.push(n)}createStatusItem(){const e=n(2);if("createLanguageStatusItem"in e.languages){const t=e.languages.createLanguageStatusItem("python.projectStatus",{language:"python"});return t.name=c.LanguageService.statusItem.name(),t.severity=e.LanguageStatusSeverity.Warning,t.text=c.LanguageService.statusItem.text(),t.detail=this.workspace.isTrusted?c.LanguageService.virtualWorkspaceStatusItem.detail():c.LanguageService.statusItem.detail(),t.command={title:c.Common.learnMore(),command:"vscode.open",arguments:[e.Uri.parse("https://aka.ms/AAdzyh4")]},t}}};u=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IWorkspaceService)),i(1,(0,o.inject)(a.IDisposableRegistry))],u),t.PartialModeStatusItem=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(541),i=n(558),o=n(31);t.registerTypes=function(e){e.addSingleton(o.ISourceMapSupportService,i.SourceMapSupportService),(0,r.registerTypes)(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(213),i=n(542),o=n(543),s=n(544),a=n(302),c=n(545),u=n(546),l=n(303),d=n(548),h=n(549),p=n(550),f=n(551),g=n(552),m=n(553),v=n(98),y=n(557),b=n(55),_=n(31);t.registerTypes=function(e){e.addSingleton(_.IDiagnosticFilterService,y.DiagnosticFilterService),e.addSingleton(_.IDiagnosticHandlerService,b.DiagnosticCommandPromptHandlerService,b.DiagnosticCommandPromptHandlerServiceId),e.addSingleton(_.IDiagnosticsService,o.EnvironmentPathVariableDiagnosticsService,o.EnvironmentPathVariableDiagnosticsServiceId),e.addSingleton(_.IDiagnosticsService,s.InvalidLaunchJsonDebuggerService,s.InvalidLaunchJsonDebuggerServiceId),e.addSingleton(_.IDiagnosticsService,h.InvalidPythonInterpreterService,h.InvalidPythonInterpreterServiceId),e.addSingleton(_.IDiagnosticsService,a.InvalidPythonPathInDebuggerService,a.InvalidPythonPathInDebuggerServiceId),e.addSingleton(_.IDiagnosticsService,l.PowerShellActivationHackDiagnosticsService,l.PowerShellActivationHackDiagnosticsServiceId),e.addSingleton(_.IDiagnosticsService,u.InvalidMacPythonInterpreterService,u.InvalidMacPythonInterpreterServiceId),e.addSingleton(_.IDiagnosticsService,p.PythonPathDeprecatedDiagnosticService,p.PythonPathDeprecatedDiagnosticServiceId),e.addSingleton(_.IDiagnosticsService,d.PylanceDefaultDiagnosticService,d.PylanceDefaultDiagnosticServiceId),e.addSingleton(_.IDiagnosticsService,c.JediPython27NotSupportedDiagnosticService,c.JediPython27NotSupportedDiagnosticServiceId),e.addSingleton(_.IDiagnosticsService,f.SwitchToDefaultLanguageServerDiagnosticService,f.SwitchToDefaultLanguageServerDiagnosticServiceId),e.addSingleton(_.IDiagnosticsService,g.SwitchToPreReleaseExtensionDiagnosticService,g.SwitchToPreReleaseExtensionDiagnosticServiceId),e.addSingleton(v.IDiagnosticsCommandFactory,m.DiagnosticsCommandFactory),e.addSingleton(r.IApplicationDiagnostics,i.ApplicationDiagnostics)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationDiagnostics=void 0;const o=n(0),s=n(2),a=n(4),c=n(10),u=n(15),l=n(5),d=n(31);async function h(e,t){await Promise.all(e.map(async e=>{const n=await e.diagnose(t);n.length>0&&(!function(e){e.forEach(e=>{const t=`Diagnostic Code: ${e.code}, Message: ${e.message}`;switch(e.severity){case s.DiagnosticSeverity.Error:case s.DiagnosticSeverity.Warning:(0,l.traceLog)(t);break;default:(0,l.traceInfo)(t)}})}(n),await e.handle(n))}))}let p=class{constructor(e){this.serviceContainer=e}register(){this.serviceContainer.get(d.ISourceMapSupportService).register()}async performPreStartupHealthCheck(e){if((0,c.isTestExecution)())return;let t=this.serviceContainer.getAll(d.IDiagnosticsService);this.serviceContainer.get(a.IWorkspaceService).isTrusted||(t=t.filter(e=>e.runInUntrustedWorkspace)),await h(t.filter(e=>!e.runInBackground),e),h(t.filter(e=>e.runInBackground),e).ignoreErrors()}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IServiceContainer))],p),t.ApplicationDiagnostics=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentPathVariableDiagnosticsService=t.EnvironmentPathVariableDiagnosticsServiceId=void 0;const o=n(0),s=n(2),a=n(4);n(12);const c=n(13),u=n(1),l=n(15),d=n(66),h=n(98),p=n(67),f=n(55),g=n(31),m="The environment variable '{0}' seems to have some paths containing the '\"' character. The existence of such a character is known to have caused the {1} extension to not load. If the extension fails to load please modify your paths to remove this '\"' character.";class v extends d.BaseDiagnostic{constructor(e,t){super(p.DiagnosticCodes.InvalidEnvironmentPathVariableDiagnostic,e,s.DiagnosticSeverity.Warning,g.DiagnosticScope.Global,t)}}t.EnvironmentPathVariableDiagnosticsServiceId="EnvironmentPathVariableDiagnosticsServiceId";let y=class extends d.BaseDiagnosticsService{constructor(e,t){super([p.DiagnosticCodes.InvalidEnvironmentPathVariableDiagnostic],e,t,!0,!0),this.platform=this.serviceContainer.get(c.IPlatformService),this.messageService=e.get(g.IDiagnosticHandlerService,f.DiagnosticCommandPromptHandlerServiceId)}async diagnose(e){if(this.platform.isWindows&&this.doesPathVariableHaveInvalidEntries()){const t=this.serviceContainer.get(a.IApplicationEnvironment),n=m.format(this.platform.pathVariableName,t.extensionName);return[new v(n,e)]}return[]}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];if(await this.filterService.shouldIgnoreDiagnostic(t.code))return;const n=this.serviceContainer.get(h.IDiagnosticsCommandFactory),r=[{prompt:"Ignore"},{prompt:"Always Ignore",command:n.createCommand(t,{type:"ignore",options:g.DiagnosticScope.Global})},{prompt:"More Info",command:n.createCommand(t,{type:"launch",options:"https://aka.ms/Niq35h"})}];await this.messageService.handle(t,{commandPrompts:r})}doesPathVariableHaveInvalidEntries(){const e=this.serviceContainer.get(u.ICurrentProcess).env[this.platform.pathVariableName],t=this.serviceContainer.get(u.IPathUtils).delimiter;return(e||"").split(t).filter(e=>e.indexOf('"')>=0).length>0}};y=r([(0,o.injectable)(),i(0,(0,o.inject)(l.IServiceContainer)),i(1,(0,o.inject)(u.IDisposableRegistry))],y),t.EnvironmentPathVariableDiagnosticsService=y},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidLaunchJsonDebuggerService=t.InvalidLaunchJsonDebuggerServiceId=t.InvalidLaunchJsonDebuggerDiagnostic=void 0;const o=n(0),s=n(3),a=n(2),c=n(4);n(12);const u=n(13),l=n(1),d=n(14),h=n(15),p=n(66),f=n(67),g=n(55),m=n(31),v={[f.DiagnosticCodes.InvalidDebuggerTypeDiagnostic]:d.Diagnostics.invalidDebuggerTypeDiagnostic(),[f.DiagnosticCodes.JustMyCodeDiagnostic]:d.Diagnostics.justMyCodeDiagnostic(),[f.DiagnosticCodes.ConsoleTypeDiagnostic]:d.Diagnostics.consoleTypeDiagnostic(),[f.DiagnosticCodes.ConfigPythonPathDiagnostic]:""};class y extends p.BaseDiagnostic{constructor(e,t,n=!0){super(e,v[e],a.DiagnosticSeverity.Error,m.DiagnosticScope.WorkspaceFolder,t,"always",n)}}t.InvalidLaunchJsonDebuggerDiagnostic=y,t.InvalidLaunchJsonDebuggerServiceId="InvalidLaunchJsonDebuggerServiceId";let b=class extends p.BaseDiagnosticsService{constructor(e,t,n,r,i){super([f.DiagnosticCodes.InvalidDebuggerTypeDiagnostic,f.DiagnosticCodes.JustMyCodeDiagnostic,f.DiagnosticCodes.ConsoleTypeDiagnostic,f.DiagnosticCodes.ConfigPythonPathDiagnostic],e,n,!0),this.fs=t,this.workspaceService=r,this.messageService=i}async diagnose(e){if(!this.workspaceService.hasWorkspaceFolders)return[];const t=e?this.workspaceService.getWorkspaceFolder(e):this.workspaceService.workspaceFolders[0];return this.diagnoseWorkspace(t,e)}async onHandle(e){e.forEach(e=>this.handleDiagnostic(e))}async fixLaunchJson(e){this.workspaceService.hasWorkspaceFolders&&await Promise.all(this.workspaceService.workspaceFolders.map(t=>this.fixLaunchJsonInWorkspace(e,t)))}async diagnoseWorkspace(e,t){const n=S(e);if(!await this.fs.fileExists(n))return[];const r=await this.fs.readFile(n),i=[];return r.indexOf('"pythonExperimental"')>0&&i.push(new y(f.DiagnosticCodes.InvalidDebuggerTypeDiagnostic,t)),r.indexOf('"debugStdLib"')>0&&i.push(new y(f.DiagnosticCodes.JustMyCodeDiagnostic,t)),r.indexOf('"console": "none"')>0&&i.push(new y(f.DiagnosticCodes.ConsoleTypeDiagnostic,t)),(r.indexOf('"pythonPath":')>0||r.indexOf("{config:python.pythonPath}")>0||r.indexOf("{config:python.interpreterPath}")>0)&&i.push(new y(f.DiagnosticCodes.ConfigPythonPathDiagnostic,t,!1)),i}async handleDiagnostic(e){if(!this.canHandle(e))return;if(!e.shouldShowPrompt)return void await this.fixLaunchJson(e.code);const t=[{prompt:d.Diagnostics.yesUpdateLaunch(),command:{diagnostic:e,invoke:async()=>{await this.fixLaunchJson(e.code)}}},{prompt:d.Common.noIWillDoItLater()}];await this.messageService.handle(e,{commandPrompts:t})}async fixLaunchJsonInWorkspace(e,t){if(0===(await this.diagnoseWorkspace(t,void 0)).length)return;const n=S(t);let r=await this.fs.readFile(n);switch(e){case f.DiagnosticCodes.InvalidDebuggerTypeDiagnostic:r=_(r,'"pythonExperimental"','"python"'),r=_(r,'"Python Experimental:','"Python:');break;case f.DiagnosticCodes.JustMyCodeDiagnostic:r=_(r,'"debugStdLib": false','"justMyCode": true'),r=_(r,'"debugStdLib": true','"justMyCode": false');break;case f.DiagnosticCodes.ConsoleTypeDiagnostic:r=_(r,'"console": "none"','"console": "internalConsole"');break;case f.DiagnosticCodes.ConfigPythonPathDiagnostic:r=_(r,'"pythonPath":','"python":'),r=_(r,"{config:python.pythonPath}","{command:python.interpreterPath}"),r=_(r,"{config:python.interpreterPath}","{command:python.interpreterPath}");break;default:return}await this.fs.writeFile(n,r)}};function _(e,t,n){const r=new RegExp(t,"g");return e.replace(r,n)}function S(e){return s.join(e.uri.fsPath,".vscode","launch.json")}b=r([(0,o.injectable)(),i(0,(0,o.inject)(h.IServiceContainer)),i(1,(0,o.inject)(u.IFileSystem)),i(2,(0,o.inject)(l.IDisposableRegistry)),i(3,(0,o.inject)(c.IWorkspaceService)),i(4,(0,o.inject)(m.IDiagnosticHandlerService)),i(4,(0,o.named)(g.DiagnosticCommandPromptHandlerServiceId))],b),t.InvalidLaunchJsonDebuggerService=b},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.JediPython27NotSupportedDiagnosticService=t.JediPython27NotSupportedDiagnosticServiceId=t.JediPython27NotSupportedDiagnostic=void 0;const o=n(0),s=n(2),a=n(21),c=n(4),u=n(1),l=n(14),d=n(11),h=n(15),p=n(66),f=n(98),g=n(67),m=n(55),v=n(31);class y extends p.BaseDiagnostic{constructor(e,t){super(g.DiagnosticCodes.JediPython27NotSupportedDiagnostic,e,s.DiagnosticSeverity.Warning,v.DiagnosticScope.Global,t)}}t.JediPython27NotSupportedDiagnostic=y,t.JediPython27NotSupportedDiagnosticServiceId="JediPython27NotSupportedDiagnosticServiceId";let b=class extends p.BaseDiagnosticsService{constructor(e,t,n,r,i,o){super([g.DiagnosticCodes.JediPython27NotSupportedDiagnostic],e,o,!0),this.interpreterService=t,this.workspaceService=n,this.configurationService=r,this.messageService=i}async diagnose(e){var t,n;const r=await this.interpreterService.getActiveInterpreter(e),{languageServer:i}=this.configurationService.getSettings(e);return await this.updateLanguageServerSetting(e),r&&(null!==(n=null===(t=r.version)||void 0===t?void 0:t.major)&&void 0!==n?n:0)<3&&i===a.LanguageServerType.Jedi?[new y(l.Python27Support.jediMessage(),e)]:[]}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];if(await this.filterService.shouldIgnoreDiagnostic(t.code))return;const n=this.serviceContainer.get(f.IDiagnosticsCommandFactory),r=[{prompt:l.Common.gotIt()},{prompt:l.Common.doNotShowAgain(),command:n.createCommand(t,{type:"ignore",options:v.DiagnosticScope.Global})}];await this.messageService.handle(t,{commandPrompts:r})}async updateLanguageServerSetting(e){const t=this.workspaceService.getConfiguration("python",e).inspect("languageServer");let n;if((null==t?void 0:t.workspaceValue)===a.LanguageServerType.JediLSP)n=s.ConfigurationTarget.Workspace;else{if((null==t?void 0:t.globalValue)!==a.LanguageServerType.JediLSP)return;n=s.ConfigurationTarget.Global}await this.configurationService.updateSetting("languageServer",a.LanguageServerType.Jedi,e,n)}};b=r([i(0,(0,o.inject)(h.IServiceContainer)),i(1,(0,o.inject)(d.IInterpreterService)),i(2,(0,o.inject)(c.IWorkspaceService)),i(3,(0,o.inject)(u.IConfigurationService)),i(4,(0,o.inject)(v.IDiagnosticHandlerService)),i(4,(0,o.named)(m.DiagnosticCommandPromptHandlerServiceId)),i(5,(0,o.inject)(u.IDisposableRegistry))],b),t.JediPython27NotSupportedDiagnosticService=b},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidMacPythonInterpreterService=t.InvalidMacPythonInterpreterServiceId=t.InvalidMacPythonInterpreterDiagnostic=void 0;const o=n(0),s=n(2);n(12);const a=n(13),c=n(1),u=n(11),l=n(15),d=n(30),h=n(66),p=n(98),f=n(67),g=n(55),m=n(31),v={[f.DiagnosticCodes.MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic]:"You have selected the macOS system install of Python, which is not recommended for use with the Python extension. Some functionality will be limited, please select a different interpreter.",[f.DiagnosticCodes.MacInterpreterSelectedAndNoOtherInterpretersDiagnostic]:"The macOS system install of Python is not recommended, some functionality in the extension will be limited. Install another version of Python for the best experience."};class y extends h.BaseDiagnostic{constructor(e,t){super(e,v[e],s.DiagnosticSeverity.Error,m.DiagnosticScope.WorkspaceFolder,t)}}t.InvalidMacPythonInterpreterDiagnostic=y,t.InvalidMacPythonInterpreterServiceId="InvalidMacPythonInterpreterServiceId";let b=class extends h.BaseDiagnosticsService{constructor(e,t,n,r,i){super([f.DiagnosticCodes.MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic,f.DiagnosticCodes.MacInterpreterSelectedAndNoOtherInterpretersDiagnostic],e,n,!0),this.interpreterService=t,this.platform=r,this.helper=i,this.changeThrottleTimeout=1e3,this.addPythonPathChangedHandler()}dispose(){this.timeOut&&"number"!=typeof this.timeOut&&(clearTimeout(this.timeOut),this.timeOut=void 0)}async diagnose(e){if(!this.platform.isMac)return[];const t=this.serviceContainer.get(c.IConfigurationService).getSettings(e);if(!0===t.disableInstallationChecks)return[];if(!await this.interpreterService.hasInterpreters())return[];const n=await this.interpreterService.getActiveInterpreter(e);return n&&await this.helper.isMacDefaultPythonPath(t.pythonPath)&&n&&n.envType===d.EnvironmentType.Unknown?await this.interpreterService.hasInterpreters(e=>this.helper.isMacDefaultPythonPath(e.path).then(e=>!e))?[new y(f.DiagnosticCodes.MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic,e)]:[new y(f.DiagnosticCodes.MacInterpreterSelectedAndNoOtherInterpretersDiagnostic,e)]:[]}async onHandle(e){if(0===e.length)return;const t=this.serviceContainer.get(m.IDiagnosticHandlerService,g.DiagnosticCommandPromptHandlerServiceId);await Promise.all(e.map(async e=>{const n=await this.canHandle(e),r=await this.filterService.shouldIgnoreDiagnostic(e.code);if(!n||r)return;const i=this.getCommandPrompts(e);await t.handle(e,{commandPrompts:i,message:e.message})}))}addPythonPathChangedHandler(){const e=this.serviceContainer.get(c.IDisposableRegistry),t=this.serviceContainer.get(c.IInterpreterPathService);e.push(t.onDidChange(e=>this.onDidChangeConfiguration(e)))}async onDidChangeConfiguration(e){const t=e.uri;this.timeOut&&"number"!=typeof this.timeOut&&(clearTimeout(this.timeOut),this.timeOut=void 0),this.timeOut=setTimeout(()=>{this.timeOut=void 0,this.diagnose(t).then(e=>this.handle(e)).ignoreErrors()},this.changeThrottleTimeout)}getCommandPrompts(e){const t=this.serviceContainer.get(p.IDiagnosticsCommandFactory);switch(e.code){case f.DiagnosticCodes.MacInterpreterSelectedAndHaveOtherInterpretersDiagnostic:return[{prompt:"Select Python Interpreter",command:t.createCommand(e,{type:"executeVSCCommand",options:"python.setInterpreter"})},{prompt:"Do not show again",command:t.createCommand(e,{type:"ignore",options:m.DiagnosticScope.Global})}];case f.DiagnosticCodes.MacInterpreterSelectedAndNoOtherInterpretersDiagnostic:return[{prompt:"Learn more",command:t.createCommand(e,{type:"launch",options:"https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites"})},{prompt:"Download",command:t.createCommand(e,{type:"launch",options:"https://www.python.org/downloads"})},{prompt:"Do not show again",command:t.createCommand(e,{type:"ignore",options:m.DiagnosticScope.Global})}];default:throw new Error("Invalid diagnostic for 'InvalidMacPythonInterpreterService'")}}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(l.IServiceContainer)),i(1,(0,o.inject)(u.IInterpreterService)),i(2,(0,o.inject)(c.IDisposableRegistry)),i(3,(0,o.inject)(a.IPlatformService)),i(4,(0,o.inject)(u.IInterpreterHelper))],b),t.InvalidMacPythonInterpreterService=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCommandPromptAsDefaultShell=t.getCommandPromptLocation=void 0;const r=n(3),i=n(2);function o(e){const t=e.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),n=r.join(e.env.windir,t?"Sysnative":"System32");return r.join(n,"cmd.exe")}t.getCommandPromptLocation=o,t.useCommandPromptAsDefaultShell=async function(e,t){const n=o(e);await t.updateSectionSetting("terminal","integrated.shell.windows",n,void 0,i.ConfigurationTarget.Global)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PylanceDefaultDiagnosticService=t.PylanceDefaultDiagnosticServiceId=t.PylanceDefaultDiagnostic=t.PYLANCE_PROMPT_MEMENTO=void 0;const o=n(0),s=n(2),a=n(1),c=n(14),u=n(15),l=n(66),d=n(67),h=n(55),p=n(31);t.PYLANCE_PROMPT_MEMENTO="pylanceDefaultPromptMemento";class f extends l.BaseDiagnostic{constructor(e,t){super(d.DiagnosticCodes.PylanceDefaultDiagnostic,e,s.DiagnosticSeverity.Information,p.DiagnosticScope.Global,t)}}t.PylanceDefaultDiagnostic=f,t.PylanceDefaultDiagnosticServiceId="PylanceDefaultDiagnosticServiceId";let g=class extends l.BaseDiagnosticsService{constructor(e,t,n,r){super([d.DiagnosticCodes.PylanceDefaultDiagnostic],e,r,!0,!0),this.context=t,this.messageService=n,this.initialMementoValue=void 0,this.initialMementoValue=this.context.globalState.get("extensionVersion")}async diagnose(e){return await this.shouldShowPrompt()?[new f(c.Diagnostics.pylanceDefaultMessage(),e)]:[]}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];if(await this.filterService.shouldIgnoreDiagnostic(t.code))return;const n=[{prompt:c.Common.ok()}];await this.messageService.handle(t,{commandPrompts:n,onClose:this.updateMemento.bind(this)})}async updateMemento(){await this.context.globalState.update(t.PYLANCE_PROMPT_MEMENTO,!0)}async shouldShowPrompt(){const e=this.initialMementoValue,n=this.context.globalState.get(t.PYLANCE_PROMPT_MEMENTO);return void 0===e?(await this.updateMemento(),!1):void 0===n}};g=r([i(0,(0,o.inject)(u.IServiceContainer)),i(1,(0,o.inject)(a.IExtensionContext)),i(2,(0,o.inject)(p.IDiagnosticHandlerService)),i(2,(0,o.named)(h.DiagnosticCommandPromptHandlerServiceId)),i(3,(0,o.inject)(a.IDisposableRegistry))],g),t.PylanceDefaultDiagnosticService=g},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidPythonInterpreterService=t.InvalidPythonInterpreterServiceId=t.InvalidPythonInterpreterDiagnostic=void 0;const o=n(0),s=n(2);n(12);const a=n(1),c=n(11),u=n(15),l=n(8),d=n(9),h=n(66),p=n(98),f=n(67),g=n(55),m=n(31),v={[f.DiagnosticCodes.NoPythonInterpretersDiagnostic]:"Python is not installed. Please download and install Python before using the extension.",[f.DiagnosticCodes.NoCurrentlySelectedPythonInterpreterDiagnostic]:"No Python interpreter is selected. You need to select a Python interpreter to enable features such as IntelliSense, linting, and debugging."};class y extends h.BaseDiagnostic{constructor(e,t){super(e,v[e],s.DiagnosticSeverity.Error,m.DiagnosticScope.WorkspaceFolder,t)}}t.InvalidPythonInterpreterDiagnostic=y,t.InvalidPythonInterpreterServiceId="InvalidPythonInterpreterServiceId";let b=class extends h.BaseDiagnosticsService{constructor(e,t){super([f.DiagnosticCodes.NoPythonInterpretersDiagnostic,f.DiagnosticCodes.NoCurrentlySelectedPythonInterpreterDiagnostic],e,t,!1)}async diagnose(e){if(!0===this.serviceContainer.get(a.IConfigurationService).getSettings(e).disableInstallationChecks)return[];const t=this.serviceContainer.get(c.IInterpreterService);if(!await t.hasInterpreters())return[new y(f.DiagnosticCodes.NoPythonInterpretersDiagnostic,e)];return await t.getActiveInterpreter(e)?[]:[new y(f.DiagnosticCodes.NoCurrentlySelectedPythonInterpreterDiagnostic,e)]}async onHandle(e){if(0===e.length)return;const t=this.serviceContainer.get(m.IDiagnosticHandlerService,g.DiagnosticCommandPromptHandlerServiceId);await Promise.all(e.map(async e=>{if(!this.canHandle(e))return;const n=this.getCommandPrompts(e),r=function(e){if(e.code===f.DiagnosticCodes.NoPythonInterpretersDiagnostic)return e=>{(0,l.sendTelemetryEvent)(d.EventName.PYTHON_NOT_INSTALLED_PROMPT,void 0,{selection:e?"Download":"Ignore"})};return}(e);await t.handle(e,{commandPrompts:n,message:e.message,onClose:r})}))}getCommandPrompts(e){const t=this.serviceContainer.get(p.IDiagnosticsCommandFactory);switch(e.code){case f.DiagnosticCodes.NoPythonInterpretersDiagnostic:return[{prompt:"Download",command:t.createCommand(e,{type:"launch",options:"https://www.python.org/downloads"})}];case f.DiagnosticCodes.NoCurrentlySelectedPythonInterpreterDiagnostic:return[{prompt:"Select Python Interpreter",command:t.createCommand(e,{type:"executeVSCCommand",options:"python.setInterpreter"})}];default:throw new Error("Invalid diagnostic for 'InvalidPythonInterpreterService'")}}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IServiceContainer)),i(1,(0,o.inject)(a.IDisposableRegistry))],b),t.InvalidPythonInterpreterService=b},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PythonPathDeprecatedDiagnosticService=t.PythonPathDeprecatedDiagnosticServiceId=t.PythonPathDeprecatedDiagnostic=void 0;const o=n(0),s=n(2),a=n(4),c=n(1),u=n(14),l=n(15),d=n(66),h=n(98),p=n(67),f=n(55),g=n(31);class m extends d.BaseDiagnostic{constructor(e,t){super(p.DiagnosticCodes.PythonPathDeprecatedDiagnostic,e,s.DiagnosticSeverity.Information,g.DiagnosticScope.WorkspaceFolder,t)}}t.PythonPathDeprecatedDiagnostic=m,t.PythonPathDeprecatedDiagnosticServiceId="PythonPathDeprecatedDiagnosticServiceId";let v=class extends d.BaseDiagnosticsService{constructor(e,t,n){super([p.DiagnosticCodes.PythonPathDeprecatedDiagnostic],e,n,!0),this.messageService=t,this.workspaceService=this.serviceContainer.get(a.IWorkspaceService)}async diagnose(e){const t=this.workspaceService.getConfiguration("python",e).inspect("pythonPath");if(!t)return[];const n=this.workspaceService.workspaceFile&&void 0!==t.workspaceValue,r=void 0!==t.workspaceFolderValue;return n||r?[new m(u.Diagnostics.removedPythonPathFromSettings(),e)]:[]}async onHandle(e){if(0===e.length||!await this.canHandle(e[0]))return;const t=e[0];if(await this.filterService.shouldIgnoreDiagnostic(t.code))return;const n=this.serviceContainer.get(h.IDiagnosticsCommandFactory),r=[{prompt:u.Common.ok()}],i=n.createCommand(t,{type:"ignore",options:g.DiagnosticScope.Global});await i.invoke(),await this.messageService.handle(t,{commandPrompts:r})}};v=r([i(0,(0,o.inject)(l.IServiceContainer)),i(1,(0,o.inject)(g.IDiagnosticHandlerService)),i(1,(0,o.named)(f.DiagnosticCommandPromptHandlerServiceId)),i(2,(0,o.inject)(c.IDisposableRegistry))],v),t.PythonPathDeprecatedDiagnosticService=v},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchToDefaultLanguageServerDiagnosticService=t.SwitchToDefaultLanguageServerDiagnosticServiceId=t.SwitchToDefaultLanguageServerDiagnostic=void 0;const o=n(0),s=n(2),a=n(21),c=n(4),u=n(1),l=n(14),d=n(15),h=n(66),p=n(67),f=n(55),g=n(31);class m extends h.BaseDiagnostic{constructor(e,t){super(p.DiagnosticCodes.SwitchToDefaultLanguageServerDiagnostic,e,s.DiagnosticSeverity.Warning,g.DiagnosticScope.Global,t)}}t.SwitchToDefaultLanguageServerDiagnostic=m,t.SwitchToDefaultLanguageServerDiagnosticServiceId="SwitchToDefaultLanguageServerDiagnosticServiceId";let v=class extends h.BaseDiagnosticsService{constructor(e,t,n,r){super([p.DiagnosticCodes.JediPython27NotSupportedDiagnostic],e,r,!0,!0),this.workspaceService=t,this.messageService=n}diagnose(e){let t=!1;const n=this.workspaceService.getConfiguration("python"),r=n.inspect("languageServer");return(null==r?void 0:r.workspaceValue)===a.LanguageServerType.Microsoft&&(n.update("languageServer","Default",s.ConfigurationTarget.Workspace),t=!0),(null==r?void 0:r.globalValue)===a.LanguageServerType.Microsoft&&(n.update("languageServer","Default",s.ConfigurationTarget.Global),t=!0),Promise.resolve(t?[new m(l.SwitchToDefaultLS.bannerMessage(),e)]:[])}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];await this.filterService.shouldIgnoreDiagnostic(t.code)||await this.messageService.handle(t,{commandPrompts:[{prompt:l.Common.gotIt()}]})}};v=r([(0,o.injectable)(),i(0,(0,o.inject)(d.IServiceContainer)),i(1,(0,o.inject)(c.IWorkspaceService)),i(2,(0,o.inject)(g.IDiagnosticHandlerService)),i(2,(0,o.named)(f.DiagnosticCommandPromptHandlerServiceId)),i(3,(0,o.inject)(u.IDisposableRegistry))],v),t.SwitchToDefaultLanguageServerDiagnosticService=v},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchToPreReleaseExtensionDiagnosticService=t.SwitchToPreReleaseExtensionDiagnosticServiceId=t.SwitchToPreReleaseExtensionDiagnostic=void 0;const o=n(0),s=n(2),a=n(4),c=n(10),u=n(1),l=n(14),d=n(15),h=n(8),p=n(9),f=n(66),g=n(67),m=n(55),v=n(31);class y extends f.BaseDiagnostic{constructor(e,t){super(g.DiagnosticCodes.SwitchToPreReleaseExtensionDiagnostic,e,s.DiagnosticSeverity.Warning,v.DiagnosticScope.Global,t)}}t.SwitchToPreReleaseExtensionDiagnostic=y,t.SwitchToPreReleaseExtensionDiagnosticServiceId="SwitchToPreReleaseExtensionDiagnosticServiceId";let b=class extends f.BaseDiagnosticsService{constructor(e,t,n,r,i){super([g.DiagnosticCodes.SwitchToPreReleaseExtensionDiagnostic],e,i,!0,!0),this.workspaceService=t,this.commandManager=n,this.messageService=r}diagnose(e){var t;const n=this.workspaceService.getConfiguration("python",e).inspect("insidersChannel");if(n){if(null!==(t=n.globalValue)&&void 0!==t?t:n.globalLanguageValue)return Promise.resolve([new y(l.SwitchToPrereleaseExtension.bannerMessage(),e)])}return Promise.resolve([])}async onHandle(e){if(0===e.length||!this.canHandle(e[0]))return;const t=e[0];await this.filterService.shouldIgnoreDiagnostic(t.code)||await this.messageService.handle(t,{onClose:()=>{(0,h.sendTelemetryEvent)(p.EventName.INSIDERS_PROMPT,void 0,{selection:"closed"})},commandPrompts:[{prompt:l.SwitchToPrereleaseExtension.installPreRelease(),command:{diagnostic:t,invoke:()=>this.installExtension(!0,t.resource)}},{prompt:l.SwitchToPrereleaseExtension.installStable(),command:{diagnostic:t,invoke:()=>this.installExtension(!1,t.resource)}}]})}async installExtension(e,t){(0,h.sendTelemetryEvent)(p.EventName.INSIDERS_PROMPT,void 0,{selection:e?"preRelease":"stable"});const n=this.workspaceService.getConfiguration("python",t);n.inspect("insidersChannel")&&n.update("insidersChannel",void 0,s.ConfigurationTarget.Global),await this.commandManager.executeCommand("workbench.extensions.installExtension",c.PVSC_EXTENSION_ID,{installPreReleaseVersion:e})}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(d.IServiceContainer)),i(1,(0,o.inject)(a.IWorkspaceService)),i(2,(0,o.inject)(a.ICommandManager)),i(3,(0,o.inject)(v.IDiagnosticHandlerService)),i(3,(0,o.named)(m.DiagnosticCommandPromptHandlerServiceId)),i(4,(0,o.inject)(u.IDisposableRegistry))],b),t.SwitchToPreReleaseExtensionDiagnosticService=b},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticsCommandFactory=void 0;const o=n(0),s=n(15),a=n(554),c=n(555),u=n(556);let l=class{constructor(e){this.serviceContainer=e}createCommand(e,t){const n=t.type;switch(t.type){case"ignore":return new c.IgnoreDiagnosticCommand(e,this.serviceContainer,t.options);case"launch":return new u.LaunchBrowserCommand(e,this.serviceContainer,t.options);case"executeVSCCommand":return new a.ExecuteVSCCommand(e,this.serviceContainer,t.options);default:throw new Error(`Unknown Diagnostic command commandType '${n}'`)}}};l=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IServiceContainer))],l),t.DiagnosticsCommandFactory=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteVSCCommand=void 0;const r=n(4),i=n(8),o=n(9),s=n(225);class a extends s.BaseDiagnosticCommand{constructor(e,t,n){super(e),this.serviceContainer=t,this.commandName=n}async invoke(){(0,i.sendTelemetryEvent)(o.EventName.DIAGNOSTICS_ACTION,void 0,{commandName:this.commandName});return this.serviceContainer.get(r.ICommandManager).executeCommand(this.commandName).then(()=>{})}}t.ExecuteVSCCommand=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IgnoreDiagnosticCommand=void 0;const r=n(8),i=n(9),o=n(31),s=n(225);class a extends s.BaseDiagnosticCommand{constructor(e,t,n){super(e),this.serviceContainer=t,this.scope=n}invoke(){(0,r.sendTelemetryEvent)(i.EventName.DIAGNOSTICS_ACTION,void 0,{ignoreCode:this.diagnostic.code});return this.serviceContainer.get(o.IDiagnosticFilterService).ignoreDiagnostic(this.diagnostic.code,this.scope)}}t.IgnoreDiagnosticCommand=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchBrowserCommand=void 0;const r=n(1),i=n(8),o=n(9),s=n(225);class a extends s.BaseDiagnosticCommand{constructor(e,t,n){super(e),this.serviceContainer=t,this.url=n}async invoke(){(0,i.sendTelemetryEvent)(o.EventName.DIAGNOSTICS_ACTION,void 0,{url:this.url});return this.serviceContainer.get(r.IBrowserService).launch(this.url)}}t.LaunchBrowserCommand=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFilterService=t.FilterKeys=void 0;const o=n(0),s=n(1),a=n(15),c=n(31);var u;!function(e){e.GlobalDiagnosticFilter="GLOBAL_DIAGNOSTICS_FILTER",e.WorkspaceDiagnosticFilter="WORKSPACE_DIAGNOSTICS_FILTER"}(u=t.FilterKeys||(t.FilterKeys={}));let l=class{constructor(e){this.serviceContainer=e}async shouldIgnoreDiagnostic(e){const t=this.serviceContainer.get(s.IPersistentStateFactory),n=t.createGlobalPersistentState(u.GlobalDiagnosticFilter,[]),r=t.createWorkspacePersistentState(u.WorkspaceDiagnosticFilter,[]);return n.value.indexOf(e)>=0||r.value.indexOf(e)>=0}async ignoreDiagnostic(e,t){const n=this.serviceContainer.get(s.IPersistentStateFactory),r=t===c.DiagnosticScope.Global?n.createGlobalPersistentState(u.GlobalDiagnosticFilter,[]):n.createWorkspacePersistentState(u.WorkspaceDiagnosticFilter,[]),i=r.value.slice();await r.updateValue(i.concat(e))}};l=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IServiceContainer))],l),t.DiagnosticFilterService=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceMapSupportService=void 0;const o=n(0),s=n(2),a=n(4),c=n(10),u=n(1),l=n(14);let d=class{constructor(e,t,n,r){this.commandManager=e,this.disposables=t,this.configurationService=n,this.shell=r}register(){this.disposables.push(this.commandManager.registerCommand(c.Commands.Enable_SourceMap_Support,this.onEnable,this))}async enable(){await this.configurationService.updateSetting("diagnostics.sourceMapsEnabled",!0,void 0,s.ConfigurationTarget.Global),await this.commandManager.executeCommand("workbench.action.reloadWindow")}async onEnable(){const e=l.Diagnostics.enableSourceMapsAndReloadVSC();await this.shell.showWarningMessage(l.Diagnostics.warnBeforeEnablingSourceMaps(),e)===e&&await this.enable()}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(a.ICommandManager)),i(1,(0,o.inject)(u.IDisposableRegistry)),i(2,(0,o.inject)(u.IConfigurationService)),i(3,(0,o.inject)(a.IApplicationShell))],d),t.SourceMapSupportService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(1),i=n(560),o=n(561),s=n(563),a=n(564),c=n(565),u=n(567),l=n(568),d=n(94);t.registerTypes=function(e){e.addSingleton(d.IModuleInstaller,o.CondaInstaller),e.addSingleton(d.IModuleInstaller,a.PipInstaller),e.addSingleton(d.IModuleInstaller,s.PipEnvInstaller),e.addSingleton(d.IModuleInstaller,c.PoetryInstaller),e.addSingleton(d.IInstallationChannelManager,i.InstallationChannelManager),e.addSingleton(d.IProductService,l.ProductService),e.addSingleton(d.IProductPathService,u.FormatterProductPathService,r.ProductType.Formatter),e.addSingleton(d.IProductPathService,u.LinterProductPathService,r.ProductType.Linter),e.addSingleton(d.IProductPathService,u.TestFrameworkProductPathService,r.ProductType.TestFramework),e.addSingleton(d.IProductPathService,u.DataScienceProductPathService,r.ProductType.DataScience)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InstallationChannelManager=void 0;const o=n(0),s=n(11),a=n(15),c=n(30),u=n(4),l=n(13),d=n(14),h=n(22),p=n(180),f=n(94);let g=class{constructor(e){this.serviceContainer=e}async getInstallationChannel(e,t){const n=await this.getInstallationChannels(t);if(1===n.length)return n[0];const r=p.ProductNames.get(e),i=this.serviceContainer.get(u.IApplicationShell);if(0===n.length)return void await this.showNoInstallersMessage((0,h.isResource)(t)?t:void 0);const o="Select an option to install "+r,s=n.map(e=>({label:"Install using "+e.displayName,description:"",installer:e})),a=await i.showQuickPick(s,{matchOnDescription:!0,matchOnDetail:!0,placeHolder:o});return a?a.installer:void 0}async getInstallationChannels(e){const t=this.serviceContainer.getAll(f.IModuleInstaller),n=[];if(0===t.length)return[];t.sort((e,t)=>t.priority-e.priority);let r=t[0].priority;for(const i of t){if(i.priority!==r){if(n.length>0)break;r=i.priority}await i.isSupported(e)&&n.push(i)}return n}async showNoInstallersMessage(e){const t=this.serviceContainer.get(s.IInterpreterService),n=await t.getActiveInterpreter(e);if(!n)return;const r=this.serviceContainer.get(u.IApplicationShell);let i;if(i=n.envType===c.EnvironmentType.Conda?await r.showErrorMessage(d.Installer.noCondaOrPipInstaller(),d.Installer.searchForHelp()):await r.showErrorMessage(d.Installer.noPipInstaller(),d.Installer.searchForHelp()),"Search for help"===i){const e=this.serviceContainer.get(l.IPlatformService),t=e.isWindows?"Windows":e.isMac?"MacOS":"Linux";r.openUrl(`https://www.bing.com/search?q=Install Pip ${t} ${n.envType===c.EnvironmentType.Conda?"Conda":""}`)}}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IServiceContainer))],g),t.InstallationChannelManager=g},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CondaInstaller=void 0;const o=n(0),s=n(11),a=n(15),c=n(30),u=n(1),l=n(22),d=n(154),h=n(94);let p=class extends d.ModuleInstaller{constructor(e){super(e)}get name(){return"Conda"}get displayName(){return"Conda"}get type(){return c.ModuleInstallerType.Conda}get priority(){return 0}async isSupported(e){if(!1===this._isCondaAvailable)return!1;const t=this.serviceContainer.get(s.ICondaService);return this._isCondaAvailable=await t.isCondaAvailable(),!!this._isCondaAvailable&&this.isCurrentEnvironmentACondaEnvironment(e)}async getExecutionInfo(e,t,n=0){var r;const i=this.serviceContainer.get(s.ICondaService),o=await i.getCondaFile(!0),a=(0,l.isResource)(t)?this.serviceContainer.get(u.IConfigurationService).getSettings(t).pythonPath:null!==(r=t.id)&&void 0!==r?r:"",c=this.serviceContainer.get(s.IComponentAdapter),p=await c.getCondaEnvironment(a),f=[n&h.ModuleInstallFlags.upgrade?"update":"install"];return[u.Product.tensorboard,u.Product.ipykernel,u.Product.pandas,u.Product.nbconvert,u.Product.jupyter,u.Product.notebook].map(d.translateProductToModule).includes(e)&&f.push("-c","conda-forge"),p&&p.name?(f.push("--name"),f.push(p.name.toCommandArgumentForPythonExt())):p&&p.path&&(f.push("--prefix"),f.push(p.path.fileToCommandArgumentForPythonExt())),n&h.ModuleInstallFlags.updateDependencies&&f.push("--update-deps"),n&h.ModuleInstallFlags.reInstall&&f.push("--force-reinstall"),f.push(e),f.push("-y"),{args:f,execPath:o,useShell:!0}}async isCurrentEnvironmentACondaEnvironment(e){var t;const n=this.serviceContainer.get(s.IComponentAdapter),r=(0,l.isResource)(e)?this.serviceContainer.get(u.IConfigurationService).getSettings(e).pythonPath:null!==(t=e.id)&&void 0!==t?t:"";return n.isCondaEnvironment(r)}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IServiceContainer))],p),t.CondaInstaller=p},function(e,t){e.exports=require("./node_modules/sudo-prompt")},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PipEnvInstaller=t.pipenvName=void 0;const o=n(0),s=n(11),a=n(15),c=n(123),u=n(30),l=n(4),d=n(22),h=n(154),p=n(94);t.pipenvName="pipenv";let f=class extends h.ModuleInstaller{get name(){return"pipenv"}get type(){return u.ModuleInstallerType.Pipenv}get displayName(){return t.pipenvName}get priority(){return 10}constructor(e){super(e)}async isSupported(e){if((0,d.isResource)(e)){const t=await this.serviceContainer.get(s.IInterpreterService).getActiveInterpreter(e),n=e?this.serviceContainer.get(l.IWorkspaceService).getWorkspaceFolder(e):void 0;return!(!t||!n||t.envType!==u.EnvironmentType.Pipenv)&&(0,c.isPipenvEnvironmentRelatedToFolder)(t.path,n.uri.fsPath)}return e.envType===u.EnvironmentType.Pipenv}async getExecutionInfo(e,n,r=0){const i=[r&p.ModuleInstallFlags.reInstall||r&p.ModuleInstallFlags.updateDependencies||r&p.ModuleInstallFlags.upgrade?"update":"install",e,"--dev"];return"black"===e&&i.push("--pre"),{args:i,execPath:t.pipenvName}}};f=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IServiceContainer))],f),t.PipEnvInstaller=f},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PipInstaller=void 0;const o=n(0),s=n(15),a=n(30),c=n(4),u=n(25),l=n(1),d=n(22),h=n(154),p=n(94),f=n(3),g=n(227),m=n(180),v=n(8),y=n(9),b=n(11),_=n(63);let S=class extends h.ModuleInstaller{get name(){return"Pip"}get type(){return a.ModuleInstallerType.Pip}get displayName(){return"Pip"}get priority(){return 0}constructor(e){super(e)}async isSupported(e){return!1!==await async function(e,t){var n;const r=e.get(b.IInterpreterService),i=(0,d.isResource)(t)?await r.getActiveInterpreter(t):t;if(i)return!((null===(n=i.envPath)||void 0===n?void 0:n.length)&&i.envType===a.EnvironmentType.Conda&&!(0,_.isParentPath)(null==i?void 0:i.path,i.envPath))}(this.serviceContainer,e)&&this.isPipAvailable(e)}async getExecutionInfo(e,t,n=0){var r,i,o;if(e===(0,h.translateProductToModule)(l.Product.pip)){const e=(0,d.isResource)(t)?"":`${(null===(r=t.version)||void 0===r?void 0:r.major)||""}.${(null===(i=t.version)||void 0===i?void 0:i.minor)||""}.${(null===(o=t.version)||void 0===o?void 0:o.patch)||""}`,n=(0,d.isResource)(t)?void 0:t.envType;(0,v.sendTelemetryEvent)(y.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:"unavailable",requiredInstaller:a.ModuleInstallerType.Pip,productName:m.ProductNames.get(l.Product.pip),version:e,envType:n});const s=this.serviceContainer.get(l.IInstaller);if(await s.isInstalled(l.Product.ensurepip,t))return{args:[],moduleName:"ensurepip"};(0,v.sendTelemetryEvent)(y.EventName.PYTHON_INSTALL_PACKAGE,void 0,{installer:"unavailable",requiredInstaller:a.ModuleInstallerType.Pip,productName:m.ProductNames.get(l.Product.ensurepip),version:e,envType:n});const c=this.serviceContainer.get(b.IInterpreterService),u=(0,d.isResource)(t)?await c.getActiveInterpreter(t):t;return{execPath:u?u.path:"python",args:[f.join(g._SCRIPTS_DIR,"get-pip.py")]}}const s=[],u=this.serviceContainer.get(c.IWorkspaceService).getConfiguration("http").get("proxy","");return u.length>0&&(s.push("--proxy"),s.push(u)),s.push("install","-U"),n&p.ModuleInstallFlags.reInstall&&s.push("--force-reinstall"),{args:[...s,e],moduleName:"pip"}}isPipAvailable(e){const t=this.serviceContainer.get(u.IPythonExecutionFactory),n=(0,d.isResource)(e)?e:void 0,r=(0,d.isResource)(e)?void 0:e.path;return t.create({resource:n,pythonPath:r}).then(e=>e.isModuleInstalled("pip")).catch(()=>!1)}};S=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IServiceContainer))],S),t.PipInstaller=S},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PoetryInstaller=t.poetryName=void 0;const o=n(0),s=n(11),a=n(15),c=n(228),u=n(30),l=n(4),d=n(1),h=n(22),p=n(154);t.poetryName="poetry";let f=class extends p.ModuleInstaller{constructor(e,t,n){super(e),this.workspaceService=t,this.configurationService=n}get name(){return"poetry"}get type(){return u.ModuleInstallerType.Poetry}get displayName(){return t.poetryName}get priority(){return 10}async isSupported(e){if(!e)return!1;if(!(0,h.isResource)(e))return!1;const t=await this.serviceContainer.get(s.IInterpreterService).getActiveInterpreter(e),n=e?this.workspaceService.getWorkspaceFolder(e):void 0;return!(!t||!n||t.envType!==u.EnvironmentType.Poetry)&&(0,c.isPoetryEnvironmentRelatedToFolder)(t.path,n.uri.fsPath,this.configurationService.getSettings(e).poetryPath)}async getExecutionInfo(e,t){const n=this.configurationService.getSettings((0,h.isResource)(t)?t:void 0).poetryPath,r=["add","--dev",e];return"black"===e&&r.push("--allow-prereleases"),{args:r,execPath:n}}};f=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IServiceContainer)),i(1,(0,o.inject)(l.IWorkspaceService)),i(2,(0,o.inject)(d.IConfigurationService))],f),t.PoetryInstaller=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readRegistryKeys=t.readRegistryValues=t.REG_SZ=t.HKLM=t.HKCU=void 0;const r=n(124);Object.defineProperty(t,"HKCU",{enumerable:!0,get:function(){return r.HKCU}}),Object.defineProperty(t,"HKLM",{enumerable:!0,get:function(){return r.HKLM}}),Object.defineProperty(t,"REG_SZ",{enumerable:!0,get:function(){return r.REG_SZ}});const i=n(16);t.readRegistryValues=async function(e){const t=new(n(124))(e),r=(0,i.createDeferred)();return t.values((e,t)=>{e&&r.reject(e),r.resolve(t)}),r.promise},t.readRegistryKeys=async function(e){const t=new(n(124))(e),r=(0,i.createDeferred)();return t.keys((e,t)=>{e&&r.reject(e),r.resolve(t)}),r.promise}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataScienceProductPathService=t.TestFrameworkProductPathService=t.LinterProductPathService=t.FormatterProductPathService=t.BaseProductPathsService=void 0;const o=n(0),s=n(3),a=n(232),c=n(15),u=n(57),l=n(308),d=n(1);let h=class{constructor(e){this.serviceContainer=e,this.configService=e.get(d.IConfigurationService),this.productInstaller=e.get(d.IInstaller)}isExecutableAModule(e,t){let n;try{n=this.productInstaller.translateProductToModuleName(e)}catch(e){}const r=this.getExecutableNameFromSettings(e,t);return"string"==typeof n&&n.length>0&&s.basename(r)===r}};h=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],h),t.BaseProductPathsService=h;let p=class extends h{constructor(e){super(e)}getExecutableNameFromSettings(e,t){const n=this.configService.getSettings(t),r=this.serviceContainer.get(a.IFormatterHelper).getSettingsPropertyNames(e);return n.formatting[r.pathName]}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],p),t.FormatterProductPathService=p;let f=class extends h{constructor(e){super(e)}getExecutableNameFromSettings(e,t){return this.serviceContainer.get(u.ILinterManager).getLinterInfo(e).pathName(t)}};f=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],f),t.LinterProductPathService=f;let g=class extends h{constructor(e){super(e)}getExecutableNameFromSettings(e,t){const n=this.serviceContainer.get(l.ITestingService).getSettingsPropertyNames(e);if(!n.pathName)return this.productInstaller.translateProductToModuleName(e);return this.configService.getSettings(t).testing[n.pathName]}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],g),t.TestFrameworkProductPathService=g;let m=class extends h{constructor(e){super(e)}getExecutableNameFromSettings(e,t){return this.productInstaller.translateProductToModuleName(e)}};m=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],m),t.DataScienceProductPathService=m},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductService=void 0;const i=n(0),o=n(1);let s=class{constructor(){this.ProductTypes=new Map,this.ProductTypes.set(o.Product.bandit,o.ProductType.Linter),this.ProductTypes.set(o.Product.flake8,o.ProductType.Linter),this.ProductTypes.set(o.Product.mypy,o.ProductType.Linter),this.ProductTypes.set(o.Product.pycodestyle,o.ProductType.Linter),this.ProductTypes.set(o.Product.prospector,o.ProductType.Linter),this.ProductTypes.set(o.Product.pydocstyle,o.ProductType.Linter),this.ProductTypes.set(o.Product.pylama,o.ProductType.Linter),this.ProductTypes.set(o.Product.pylint,o.ProductType.Linter),this.ProductTypes.set(o.Product.pytest,o.ProductType.TestFramework),this.ProductTypes.set(o.Product.unittest,o.ProductType.TestFramework),this.ProductTypes.set(o.Product.autopep8,o.ProductType.Formatter),this.ProductTypes.set(o.Product.black,o.ProductType.Formatter),this.ProductTypes.set(o.Product.yapf,o.ProductType.Formatter),this.ProductTypes.set(o.Product.jupyter,o.ProductType.DataScience),this.ProductTypes.set(o.Product.notebook,o.ProductType.DataScience),this.ProductTypes.set(o.Product.ipykernel,o.ProductType.DataScience),this.ProductTypes.set(o.Product.nbconvert,o.ProductType.DataScience),this.ProductTypes.set(o.Product.kernelspec,o.ProductType.DataScience),this.ProductTypes.set(o.Product.pandas,o.ProductType.DataScience),this.ProductTypes.set(o.Product.tensorboard,o.ProductType.DataScience),this.ProductTypes.set(o.Product.torchProfilerInstallName,o.ProductType.DataScience),this.ProductTypes.set(o.Product.torchProfilerImportName,o.ProductType.DataScience),this.ProductTypes.set(o.Product.pip,o.ProductType.DataScience),this.ProductTypes.set(o.Product.ensurepip,o.ProductType.DataScience),this.ProductTypes.set(o.Product.python,o.ProductType.Python)}getProductType(e){return this.ProductTypes.get(e)}};s=r([(0,i.injectable)()],s),t.ProductService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(21),i=n(570),o=n(571),s=n(572),a=n(573),c=n(574),u=n(182),l=n(579),d=n(580),h=n(581),p=n(582),f=n(583),g=n(584),m=n(585),v=n(586),y=n(587),b=n(588),_=n(589),S=n(590),E=n(591),P=n(592),w=n(593),T=n(594),C=n(311),I=n(595),R=n(184),O=n(596),D=n(597),x=n(599),k=n(186),A=n(39);t.registerTypes=function(e){e.addSingleton(r.IExtensionSingleActivationService,h.LaunchJsonCompletionProvider),e.addSingleton(r.IExtensionSingleActivationService,p.InterpreterPathCommand),e.addSingleton(r.IExtensionSingleActivationService,g.LaunchJsonUpdaterService),e.addSingleton(A.IDebugConfigurationService,d.PythonDebugConfigurationService),e.addSingleton(A.IDebuggerBanner,l.DebuggerBanner),e.addSingleton(k.IChildProcessAttachService,x.ChildProcessAttachService),e.addSingleton(k.IDebugSessionEventHandlers,D.ChildProcessAttachEventHandler),e.addSingleton(R.IDebugConfigurationResolver,I.LaunchConfigurationResolver,"launch"),e.addSingleton(R.IDebugConfigurationResolver,T.AttachConfigurationResolver,"attach"),e.addSingleton(R.IDebugConfigurationProviderFactory,E.DebugConfigurationProviderFactory),e.addSingleton(A.IDebugConfigurationProvider,y.FileLaunchDebugConfigurationProvider,A.DebugConfigurationType.launchFile),e.addSingleton(A.IDebugConfigurationProvider,m.DjangoLaunchDebugConfigurationProvider,A.DebugConfigurationType.launchDjango),e.addSingleton(A.IDebugConfigurationProvider,v.FastAPILaunchDebugConfigurationProvider,A.DebugConfigurationType.launchFastAPI),e.addSingleton(A.IDebugConfigurationProvider,b.FlaskLaunchDebugConfigurationProvider,A.DebugConfigurationType.launchFlask),e.addSingleton(A.IDebugConfigurationProvider,w.RemoteAttachDebugConfigurationProvider,A.DebugConfigurationType.remoteAttach),e.addSingleton(A.IDebugConfigurationProvider,_.ModuleLaunchDebugConfigurationProvider,A.DebugConfigurationType.launchModule),e.addSingleton(A.IDebugConfigurationProvider,P.PyramidLaunchDebugConfigurationProvider,A.DebugConfigurationType.launchPyramid),e.addSingleton(A.IDebugConfigurationProvider,S.PidAttachDebugConfigurationProvider,A.DebugConfigurationType.pidAttach),e.addSingleton(C.IDebugEnvironmentVariablesService,C.DebugEnvironmentVariablesHelper),e.addSingleton(r.IExtensionSingleActivationService,i.DebugAdapterActivator),e.addSingleton(A.IDebugAdapterDescriptorFactory,o.DebugAdapterDescriptorFactory),e.addSingleton(A.IDebugSessionLoggingFactory,s.DebugSessionLoggingFactory),e.addSingleton(A.IOutdatedDebuggerPromptFactory,a.OutdatedDebuggerPromptFactory),e.addSingleton(u.IAttachProcessProviderFactory,c.AttachProcessProviderFactory),e.addSingleton(r.IExtensionSingleActivationService,O.DebugCommands),e.addSingleton(R.ILaunchJsonReader,f.LaunchJsonReader)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugAdapterActivator=void 0;const o=n(0),s=n(4),a=n(1),c=n(51),u=n(182),l=n(39);let d=class{constructor(e,t,n,r,i,o){this.debugService=e,this.descriptorFactory=t,this.debugSessionLoggingFactory=n,this.debuggerPromptFactory=r,this.disposables=i,this.attachProcessProviderFactory=o,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){this.attachProcessProviderFactory.registerCommands(),this.disposables.push(this.debugService.registerDebugAdapterTrackerFactory(c.DebuggerTypeName,this.debugSessionLoggingFactory)),this.disposables.push(this.debugService.registerDebugAdapterTrackerFactory(c.DebuggerTypeName,this.debuggerPromptFactory)),this.disposables.push(this.debugService.registerDebugAdapterDescriptorFactory(c.DebuggerTypeName,this.descriptorFactory))}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IDebugService)),i(1,(0,o.inject)(l.IDebugAdapterDescriptorFactory)),i(2,(0,o.inject)(l.IDebugSessionLoggingFactory)),i(3,(0,o.inject)(l.IOutdatedDebuggerPromptFactory)),i(4,(0,o.inject)(a.IDisposableRegistry)),i(5,(0,o.inject)(u.IAttachProcessProviderFactory))],d),t.DebugAdapterActivator=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugAdapterDescriptorFactory=void 0;const o=n(0),s=n(3),a=n(2),c=n(4),u=n(81),l=n(11),d=n(5),h=n(8),p=n(9);let f=class{constructor(e,t){this.interpreterService=e,this.appShell=t}async createDebugAdapterDescriptor(e,t){var n,r,i,o,c;const l=e.configuration;if("attach"===l.request){if(void 0!==l.connect)return(0,d.traceLog)(`Connecting to DAP Server at: ${null!==(n=l.connect.host)&&void 0!==n?n:"127.0.0.1"}:${l.connect.port}`),new a.DebugAdapterServer(l.connect.port,null!==(r=l.connect.host)&&void 0!==r?r:"127.0.0.1");if(void 0!==l.port)return(0,d.traceLog)(`Connecting to DAP Server at: ${null!==(i=l.host)&&void 0!==i?i:"127.0.0.1"}:${l.port}`),new a.DebugAdapterServer(l.port,null!==(o=l.host)&&void 0!==o?o:"127.0.0.1");if(void 0===l.listen&&void 0===l.processId)throw new Error('"request":"attach" requires either "connect", "listen", or "processId"')}const f=await this.getDebugAdapterPython(l,e.workspaceFolder);if(0!==f.length){"attach"===l.request&&void 0!==l.processId&&(0,h.sendTelemetryEvent)(p.EventName.DEBUGGER_ATTACH_TO_LOCAL_PROCESS);const e=null!==(c=f.shift())&&void 0!==c?c:"python",t=l.logToFile?["--log-dir",u.EXTENSION_ROOT_DIR]:[];if(void 0!==l.debugAdapterPath){const n=f.concat([l.debugAdapterPath,...t]);return(0,d.traceLog)(`DAP Server launched with command: ${e} ${n.join(" ")}`),new a.DebugAdapterExecutable(e,n)}const n=s.join(u.EXTENSION_ROOT_DIR,"pythonFiles","lib","python","debugpy","adapter"),r=f.concat([n,...t]);return(0,d.traceLog)(`DAP Server launched with command: ${e} ${r.join(" ")}`),(0,h.sendTelemetryEvent)(p.EventName.DEBUG_ADAPTER_USING_WHEELS_PATH,void 0,{usingWheels:!0}),new a.DebugAdapterExecutable(e,r)}throw new Error("Debug Adapter Executable not provided")}async getDebugAdapterPython(e,t){if(void 0!==e.debugAdapterPython)return this.getExecutableCommand(await this.interpreterService.getInterpreterDetails(e.debugAdapterPython));if(e.pythonPath)return this.getExecutableCommand(await this.interpreterService.getInterpreterDetails(e.pythonPath));const n=t?t.uri:void 0,r=await this.interpreterService.getActiveInterpreter(n);if(r)return(0,d.traceVerbose)(`Selecting active interpreter as Python Executable for DA '${r.path}'`),this.getExecutableCommand(r);await this.interpreterService.hasInterpreters();const i=await this.interpreterService.getInterpreters(n);return 0===i.length?(this.notifySelectInterpreter().ignoreErrors(),[]):((0,d.traceVerbose)(`Picking first available interpreter to launch the DA '${i[0].path}'`),this.getExecutableCommand(i[0]))}async getExecutableCommand(e){return e&&e.path.length>0?[e.path]:[]}async notifySelectInterpreter(){await this.appShell.showErrorMessage("Please install Python or select a Python Interpreter to use the debugger.")}};f=r([(0,o.injectable)(),i(0,(0,o.inject)(l.IInterpreterService)),i(1,(0,o.inject)(c.IApplicationShell))],f),t.DebugAdapterDescriptorFactory=f},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionLoggingFactory=void 0;const o=n(0),s=n(3),a=n(13),c=n(41),u=n(81);class l{constructor(e,t){if(this.session=e,this.enabled=!1,this.timer=new c.StopWatch,this.enabled=this.session.configuration.logToFile,this.enabled){const e=`debugger.vscode_${this.session.id}.log`;this.stream=t.createWriteStream(s.join(u.EXTENSION_ROOT_DIR,e))}}onWillStartSession(){this.timer.reset(),this.log(`Starting Session:\n${this.stringify(this.session.configuration)}\n`)}onWillReceiveMessage(e){this.log(`Client --\x3e Adapter:\n${this.stringify(e)}\n`)}onDidSendMessage(e){this.log(`Client <-- Adapter:\n${this.stringify(e)}\n`)}onWillStopSession(){this.log("Stopping Session\n")}onError(e){this.log(`Error:\n${this.stringify(e)}\n`)}onExit(e,t){var n;this.log(`Exit:\nExit-Code: ${e||0}\nSignal: ${t||"none"}\n`),null===(n=this.stream)||void 0===n||n.close()}log(e){this.enabled&&this.stream.write(`${this.timer.elapsedTime} ${e}`)}stringify(e){return JSON.stringify(e,null,4)}}let d=class{constructor(e){this.fileSystem=e}createDebugAdapterTracker(e){return new l(e,this.fileSystem)}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IFileSystem))],d),t.DebugSessionLoggingFactory=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OutdatedDebuggerPromptFactory=void 0;const o=n(0),s=n(4),a=n(1),c=n(14);class u{constructor(e,t,n){this.promptCheck=e,this.appShell=t,this.browserService=n}onDidSendMessage(e){if(this.promptCheck.shouldShowPrompt()&&this.isPtvsd(e)){const e=[c.Common.moreInfo()];this.appShell.showInformationMessage(c.OutdatedDebugger.outdatedDebuggerMessage(),...e).then(t=>{t===e[0]&&this.browserService.launch("https://aka.ms/migrateToDebugpy")})}}isPtvsd(e){if("event"===e.type){const t=e;if("output"===t.event){const e=t;if("telemetry"===e.body.category){if("ptvsd"===e.body.output&&!e.body.data.packageVersion.startsWith("1"))return this.promptCheck.setShowPrompt(!1),!0;"debugpy"===e.body.output&&this.promptCheck.setShowPrompt(!1)}}}return!1}}class l{constructor(){this.shouldShow=!0}shouldShowPrompt(){return this.shouldShow}setShowPrompt(e){this.shouldShow=e}}let d=class{constructor(e,t){this.appShell=e,this.browserService=t,this.promptCheck=new l}createDebugAdapterTracker(e){return new u(this.promptCheck,this.appShell,this.browserService)}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IApplicationShell)),i(1,(0,o.inject)(a.IBrowserService))],d),t.OutdatedDebuggerPromptFactory=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachProcessProviderFactory=void 0;const o=n(0),s=n(4),a=n(10),c=n(13),u=n(25),l=n(1),d=n(575),h=n(576);let p=class{constructor(e,t,n,r,i){this.applicationShell=e,this.commandManager=t,this.platformService=n,this.processServiceFactory=r,this.disposableRegistry=i}registerCommands(){const e=new h.AttachProcessProvider(this.platformService,this.processServiceFactory),t=new d.AttachPicker(this.applicationShell,e),n=this.commandManager.registerCommand(a.Commands.PickLocalProcess,()=>t.showQuickPick(),this);this.disposableRegistry.push(n)}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IApplicationShell)),i(1,(0,o.inject)(s.ICommandManager)),i(2,(0,o.inject)(c.IPlatformService)),i(3,(0,o.inject)(u.IProcessServiceFactory)),i(4,(0,o.inject)(l.IDisposableRegistry))],p),t.AttachProcessProviderFactory=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachPicker=void 0;const o=n(0),s=n(4),a=n(309),c=n(14),u=n(182);let l=class{constructor(e,t){this.applicationShell=e,this.attachItemsProvider=t}showQuickPick(){return new Promise(async(e,t)=>{const n=await this.attachItemsProvider.getAttachItems(),r={iconPath:(0,a.getIcon)(u.REFRESH_BUTTON_ICON),tooltip:c.AttachProcess.refreshList()},i=this.applicationShell.createQuickPick();i.title=c.AttachProcess.attachTitle(),i.placeholder=c.AttachProcess.selectProcessPlaceholder(),i.canSelectMany=!1,i.matchOnDescription=!0,i.matchOnDetail=!0,i.items=n,i.buttons=[r];const o=[];i.onDidTriggerButton(async()=>{i.busy=!0;const e=await this.attachItemsProvider.getAttachItems();i.items=e,i.busy=!1},this,o),i.onDidAccept(()=>{1!==i.selectedItems.length&&t(new Error(c.AttachProcess.noProcessSelected()));const n=i.selectedItems[0].id;o.forEach(e=>e.dispose()),i.dispose(),e(n)},void 0,o),i.onDidHide(()=>{o.forEach(e=>e.dispose()),i.dispose(),t(new Error(c.AttachProcess.noProcessSelected()))},void 0,o),i.show()})}};l=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IApplicationShell))],l),t.AttachPicker=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachProcessProvider=void 0;const o=n(0),s=n(13),a=n(25),c=n(14),u=n(577),l=n(578);let d=class{constructor(e,t){this.platformService=e,this.processServiceFactory=t}getAttachItems(){return this._getInternalProcessEntries().then(e=>(e.sort(({processName:e,commandLine:t},{processName:n,commandLine:r})=>{const i=(e,t)=>{const n=e.toLowerCase(),r=t.toLowerCase();return n===r?0:n0){const t=e.slice(0,n).trim();let i=e.slice(n+1).trim();if("Name"===t)r.label=i,r.processName=i;else if("ProcessId"===t)r.description=i,r.id=i;else if("CommandLine"===t){const e="\\??\\";0===i.lastIndexOf(e,0)&&(i=i.slice(e.length)),r.detail=i,r.commandLine=i}}return r}e.wmicCommand={command:"wmic",args:["process","get","Name,ProcessId,CommandLine","/FORMAT:list"]},e.parseProcesses=function(e){const r=e.split("\r\n"),i=[];let o={...t};for(const e of r)e.length&&(n(e,o),0===e.lastIndexOf("ProcessId",0)&&(i.push(o),o={...t}));return i}}(t.WmicProcessParser||(t.WmicProcessParser={}))},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerBanner=t.PersistentStateKeys=void 0;const o=n(0),s=n(2),a=n(4);n(12);const c=n(1),u=n(15),l=n(5),d=n(51);var h;!function(e){e.ShowBanner="ShowBanner",e.DebuggerLaunchCounter="DebuggerLaunchCounter",e.DebuggerLaunchThresholdCounter="DebuggerLaunchThresholdCounter",e.UserSelected="DebuggerUserSelected"}(h=t.PersistentStateKeys||(t.PersistentStateKeys={}));let p=class{constructor(e){this.serviceContainer=e}initialize(){this.initialized||(this.initialized=!0,this.isEnabled()&&this.addCallback())}isEnabled(){const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.ShowBanner;return e.createGlobalPersistentState(t,!0).value}async disable(){const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.ShowBanner,n=e.createGlobalPersistentState(t,!1);await n.updateValue(!1)}async shouldShow(){return!(!this.isEnabled()||this.disabledInCurrentSession||s.env.uiKind===(null===s.UIKind||void 0===s.UIKind?void 0:s.UIKind.Web))&&(!!await this.passedThreshold()&&this.isUserSelected())}async show(){const e=this.serviceContainer.get(a.IApplicationShell),t="Yes, take survey now",n="No thanks";switch(await e.showInformationMessage("Can you please take 2 minutes to tell us how the debugger is working for you?",t,n,"Remind me later")){case t:await this.action(),await this.disable();break;case n:await this.disable();break;default:this.disabledInCurrentSession=!0}}async action(){const e=await this.getGetDebuggerLaunchCounter();this.serviceContainer.get(c.IBrowserService).launch("https://www.research.net/r/N7B25RV?n="+e)}async isUserSelected(){if(void 0!==this.userSelected)return this.userSelected;const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.UserSelected,n=e.createGlobalPersistentState(t,void 0);let r=n.value;if(void 0===r){r=this.serviceContainer.get(c.IRandom).getRandomInt(0,100)<10,n.updateValue(r).ignoreErrors()}return this.userSelected=r,r}async passedThreshold(){const[e,t]=await Promise.all([this.getDebuggerLaunchThresholdCounter(),this.getGetDebuggerLaunchCounter()]);return t>=e}async incrementDebuggerLaunchCounter(){const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.DebuggerLaunchCounter,n=e.createGlobalPersistentState(t,0);await n.updateValue(n.value+1)}async getGetDebuggerLaunchCounter(){const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.DebuggerLaunchCounter;return e.createGlobalPersistentState(t,0).value}async getDebuggerLaunchThresholdCounter(){const e=this.serviceContainer.get(c.IPersistentStateFactory),t=h.DebuggerLaunchThresholdCounter,n=e.createGlobalPersistentState(t,void 0);if(void 0===n.value){const e=this.serviceContainer.get(c.IRandom).getRandomInt(1,11);await n.updateValue(e)}return n.value}addCallback(){const e=this.serviceContainer.get(a.IDebugService).onDidTerminateDebugSession(async e=>{e.type===d.DebuggerTypeName&&await this.onDidTerminateDebugSession().catch(e=>(0,l.traceError)("Error in debugger Banner",e))});this.serviceContainer.get(c.IDisposableRegistry).push(e)}async onDidTerminateDebugSession(){if(!this.isEnabled())return;await this.incrementDebuggerLaunchCounter();await this.shouldShow()&&await this.show()}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(u.IServiceContainer))],p),t.DebuggerBanner=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PythonDebugConfigurationService=void 0;const o=n(0),s=n(20),a=n(14),c=n(183),u=n(39),l=n(184);let d=class{constructor(e,t,n,r){this.attachResolver=e,this.launchResolver=t,this.providerFactory=n,this.multiStepFactory=r,this.cacheDebugConfig=void 0}async provideDebugConfigurations(e,t){const n={config:{},folder:e,token:t},r=this.multiStepFactory.create();return await r.run((e,t)=>this.pickDebugConfiguration(e,t),n),0===Object.keys(n.config).length?void 0:[n.config]}async resolveDebugConfiguration(e,t,n){if("attach"===t.request)return this.attachResolver.resolveDebugConfiguration(e,t,n);if("test"===t.request)throw Error('This configuration can only be used by the test debugging commands. `"request": "test"` is deprecated use "purpose" instead.');if(0===Object.keys(t).length)if(this.cacheDebugConfig)t=(0,s.cloneDeep)(this.cacheDebugConfig);else{const r=await this.provideDebugConfigurations(e,n);if(void 0===r)return;Array.isArray(r)&&1===r.length&&(t=r[0]),this.cacheDebugConfig=(0,s.cloneDeep)(t)}return this.launchResolver.resolveDebugConfiguration(e,t,n)}async resolveDebugConfigurationWithSubstitutedVariables(e,t,n){function r(r){return r.resolveDebugConfigurationWithSubstitutedVariables(e,t,n)}return"attach"===t.request?r(this.attachResolver):r(this.launchResolver)}async pickDebugConfiguration(e,t){const n=[{label:a.DebugConfigStrings.file.selectConfiguration.label(),type:u.DebugConfigurationType.launchFile,description:a.DebugConfigStrings.file.selectConfiguration.description()},{label:a.DebugConfigStrings.module.selectConfiguration.label(),type:u.DebugConfigurationType.launchModule,description:a.DebugConfigStrings.module.selectConfiguration.description()},{label:a.DebugConfigStrings.attach.selectConfiguration.label(),type:u.DebugConfigurationType.remoteAttach,description:a.DebugConfigStrings.attach.selectConfiguration.description()},{label:a.DebugConfigStrings.attachPid.selectConfiguration.label(),type:u.DebugConfigurationType.pidAttach,description:a.DebugConfigStrings.attachPid.selectConfiguration.description()},{label:a.DebugConfigStrings.django.selectConfiguration.label(),type:u.DebugConfigurationType.launchDjango,description:a.DebugConfigStrings.django.selectConfiguration.description()},{label:a.DebugConfigStrings.fastapi.selectConfiguration.label(),type:u.DebugConfigurationType.launchFastAPI,description:a.DebugConfigStrings.fastapi.selectConfiguration.description()},{label:a.DebugConfigStrings.flask.selectConfiguration.label(),type:u.DebugConfigurationType.launchFlask,description:a.DebugConfigStrings.flask.selectConfiguration.description()},{label:a.DebugConfigStrings.pyramid.selectConfiguration.label(),type:u.DebugConfigurationType.launchPyramid,description:a.DebugConfigStrings.pyramid.selectConfiguration.description()}];t.config={};const r=await e.showQuickPick({title:a.DebugConfigStrings.selectConfiguration.title(),placeholder:a.DebugConfigStrings.selectConfiguration.placeholder(),activeItem:n[0],items:n});if(r){const e=this.providerFactory.create(r.type);return e.buildConfiguration.bind(e)}}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(l.IDebugConfigurationResolver)),i(0,(0,o.named)("attach")),i(1,(0,o.inject)(l.IDebugConfigurationResolver)),i(1,(0,o.named)("launch")),i(2,(0,o.inject)(l.IDebugConfigurationProviderFactory)),i(3,(0,o.inject)(c.IMultiStepInputFactory))],d),t.PythonDebugConfigurationService=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchJsonCompletionProvider=void 0;const o=n(0),s=n(192),a=n(3),c=n(2),u=n(4),l=n(1),d=n(14);var h;!function(e){e.json="json",e.jsonWithComments="jsonc"}(h||(h={}));let p=class{constructor(e,t){this.languageService=e,this.disposableRegistry=t,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){this.disposableRegistry.push(this.languageService.registerCompletionItemProvider({language:h.json},this)),this.disposableRegistry.push(this.languageService.registerCompletionItemProvider({language:h.jsonWithComments},this))}async provideCompletionItems(e,t,n){return this.canProvideCompletions(e,t)?[{command:{command:"python.SelectAndInsertDebugConfiguration",title:d.DebugConfigStrings.launchJsonCompletions.description(),arguments:[e,t,n]},documentation:d.DebugConfigStrings.launchJsonCompletions.description(),sortText:"AAAA",preselect:!0,kind:c.CompletionItemKind.Enum,label:d.DebugConfigStrings.launchJsonCompletions.label(),insertText:new c.SnippetString}]:[]}canProvideCompletions(e,t){if("launch.json"!==a.basename(e.uri.fsPath))return!1;const n=(0,s.getLocation)(e.getText(),e.offsetAt(t));return"configurations"===n.path[0]&&2===n.path.length}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(u.ILanguageService)),i(1,(0,o.inject)(l.IDisposableRegistry))],p),t.LaunchJsonCompletionProvider=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InterpreterPathCommand=void 0;const o=n(0),s=n(2),a=n(4),c=n(10),u=n(1),l=n(11);let d=class{constructor(e,t,n){this.commandManager=e,this.interpreterService=t,this.disposables=n,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){this.disposables.push(this.commandManager.registerCommand(c.Commands.GetSelectedInterpreterPath,e=>this._getSelectedInterpreterPath(e)))}async _getSelectedInterpreterPath(e){var t,n;const r="workspaceFolder"in e?e.workspaceFolder:e[1]?e[1]:void 0;let i;try{i=r?s.Uri.parse(r):void 0}catch(e){i=void 0}return null!==(n=null===(t=await this.interpreterService.getActiveInterpreter(i))||void 0===t?void 0:t.path)&&void 0!==n?n:"python"}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(a.ICommandManager)),i(1,(0,o.inject)(l.IInterpreterService)),i(2,(0,o.inject)(u.IDisposableRegistry))],d),t.InterpreterPathCommand=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchJsonReader=void 0;const o=n(3),s=n(192),a=n(0),c=n(13),u=n(4);let l=class{constructor(e,t){this.fs=e,this.workspaceService=t}async getConfigurationsForWorkspace(e){const t=o.join(e.uri.fsPath,".vscode","launch.json");if(!await this.fs.fileExists(t))return[];const n=await this.fs.readFile(t),r=(0,s.parse)(n,[],{allowTrailingComma:!0,disallowComments:!1});if(!r.configurations||!Array.isArray(r.configurations))throw Error("Missing field in launch.json: configurations");if(!r.version)throw Error("Missing field in launch.json: version");return r.configurations}async getConfigurationsByUri(e){const t=this.workspaceService.getWorkspaceFolder(e);return t?this.getConfigurationsForWorkspace(t):[]}};l=r([(0,a.injectable)(),i(0,(0,a.inject)(c.IFileSystem)),i(1,(0,a.inject)(u.IWorkspaceService))],l),t.LaunchJsonReader=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchJsonUpdaterService=t.LaunchJsonUpdaterServiceHelper=void 0;const o=n(0),s=n(192),a=n(2),c=n(4),u=n(1),l=n(22),d=n(8),h=n(9),p=n(39);class f{constructor(e,t,n,r){this.commandManager=e,this.workspace=t,this.documentManager=n,this.configurationProvider=r}async selectAndInsertDebugConfig(e,t,n){if(this.documentManager.activeTextEditor&&this.documentManager.activeTextEditor.document===e){const r=this.workspace.getWorkspaceFolder(e.uri),i=await this.configurationProvider.provideDebugConfigurations(r,n);!n.isCancellationRequested&&Array.isArray(i)&&i.length>0&&await this.insertDebugConfiguration(e,t,i[0])}}async insertDebugConfiguration(e,t,n){const r=this.getCursorPositionInConfigurationsArray(e,t);if(!r)return;const i=this.isCommaImmediatelyBeforeCursor(e,t)?"BeforeCursor":void 0,o=this.getTextForInsertion(n,r,i),s=new a.WorkspaceEdit;s.insert(e.uri,t,o),await this.documentManager.applyEdit(s),this.commandManager.executeCommand("editor.action.formatDocument").then(l.noop,l.noop)}getTextForInsertion(e,t,n){const r=JSON.stringify(e);return"AfterItem"===t?"BeforeCursor"===n?r:","+r:"BeforeItem"===t?r+",":r}getCursorPositionInConfigurationsArray(e,t){if(this.isConfigurationArrayEmpty(e))return"InsideEmptyArray";const n=(0,s.createScanner)(e.getText(),!0);n.setPosition(e.offsetAt(t));const r=n.scan();return 5===r||4===r?"AfterItem":1===r?"BeforeItem":void 0}isConfigurationArrayEmpty(e){const t=(0,s.parse)(e.getText(),[],{allowTrailingComma:!0,disallowComments:!1});return!t||!Array.isArray(t.configurations)||0===t.configurations.length}isCommaImmediatelyBeforeCursor(e,t){const n=e.lineAt(t.line),r=e.getText(new a.Range(n.range.start,t));if(r.trim().endsWith(","))return!0;if(0!==r.trim().length)return!1;let i=t.line-1;for(;i>0;){const t=e.lineAt(i).text;if(t.trim().endsWith(","))return!0;if(0!==t.trim().length)return!1;i-=1}return!1}}r([(0,d.captureTelemetry)(h.EventName.DEBUGGER_CONFIGURATION_PROMPTS_IN_LAUNCH_JSON)],f.prototype,"selectAndInsertDebugConfig",null),t.LaunchJsonUpdaterServiceHelper=f;let g=class{constructor(e,t,n,r,i){this.commandManager=e,this.disposableRegistry=t,this.workspace=n,this.documentManager=r,this.configurationProvider=i,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){const e=new f(this.commandManager,this.workspace,this.documentManager,this.configurationProvider);this.disposableRegistry.push(this.commandManager.registerCommand("python.SelectAndInsertDebugConfiguration",e.selectAndInsertDebugConfig,e))}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(c.ICommandManager)),i(1,(0,o.inject)(u.IDisposableRegistry)),i(2,(0,o.inject)(c.IWorkspaceService)),i(3,(0,o.inject)(c.IDocumentManager)),i(4,(0,o.inject)(p.IDebugConfigurationService))],g),t.LaunchJsonUpdaterService=g},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DjangoLaunchDebugConfigurationProvider=void 0;const o=n(0),s=n(3),a=n(4),c=n(13),u=n(1),l=n(14),d=n(74),h=n(8),p=n(9),f=n(51),g=n(39);let m=class{constructor(e,t,n){this.fs=e,this.workspace=t,this.pathUtils=n}async buildConfiguration(e,t){const n=await this.getManagePyPath(t.folder);let r;const i=`\${workspaceFolder}${this.pathUtils.separator}manage.py`,o={name:l.DebugConfigStrings.django.snippet.name(),type:f.DebuggerTypeName,request:"launch",program:n||i,args:["runserver"],django:!0,justMyCode:!0};if(!n){const n=await e.showInputBox({title:l.DebugConfigStrings.django.enterManagePyPath.title(),value:i,prompt:l.DebugConfigStrings.django.enterManagePyPath.prompt(),validate:e=>this.validateManagePy(t.folder,i,e)});n&&(r=!0,o.program=n)}(0,h.sendTelemetryEvent)(p.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:g.DebugConfigurationType.launchDjango,autoDetectedDjangoManagePyPath:!!n,manuallyEnteredAValue:r}),Object.assign(t.config,o)}async validateManagePy(e,t,n){const r=l.DebugConfigStrings.django.enterManagePyPath.invalid();if(!n||0===n.trim().length)return r;const i=this.resolveVariables(n,e?e.uri:void 0);return(n===t||await this.fs.fileExists(i))&&i.trim().toLowerCase().endsWith(".py")?void 0:r}resolveVariables(e,t){return new d.SystemVariables(t,void 0,this.workspace).resolveAny(e)}async getManagePyPath(e){if(!e)return;const t=s.join(e.uri.fsPath,"manage.py");return await this.fs.fileExists(t)?`\${workspaceFolder}${this.pathUtils.separator}manage.py`:void 0}};m=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IFileSystem)),i(1,(0,o.inject)(a.IWorkspaceService)),i(2,(0,o.inject)(u.IPathUtils))],m),t.DjangoLaunchDebugConfigurationProvider=m},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FastAPILaunchDebugConfigurationProvider=void 0;const o=n(0),s=n(3),a=n(13),c=n(14),u=n(8),l=n(9),d=n(51),h=n(39);let p=class{constructor(e){this.fs=e}isSupported(e){return e===h.DebugConfigurationType.launchFastAPI}async buildConfiguration(e,t){const n=await this.getApplicationPath(t.folder);let r;const i={name:c.DebugConfigStrings.fastapi.snippet.name(),type:d.DebuggerTypeName,request:"launch",module:"uvicorn",args:["main:app"],jinja:!0,justMyCode:!0};if(!n){const t=await e.showInputBox({title:c.DebugConfigStrings.fastapi.enterAppPathOrNamePath.title(),value:"main.py",prompt:c.DebugConfigStrings.fastapi.enterAppPathOrNamePath.prompt(),validate:e=>Promise.resolve(e&&e.trim().length>0?void 0:c.DebugConfigStrings.fastapi.enterAppPathOrNamePath.invalid())});t&&(r=!0,i.args=[s.basename(t,".py").replace("/",".")+":app"])}(0,u.sendTelemetryEvent)(l.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:h.DebugConfigurationType.launchFastAPI,autoDetectedFastAPIMainPyPath:!!n,manuallyEnteredAValue:r}),Object.assign(t.config,i)}async getApplicationPath(e){if(!e)return;const t=s.join(e.uri.fsPath,"main.py");return await this.fs.fileExists(t)?"main.py":void 0}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IFileSystem))],p),t.FastAPILaunchDebugConfigurationProvider=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.FileLaunchDebugConfigurationProvider=void 0;const i=n(0),o=n(14),s=n(8),a=n(9),c=n(51),u=n(39);let l=class{async buildConfiguration(e,t){const n={name:o.DebugConfigStrings.file.snippet.name(),type:c.DebuggerTypeName,request:"launch",program:"${file}",console:"integratedTerminal",justMyCode:!0};Object.assign(t.config,n)}};r([(0,s.captureTelemetry)(a.EventName.DEBUGGER_CONFIGURATION_PROMPTS,{configurationType:u.DebugConfigurationType.launchFile},!1)],l.prototype,"buildConfiguration",null),l=r([(0,i.injectable)()],l),t.FileLaunchDebugConfigurationProvider=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FlaskLaunchDebugConfigurationProvider=void 0;const o=n(0),s=n(3),a=n(13),c=n(14),u=n(8),l=n(9),d=n(51),h=n(39);let p=class{constructor(e){this.fs=e}isSupported(e){return e===h.DebugConfigurationType.launchFlask}async buildConfiguration(e,t){const n=await this.getApplicationPath(t.folder);let r;const i={name:c.DebugConfigStrings.flask.snippet.name(),type:d.DebuggerTypeName,request:"launch",module:"flask",env:{FLASK_APP:n||"app.py",FLASK_ENV:"development"},args:["run","--no-debugger"],jinja:!0,justMyCode:!0};if(!n){const t=await e.showInputBox({title:c.DebugConfigStrings.flask.enterAppPathOrNamePath.title(),value:"app.py",prompt:c.DebugConfigStrings.flask.enterAppPathOrNamePath.prompt(),validate:e=>Promise.resolve(e&&e.trim().length>0?void 0:c.DebugConfigStrings.flask.enterAppPathOrNamePath.invalid())});t&&(r=!0,i.env.FLASK_APP=t)}(0,u.sendTelemetryEvent)(l.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:h.DebugConfigurationType.launchFlask,autoDetectedFlaskAppPyPath:!!n,manuallyEnteredAValue:r}),Object.assign(t.config,i)}async getApplicationPath(e){if(!e)return;const t=s.join(e.uri.fsPath,"app.py");return await this.fs.fileExists(t)?"app.py":void 0}};p=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IFileSystem))],p),t.FlaskLaunchDebugConfigurationProvider=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleLaunchDebugConfigurationProvider=void 0;const i=n(0),o=n(14),s=n(8),a=n(9),c=n(51),u=n(39);let l=class{async buildConfiguration(e,t){let n;const r={name:o.DebugConfigStrings.module.snippet.name(),type:c.DebuggerTypeName,request:"launch",module:o.DebugConfigStrings.module.snippet.default(),justMyCode:!0},i=await e.showInputBox({title:o.DebugConfigStrings.module.enterModule.title(),value:r.module||o.DebugConfigStrings.module.enterModule.default(),prompt:o.DebugConfigStrings.module.enterModule.prompt(),validate:e=>Promise.resolve(e&&e.trim().length>0?void 0:o.DebugConfigStrings.module.enterModule.invalid())});i&&(n=!0,r.module=i),(0,s.sendTelemetryEvent)(a.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:u.DebugConfigurationType.launchModule,manuallyEnteredAValue:n}),Object.assign(t.config,r)}};l=r([(0,i.injectable)()],l),t.ModuleLaunchDebugConfigurationProvider=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.PidAttachDebugConfigurationProvider=void 0;const i=n(0),o=n(14),s=n(8),a=n(9),c=n(51),u=n(39);let l=class{async buildConfiguration(e,t){const n={name:o.DebugConfigStrings.attachPid.snippet.name(),type:c.DebuggerTypeName,request:"attach",processId:"${command:pickProcess}",justMyCode:!0};Object.assign(t.config,n)}};r([(0,s.captureTelemetry)(a.EventName.DEBUGGER_CONFIGURATION_PROMPTS,{configurationType:u.DebugConfigurationType.pidAttach},!1)],l.prototype,"buildConfiguration",null),l=r([(0,i.injectable)()],l),t.PidAttachDebugConfigurationProvider=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationProviderFactory=void 0;const o=n(0),s=n(39);let a=class{constructor(e,t,n,r,i,o,a,c){this.providers=new Map,this.providers.set(s.DebugConfigurationType.launchDjango,n),this.providers.set(s.DebugConfigurationType.launchFastAPI,e),this.providers.set(s.DebugConfigurationType.launchFlask,t),this.providers.set(s.DebugConfigurationType.launchFile,i),this.providers.set(s.DebugConfigurationType.launchModule,r),this.providers.set(s.DebugConfigurationType.launchPyramid,o),this.providers.set(s.DebugConfigurationType.remoteAttach,a),this.providers.set(s.DebugConfigurationType.pidAttach,c)}create(e){return this.providers.get(e)}};a=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IDebugConfigurationProvider)),i(0,(0,o.named)(s.DebugConfigurationType.launchFastAPI)),i(1,(0,o.inject)(s.IDebugConfigurationProvider)),i(1,(0,o.named)(s.DebugConfigurationType.launchFlask)),i(2,(0,o.inject)(s.IDebugConfigurationProvider)),i(2,(0,o.named)(s.DebugConfigurationType.launchDjango)),i(3,(0,o.inject)(s.IDebugConfigurationProvider)),i(3,(0,o.named)(s.DebugConfigurationType.launchModule)),i(4,(0,o.inject)(s.IDebugConfigurationProvider)),i(4,(0,o.named)(s.DebugConfigurationType.launchFile)),i(5,(0,o.inject)(s.IDebugConfigurationProvider)),i(5,(0,o.named)(s.DebugConfigurationType.launchPyramid)),i(6,(0,o.inject)(s.IDebugConfigurationProvider)),i(6,(0,o.named)(s.DebugConfigurationType.remoteAttach)),i(7,(0,o.inject)(s.IDebugConfigurationProvider)),i(7,(0,o.named)(s.DebugConfigurationType.pidAttach))],a),t.DebugConfigurationProviderFactory=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.PyramidLaunchDebugConfigurationProvider=void 0;const o=n(0),s=n(3),a=n(4),c=n(13),u=n(1),l=n(14),d=n(74),h=n(8),p=n(9),f=n(51),g=n(39);let m=class{constructor(e,t,n){this.fs=e,this.workspace=t,this.pathUtils=n}async buildConfiguration(e,t){const n=await this.getDevelopmentIniPath(t.folder),r=`\${workspaceFolder}${this.pathUtils.separator}development.ini`;let i;const o={name:l.DebugConfigStrings.pyramid.snippet.name(),type:f.DebuggerTypeName,request:"launch",module:"pyramid.scripts.pserve",args:[n||r],pyramid:!0,jinja:!0,justMyCode:!0};if(!n){const n=await e.showInputBox({title:l.DebugConfigStrings.pyramid.enterDevelopmentIniPath.title(),value:r,prompt:l.DebugConfigStrings.pyramid.enterDevelopmentIniPath.prompt(),validate:e=>this.validateIniPath(t?t.folder:void 0,r,e)});n&&(i=!0,o.args=[n])}(0,h.sendTelemetryEvent)(p.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:g.DebugConfigurationType.launchPyramid,autoDetectedPyramidIniPath:!!n,manuallyEnteredAValue:i}),Object.assign(t.config,o)}async validateIniPath(e,t,n){if(!e)return;const r=l.DebugConfigStrings.pyramid.enterDevelopmentIniPath.invalid();if(!n||0===n.trim().length)return r;const i=this.resolveVariables(n,e.uri);return(n===t||await this.fs.fileExists(i))&&i.trim().toLowerCase().endsWith(".ini")?void 0:r}resolveVariables(e,t){return new d.SystemVariables(t,void 0,this.workspace).resolveAny(e)}async getDevelopmentIniPath(e){if(!e)return;const t=s.join(e.uri.fsPath,"development.ini");return await this.fs.fileExists(t)?`\${workspaceFolder}${this.pathUtils.separator}development.ini`:void 0}};m=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IFileSystem)),i(1,(0,o.inject)(a.IWorkspaceService)),i(2,(0,o.inject)(u.IPathUtils))],m),t.PyramidLaunchDebugConfigurationProvider=m},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteAttachDebugConfigurationProvider=void 0;const i=n(0),o=n(14),s=n(8),a=n(9),c=n(51),u=n(39);let l=class{async buildConfiguration(e,t){const n={name:o.DebugConfigStrings.attach.snippet.name(),type:c.DebuggerTypeName,request:"attach",connect:{host:"localhost",port:5678},pathMappings:[{localRoot:"${workspaceFolder}",remoteRoot:"."}],justMyCode:!0},r=n.connect;return r.host=await e.showInputBox({title:o.DebugConfigStrings.attach.enterRemoteHost.title(),step:1,totalSteps:2,value:r.host||"localhost",prompt:o.DebugConfigStrings.attach.enterRemoteHost.prompt(),validate:e=>Promise.resolve(e&&e.trim().length>0?void 0:o.DebugConfigStrings.attach.enterRemoteHost.invalid())}),r.host||(r.host="localhost"),(0,s.sendTelemetryEvent)(a.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:u.DebugConfigurationType.remoteAttach,manuallyEnteredAValue:"localhost"!==r.host}),Object.assign(t.config,n),n=>this.configurePort(e,t.config)}async configurePort(e,t){const n=t.connect||(t.connect={}),r=await e.showInputBox({title:o.DebugConfigStrings.attach.enterRemotePort.title(),step:2,totalSteps:2,value:(n.port||5678).toString(),prompt:o.DebugConfigStrings.attach.enterRemotePort.prompt(),validate:e=>Promise.resolve(e&&/^\d+$/.test(e.trim())?void 0:o.DebugConfigStrings.attach.enterRemotePort.invalid())});r&&/^\d+$/.test(r.trim())&&(n.port=parseInt(r,10)),n.port||(n.port=5678),(0,s.sendTelemetryEvent)(a.EventName.DEBUGGER_CONFIGURATION_PROMPTS,void 0,{configurationType:u.DebugConfigurationType.remoteAttach,manuallyEnteredAValue:5678!==n.port})}};l=r([(0,i.injectable)()],l),t.RemoteAttachDebugConfigurationProvider=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachConfigurationResolver=void 0;const o=n(0),s=n(4),a=n(13),c=n(1),u=n(11),l=n(185),d=n(310);let h=class extends d.BaseConfigurationResolver{constructor(e,t,n,r,i){super(e,t,n,r,i)}async resolveDebugConfigurationWithSubstitutedVariables(e,t,n){const r=this.getWorkspaceFolder(e);await this.provideAttachDefaults(r,t);const i=t;return Array.isArray(i.debugOptions)&&(i.debugOptions=i.debugOptions.filter((e,t)=>i.debugOptions.indexOf(e)===t)),t}async provideAttachDefaults(e,t){Array.isArray(t.debugOptions)||(t.debugOptions=[]),t.connect||t.listen||t.host||(t.host="localhost"),void 0===t.justMyCode&&(t.justMyCode=!t.debugStdLib),t.showReturnValue=!1!==t.showReturnValue,t.workspaceFolder=e?e.fsPath:void 0;const n=t.debugOptions;t.justMyCode||this.debugOption(n,l.DebugOptions.DebugStdLib),t.django&&this.debugOption(n,l.DebugOptions.Django),t.jinja&&this.debugOption(n,l.DebugOptions.Jinja),!0===t.subProcess&&this.debugOption(n,l.DebugOptions.SubProcess),t.pyramid&&-1===n.indexOf(l.DebugOptions.Jinja)&&!1!==t.jinja&&this.debugOption(n,l.DebugOptions.Jinja),(t.redirectOutput||void 0===t.redirectOutput)&&this.debugOption(n,l.DebugOptions.RedirectOutput);const r=this.isLocalHost(t.host);this.platformService.isWindows&&r&&this.debugOption(n,l.DebugOptions.FixFilePathCase),this.platformService.isWindows?this.debugOption(n,l.DebugOptions.WindowsClient):this.debugOption(n,l.DebugOptions.UnixClient),t.showReturnValue&&this.debugOption(n,l.DebugOptions.ShowReturnValue),t.pathMappings=this.resolvePathMappings(t.pathMappings||[],t.host,t.localRoot,t.remoteRoot,e),this.sendTelemetry("attach",t)}resolvePathMappings(e,t,n,r,i){return n&&r&&e.push({localRoot:n,remoteRoot:r}),this.isLocalHost(t)&&(e=this.fixUpPathMappings(e,i?i.fsPath:"")),e.length>0?e:void 0}};h=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IWorkspaceService)),i(1,(0,o.inject)(s.IDocumentManager)),i(2,(0,o.inject)(a.IPlatformService)),i(3,(0,o.inject)(c.IConfigurationService)),i(4,(0,o.inject)(u.IInterpreterService))],h),t.AttachConfigurationResolver=h},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchConfigurationResolver=void 0;const o=n(0),s=n(302),a=n(31),c=n(4),u=n(13),l=n(1),d=n(11),h=n(51),p=n(185),f=n(39),g=n(310),m=n(311);let v=class extends g.BaseConfigurationResolver{constructor(e,t,n,r,i,o,s){super(e,t,r,i,s),this.invalidPythonPathInDebuggerService=n,this.debugEnvHelper=o}async resolveDebugConfiguration(e,t,n){if(void 0===t.name&&void 0===t.type&&void 0===t.request&&void 0===t.program&&void 0===t.env){const e=this.getProgram();t.name="Launch",t.type=h.DebuggerTypeName,t.request="launch",t.program=null!=e?e:"",t.env={}}const r=this.getWorkspaceFolder(e);return await this.resolveAndUpdatePaths(r,t),t}async resolveDebugConfigurationWithSubstitutedVariables(e,t,n){const r=this.getWorkspaceFolder(e);await this.provideLaunchDefaults(r,t);if(await this.validateLaunchConfiguration(e,t))return Array.isArray(t.debugOptions)&&(t.debugOptions=t.debugOptions.filter((e,n)=>t.debugOptions.indexOf(e)===n)),t}async provideLaunchDefaults(e,t){var n;if(void 0===t.python&&(t.python=t.pythonPath),void 0===t.debugAdapterPython&&(t.debugAdapterPython=t.pythonPath),void 0===t.debugLauncherPython&&(t.debugLauncherPython=t.pythonPath),delete t.pythonPath,"string"!=typeof t.cwd&&e&&(t.cwd=e.fsPath),"string"!=typeof t.envFile&&e){const n=this.configurationService.getSettings(e);t.envFile=n.envFile}t.env=await this.debugEnvHelper.getEnvironmentVariables(t),"boolean"!=typeof t.stopOnEntry&&(t.stopOnEntry=!1),t.showReturnValue=!1!==t.showReturnValue,t.console||(t.console="integratedTerminal"),"internalConsole"===t.console||t.internalConsoleOptions||(t.internalConsoleOptions="neverOpen"),Array.isArray(t.debugOptions)||(t.debugOptions=[]),void 0===t.justMyCode&&(t.justMyCode=!t.debugStdLib),t.workspaceFolder=e?e.fsPath:void 0;const r=t.debugOptions;t.justMyCode||this.debugOption(r,p.DebugOptions.DebugStdLib),t.stopOnEntry&&this.debugOption(r,p.DebugOptions.StopOnEntry),t.showReturnValue&&this.debugOption(r,p.DebugOptions.ShowReturnValue),t.django&&this.debugOption(r,p.DebugOptions.Django),t.jinja&&this.debugOption(r,p.DebugOptions.Jinja),void 0===t.redirectOutput&&"internalConsole"===t.console&&(t.redirectOutput=!0),t.redirectOutput&&this.debugOption(r,p.DebugOptions.RedirectOutput),t.sudo&&this.debugOption(r,p.DebugOptions.Sudo),!0===t.subProcess&&this.debugOption(r,p.DebugOptions.SubProcess),this.platformService.isWindows&&this.debugOption(r,p.DebugOptions.FixFilePathCase);const i=this.isDebuggingFastAPI(t),o=this.isDebuggingFlask(t);if((t.pyramid||o||i)&&-1===r.indexOf(p.DebugOptions.Jinja)&&!1!==t.jinja&&this.debugOption(r,p.DebugOptions.Jinja),t.pathMappings){let n=t.pathMappings;n.length>0&&(n=this.fixUpPathMappings(n||[],e?e.fsPath:"")),t.pathMappings=n.length>0?n:void 0}const s=(null===(n=t.purpose)||void 0===n?void 0:n.includes(p.DebugPurpose.DebugTest))||"test"===t.request?"test":"launch";this.sendTelemetry(s,t)}async validateLaunchConfiguration(e,t){const n=this.invalidPythonPathInDebuggerService;for(const r of[t.python,t.debugAdapterPython,t.debugLauncherPython]){const i=r===t.pythonPath?this.pythonPathSource:f.PythonPathSource.launchJson;if(!await n.validatePythonPath(r,i,null==e?void 0:e.uri))return!1}return!0}};v=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IWorkspaceService)),i(1,(0,o.inject)(c.IDocumentManager)),i(2,(0,o.inject)(a.IDiagnosticsService)),i(2,(0,o.named)(s.InvalidPythonPathInDebuggerServiceId)),i(3,(0,o.inject)(u.IPlatformService)),i(4,(0,o.inject)(l.IConfigurationService)),i(5,(0,o.inject)(m.IDebugEnvironmentVariablesService)),i(6,(0,o.inject)(d.IInterpreterService))],v),t.LaunchConfigurationResolver=v},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCommands=void 0;const o=n(3),s=n(0),a=n(4),c=n(10),u=n(1),l=n(8),d=n(9),h=n(184),p=n(185);let f=class{constructor(e,t,n,r){this.commandManager=e,this.debugService=t,this.launchJsonReader=n,this.disposables=r,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}activate(){return this.disposables.push(this.commandManager.registerCommand(c.Commands.Debug_In_Terminal,async e=>{(0,l.sendTelemetryEvent)(d.EventName.DEBUG_IN_TERMINAL_BUTTON);const t=await this.getDebugConfiguration(e);this.debugService.startDebugging(void 0,t)})),Promise.resolve()}async getDebugConfiguration(e){var t,n,r;const i=(await this.launchJsonReader.getConfigurationsByUri(e)).filter(e=>"launch"===e.request);for(const r of i)if(null===(t=r.purpose)||void 0===t?void 0:t.includes(p.DebugPurpose.DebugInTerminal))return r.program||r.module||r.code||(r.program=null!==(n=null==e?void 0:e.fsPath)&&void 0!==n?n:"${file}"),r.purpose=[],r;return{name:"Debug "+(e?o.basename(e.fsPath):"File"),type:"python",request:"launch",program:null!==(r=null==e?void 0:e.fsPath)&&void 0!==r?r:"${file}",console:"integratedTerminal"}}};f=r([(0,s.injectable)(),i(0,(0,s.inject)(a.ICommandManager)),i(1,(0,s.inject)(a.IDebugService)),i(2,(0,s.inject)(h.ILaunchJsonReader)),i(3,(0,s.inject)(u.IDisposableRegistry))],f),t.DebugCommands=f},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChildProcessAttachEventHandler=void 0;const o=n(0),s=n(53),a=n(598),c=n(186);let u=class{constructor(e){this.childProcessAttachService=e}async handleCustomEvent(e){if(!e)return;let t;e.event!==a.DebuggerEvents.PtvsdAttachToSubprocess&&e.event!==a.DebuggerEvents.DebugpyAttachToSubprocess||(t=e.body,Object.keys(t).length>0&&await this.childProcessAttachService.attach(t,e.session))}};r([(0,s.swallowExceptions)("Handle child process launch")],u.prototype,"handleCustomEvent",null),u=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IChildProcessAttachService))],u),t.ChildProcessAttachEventHandler=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggerEvents=void 0,function(e){e.PtvsdAttachToSubprocess="ptvsd_attach",e.DebugpyAttachToSubprocess="debugpyAttach"}(t.DebuggerEvents||(t.DebuggerEvents={}))},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChildProcessAttachService=void 0;const o=n(0),s=n(4),a=n(22),c=n(8),u=n(9);let l=class{constructor(e,t,n){this.appShell=e,this.debugService=t,this.workspaceService=n}async attach(e,t){const n=e,r=n.subProcessId,i=this.getRelatedWorkspaceFolder(n);await this.debugService.startDebugging(i,n,t)||this.appShell.showErrorMessage("Failed to launch debugger for child process "+r).then(a.noop,a.noop)}getRelatedWorkspaceFolder(e){const t=e.workspaceFolder;if(this.workspaceService.hasWorkspaceFolders&&t)return this.workspaceService.workspaceFolders.find(e=>e.uri.fsPath===t)}};r([(0,c.captureTelemetry)(u.EventName.DEBUGGER_ATTACH_TO_CHILD_PROCESS)],l.prototype,"attach",null),l=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IApplicationShell)),i(1,(0,o.inject)(s.IDebugService)),i(2,(0,o.inject)(s.IWorkspaceService))],l),t.ChildProcessAttachService=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(601),i=n(232);t.registerTypes=function(e){e.addSingleton(i.IFormatterHelper,r.FormatterHelper)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterHelper=void 0;const o=n(0),s=n(3),a=n(1),c=n(15);let u=class{constructor(e){this.serviceContainer=e}translateToId(e){switch(e){case a.Product.autopep8:return"autopep8";case a.Product.black:return"black";case a.Product.yapf:return"yapf";default:throw new Error(`Unrecognized Formatter '${e}'`)}}getSettingsPropertyNames(e){const t=this.translateToId(e);return{argsName:t+"Args",pathName:t+"Path"}}getExecutionInfo(e,t,n){const r=this.serviceContainer.get(a.IConfigurationService).getSettings(n),i=this.getSettingsPropertyNames(e),o=r.formatting[i.pathName];let c,u=Array.isArray(r.formatting[i.argsName])?r.formatting[i.argsName]:[];return u=u.concat(t),s.basename(o)===o&&(c=o),{execPath:o,moduleName:c,args:u,product:e}}};u=r([(0,o.injectable)(),i(0,(0,o.inject)(c.IServiceContainer))],u),t.FormatterHelper=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageConfiguration=void 0;const r=n(2),i=n(306);t.getLanguageConfiguration=function(){return{onEnterRules:[{beforeText:(0,i.verboseRegExp)("\n ^\n (?! \\s+ \\\\ )\n [^#\n]+\n \\\\\n $\n "),action:{indentAction:r.IndentAction.Indent}},{beforeText:/^\s*#.*/,afterText:/.+$/,action:{indentAction:r.IndentAction.None,appendText:"# "}},{beforeText:(0,i.verboseRegExp)("\n ^\n \\s*\n (?:\n (?:\n (?:\n class |\n def |\n async \\s+ def |\n except |\n for |\n async \\s+ for |\n if |\n elif |\n while |\n with |\n async \\s+ with |\n match |\n case\n )\n \\b .*\n ) |\n else |\n try |\n finally\n )\n \\s*\n [:]\n \\s*\n (?: [#] .* )?\n $\n "),action:{indentAction:r.IndentAction.Indent}},{beforeText:(0,i.verboseRegExp)("\n ^\n (?:\n (?:\n \\s*\n (?:\n pass\n )\n ) |\n (?:\n \\s+\n (?:\n raise |\n break |\n continue\n )\n )\n )\n \\s*\n (?: [#] .* )?\n $\n "),action:{indentAction:r.IndentAction.Outdent}}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinterCommands=void 0;const r=n(4),i=n(10),o=n(14),s=n(8),a=n(9),c=n(57);t.LinterCommands=class{constructor(e){this.serviceContainer=e,this.disposables=[],this.linterManager=this.serviceContainer.get(c.ILinterManager),this.appShell=this.serviceContainer.get(r.IApplicationShell),this.documentManager=this.serviceContainer.get(r.IDocumentManager);const t=this.serviceContainer.get(r.ICommandManager);t.registerCommand(i.Commands.Set_Linter,this.setLinterAsync.bind(this)),t.registerCommand(i.Commands.Enable_Linter,this.enableLintingAsync.bind(this)),t.registerCommand(i.Commands.Run_Linter,this.runLinting.bind(this))}dispose(){this.disposables.forEach(e=>e.dispose())}async setLinterAsync(){const e=this.linterManager.getAllLinterInfos(),t=["Disable Linting",...e.map(e=>e.id).sort()],n=await this.linterManager.getActiveLinters(this.settingsUri);let r;switch(n.length){case 0:r="none";break;case 1:r=n[0].id;break;default:r="multiple selected"}const i={matchOnDetail:!0,matchOnDescription:!0,placeHolder:"current: "+r},c=await this.appShell.showQuickPick(t,i);if(void 0!==c)if("Disable Linting"===c)await this.linterManager.enableLintingAsync(!1),(0,s.sendTelemetryEvent)(a.EventName.SELECT_LINTER,void 0,{enabled:!1});else{const t=e.findIndex(e=>e.id===c);if(n.length>1){if("Yes"!==await this.appShell.showWarningMessage(o.Linters.replaceWithSelectedLinter().format(c),"Yes","No"))return}await this.linterManager.setActiveLintersAsync([e[t].product],this.settingsUri),(0,s.sendTelemetryEvent)(a.EventName.SELECT_LINTER,void 0,{tool:c,enabled:!0})}}async enableLintingAsync(){const e=["Enable","Disable"],t={matchOnDetail:!0,matchOnDescription:!0,placeHolder:"current: "+(await this.linterManager.isLintingEnabled(this.settingsUri)?e[0]:e[1])},n=await this.appShell.showQuickPick(e,t);if(void 0!==n){const t=n===e[0];await this.linterManager.enableLintingAsync(t,this.settingsUri)}}runLinting(){return this.serviceContainer.get(c.ILintingEngine).lintOpenPythonFiles()}get settingsUri(){return this.documentManager.activeTextEditor?this.documentManager.activeTextEditor.document.uri:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(21),i=n(605),o=n(606),s=n(620),a=n(57);t.registerTypes=function(e){e.addSingleton(a.ILintingEngine,s.LintingEngine),e.addSingleton(a.ILinterManager,o.LinterManager),e.addSingleton(r.IExtensionActivationService,i.LinterProvider)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinterProvider=void 0;const o=n(0),s=n(3),a=n(2),c=n(4),u=n(10);n(12);const l=n(13),d=n(1),h=n(11),p=n(15),f=n(57);let g=class{constructor(e){this.serviceContainer=e,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1},this.disposables=[],this.activatedOnce=!1,this.serviceContainer=e,this.fs=this.serviceContainer.get(l.IFileSystem),this.engine=this.serviceContainer.get(f.ILintingEngine),this.linterManager=this.serviceContainer.get(f.ILinterManager),this.interpreterService=this.serviceContainer.get(h.IInterpreterService),this.documents=this.serviceContainer.get(c.IDocumentManager),this.configuration=this.serviceContainer.get(d.IConfigurationService),this.workspaceService=this.serviceContainer.get(c.IWorkspaceService)}async activate(){if(this.activatedOnce)return;this.activatedOnce=!0,this.disposables.push(this.interpreterService.onDidChangeInterpreter(()=>this.engine.lintOpenPythonFiles())),this.documents.onDidOpenTextDocument(e=>this.onDocumentOpened(e),this.disposables),this.documents.onDidCloseTextDocument(e=>this.onDocumentClosed(e),this.disposables),this.documents.onDidSaveTextDocument(e=>this.onDocumentSaved(e),this.disposables);const e=this.workspaceService.onDidChangeConfiguration(this.lintSettingsChangedHandler.bind(this));if(this.disposables.push(e),!(0,u.isTestExecution)()){const e=setTimeout(()=>this.engine.lintOpenPythonFiles().ignoreErrors(),1200);this.disposables.push({dispose:()=>clearTimeout(e)})}}dispose(){this.disposables.forEach(e=>e.dispose())}isDocumentOpen(e){return this.documents.textDocuments.some(t=>this.fs.arePathsSame(t.uri.fsPath,e.fsPath))}lintSettingsChangedHandler(e){a.workspace.textDocuments.forEach(t=>{e.affectsConfiguration("python.linting",t.uri)&&this.engine.lintDocument(t,"auto").ignoreErrors()})}onDocumentOpened(e){this.engine.lintDocument(e,"auto").ignoreErrors()}onDocumentSaved(e){const t=this.configuration.getSettings(e.uri);"python"===e.languageId&&t.linting.enabled&&t.linting.lintOnSave?this.engine.lintDocument(e,"save").ignoreErrors():this.linterManager.getActiveLinters(e.uri).then(t=>{const n=s.basename(e.uri.fsPath).toLowerCase();t.filter(e=>e.configFileNames.indexOf(n)>=0).length>0&&setTimeout(()=>this.engine.lintOpenPythonFiles(),1e3)}).ignoreErrors()}onDocumentClosed(e){e&&e.fileName&&e.uri&&(this.isDocumentOpen(e.uri)||this.engine.clearDiagnostics(e))}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(p.IServiceContainer))],g),t.LinterProvider=g},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinterManager=void 0;const o=n(0),s=n(1),a=n(5),c=n(607),u=n(612),l=n(613),d=n(614),h=n(615),p=n(616),f=n(617),g=n(618),m=n(619),v=n(57);class y{constructor(e){this.configService=e}get info(){return new l.LinterInfo(s.Product.pylint,v.LinterId.PyLint,this.configService)}async lint(e,t){return[]}}let b=class{constructor(e){this.configService=e,this.linters=[new l.LinterInfo(s.Product.bandit,v.LinterId.Bandit,this.configService),new l.LinterInfo(s.Product.flake8,v.LinterId.Flake8,this.configService),new l.LinterInfo(s.Product.pylint,v.LinterId.PyLint,this.configService,["pylintrc",".pylintrc"]),new l.LinterInfo(s.Product.mypy,v.LinterId.MyPy,this.configService),new l.LinterInfo(s.Product.pycodestyle,v.LinterId.PyCodeStyle,this.configService),new l.LinterInfo(s.Product.prospector,v.LinterId.Prospector,this.configService),new l.LinterInfo(s.Product.pydocstyle,v.LinterId.PyDocStyle,this.configService),new l.LinterInfo(s.Product.pylama,v.LinterId.PyLama,this.configService)]}getAllLinterInfos(){return this.linters}getLinterInfo(e){const t=this.linters.findIndex((t,n,r)=>t.product===e);if(t>=0)return this.linters[t];throw new Error(`Invalid linter '${s.Product[e]}'`)}async isLintingEnabled(e){const t=this.configService.getSettings(e),n=await this.getActiveLinters(e);return t.linting.enabled&&n.length>0}async enableLintingAsync(e,t){await this.configService.updateSetting("linting.enabled",e,t)}async getActiveLinters(e){return this.linters.filter(t=>t.isEnabled(e))}async setActiveLintersAsync(e,t){if(e.filter(e=>-1!==this.linters.findIndex(t=>t.product===e)).length>0){const n=await this.getActiveLinters(t);for(const e of n)await e.enableAsync(!1,t);if(e.length>0){const n=this.linters.filter(t=>e.findIndex(e=>t.product===e)>=0);for(const e of n)await e.enableAsync(!0,t);await this.enableLintingAsync(!0,t)}}}async createLinter(e,t,n){if(!await this.isLintingEnabled(n))return new y(this.configService);const r="Linter manager: Unknown linter";switch(e){case s.Product.bandit:return new c.Bandit(t);case s.Product.flake8:return new u.Flake8(t);case s.Product.pylint:return new m.Pylint(t);case s.Product.mypy:return new d.MyPy(t);case s.Product.prospector:return new h.Prospector(t);case s.Product.pylama:return new g.PyLama(t);case s.Product.pydocstyle:return new f.PyDocStyle(t);case s.Product.pycodestyle:return new p.Pycodestyle(t);default:(0,a.traceError)(r)}throw new Error(r)}};b=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IConfigurationService))],b),t.LinterManager=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bandit=t.BANDIT_REGEX=void 0,n(12);const r=n(1),i=n(100),o=n(57),s={LOW:o.LintMessageSeverity.Information,MEDIUM:o.LintMessageSeverity.Warning,HIGH:o.LintMessageSeverity.Error};t.BANDIT_REGEX="(?\\d+),(?(col)?(\\d+)?),(?\\w+),(?\\w+\\d+):(?.*)\\r?(\\n|$)";class a extends i.BaseLinter{constructor(e){super(r.Product.bandit,e)}async runLinter(e,n){const r=await this.run([e.uri.fsPath],e,n,t.BANDIT_REGEX);return r.forEach(e=>{e.severity=s[e.type]}),r}}t.Bandit=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=void 0;const r=n(609),i=n(610);t.ErrorHandler=class{constructor(e,t){const n=new i.StandardErrorHandler(e,t);this.handler=new r.NotInstalledErrorHandler(e,t),this.handler.setNextHandler(n)}handleError(e,t,n){return this.handler.handleError(e,t,n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotInstalledErrorHandler=void 0;const r=n(25),i=n(5),o=n(57),s=n(312);class a extends s.BaseErrorHandler{async handleError(e,t,n){const s=await this.serviceContainer.get(r.IPythonExecutionFactory).create({resource:t});if(await s.isModuleInstalled(n.moduleName))return!!this.nextHandler&&this.nextHandler.handleError(e,t,n);this.installer.promptToInstall(this.product,t).catch(e=>(0,i.traceError)("NotInstalledErrorHandler.promptToInstall",e));const a=`Linter '${this.serviceContainer.get(o.ILinterManager).getLinterInfo(n.product).id}' is not installed. Please install it or select another linter".`;return(0,i.traceLog)(`\n${a}\n${e}`),(0,i.traceWarn)(a,e),!0}}t.NotInstalledErrorHandler=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StandardErrorHandler=void 0;const r=n(4),i=n(10),o=n(1),s=n(5),a=n(57),c=n(312);class u extends c.BaseErrorHandler{async handleError(e,t,n){if("string"==typeof e&&e.includes("OSError: [Errno 2] No such file or directory: '/"))return this.nextHandler?this.nextHandler.handleError(e,t,n):Promise.resolve(!1);const r=this.serviceContainer.get(a.ILinterManager).getLinterInfo(n.product);return(0,s.traceError)("There was an error in running the linter "+r.id,e),(0,s.traceLog)(`Linting with ${r.id} failed.`),(0,s.traceLog)(e.toString()),this.displayLinterError(r.id).ignoreErrors(),!0}async displayLinterError(e){const t=`There was an error in running the linter '${e}'`,n=this.serviceContainer.get(r.IApplicationShell),s=this.serviceContainer.get(o.IOutputChannel,i.STANDARD_OUTPUT_CHANNEL);"View Errors"===await n.showErrorMessage(t,"View Errors")&&s.show()}}t.StandardErrorHandler=u},function(e,t,n){"use strict";!function(t){var n,r=/^[$_a-z][$_a-z0-9]*$/i;function i(e){var t,n,i,o,s,a,c,u={},l=0,d="",h=!1;for(t=0;t",t+3))<0)throw new Error("'>' missing in named backreference.");if(!(c=u[a=e.substring(t+3,s)]))throw new Error("Named group '"+a+"' is not defined in backreference.");if("number"!=typeof c)throw new Error("Named backreference referencing duplicate named group '"+a+"'.");t=s,d+=c}else if(h)"]"===n&&(h=!1);else if("["===n)h=!0;else if("("===n&&"?:"!==o&&"?="!==o&&"?!"!==o&&(l++,"?<"===o||":<"===o)){if((s=e.indexOf(">",t+3))<0)throw new Error("'>' missing in named group.");if(a=e.substring(t+3,s),!r.test(a))throw new Error("Invalide group name '"+a+"'. Regexp group name should start with '_$a-zA-Z' and can contain only '_$a-zA-Z0-9'.");void 0===(c=u[a])?u[a]=l:"number"==typeof c?u[a]=[c,l]:c.push(l),t=s}return{mapper:u,regexText:d}}e.exports=function(e,t){if("boolean"!=typeof e){"string"!=typeof e&&(t=(e.global?"g":"")+(e.multiline?"m":"")+(e.ignoreCase?"i":""),e=e.source);var r=n?n[e]||(n[e]=i(e)):i(e),o=new RegExp(r.regexText,t);return o.groupsIndices=r.mapper,o.exec=function(e){var t=RegExp.prototype.exec.call(this,e);return t&&s(t),t},o.execGroups=function(e,t){var n=this.exec(e);return n?n.groups(t):null},o.replace=function(e,t){if("function"==typeof t)return e.replace(o,(function(){var e=Array.prototype.slice.call(arguments,0,arguments.length-2);return s(e),t.apply(e,arguments)}));var n=function(e,t){var n,r,i,o,s,a,c="";for(n=0;n' missing in replacement named group.");if(void 0===(a=t[o=e.substring(n+2,s)]))throw new Error("Named group '"+o+"' is not defined in replacement text.");if("number"!=typeof a)throw new Error("Named replacement referencing duplicate named group '"+o+"'.");c+=a,n=s}return c}(t,this.groupsIndices);return e.replace(this,n)},o}function s(e){var t,n,i=r.mapper;return e.group=function(t,n){var r=i[t];if("number"==typeof r)return e[r];if(n)return r.map((function(t){return e[t]}));if(r)for(var o=0;o{e.severity=this.parseMessagesSeverity(e.type,this.pythonSettings.linting.flake8CategorySeverity),0===e.line&&(e.line=1)}),n}}t.Flake8=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinterInfo=void 0;const r=n(3),i=n(56);t.LinterInfo=class{constructor(e,t,n,r=[]){this.configService=n,this._product=e,this._id=t,this._configFileNames=r}get id(){return this._id}get product(){return this._product}get pathSettingName(){return this.id+"Path"}get argsSettingName(){return this.id+"Args"}get enabledSettingName(){return this.id+"Enabled"}get configFileNames(){return this._configFileNames}async enableAsync(e,t){return this.configService.updateSetting("linting."+this.enabledSettingName,e,t)}isEnabled(e){const t=this.configService.getSettings(e),n=this.enabledSettingName;return t.linting[n]}pathName(e){const t=this.configService.getSettings(e),n=this.pathSettingName;return t.linting[n]}linterArgs(e){const t=this.configService.getSettings(e),n=this.argsSettingName,r=t.linting[n];return Array.isArray(r)?r:[]}getExecutionInfo(e,t){const n=this.pathName(t),o=this.linterArgs(t).concat(e),s=(0,i.linterScript)();return r.basename(n)===n?{execPath:void 0,args:[s,"-m",this.id,...o],product:this.product,moduleName:n}:{execPath:n,moduleName:this.id,args:[s,"-p",this.id,n,...o],product:this.product}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MyPy=t.getRegex=void 0,n(12);const r=n(20),i=n(1),o=n(100);function s(e){return(0,r.escapeRegExp)(e)+":(?\\d+)(:(?\\d+))?: (?\\w+): (?.*)\\r?(\\n|$)"}t.getRegex=s;class a extends o.BaseLinter{constructor(e){super(i.Product.mypy,e,1)}async runLinter(e,t){const n=s(e.uri.fsPath.slice(this.getWorkspaceRootPath(e).length+1)),r=await this.run([e.uri.fsPath],e,t,n);return r.forEach(e=>{e.severity=this.parseMessagesSeverity(e.type,this.pythonSettings.linting.mypyCategorySeverity),e.code=e.type}),r}}t.MyPy=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Prospector=void 0;const r=n(3);n(12);const i=n(1),o=n(5),s=n(100);class a extends s.BaseLinter{constructor(e){super(i.Product.prospector,e)}async runLinter(e,t){const n=this.getWorkingDirectoryPath(e),i=r.relative(n,e.uri.fsPath);return this.run([i],e,t)}async parseMessages(e,t,n,r){let i;try{i=JSON.parse(e)}catch(t){return(0,o.traceLog)(`${"#".repeat(10)}Linting Output - ${this.info.id}${"#".repeat(10)}`),(0,o.traceLog)(e),(0,o.traceError)("Failed to parse Prospector output",t),[]}return i.messages.filter((e,t)=>t<=this.pythonSettings.linting.maxNumberOfProblems).map(e=>{const t=null===e.location.line||Number.isNaN(e.location.line)?1:e.location.line;return{code:e.code,message:e.message,column:e.location.character,line:t,type:e.code,provider:`${this.info.id} - ${e.source}`}})}}t.Prospector=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Pycodestyle=void 0,n(12);const r=n(1),i=n(100);class o extends i.BaseLinter{constructor(e){super(r.Product.pycodestyle,e,1)}async runLinter(e,t){const n=await this.run([e.uri.fsPath],e,t);return n.forEach(e=>{e.severity=this.parseMessagesSeverity(e.type,this.pythonSettings.linting.pycodestyleCategorySeverity)}),n}}t.Pycodestyle=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PyDocStyle=void 0;const r=n(3);n(12);const i=n(1),o=n(5),s=n(233),a=n(100),c=n(57);class u extends a.BaseLinter{constructor(e){super(i.Product.pydocstyle,e)}async runLinter(e,t){const n=await this.run([e.uri.fsPath],e,t);return n.forEach(e=>{e.severity=c.LintMessageSeverity.Warning}),n}async parseMessages(e,t,n,i){let a=e.split(/\r?\n/g);const c=r.basename(t.uri.fsPath),u=2*this.pythonSettings.linting.maxNumberOfProblems,l=a.filter(e=>e.length>0);a=[];for(let e=0;et=0).map(e=>s.IS_WINDOWS?e.substring(e.indexOf(c+":")+c.length+1).trim():e.substring(e.indexOf(":")+1).trim()).map(e=>{try{if(0===e.trim().length)return;const n=parseInt(e.substring(0,e.indexOf(" ")),10),r=e.substring(e.indexOf(":")+1).trim(),i=r.substring(0,r.indexOf(":")).trim(),o=r.substring(r.indexOf(":")+1).trim(),s=t.lineAt(n-1).text,a=s.trim();return{code:i,message:o,column:s.indexOf(a),line:n,type:"",provider:this.info.id}}catch(t){(0,o.traceError)(`Failed to parse pydocstyle line '${e}'`,t)}}).filter(e=>void 0!==e).map(e=>e)}}t.PyDocStyle=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PyLama=void 0,n(12);const r=n(1),i=n(100),o=n(57);class s extends i.BaseLinter{constructor(e){super(r.Product.pylama,e,1)}async runLinter(e,t){const n=await this.run([e.uri.fsPath],e,t,"(?.py):(?\\d+):(?\\d+):? \\[(?\\w+)\\]( (?\\w\\d+)?:?)? (?.*)\\r?(\\n|$)");return n.forEach(e=>{e.severity=o.LintMessageSeverity.Warning}),n}}t.PyLama=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Pylint=void 0,n(12);const r=n(1),i=n(5),o=n(100);class s extends o.BaseLinter{constructor(e){super(r.Product.pylint,e)}async runLinter(e,t){const{uri:n}=e,r=this.configService.getSettings(n),i=[n.fsPath],o=await this.run(i,e,t);return o.forEach(e=>{e.severity=this.parseMessagesSeverity(e.type,r.linting.pylintCategorySeverity)}),o}parseOutputMessage(e,t=0){return e.endColumn?e.endColumn=e.endColumn<=0?0:e.endColumn-t:e.endColumn=void 0,{code:e.symbol,message:e.message,column:null===e.column||e.column<=0?0:e.column-t,line:e.line,type:e.type,provider:this.info.id,endLine:null===e.endLine?void 0:e.endLine,endColumn:e.endColumn}}async parseMessages(e,t,n,r){const o=[];try{const t=JSON.parse(e);for(const e of t){const t=this.parseOutputMessage(e,this.columnOffset);if(t&&(o.push(t),o.length>=this.pythonSettings.linting.maxNumberOfProblems))break}}catch(t){(0,i.traceError)(`Linter '${this.info.id}' failed to parse the output '${e}.`,t)}return o}}t.Pylint=s},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LintingEngine=void 0;const o=n(0),s=n(106),a=n(3),c=n(2),u=n(4),l=n(13),d=n(1),h=n(22),p=n(41),f=n(15),g=n(8),m=n(9),v=n(57),y="python",b=new Map;b.set(v.LintMessageSeverity.Error,c.DiagnosticSeverity.Error),b.set(v.LintMessageSeverity.Hint,c.DiagnosticSeverity.Hint),b.set(v.LintMessageSeverity.Information,c.DiagnosticSeverity.Information),b.set(v.LintMessageSeverity.Warning,c.DiagnosticSeverity.Warning);let _=class{constructor(e){this.serviceContainer=e,this.pendingLintings=new Map,this.documents=e.get(u.IDocumentManager),this.workspace=e.get(u.IWorkspaceService),this.configurationService=e.get(d.IConfigurationService),this.linterManager=e.get(v.ILinterManager),this.fileSystem=e.get(l.IFileSystem),this.diagnosticCollection=c.languages.createDiagnosticCollection("python")}get diagnostics(){return this.diagnosticCollection}clearDiagnostics(e){this.diagnosticCollection.has(e.uri)&&this.diagnosticCollection.delete(e.uri)}async lintOpenPythonFiles(){this.diagnosticCollection.clear();const e=this.documents.textDocuments.map(async e=>this.lintDocument(e,"auto"));return await Promise.all(e),this.diagnosticCollection}async lintDocument(e,t){if((0,h.isNotebookCell)(e))return;if(this.diagnosticCollection.set(e.uri,[]),!await this.shouldLintDocument(e))return;this.pendingLintings.has(e.uri.fsPath)&&(this.pendingLintings.get(e.uri.fsPath).cancel(),this.pendingLintings.delete(e.uri.fsPath));const n=new c.CancellationTokenSource;n.token.onCancellationRequested(()=>{this.pendingLintings.has(e.uri.fsPath)&&this.pendingLintings.delete(e.uri.fsPath)}),this.pendingLintings.set(e.uri.fsPath,n);const r=(await this.linterManager.getActiveLinters(e.uri)).map(async r=>{const i=new p.StopWatch,o=(await this.linterManager.createLinter(r.product,this.serviceContainer,e.uri)).lint(e,n.token);return this.sendLinterRunTelemetry(r,e.uri,o,i,t),o});let i=[];const o=this.configurationService.getSettings(e.uri);for(const t of r){const r=await t;if(n.token.isCancellationRequested)break;if(this.isDocumentOpen(e.uri)){for(const t of r)i.push(this.createDiagnostics(t,e));i=i.filter((e,t)=>t<=o.linting.maxNumberOfProblems)}}this.diagnosticCollection.set(e.uri,i)}sendLinterRunTelemetry(e,t,n,r,i){const o=e.pathName(t),s={tool:e.id,hasCustomArgs:e.linterArgs(t).length>0,trigger:i,executableSpecified:o!==e.id};(0,g.sendTelemetryWhenDone)(m.EventName.LINTING,n,r,s)}isDocumentOpen(e){return this.documents.textDocuments.some(t=>t.uri.fsPath===e.fsPath)}createDiagnostics(e,t){const n=new c.Position(e.line-1,e.column);let r=n;e.endLine&&e.endColumn&&(r=new c.Position(e.endLine-1,e.endColumn));const i=new c.Range(n,r),o=b.get(e.severity),s=new c.Diagnostic(i,e.message,o);return s.code=e.code,s.source=e.provider,s}async shouldLintDocument(e){if(!await this.linterManager.isLintingEnabled(e.uri))return this.diagnosticCollection.set(e.uri,[]),!1;if(e.languageId!==y)return!1;const t=this.workspace.getWorkspaceFolder(e.uri),n=t&&"string"==typeof t.uri.fsPath?t.uri.fsPath:void 0,r="string"==typeof n?a.relative(n,e.fileName):e.fileName;return!this.configurationService.getSettings(e.uri).linting.ignorePatterns.map(e=>new s.Minimatch(e,{dot:!0})).some(t=>t.match(e.fileName)||t.match(r))&&(!("file"!==e.uri.scheme||!e.uri.fsPath)&&this.fileSystem.fileExists(e.uri.fsPath))}};_=r([(0,o.injectable)(),i(0,(0,o.inject)(f.IServiceContainer))],_),t.LintingEngine=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PythonCodeActionProvider=void 0;const r=n(2),i=n(22);t.PythonCodeActionProvider=class{provideCodeActions(e,t,n,o){if((0,i.isNotebookCell)(e))return[];const s=new r.CodeAction("Sort imports",r.CodeActionKind.SourceOrganizeImports);return s.command={title:"Sort imports",command:"python.sortImports"},[s]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PythonFormattingEditProvider=void 0;const r=n(4),i=n(10),o=n(1),s=n(11),a=n(623),c=n(628),u=n(629),l=n(630);t.PythonFormattingEditProvider=class{constructor(e,t){this.formatters=new Map,this.disposables=[],this.documentVersionBeforeFormatting=-1,this.formatterMadeChanges=!1,this.saving=!1;const n=new l.YapfFormatter(t),i=new a.AutoPep8Formatter(t),d=new c.BlackFormatter(t),h=new u.DummyFormatter(t);this.formatters.set(n.Id,n),this.formatters.set(d.Id,d),this.formatters.set(i.Id,i),this.formatters.set(h.Id,h),this.commands=t.get(r.ICommandManager),this.workspace=t.get(r.IWorkspaceService),this.documentManager=t.get(r.IDocumentManager),this.config=t.get(o.IConfigurationService);const p=t.get(s.IInterpreterService);this.disposables.push(this.documentManager.onDidSaveTextDocument(async e=>this.onSaveDocument(e))),this.disposables.push(p.onDidChangeInterpreter(async()=>{if(this.documentManager.activeTextEditor)return this.onSaveDocument(this.documentManager.activeTextEditor.document)}))}dispose(){this.disposables.forEach(e=>e.dispose())}provideDocumentFormattingEdits(e,t,n){return this.provideDocumentRangeFormattingEdits(e,void 0,t,n)}async provideDocumentRangeFormattingEdits(e,t,n,r){if(this.saving||e.languageId!==i.PYTHON_LANGUAGE)return[];!0===this.workspace.getConfiguration("editor",e.uri).get("formatOnSave")&&(this.documentVersionBeforeFormatting=e.version);const o=this.config.getSettings(e.uri),s=this.formatters.get(o.formatting.provider),a=await s.formatDocument(e,n,r,t);return this.formatterMadeChanges=a.length>0,a}async onSaveDocument(e){setTimeout(()=>{try{this.formatterMadeChanges&&!e.isDirty&&e.version===this.documentVersionBeforeFormatting&&this.commands.executeCommand("editor.action.formatDocument").then(async()=>{this.saving=!0,await e.save(),this.saving=!1})}finally{this.documentVersionBeforeFormatting=-1,this.saving=!1,this.formatterMadeChanges=!1}},50)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoPep8Formatter=void 0;const r=n(234),i=n(1),o=n(41),s=n(8),a=n(9),c=n(187);class u extends c.BaseFormatter{constructor(e){super("autopep8",r.Product.autopep8,e)}formatDocument(e,t,n,r){const c=new o.StopWatch,u=this.serviceContainer.get(i.IConfigurationService).getSettings(e.uri),l=Array.isArray(u.formatting.autopep8Args)&&u.formatting.autopep8Args.length>0,d=!!r&&!r.isEmpty,h=["--diff"];d&&h.push("--line-range",(r.start.line+1).toString(),(r.end.line+1).toString());const p=super.provideDocumentFormattingEdits(e,t,n,h);return(0,s.sendTelemetryWhenDone)(a.EventName.FORMAT,p,c,{tool:"autopep8",hasCustomArgs:l,formatSelection:d}),p}}t.AutoPep8Formatter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotInstalledError=void 0;const r=n(235);t.isNotInstalledError=function(e){const t=e;if(!("object"==typeof e&&null!==e))return!1;if(e instanceof r.ModuleNotInstalledError)return!0;const n=e.message.indexOf("No module named")>=0;return"ENOENT"===t.code||127===t.code||n}},function(e,t,n){var r,i,o,s,a;r=n(626),i=n(314).utf8,o=n(627),s=n(314).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,d=-1732584194,h=271733878,p=0;p>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[c>>>5]|=128<>>9<<4)]=c;var f=a._ff,g=a._gg,m=a._hh,v=a._ii;for(p=0;p>>0,l=l+b>>>0,d=d+_>>>0,h=h+S>>>0}return r.endian([u,l,d,h])})._ff=function(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+(i>>>0)+s;return(a<>>32-o)+t},a._gg=function(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+(i>>>0)+s;return(a<>>32-o)+t},a._hh=function(e,t,n,r,i,o,s){var a=e+(t^n^r)+(i>>>0)+s;return(a<>>32-o)+t},a._ii=function(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+(i>>>0)+s;return(a<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(a(e,t));return t&&t.asBytes?n:t&&t.asString?s.bytesToString(n):r.bytesToHex(n)}},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,i=0;r>>6-2*i);return t}},e.exports=r},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackFormatter=void 0;const r=n(3),i=n(4),o=n(234),s=n(1),a=n(22),c=n(41),u=n(8),l=n(9),d=n(187);class h extends d.BaseFormatter{constructor(e){super("black",o.Product.black,e)}async formatDocument(e,t,n,o){const d=new c.StopWatch,h=this.serviceContainer.get(s.IConfigurationService).getSettings(e.uri),p=Array.isArray(h.formatting.blackArgs)&&h.formatting.blackArgs.length>0,f=!!o&&!o.isEmpty;if(f){return this.serviceContainer.get(i.IApplicationShell).showErrorMessage('Black does not support the "Format Selection" command').then(a.noop,a.noop),[]}const g=["--diff","--quiet"];".pyi"===r.extname(e.fileName)&&g.push("--pyi");const m=super.provideDocumentFormattingEdits(e,t,n,g);return(0,u.sendTelemetryWhenDone)(l.EventName.FORMAT,m,d,{tool:"black",hasCustomArgs:p,formatSelection:f}),m}}t.BlackFormatter=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DummyFormatter=void 0;const r=n(1),i=n(187);class o extends i.BaseFormatter{constructor(e){super("none",r.Product.yapf,e)}formatDocument(e,t,n,r){return Promise.resolve([])}}t.DummyFormatter=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YapfFormatter=void 0;const r=n(1),i=n(41),o=n(8),s=n(9),a=n(187);class c extends a.BaseFormatter{constructor(e){super("yapf",r.Product.yapf,e)}formatDocument(e,t,n,a){const c=new i.StopWatch,u=this.serviceContainer.get(r.IConfigurationService).getSettings(e.uri),l=Array.isArray(u.formatting.yapfArgs)&&u.formatting.yapfArgs.length>0,d=!!a&&!a.isEmpty,h=["--diff"];d&&void 0!==a&&h.push("--lines",`${a.start.line+1}-${a.end.line+1}`);const p=this.getWorkspaceUri(e).fsPath,f=this.getDocumentPath(e,p),g=super.provideDocumentFormattingEdits(e,t,n,h,f);return(0,o.sendTelemetryWhenDone)(s.EventName.FORMAT,g,c,{tool:"yapf",hasCustomArgs:l,formatSelection:d}),g}}t.YapfFormatter=c},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.ReplProvider=void 0;const i=n(4),o=n(10),s=n(8),a=n(9),c=n(156);class u{constructor(e){this.serviceContainer=e,this.disposables=[],this.activeResourceService=this.serviceContainer.get(i.IActiveResourceService),this.registerCommand()}dispose(){this.disposables.forEach(e=>e.dispose())}registerCommand(){const e=this.serviceContainer.get(i.ICommandManager).registerCommand(o.Commands.Start_REPL,this.commandHandler,this);this.disposables.push(e)}async commandHandler(){const e=this.activeResourceService.getActiveResource(),t=this.serviceContainer.get(c.ICodeExecutionService,"repl");await t.initializeRepl(e)}}r([(0,s.captureTelemetry)(a.EventName.REPL)],u.prototype,"commandHandler",null),t.ReplProvider=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(21),i=n(633),o=n(635),s=n(315);t.registerTypes=function(e){e.addSingleton(s.ISortImportsEditingProvider,o.SortImportsEditingProvider),e.addSingleton(r.IExtensionSingleActivationService,i.CodeActionProviderService)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionProviderService=void 0;const o=n(0),s=n(1),a=n(634);let c=class{constructor(e){this.disposableRegistry=e,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){const e=n(2);this.disposableRegistry.push(e.languages.registerCodeActionsProvider({scheme:"file",language:"jsonc",pattern:"**/launch.json"},new a.LaunchJsonCodeActionProvider,{providedCodeActionKinds:[e.CodeActionKind.QuickFix]}))}};c=r([(0,o.injectable)(),i(0,(0,o.inject)(s.IDisposableRegistry))],c),t.CodeActionProviderService=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchJsonCodeActionProvider=void 0;const r=n(2);t.LaunchJsonCodeActionProvider=class{provideCodeActions(e,t,n){return n.diagnostics.filter(e=>'Incorrect type. Expected "string".'===e.message).map(t=>this.createFix(e,t))}createFix(e,t){const n=`"${e.getText(t.range)}"`,i=new r.CodeAction("Convert to "+n,r.CodeActionKind.QuickFix);return i.edit=new r.WorkspaceEdit,i.edit.replace(e.uri,t.range,n),i}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SortImportsEditingProvider=void 0;const o=n(0),s=n(37),a=n(3),c=n(2),u=n(4),l=n(10),d=n(56),h=n(25),p=n(1),f=n(16),g=n(14),m=n(22),v=n(15),y=n(5),b=n(8),_=n(9);let S=class{constructor(e){this.serviceContainer=e,this.isortPromises=new Map,this.shell=e.get(u.IApplicationShell),this.documentManager=e.get(u.IDocumentManager),this.configurationService=e.get(p.IConfigurationService),this.pythonExecutionFactory=e.get(h.IPythonExecutionFactory),this.processServiceFactory=e.get(h.IProcessServiceFactory),this.editorUtils=e.get(p.IEditorUtils),this.persistentStateFactory=e.get(p.IPersistentStateFactory)}async provideDocumentSortImportsEdits(e){if(this.isortPromises.has(e.fsPath)){const t=this.isortPromises.get(e.fsPath);t.deferred.completed||t.tokenSource.cancel()}const t=new c.CancellationTokenSource,n=this._provideDocumentSortImportsEdits(e,t.token),r=(0,f.createDeferredFromPromise)(n);return this.isortPromises.set(e.fsPath,{deferred:r,tokenSource:t}),n.then(e=>t.token.isCancellationRequested?void 0:e)}async _provideDocumentSortImportsEdits(e,t){const n=await this.documentManager.openTextDocument(e);if(!n)return;if(n.lineCount<=1)return;const r=await this.getExecIsort(n,e,t);if(t&&t.isCancellationRequested)return;const i=await r(n.getText());return i?this.editorUtils.getWorkspaceEditsFromPatch(n.getText(),i,n.uri):void 0}registerCommands(){const e=this.serviceContainer.get(u.ICommandManager).registerCommand(l.Commands.Sort_Imports,this.sortImports,this);this.serviceContainer.get(p.IDisposableRegistry).push(e)}async sortImports(e){if(!e){const t=this.documentManager.activeTextEditor;if(!t||t.document.languageId!==l.PYTHON_LANGUAGE)return void this.shell.showErrorMessage("Please open a Python file to sort the imports.").then(m.noop,m.noop);e=t.document.uri}const t=await this.documentManager.openTextDocument(e);if(t.lineCount<=1)return;const n=t.lineAt(t.lineCount-1);if(n.text.trim().length>0){const t=new c.WorkspaceEdit;t.insert(e,n.range.end,s.EOL),await this.documentManager.applyEdit(t)}try{const t=await this.provideDocumentSortImportsEdits(e);if(!t||0===t.entries().length)return;await this.documentManager.applyEdit(t)}catch(t){let n=t;"string"==typeof t?n=t:t instanceof Error&&(n=t.message),(0,y.traceError)(`Failed to format imports for '${e.fsPath}'.`,t),this.shell.showErrorMessage(n).then(m.noop,m.noop)}}async _showWarningAndOptionallyShowOutput(){const e=this.persistentStateFactory.createGlobalPersistentState("ISORT5_UPGRADE_WARNING_KEY",!1);if(e.value)return;const t=await this.shell.showWarningMessage(g.Diagnostics.checkIsort5UpgradeGuide(),g.Common.openOutputPanel(),g.Common.doNotShowAgain());if(t===g.Common.openOutputPanel()){const e=this.serviceContainer.get(u.ICommandManager);await e.executeCommand(l.Commands.ViewOutput)}else t===g.Common.doNotShowAgain()&&await e.updateValue(!0)}async getExecIsort(e,t,n){const r=this.configurationService.getSettings(t),i=r.sortImports.path,o="string"==typeof i&&i.length>0?i:void 0,s=r.sortImports.args,c={token:n,cwd:a.dirname(t.fsPath)};if(o){const t=await this.processServiceFactory.create(e.uri);return async e=>{const n=function(e,t){const n=[e,"--diff"];t&&n.push(...t);return n}("-",s),r=t.execObservable(o,n,c);return this.communicateWithIsortProcess(r,e)}}const u=await this.pythonExecutionFactory.create({resource:e.uri});return async e=>{const[t,n]=d.sortImports("-",s),r=u.execObservable(t,c);return n(await this.communicateWithIsortProcess(r,e))}}async communicateWithIsortProcess(e,t){var n,r,i,o;let s="",a=!1;const c=(0,f.createDeferred)();return e.out.subscribe({next:e=>{"stdout"===e.source?s+=e.out:(a=a||e.out.includes("W050"),(0,y.traceError)(e.out),e.out.includes("W050")||c.reject(e.out))},complete:()=>{c.resolve(s)}}),null===(r=null===(n=e.proc)||void 0===n?void 0:n.stdin)||void 0===r||r.write(t),null===(o=null===(i=e.proc)||void 0===i?void 0:i.stdin)||void 0===o||o.end(),await c.promise,a&&this._showWarningAndOptionallyShowOutput().ignoreErrors(),s}};r([(0,b.captureTelemetry)(_.EventName.FORMAT_SORT_IMPORTS)],S.prototype,"provideDocumentSortImportsEdits",null),S=r([(0,o.injectable)(),i(0,(0,o.inject)(v.IServiceContainer))],S),t.SortImportsEditingProvider=S},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProvider=void 0;const i=n(4),o=n(10),s=n(28),a=n(1),c=n(53),u=n(8),l=n(9);class d{constructor(e){this.serviceContainer=e,this.disposables=[],this.registerCommands(),this.activeResourceService=this.serviceContainer.get(i.IActiveResourceService)}async initialize(e){const t=this.serviceContainer.get(a.IConfigurationService).getSettings(this.activeResourceService.getActiveResource());if(e&&t.terminal.activateEnvInCurrentTerminal){const t="hideFromUser"in e.creationOptions&&e.creationOptions.hideFromUser;if(!t){const t=this.serviceContainer.get(s.ITerminalActivator);await t.activateEnvironmentInTerminal(e,{preserveFocus:!0})}(0,u.sendTelemetryEvent)(l.EventName.ACTIVATE_ENV_IN_CURRENT_TERMINAL,void 0,{isTerminalVisible:!t})}}dispose(){this.disposables.forEach(e=>e.dispose())}registerCommands(){const e=this.serviceContainer.get(i.ICommandManager).registerCommand(o.Commands.Create_Terminal,this.onCreateTerminal,this);this.disposables.push(e)}async onCreateTerminal(){const e=this.serviceContainer.get(s.ITerminalServiceFactory),t=this.activeResourceService.getActiveResource();await e.createTerminalService(t,"Python").show(!1)}}r([(0,c.swallowExceptions)("Failed to initialize terminal provider")],d.prototype,"initialize",null),r([(0,u.captureTelemetry)(l.EventName.TERMINAL_CREATE,{triggeredBy:"commandpalette"})],d.prototype,"onCreateTerminal",null),t.TerminalProvider=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setExtensionInstallTelemetryProperties=void 0;const r=n(3),i=n(8),o=n(81);t.setExtensionInstallTelemetryProperties=async function(e){const t=r.join(r.dirname(o.EXTENSION_ROOT_DIR),"PythonCodingPack");await e.fileExists(t)?(0,i.setSharedProperty)("installSource","pythonCodingPack"):(0,i.setSharedProperty)("installSource","marketPlace")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=void 0;const r=n(21),i=n(639),o=n(640),s=n(641),a=n(237),c=n(649),u=n(651),l=n(652);t.registerTypes=function(e){e.addSingleton(c.TensorBoardSessionProvider,c.TensorBoardSessionProvider),e.addBinding(c.TensorBoardSessionProvider,r.IExtensionSingleActivationService),e.addSingleton(o.TensorBoardFileWatcher,o.TensorBoardFileWatcher),e.addBinding(o.TensorBoardFileWatcher,r.IExtensionSingleActivationService),e.addSingleton(a.TensorBoardPrompt,a.TensorBoardPrompt),e.addSingleton(r.IExtensionSingleActivationService,s.TensorBoardUsageTracker),e.addSingleton(i.TensorBoardImportCodeLensProvider,i.TensorBoardImportCodeLensProvider),e.addBinding(i.TensorBoardImportCodeLensProvider,r.IExtensionSingleActivationService),e.addSingleton(u.TensorBoardNbextensionCodeLensProvider,u.TensorBoardNbextensionCodeLensProvider),e.addBinding(u.TensorBoardNbextensionCodeLensProvider,r.IExtensionSingleActivationService),e.addSingleton(r.IExtensionSingleActivationService,l.TerminalWatcher)}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardImportCodeLensProvider=void 0;const o=n(0),s=n(20),a=n(2),c=n(10),u=n(1),l=n(14),d=n(8),h=n(9),p=n(110),f=n(188);let g=class{constructor(e){this.disposables=e,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1},this.sendTelemetryOnce=(0,s.once)(d.sendTelemetryEvent.bind(this,h.EventName.TENSORBOARD_ENTRYPOINT_SHOWN,void 0,{trigger:p.TensorBoardEntrypointTrigger.fileimport,entrypoint:p.TensorBoardEntrypoint.codelens}))}async activate(){this.activateInternal().ignoreErrors()}provideCodeLenses(e,t){const n={title:l.TensorBoard.launchNativeTensorBoardSessionCodeLens(),command:c.Commands.LaunchTensorBoard,arguments:[{trigger:p.TensorBoardEntrypointTrigger.fileimport,entrypoint:p.TensorBoardEntrypoint.codelens}]},r=[];for(let i=0;i=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardFileWatcher=void 0;const o=n(0),s=n(2),a=n(4),c=n(1),u=n(110),l=n(237);let d=class{constructor(e,t,n){this.workspaceService=e,this.tensorBoardPrompt=t,this.disposables=n,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1},this.fileSystemWatchers=new Map,this.globPatterns=["*tfevents*","*/*tfevents*","*/*/*tfevents*"]}async activate(){this.activateInternal().ignoreErrors()}async activateInternal(){const e=this.workspaceService.workspaceFolders;if(e){for(const t of e)this.createFileSystemWatcher(t);this.disposables.push(this.workspaceService.onDidChangeWorkspaceFolders(e=>this.updateFileSystemWatchers(e)))}}async updateFileSystemWatchers(e){for(const t of e.added)this.createFileSystemWatcher(t);for(const t of e.removed){const e=this.fileSystemWatchers.get(t);e&&(e.forEach(e=>e.dispose()),this.fileSystemWatchers.delete(t))}}createFileSystemWatcher(e){const t=[];for(const n of this.globPatterns){const r=new s.RelativePattern(e,n),i=this.workspaceService.createFileSystemWatcher(r);this.disposables.push(i.onDidCreate(()=>this.tensorBoardPrompt.showNativeTensorBoardPrompt(u.TensorBoardEntrypointTrigger.tfeventfiles))),this.disposables.push(i.onDidChange(()=>this.tensorBoardPrompt.showNativeTensorBoardPrompt(u.TensorBoardEntrypointTrigger.tfeventfiles))),this.disposables.push(i),t.push(i)}this.fileSystemWatchers.set(e,t)}};d=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IWorkspaceService)),i(1,(0,o.inject)(l.TensorBoardPrompt)),i(2,(0,o.inject)(c.IDisposableRegistry))],d),t.TensorBoardFileWatcher=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardUsageTracker=void 0;const o=n(0),s=n(3),a=n(4),c=n(10),u=n(1),l=n(238),d=n(110),h=n(188),p=n(237),f=(0,c.isTestExecution)();let g=class{constructor(e,t,n){this.documentManager=e,this.disposables=t,this.prompt=n,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1}}async activate(){f?await this.activateInternal():this.activateInternal().ignoreErrors()}async activateInternal(){this.onChangedActiveTextEditor(this.documentManager.activeTextEditor),this.documentManager.onDidChangeActiveTextEditor(e=>this.onChangedActiveTextEditor(e),this,this.disposables)}onChangedActiveTextEditor(e){if(!e||!e.document)return;const{document:t}=e,n=s.extname(t.fileName).toLowerCase();if(".py"===n||".ipynb"===n&&"python"===t.languageId){const e=(0,l.getDocumentLines)(t);(0,h.containsTensorBoardImport)(e)&&this.prompt.showNativeTensorBoardPrompt(d.TensorBoardEntrypointTrigger.fileimport).ignoreErrors()}}};g=r([(0,o.injectable)(),i(0,(0,o.inject)(a.IDocumentManager)),i(1,(0,o.inject)(u.IDisposableRegistry)),i(2,(0,o.inject)(p.TensorBoardPrompt))],g),t.TensorBoardUsageTracker=g},function(e,t,n){var r=t;r.utils=n(75),r.common=n(158),r.sha=n(643),r.ripemd=n(647),r.hmac=n(648),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";t.sha1=n(644),t.sha224=n(645),t.sha256=n(317),t.sha384=n(646),t.sha512=n(318)},function(e,t,n){"use strict";var r=n(75),i=n(158),o=n(316),s=r.rotl32,a=r.sum32,c=r.sum32_5,u=o.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,l),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;rthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardSessionProvider=void 0;const o=n(0),s=n(2),a=n(4),c=n(10),u=n(319),l=n(25),d=n(1),h=n(14),p=n(183),f=n(11),g=n(5),m=n(8),v=n(9),y=n(110),b=n(650);let _=class{constructor(e,t,n,r,i,o,a,c,l){this.installer=e,this.interpreterService=t,this.applicationShell=n,this.workspaceService=r,this.commandManager=i,this.disposables=o,this.processServiceFactory=a,this.stateFactory=c,this.multiStepFactory=l,this.supportedWorkspaceTypes={untrustedWorkspace:!1,virtualWorkspace:!1},this.knownSessions=[],this.preferredViewGroupMemento=this.stateFactory.createGlobalPersistentState("PythonTensorBoardWebviewPreferredViewGroup",s.ViewColumn.Active),this.hasActiveTensorBoardSessionContext=new u.ContextKey("python.hasActiveTensorBoardSession",this.commandManager)}async activate(){this.disposables.push(this.commandManager.registerCommand(c.Commands.LaunchTensorBoard,(e=y.TensorBoardEntrypoint.palette,t=y.TensorBoardEntrypointTrigger.palette)=>((0,m.sendTelemetryEvent)(v.EventName.TENSORBOARD_SESSION_LAUNCH,void 0,{trigger:t,entrypoint:e}),this.createNewSession())),this.commandManager.registerCommand(c.Commands.RefreshTensorBoard,()=>this.knownSessions.map(e=>e.refresh())))}async updateTensorBoardSessionContext(){let e=!1;this.knownSessions.forEach(t=>{t.active&&(e=!0)}),await this.hasActiveTensorBoardSessionContext.set(e)}async didDisposeSession(e){this.knownSessions=this.knownSessions.filter(t=>t!==e),this.updateTensorBoardSessionContext()}async createNewSession(){(0,g.traceInfo)("Starting new TensorBoard session...");try{const e=new b.TensorBoardSession(this.installer,this.interpreterService,this.workspaceService,this.processServiceFactory,this.commandManager,this.disposables,this.applicationShell,this.preferredViewGroupMemento,this.multiStepFactory);return e.onDidChangeViewState(()=>this.updateTensorBoardSessionContext(),this,this.disposables),e.onDidDispose(e=>this.didDisposeSession(e),this,this.disposables),this.knownSessions.push(e),await e.initialize(),e}catch(e){(0,g.traceError)("Encountered error while starting new TensorBoard session: "+e),await this.applicationShell.showErrorMessage(h.TensorBoard.failedToStartSessionError().format(e.message))}}};_=r([(0,o.injectable)(),i(0,(0,o.inject)(d.IInstaller)),i(1,(0,o.inject)(f.IInterpreterService)),i(2,(0,o.inject)(a.IApplicationShell)),i(3,(0,o.inject)(a.IWorkspaceService)),i(4,(0,o.inject)(a.ICommandManager)),i(5,(0,o.inject)(d.IDisposableRegistry)),i(6,(0,o.inject)(l.IProcessServiceFactory)),i(7,(0,o.inject)(d.IPersistentStateFactory)),i(8,(0,o.inject)(p.IMultiStepInputFactory))],_),t.TensorBoardSessionProvider=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TensorBoardSession=void 0;const r=n(52),i=n(3),o=n(2),s=n(226),a=n(56),c=n(1),u=n(16),l=n(14),d=n(41),h=n(8),p=n(9),f=n(238),g=n(110),m=n(94),v=n(5);var y;!function(e){e.JumpToSource="jump_to_source"}(y||(y={}));t.TensorBoardSession=class{constructor(e,t,n,r,i,s,a,c,u){this.installer=e,this.interpreterService=t,this.workspaceService=n,this.processServiceFactory=r,this.commandManager=i,this.disposables=s,this.applicationShell=a,this.globalMemento=c,this.multiStepFactory=u,this._active=!1,this.onDidChangeViewStateEventEmitter=new o.EventEmitter,this.onDidDisposeEventEmitter=new o.EventEmitter}get panel(){return this.webviewPanel}get daemon(){return this.process}get onDidDispose(){return this.onDidDisposeEventEmitter.event}get onDidChangeViewState(){return this.onDidChangeViewStateEventEmitter.event}get active(){return this._active}async refresh(){this.webviewPanel&&(this.webviewPanel.webview.html="",this.webviewPanel.webview.html=await this.getHtml())}async initialize(){const e=new d.StopWatch;if(!await this.ensurePrerequisitesAreInstalled())return;const t=await this.getLogDirectory();if(!t)return;await this.startTensorboardSession(t)&&(await this.showPanel(),(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_SESSION_E2E_STARTUP_DURATION,e.elapsedTime)),this.sessionDurationStopwatch=new d.StopWatch}async promptToInstall(e,t){(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_INSTALL_PROMPT_SHOWN);const n=l.Common.bannerLabelYes(),r=l.Common.bannerLabelNo(),i=e===c.ProductInstallStatus.NeedsUpgrade;let o;o=e===c.ProductInstallStatus.Installed&&t!==c.ProductInstallStatus.Installed?l.TensorBoard.installProfilerPluginPrompt():t!==c.ProductInstallStatus.Installed?l.TensorBoard.installTensorBoardAndProfilerPluginPrompt():i?l.TensorBoard.upgradePrompt():l.TensorBoard.installPrompt();const s=await this.applicationShell.showErrorMessage(o,n,r);let a=g.TensorBoardPromptSelection.None;return s===n?a=g.TensorBoardPromptSelection.Yes:s===r&&(a=g.TensorBoardPromptSelection.No),(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_INSTALL_PROMPT_SELECTION,void 0,{selection:a,operationType:i?"upgrade":"install"}),s}async ensurePrerequisitesAreInstalled(){(0,v.traceInfo)("Ensuring TensorBoard package is installed into active interpreter");const e=await this.interpreterService.getActiveInterpreter()||await this.commandManager.executeCommand("python.setInterpreter");if(!e)return!1;let[t,n]=await Promise.all([this.installer.isProductVersionCompatible(c.Product.tensorboard,">= 2.4.1",e),this.installer.isProductVersionCompatible(c.Product.torchProfilerImportName,">= 0.2.0",e)]);const r=f.ImportTracker.hasModuleImport("torch"),i=t!==c.ProductInstallStatus.Installed,a=n!==c.ProductInstallStatus.Installed;if(r&&!i&&!a||!r&&t===c.ProductInstallStatus.Installed)return!0;const u=await this.promptToInstall(t,r?n:c.ProductInstallStatus.Installed);if(u!==l.Common.bannerLabelYes()&&!i)return!0;if(u!==l.Common.bannerLabelYes())return!1;const d=(new o.CancellationTokenSource).token,g=(0,s.createPromiseFromCancellation)({cancelAction:"resolve",defaultValue:c.InstallerResponse.Ignore,token:d}),y=[];return i&&y.push(this.installer.install(c.Product.tensorboard,e,d,t===c.ProductInstallStatus.NeedsUpgrade?m.ModuleInstallFlags.upgrade:void 0)),r&&a&&y.push(this.installer.install(c.Product.torchProfilerInstallName,e,d,n===c.ProductInstallStatus.NeedsUpgrade?m.ModuleInstallFlags.upgrade:void 0)),await Promise.race([...y,g]),[t,n]=await Promise.all([this.installer.isProductVersionCompatible(c.Product.tensorboard,">= 2.4.1",e),this.installer.isProductVersionCompatible(c.Product.torchProfilerImportName,">= 0.2.0",e)]),(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_PACKAGE_INSTALL_RESULT,void 0,{wasTensorBoardAttempted:i,wasProfilerPluginAttempted:a,wasTensorBoardInstalled:t===c.ProductInstallStatus.Installed,wasProfilerPluginInstalled:n===c.ProductInstallStatus.Installed}),r&&n!==c.ProductInstallStatus.Installed&&(0,v.traceError)("Failed to install torch-tb-plugin. Profiler plugin will not appear in TensorBoard session."),t===c.ProductInstallStatus.Installed}async showFilePicker(){const e=await this.applicationShell.showOpenDialog({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1});if(e)return e[0].fsPath}getQuickPickItems(e){const t=[];if(e){const e={label:l.TensorBoard.useCurrentWorkingDirectory(),detail:l.TensorBoard.useCurrentWorkingDirectoryDetail()},n={label:l.TensorBoard.selectAnotherFolder(),detail:l.TensorBoard.selectAnotherFolderDetail()};t.push(e,n)}else{const e={label:l.TensorBoard.selectAFolder(),detail:l.TensorBoard.selectAFolderDetail()};t.push(e)}return t.push({label:l.TensorBoard.enterRemoteUrl(),detail:l.TensorBoard.enterRemoteUrlDetail()}),t}async getLogDirectory(){const e=this.workspaceService.getConfiguration("python.tensorBoard").get("logDirectory");if(e)return(0,v.traceInfo)("Using log directory specified by python.tensorBoard.logDirectory setting: "+e),e;const t=this.autopopulateLogDirectoryPath(),n=l.TensorBoard.useCurrentWorkingDirectory(),r=l.TensorBoard.selectAFolder(),i=l.TensorBoard.selectAnotherFolder(),o=l.TensorBoard.enterRemoteUrl(),s=this.getQuickPickItems(t),a=await this.applicationShell.showQuickPick(s,{canPickMany:!1,ignoreFocusOut:!1,placeHolder:t?l.TensorBoard.currentDirectory().format(t):void 0});switch(null==a?void 0:a.label){case n:return t;case r:case i:return this.showFilePicker();case o:return this.applicationShell.showInputBox({prompt:l.TensorBoard.enterRemoteUrlDetail()});default:return}}async startTensorboardSession(e){const t=await this.interpreterService.getActiveInterpreter();if(!t)return!1;const n={title:l.TensorBoard.progressMessage(),location:o.ProgressLocation.Notification,cancellable:!0},r=await this.processServiceFactory.create(),i=(0,a.tensorboardLauncher)([e]),c=new d.StopWatch,f=r.execObservable(t.path,i),m=await this.applicationShell.withProgress(n,(t,n)=>{(0,v.traceInfo)(`Starting TensorBoard with log directory ${e}...`);const r=this.waitForTensorBoardStart(f),i=(0,s.createPromiseFromCancellation)({token:n,cancelAction:"resolve",defaultValue:"canceled"});return Promise.race([(0,u.sleep)(6e4),r,i])});switch(m){case"canceled":return(0,v.traceInfo)("Canceled starting TensorBoard session."),(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_SESSION_DAEMON_STARTUP_DURATION,c.elapsedTime,{result:g.TensorBoardSessionStartResult.cancel}),f.dispose(),!1;case"success":return this.process=f.proc,(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_SESSION_DAEMON_STARTUP_DURATION,c.elapsedTime,{result:g.TensorBoardSessionStartResult.success}),!0;case 6e4:throw(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_SESSION_DAEMON_STARTUP_DURATION,c.elapsedTime,{result:g.TensorBoardSessionStartResult.error}),new Error("Timed out after 60 seconds waiting for TensorBoard to launch.");default:throw new Error("Failed to start TensorBoard, received unknown promise result: "+m)}}async waitForTensorBoardStart(e){const t=(0,u.createDeferred)();return e.out.subscribe({next:e=>{if("stdout"===e.source){const n=e.out.match(/TensorBoard started at (.*)/);n&&n[1]&&(this.url=n[1],t.resolve("success")),(0,v.traceInfo)(e.out)}else"stderr"===e.source&&(0,v.traceError)(e.out)},error:e=>{(0,v.traceError)(e)}}),t.promise}async showPanel(){(0,v.traceInfo)("Showing TensorBoard panel");(this.webviewPanel||await this.createPanel()).reveal(),this._active=!0,this.onDidChangeViewStateEventEmitter.fire()}async createPanel(){const e=o.window.createWebviewPanel("tensorBoardSession","TensorBoard",this.globalMemento.value,{enableScripts:!0,retainContextWhenHidden:!0});return e.webview.html=await this.getHtml(),this.webviewPanel=e,this.disposables.push(e.onDidDispose(()=>{var e,t;this.webviewPanel=void 0,null===(e=this.process)||void 0===e||e.kill(),(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_SESSION_DURATION,null===(t=this.sessionDurationStopwatch)||void 0===t?void 0:t.elapsedTime),this.process=void 0,this._active=!1,this.onDidDisposeEventEmitter.fire(this)})),this.disposables.push(e.onDidChangeViewState(async t=>{var n;this.active&&t.webviewPanel.active&&await this.globalMemento.updateValue(null!==(n=e.viewColumn)&&void 0!==n?n:o.ViewColumn.Active),this._active=t.webviewPanel.active,this.onDidChangeViewStateEventEmitter.fire()})),this.disposables.push(e.webview.onDidReceiveMessage(e=>{switch(e.command){case y.JumpToSource:this.jumpToSource(e.args.filename,e.args.line)}})),e}autopopulateLogDirectoryPath(){if(this.workspaceService.rootPath)return this.workspaceService.rootPath;const{activeTextEditor:e}=o.window;return e?i.dirname(e.document.uri.fsPath):void 0}async jumpToSource(e,t){let n;if((0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_JUMP_TO_SOURCE_REQUEST),r.existsSync(e))n=o.Uri.file(e);else{(0,h.sendTelemetryEvent)(p.EventName.TENSORBOARD_JUMP_TO_SOURCE_FILE_NOT_FOUND),(0,v.traceError)(`Requested jump to source filepath ${e} does not exist. Prompting user to select source file...`);const t=[{label:l.TensorBoard.selectMissingSourceFile(),description:l.TensorBoard.selectMissingSourceFileDescription()}],r=this.multiStepFactory.create();await r.run(async r=>{const i=await r.showQuickPick({items:t,title:l.TensorBoard.missingSourceFile(),placeholder:e});switch(null==i?void 0:i.label){case l.TensorBoard.selectMissingSourceFile():{const e=await this.applicationShell.showOpenDialog({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1});void 0!==e&&([n]=e);break}}},{})}if(void 0===n)return;const i=await o.workspace.openTextDocument(n),s=await o.window.showTextDocument(i,o.ViewColumn.Beside);if(t\n \n \n \n \n \n TensorBoard\n \n \n