/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var ee=["require","exports","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/platform","vs/platform/instantiation/common/instantiation","vs/platform/log/common/log","vs/base/common/uri","vs/base/common/async","vs/base/common/path","vs/nls!vs/code/electron-main/main","vs/nls","vs/base/common/types","electron","vs/base/common/network","vs/platform/files/common/files","vs/base/common/errors","vs/base/common/buffer","vs/base/common/resources","vs/platform/configuration/common/configuration","vs/platform/product/common/productService","vs/platform/lifecycle/electron-main/lifecycleMainService","vs/base/common/cancellation","vs/base/node/pfs","vs/base/common/arrays","vs/base/common/strings","vs/platform/environment/electron-main/environmentMainService","os","vs/platform/workspace/common/workspace","vs/base/common/uuid","vs/base/common/extpath","vs/platform/windows/electron-main/windows","vs/base/common/process","vs/base/common/labels","vs/platform/environment/common/environment","vs/platform/telemetry/common/telemetry","vs/platform/policy/common/policy","vs/platform/state/electron-main/state","vs/platform/userDataProfile/common/userDataProfile","vs/base/common/map","fs","vs/base/parts/ipc/electron-main/ipcMain","vs/platform/userDataProfile/electron-main/userDataProfile","vs/base/common/json","vs/base/common/errorMessage","child_process","vs/base/parts/ipc/common/ipc","vs/platform/registry/common/platform","vs/platform/update/common/update","vs/base/common/functional","vs/base/common/objects","vs/platform/uriIdentity/common/uriIdentity","vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/base/common/decorators","vs/platform/product/common/product","vs/platform/request/common/request","vs/platform/dialogs/electron-main/dialogMainService","vs/base/common/stream","vs/base/common/ternarySearchTree","vs/platform/environment/node/argvHelper","vs/platform/backup/electron-main/backup","vs/platform/protocol/electron-main/protocol","vs/platform/configuration/common/configurationRegistry","vs/platform/remote/common/remoteHosts","vs/platform/theme/electron-main/themeMainService","vs/platform/native/electron-main/nativeHostMainService","vs/base/common/iterator","vs/base/common/hash","vs/base/common/marshalling","vs/platform/instantiation/common/descriptors","vs/platform/credentials/common/credentials","vs/platform/files/common/watcher","vs/base/common/performance","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/telemetry/common/telemetryUtils","vs/platform/window/common/window","vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/base/common/normalization","crypto","net","vs/base/common/processes","vs/base/common/stopwatch","vs/base/node/id","vs/base/node/processes","vs/base/parts/ipc/node/ipc.net","vs/platform/diagnostics/common/diagnostics","vs/platform/instantiation/common/serviceCollection","vs/platform/files/node/diskFileSystemProvider","vs/platform/sign/common/sign","vs/platform/update/electron-main/abstractUpdateService","vs/platform/extensionManagement/common/extensionsScannerService","vs/platform/storage/common/storage","vs/platform/storage/electron-main/storageMainService","vs/platform/workspaces/common/workspaces","vs/platform/workspaces/node/workspaces","vs/base/common/linkedList","vs/base/node/ports","vs/base/common/observableValue","vs/base/common/severity","vs/base/common/glob","vs/base/node/extpath","vs/base/node/ps","vs/base/parts/ipc/common/ipc.net","vs/base/parts/ipc/electron-main/ipc.mp","vs/base/parts/storage/common/storage","vs/platform/environment/node/argv","vs/platform/encryption/common/encryptionService","vs/platform/externalTerminal/common/externalTerminal","vs/platform/files/common/io","vs/platform/configuration/common/configurationModels","vs/platform/extensions/common/extensions","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/shell/node/shellEnv","vs/platform/telemetry/common/commonProperties","vs/platform/tunnel/common/tunnel","vs/platform/url/common/url","vs/platform/window/electron-main/window","vs/platform/windows/electron-main/windowsFinder","vs/platform/diagnostics/electron-main/diagnosticsMainService","vs/base/common/codicons","vs/base/common/color","vs/base/common/assert","vs/base/common/jsonFormatter","vs/base/common/jsonEdit","vs/base/common/lazy","vs/base/common/skipList","vs/base/node/crypto","vs/base/node/macAddress","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/contextmenu/electron-main/contextmenu","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/base/common/jsonErrorMessages","vs/nls!vs/base/common/platform","vs/base/common/cache","vs/base/common/console","vs/base/common/uriIpc","util","vs/base/node/powershell","vs/base/node/shell","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/ipc/electron-main/ipc.electron","vs/base/parts/ipc/node/ipc.cp","vs/base/parts/storage/node/storage","vs/nls!vs/code/electron-main/app","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/electron-main/dialogMainService","vs/nls!vs/platform/environment/node/argv","vs/nls!vs/platform/environment/node/argvHelper","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/externalTerminal/node/externalTerminalService","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/files/common/io","vs/nls!vs/platform/files/electron-main/diskFileSystemProviderServer","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/nls!vs/platform/issue/electron-main/issueMainService","vs/nls!vs/platform/menubar/electron-main/menubar","vs/nls!vs/platform/native/electron-main/nativeHostMainService","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/shell/node/shellEnv","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/update/common/update.config.contribution","vs/nls!vs/platform/userDataProfile/common/userDataProfile","vs/nls!vs/platform/windows/electron-main/windowImpl","vs/nls!vs/platform/windows/electron-main/windowsMainService","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/nls!vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/platform/backup/common/backup","vs/platform/backup/node/backup","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/encryption/node/encryptionMainService","vs/platform/environment/common/environmentService","vs/platform/debug/electron-main/extensionHostDebugIpc","vs/platform/environment/node/userDataPath","path","vs/platform/environment/node/environmentService","vs/platform/environment/node/wait","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/base/common/semver/semver","vs/platform/externalServices/common/serviceMachineId","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/graph","vs/platform/extensionManagement/common/extensionManagement","vs/platform/extensionManagement/common/extensionUrlTrust","vs/platform/extensions/common/extensionHostStarter","vs/platform/externalTerminal/node/externalTerminalService","vs/platform/files/common/diskFileSystemProviderClient","vs/platform/files/node/watcher/nodejs/nodejsWatcherLib","vs/platform/files/node/watcher/nodejs/nodejsWatcher","vs/platform/files/node/watcher/nodejs/nodejsClient","vs/platform/files/node/watcher/watcherClient","vs/platform/instantiation/common/instantiationService","vs/platform/credentials/common/credentialsMainService","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/files/node/diskFileSystemProviderServer","vs/platform/files/electron-main/diskFileSystemProviderServer","vs/platform/log/common/bufferLog","vs/platform/log/common/logIpc","vs/platform/log/node/spdlogLog","vs/platform/log/node/loggerService","vs/platform/menubar/common/menubar","vs/platform/policy/common/filePolicyService","vs/platform/policy/common/policyIpc","vs/platform/extensionManagement/node/extensionUrlTrustService","vs/platform/profiling/electron-main/windowProfiling","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurations","vs/platform/configuration/common/configurationService","vs/platform/remote/common/remoteAuthorityResolver","vs/platform/remote/common/remoteAgentConnection","vs/platform/remote/node/nodeSocketFactory","vs/platform/remote/node/wsl","vs/platform/request/common/requestIpc","vs/platform/request/node/proxy","url","vs/platform/sign/node/signService","vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService","vs/platform/state/node/state","vs/platform/state/node/stateService","vs/platform/state/electron-main/stateMainService","vs/platform/diagnostics/node/diagnosticsService","vs/platform/telemetry/common/telemetryIpc","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/telemetryService","vs/platform/theme/common/theme","vs/platform/theme/common/themeService","vs/platform/tunnel/node/tunnelService","vs/platform/update/common/update.config.contribution","vs/platform/update/common/updateIpc","vs/platform/update/electron-main/updateService.darwin","vs/platform/update/electron-main/updateService.snap","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/url/electron-main/electronUrlListener","vs/platform/webview/common/webviewManagerService","vs/platform/webview/electron-main/webviewProtocolProvider","vs/code/electron-main/auth","vs/platform/credentials/electron-main/credentialsMainService","vs/platform/extensions/electron-main/extensionHostStarter","vs/platform/webview/electron-main/webviewMainService","vs/platform/windows/node/windowTracker","vs/platform/storage/electron-main/storageIpc","vs/platform/extensionManagement/node/extensionsScannerService","vs/platform/protocol/electron-main/protocolMainService","vs/platform/sharedProcess/electron-main/sharedProcess","vs/platform/storage/electron-main/storageMain","vs/platform/userDataProfile/node/userDataProfile","vs/platform/extensionManagement/electron-main/defaultExtensionsProfileInit","vs/platform/launch/electron-main/launchMainService","vs/platform/userDataProfile/electron-main/userDataTransientProfilesHandler","vs/platform/userDataSync/electron-main/userDataSyncProfilesStorageIpc","vs/platform/windows/electron-main/windowsStateHandler","vs/platform/backup/electron-main/backupMainService","vs/platform/issue/electron-main/issueMainService","vs/platform/update/electron-main/updateService.linux","vs/platform/update/electron-main/updateService.win32","vs/platform/windows/electron-main/windowImpl","vs/platform/menubar/electron-main/menubar","vs/platform/menubar/electron-main/menubarMainService","vs/platform/windows/electron-main/windowsMainService","vs/platform/workspaces/electron-main/workspacesMainService","vs/code/electron-main/app","vs/platform/policy/node/nativePolicyService","vs/platform/request/node/requestService","vs/platform/request/electron-main/requestMainService","minimist","assert","graceful-fs","string_decoder","vscode-policy-watcher","zlib","vs/code/electron-main/main"],ie=function(z){for(var e=[],E=0,t=z.length;E` ${f} `).trim():""}e.getCodiconAriaLabel=E;class t{constructor(I,f,S){this.id=I,this.definition=f,this.description=S,t._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return t._allCodicons}}e.Codicon=t,t._allCodicons=[],t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",t.circleFilled.definition),t.closeDirty=new t("close-dirty",t.circleFilled.definition),t.debugBreakpoint=new t("debug-breakpoint",t.circleFilled.definition),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",t.circleFilled.definition),t.debugHint=new t("debug-hint",t.circleFilled.definition),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circle=new t("circle",{fontCharacter:"\\eabc"}),t.circleOutline=new t("circle-outline",t.circle.definition),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",t.circle.definition),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolCustomColor=new t("symbol-customcolor",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.circleSmallFilled=new t("circle-small-filled",{fontCharacter:"\\eb8a"}),t.debugStackframeDot=new t("debug-stackframe-dot",t.circleSmallFilled.definition),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLarge=new t("circle-large",{fontCharacter:"\\ebb5"}),t.circleLargeOutline=new t("circle-large-outline",t.circleLarge.definition),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"}),t.newLine=new t("newline",{fontCharacter:"\\ebea"}),t.layout=new t("layout",{fontCharacter:"\\ebeb"}),t.layoutActivitybarLeft=new t("layout-activitybar-left",{fontCharacter:"\\ebec"}),t.layoutActivitybarRight=new t("layout-activitybar-right",{fontCharacter:"\\ebed"}),t.layoutPanelLeft=new t("layout-panel-left",{fontCharacter:"\\ebee"}),t.layoutPanelCenter=new t("layout-panel-center",{fontCharacter:"\\ebef"}),t.layoutPanelJustify=new t("layout-panel-justify",{fontCharacter:"\\ebf0"}),t.layoutPanelRight=new t("layout-panel-right",{fontCharacter:"\\ebf1"}),t.layoutPanel=new t("layout-panel",{fontCharacter:"\\ebf2"}),t.layoutSidebarLeft=new t("layout-sidebar-left",{fontCharacter:"\\ebf3"}),t.layoutSidebarRight=new t("layout-sidebar-right",{fontCharacter:"\\ebf4"}),t.layoutStatusbar=new t("layout-statusbar",{fontCharacter:"\\ebf5"}),t.layoutMenubar=new t("layout-menubar",{fontCharacter:"\\ebf6"}),t.layoutCentered=new t("layout-centered",{fontCharacter:"\\ebf7"}),t.layoutSidebarRightOff=new t("layout-sidebar-right-off",{fontCharacter:"\\ec00"}),t.layoutPanelOff=new t("layout-panel-off",{fontCharacter:"\\ec01"}),t.layoutSidebarLeftOff=new t("layout-sidebar-left-off",{fontCharacter:"\\ec02"}),t.target=new t("target",{fontCharacter:"\\ebf8"}),t.indent=new t("indent",{fontCharacter:"\\ebf9"}),t.recordSmall=new t("record-small",{fontCharacter:"\\ebfa"}),t.errorSmall=new t("error-small",{fontCharacter:"\\ebfb"}),t.arrowCircleDown=new t("arrow-circle-down",{fontCharacter:"\\ebfc"}),t.arrowCircleLeft=new t("arrow-circle-left",{fontCharacter:"\\ebfd"}),t.arrowCircleRight=new t("arrow-circle-right",{fontCharacter:"\\ebfe"}),t.arrowCircleUp=new t("arrow-circle-up",{fontCharacter:"\\ebff"}),t.heartFilled=new t("heart-filled",{fontCharacter:"\\ec04"}),t.map=new t("map",{fontCharacter:"\\ec05"}),t.mapFilled=new t("map-filled",{fontCharacter:"\\ec06"}),t.circleSmall=new t("circle-small",{fontCharacter:"\\ec07"}),t.bellSlash=new t("bell-slash",{fontCharacter:"\\ec08"}),t.bellSlashDot=new t("bell-slash-dot",{fontCharacter:"\\ec09"}),t.commentUnresolved=new t("comment-unresolved",{fontCharacter:"\\ec0a"}),t.gitPullRequestGoToChanges=new t("git-pull-request-go-to-changes",{fontCharacter:"\\ec0b"}),t.gitPullRequestNewChanges=new t("git-pull-request-new-changes",{fontCharacter:"\\ec0c"}),t.searchFuzzy=new t("search-fuzzy",{fontCharacter:"\\ec0d"}),t.dialogError=new t("dialog-error",t.error.definition),t.dialogWarning=new t("dialog-warning",t.warning.definition),t.dialogInfo=new t("dialog-info",t.info.definition),t.dialogClose=new t("dialog-close",t.close.definition),t.treeItemExpanded=new t("tree-item-expanded",t.chevronDown.definition),t.treeFilterOnTypeOn=new t("tree-filter-on-type-on",t.listFilter.definition),t.treeFilterOnTypeOff=new t("tree-filter-on-type-off",t.listSelection.definition),t.treeFilterClear=new t("tree-filter-clear",t.close.definition),t.treeItemLoading=new t("tree-item-loading",t.loading.definition),t.menuSelection=new t("menu-selection",t.check.definition),t.menuSubmenu=new t("menu-submenu",t.chevronRight.definition),t.menuBarMore=new t("menubar-more",t.more.definition),t.scrollbarButtonLeft=new t("scrollbar-button-left",t.triangleLeft.definition),t.scrollbarButtonRight=new t("scrollbar-button-right",t.triangleRight.definition),t.scrollbarButtonUp=new t("scrollbar-button-up",t.triangleUp.definition),t.scrollbarButtonDown=new t("scrollbar-button-down",t.triangleDown.definition),t.toolBarMore=new t("toolbar-more",t.more.definition),t.quickInputBack=new t("quick-input-back",t.arrowLeft.definition);function k(D,I){const f=["codicon","codicon-"+D];return I&&f.push("codicon-modifier-"+I),f}e.getClassNamesArray=k;var R;(function(D){D.iconNameSegment="[A-Za-z0-9]+",D.iconNameExpression="[A-Za-z0-9-]+",D.iconModifierExpression="~[A-Za-z]+",D.iconNameCharacter="[A-Za-z0-9~-]";const I=new RegExp(`^(${D.iconNameExpression})(${D.iconModifierExpression})?$`);function f(P){if(P instanceof t)return["codicon","codicon-"+P.id];const C=I.exec(P.id);if(!C)return f(t.error);const[,u,p]=C,w=["codicon","codicon-"+u];return p&&w.push("codicon-modifier-"+p.substr(1)),w}D.asClassNameArray=f;function S(P){return f(P).join(" ")}D.asClassName=S;function b(P){return"."+f(P).join(".")}D.asCSSSelector=b})(R=e.CSSIcon||(e.CSSIcon={}))}),define(ee[120],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function E(I,f){const S=Math.pow(10,f);return Math.round(I*S)/S}class t{constructor(f,S,b,P=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,f))|0,this.g=Math.min(255,Math.max(0,S))|0,this.b=Math.min(255,Math.max(0,b))|0,this.a=E(Math.max(Math.min(1,P),0),3)}static equals(f,S){return f.r===S.r&&f.g===S.g&&f.b===S.b&&f.a===S.a}}e.RGBA=t;class k{constructor(f,S,b,P){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,f),0)|0,this.s=E(Math.max(Math.min(1,S),0),3),this.l=E(Math.max(Math.min(1,b),0),3),this.a=E(Math.max(Math.min(1,P),0),3)}static equals(f,S){return f.h===S.h&&f.s===S.s&&f.l===S.l&&f.a===S.a}static fromRGBA(f){const S=f.r/255,b=f.g/255,P=f.b/255,C=f.a,u=Math.max(S,b,P),p=Math.min(S,b,P);let w=0,g=0;const h=(p+u)/2,v=u-p;if(v>0){switch(g=Math.min(h<=.5?v/(2*h):v/(2-2*h),1),u){case S:w=(b-P)/v+(b1&&(b-=1),b<1/6?f+(S-f)*6*b:b<1/2?S:b<2/3?f+(S-f)*(2/3-b)*6:f}static toRGBA(f){const S=f.h/360,{s:b,l:P,a:C}=f;let u,p,w;if(b===0)u=p=w=P;else{const g=P<.5?P*(1+b):P+b-P*b,h=2*P-g;u=k._hue2rgb(h,g,S+1/3),p=k._hue2rgb(h,g,S),w=k._hue2rgb(h,g,S-1/3)}return new t(Math.round(u*255),Math.round(p*255),Math.round(w*255),C)}}e.HSLA=k;class R{constructor(f,S,b,P){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,f),0)|0,this.s=E(Math.max(Math.min(1,S),0),3),this.v=E(Math.max(Math.min(1,b),0),3),this.a=E(Math.max(Math.min(1,P),0),3)}static equals(f,S){return f.h===S.h&&f.s===S.s&&f.v===S.v&&f.a===S.a}static fromRGBA(f){const S=f.r/255,b=f.g/255,P=f.b/255,C=Math.max(S,b,P),u=Math.min(S,b,P),p=C-u,w=C===0?0:p/C;let g;return p===0?g=0:C===S?g=((b-P)/p%6+6)%6:C===b?g=(P-S)/p+2:g=(S-b)/p+4,new R(Math.round(g*60),w,C,f.a)}static toRGBA(f){const{h:S,s:b,v:P,a:C}=f,u=P*b,p=u*(1-Math.abs(S/60%2-1)),w=P-u;let[g,h,v]=[0,0,0];return S<60?(g=u,h=p):S<120?(g=p,h=u):S<180?(h=u,v=p):S<240?(h=p,v=u):S<300?(g=p,v=u):S<=360&&(g=u,v=p),g=Math.round((g+w)*255),h=Math.round((h+w)*255),v=Math.round((v+w)*255),new t(g,h,v,C)}}e.HSVA=R;class D{static fromHex(f){return D.Format.CSS.parseHex(f)||D.red}static equals(f,S){return!f&&!S?!0:!f||!S?!1:f.equals(S)}get hsla(){return this._hsla?this._hsla:k.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:R.fromRGBA(this.rgba)}constructor(f){if(f)if(f instanceof t)this.rgba=f;else if(f instanceof k)this._hsla=f,this.rgba=k.toRGBA(f);else if(f instanceof R)this._hsva=f,this.rgba=R.toRGBA(f);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(f){return!!f&&t.equals(this.rgba,f.rgba)&&k.equals(this.hsla,f.hsla)&&R.equals(this.hsva,f.hsva)}getRelativeLuminance(){const f=D._relativeLuminanceForComponent(this.rgba.r),S=D._relativeLuminanceForComponent(this.rgba.g),b=D._relativeLuminanceForComponent(this.rgba.b),P=.2126*f+.7152*S+.0722*b;return E(P,4)}static _relativeLuminanceForComponent(f){const S=f/255;return S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4)}getContrastRatio(f){const S=this.getRelativeLuminance(),b=f.getRelativeLuminance();return S>b?(S+.05)/(b+.05):(b+.05)/(S+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(f){const S=this.getRelativeLuminance(),b=f.getRelativeLuminance();return S>b}isDarkerThan(f){const S=this.getRelativeLuminance(),b=f.getRelativeLuminance();return SD._flatten(P,b));return D._flatten(this,S)}static _flatten(f,S){const b=1-f.rgba.a;return new D(new t(b*S.rgba.r+f.rgba.a*f.rgba.r,b*S.rgba.g+f.rgba.a*f.rgba.g,b*S.rgba.b+f.rgba.a*f.rgba.b))}toString(){return this._toString||(this._toString=D.Format.CSS.format(this)),this._toString}static getLighterColor(f,S,b){if(f.isLighterThan(S))return f;b=b||.5;const P=f.getRelativeLuminance(),C=S.getRelativeLuminance();return b=b*(C-P)/C,f.lighten(b)}static getDarkerColor(f,S,b){if(f.isDarkerThan(S))return f;b=b||.5;const P=f.getRelativeLuminance(),C=S.getRelativeLuminance();return b=b*(P-C)/P,f.darken(b)}}e.Color=D,D.white=new D(new t(255,255,255,1)),D.black=new D(new t(0,0,0,1)),D.red=new D(new t(255,0,0,1)),D.blue=new D(new t(0,0,255,1)),D.green=new D(new t(0,255,0,1)),D.cyan=new D(new t(0,255,255,1)),D.lightgrey=new D(new t(211,211,211,1)),D.transparent=new D(new t(0,0,0,0)),function(I){let f;(function(S){let b;(function(P){function C(n){return n.rgba.a===1?`rgb(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b})`:I.Format.CSS.formatRGBA(n)}P.formatRGB=C;function u(n){return`rgba(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b}, ${+n.rgba.a.toFixed(2)})`}P.formatRGBA=u;function p(n){return n.hsla.a===1?`hsl(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%)`:I.Format.CSS.formatHSLA(n)}P.formatHSL=p;function w(n){return`hsla(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%, ${n.hsla.a.toFixed(2)})`}P.formatHSLA=w;function g(n){const s=n.toString(16);return s.length!==2?"0"+s:s}function h(n){return`#${g(n.rgba.r)}${g(n.rgba.g)}${g(n.rgba.b)}`}P.formatHex=h;function v(n,s=!1){return s&&n.rgba.a===1?I.Format.CSS.formatHex(n):`#${g(n.rgba.r)}${g(n.rgba.g)}${g(n.rgba.b)}${g(Math.round(n.rgba.a*255))}`}P.formatHexA=v;function m(n){return n.isOpaque()?I.Format.CSS.formatHex(n):I.Format.CSS.formatRGBA(n)}P.format=m;function d(n){const s=n.length;if(s===0||n.charCodeAt(0)!==35)return null;if(s===7){const i=16*l(n.charCodeAt(1))+l(n.charCodeAt(2)),o=16*l(n.charCodeAt(3))+l(n.charCodeAt(4)),r=16*l(n.charCodeAt(5))+l(n.charCodeAt(6));return new I(new t(i,o,r,1))}if(s===9){const i=16*l(n.charCodeAt(1))+l(n.charCodeAt(2)),o=16*l(n.charCodeAt(3))+l(n.charCodeAt(4)),r=16*l(n.charCodeAt(5))+l(n.charCodeAt(6)),c=16*l(n.charCodeAt(7))+l(n.charCodeAt(8));return new I(new t(i,o,r,c/255))}if(s===4){const i=l(n.charCodeAt(1)),o=l(n.charCodeAt(2)),r=l(n.charCodeAt(3));return new I(new t(16*i+i,16*o+o,16*r+r))}if(s===5){const i=l(n.charCodeAt(1)),o=l(n.charCodeAt(2)),r=l(n.charCodeAt(3)),c=l(n.charCodeAt(4));return new I(new t(16*i+i,16*o+o,16*r+r,(16*c+c)/255))}return null}P.parseHex=d;function l(n){switch(n){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(b=S.CSS||(S.CSS={}))})(f=I.Format||(I.Format={}))}(D=e.Color||(e.Color={}))}),define(ee[53],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=e.createDecorator=void 0;function E(D){return(I,f,S)=>{let b=null,P=null;if(typeof S.value=="function"?(b="value",P=S.value):typeof S.get=="function"&&(b="get",P=S.get),!P)throw new Error("not supported");S[b]=D(P,f)}}e.createDecorator=E;function t(D,I,f){let S=null,b=null;if(typeof f.value=="function"?(S="value",b=f.value,b.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof f.get=="function"&&(S="get",b=f.get),!b)throw new Error("not supported");const P=`$memoize$${I}`;f[S]=function(...C){return this.hasOwnProperty(P)||Object.defineProperty(this,P,{configurable:!1,enumerable:!1,writable:!1,value:b.apply(this,C)}),this[P]}}e.memoize=t;function k(D,I,f){return E((S,b)=>{const P=`$debounce$${b}`,C=`$debounce$result$${b}`;return function(...u){this[C]||(this[C]=f?f():void 0),clearTimeout(this[P]),I&&(this[C]=I(this[C],...u),u=[this[C]]),this[P]=setTimeout(()=>{S.apply(this,u),this[C]=f?f():void 0},D)}})}e.debounce=k;function R(D,I,f){return E((S,b)=>{const P=`$throttle$timer$${b}`,C=`$throttle$result$${b}`,u=`$throttle$lastRun$${b}`,p=`$throttle$pending$${b}`;return function(...w){if(this[C]||(this[C]=f?f():void 0),(this[u]===null||this[u]===void 0)&&(this[u]=-Number.MAX_VALUE),I&&(this[C]=I(this[C],...w)),this[p])return;const g=this[u]+D;g<=Date.now()?(this[u]=Date.now(),S.apply(this,[this[C]]),this[C]=f?f():void 0):(this[p]=!0,this[P]=setTimeout(()=>{this[p]=!1,this[u]=Date.now(),S.apply(this,[this[C]]),this[C]=f?f():void 0},g-Date.now()))}})}e.throttle=R}),define(ee[16],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class E{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(n){setTimeout(()=>{throw n.stack?m.isErrorNoTelemetry(n)?new m(n.message+` `+n.stack):new Error(n.message+` `+n.stack):n},0)}}addListener(n){return this.listeners.push(n),()=>{this._removeListener(n)}}emit(n){this.listeners.forEach(s=>{s(n)})}_removeListener(n){this.listeners.splice(this.listeners.indexOf(n),1)}setUnexpectedErrorHandler(n){this.unexpectedErrorHandler=n}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(n){this.unexpectedErrorHandler(n),this.emit(n)}onUnexpectedExternalError(n){this.unexpectedErrorHandler(n)}}e.ErrorHandler=E,e.errorHandler=new E;function t(l){e.errorHandler.setUnexpectedErrorHandler(l)}e.setUnexpectedErrorHandler=t;function k(l){f(l)||e.errorHandler.onUnexpectedError(l)}e.onUnexpectedError=k;function R(l){f(l)||e.errorHandler.onUnexpectedExternalError(l)}e.onUnexpectedExternalError=R;function D(l){if(l instanceof Error){const{name:n,message:s}=l,i=l.stacktrace||l.stack;return{$isError:!0,name:n,message:s,stack:i,noTelemetry:m.isErrorNoTelemetry(l)}}return l}e.transformErrorForSerialization=D;const I="Canceled";function f(l){return l instanceof S?!0:l instanceof Error&&l.name===I&&l.message===I}e.isCancellationError=f;class S extends Error{constructor(){super(I),this.name=this.message}}e.CancellationError=S;function b(){const l=new Error(I);return l.name=l.message,l}e.canceled=b;function P(l){return l?new Error(`Illegal argument: ${l}`):new Error("Illegal argument")}e.illegalArgument=P;function C(l){return l?new Error(`Illegal state: ${l}`):new Error("Illegal state")}e.illegalState=C;function u(l){return l?new Error(`readonly property '${l} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=u;function p(l){const n=new Error(`${l} has been disposed`);return n.name="DISPOSED",n}e.disposed=p;function w(l){return l?l.message?l.message:l.stack?l.stack.split(` `)[0]:String(l):"Error"}e.getErrorMessage=w;class g extends Error{constructor(n){super("NotImplemented"),n&&(this.message=n)}}e.NotImplementedError=g;class h extends Error{constructor(n){super("NotSupported"),n&&(this.message=n)}}e.NotSupportedError=h;class v extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=v;class m extends Error{constructor(n){super(n),this.name="CodeExpectedError"}static fromError(n){if(n instanceof m)return n;const s=new m;return s.message=n.message,s.stack=n.stack,s}static isErrorNoTelemetry(n){return n.name==="CodeExpectedError"}}e.ErrorNoTelemetry=m;class d extends Error{constructor(n){super(n||"An unexpected bug occurred."),Object.setPrototypeOf(this,d.prototype);debugger}}e.BugIndicatingError=d}),define(ee[24],ie([0,1,16]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.lastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function t(B,x=0){return B[B.length-(1+x)]}e.tail=t;function k(B){if(B.length===0)throw new Error("Invalid tail call");return[B.slice(0,B.length-1),B[B.length-1]]}e.tail2=k;function R(B,x,Z=(ce,ge)=>ce===ge){if(B===x)return!0;if(!B||!x||B.length!==x.length)return!1;for(let ce=0,ge=B.length;ceZ(B[ce],x))}e.binarySearch=I;function f(B,x){let Z=0,ce=B-1;for(;Z<=ce;){const ge=(Z+ce)/2|0,De=x(ge);if(De<0)Z=ge+1;else if(De>0)ce=ge-1;else return ge}return-(Z+1)}e.binarySearch2=f;function S(B,x){let Z=0,ce=B.length;if(ce===0)return 0;for(;Z=x.length)throw new TypeError("invalid index");const ce=x[Math.floor(x.length*Math.random())],ge=[],De=[],Te=[];for(const Me of x){const Le=Z(Me,ce);Le<0?ge.push(Me):Le>0?De.push(Me):Te.push(Me)}return B0&&(ge(De,0,[Le]),Te+=1)}return ce}e.sortedDiff=C;function u(B,x,Z){const ce=C(B,x,Z),ge=[],De=[];for(const Te of ce)ge.push(...B.slice(Te.start,Te.start+Te.deleteCount)),De.push(...Te.toInsert);return{removed:ge,added:De}}e.delta=u;function p(B,x,Z){if(Z===0)return[];const ce=B.slice(0,Z).sort(x);return g(B,x,ce,Z,B.length),ce}e.top=p;function w(B,x,Z,ce,ge){return Z===0?Promise.resolve([]):new Promise((De,Te)=>{(async()=>{const Me=B.length,Le=B.slice(0,Z).sort(x);for(let ve=Z,pe=Math.min(Z+ce,Me);veZ&&await new Promise(Se=>setTimeout(Se)),ge&&ge.isCancellationRequested)throw new E.CancellationError;g(B,x,Le,ve,pe)}return Le})().then(De,Te)})}e.topAsync=w;function g(B,x,Z,ce,ge){for(const De=Z.length;cex(Te,Le)<0);Z.splice(Me,0,Te)}}}function h(B){return B.filter(x=>!!x)}e.coalesce=h;function v(B){let x=0;for(let Z=0;Z0}e.isNonEmptyArray=l;function n(B,x=Z=>Z){const Z=new Set;return B.filter(ce=>{const ge=x(ce);return Z.has(ge)?!1:(Z.add(ge),!0)})}e.distinct=n;function s(B){const x=new Set;return Z=>{const ce=B(Z);return x.has(ce)?!1:(x.add(ce),!0)}}e.uniqueFilter=s;function i(B,x){const Z=o(B,x);if(Z!==-1)return B[Z]}e.findLast=i;function o(B,x){for(let Z=B.length-1;Z>=0;Z--){const ce=B[Z];if(x(ce))return Z}return-1}e.lastIndex=o;function r(B,x){return B.length>0?B[0]:x}e.firstOrDefault=r;function c(B,x){return B.length>0?B[B.length-1]:x}e.lastOrDefault=c;function a(B,x,Z=(ce,ge)=>ce===ge){let ce=0;for(let ge=0,De=Math.min(B.length,x.length);gex;ge--)ce.push(ge);return ce}e.range=M;function T(B,x,Z){return B.reduce((ce,ge)=>(ce[x(ge)]=Z?Z(ge):ge,ce),Object.create(null))}e.index=T;function _(B,x){return B.push(x),()=>Y(B,x)}e.insert=_;function Y(B,x){const Z=B.indexOf(x);if(Z>-1)return B.splice(Z,1),x}e.remove=Y;function G(B,x,Z){const ce=B.slice(0,x),ge=B.slice(x);return ce.concat(Z,ge)}e.arrayInsert=G;function V(B,x){let Z;if(typeof x=="number"){let ce=x;Z=()=>{const ge=Math.sin(ce++)*179426549;return ge-Math.floor(ge)}}else Z=Math.random;for(let ce=B.length-1;ce>0;ce-=1){const ge=Math.floor(Z()*(ce+1)),De=B[ce];B[ce]=B[ge],B[ge]=De}}e.shuffle=V;function oe(B,x){const Z=B.indexOf(x);Z>-1&&(B.splice(Z,1),B.unshift(x))}e.pushToStart=oe;function se(B,x){const Z=B.indexOf(x);Z>-1&&(B.splice(Z,1),B.push(x))}e.pushToEnd=se;function ae(B,x){for(const Z of x)B.push(Z)}e.pushMany=ae;function fe(B,x){return Array.isArray(B)?B.map(x):x(B)}e.mapArrayOrNot=fe;function K(B){return Array.isArray(B)?B:[B]}e.asArray=K;function q(B){return B[Math.floor(Math.random()*B.length)]}e.getRandomElement=q;function F(B,x){for(const Z of B){const ce=x(Z);if(ce!==void 0)return ce}}e.mapFind=F;function A(B,x,Z){const ce=U(B,x),ge=B.length,De=Z.length;B.length=ge+De;for(let Te=ge-1;Te>=ce;Te--)B[Te+De]=B[Te];for(let Te=0;Te0}B.isGreaterThan=Z;function ce(ge){return ge===0}B.isNeitherLessOrGreaterThan=ce,B.greaterThan=1,B.lessThan=-1,B.neitherLessOrGreaterThan=0})(ne=e.CompareResult||(e.CompareResult={}));function N(B,x){return(Z,ce)=>x(B(Z),B(ce))}e.compareBy=N;function $(...B){return(x,Z)=>{for(const ce of B){const ge=ce(x,Z);if(!ne.isNeitherLessOrGreaterThan(ge))return ge}return ne.neitherLessOrGreaterThan}}e.tieBreakComparators=$;const L=(B,x)=>B-x;e.numberComparator=L;function W(B,x){if(B.length===0)return;let Z=B[0];for(let ce=1;ce0&&(Z=ge)}return Z}e.findMaxBy=W;function j(B,x){if(B.length===0)return;let Z=B[0];for(let ce=1;ce=0&&(Z=ge)}return Z}e.findLastMaxBy=j;function H(B,x){return W(B,(Z,ce)=>-x(Z,ce))}e.findMinBy=H;class X{constructor(x){this.items=x,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(x){let Z=this.firstIdx;for(;Z=0&&x(this.items[Z]);)Z--;const ce=Z===this.lastIdx?null:this.items.slice(Z+1,this.lastIdx+1);return this.lastIdx=Z,ce}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const x=this.items[this.firstIdx];return this.firstIdx++,x}removeLast(){const x=this.items[this.lastIdx];return this.lastIdx--,x}takeCount(x){const Z=this.items.slice(this.firstIdx,this.firstIdx+x);return this.firstIdx+=x,Z}}e.ArrayQueue=X;class re{constructor(x){this.iterate=x}forEach(x){this.iterate(Z=>(x(Z),!0))}toArray(){const x=[];return this.iterate(Z=>(x.push(Z),!0)),x}filter(x){return new re(Z=>this.iterate(ce=>x(ce)?Z(ce):!0))}map(x){return new re(Z=>this.iterate(ce=>Z(x(ce))))}some(x){let Z=!1;return this.iterate(ce=>(Z=x(ce),!Z)),Z}findFirst(x){let Z;return this.iterate(ce=>x(ce)?(Z=ce,!1):!0),Z}findLast(x){let Z;return this.iterate(ce=>(x(ce)&&(Z=ce),!0)),Z}findLastMaxBy(x){let Z,ce=!0;return this.iterate(ge=>((ce||ne.isGreaterThan(x(ge,Z)))&&(ce=!1,Z=ge),!0)),Z}}e.CallbackIterable=re,re.empty=new re(B=>{})}),define(ee[121],ie([0,1,16]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function t(f,S){if(!f)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}e.ok=t;function k(f,S="Unreachable"){throw new Error(S)}e.assertNever=k;function R(f){if(!f)throw new E.BugIndicatingError("Assertion Failed")}e.assert=R;function D(f){if(!f()){debugger;f(),(0,E.onUnexpectedError)(new E.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function I(f,S){let b=0;for(;bd.length&&(n=d.length);l=48&&K<=57)fe=fe*16+K-48;else if(K>=65&&K<=70)fe=fe*16+K-65+10;else if(K>=97&&K<=102)fe=fe*16+K-97+10;else break;i++,ae++}return ae=o){se+=n.substring(ae,i),y=2;break}const fe=n.charCodeAt(i);if(fe===34){se+=n.substring(ae,i),i++;break}if(fe===92){if(se+=n.substring(ae,i),i++,i>=o){y=2;break}switch(n.charCodeAt(i++)){case 34:se+='"';break;case 92:se+="\\";break;case 47:se+="/";break;case 98:se+="\b";break;case 102:se+="\f";break;case 110:se+=` `;break;case 114:se+="\r";break;case 116:se+=" ";break;case 117:{const q=M(4);q>=0?se+=String.fromCharCode(q):y=4;break}default:y=5}ae=i;continue}if(fe>=0&&fe<=31)if(f(fe)){se+=n.substring(ae,i),y=2;break}else y=6;i++}return se}function G(){if(r="",y=0,c=i,i>=o)return c=o,a=17;let se=n.charCodeAt(i);if(I(se)){do i++,r+=String.fromCharCode(se),se=n.charCodeAt(i);while(I(se));return a=15}if(f(se))return i++,r+=String.fromCharCode(se),se===13&&n.charCodeAt(i)===10&&(i++,r+=` `),a=14;switch(se){case 123:return i++,a=1;case 125:return i++,a=2;case 91:return i++,a=3;case 93:return i++,a=4;case 58:return i++,a=6;case 44:return i++,a=5;case 34:return i++,r=Y(),a=10;case 47:{const ae=i-1;if(n.charCodeAt(i+1)===47){for(i+=2;i=12&&se<=15);return se}return{setPosition:T,getPosition:()=>i,scan:s?oe:G,getToken:()=>a,getTokenValue:()=>r,getTokenOffset:()=>c,getTokenLength:()=>i-c,getTokenError:()=>y}}e.createScanner=D;function I(n){return n===32||n===9||n===11||n===12||n===160||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===65279}function f(n){return n===10||n===13||n===8232||n===8233}function S(n){return n>=48&&n<=57}var b;(function(n){n[n.nullCharacter=0]="nullCharacter",n[n.maxAsciiCharacter=127]="maxAsciiCharacter",n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.lineSeparator=8232]="lineSeparator",n[n.paragraphSeparator=8233]="paragraphSeparator",n[n.nextLine=133]="nextLine",n[n.space=32]="space",n[n.nonBreakingSpace=160]="nonBreakingSpace",n[n.enQuad=8192]="enQuad",n[n.emQuad=8193]="emQuad",n[n.enSpace=8194]="enSpace",n[n.emSpace=8195]="emSpace",n[n.threePerEmSpace=8196]="threePerEmSpace",n[n.fourPerEmSpace=8197]="fourPerEmSpace",n[n.sixPerEmSpace=8198]="sixPerEmSpace",n[n.figureSpace=8199]="figureSpace",n[n.punctuationSpace=8200]="punctuationSpace",n[n.thinSpace=8201]="thinSpace",n[n.hairSpace=8202]="hairSpace",n[n.zeroWidthSpace=8203]="zeroWidthSpace",n[n.narrowNoBreakSpace=8239]="narrowNoBreakSpace",n[n.ideographicSpace=12288]="ideographicSpace",n[n.mathematicalSpace=8287]="mathematicalSpace",n[n.ogham=5760]="ogham",n[n._=95]="_",n[n.$=36]="$",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.ampersand=38]="ampersand",n[n.asterisk=42]="asterisk",n[n.at=64]="at",n[n.backslash=92]="backslash",n[n.bar=124]="bar",n[n.caret=94]="caret",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.closeParen=41]="closeParen",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.equals=61]="equals",n[n.exclamation=33]="exclamation",n[n.greaterThan=62]="greaterThan",n[n.lessThan=60]="lessThan",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.openParen=40]="openParen",n[n.percent=37]="percent",n[n.plus=43]="plus",n[n.question=63]="question",n[n.semicolon=59]="semicolon",n[n.singleQuote=39]="singleQuote",n[n.slash=47]="slash",n[n.tilde=126]="tilde",n[n.backspace=8]="backspace",n[n.formFeed=12]="formFeed",n[n.byteOrderMark=65279]="byteOrderMark",n[n.tab=9]="tab",n[n.verticalTab=11]="verticalTab"})(b||(b={}));function P(n,s){const i=[],o=new Object;let r;const c={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;function y(M,T,_,Y){c.value=M,c.offset=T,c.length=_,c.type=Y,c.colonOffset=void 0,r=c}try{m(n,{onObjectBegin:(M,T)=>{if(s<=M)throw o;r=void 0,a=s>M,i.push("")},onObjectProperty:(M,T,_)=>{if(s{if(s<=M)throw o;r=void 0,i.pop()},onArrayBegin:(M,T)=>{if(s<=M)throw o;r=void 0,i.push(0)},onArrayEnd:(M,T)=>{if(s<=M)throw o;r=void 0,i.pop()},onLiteralValue:(M,T,_)=>{if(s{if(s<=T)throw o;if(M===":"&&r&&r.type==="property")r.colonOffset=T,a=!1,r=void 0;else if(M===","){const Y=i[i.length-1];typeof Y=="number"?i[i.length-1]=Y+1:(a=!0,i[i.length-1]=""),r=void 0}}})}catch(M){if(M!==o)throw M}return{path:i,previousNode:r,isAtPropertyKey:a,matches:M=>{let T=0;for(let _=0;T{const M={};a(M),c.push(r),r=M,o=null},onObjectProperty:M=>{o=M},onObjectEnd:()=>{r=c.pop()},onArrayBegin:()=>{const M=[];a(M),c.push(r),r=M,o=null},onArrayEnd:()=>{r=c.pop()},onLiteralValue:a,onError:(M,T,_)=>{s.push({error:M,offset:T,length:_})}},i),r[0]}e.parse=C;function u(n,s=[],i=R.DEFAULT){let o={type:"array",offset:-1,length:-1,children:[],parent:void 0};function r(M){o.type==="property"&&(o.length=M-o.offset,o=o.parent)}function c(M){return o.children.push(M),M}m(n,{onObjectBegin:M=>{o=c({type:"object",offset:M,length:-1,parent:o,children:[]})},onObjectProperty:(M,T,_)=>{o=c({type:"property",offset:T,length:-1,parent:o,children:[]}),o.children.push({type:"string",value:M,offset:T,length:_,parent:o})},onObjectEnd:(M,T)=>{o.length=M+T-o.offset,o=o.parent,r(M+T)},onArrayBegin:(M,T)=>{o=c({type:"array",offset:M,length:-1,parent:o,children:[]})},onArrayEnd:(M,T)=>{o.length=M+T-o.offset,o=o.parent,r(M+T)},onLiteralValue:(M,T,_)=>{c({type:l(M),offset:T,length:_,parent:o,value:M}),r(T+_)},onSeparator:(M,T,_)=>{o.type==="property"&&(M===":"?o.colonOffset=T:M===","&&r(T))},onError:(M,T,_)=>{s.push({error:M,offset:T,length:_})}},i);const y=o.children[0];return y&&delete y.parent,y}e.parseTree=u;function p(n,s){if(!n)return;let i=n;for(const o of s)if(typeof o=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;let r=!1;for(const c of i.children)if(Array.isArray(c.children)&&c.children[0].value===o){i=c.children[1],r=!0;break}if(!r)return}else{const r=o;if(i.type!=="array"||r<0||!Array.isArray(i.children)||r>=i.children.length)return;i=i.children[r]}return i}e.findNodeAtLocation=p;function w(n){if(!n.parent||!n.parent.children)return[];const s=w(n.parent);if(n.parent.type==="property"){const i=n.parent.children[0].value;s.push(i)}else if(n.parent.type==="array"){const i=n.parent.children.indexOf(n);i!==-1&&s.push(i)}return s}e.getNodePath=w;function g(n){switch(n.type){case"array":return n.children.map(g);case"object":{const s=Object.create(null);for(const i of n.children){const o=i.children[1];o&&(s[i.children[0].value]=g(o))}return s}case"null":case"string":case"number":case"boolean":return n.value;default:return}}e.getNodeValue=g;function h(n,s,i=!1){return s>=n.offset&&sN(o.getTokenOffset(),o.getTokenLength()):()=>!0}function c(N){return N?$=>N($,o.getTokenOffset(),o.getTokenLength()):()=>!0}const a=r(s.onObjectBegin),y=c(s.onObjectProperty),M=r(s.onObjectEnd),T=r(s.onArrayBegin),_=r(s.onArrayEnd),Y=c(s.onLiteralValue),G=c(s.onSeparator),V=r(s.onComment),oe=c(s.onError),se=i&&i.disallowComments,ae=i&&i.allowTrailingComma;function fe(){for(;;){const N=o.scan();switch(o.getTokenError()){case 4:K(14);break;case 5:K(15);break;case 3:K(13);break;case 1:se||K(11);break;case 2:K(12);break;case 6:K(16);break}switch(N){case 12:case 13:se?K(10):V();break;case 16:K(1);break;case 15:case 14:break;default:return N}}}function K(N,$=[],L=[]){if(oe(N),$.length+L.length>0){let W=o.getToken();for(;W!==17;){if($.indexOf(W)!==-1){fe();break}else if(L.indexOf(W)!==-1)break;W=fe()}}}function q(N){const $=o.getTokenValue();return N?Y($):y($),fe(),!0}function F(){switch(o.getToken()){case 11:{let N=0;try{N=JSON.parse(o.getTokenValue()),typeof N!="number"&&(K(2),N=0)}catch{K(2)}Y(N);break}case 7:Y(null);break;case 8:Y(!0);break;case 9:Y(!1);break;default:return!1}return fe(),!0}function A(){return o.getToken()!==10?(K(3,[],[2,5]),!1):(q(!1),o.getToken()===6?(G(":"),fe(),ne()||K(4,[],[2,5])):K(5,[],[2,5]),!0)}function O(){a(),fe();let N=!1;for(;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){if(N||K(4,[],[]),G(","),fe(),o.getToken()===2&&ae)break}else N&&K(6,[],[]);A()||K(4,[],[2,5]),N=!0}return M(),o.getToken()!==2?K(7,[2],[]):fe(),!0}function U(){T(),fe();let N=!1;for(;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){if(N||K(4,[],[]),G(","),fe(),o.getToken()===4&&ae)break}else N&&K(6,[],[]);ne()||K(4,[],[4,5]),N=!0}return _(),o.getToken()!==4?K(8,[4],[]):fe(),!0}function ne(){switch(o.getToken()){case 3:return U();case 1:return O();case 10:return q(!0);default:return F()}}return fe(),o.getToken()===17?i.allowEmptyContent?!0:(K(4,[],[]),!1):ne()?(o.getToken()!==17&&K(9,[],[]),!0):(K(4,[],[]),!1)}e.visit=m;function d(n,s){const i=D(n),o=[];let r,c=0,a;do switch(a=i.getPosition(),r=i.scan(),r){case 12:case 13:case 17:c!==a&&o.push(n.substring(c,a)),s!==void 0&&o.push(i.getTokenValue().replace(/[^\r\n]/g,s)),c=i.getPosition();break}while(r!==17);return o.join("")}e.stripComments=d;function l(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(n){if(Array.isArray(n))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=l}),define(ee[122],ie([0,1,43]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function t(S,b,P){let C,u,p,w,g;if(b){for(w=b.offset,g=w+b.length,p=w;p>0&&!f(S,p-1);)p--;let a=g;for(;aw&&S.substring(y,M)!==a&&o.push({offset:y,length:M-y,content:a})}let c=i();if(c!==17){const a=l.getTokenOffset()+p,y=R(d,C);r(y,p,a)}for(;c!==17;){let a=l.getTokenOffset()+l.getTokenLength()+p,y=i(),M="";for(;!v&&(y===12||y===13);){const _=l.getTokenOffset()+p;r(" ",a,_),a=l.getTokenOffset()+l.getTokenLength()+p,M=y===12?s():"",y=i()}if(y===2)c!==1&&(m--,M=s());else if(y===4)c!==3&&(m--,M=s());else{switch(c){case 3:case 1:m++,M=s();break;case 5:case 12:M=s();break;case 13:v?M=s():M=" ";break;case 6:M=" ";break;case 10:if(y===6){M="";break}case 7:case 8:case 9:case 11:case 2:case 4:y===12||y===13?M=" ":y!==5&&y!==17&&(n=!0);break;case 16:n=!0;break}v&&(y===12||y===13)&&(M=s())}const T=l.getTokenOffset()+p;r(M,a,T),c=y}return o}e.format=t;function k(S,b){const P=JSON.stringify(S,void 0,b.insertSpaces?b.tabSize||4:" ");return b.eol!==void 0?P.replace(/\r\n|\r|\n/g,b.eol):P}e.toFormattedString=k;function R(S,b){let P="";for(let C=0;C0&&(v=p.pop(),h=(0,E.findNodeAtLocation)(g,p),h===void 0&&P!==void 0);)typeof v=="string"?P={[v]:P}:P=[P];if(h)if(h.type==="object"&&typeof v=="string"&&Array.isArray(h.children)){const m=(0,E.findNodeAtLocation)(h,[v]);if(m!==void 0)if(P===void 0){if(!m.parent)throw new Error("Malformed AST");const d=h.children.indexOf(m.parent);let l,n=m.parent.offset+m.parent.length;if(d>0){const s=h.children[d-1];l=s.offset+s.length}else l=h.offset+1,h.children.length>1&&(n=h.children[1].offset);return D(S,{offset:l,length:n-l,content:""},C)}else return D(S,{offset:m.offset,length:m.length,content:JSON.stringify(P)},C);else{if(P===void 0)return[];const d=`${JSON.stringify(v)}: ${JSON.stringify(P)}`,l=u?u(h.children.map(s=>s.children[0].value)):h.children.length;let n;if(l>0){const s=h.children[l-1];n={offset:s.offset+s.length,length:0,content:","+d}}else h.children.length===0?n={offset:h.offset+1,length:0,content:d}:n={offset:h.offset+1,length:0,content:d+","};return D(S,n,C)}}else if(h.type==="array"&&typeof v=="number"&&Array.isArray(h.children))if(P!==void 0){const m=`${JSON.stringify(P)}`;let d;if(h.children.length===0||v===0)d={offset:h.offset+1,length:0,content:h.children.length===0?m:m+","};else{const l=v===-1||v>h.children.length?h.children.length:v,n=h.children[l-1];d={offset:n.offset+n.length,length:0,content:","+m}}return D(S,d,C)}else{const m=v,d=h.children[m];let l;if(h.children.length===1)l={offset:h.offset+1,length:h.length-2,content:""};else if(h.children.length-1===m){const n=h.children[m-1],s=n.offset+n.length,i=h.offset+h.length;l={offset:s,length:i-2-s,content:""}}else l={offset:d.offset,length:h.children[m+1].offset-d.offset,content:""};return D(S,l,C)}else throw new Error(`Can not add ${typeof v!="number"?"index":"property"} to parent of type ${h.type}`);else{if(P===void 0)throw new Error("Can not delete in empty document");return D(S,{offset:g?g.offset:0,length:g?g.length:0,content:JSON.stringify(P)},C)}}e.setProperty=R;function D(S,b,P){let C=I(S,b),u=b.offset,p=b.offset+b.content.length;if(b.length===0||b.content.length===0){for(;u>0&&!(0,t.isEOL)(C,u-1);)u--;for(;p=0;h--){const v=w[h];C=I(C,v),u=Math.min(u,v.offset),p=Math.max(p,v.offset+v.length),p+=v.content.length-v.length}const g=S.length-(C.length-p)-u;return[{offset:u,length:g,content:C.substring(u,p)}]}e.withFormatting=D;function I(S,b){return S.substring(0,b.offset)+b.content+S.substring(b.offset+b.length)}e.applyEdit=I;function f(S,b){const P=b.slice(0).sort((u,p)=>{const w=u.offset-p.offset;return w===0?u.length-p.length:w});let C=S.length;for(let u=P.length-1;u>=0;u--){const p=P[u];if(p.offset+p.length<=C)S=I(S,p);else throw new Error("Overlapping edit");C=p.offset}return S}e.applyEdits=f}),define(ee[124],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class E{constructor(k){this.executor=k,this._didRun=!1}hasValue(){return this._didRun}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(k){this._error=k}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(k){return new E(()=>k(this.getValue()))}}e.Lazy=E}),define(ee[2],ie([0,1,49,66]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const k=!1;let R=null;function D(c){R=c}if(e.setDisposableTracker=D,k){const c="__is_disposable_tracked__";D(new class{trackDisposable(a){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{a[c]||console.log(y)},3e3)}setParent(a,y){if(a&&a!==v.None)try{a[c]=!0}catch{}}markAsDisposed(a){if(a&&a!==v.None)try{a[c]=!0}catch{}}markAsSingleton(a){}})}function I(c){return R?.trackDisposable(c),c}function f(c){R?.markAsDisposed(c)}function S(c,a){R?.setParent(c,a)}function b(c,a){if(!!R)for(const y of c)R.setParent(y,a)}function P(c){return R?.markAsSingleton(c),c}e.markAsSingleton=P;function C(c){return typeof c.dispose=="function"&&c.dispose.length===0}e.isDisposable=C;function u(c){if(t.Iterable.is(c)){const a=[];for(const y of c)if(y)try{y.dispose()}catch(M){a.push(M)}if(a.length===1)throw a[0];if(a.length>1)throw new AggregateError(a,"Encountered errors while disposing of store");return Array.isArray(c)?[]:c}else if(c)return c.dispose(),c}e.dispose=u;function p(c){for(const a of c)C(a)&&a.dispose();return[]}e.disposeIfDisposable=p;function w(...c){const a=g(()=>u(c));return b(c,a),a}e.combinedDisposable=w;function g(c){const a=I({dispose:(0,E.once)(()=>{f(a),c()})});return a}e.toDisposable=g;class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,I(this)}dispose(){this._isDisposed||(f(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{u(this._toDispose)}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return S(a,this),this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}e.DisposableStore=h,h.DISABLE_DISPOSED_WARNING=!1;class v{constructor(){this._store=new h,I(this),S(this._store,this)}dispose(){f(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}e.Disposable=v,v.None=Object.freeze({dispose(){}});class m{constructor(){this._isDisposed=!1,I(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){this._isDisposed||a===this._value||(this._value?.dispose(),a&&S(a,this),this._value=a)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,f(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&S(a,null),a}}e.MutableDisposable=m;class d{constructor(a){this._disposable=a,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=d;class l{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,I(this)}set(a){let y=a;return this.unset=()=>y=void 0,this.isset=()=>y!==void 0,this.dispose=()=>{y&&(y(),y=void 0,f(this))},this}}e.SafeDisposable=l;class n{constructor(){this.references=new Map}acquire(a,...y){let M=this.references.get(a);M||(M={counter:0,object:this.createReferencedObject(a,...y)},this.references.set(a,M));const{object:T}=M,_=(0,E.once)(()=>{--M.counter===0&&(this.destroyReferencedObject(a,M.object),this.references.delete(a))});return M.counter++,{object:T,dispose:_}}}e.ReferenceCollection=n;class s{constructor(a){this.referenceCollection=a}async acquire(a,...y){const M=this.referenceCollection.acquire(a,...y);try{return{object:await M.object,dispose:()=>M.dispose()}}catch(T){throw M.dispose(),T}}}e.AsyncReferenceCollection=s;class i{constructor(a){this.object=a}dispose(){}}e.ImmortalReference=i;function o(c){const a=new h;try{c(a)}finally{a.dispose()}}e.disposeOnReturn=o;class r{constructor(){this._store=new Map,this._isDisposed=!1,I(this)}dispose(){f(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(!!this._store.size)try{u(this._store.values())}finally{this._store.clear()}}has(a){return this._store.has(a)}get(a){return this._store.get(a)}set(a,y,M=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),M||this._store.get(a)?.dispose(),this._store.set(a,y)}deleteAndDispose(a){this._store.get(a)?.dispose(),this._store.delete(a)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=r}),define(ee[95],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class E{constructor(R){this.element=R,this.next=E.Undefined,this.prev=E.Undefined}}E.Undefined=new E(void 0);class t{constructor(){this._first=E.Undefined,this._last=E.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===E.Undefined}clear(){let R=this._first;for(;R!==E.Undefined;){const D=R.next;R.prev=E.Undefined,R.next=E.Undefined,R=D}this._first=E.Undefined,this._last=E.Undefined,this._size=0}unshift(R){return this._insert(R,!1)}push(R){return this._insert(R,!0)}_insert(R,D){const I=new E(R);if(this._first===E.Undefined)this._first=I,this._last=I;else if(D){const S=this._last;this._last=I,I.prev=S,S.next=I}else{const S=this._first;this._first=I,I.next=S,S.prev=I}this._size+=1;let f=!1;return()=>{f||(f=!0,this._remove(I))}}shift(){if(this._first!==E.Undefined){const R=this._first.element;return this._remove(this._first),R}}pop(){if(this._last!==E.Undefined){const R=this._last.element;return this._remove(this._last),R}}_remove(R){if(R.prev!==E.Undefined&&R.next!==E.Undefined){const D=R.prev;D.next=R.next,R.next.prev=D}else R.prev===E.Undefined&&R.next===E.Undefined?(this._first=E.Undefined,this._last=E.Undefined):R.next===E.Undefined?(this._last=this._last.prev,this._last.next=E.Undefined):R.prev===E.Undefined&&(this._first=this._first.next,this._first.prev=E.Undefined);this._size-=1}*[Symbol.iterator](){let R=this._first;for(;R!==E.Undefined;)yield R.element,R=R.next}}e.LinkedList=t}),define(ee[39],ie([0,1]),function(z,e){"use strict";var E,t,k;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function R(p,w,g){let h=p.get(w);return h===void 0&&(h=g,p.set(w,h)),h}e.getOrSet=R;function D(p){const w=[];return p.forEach((g,h)=>{w.push(`${h} => ${g}`)}),`Map(${p.size}) {${w.join(", ")}}`}e.mapToString=D;function I(p){const w=[];return p.forEach(g=>{w.push(g)}),`Set(${p.size}) {${w.join(", ")}}`}e.setToString=I;class f{constructor(w,g){this.uri=w,this.value=g}}class S{constructor(w,g){this[E]="ResourceMap",w instanceof S?(this.map=new Map(w.map),this.toKey=g??S.defaultToKey):(this.map=new Map,this.toKey=w??S.defaultToKey)}set(w,g){return this.map.set(this.toKey(w),new f(w,g)),this}get(w){return this.map.get(this.toKey(w))?.value}has(w){return this.map.has(this.toKey(w))}get size(){return this.map.size}clear(){this.map.clear()}delete(w){return this.map.delete(this.toKey(w))}forEach(w,g){typeof g<"u"&&(w=w.bind(g));for(const[h,v]of this.map)w(v.value,v.uri,this)}*values(){for(const w of this.map.values())yield w.value}*keys(){for(const w of this.map.values())yield w.uri}*entries(){for(const w of this.map.values())yield[w.uri,w.value]}*[(E=Symbol.toStringTag,Symbol.iterator)](){for(const[,w]of this.map)yield[w.uri,w.value]}}e.ResourceMap=S,S.defaultToKey=p=>p.toString();class b{constructor(w,g){this[t]="ResourceSet",!w||typeof w=="function"?this._map=new S(w):(this._map=new S(g),w.forEach(this.add,this))}get size(){return this._map.size}add(w){return this._map.set(w,w),this}clear(){this._map.clear()}delete(w){return this._map.delete(w)}forEach(w,g){this._map.forEach((h,v)=>w.call(g,v,v,this))}has(w){return this._map.has(w)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=b;var P;(function(p){p[p.None=0]="None",p[p.AsOld=1]="AsOld",p[p.AsNew=2]="AsNew"})(P=e.Touch||(e.Touch={}));class C{constructor(){this[k]="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(){return this._head?.value}get last(){return this._tail?.value}has(w){return this._map.has(w)}get(w,g=0){const h=this._map.get(w);if(!!h)return g!==0&&this.touch(h,g),h.value}set(w,g,h=0){let v=this._map.get(w);if(v)v.value=g,h!==0&&this.touch(v,h);else{switch(v={key:w,value:g,next:void 0,previous:void 0},h){case 0:this.addItemLast(v);break;case 1:this.addItemFirst(v);break;case 2:this.addItemLast(v);break;default:this.addItemLast(v);break}this._map.set(w,v),this._size++}return this}delete(w){return!!this.remove(w)}remove(w){const g=this._map.get(w);if(!!g)return this._map.delete(w),this.removeItem(g),this._size--,g.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const w=this._head;return this._map.delete(w.key),this.removeItem(w),this._size--,w.value}forEach(w,g){const h=this._state;let v=this._head;for(;v;){if(g?w.bind(g)(v.value,v.key,this):w(v.value,v.key,this),this._state!==h)throw new Error("LinkedMap got modified during iteration.");v=v.next}}keys(){const w=this,g=this._state;let h=this._head;const v={[Symbol.iterator](){return v},next(){if(w._state!==g)throw new Error("LinkedMap got modified during iteration.");if(h){const m={value:h.key,done:!1};return h=h.next,m}else return{value:void 0,done:!0}}};return v}values(){const w=this,g=this._state;let h=this._head;const v={[Symbol.iterator](){return v},next(){if(w._state!==g)throw new Error("LinkedMap got modified during iteration.");if(h){const m={value:h.value,done:!1};return h=h.next,m}else return{value:void 0,done:!0}}};return v}entries(){const w=this,g=this._state;let h=this._head;const v={[Symbol.iterator](){return v},next(){if(w._state!==g)throw new Error("LinkedMap got modified during iteration.");if(h){const m={value:[h.key,h.value],done:!1};return h=h.next,m}else return{value:void 0,done:!0}}};return v}[(k=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(w){if(w>=this.size)return;if(w===0){this.clear();return}let g=this._head,h=this.size;for(;g&&h>w;)this._map.delete(g.key),g=g.next,h--;this._head=g,this._size=h,g&&(g.previous=void 0),this._state++}addItemFirst(w){if(!this._head&&!this._tail)this._tail=w;else if(this._head)w.next=this._head,this._head.previous=w;else throw new Error("Invalid list");this._head=w,this._state++}addItemLast(w){if(!this._head&&!this._tail)this._head=w;else if(this._tail)w.previous=this._tail,this._tail.next=w;else throw new Error("Invalid list");this._tail=w,this._state++}removeItem(w){if(w===this._head&&w===this._tail)this._head=void 0,this._tail=void 0;else if(w===this._head){if(!w.next)throw new Error("Invalid list");w.next.previous=void 0,this._head=w.next}else if(w===this._tail){if(!w.previous)throw new Error("Invalid list");w.previous.next=void 0,this._tail=w.previous}else{const g=w.next,h=w.previous;if(!g||!h)throw new Error("Invalid list");g.previous=h,h.next=g}w.next=void 0,w.previous=void 0,this._state++}touch(w,g){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(g!==1&&g!==2)){if(g===1){if(w===this._head)return;const h=w.next,v=w.previous;w===this._tail?(v.next=void 0,this._tail=v):(h.previous=v,v.next=h),w.previous=void 0,w.next=this._head,this._head.previous=w,this._head=w,this._state++}else if(g===2){if(w===this._tail)return;const h=w.next,v=w.previous;w===this._head?(h.previous=void 0,this._head=h):(h.previous=v,v.next=h),w.next=void 0,w.previous=this._tail,this._tail.next=w,this._tail=w,this._state++}}}toJSON(){const w=[];return this.forEach((g,h)=>{w.push([h,g])}),w}fromJSON(w){this.clear();for(const[g,h]of w)this.set(g,h)}}e.LinkedMap=C;class u extends C{constructor(w,g=1){super(),this._limit=w,this._ratio=Math.min(Math.max(0,g),1)}get limit(){return this._limit}set limit(w){this._limit=w,this.checkTrim()}get ratio(){return this._ratio}set ratio(w){this._ratio=Math.min(Math.max(0,w),1),this.checkTrim()}get(w,g=2){return super.get(w,g)}peek(w){return super.get(w,0)}set(w,g){return super.set(w,g,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=u}),define(ee[77],ie([0,1,39]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeAccents=e.normalizeNFD=e.normalizeNFC=void 0;const t=new E.LRUCache(1e4);function k(S){return f(S,"NFC",t)}e.normalizeNFC=k;const R=new E.LRUCache(1e4);function D(S){return f(S,"NFD",R)}e.normalizeNFD=D;const I=/[^\u0000-\u0080]/;function f(S,b,P){if(!S)return S;const C=P.get(S);if(C)return C;let u;return I.test(S)?u=S.normalize(b):u=S,P.set(S,u),u}e.removeAccents=function(){const S=/[\u0300-\u036f]/g;return function(b){return D(b).replace(S,"")}}()}),function(){function z(k){const R=[];typeof k=="number"&&R.push("code/timeOrigin",k);function D(f){R.push(f,Date.now())}function I(){const f=[];for(let S=0;S)?=?)";var r=S++;f[r]=f[P]+"|x|X|\\*";var c=S++;f[c]=f[b]+"|x|X|\\*";var a=S++;f[a]="[v=\\s]*("+f[c]+")(?:\\.("+f[c]+")(?:\\.("+f[c]+")(?:"+f[h]+")?"+f[d]+"?)?)?";var y=S++;f[y]="[v=\\s]*("+f[r]+")(?:\\.("+f[r]+")(?:\\.("+f[r]+")(?:"+f[v]+")?"+f[d]+"?)?)?";var M=S++;f[M]="^"+f[o]+"\\s*"+f[a]+"$";var T=S++;f[T]="^"+f[o]+"\\s*"+f[y]+"$";var _=S++;f[_]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var Y=S++;f[Y]="(?:~>?)";var G=S++;f[G]="(\\s*)"+f[Y]+"\\s+",I[G]=new RegExp(f[G],"g");var V=S++;f[V]="^"+f[Y]+f[a]+"$";var oe=S++;f[oe]="^"+f[Y]+f[y]+"$";var se=S++;f[se]="(?:\\^)";var ae=S++;f[ae]="(\\s*)"+f[se]+"\\s+",I[ae]=new RegExp(f[ae],"g");var fe=S++;f[fe]="^"+f[se]+f[a]+"$";var K=S++;f[K]="^"+f[se]+f[y]+"$";var q=S++;f[q]="^"+f[o]+"\\s*("+s+")$|^$";var F=S++;f[F]="^"+f[o]+"\\s*("+n+")$|^$";var A=S++;f[A]="(\\s*)"+f[o]+"\\s*("+s+"|"+f[a]+")",I[A]=new RegExp(f[A],"g");var O=S++;f[O]="^\\s*("+f[a]+")\\s+-\\s+("+f[a]+")\\s*$";var U=S++;f[U]="^\\s*("+f[y]+")\\s+-\\s+("+f[y]+")\\s*$";var ne=S++;f[ne]="(<|>)?=?\\s*\\*";for(var N=0;N<35;N++)k(N,f[N]),I[N]||(I[N]=new RegExp(f[N]));function $(J,ue){if(J instanceof L)return J;if(typeof J!="string"||J.length>R||!(ue?I[i]:I[l]).test(J))return null;try{return new L(J,ue)}catch{return null}}function L(J,ue){if(J instanceof L){if(J.loose===ue)return J;J=J.version}else if(typeof J!="string")throw new TypeError("Invalid Version: "+J);if(J.length>R)throw new TypeError("version is longer than "+R+" characters");if(!(this instanceof L))return new L(J,ue);k("SemVer",J,ue),this.loose=ue;var he=J.trim().match(ue?I[i]:I[l]);if(!he)throw new TypeError("Invalid Version: "+J);if(this.raw=J,this.major=+he[1],this.minor=+he[2],this.patch=+he[3],this.major>D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>D||this.patch<0)throw new TypeError("Invalid patch version");he[4]?this.prerelease=he[4].split(".").map(function(ye){if(/^[0-9]+$/.test(ye)){var Ce=+ye;if(Ce>=0&&Ce=0;)typeof this.prerelease[he]=="number"&&(this.prerelease[he]++,he=-2);he===-1&&this.prerelease.push(0)}ue&&(this.prerelease[0]===ue?isNaN(this.prerelease[1])&&(this.prerelease=[ue,0]):this.prerelease=[ue,0]);break;default:throw new Error("invalid increment argument: "+J)}return this.format(),this.raw=this.version,this},e.inc=function(J,ue,he,ye){typeof he=="string"&&(ye=he,he=void 0);try{return new L(J,he).inc(ue,ye).version}catch{return null}},e.diff=function(J,ue){if(B(J,ue))return null;var he=$(J),ye=$(ue);if(he.prerelease.length||ye.prerelease.length){for(var Ce in he)if((Ce==="major"||Ce==="minor"||Ce==="patch")&&he[Ce]!==ye[Ce])return"pre"+Ce;return"prerelease"}for(var Ce in he)if((Ce==="major"||Ce==="minor"||Ce==="patch")&&he[Ce]!==ye[Ce])return Ce},e.compareIdentifiers=j;var W=/^[0-9]+$/;function j(J,ue){var he=W.test(J),ye=W.test(ue);return he&&ye&&(J=+J,ue=+ue),he&&!ye?-1:ye&&!he?1:Jue?1:0}function H(J,ue,he){return new L(J,he).compare(new L(ue,he))}function X(J,ue,he){return H(J,ue,he)>0}function re(J,ue,he){return H(J,ue,he)<0}function B(J,ue,he){return H(J,ue,he)===0}function x(J,ue,he){return H(J,ue,he)!==0}function Z(J,ue,he){return H(J,ue,he)>=0}function ce(J,ue,he){return H(J,ue,he)<=0}function ge(J,ue,he,ye){var Ce;switch(ue){case"===":typeof J=="object"&&(J=J.version),typeof he=="object"&&(he=he.version),Ce=J===he;break;case"!==":typeof J=="object"&&(J=J.version),typeof he=="object"&&(he=he.version),Ce=J!==he;break;case"":case"=":case"==":Ce=B(J,he,ye);break;case"!=":Ce=x(J,he,ye);break;case">":Ce=X(J,he,ye);break;case">=":Ce=Z(J,he,ye);break;case"<":Ce=re(J,he,ye);break;case"<=":Ce=ce(J,he,ye);break;default:throw new TypeError("Invalid operator: "+ue)}return Ce}function De(J,ue){if(J instanceof De){if(J.loose===ue)return J;J=J.value}if(!(this instanceof De))return new De(J,ue);k("comparator",J,ue),this.loose=ue,this.parse(J),this.semver===Te?this.value="":this.value=this.operator+this.semver.version,k("comp",this)}e.rcompareIdentifiers=function(J,ue){return j(ue,J)},e.major=function(J,ue){return new L(J,ue).major},e.minor=function(J,ue){return new L(J,ue).minor},e.patch=function(J,ue){return new L(J,ue).patch},e.compare=H,e.compareLoose=function(J,ue){return H(J,ue,!0)},e.rcompare=function(J,ue,he){return H(ue,J,he)},e.sort=function(J,ue){return J.sort(function(he,ye){return e.compare(he,ye,ue)})},e.rsort=function(J,ue){return J.sort(function(he,ye){return e.rcompare(he,ye,ue)})},e.gt=X,e.lt=re,e.eq=B,e.neq=x,e.gte=Z,e.lte=ce,e.cmp=ge,e.Comparator=De;var Te={};function Me(J,ue){if(J instanceof Me)return J.loose===ue?J:new Me(J.raw,ue);if(J instanceof De)return new Me(J.value,ue);if(!(this instanceof Me))return new Me(J,ue);if(this.loose=ue,this.raw=J,this.set=J.split(/\s*\|\|\s*/).map(function(he){return this.parseRange(he.trim())},this).filter(function(he){return he.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+J);this.format()}function Le(J){return!J||J.toLowerCase()==="x"||J==="*"}function ve(J,ue,he,ye,Ce,Fe,Oe,$e,Ne,je,Qe,Be,Ge){return((ue=Le(he)?"":Le(ye)?">="+he+".0.0":Le(Ce)?">="+he+"."+ye+".0":">="+ue)+" "+($e=Le(Ne)?"":Le(je)?"<"+(+Ne+1)+".0.0":Le(Qe)?"<"+Ne+"."+(+je+1)+".0":Be?"<="+Ne+"."+je+"."+Qe+"-"+Be:"<="+$e)).trim()}function pe(J,ue){for(var he=0;he0){var ye=J[he].semver;if(ye.major===ue.major&&ye.minor===ue.minor&&ye.patch===ue.patch)return!0}return!1}return!0}function Se(J,ue,he){try{ue=new Me(ue,he)}catch{return!1}return ue.test(J)}function ke(J,ue,he,ye){var Ce,Fe,Oe,$e,Ne;switch(J=new L(J,ye),ue=new Me(ue,ye),he){case">":Ce=X,Fe=ce,Oe=re,$e=">",Ne=">=";break;case"<":Ce=re,Fe=Z,Oe=X,$e="<",Ne="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Se(J,ue,ye))return!1;for(var je=0;je=0.0.0")),Be=Be||Q,Ge=Ge||Q,Ce(Q.semver,Be.semver,ye)?Be=Q:Oe(Q.semver,Ge.semver,ye)&&(Ge=Q)}),Be.operator===$e||Be.operator===Ne||(!Ge.operator||Ge.operator===$e)&&Fe(J,Ge.semver)||Ge.operator===Ne&&Oe(J,Ge.semver))return!1}return!0}De.prototype.parse=function(J){var ue=this.loose?I[q]:I[F],he=J.match(ue);if(!he)throw new TypeError("Invalid comparator: "+J);this.operator=he[1],this.operator==="="&&(this.operator=""),he[2]?this.semver=new L(he[2],this.loose):this.semver=Te},De.prototype.toString=function(){return this.value},De.prototype.test=function(J){return k("Comparator.test",J,this.loose),this.semver===Te||(typeof J=="string"&&(J=new L(J,this.loose)),ge(J,this.operator,this.semver,this.loose))},De.prototype.intersects=function(J,ue){if(!(J instanceof De))throw new TypeError("a Comparator is required");var he;if(this.operator==="")return he=new Me(J.value,ue),Se(this.value,he,ue);if(J.operator==="")return he=new Me(this.value,ue),Se(J.semver,he,ue);var ye=!(this.operator!==">="&&this.operator!==">"||J.operator!==">="&&J.operator!==">"),Ce=!(this.operator!=="<="&&this.operator!=="<"||J.operator!=="<="&&J.operator!=="<"),Fe=this.semver.version===J.semver.version,Oe=!(this.operator!==">="&&this.operator!=="<="||J.operator!==">="&&J.operator!=="<="),$e=ge(this.semver,"<",J.semver,ue)&&(this.operator===">="||this.operator===">")&&(J.operator==="<="||J.operator==="<"),Ne=ge(this.semver,">",J.semver,ue)&&(this.operator==="<="||this.operator==="<")&&(J.operator===">="||J.operator===">");return ye||Ce||Fe&&Oe||$e||Ne},e.Range=Me,Me.prototype.format=function(){return this.range=this.set.map(function(J){return J.join(" ").trim()}).join("||").trim(),this.range},Me.prototype.toString=function(){return this.range},Me.prototype.parseRange=function(J){var ue=this.loose;J=J.trim(),k("range",J,ue);var he=ue?I[U]:I[O];J=J.replace(he,ve),k("hyphen replace",J),J=J.replace(I[A],"$1$2$3"),k("comparator trim",J,I[A]),J=(J=(J=J.replace(I[G],"$1~")).replace(I[ae],"$1^")).split(/\s+/).join(" ");var ye=ue?I[q]:I[F],Ce=J.split(" ").map(function(Fe){return function(Oe,$e){return k("comp",Oe),Oe=function(Ne,je){return Ne.trim().split(/\s+/).map(function(Qe){return function(Be,Ge){k("caret",Be,Ge);var Q=Ge?I[K]:I[fe];return Be.replace(Q,function(le,de,me,Ee,Ae){var Ue;return k("caret",Be,le,de,me,Ee,Ae),Le(de)?Ue="":Le(me)?Ue=">="+de+".0.0 <"+(+de+1)+".0.0":Le(Ee)?Ue=de==="0"?">="+de+"."+me+".0 <"+de+"."+(+me+1)+".0":">="+de+"."+me+".0 <"+(+de+1)+".0.0":Ae?(k("replaceCaret pr",Ae),Ae.charAt(0)!=="-"&&(Ae="-"+Ae),Ue=de==="0"?me==="0"?">="+de+"."+me+"."+Ee+Ae+" <"+de+"."+me+"."+(+Ee+1):">="+de+"."+me+"."+Ee+Ae+" <"+de+"."+(+me+1)+".0":">="+de+"."+me+"."+Ee+Ae+" <"+(+de+1)+".0.0"):(k("no pr"),Ue=de==="0"?me==="0"?">="+de+"."+me+"."+Ee+" <"+de+"."+me+"."+(+Ee+1):">="+de+"."+me+"."+Ee+" <"+de+"."+(+me+1)+".0":">="+de+"."+me+"."+Ee+" <"+(+de+1)+".0.0"),k("caret return",Ue),Ue})}(Qe,je)}).join(" ")}(Oe,$e),k("caret",Oe),Oe=function(Ne,je){return Ne.trim().split(/\s+/).map(function(Qe){return function(Be,Ge){var Q=Ge?I[oe]:I[V];return Be.replace(Q,function(le,de,me,Ee,Ae){var Ue;return k("tilde",Be,le,de,me,Ee,Ae),Le(de)?Ue="":Le(me)?Ue=">="+de+".0.0 <"+(+de+1)+".0.0":Le(Ee)?Ue=">="+de+"."+me+".0 <"+de+"."+(+me+1)+".0":Ae?(k("replaceTilde pr",Ae),Ae.charAt(0)!=="-"&&(Ae="-"+Ae),Ue=">="+de+"."+me+"."+Ee+Ae+" <"+de+"."+(+me+1)+".0"):Ue=">="+de+"."+me+"."+Ee+" <"+de+"."+(+me+1)+".0",k("tilde return",Ue),Ue})}(Qe,je)}).join(" ")}(Oe,$e),k("tildes",Oe),Oe=function(Ne,je){return k("replaceXRanges",Ne,je),Ne.split(/\s+/).map(function(Qe){return function(Be,Ge){Be=Be.trim();var Q=Ge?I[T]:I[M];return Be.replace(Q,function(le,de,me,Ee,Ae,Ue){k("xRange",Be,le,de,me,Ee,Ae,Ue);var it=Le(me),xe=it||Le(Ee),qe=xe||Le(Ae);return de==="="&&qe&&(de=""),it?le=de===">"||de==="<"?"<0.0.0":"*":de&&qe?(xe&&(Ee=0),qe&&(Ae=0),de===">"?(de=">=",xe?(me=+me+1,Ee=0,Ae=0):qe&&(Ee=+Ee+1,Ae=0)):de==="<="&&(de="<",xe?me=+me+1:Ee=+Ee+1),le=de+me+"."+Ee+"."+Ae):xe?le=">="+me+".0.0 <"+(+me+1)+".0.0":qe&&(le=">="+me+"."+Ee+".0 <"+me+"."+(+Ee+1)+".0"),k("xRange return",le),le})}(Qe,je)}).join(" ")}(Oe,$e),k("xrange",Oe),Oe=function(Ne,je){return k("replaceStars",Ne,je),Ne.trim().replace(I[ne],"")}(Oe,$e),k("stars",Oe),Oe}(Fe,ue)}).join(" ").split(/\s+/);return this.loose&&(Ce=Ce.filter(function(Fe){return!!Fe.match(ye)})),Ce=Ce.map(function(Fe){return new De(Fe,ue)})},Me.prototype.intersects=function(J,ue){if(!(J instanceof Me))throw new TypeError("a Range is required");return this.set.some(function(he){return he.every(function(ye){return J.set.some(function(Ce){return Ce.every(function(Fe){return ye.intersects(Fe,ue)})})})})},e.toComparators=function(J,ue){return new Me(J,ue).set.map(function(he){return he.map(function(ye){return ye.value}).join(" ").trim().split(" ")})},Me.prototype.test=function(J){if(!J)return!1;typeof J=="string"&&(J=new L(J,this.loose));for(var ue=0;ue",he)},e.outside=ke,e.prerelease=function(J,ue){var he=$(J,ue);return he&&he.prerelease.length?he.prerelease:null},e.intersects=function(J,ue,he){return J=new Me(J,he),ue=new Me(ue,he),J.intersects(ue)},e.coerce=function(J){if(J instanceof L)return J;if(typeof J!="string")return null;var ue=J.match(I[_]);return ue==null?null:$((ue[1]||"0")+"."+(ue[2]||"0")+"."+(ue[3]||"0"))}}).call(this,E(1))},function(z,e){var E,t,k=z.exports={};function R(){throw new Error("setTimeout has not been defined")}function D(){throw new Error("clearTimeout has not been defined")}function I(g){if(E===setTimeout)return setTimeout(g,0);if((E===R||!E)&&setTimeout)return E=setTimeout,setTimeout(g,0);try{return E(g,0)}catch{try{return E.call(null,g,0)}catch{return E.call(this,g,0)}}}(function(){try{E=typeof setTimeout=="function"?setTimeout:R}catch{E=R}try{t=typeof clearTimeout=="function"?clearTimeout:D}catch{t=D}})();var f,S=[],b=!1,P=-1;function C(){b&&f&&(b=!1,f.length?S=f.concat(S):P=-1,S.length&&u())}function u(){if(!b){var g=I(C);b=!0;for(var h=S.length;h;){for(f=S,S=[];++P1)for(var v=1;v=0;P--)for(;b.forward[P]&&S(b.forward[P].key,f)<0;)b=b.forward[P];if(b=b.forward[0],b&&S(b.key,f)===0)return b}static _insert(I,f,S,b){const P=[];let C=I._header;for(let u=I._level-1;u>=0;u--){for(;C.forward[u]&&b(C.forward[u].key,f)<0;)C=C.forward[u];P[u]=C}if(C=C.forward[0],C&&b(C.key,f)===0)return C.value=S,!1;{const u=R._randomLevel(I);if(u>I._level){for(let p=I._level;p=0;C--){for(;P.forward[C]&&S(P.forward[C].key,f)<0;)P=P.forward[C];b[C]=P}if(P=P.forward[0],!P||S(P.key,f)!==0)return!1;for(let C=0;C0&&I._header.forward[I._level-1]===k;)I._level-=1;return!0}}e.SkipList=R}),define(ee[57],ie([0,1,16,2]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function k(d){const l=d;return l?typeof l.read=="function":!1}e.isReadable=k;function R(d){const l=d;return l?[l.on,l.pause,l.resume,l.destroy].every(n=>typeof n=="function"):!1}e.isReadableStream=R;function D(d){const l=d;return l?R(l.stream)&&Array.isArray(l.buffer)&&typeof l.ended=="boolean":!1}e.isReadableBufferedStream=D;function I(d,l){return new f(d,l)}e.newWriteableStream=I;class f{constructor(l,n){this.reducer=l,this.options=n,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(l){if(!this.state.destroyed){if(this.state.flowing)this.emitData(l);else if(this.buffer.data.push(l),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(n=>this.pendingWritePromises.push(n))}}error(l){this.state.destroyed||(this.state.flowing?this.emitError(l):this.buffer.error.push(l))}end(l){this.state.destroyed||(typeof l<"u"&&this.write(l),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(l){this.listeners.data.slice(0).forEach(n=>n(l))}emitError(l){this.listeners.error.length===0?(0,E.onUnexpectedError)(l):this.listeners.error.slice(0).forEach(n=>n(l))}emitEnd(){this.listeners.end.slice(0).forEach(l=>l())}on(l,n){if(!this.state.destroyed)switch(l){case"data":this.listeners.data.push(n),this.resume();break;case"end":this.listeners.end.push(n),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(n),this.state.flowing&&this.flowErrors();break}}removeListener(l,n){if(this.state.destroyed)return;let s;switch(l){case"data":s=this.listeners.data;break;case"end":s=this.listeners.end;break;case"error":s=this.listeners.error;break}if(s){const i=s.indexOf(n);i>=0&&s.splice(i,1)}}flowData(){if(this.buffer.data.length>0){const l=this.reducer(this.buffer.data);this.emitData(l),this.buffer.data.length=0;const n=[...this.pendingWritePromises];this.pendingWritePromises.length=0,n.forEach(s=>s())}}flowErrors(){if(this.listeners.error.length>0){for(const l of this.buffer.error)this.emitError(l);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function S(d,l){const n=[];let s;for(;(s=d.read())!==null;)n.push(s);return l(n)}e.consumeReadable=S;function b(d,l,n){const s=[];let i;for(;(i=d.read())!==null&&s.length0?l(s):{read:()=>{if(s.length>0)return s.shift();if(typeof i<"u"){const o=i;return i=void 0,o}return d.read()}}}e.peekReadable=b;function P(d,l){return new Promise((n,s)=>{const i=[];C(d,{onData:o=>{l&&i.push(o)},onError:o=>{l?s(o):n(void 0)},onEnd:()=>{n(l?l(i):void 0)}})})}e.consumeStream=P;function C(d,l){let n=!1;return d.on("error",s=>{n||l.onError(s)}),d.on("end",()=>{n||l.onEnd()}),d.on("data",s=>{n||l.onData(s)}),(0,t.toDisposable)(()=>n=!0)}e.listenStream=C;function u(d,l){return new Promise((n,s)=>{const i=new t.DisposableStore,o=[],r=y=>{if(o.push(y),o.length>l)return i.dispose(),d.pause(),n({stream:d,buffer:o,ended:!1})},c=y=>s(y),a=()=>n({stream:d,buffer:o,ended:!0});i.add((0,t.toDisposable)(()=>d.removeListener("error",c))),d.on("error",c),i.add((0,t.toDisposable)(()=>d.removeListener("end",a))),d.on("end",a),i.add((0,t.toDisposable)(()=>d.removeListener("data",r))),d.on("data",r)})}e.peekStream=u;function p(d,l){const n=I(l);return n.end(d),n}e.toStream=p;function w(){const d=I(()=>{throw new Error("not supported")});return d.end(),d}e.emptyStream=w;function g(d){let l=!1;return{read:()=>l?null:(l=!0,d)}}e.toReadable=g;function h(d,l,n){const s=I(n);return C(d,{onData:i=>s.write(l.data(i)),onError:i=>s.error(l.error?l.error(i):i),onEnd:()=>s.end()}),s}e.transform=h;function v(d,l,n){let s=!1;return{read:()=>{const i=l.read();return s?i:(s=!0,i!==null?n([d,i]):d)}}}e.prefixedReadable=v;function m(d,l,n){let s=!1;const i=I(n);return C(l,{onData:o=>s?i.write(o):(s=!0,i.write(n([d,o]))),onError:o=>i.error(o),onEnd:()=>{s||(s=!0,i.write(d)),i.end()}}),i}e.prefixedStream=m}),define(ee[17],ie([0,1,57]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const t=typeof Buffer<"u";let k,R;class D{static alloc(y){return t?new D(Buffer.allocUnsafe(y)):new D(new Uint8Array(y))}static wrap(y){return t&&!Buffer.isBuffer(y)&&(y=Buffer.from(y.buffer,y.byteOffset,y.byteLength)),new D(y)}static fromString(y,M){return!(M?.dontUseNodeBuffer||!1)&&t?new D(Buffer.from(y)):(k||(k=new TextEncoder),new D(k.encode(y)))}static fromByteArray(y){const M=D.alloc(y.length);for(let T=0,_=y.length;T<_;T++)M.buffer[T]=y[T];return M}static concat(y,M){if(typeof M>"u"){M=0;for(let Y=0,G=y.length;Y>>0|a[y+1]<<8>>>0}e.readUInt16LE=I;function f(a,y,M){a[M+0]=y&255,y=y>>>8,a[M+1]=y&255}e.writeUInt16LE=f;function S(a,y){return a[y]*2**24+a[y+1]*2**16+a[y+2]*2**8+a[y+3]}e.readUInt32BE=S;function b(a,y,M){a[M+3]=y,y=y>>>8,a[M+2]=y,y=y>>>8,a[M+1]=y,y=y>>>8,a[M]=y}e.writeUInt32BE=b;function P(a,y){return a[y+0]<<0>>>0|a[y+1]<<8>>>0|a[y+2]<<16>>>0|a[y+3]<<24>>>0}e.readUInt32LE=P;function C(a,y,M){a[M+0]=y&255,y=y>>>8,a[M+1]=y&255,y=y>>>8,a[M+2]=y&255,y=y>>>8,a[M+3]=y&255}e.writeUInt32LE=C;function u(a,y){return a[y]}e.readUInt8=u;function p(a,y,M){a[M]=y}e.writeUInt8=p;function w(a){return E.consumeReadable(a,y=>D.concat(y))}e.readableToBuffer=w;function g(a){return E.toReadable(a)}e.bufferToReadable=g;function h(a){return E.consumeStream(a,y=>D.concat(y))}e.streamToBuffer=h;async function v(a){return a.ended?D.concat(a.buffer):D.concat([...a.buffer,await h(a.stream)])}e.bufferedStreamToBuffer=v;function m(a){return E.toStream(a,y=>D.concat(y))}e.bufferToStream=m;function d(a){return E.transform(a,{data:y=>typeof y=="string"?D.fromString(y):D.wrap(y)},y=>D.concat(y))}e.streamToBufferReadableStream=d;function l(a){return E.newWriteableStream(y=>D.concat(y),a)}e.newWriteableBufferStream=l;function n(a,y){return E.prefixedReadable(a,y,M=>D.concat(M))}e.prefixedBufferReadable=n;function s(a,y){return E.prefixedStream(a,y,M=>D.concat(M))}e.prefixedBufferStream=s;function i(a){let y=0,M=0,T=0;const _=new Uint8Array(Math.floor(a.length/4*3)),Y=V=>{switch(M){case 3:_[T++]=y|V,M=0;break;case 2:_[T++]=y|V>>>2,y=V<<6,M=3;break;case 1:_[T++]=y|V>>>4,y=V<<4,M=2;break;default:y=V<<2,M=1}};for(let V=0;V=65&&oe<=90)Y(oe-65);else if(oe>=97&&oe<=122)Y(oe-97+26);else if(oe>=48&&oe<=57)Y(oe-48+52);else if(oe===43||oe===45)Y(62);else if(oe===47||oe===95)Y(63);else{if(oe===61)break;throw new SyntaxError(`Unexpected base64 character ${a[V]}`)}}const G=T;for(;M>0;)Y(0);return D.wrap(_).slice(0,G)}e.decodeBase64=i;const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function c({buffer:a},y=!0,M=!1){const T=M?r:o;let _="";const Y=a.byteLength%3;let G=0;for(;G>>2],_+=T[(V<<4|oe>>>4)&63],_+=T[(oe<<2|se>>>6)&63],_+=T[se&63]}if(Y===1){const V=a[G+0];_+=T[V>>>2],_+=T[V<<4&63],y&&(_+="==")}else if(Y===2){const V=a[G+0],oe=a[G+1];_+=T[V>>>2],_+=T[(V<<4|oe>>>4)&63],_+=T[oe<<2&63],y&&(_+="=")}return _}e.encodeBase64=c}),define(ee[12],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withUndefinedAsNull=e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=void 0;function E(s){return typeof s=="string"}e.isString=E;function t(s){return Array.isArray(s)&&s.every(i=>E(i))}e.isStringArray=t;function k(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}e.isObject=k;function R(s){const i=Object.getPrototypeOf(Uint8Array);return typeof s=="object"&&s instanceof i}e.isTypedArray=R;function D(s){return typeof s=="number"&&!isNaN(s)}e.isNumber=D;function I(s){return!!s&&typeof s[Symbol.iterator]=="function"}e.isIterable=I;function f(s){return s===!0||s===!1}e.isBoolean=f;function S(s){return typeof s>"u"}e.isUndefined=S;function b(s){return!P(s)}e.isDefined=b;function P(s){return S(s)||s===null}e.isUndefinedOrNull=P;function C(s,i){if(!s)throw new Error(i?`Unexpected type, expected '${i}'`:"Unexpected type")}e.assertType=C;function u(s){if(P(s))throw new Error("Assertion Failed: argument is undefined or null");return s}e.assertIsDefined=u;function p(...s){const i=[];for(let o=0;o0&&s.every(h)}e.areFunctions=v;function m(s,i){const o=Math.min(s.length,i.length);for(let r=0;r"u"?null:s}e.withUndefinedAsNull=n}),define(ee[50],ie([0,1,12]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function t(h){if(!h||typeof h!="object"||h instanceof RegExp)return h;const v=Array.isArray(h)?[]:{};return Object.entries(h).forEach(([m,d])=>{v[m]=d&&typeof d=="object"?t(d):d}),v}e.deepClone=t;function k(h){if(!h||typeof h!="object")return h;const v=[h];for(;v.length>0;){const m=v.shift();Object.freeze(m);for(const d in m)if(R.call(m,d)){const l=m[d];typeof l=="object"&&!Object.isFrozen(l)&&!(0,E.isTypedArray)(l)&&v.push(l)}}return h}e.deepFreeze=k;const R=Object.prototype.hasOwnProperty;function D(h,v){return I(h,v,new Set)}e.cloneAndChange=D;function I(h,v,m){if((0,E.isUndefinedOrNull)(h))return h;const d=v(h);if(typeof d<"u")return d;if(Array.isArray(h)){const l=[];for(const n of h)l.push(I(n,v,m));return l}if((0,E.isObject)(h)){if(m.has(h))throw new Error("Cannot clone recursive data-structure");m.add(h);const l={};for(const n in h)R.call(h,n)&&(l[n]=I(h[n],v,m));return m.delete(h),l}return h}function f(h,v,m=!0){return(0,E.isObject)(h)?((0,E.isObject)(v)&&Object.keys(v).forEach(d=>{d in h?m&&((0,E.isObject)(h[d])&&(0,E.isObject)(v[d])?f(h[d],v[d],m):h[d]=v[d]):h[d]=v[d]}),h):v}e.mixin=f;function S(h,v){if(h===v)return!0;if(h==null||v===null||v===void 0||typeof h!=typeof v||typeof h!="object"||Array.isArray(h)!==Array.isArray(v))return!1;let m,d;if(Array.isArray(h)){if(h.length!==v.length)return!1;for(m=0;m{if((0,E.isObject)(d)||Array.isArray(d)){if(v.has(d))return"[Circular]";v.add(d)}return d})}e.safeStringify=b;function P(h,v){const m=Object.create(null);return!h||!v||Object.keys(v).forEach(l=>{const n=h[l],s=v[l];S(n,s)||(m[l]=s)}),m}e.distinct=P;function C(h,v){const m=v.toLowerCase(),d=Object.keys(h).find(l=>l.toLowerCase()===m);return d?h[d]:h[v]}e.getCaseInsensitive=C;function u(h,v){const m=Object.create(null);for(const[d,l]of Object.entries(h))v(d,l)&&(m[d]=l);return m}e.filter=u;function p(h){let v=[],m=Object.getPrototypeOf(h);for(;Object.prototype!==m;)v=v.concat(Object.getOwnPropertyNames(m)),m=Object.getPrototypeOf(m);return v}e.getAllPropertyNames=p;function w(h){const v=[];for(const m of p(h))typeof h[m]=="function"&&v.push(m);return v}e.getAllMethodNames=w;function g(h,v){const m=l=>function(){const n=Array.prototype.slice.call(arguments,0);return v(l,n)},d={};for(const l of h)d[l]=m(l);return d}e.createProxyObject=g}),define(ee[29],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const E=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function t(k){return E.test(k)}e.isUUID=t,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let k;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?k=crypto.getRandomValues.bind(crypto):k=function(I){for(let f=0;f{const C=t.createReadStream(D),u=E.createHash("sha1");C.pipe(u);const p=(0,k.once)((w,g)=>{C.removeAllListeners(),u.removeAllListeners(),w?P(w):b(g)});C.once("error",p),C.once("end",p),u.once("error",p),u.once("data",w=>p(void 0,w.toString("hex")))})!==I)throw new Error("Hash mismatch")}e.checksum=R}),define(ee[127],ie([0,1,27]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMac=void 0;const t=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function k(D){const I=D.replace(/\-/g,":").toLowerCase();return!t.has(I)}function R(){const D=(0,E.networkInterfaces)();for(const I in D){const f=D[I];if(f){for(const{mac:S}of f)if(k(S))return S}}throw new Error("Unable to retrieve mac address (unexpected format)")}e.getMac=R}),define(ee[96],ie([0,1,79]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFreePortFaster=e.BROWSER_RESTRICTED_PORTS=e.findFreePort=void 0;function t(I,f,S,b=1){let P=!1;return new Promise(C=>{const u=setTimeout(()=>{if(!P)return P=!0,C(0)},S);k(I,f,b,p=>{if(!P)return P=!0,clearTimeout(u),C(p)})})}e.findFreePort=t;function k(I,f,S,b){if(f===0)return b(0);const P=new E.Socket;P.once("connect",()=>(D(P),k(I+S,f-1,S,b))),P.once("data",()=>{}),P.once("error",C=>(D(P),C.code!=="ECONNREFUSED"?k(I+S,f-1,S,b):b(I))),P.connect(I,"127.0.0.1")}e.BROWSER_RESTRICTED_PORTS={1:!0,7:!0,9:!0,11:!0,13:!0,15:!0,17:!0,19:!0,20:!0,21:!0,22:!0,23:!0,25:!0,37:!0,42:!0,43:!0,53:!0,69:!0,77:!0,79:!0,87:!0,95:!0,101:!0,102:!0,103:!0,104:!0,109:!0,110:!0,111:!0,113:!0,115:!0,117:!0,119:!0,123:!0,135:!0,137:!0,139:!0,143:!0,161:!0,179:!0,389:!0,427:!0,465:!0,512:!0,513:!0,514:!0,515:!0,526:!0,530:!0,531:!0,532:!0,540:!0,548:!0,554:!0,556:!0,563:!0,587:!0,601:!0,636:!0,989:!0,990:!0,993:!0,995:!0,1719:!0,1720:!0,1723:!0,2049:!0,3659:!0,4045:!0,5060:!0,5061:!0,6e3:!0,6566:!0,6665:!0,6666:!0,6667:!0,6668:!0,6669:!0,6697:!0,10080:!0};function R(I,f,S,b="127.0.0.1"){let P=!1,C,u=1;const p=E.createServer({pauseOnConnect:!0});function w(g,h){P||(P=!0,p.removeAllListeners(),p.close(),C&&clearTimeout(C),h(g))}return new Promise(g=>{C=setTimeout(()=>{w(0,g)},S),p.on("listening",()=>{w(I,g)}),p.on("error",h=>{h&&(h.code==="EADDRINUSE"||h.code==="EACCES")&&u{w(0,g)}),p.listen(I,b)})}e.findFreePortFaster=R;function D(I){try{I.removeAllListeners("connect"),I.removeAllListeners("error"),I.end(),I.destroy(),I.unref()}catch(f){console.error(f)}}}),define(ee[128],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_MENU_CLOSE_CHANNEL=e.CONTEXT_MENU_CHANNEL=void 0,e.CONTEXT_MENU_CHANNEL="vscode:contextmenu",e.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(ee[129],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class E{constructor(k,R){this.sender=k,this.onMessage=R}send(k){try{this.sender.send("vscode:message",k.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=E}),define(ee[41],ie([0,1,13,16]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validatedIpcMain=void 0;class k{constructor(){this.mapListenerToWrapper=new WeakMap}on(D,I){const f=(S,...b)=>{this.validateEvent(D,S)&&I(S,...b)};return this.mapListenerToWrapper.set(I,f),E.ipcMain.on(D,f),this}once(D,I){return E.ipcMain.once(D,(f,...S)=>{this.validateEvent(D,f)&&I(f,...S)}),this}handle(D,I){return E.ipcMain.handle(D,(f,...S)=>this.validateEvent(D,f)?I(f,...S):Promise.reject(`Invalid channel '${D}' or sender for ipcMain.handle() usage.`)),this}removeHandler(D){return E.ipcMain.removeHandler(D),this}removeListener(D,I){const f=this.mapListenerToWrapper.get(I);return f&&(E.ipcMain.removeListener(D,f),this.mapListenerToWrapper.delete(I)),this}validateEvent(D,I){if(!D||!D.startsWith("vscode:"))return(0,t.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because the channel is unknown.`),!1;const f=I.senderFrame,S=f.url;if(!S)return!0;let b="unknown";try{b=new URL(S).host}catch{return(0,t.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a malformed URL '${S}'.`),!1}return b!=="vscode-app"?((0,t.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a bad origin of '${b}'.`),!1):f.parent!==null?((0,t.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because sender of origin '${b}' is not a main frame.`),!1):!0}}e.validatedIpcMain=new k}),define(ee[130],ie([0,1,13,41,12,128]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextMenuListener=void 0;function D(){t.validatedIpcMain.on(R.CONTEXT_MENU_CHANNEL,(f,S,b,P,C)=>{const u=I(f,P,b);u.popup({window:(0,k.withNullAsUndefined)(E.BrowserWindow.fromWebContents(f.sender)),x:C?C.x:void 0,y:C?C.y:void 0,positioningItem:C?C.positioningItem:void 0,callback:()=>{u&&f.sender.send(R.CONTEXT_MENU_CLOSE_CHANNEL,S)}})})}e.registerContextMenuListener=D;function I(f,S,b){const P=new E.Menu;return b.forEach(C=>{let u;C.type==="separator"?u=new E.MenuItem({type:C.type}):Array.isArray(C.submenu)?u=new E.MenuItem({submenu:I(f,S,C.submenu),label:C.label}):u=new E.MenuItem({label:C.label,type:C.type,accelerator:C.accelerator,checked:C.checked,enabled:C.enabled,visible:C.visible,click:(p,w,g)=>f.sender.send(S,C.id,g)}),P.append(u)}),P}}),define(ee[131],ie([11,10]),function(z,e){return z.create("vs/base/common/date",e)}),define(ee[132],ie([0,1,131]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const t=60,k=t*60,R=k*24,D=R*7,I=R*30,f=R*365;function S(P,C,u){typeof P!="number"&&(P=P.getTime());const p=Math.round((new Date().getTime()-P)/1e3);if(p<-30)return(0,E.localize)(0,null,S(new Date().getTime()+p*1e3,!1));if(p<30)return(0,E.localize)(1,null);let w;return p1?k.localize(4,null,p,u.length):p}if(t.isString(P))return P;if(P.detail){const u=P.detail;if(u.error)return R(u.error,C);if(u.exception)return R(u.exception,C)}return P.stack?R(P,C):P.message?P.message:k.localize(5,null)}e.toErrorMessage=f;function S(P){const C=P;return C instanceof Error&&Array.isArray(C.actions)}e.isErrorWithActions=S;function b(P,C){let u;return typeof P=="string"?u=new Error(P):u=P,u.actions=C,u}e.createErrorWithActions=b}),define(ee[134],ie([11,10]),function(z,e){return z.create("vs/base/common/jsonErrorMessages",e)}),define(ee[135],ie([0,1,134]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function t(k){switch(k){case 1:return(0,E.localize)(0,null);case 2:return(0,E.localize)(1,null);case 3:return(0,E.localize)(2,null);case 4:return(0,E.localize)(3,null);case 5:return(0,E.localize)(4,null);case 6:return(0,E.localize)(5,null);case 7:return(0,E.localize)(6,null);case 8:return(0,E.localize)(7,null);case 9:return(0,E.localize)(8,null);default:return""}}e.getParseErrorMessage=t}),define(ee[136],ie([11,10]),function(z,e){return z.create("vs/base/common/platform",e)}),define(ee[4],ie([0,1,136]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.setTimeout0IsFaster=e.translationsConfigFile=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let t=!1,k=!1,R=!1,D=!1,I=!1,f=!1,S=!1,b=!1,P=!1,C=!1,u,p=e.LANGUAGE_DEFAULT,w,g;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let h;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?h=e.globals.vscode.process:typeof process<"u"&&(h=process);const v=typeof h?.versions?.electron=="string",m=v&&h?.type==="renderer";if(typeof navigator=="object"&&!m)g=navigator.userAgent,t=g.indexOf("Windows")>=0,k=g.indexOf("Macintosh")>=0,b=(g.indexOf("Macintosh")>=0||g.indexOf("iPad")>=0||g.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,R=g.indexOf("Linux")>=0,C=g?.indexOf("Mobi")>=0,f=!0,u=E.getConfiguredDefaultLocale(E.localize(0,null))||e.LANGUAGE_DEFAULT,p=u;else if(typeof h=="object"){t=h.platform==="win32",k=h.platform==="darwin",R=h.platform==="linux",D=R&&!!h.env.SNAP&&!!h.env.SNAP_REVISION,S=v,P=!!h.env.CI||!!h.env.BUILD_ARTIFACTSTAGINGDIRECTORY,u=e.LANGUAGE_DEFAULT,p=e.LANGUAGE_DEFAULT;const a=h.env.VSCODE_NLS_CONFIG;if(a)try{const y=JSON.parse(a),M=y.availableLanguages["*"];u=y.locale,p=M||e.LANGUAGE_DEFAULT,w=y._translationsConfigFile}catch{}I=!0}else console.error("Unable to resolve platform.");var d;(function(a){a[a.Web=0]="Web",a[a.Mac=1]="Mac",a[a.Linux=2]="Linux",a[a.Windows=3]="Windows"})(d=e.Platform||(e.Platform={}));function l(a){switch(a){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=l;let n=0;k?n=1:t?n=3:R&&(n=2),e.isWindows=t,e.isMacintosh=k,e.isLinux=R,e.isLinuxSnap=D,e.isNative=I,e.isElectron=S,e.isWeb=f,e.isWebWorker=f&&typeof e.globals.importScripts=="function",e.isIOS=b,e.isMobile=C,e.isCI=P,e.platform=n,e.userAgent=g,e.language=p;var s;(function(a){function y(){return e.language}a.value=y;function M(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}a.isDefaultVariant=M;function T(){return e.language==="en"}a.isDefault=T})(s=e.Language||(e.Language={})),e.locale=u,e.translationsConfigFile=w,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const a=[];e.globals.addEventListener("message",M=>{if(M.data&&M.data.vscodeScheduleAsyncWork)for(let T=0,_=a.length;T<_;T++){const Y=a[T];if(Y.id===M.data.vscodeScheduleAsyncWork){a.splice(T,1),Y.callback();return}}});let y=0;return M=>{const T=++y;a.push({id:T,callback:M}),e.globals.postMessage({vscodeScheduleAsyncWork:T},"*")}}return a=>setTimeout(a)})();var i;(function(a){a[a.Windows=1]="Windows",a[a.Macintosh=2]="Macintosh",a[a.Linux=3]="Linux"})(i=e.OperatingSystem||(e.OperatingSystem={})),e.OS=k||b?2:t?1:3;let o=!0,r=!1;function c(){if(!r){r=!0;const a=new Uint8Array(2);a[0]=1,a[1]=2,o=new Uint16Array(a.buffer)[0]===(2<<8)+1}return o}e.isLittleEndian=c,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(ee[32],ie([0,1,4]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let t;if(typeof E.globals.vscode<"u"&&typeof E.globals.vscode.process<"u"){const k=E.globals.vscode.process;t={get platform(){return k.platform},get arch(){return k.arch},get env(){return k.env},cwd(){return k.cwd()}}}else typeof process<"u"?t={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:t={get platform(){return E.isWindows?"win32":E.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=t.cwd,e.env=t.env,e.platform=t.platform,e.arch=t.arch}),define(ee[9],ie([0,1,32]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const t=65,k=97,R=90,D=122,I=46,f=47,S=92,b=58,P=63;class C extends Error{constructor(d,l,n){let s;typeof l=="string"&&l.indexOf("not ")===0?(s="must not be",l=l.replace(/^not /,"")):s="must be";const i=d.indexOf(".")!==-1?"property":"argument";let o=`The "${d}" ${i} ${s} of type ${l}`;o+=`. Received type ${typeof n}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function u(m,d){if(typeof m!="string")throw new C(d,"string",m)}function p(m){return m===f||m===S}function w(m){return m===f}function g(m){return m>=t&&m<=R||m>=k&&m<=D}function h(m,d,l,n){let s="",i=0,o=-1,r=0,c=0;for(let a=0;a<=m.length;++a){if(a2){const y=s.lastIndexOf(l);y===-1?(s="",i=0):(s=s.slice(0,y),i=s.length-1-s.lastIndexOf(l)),o=a,r=0;continue}else if(s.length!==0){s="",i=0,o=a,r=0;continue}}d&&(s+=s.length>0?`${l}..`:"..",i=2)}else s.length>0?s+=`${l}${m.slice(o+1,a)}`:s=m.slice(o+1,a),i=a-o-1;o=a,r=0}else c===I&&r!==-1?++r:r=-1}return s}function v(m,d){if(d===null||typeof d!="object")throw new C("pathObject","Object",d);const l=d.dir||d.root,n=d.base||`${d.name||""}${d.ext||""}`;return l?l===d.root?`${l}${n}`:`${l}${m}${n}`:n}e.win32={resolve(...m){let d="",l="",n=!1;for(let s=m.length-1;s>=-1;s--){let i;if(s>=0){if(i=m[s],u(i,"path"),i.length===0)continue}else d.length===0?i=E.cwd():(i=E.env[`=${d}`]||E.cwd(),(i===void 0||i.slice(0,2).toLowerCase()!==d.toLowerCase()&&i.charCodeAt(2)===S)&&(i=`${d}\\`));const o=i.length;let r=0,c="",a=!1;const y=i.charCodeAt(0);if(o===1)p(y)&&(r=1,a=!0);else if(p(y))if(a=!0,p(i.charCodeAt(1))){let M=2,T=M;for(;M2&&p(i.charCodeAt(2))&&(a=!0,r=3));if(c.length>0)if(d.length>0){if(c.toLowerCase()!==d.toLowerCase())continue}else d=c;if(n){if(d.length>0)break}else if(l=`${i.slice(r)}\\${l}`,n=a,a&&d.length>0)break}return l=h(l,!n,"\\",p),n?`${d}\\${l}`:`${d}${l}`||"."},normalize(m){u(m,"path");const d=m.length;if(d===0)return".";let l=0,n,s=!1;const i=m.charCodeAt(0);if(d===1)return w(i)?"\\":m;if(p(i))if(s=!0,p(m.charCodeAt(1))){let r=2,c=r;for(;r2&&p(m.charCodeAt(2))&&(s=!0,l=3));let o=l0&&p(m.charCodeAt(d-1))&&(o+="\\"),n===void 0?s?`\\${o}`:o:s?`${n}\\${o}`:`${n}${o}`},isAbsolute(m){u(m,"path");const d=m.length;if(d===0)return!1;const l=m.charCodeAt(0);return p(l)||d>2&&g(l)&&m.charCodeAt(1)===b&&p(m.charCodeAt(2))},join(...m){if(m.length===0)return".";let d,l;for(let i=0;i0&&(d===void 0?d=l=o:d+=`\\${o}`)}if(d===void 0)return".";let n=!0,s=0;if(typeof l=="string"&&p(l.charCodeAt(0))){++s;const i=l.length;i>1&&p(l.charCodeAt(1))&&(++s,i>2&&(p(l.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(d=`\\${d.slice(s)}`)}return e.win32.normalize(d)},relative(m,d){if(u(m,"from"),u(d,"to"),m===d)return"";const l=e.win32.resolve(m),n=e.win32.resolve(d);if(l===n||(m=l.toLowerCase(),d=n.toLowerCase(),m===d))return"";let s=0;for(;ss&&m.charCodeAt(i-1)===S;)i--;const o=i-s;let r=0;for(;rr&&d.charCodeAt(c-1)===S;)c--;const a=c-r,y=oy){if(d.charCodeAt(r+T)===S)return n.slice(r+T+1);if(T===2)return n.slice(r+T)}o>y&&(m.charCodeAt(s+T)===S?M=T:T===2&&(M=3)),M===-1&&(M=0)}let _="";for(T=s+M+1;T<=i;++T)(T===i||m.charCodeAt(T)===S)&&(_+=_.length===0?"..":"\\..");return r+=M,_.length>0?`${_}${n.slice(r,c)}`:(n.charCodeAt(r)===S&&++r,n.slice(r,c))},toNamespacedPath(m){if(typeof m!="string")return m;if(m.length===0)return"";const d=e.win32.resolve(m);if(d.length<=2)return m;if(d.charCodeAt(0)===S){if(d.charCodeAt(1)===S){const l=d.charCodeAt(2);if(l!==P&&l!==I)return`\\\\?\\UNC\\${d.slice(2)}`}}else if(g(d.charCodeAt(0))&&d.charCodeAt(1)===b&&d.charCodeAt(2)===S)return`\\\\?\\${d}`;return m},dirname(m){u(m,"path");const d=m.length;if(d===0)return".";let l=-1,n=0;const s=m.charCodeAt(0);if(d===1)return p(s)?m:".";if(p(s)){if(l=n=1,p(m.charCodeAt(1))){let r=2,c=r;for(;r2&&p(m.charCodeAt(2))?3:2,n=l);let i=-1,o=!0;for(let r=d-1;r>=n;--r)if(p(m.charCodeAt(r))){if(!o){i=r;break}}else o=!1;if(i===-1){if(l===-1)return".";i=l}return m.slice(0,i)},basename(m,d){d!==void 0&&u(d,"ext"),u(m,"path");let l=0,n=-1,s=!0,i;if(m.length>=2&&g(m.charCodeAt(0))&&m.charCodeAt(1)===b&&(l=2),d!==void 0&&d.length>0&&d.length<=m.length){if(d===m)return"";let o=d.length-1,r=-1;for(i=m.length-1;i>=l;--i){const c=m.charCodeAt(i);if(p(c)){if(!s){l=i+1;break}}else r===-1&&(s=!1,r=i+1),o>=0&&(c===d.charCodeAt(o)?--o===-1&&(n=i):(o=-1,n=r))}return l===n?n=r:n===-1&&(n=m.length),m.slice(l,n)}for(i=m.length-1;i>=l;--i)if(p(m.charCodeAt(i))){if(!s){l=i+1;break}}else n===-1&&(s=!1,n=i+1);return n===-1?"":m.slice(l,n)},extname(m){u(m,"path");let d=0,l=-1,n=0,s=-1,i=!0,o=0;m.length>=2&&m.charCodeAt(1)===b&&g(m.charCodeAt(0))&&(d=n=2);for(let r=m.length-1;r>=d;--r){const c=m.charCodeAt(r);if(p(c)){if(!i){n=r+1;break}continue}s===-1&&(i=!1,s=r+1),c===I?l===-1?l=r:o!==1&&(o=1):l!==-1&&(o=-1)}return l===-1||s===-1||o===0||o===1&&l===s-1&&l===n+1?"":m.slice(l,s)},format:v.bind(null,"\\"),parse(m){u(m,"path");const d={root:"",dir:"",base:"",ext:"",name:""};if(m.length===0)return d;const l=m.length;let n=0,s=m.charCodeAt(0);if(l===1)return p(s)?(d.root=d.dir=m,d):(d.base=d.name=m,d);if(p(s)){if(n=1,p(m.charCodeAt(1))){let M=2,T=M;for(;M0&&(d.root=m.slice(0,n));let i=-1,o=n,r=-1,c=!0,a=m.length-1,y=0;for(;a>=n;--a){if(s=m.charCodeAt(a),p(s)){if(!c){o=a+1;break}continue}r===-1&&(c=!1,r=a+1),s===I?i===-1?i=a:y!==1&&(y=1):i!==-1&&(y=-1)}return r!==-1&&(i===-1||y===0||y===1&&i===r-1&&i===o+1?d.base=d.name=m.slice(o,r):(d.name=m.slice(o,i),d.base=m.slice(o,r),d.ext=m.slice(i,r))),o>0&&o!==n?d.dir=m.slice(0,o-1):d.dir=d.root,d},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...m){let d="",l=!1;for(let n=m.length-1;n>=-1&&!l;n--){const s=n>=0?m[n]:E.cwd();u(s,"path"),s.length!==0&&(d=`${s}/${d}`,l=s.charCodeAt(0)===f)}return d=h(d,!l,"/",w),l?`/${d}`:d.length>0?d:"."},normalize(m){if(u(m,"path"),m.length===0)return".";const d=m.charCodeAt(0)===f,l=m.charCodeAt(m.length-1)===f;return m=h(m,!d,"/",w),m.length===0?d?"/":l?"./":".":(l&&(m+="/"),d?`/${m}`:m)},isAbsolute(m){return u(m,"path"),m.length>0&&m.charCodeAt(0)===f},join(...m){if(m.length===0)return".";let d;for(let l=0;l0&&(d===void 0?d=n:d+=`/${n}`)}return d===void 0?".":e.posix.normalize(d)},relative(m,d){if(u(m,"from"),u(d,"to"),m===d||(m=e.posix.resolve(m),d=e.posix.resolve(d),m===d))return"";const l=1,n=m.length,s=n-l,i=1,o=d.length-i,r=sr){if(d.charCodeAt(i+a)===f)return d.slice(i+a+1);if(a===0)return d.slice(i+a)}else s>r&&(m.charCodeAt(l+a)===f?c=a:a===0&&(c=0));let y="";for(a=l+c+1;a<=n;++a)(a===n||m.charCodeAt(a)===f)&&(y+=y.length===0?"..":"/..");return`${y}${d.slice(i+c)}`},toNamespacedPath(m){return m},dirname(m){if(u(m,"path"),m.length===0)return".";const d=m.charCodeAt(0)===f;let l=-1,n=!0;for(let s=m.length-1;s>=1;--s)if(m.charCodeAt(s)===f){if(!n){l=s;break}}else n=!1;return l===-1?d?"/":".":d&&l===1?"//":m.slice(0,l)},basename(m,d){d!==void 0&&u(d,"ext"),u(m,"path");let l=0,n=-1,s=!0,i;if(d!==void 0&&d.length>0&&d.length<=m.length){if(d===m)return"";let o=d.length-1,r=-1;for(i=m.length-1;i>=0;--i){const c=m.charCodeAt(i);if(c===f){if(!s){l=i+1;break}}else r===-1&&(s=!1,r=i+1),o>=0&&(c===d.charCodeAt(o)?--o===-1&&(n=i):(o=-1,n=r))}return l===n?n=r:n===-1&&(n=m.length),m.slice(l,n)}for(i=m.length-1;i>=0;--i)if(m.charCodeAt(i)===f){if(!s){l=i+1;break}}else n===-1&&(s=!1,n=i+1);return n===-1?"":m.slice(l,n)},extname(m){u(m,"path");let d=-1,l=0,n=-1,s=!0,i=0;for(let o=m.length-1;o>=0;--o){const r=m.charCodeAt(o);if(r===f){if(!s){l=o+1;break}continue}n===-1&&(s=!1,n=o+1),r===I?d===-1?d=o:i!==1&&(i=1):d!==-1&&(i=-1)}return d===-1||n===-1||i===0||i===1&&d===n-1&&d===l+1?"":m.slice(d,n)},format:v.bind(null,"/"),parse(m){u(m,"path");const d={root:"",dir:"",base:"",ext:"",name:""};if(m.length===0)return d;const l=m.charCodeAt(0)===f;let n;l?(d.root="/",n=1):n=0;let s=-1,i=0,o=-1,r=!0,c=m.length-1,a=0;for(;c>=n;--c){const y=m.charCodeAt(c);if(y===f){if(!r){i=c+1;break}continue}o===-1&&(r=!1,o=c+1),y===I?s===-1?s=c:a!==1&&(a=1):s!==-1&&(a=-1)}if(o!==-1){const y=i===0&&l?1:i;s===-1||a===0||a===1&&s===o-1&&s===i+1?d.base=d.name=m.slice(y,o):(d.name=m.slice(y,s),d.base=m.slice(y,o),d.ext=m.slice(s,o))}return i>0?d.dir=m.slice(0,i-1):l&&(d.dir="/"),d},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=E.platform==="win32"?e.win32.normalize:e.posix.normalize,e.isAbsolute=E.platform==="win32"?e.win32.isAbsolute:e.posix.isAbsolute,e.join=E.platform==="win32"?e.win32.join:e.posix.join,e.resolve=E.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=E.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=E.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=E.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=E.platform==="win32"?e.win32.extname:e.posix.extname,e.format=E.platform==="win32"?e.win32.format:e.posix.format,e.parse=E.platform==="win32"?e.win32.parse:e.posix.parse,e.toNamespacedPath=E.platform==="win32"?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=E.platform==="win32"?e.win32.sep:e.posix.sep,e.delimiter=E.platform==="win32"?e.win32.delimiter:e.posix.delimiter}),define(ee[80],ie([0,1,4]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var t;(function(I){I[I.stdout=0]="stdout",I[I.stderr=1]="stderr"})(t=e.Source||(e.Source={}));var k;(function(I){I[I.Success=0]="Success",I[I.Unknown=1]="Unknown",I[I.AccessDenied=2]="AccessDenied",I[I.ProcessNotFound=3]="ProcessNotFound"})(k=e.TerminateResponseCode||(e.TerminateResponseCode={}));function R(I,...f){const S=f.reduce((C,u)=>(C[u]=!0,C),{}),b=[/^ELECTRON_.+$/,/^VSCODE_(?!SHELL_LOGIN).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(I).filter(C=>!S[C]).forEach(C=>{for(let u=0;uk.Disposable.None;function a(H){if(f){const{onListenerDidAdd:X}=H,re=p.create();let B=0;H.onListenerDidAdd=()=>{++B===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),re.print()),X?.()}}}function y(H,X){return fe(H,()=>{},0,void 0,void 0,X)}c.defer=y;function M(H,X=0,re){return c.debounce(H,(B,x)=>B?(B.push(x),B):[x],X,void 0,void 0,re)}c.accumulate=M;function T(H){return(X,re=null,B)=>{let x=!1,Z;return Z=H(ce=>{if(!x)return Z?Z.dispose():x=!0,X.call(re,ce)},null,B),x&&Z.dispose(),Z}}c.once=T;function _(H,X,re){return ae((B,x=null,Z)=>H(ce=>B.call(x,X(ce)),null,Z),re)}c.map=_;function Y(H,X,re){return ae((B,x=null,Z)=>H(ce=>{X(ce),B.call(x,ce)},null,Z),re)}c.forEach=Y;function G(H,X,re){return ae((B,x=null,Z)=>H(ce=>X(ce)&&B.call(x,ce),null,Z),re)}c.filter=G;function V(H){return H}c.signal=V;function oe(...H){return(X,re=null,B)=>(0,k.combinedDisposable)(...H.map(x=>x(Z=>X.call(re,Z),null,B)))}c.any=oe;function se(H,X,re,B){let x=re;return _(H,Z=>(x=X(x,Z),x),B)}c.reduce=se;function ae(H,X){let re;const B={onFirstListenerAdd(){re=H(x.fire,x)},onLastListenerRemove(){re?.dispose()}};X||a(B);const x=new g(B);return X?.add(x),x.event}function fe(H,X,re=100,B=!1,x,Z){let ce,ge,De,Te=0;const Me={leakWarningThreshold:x,onFirstListenerAdd(){ce=H(ve=>{Te++,ge=X(ge,ve),B&&!De&&(Le.fire(ge),ge=void 0),clearTimeout(De),De=setTimeout(()=>{const pe=ge;ge=void 0,De=void 0,(!B||Te>1)&&Le.fire(pe),Te=0},re)})},onLastListenerRemove(){ce.dispose()}};Z||a(Me);const Le=new g(Me);return Z?.add(Le),Le.event}c.debounce=fe;function K(H,X=(B,x)=>B===x,re){let B=!0,x;return G(H,Z=>{const ce=B||!X(Z,x);return B=!1,x=Z,ce},re)}c.latch=K;function q(H,X,re){return[c.filter(H,X,re),c.filter(H,B=>!X(B),re)]}c.split=q;function F(H,X=!1,re=[]){let B=re.slice(),x=H(ge=>{B?B.push(ge):ce.fire(ge)});const Z=()=>{B?.forEach(ge=>ce.fire(ge)),B=null},ce=new g({onFirstListenerAdd(){x||(x=H(ge=>ce.fire(ge)))},onFirstListenerDidAdd(){B&&(X?setTimeout(Z):Z())},onLastListenerRemove(){x&&x.dispose(),x=null}});return ce.event}c.buffer=F;class A{constructor(X){this.event=X,this.disposables=new k.DisposableStore}map(X){return new A(_(this.event,X,this.disposables))}forEach(X){return new A(Y(this.event,X,this.disposables))}filter(X){return new A(G(this.event,X,this.disposables))}reduce(X,re){return new A(se(this.event,X,re,this.disposables))}latch(){return new A(K(this.event,void 0,this.disposables))}debounce(X,re=100,B=!1,x){return new A(fe(this.event,X,re,B,x,this.disposables))}on(X,re,B){return this.event(X,re,B)}once(X,re,B){return T(this.event)(X,re,B)}dispose(){this.disposables.dispose()}}function O(H){return new A(H)}c.chain=O;function U(H,X,re=B=>B){const B=(...ge)=>ce.fire(re(...ge)),x=()=>H.on(X,B),Z=()=>H.removeListener(X,B),ce=new g({onFirstListenerAdd:x,onLastListenerRemove:Z});return ce.event}c.fromNodeEventEmitter=U;function ne(H,X,re=B=>B){const B=(...ge)=>ce.fire(re(...ge)),x=()=>H.addEventListener(X,B),Z=()=>H.removeEventListener(X,B),ce=new g({onFirstListenerAdd:x,onLastListenerRemove:Z});return ce.event}c.fromDOMEventEmitter=ne;function N(H){return new Promise(X=>T(H)(X))}c.toPromise=N;function $(H,X){return X(void 0),H(re=>X(re))}c.runAndSubscribe=$;function L(H,X){let re=null;function B(Z){re?.dispose(),re=new k.DisposableStore,X(Z,re)}B(void 0);const x=H(Z=>B(Z));return(0,k.toDisposable)(()=>{x.dispose(),re?.dispose()})}c.runAndSubscribeWithStore=L;class W{constructor(X,re){this.obs=X,this._counter=0,this._hasChanged=!1;const B={onFirstListenerAdd:()=>{X.addObserver(this)},onLastListenerRemove:()=>{X.removeObserver(this)}};re||a(B),this.emitter=new g(B),re&&re.add(this.emitter)}beginUpdate(X){this._counter++}handleChange(X,re){this._hasChanged=!0}endUpdate(X){--this._counter===0&&this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this.obs.get()))}}function j(H,X){return new W(H,X).emitter.event}c.fromObservable=j})(S=e.Event||(e.Event={}));class b{constructor(a){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${a}_${b._idPool++}`,b.all.add(this)}start(a){this._stopWatch=new D.StopWatch(!0),this.listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this.durations.push(a),this.elapsedOverall+=a,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=b,b.all=new Set,b._idPool=0;let P=-1;function C(c){const a=P;return P=c,{dispose(){P=a}}}e.setGlobalLeakWarningThreshold=C;class u{constructor(a,y=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=y,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a,y){let M=P;if(typeof this.customThreshold=="number"&&(M=this.customThreshold),M<=0||y{const _=this._stacks.get(a.value)||0;this._stacks.set(a.value,_-1)}}}class p{static create(){return new p(new Error().stack??"")}constructor(a){this.value=a}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class w{constructor(a,y,M){this.callback=a,this.callbackThis=y,this.stack=M,this.subscription=new k.SafeDisposable}invoke(a){this.callback.call(this.callbackThis,a)}}class g{constructor(a){this._disposed=!1,this._options=a,this._leakageMon=P>0?new u(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=this._options?._profName?new b(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._listeners){if(I){const a=Array.from(this._listeners);queueMicrotask(()=>{for(const y of a)y.subscription.isset()&&(y.subscription.unset(),y.stack?.print())})}this._listeners.clear()}this._deliveryQueue?.clear(this),this._options?.onLastListenerRemove?.(),this._leakageMon?.dispose()}}get event(){return this._event||(this._event=(a,y,M)=>{this._listeners||(this._listeners=new R.LinkedList);const T=this._listeners.isEmpty();T&&this._options?.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);let _,Y;this._leakageMon&&this._listeners.size>=30&&(Y=p.create(),_=this._leakageMon.check(Y,this._listeners.size+1)),I&&(Y=Y??p.create());const G=new w(a,y,Y),V=this._listeners.push(G);T&&this._options?.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options?.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,y);const oe=G.subscription.set(()=>{_?.(),this._disposed||(V(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return M instanceof k.DisposableStore?M.add(oe):Array.isArray(M)&&M.push(oe),oe}),this._event}fire(a){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new v);for(const y of this._listeners)this._deliveryQueue.push(this,y,a);this._perfMon?.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),this._perfMon?.stop()}}hasListeners(){return this._listeners?!this._listeners.isEmpty():!1}}e.Emitter=g;class h{constructor(){this._queue=new R.LinkedList}get size(){return this._queue.size}push(a,y,M){this._queue.push(new m(a,y,M))}clear(a){const y=new R.LinkedList;for(const M of this._queue)M.emitter!==a&&y.push(M);this._queue=y}deliver(){for(;this._queue.size>0;){const a=this._queue.shift();try{a.listener.invoke(a.event)}catch(y){(0,E.onUnexpectedError)(y)}}}}e.EventDeliveryQueue=h;class v extends h{clear(a){this._queue.clear()}}class m{constructor(a,y,M){this.emitter=a,this.listener=y,this.event=M}}class d extends g{async fireAsync(a,y,M){if(!!this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new R.LinkedList);for(const T of this._listeners)this._asyncDeliveryQueue.push([T,a]);for(;this._asyncDeliveryQueue.size>0&&!y.isCancellationRequested;){const[T,_]=this._asyncDeliveryQueue.shift(),Y=[],G={..._,token:y,waitUntil:V=>{if(Object.isFrozen(Y))throw new Error("waitUntil can NOT be called asynchronous");M&&(V=M(V,T.callback)),Y.push(V)}};try{T.invoke(G)}catch(V){(0,E.onUnexpectedError)(V);continue}Object.freeze(Y),await Promise.allSettled(Y).then(V=>{for(const oe of V)oe.status==="rejected"&&(0,E.onUnexpectedError)(oe.reason)})}}}}e.AsyncEmitter=d;class l extends g{constructor(a){super(a),this._isPaused=0,this._eventQueue=new R.LinkedList,this._mergeFn=a?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}e.PauseableEmitter=l;class n extends l{constructor(a){super(a),this._delay=a.delay??100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}e.DebounceEmitter=n;class s extends g{constructor(a){super(a),this._queuedEvents=[],this._mergeFn=a?.merge}fire(a){!this.hasListeners()||(this._queuedEvents.push(a),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(y=>super.fire(y)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=s;class i{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new g({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(a){const y={event:a,listener:null};this.events.push(y),this.hasListeners&&this.hook(y);const M=()=>{this.hasListeners&&this.unhook(y);const T=this.events.indexOf(y);this.events.splice(T,1)};return(0,k.toDisposable)((0,t.once)(M))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(a=>this.hook(a))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(a=>this.unhook(a))}hook(a){a.listener=a.event(y=>this.emitter.fire(y))}unhook(a){a.listener&&a.listener.dispose(),a.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=i;class o{constructor(){this.buffers=[]}wrapEvent(a){return(y,M,T)=>a(_=>{const Y=this.buffers[this.buffers.length-1];Y?Y.push(()=>y.call(M,_)):y.call(M,_)},void 0,T)}bufferEvents(a){const y=[];this.buffers.push(y);const M=a();return this.buffers.pop(),y.forEach(T=>T()),M}}e.EventBufferer=o;class r{constructor(){this.listening=!1,this.inputEvent=S.None,this.inputEventListener=k.Disposable.None,this.emitter=new g({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=r}),define(ee[22],ie([0,1,3]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const t=Object.freeze(function(I,f){const S=setTimeout(I.bind(f),0);return{dispose(){clearTimeout(S)}}});var k;(function(I){function f(S){return S===I.None||S===I.Cancelled||S instanceof R?!0:!S||typeof S!="object"?!1:typeof S.isCancellationRequested=="boolean"&&typeof S.onCancellationRequested=="function"}I.isCancellationToken=f,I.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:E.Event.None}),I.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:t})})(k=e.CancellationToken||(e.CancellationToken={}));class R{constructor(){this._isCancelled=!1,this._emitter=null}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?t:(this._emitter||(this._emitter=new E.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class D{constructor(f){this._token=void 0,this._parentListener=void 0,this._parentListener=f&&f.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new R),this._token}cancel(){this._token?this._token instanceof R&&this._token.cancel():this._token=k.Cancelled}dispose(f=!1){f&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof R&&this._token.dispose():this._token=k.None}}e.CancellationTokenSource=D}),define(ee[137],ie([0,1,22]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class t{constructor(I){this.task=I,this.result=null}get(){if(this.result)return this.result;const I=new E.CancellationTokenSource,f=this.task(I.token);return this.result={promise:f,dispose:()=>{this.result=null,I.cancel(),I.dispose()}},this.result}}e.Cache=t;class k{constructor(I){this.fn=I,this.lastCache=void 0,this.lastArgKey=void 0}get(I){const f=JSON.stringify(I);return this.lastArgKey!==f&&(this.lastArgKey=f,this.lastCache=this.fn(I)),this.lastCache}}e.LRUCachedFunction=k;class R{get cachedValues(){return this._map}constructor(I){this.fn=I,this._map=new Map}get(I){if(this._map.has(I))return this._map.get(I);const f=this.fn(I);return this._map.set(I,f),f}}e.CachedFunction=R}),define(ee[97],ie([0,1,3,2]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const k=D=>({onDidChange:E.Event.None,value:D});e.staticObservableValue=k;class R extends t.Disposable{get value(){return this._value}set value(I){I!==this._value&&(this._value=I,this.changeEmitter.fire(I))}constructor(I){super(),this._value=I,this.changeEmitter=this._register(new E.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=R}),define(ee[25],ie([0,1,137,124]),function(z,e,E,t){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.charCount=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpContainsBackreference=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function R(Q){return!Q||typeof Q!="string"?!0:Q.trim().length===0}e.isFalsyOrWhitespace=R;const D=/{(\d+)}/g;function I(Q,...le){return le.length===0?Q:Q.replace(D,function(de,me){const Ee=parseInt(me,10);return isNaN(Ee)||Ee<0||Ee>=le.length?de:le[Ee]})}e.format=I;const f=/{([^}]+)}/g;function S(Q,le){return Q.replace(f,(de,me)=>le[me]??de)}e.format2=S;function b(Q){return Q.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}e.escape=b;function P(Q){return Q.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=P;function C(Q,le){let de=0;const me=le.charCodeAt(0);for(let Ee=Q.length-1;Ee>=0;Ee--)Q.charCodeAt(Ee)===me&&de++;return de}e.count=C;function u(Q,le,de="\u2026"){return Q.length<=le?Q:`${Q.substr(0,le)}${de}`}e.truncate=u;function p(Q,le=" "){const de=w(Q,le);return g(de,le)}e.trim=p;function w(Q,le){if(!Q||!le)return Q;const de=le.length;if(de===0||Q.length===0)return Q;let me=0;for(;Q.indexOf(le,me)===me;)me=me+de;return Q.substring(me)}e.ltrim=w;function g(Q,le){if(!Q||!le)return Q;const de=le.length,me=Q.length;if(de===0||me===0)return Q;let Ee=me,Ae=-1;for(;Ae=Q.lastIndexOf(le,Ee-1),!(Ae===-1||Ae+de!==Ee);){if(Ae===0)return"";Ee=Ae}return Q.substring(0,Ee)}e.rtrim=g;function h(Q){return Q.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=h;function v(Q){return Q.replace(/\*/g,"")}e.stripWildcards=v;function m(Q,le,de={}){if(!Q)throw new Error("Cannot create regex from empty string");le||(Q=P(Q)),de.wholeWord&&(/\B/.test(Q.charAt(0))||(Q="\\b"+Q),/\B/.test(Q.charAt(Q.length-1))||(Q=Q+"\\b"));let me="";return de.global&&(me+="g"),de.matchCase||(me+="i"),de.multiline&&(me+="m"),de.unicode&&(me+="u"),new RegExp(Q,me)}e.createRegExp=m;function d(Q){return Q.source==="^"||Q.source==="^$"||Q.source==="$"||Q.source==="^\\s*$"?!1:!!(Q.exec("")&&Q.lastIndex===0)}e.regExpLeadsToEndlessLoop=d;function l(Q){return!!Q.match(/([^\\]|^)(\\\\)*\\\d+/)}e.regExpContainsBackreference=l;function n(Q){return(Q.global?"g":"")+(Q.ignoreCase?"i":"")+(Q.multiline?"m":"")+(Q.unicode?"u":"")}e.regExpFlags=n;function s(Q){return Q.split(/\r\n|\r|\n/)}e.splitLines=s;function i(Q){for(let le=0,de=Q.length;le=0;de--){const me=Q.charCodeAt(de);if(me!==32&&me!==9)return de}return-1}e.lastNonWhitespaceIndex=r;function c(Q,le,de){const me=[];let Ee=0;for(const Ae of Q.matchAll(le)){if(me.push(Q.slice(Ee,Ae.index)),Ae.index===void 0)throw new Error("match.index should be defined");Ee=Ae.index+Ae[0].length,me.push(de(Ae[0],...Ae.slice(1),Ae.index,Q,Ae.groups))}return me.push(Q.slice(Ee)),Promise.all(me).then(Ae=>Ae.join(""))}e.replaceAsync=c;function a(Q,le){return Qle?1:0}e.compare=a;function y(Q,le,de=0,me=Q.length,Ee=0,Ae=le.length){for(;deqe)return 1}const Ue=me-de,it=Ae-Ee;return Ueit?1:0}e.compareSubstring=y;function M(Q,le){return T(Q,le,0,Q.length,0,le.length)}e.compareIgnoreCase=M;function T(Q,le,de=0,me=Q.length,Ee=0,Ae=le.length){for(;de=128||qe>=128)return y(Q.toLowerCase(),le.toLowerCase(),de,me,Ee,Ae);Y(xe)&&(xe-=32),Y(qe)&&(qe-=32);const et=xe-qe;if(et!==0)return et}const Ue=me-de,it=Ae-Ee;return Ueit?1:0}e.compareSubstringIgnoreCase=T;function _(Q){return Q>=48&&Q<=57}e.isAsciiDigit=_;function Y(Q){return Q>=97&&Q<=122}e.isLowerAsciiLetter=Y;function G(Q){return Q>=65&&Q<=90}e.isUpperAsciiLetter=G;function V(Q,le){return Q.length===le.length&&T(Q,le)===0}e.equalsIgnoreCase=V;function oe(Q,le){const de=le.length;return le.length>Q.length?!1:T(Q,le,0,de)===0}e.startsWithIgnoreCase=oe;function se(Q,le){const de=Math.min(Q.length,le.length);let me;for(me=0;me1){const me=Q.charCodeAt(le-2);if(fe(me))return q(me,de)}return de}class O{get offset(){return this._offset}constructor(le,de=0){this._str=le,this._len=le.length,this._offset=de}setOffset(le){this._offset=le}prevCodePoint(){const le=A(this._str,this._offset);return this._offset-=le>=65536?2:1,le}nextCodePoint(){const le=F(this._str,this._len,this._offset);return this._offset+=le>=65536?2:1,le}eol(){return this._offset>=this._len}}e.CodePointIterator=O;class U{get offset(){return this._iterator.offset}constructor(le,de=0){this._iterator=new O(le,de)}nextGraphemeLength(){const le=Fe.getInstance(),de=this._iterator,me=de.offset;let Ee=le.getGraphemeBreakType(de.nextCodePoint());for(;!de.eol();){const Ae=de.offset,Ue=le.getGraphemeBreakType(de.nextCodePoint());if(ye(Ee,Ue)){de.setOffset(Ae);break}Ee=Ue}return de.offset-me}prevGraphemeLength(){const le=Fe.getInstance(),de=this._iterator,me=de.offset;let Ee=le.getGraphemeBreakType(de.prevCodePoint());for(;de.offset>0;){const Ae=de.offset,Ue=le.getGraphemeBreakType(de.prevCodePoint());if(ye(Ue,Ee)){de.setOffset(Ae);break}Ee=Ue}return me-de.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=U;function ne(Q,le){return new U(Q,le).nextGraphemeLength()}e.nextCharLength=ne;function N(Q,le){return new U(Q,le).prevGraphemeLength()}e.prevCharLength=N;function $(Q,le){le>0&&K(Q.charCodeAt(le))&&le--;const de=le+ne(Q,le);return[de-N(Q,de),de]}e.getCharContainingOffset=$;function L(Q){const le=new U(Q);let de=0;for(;!le.eol();)de++,le.nextGraphemeLength();return de}e.charCount=L;let W;function j(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function H(Q){return W||(W=j()),W.test(Q)}e.containsRTL=H;const X=/^[\t\n\r\x20-\x7E]*$/;function re(Q){return X.test(Q)}e.isBasicASCII=re,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function B(Q){return e.UNUSUAL_LINE_TERMINATORS.test(Q)}e.containsUnusualLineTerminators=B;function x(Q){return Q>=11904&&Q<=55215||Q>=63744&&Q<=64255||Q>=65281&&Q<=65374}e.isFullWidthCharacter=x;function Z(Q){return Q>=127462&&Q<=127487||Q===8986||Q===8987||Q===9200||Q===9203||Q>=9728&&Q<=10175||Q===11088||Q===11093||Q>=127744&&Q<=128591||Q>=128640&&Q<=128764||Q>=128992&&Q<=129008||Q>=129280&&Q<=129535||Q>=129648&&Q<=129782}e.isEmojiImprecise=Z;function ce(Q,le){if(Q.length0&&Q.charCodeAt(0)===65279)}e.startsWithUTF8BOM=Le;function ve(Q){return Le(Q)?Q.substr(1):Q}e.stripUTF8BOM=ve;function pe(Q,le){if(!Q||!le||Q.length0&&de>=0);return de===-1?Q:(Q[de-1]==="\r"&&de--,Q.substr(0,de))}e.getNLines=J;function ue(Q){return Q=Q%(2*26),Q<26?String.fromCharCode(97+Q):String.fromCharCode(65+Q-26)}e.singleLetterHash=ue;function he(Q){return Fe.getInstance().getGraphemeBreakType(Q)}e.getGraphemeBreakType=he;function ye(Q,le){return Q===0?le!==5&&le!==7:Q===2&&le===3?!1:Q===4||Q===2||Q===3||le===4||le===2||le===3?!0:!(Q===8&&(le===8||le===9||le===11||le===12)||(Q===11||Q===9)&&(le===9||le===10)||(Q===12||Q===10)&&le===10||le===5||le===13||le===7||Q===1||Q===13&&le===14||Q===6&&le===6)}var Ce;(function(Q){Q[Q.Other=0]="Other",Q[Q.Prepend=1]="Prepend",Q[Q.CR=2]="CR",Q[Q.LF=3]="LF",Q[Q.Control=4]="Control",Q[Q.Extend=5]="Extend",Q[Q.Regional_Indicator=6]="Regional_Indicator",Q[Q.SpacingMark=7]="SpacingMark",Q[Q.L=8]="L",Q[Q.V=9]="V",Q[Q.T=10]="T",Q[Q.LV=11]="LV",Q[Q.LVT=12]="LVT",Q[Q.ZWJ=13]="ZWJ",Q[Q.Extended_Pictographic=14]="Extended_Pictographic"})(Ce=e.GraphemeBreakType||(e.GraphemeBreakType={}));class Fe{static getInstance(){return Fe._INSTANCE||(Fe._INSTANCE=new Fe),Fe._INSTANCE}constructor(){this._data=Oe()}getGraphemeBreakType(le){if(le<32)return le===10?3:le===13?2:4;if(le<127)return 0;const de=this._data,me=de.length/3;let Ee=1;for(;Ee<=me;)if(lede[3*Ee+1])Ee=2*Ee+1;else return de[3*Ee+2];return 0}}Fe._INSTANCE=null;function Oe(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function $e(Q,le){if(Q===0)return 0;const de=Ne(Q,le);if(de!==void 0)return de;const me=new O(le,Q);return me.prevCodePoint(),me.offset}e.getLeftDeleteOffset=$e;function Ne(Q,le){const de=new O(le,Q);let me=de.prevCodePoint();for(;je(me)||me===65039||me===8419;){if(de.offset===0)return;me=de.prevCodePoint()}if(!Z(me))return;let Ee=de.offset;return Ee>0&&de.prevCodePoint()===8205&&(Ee=de.offset),Ee}function je(Q){return 127995<=Q&&Q<=127999}var Qe;(function(Q){Q[Q.zwj=8205]="zwj",Q[Q.emojiVariantSelector=65039]="emojiVariantSelector",Q[Q.enclosingKeyCap=8419]="enclosingKeyCap"})(Qe||(Qe={})),e.noBreakWhitespace="\xA0";class Be{static getInstance(le){return Be.cache.get(Array.from(le))}static getLocales(){return Be._locales.getValue()}constructor(le){this.confusableDictionary=le}isAmbiguous(le){return this.confusableDictionary.has(le)}getPrimaryConfusable(le){return this.confusableDictionary.get(le)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Be,k=Be,Be.ambiguousCharacterData=new t.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),Be.cache=new E.LRUCachedFunction(Q=>{function le(qe){const et=new Map;for(let nt=0;nt!qe.startsWith("_")&&qe in Ee);Ae.length===0&&(Ae=["_default"]);let Ue;for(const qe of Ae){const et=le(Ee[qe]);Ue=me(Ue,et)}const it=le(Ee._common),xe=de(it,Ue);return new Be(xe)}),Be._locales=new t.Lazy(()=>Object.keys(Be.ambiguousCharacterData.getValue()).filter(Q=>!Q.startsWith("_")));class Ge{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Ge.getRawData())),this._data}static isInvisibleCharacter(le){return Ge.getData().has(le)}static get codePoints(){return Ge.getData()}}e.InvisibleCharacters=Ge,Ge._data=void 0}),define(ee[30],ie([0,1,9,4,25,12]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function D(r){return r===47||r===92}e.isPathSeparator=D;function I(r){return r.replace(/[\\/]/g,E.posix.sep)}e.toSlashes=I;function f(r){return r.indexOf("/")===-1&&(r=I(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}e.toPosixPath=f;function S(r,c=E.posix.sep){if(!r)return"";const a=r.length,y=r.charCodeAt(0);if(D(y)){if(D(r.charCodeAt(1))&&!D(r.charCodeAt(2))){let T=3;const _=T;for(;T\|]/g,C=/[\\/]/g,u=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function p(r,c=t.isWindows){const a=c?P:C;return!(!r||r.length===0||/^\s+$/.test(r)||(a.lastIndex=0,a.test(r))||c&&u.test(r)||r==="."||r===".."||c&&r[r.length-1]==="."||c&&r.length!==r.trim().length||r.length>255)}e.isValidBasename=p;function w(r,c,a){const y=r===c;return!a||y?y:!r||!c?!1:(0,k.equalsIgnoreCase)(r,c)}e.isEqual=w;function g(r,c,a,y=E.sep){if(r===c)return!0;if(!r||!c||c.length>r.length)return!1;if(a){if(!(0,k.startsWithIgnoreCase)(r,c))return!1;if(c.length===r.length)return!0;let T=c.length;return c.charAt(c.length-1)===y&&T--,r.charAt(T)===y}return c.charAt(c.length-1)!==y&&(c+=y),r.indexOf(c)===0}e.isEqualOrParent=g;function h(r){return r>=65&&r<=90||r>=97&&r<=122}e.isWindowsDriveLetter=h;function v(r,c){return t.isWindows&&r.endsWith(":")&&(r+=E.sep),(0,E.isAbsolute)(r)||(r=(0,E.join)(c,r)),r=(0,E.normalize)(r),t.isWindows?(r=(0,k.rtrim)(r,E.sep),r.endsWith(":")&&(r+=E.sep)):(r=(0,k.rtrim)(r,E.sep),r||(r=E.sep)),r}e.sanitizeFilePath=v;function m(r){const c=(0,E.normalize)(r);return t.isWindows?r.length>3?!1:d(c)&&(r.length===2||c.charCodeAt(2)===92):c===E.posix.sep}e.isRootOrDriveLetter=m;function d(r,c=t.isWindows){return c?h(r.charCodeAt(0))&&r.charCodeAt(1)===58:!1}e.hasDriveLetter=d;function l(r){return d(r)?r[0]:void 0}e.getDriveLetter=l;function n(r,c,a){return c.length>r.length?-1:r===c?0:(a&&(r=r.toLowerCase(),c=c.toLowerCase()),r.indexOf(c))}e.indexOfPath=n;function s(r){const c=r.split(":");let a,y,M;for(const T of c){const _=Number(T);(0,R.isNumber)(_)?y===void 0?y=_:M===void 0&&(M=_):a=a?[a,T].join(":"):T}if(!a)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:a,line:y!==void 0?y:void 0,column:M!==void 0?M:y!==void 0?1:void 0}}e.parseLineAndColumnAware=s;const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function o(r,c,a=8){let y="";for(let T=0;Tk(d,m),v)}function S(h,v){return v=R(181387,v),Object.keys(h).sort().reduce((m,d)=>(m=I(d,m),k(h[d],m)),v)}class b{constructor(){this._value=0}get value(){return this._value}hash(v){return this._value=k(v,this._value),this._value}}e.Hasher=b;var P;(function(h){h[h.BLOCK_SIZE=64]="BLOCK_SIZE",h[h.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(P||(P={}));function C(h,v,m=32){const d=m-v,l=~((1<>>d)>>>0}function u(h,v=0,m=h.byteLength,d=0){for(let l=0;lm.toString(16).padStart(2,"0")).join(""):p((h>>>0).toString(16),v/4)}e.toHexString=w;class g{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(v){const m=v.length;if(m===0)return;const d=this._buff;let l=this._buffLen,n=this._leftoverHighSurrogate,s,i;for(n!==0?(s=n,i=-1,n=0):(s=v.charCodeAt(0),i=0);;){let o=s;if(E.isHighSurrogate(s))if(i+1>>6,v[m++]=128|(d&63)>>>0):d<65536?(v[m++]=224|(d&61440)>>>12,v[m++]=128|(d&4032)>>>6,v[m++]=128|(d&63)>>>0):(v[m++]=240|(d&1835008)>>>18,v[m++]=128|(d&258048)>>>12,v[m++]=128|(d&4032)>>>6,v[m++]=128|(d&63)>>>0),m>=64&&(this._step(),m-=64,this._totalLen+=64,v[0]=v[64+0],v[1]=v[64+1],v[2]=v[64+2]),m}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),w(this._h0)+w(this._h1)+w(this._h2)+w(this._h3)+w(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const v=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(v/4294967296),!1),this._buffDV.setUint32(60,v%4294967296,!1),this._step()}_step(){const v=g._bigBlock32,m=this._buffDV;for(let a=0;a<64;a+=4)v.setUint32(a,m.getUint32(a,!1),!1);for(let a=64;a<320;a+=4)v.setUint32(a,C(v.getUint32(a-12,!1)^v.getUint32(a-32,!1)^v.getUint32(a-56,!1)^v.getUint32(a-64,!1),1),!1);let d=this._h0,l=this._h1,n=this._h2,s=this._h3,i=this._h4,o,r,c;for(let a=0;a<80;a++)a<20?(o=l&n|~l&s,r=1518500249):a<40?(o=l^n^s,r=1859775393):a<60?(o=l&n|l&s|n&s,r=2400959708):(o=l^n^s,r=3395469782),c=C(d,5)+o+i+r+v.getUint32(a*4,!1)&4294967295,i=s,s=n,n=C(l,30),l=d,d=c;this._h0=this._h0+d&4294967295,this._h1=this._h1+l&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+i&4294967295}}e.StringSHA1=g,g._bigBlock32=new DataView(new ArrayBuffer(320))}),define(ee[98],ie([0,1,25]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;(function(k){k[k.Ignore=0]="Ignore",k[k.Info=1]="Info",k[k.Warning=2]="Warning",k[k.Error=3]="Error"})(t||(t={})),function(k){const R="error",D="warning",I="warn",f="info",S="ignore";function b(C){return C?E.equalsIgnoreCase(R,C)?k.Error:E.equalsIgnoreCase(D,C)||E.equalsIgnoreCase(I,C)?k.Warning:E.equalsIgnoreCase(f,C)?k.Info:k.Ignore:k.Ignore}k.fromValue=b;function P(C){switch(C){case k.Error:return R;case k.Warning:return D;case k.Info:return f;default:return S}}k.toString=P}(t||(t={})),e.default=t}),define(ee[58],ie([0,1,24,25]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class k{constructor(){this._value="",this._pos=0}reset(u){return this._value=u,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;p--,this._valueLen--){const w=this._value.charCodeAt(p);if(!(w===47||this._splitOnBackslash&&w===92))break}return this.next()}hasNext(){return this._to!1,p=()=>!1){return new P(new f(u,p))}static forPaths(u=!1){return new P(new D(void 0,!u))}static forStrings(){return new P(new k)}static forConfigKeys(){return new P(new R)}constructor(u){this._iter=u}clear(){this._root=void 0}fill(u,p){if(p){const w=p.slice(0);(0,E.shuffle)(w);for(const g of w)this.set(g,u)}else{const w=u.slice(0);(0,E.shuffle)(w);for(const g of w)this.set(g[0],g[1])}}set(u,p){const w=this._iter.reset(u);let g;this._root||(this._root=new S,this._root.segment=w.value());const h=[];for(g=this._root;;){const m=w.cmp(g.segment);if(m>0)g.left||(g.left=new S,g.left.segment=w.value()),h.push([-1,g]),g=g.left;else if(m<0)g.right||(g.right=new S,g.right.segment=w.value()),h.push([1,g]),g=g.right;else if(w.hasNext())w.next(),g.mid||(g.mid=new S,g.mid.segment=w.value()),h.push([0,g]),g=g.mid;else break}const v=g.value;g.value=p,g.key=u;for(let m=h.length-1;m>=0;m--){const d=h[m][1];d.updateHeight();const l=d.balanceFactor();if(l<-1||l>1){const n=h[m][0],s=h[m+1][0];if(n===1&&s===1)h[m][1]=d.rotateLeft();else if(n===-1&&s===-1)h[m][1]=d.rotateRight();else if(n===1&&s===-1)d.right=h[m+1][1]=h[m+1][1].rotateRight(),h[m][1]=d.rotateLeft();else if(n===-1&&s===1)d.left=h[m+1][1]=h[m+1][1].rotateLeft(),h[m][1]=d.rotateRight();else throw new Error;if(m>0)switch(h[m-1][0]){case-1:h[m-1][1].left=h[m][1];break;case 1:h[m-1][1].right=h[m][1];break;case 0:h[m-1][1].mid=h[m][1];break}else this._root=h[0][1]}}return v}get(u){return this._getNode(u)?.value}_getNode(u){const p=this._iter.reset(u);let w=this._root;for(;w;){const g=p.cmp(w.segment);if(g>0)w=w.left;else if(g<0)w=w.right;else if(p.hasNext())p.next(),w=w.mid;else break}return w}has(u){const p=this._getNode(u);return!(p?.value===void 0&&p?.mid===void 0)}delete(u){return this._delete(u,!1)}deleteSuperstr(u){return this._delete(u,!0)}_delete(u,p){const w=this._iter.reset(u),g=[];let h=this._root;for(;h;){const v=w.cmp(h.segment);if(v>0)g.push([-1,h]),h=h.left;else if(v<0)g.push([1,h]),h=h.right;else if(w.hasNext())w.next(),g.push([0,h]),h=h.mid;else break}if(!!h){if(p?(h.left=void 0,h.mid=void 0,h.right=void 0,h.height=1):(h.key=void 0,h.value=void 0),!h.mid&&!h.value)if(h.left&&h.right){const v=this._min(h.right);if(v.key){const{key:m,value:d,segment:l}=v;this._delete(v.key,!1),h.key=m,h.value=d,h.segment=l}}else{const v=h.left??h.right;if(g.length>0){const[m,d]=g[g.length-1];switch(m){case-1:d.left=v;break;case 0:d.mid=v;break;case 1:d.right=v;break}}else this._root=v}for(let v=g.length-1;v>=0;v--){const m=g[v][1];m.updateHeight();const d=m.balanceFactor();if(d>1?(m.right.balanceFactor()>=0||(m.right=m.right.rotateRight()),g[v][1]=m.rotateLeft()):d<-1&&(m.left.balanceFactor()<=0||(m.left=m.left.rotateLeft()),g[v][1]=m.rotateRight()),v>0)switch(g[v-1][0]){case-1:g[v-1][1].left=g[v][1];break;case 1:g[v-1][1].right=g[v][1];break;case 0:g[v-1][1].mid=g[v][1];break}else this._root=g[0][1]}}}_min(u){for(;u.left;)u=u.left;return u}findSubstr(u){const p=this._iter.reset(u);let w=this._root,g;for(;w;){const h=p.cmp(w.segment);if(h>0)w=w.left;else if(h<0)w=w.right;else if(p.hasNext())p.next(),g=w.value||g,w=w.mid;else break}return w&&w.value||g}findSuperstr(u){const p=this._iter.reset(u);let w=this._root;for(;w;){const g=p.cmp(w.segment);if(g>0)w=w.left;else if(g<0)w=w.right;else if(p.hasNext())p.next(),w=w.mid;else return w.mid?this._entries(w.mid):void 0}}forEach(u){for(const[p,w]of this)u(w,p)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(u){const p=[];return this._dfsEntries(u,p),p[Symbol.iterator]()}_dfsEntries(u,p){!u||(u.left&&this._dfsEntries(u.left,p),u.value&&p.push([u.key,u.value]),u.mid&&this._dfsEntries(u.mid,p),u.right&&this._dfsEntries(u.right,p))}_isBalanced(){const u=p=>{if(!p)return!0;const w=p.balanceFactor();return w<-1||w>1?!1:u(p.left)&&u(p.right)};return u(this._root)}}e.TernarySearchTree=P}),define(ee[7],ie([0,1,9,4]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const k=/^\w[\w\d+.-]*$/,R=/^\//,D=/^\/\//;function I(i,o){if(!i.scheme&&o)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!k.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!R.test(i.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(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function f(i,o){return!i&&!o?"file":i}function S(i,o){switch(i){case"https":case"http":case"file":o?o[0]!==P&&(o=P+o):o=P;break}return o}const b="",P="/",C=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(o){return o instanceof u?!0:o?typeof o.authority=="string"&&typeof o.fragment=="string"&&typeof o.path=="string"&&typeof o.query=="string"&&typeof o.scheme=="string"&&typeof o.fsPath=="string"&&typeof o.with=="function"&&typeof o.toString=="function":!1}constructor(o,r,c,a,y,M=!1){typeof o=="object"?(this.scheme=o.scheme||b,this.authority=o.authority||b,this.path=o.path||b,this.query=o.query||b,this.fragment=o.fragment||b):(this.scheme=f(o,M),this.authority=r||b,this.path=S(this.scheme,c||b),this.query=a||b,this.fragment=y||b,I(this,M))}get fsPath(){return m(this,!1)}with(o){if(!o)return this;let{scheme:r,authority:c,path:a,query:y,fragment:M}=o;return r===void 0?r=this.scheme:r===null&&(r=b),c===void 0?c=this.authority:c===null&&(c=b),a===void 0?a=this.path:a===null&&(a=b),y===void 0?y=this.query:y===null&&(y=b),M===void 0?M=this.fragment:M===null&&(M=b),r===this.scheme&&c===this.authority&&a===this.path&&y===this.query&&M===this.fragment?this:new w(r,c,a,y,M)}static parse(o,r=!1){const c=C.exec(o);return c?new w(c[2]||b,s(c[4]||b),s(c[5]||b),s(c[7]||b),s(c[9]||b),r):new w(b,b,b,b,b)}static file(o){let r=b;if(t.isWindows&&(o=o.replace(/\\/g,P)),o[0]===P&&o[1]===P){const c=o.indexOf(P,2);c===-1?(r=o.substring(2),o=P):(r=o.substring(2,c),o=o.substring(c)||P)}return new w("file",r,o,b,b)}static from(o){const r=new w(o.scheme,o.authority,o.path,o.query,o.fragment);return I(r,!0),r}static joinPath(o,...r){if(!o.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let c;return t.isWindows&&o.scheme==="file"?c=u.file(E.win32.join(m(o,!0),...r)).path:c=E.posix.join(o.path,...r),o.with({path:c})}toString(o=!1){return d(this,o)}toJSON(){return this}static revive(o){if(o){if(o instanceof u)return o;{const r=new w(o);return r._formatted=o.external,r._fsPath=o._sep===p?o.fsPath:null,r}}else return o}}e.URI=u;const p=t.isWindows?1:void 0;class w extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(o=!1){return o?d(this,!0):(this._formatted||(this._formatted=d(this,!1)),this._formatted)}toJSON(){const o={$mid:1};return this._fsPath&&(o.fsPath=this._fsPath,o._sep=p),this._formatted&&(o.external=this._formatted),this.path&&(o.path=this.path),this.scheme&&(o.scheme=this.scheme),this.authority&&(o.authority=this.authority),this.query&&(o.query=this.query),this.fragment&&(o.fragment=this.fragment),o}}const g={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function h(i,o){let r,c=-1;for(let a=0;a=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===46||y===95||y===126||o&&y===47)c!==-1&&(r+=encodeURIComponent(i.substring(c,a)),c=-1),r!==void 0&&(r+=i.charAt(a));else{r===void 0&&(r=i.substr(0,a));const M=g[y];M!==void 0?(c!==-1&&(r+=encodeURIComponent(i.substring(c,a)),c=-1),r+=M):c===-1&&(c=a)}}return c!==-1&&(r+=encodeURIComponent(i.substring(c))),r!==void 0?r:i}function v(i){let o;for(let r=0;r1&&i.scheme==="file"?r=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?o?r=i.path.substr(1):r=i.path[1].toLowerCase()+i.path.substr(2):r=i.path,t.isWindows&&(r=r.replace(/\//g,"\\")),r}e.uriToFsPath=m;function d(i,o){const r=o?v:h;let c="",{scheme:a,authority:y,path:M,query:T,fragment:_}=i;if(a&&(c+=a,c+=":"),(y||a==="file")&&(c+=P,c+=P),y){let Y=y.indexOf("@");if(Y!==-1){const G=y.substr(0,Y);y=y.substr(Y+1),Y=G.indexOf(":"),Y===-1?c+=r(G,!1):(c+=r(G.substr(0,Y),!1),c+=":",c+=r(G.substr(Y+1),!1)),c+="@"}y=y.toLowerCase(),Y=y.indexOf(":"),Y===-1?c+=r(y,!1):(c+=r(y.substr(0,Y),!1),c+=y.substr(Y))}if(M){if(M.length>=3&&M.charCodeAt(0)===47&&M.charCodeAt(2)===58){const Y=M.charCodeAt(1);Y>=65&&Y<=90&&(M=`/${String.fromCharCode(Y+32)}:${M.substr(3)}`)}else if(M.length>=2&&M.charCodeAt(1)===58){const Y=M.charCodeAt(0);Y>=65&&Y<=90&&(M=`${String.fromCharCode(Y+32)}:${M.substr(2)}`)}c+=r(M,!0)}return T&&(c+="?",c+=r(T,!1)),_&&(c+="#",c+=o?_:h(_,!1)),c}function l(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+l(i.substr(3)):i}}const n=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function s(i){return i.match(n)?i.replace(n,o=>l(o)):i}}),define(ee[138],ie([0,1,7]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function t(S){const b=S;return b&&typeof b.type=="string"&&typeof b.severity=="string"}e.isRemoteConsoleLog=t;function k(S){const b=[];let P;try{const C=JSON.parse(S.arguments),u=C[C.length-1];u&&u.__$stack&&(C.pop(),P=u.__$stack),b.push(...C)}catch{b.push("Unable to log remote console arguments",S.arguments)}return{args:b,stack:P}}e.parse=k;function R(S){if(typeof S!="string")return R(k(S).stack);const b=S;if(b){const P=D(b),C=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(P||"");if(C&&C.length===4)return{uri:E.URI.file(C[1]),line:Number(C[2]),column:Number(C[3])}}}e.getFirstFrame=R;function D(S){if(!S)return S;const b=S.indexOf(` `);return b===-1?S:S.substring(0,b)}function I(S,b){const{args:P,stack:C}=k(S),u=typeof P[0]=="string"&&P.length===1;let p=D(C);p&&(p=`(${p.trim()})`);let w=[];if(typeof P[0]=="string"?p&&u?w=[`%c[${b}] %c${P[0]} %c${p}`,f("blue"),f(""),f("grey")]:w=[`%c[${b}] %c${P[0]}`,f("blue"),f(""),...P.slice(1)]:w=[`%c[${b}]%`,f("blue"),...P],p&&!u&&w.push(p),typeof console[S.severity]!="function")throw new Error("Unknown console method");console[S.severity].apply(console,w)}e.log=I;function f(S){return`color: ${S}`}}),define(ee[68],ie([0,1,17,25,7]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function R(S){return JSON.stringify(S,I)}e.stringify=R;function D(S){let b=JSON.parse(S);return b=f(b),b}e.parse=D;function I(S,b){return b instanceof RegExp?{$mid:2,source:b.source,flags:(0,t.regExpFlags)(b)}:b}function f(S,b=0){if(!S||b>200)return S;if(typeof S=="object"){switch(S.$mid){case 1:return k.URI.revive(S);case 2:return new RegExp(S.source,S.flags);case 15:return new Date(S.source)}if(S instanceof E.VSBuffer||S instanceof Uint8Array)return S;if(Array.isArray(S))for(let P=0;PE.getRoot(g).length&&g[g.length-1]===w}else{const g=p.path;return g.length>1&&g.charCodeAt(g.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(p.fsPath)}}removeTrailingPathSeparator(p,w=k.sep){return(0,e.hasTrailingPathSeparator)(p,w)?p.with({path:p.path.substr(0,p.path.length-1)}):p}addTrailingPathSeparator(p,w=k.sep){let g=!1;if(p.scheme===t.Schemas.file){const h=f(p);g=h!==void 0&&h.length===E.getRoot(h).length&&h[h.length-1]===w}else{w="/";const h=p.path;g=h.length===1&&h.charCodeAt(h.length-1)===47}return!g&&!(0,e.hasTrailingPathSeparator)(p,w)?p.with({path:p.path+"/"}):p}}e.ExtUri=S,e.extUri=new S(()=>!1),e.extUriBiasedIgnorePathCase=new S(u=>u.scheme===t.Schemas.file?!R.isLinux:!0),e.extUriIgnorePathCase=new S(u=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function b(u,p){const w=[];for(let g=0;gm===g?!1:(0,e.isEqualOrParent)(h,p(v)))||w.push(u[g])}return w}e.distinctParents=b;var P;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function p(w){const g=new Map;w.path.substring(w.path.indexOf(";")+1,w.path.lastIndexOf(";")).split(";").forEach(m=>{const[d,l]=m.split(":");d&&l&&g.set(d,l)});const v=w.path.substring(0,w.path.indexOf(";"));return v&&g.set(u.META_DATA_MIME,v),g}u.parseMetaData=p})(P=e.DataUri||(e.DataUri={}));function C(u,p,w){if(p){let g=u.path;return g&&g[0]!==k.posix.sep&&(g=k.posix.sep+g),u.with({scheme:w,authority:p,path:g})}return u.with({scheme:w})}e.toLocalResource=C}),define(ee[8],ie([0,1,22,16,3,2,18,4]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.MicrotaskDelay=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function f($){return!!$&&typeof $.then=="function"}e.isThenable=f;function S($){const L=new E.CancellationTokenSource,W=$(L.token),j=new Promise((H,X)=>{const re=L.token.onCancellationRequested(()=>{re.dispose(),L.dispose(),X(new t.CancellationError)});Promise.resolve(W).then(B=>{re.dispose(),L.dispose(),H(B)},B=>{re.dispose(),L.dispose(),X(B)})});return new class{cancel(){L.cancel()}then(H,X){return j.then(H,X)}catch(H){return this.then(void 0,H)}finally(H){return j.finally(H)}}}e.createCancelablePromise=S;function b($,L,W){return new Promise((j,H)=>{const X=L.onCancellationRequested(()=>{X.dispose(),j(W)});$.then(j,H).finally(()=>X.dispose())})}e.raceCancellation=b;function P($,L){return new Promise((W,j)=>{const H=L.onCancellationRequested(()=>{H.dispose(),j(new t.CancellationError)});$.then(W,j).finally(()=>H.dispose())})}e.raceCancellationError=P;async function C($){let L=-1;const W=$.map((H,X)=>H.then(re=>(L=X,re))),j=await Promise.race(W);return $.forEach((H,X)=>{X!==L&&H.cancel()}),j}e.raceCancellablePromises=C;function u($,L,W){let j;const H=setTimeout(()=>{j?.(void 0),W?.()},L);return Promise.race([$.finally(()=>clearTimeout(H)),new Promise(X=>j=X)])}e.raceTimeout=u;function p($){return new Promise((L,W)=>{const j=$();f(j)?j.then(L,W):L(j)})}e.asPromise=p;class w{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(L){if(this.activePromise){if(this.queuedPromiseFactory=L,!this.queuedPromise){const W=()=>{this.queuedPromise=null;const j=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,j};this.queuedPromise=new Promise(j=>{this.activePromise.then(W,W).then(j)})}return new Promise((W,j)=>{this.queuedPromise.then(W,j)})}return this.activePromise=L(),new Promise((W,j)=>{this.activePromise.then(H=>{this.activePromise=null,W(H)},H=>{this.activePromise=null,j(H)})})}}e.Throttler=w;class g{constructor(){this.current=Promise.resolve(null)}queue(L){return this.current=this.current.then(()=>L(),()=>L())}}e.Sequencer=g;class h{constructor(){this.promiseMap=new Map}queue(L,W){const H=(this.promiseMap.get(L)??Promise.resolve()).catch(()=>{}).then(W).finally(()=>{this.promiseMap.get(L)===H&&this.promiseMap.delete(L)});return this.promiseMap.set(L,H),H}}e.SequencerByKey=h;const v=($,L)=>{let W=!0;const j=setTimeout(()=>{W=!1,L()},$);return{isTriggered:()=>W,dispose:()=>{clearTimeout(j),W=!1}}},m=$=>{let L=!0;return queueMicrotask(()=>{L&&(L=!1,$())}),{isTriggered:()=>L,dispose:()=>{L=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class d{constructor(L){this.defaultDelay=L,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(L,W=this.defaultDelay){this.task=L,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((H,X)=>{this.doResolve=H,this.doReject=X}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const H=this.task;return this.task=null,H()}}));const j=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=W===e.MicrotaskDelay?m(j):v(W,j),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new t.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=d;class l{constructor(L){this.delayer=new d(L),this.throttler=new w}trigger(L,W){return this.delayer.trigger(()=>this.throttler.queue(L),W)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=l;class n{constructor(){this._isOpen=!1,this._promise=new Promise((L,W)=>{this._completePromise=L})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=n;class s extends n{constructor(L){super(),this._timeout=setTimeout(()=>this.open(),L)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=s;function i($,L){return L?new Promise((W,j)=>{const H=setTimeout(()=>{X.dispose(),W()},$),X=L.onCancellationRequested(()=>{clearTimeout(H),X.dispose(),j(new t.CancellationError)})}):S(W=>i($,W))}e.timeout=i;function o($,L=0){const W=setTimeout($,L);return(0,R.toDisposable)(()=>clearTimeout(W))}e.disposableTimeout=o;function r($){const L=[];let W=0;const j=$.length;function H(){return W!!j,W=null){let j=0;const H=$.length,X=()=>{if(j>=H)return Promise.resolve(W);const re=$[j++];return Promise.resolve(re()).then(x=>L(x)?Promise.resolve(x):X())};return X()}e.first=c;function a($,L=j=>!!j,W=null){if($.length===0)return Promise.resolve(W);let j=$.length;const H=()=>{j=-1;for(const X of $)X.cancel?.()};return new Promise((X,re)=>{for(const B of $)B.then(x=>{--j>=0&&L(x)?(H(),X(x)):j===0&&X(W)}).catch(x=>{--j>=0&&(H(),re(x))})})}e.firstParallel=a;class y{constructor(L){this._size=0,this.maxDegreeOfParalellism=L,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new k.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(L){return this._size++,new Promise((W,j)=>{this.outstandingPromises.push({factory:L,c:W,e:j}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=y;class M extends y{constructor(){super(1)}}e.Queue=M;class T{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const L=new F;return this.drainers.add(L),L.p}isDrained(){for(const[,L]of this.queues)if(L.size>0)return!1;return!0}queueFor(L,W=D.extUri){const j=W.getComparisonKey(L);let H=this.queues.get(j);return H||(H=new M,k.Event.once(H.onDrained)(()=>{H?.dispose(),this.queues.delete(j),this.onDidQueueDrain()}),this.queues.set(j,H)),H}onDidQueueDrain(){!this.isDrained()||this.releaseDrainers()}releaseDrainers(){for(const L of this.drainers)L.complete();this.drainers.clear()}dispose(){for(const[,L]of this.queues)L.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=T;class _{constructor(L,W){this._token=-1,typeof L=="function"&&typeof W=="number"&&this.setIfNotSet(L,W)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(L,W){this.cancel(),this._token=setTimeout(()=>{this._token=-1,L()},W)}setIfNotSet(L,W){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,L()},W))}}e.TimeoutTimer=_;class Y{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(L,W){this.cancel(),this._token=setInterval(()=>{L()},W)}}e.IntervalTimer=Y;class G{constructor(L,W){this.timeoutToken=-1,this.runner=L,this.timeout=W,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(L=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,L)}get delay(){return this.timeout}set delay(L){this.timeout=L}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=G;class V{constructor(L,W){W%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${W}ms is not a multiple of 1000ms.`),this.runner=L,this.timeout=W,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(L=this.timeout){L%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${L}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(L/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=V;class oe extends G{constructor(L,W){super(L,W),this.units=[]}work(L){this.units.push(L),this.isScheduled()||this.schedule()}doRun(){const L=this.units;this.units=[],this.runner?.(L)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=oe;class se extends R.Disposable{constructor(L,W){super(),this.options=L,this.handler=W,this.pendingWork=[],this.throttler=this._register(new R.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(L){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+L.length>this.options.maxBufferedWork)return!1}else if(this.pending+L.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}return this.pendingWork.push(...L),this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new G(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=se,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=$=>{(0,I.setTimeout0)(()=>{if(L)return;const W=Date.now()+15;$(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,W-Date.now())}}))});let L=!1;return{dispose(){L||(L=!0)}}}:e.runWhenIdle=($,L)=>{const W=requestIdleCallback($,typeof L=="number"?{timeout:L}:void 0);let j=!1;return{dispose(){j||(j=!0,cancelIdleCallback(W))}}}}();class ae{constructor(L){this._didRun=!1,this._executor=()=>{try{this._value=L()}catch(W){this._error=W}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=ae;async function fe($,L,W){let j;for(let H=0;Hj?.(),promise:W},W.then(()=>this.donePending(L),()=>this.donePending(L)),W}donePending(L){this._pending&&L===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const L=this._next;this._next=void 0,L.run().then(L.promiseResolve,L.promiseReject)}}setNext(L){if(this._next)this._next.run=L;else{let W,j;const H=new Promise((X,re)=>{W=X,j=re});this._next={run:L,promise:H,promiseResolve:W,promiseReject:j}}return this._next.promise}hasNext(){return!!this._next}async join(){return this._next?.promise??this._pending?.promise}}e.TaskSequentializer=K;class q{constructor(L,W=()=>Date.now()){this.interval=L,this.nowFn=W,this.lastIncrementTime=0,this.value=0}increment(){const L=this.nowFn();return L-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=L,this.value=0),this.value++,this.value}}e.IntervalCounter=q;class F{get isRejected(){return this.rejected}get isResolved(){return this.resolved}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((L,W)=>{this.completeCallback=L,this.errorCallback=W})}complete(L){return new Promise(W=>{this.completeCallback(L),this.resolved=!0,W()})}error(L){return new Promise(W=>{this.errorCallback(L),this.rejected=!0,W()})}cancel(){new Promise(L=>{this.errorCallback(new t.CancellationError),this.rejected=!0,L()})}}e.DeferredPromise=F;var A;(function($){async function L(j){let H;const X=await Promise.all(j.map(re=>re.then(B=>B,B=>{H||(H=B)})));if(typeof H<"u")throw H;return X}$.settled=L;function W(j){return new Promise(async(H,X)=>{try{await j(H,X)}catch(re){X(re)}})}$.withAsyncBody=W})(A=e.Promises||(e.Promises={}));var O;(function($){$[$.Initial=0]="Initial",$[$.DoneOK=1]="DoneOK",$[$.DoneError=2]="DoneError"})(O||(O={}));class U{static fromArray(L){return new U(W=>{W.emitMany(L)})}static fromPromise(L){return new U(async W=>{W.emitMany(await L)})}static fromPromises(L){return new U(async W=>{await Promise.all(L.map(async j=>W.emitOne(await j)))})}static merge(L){return new U(async W=>{await Promise.all(L.map(async j=>{for await(const H of j)W.emitOne(H)}))})}constructor(L){this._state=0,this._results=[],this._error=null,this._onStateChanged=new k.Emitter,queueMicrotask(async()=>{const W={emitOne:j=>this.emitOne(j),emitMany:j=>this.emitMany(j),reject:j=>this.reject(j)};try{await Promise.resolve(L(W)),this.resolve()}catch(j){this.reject(j)}finally{W.emitOne=void 0,W.emitMany=void 0,W.reject=void 0}})}[Symbol.asyncIterator](){let L=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(L{for await(const H of L)j.emitOne(W(H))})}map(L){return U.map(this,L)}static filter(L,W){return new U(async j=>{for await(const H of L)W(H)&&j.emitOne(H)})}filter(L){return U.filter(this,L)}static coalesce(L){return U.filter(L,W=>!!W)}coalesce(){return U.coalesce(this)}static async toPromise(L){const W=[];for await(const j of L)W.push(j);return W}toPromise(){return U.toPromise(this)}emitOne(L){this._state===0&&(this._results.push(L),this._onStateChanged.fire())}emitMany(L){this._state===0&&(this._results=this._results.concat(L),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(L){this._state===0&&(this._state=2,this._error=L,this._onStateChanged.fire())}}e.AsyncIterableObject=U,U.EMPTY=U.fromArray([]);class ne extends U{constructor(L,W){super(W),this._source=L}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=ne;function N($){const L=new E.CancellationTokenSource,W=$(L.token);return new ne(L,async j=>{const H=L.token.onCancellationRequested(()=>{H.dispose(),L.dispose(),j.reject(new t.CancellationError)});try{for await(const X of W){if(L.token.isCancellationRequested)return;j.emitOne(X)}H.dispose(),L.dispose()}catch(X){H.dispose(),L.dispose(),j.reject(X)}})}e.createCancelableAsyncIterable=N}),define(ee[99],ie([0,1,24,8,30,39,9,4,25]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function S(){return Object.create(null)}e.getEmptyExpression=S,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const b="[/\\\\]",P="[^/\\\\]",C=/\//g;function u(F,A){switch(F){case 0:return"";case 1:return`${P}*?`;default:return`(?:${b}|${P}+${b}${A?`|${b}${P}+`:""})*?`}}function p(F,A){if(!F)return[];const O=[];let U=!1,ne=!1,N="";for(const $ of F){switch($){case A:if(!U&&!ne){O.push(N),N="";continue}break;case"{":U=!0;break;case"}":U=!1;break;case"[":ne=!0;break;case"]":ne=!1;break}N+=$}return N&&O.push(N),O}e.splitGlobAware=p;function w(F){if(!F)return"";let A="";const O=p(F,e.GLOB_SPLIT);if(O.every(U=>U===e.GLOBSTAR))A=".*";else{let U=!1;O.forEach((ne,N)=>{if(ne===e.GLOBSTAR){if(U)return;A+=u(2,N===O.length-1)}else{let $=!1,L="",W=!1,j="";for(const H of ne){if(H!=="}"&&$){L+=H;continue}if(W&&(H!=="]"||!j)){let X;H==="-"?X=H:(H==="^"||H==="!")&&!j?X="^":H===e.GLOB_SPLIT?X="":X=(0,f.escapeRegExpCharacters)(H),j+=X;continue}switch(H){case"{":$=!0;continue;case"[":W=!0;continue;case"}":{A+=`(?:${p(L,",").map(B=>w(B)).join("|")})`,$=!1,L="";break}case"]":{A+="["+j+"]",W=!1,j="";break}case"?":A+=P;continue;case"*":A+=u(1);continue;default:A+=(0,f.escapeRegExpCharacters)(H)}}No(L,A)).filter(L=>L!==i),F),U=O.length;if(!U)return i;if(U===1)return O[0];const ne=function(L,W){for(let j=0,H=O.length;j!!L.allBasenames);N&&(ne.allBasenames=N.allBasenames);const $=O.reduce((L,W)=>W.allPaths?L.concat(W.allPaths):L,[]);return $.length&&(ne.allPaths=$),ne}function T(F,A,O){const U=D.sep===D.posix.sep,ne=U?F:F.replace(C,D.sep),N=D.sep+ne,$=D.posix.sep+F;let L;return O?L=function(W,j){return typeof W=="string"&&(W===ne||W.endsWith(N)||!U&&(W===F||W.endsWith($)))?A:null}:L=function(W,j){return typeof W=="string"&&(W===ne||!U&&W===F)?A:null},L.allPaths=[(O?"*/":"./")+F],L}function _(F){try{const A=new RegExp(`^${w(F)}$`);return function(O){return A.lastIndex=0,typeof O=="string"&&A.test(O)?F:null}}catch{return i}}function Y(F,A,O){return!F||typeof A!="string"?!1:G(F)(A,void 0,O)}e.match=Y;function G(F,A={}){if(!F)return s;if(typeof F=="string"||V(F)){const O=o(F,A);if(O===i)return s;const U=function(ne,N){return!!O(ne,N)};return O.allBasenames&&(U.allBasenames=O.allBasenames),O.allPaths&&(U.allPaths=O.allPaths),U}return ae(F,A)}e.parse=G;function V(F){const A=F;return A?typeof A.base=="string"&&typeof A.pattern=="string":!1}e.isRelativePattern=V;function oe(F){return F.allBasenames||[]}e.getBasenameTerms=oe;function se(F){return F.allPaths||[]}e.getPathTerms=se;function ae(F,A){const O=K(Object.getOwnPropertyNames(F).map(L=>fe(L,F[L],A)).filter(L=>L!==i)),U=O.length;if(!U)return i;if(!O.some(L=>!!L.requiresSiblings)){if(U===1)return O[0];const L=function(H,X){let re;for(let B=0,x=O.length;B{for(const B of re){const x=await B;if(typeof x=="string")return x}return null})():null},W=O.find(H=>!!H.allBasenames);W&&(L.allBasenames=W.allBasenames);const j=O.reduce((H,X)=>X.allPaths?H.concat(X.allPaths):H,[]);return j.length&&(L.allPaths=j),L}const ne=function(L,W,j){let H,X;for(let re=0,B=O.length;re{for(const re of X){const B=await re;if(typeof B=="string")return B}return null})():null},N=O.find(L=>!!L.allBasenames);N&&(ne.allBasenames=N.allBasenames);const $=O.reduce((L,W)=>W.allPaths?L.concat(W.allPaths):L,[]);return $.length&&(ne.allPaths=$),ne}function fe(F,A,O){if(A===!1)return i;const U=o(F,O);if(U===i)return i;if(typeof A=="boolean")return U;if(A){const ne=A.when;if(typeof ne=="string"){const N=($,L,W,j)=>{if(!j||!U($,L))return null;const H=ne.replace("$(basename)",W),X=j(H);return(0,t.isThenable)(X)?X.then(re=>re?F:null):X?F:null};return N.requiresSiblings=!0,N}}return U}function K(F,A){const O=F.filter(L=>!!L.basenames);if(O.length<2)return F;const U=O.reduce((L,W)=>{const j=W.basenames;return j?L.concat(j):L},[]);let ne;if(A){ne=[];for(let L=0,W=U.length;L{const j=W.patterns;return j?L.concat(j):L},[]);const N=function(L,W){if(typeof L!="string")return null;if(!W){let H;for(H=L.length;H>0;H--){const X=L.charCodeAt(H-1);if(X===47||X===92)break}W=L.substr(H)}const j=U.indexOf(W);return j!==-1?ne[j]:null};N.basenames=U,N.patterns=ne,N.allBasenames=U;const $=F.filter(L=>!L.basenames);return $.push(N),$}function q(F,A){return(0,E.equals)(F,A,(O,U)=>typeof O=="string"&&typeof U=="string"?O===U:typeof O!="string"&&typeof U!="string"?O.base===U.base&&O.pattern===U.pattern:!1)}e.patternsEquals=q}),define(ee[33],ie([0,1,24,30,9,4,18,25]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitName=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getPathLabel=void 0;function f(i,o){const{os:r,tildify:c,relative:a}=o;if(a){const T=S(i,a,r);if(typeof T=="string")return T}let y=i.fsPath;if(r===1&&!R.isWindows?y=y.replace(/\//g,"\\"):r!==1&&R.isWindows&&(y=y.replace(/\\/g,"/")),r!==1&&c?.userHome){const T=c.userHome.fsPath;let _;i.scheme!==c.userHome.scheme&&i.path.startsWith(k.posix.sep)?_=c.userHome.with({path:i.path}).fsPath:_=i.fsPath,y=C(_,T,r)}return(r===1?k.win32:k.posix).normalize(b(y,r===1))}e.getPathLabel=f;function S(i,o,r){const c=r===1?k.win32:k.posix,a=r===3?D.extUri:D.extUriIgnorePathCase,y=o.getWorkspace(),M=(0,E.firstOrDefault)(y.folders);if(!M)return;i.scheme!==M.uri.scheme&&i.path.startsWith(k.posix.sep)&&(i=M.uri.with({path:i.path}));const T=o.getWorkspaceFolder(i);if(!T)return;let _;if(a.isEqual(T.uri,i)?_="":_=a.relativePath(T.uri,i)??"",_&&(_=c.normalize(_)),y.folders.length>1&&!o.noPrefix){const Y=T.name?T.name:a.basenameOrAuthority(T.uri);_=_?`${Y} \u2022 ${_}`:Y}return _}function b(i,o=R.isWindows){return(0,t.hasDriveLetter)(i,o)?i.charAt(0).toUpperCase()+i.slice(1):i}e.normalizeDriveLetter=b;let P=Object.create(null);function C(i,o,r=R.OS){if(r===1||!i||!o)return i;let c=P.original===o?P.normalized:void 0;c||(c=o,R.isWindows&&(c=(0,t.toSlashes)(c)),c=`${(0,I.rtrim)(c,k.posix.sep)}${k.posix.sep}`,P={original:o,normalized:c});let a=i;return R.isWindows&&(a=(0,t.toSlashes)(a)),(r===3?a.startsWith(c):(0,I.startsWithIgnoreCase)(a,c))?`~/${a.substr(c.length)}`:i}e.tildify=C;function u(i,o){return i.replace(/^~($|\/|\\)/,`${o}$1`)}e.untildify=u;const p="\u2026",w="\\\\",g="~";function h(i,o=k.sep){const r=new Array(i.length);let c=!1;for(let a=0;a=0;G--){c=!1;let V=_.slice(G,G+Y).join(o);for(let oe=0;!c&&oe-1){const se=G+Y===_.length,ae=G>0&&i[oe].indexOf(o)>-1?o+V:V,fe=i[oe].endsWith(ae);c=!se||fe}if(!c){let oe="";(_[0].endsWith(":")||M!=="")&&(G===1&&(G=0,Y++,V=_[0]+o+V),G>0&&(oe=_[0]+o),oe=M+oe),G>0&&(oe=oe+p+o),oe=oe+V,G+Y<_.length&&(oe=oe+o+p),r[a]=oe}}c&&(r[a]=y)}return r}e.shorten=h;var v;(function(i){i[i.TEXT=0]="TEXT",i[i.VARIABLE=1]="VARIABLE",i[i.SEPARATOR=2]="SEPARATOR"})(v||(v={}));function m(i,o=Object.create(null)){const r=[];let c=!1,a="";for(const y of i)if(y==="$"||c&&y==="{")a&&r.push({value:a,type:v.TEXT}),a="",c=!0;else if(y==="}"&&c){const M=o[a];if(typeof M=="string")M.length&&r.push({value:M,type:v.VARIABLE});else if(M){const T=r[r.length-1];(!T||T.type!==v.SEPARATOR)&&r.push({value:M.label,type:v.SEPARATOR})}a="",c=!1}else a+=y;return a&&!c&&r.push({value:a,type:v.TEXT}),r.filter((y,M)=>{if(y.type===v.SEPARATOR){const T=r[M-1],_=r[M+1];return[T,_].every(Y=>Y&&(Y.type===v.VARIABLE||Y.type===v.TEXT)&&Y.value.length>0)}return!0}).map(y=>y.value).join("")}e.template=m;function d(i,o){return R.isMacintosh||o?i.replace(/\(&&\w\)|&&/g,"").replace(/&/g,R.isMacintosh?"&":"&&"):i.replace(/&&|&/g,r=>r==="&"?"&&":"&")}e.mnemonicMenuLabel=d;function l(i,o){return R.isMacintosh||o?i.replace(/\(&&\w\)|&&/g,""):R.isWindows?i.replace(/&&|&/g,r=>r==="&"?"&&":"&"):i.replace(/&&/g,"_")}e.mnemonicButtonLabel=l;function n(i){return i.replace(/&/g,"&&")}e.unmnemonicLabel=n;function s(i){const o=i.indexOf("/")!==-1?k.posix:k.win32,r=o.basename(i),c=o.dirname(i);return r.length?{name:r,parentPath:c}:{name:c,parentPath:""}}e.splitName=s}),define(ee[139],ie([0,1,7]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function t(b){return b.toJSON()}class k{constructor(P){this._uriTransformer=P}transformIncoming(P){const C=this._uriTransformer.transformIncoming(P);return C===P?P:t(E.URI.from(C))}transformOutgoing(P){const C=this._uriTransformer.transformOutgoing(P);return C===P?P:t(E.URI.from(C))}transformOutgoingURI(P){const C=this._uriTransformer.transformOutgoing(P);return C===P?P:E.URI.from(C)}transformOutgoingScheme(P){return this._uriTransformer.transformOutgoingScheme(P)}}e.URITransformer=k,e.DefaultURITransformer=new class{transformIncoming(b){return b}transformOutgoing(b){return b}transformOutgoingURI(b){return b}transformOutgoingScheme(b){return b}};function R(b,P,C){if(!b||C>200)return null;if(typeof b=="object"){if(b instanceof E.URI)return P.transformOutgoing(b);for(const u in b)if(Object.hasOwnProperty.call(b,u)){const p=R(b[u],P,C+1);p!==null&&(b[u]=p)}}return null}function D(b,P){const C=R(b,P,0);return C===null?b:C}e.transformOutgoingURIs=D;function I(b,P,C,u){if(!b||u>200)return null;if(typeof b=="object"){if(b.$mid===1)return C?E.URI.revive(P.transformIncoming(b)):P.transformIncoming(b);for(const p in b)if(Object.hasOwnProperty.call(b,p)){const w=I(b[p],P,C,u+1);w!==null&&(b[p]=w)}}return null}function f(b,P){const C=I(b,P,!1,0);return C===null?b:C}e.transformIncomingURIs=f;function S(b,P){const C=I(b,P,!0,0);return C===null?b:C}e.transformAndReviveIncomingURIs=S}),define(ee[82],ie([0,1,27,16,58,29,127]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMachineId=e.virtualMachineHint=void 0,e.virtualMachineHint=new class{_isVirtualMachineMacAddress(b){return this._virtualMachineOUIs||(this._virtualMachineOUIs=k.TernarySearchTree.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0),this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),!!this._virtualMachineOUIs.findSubstr(b)}value(){if(this._value===void 0){let b=0,P=0;const C=(0,E.networkInterfaces)();for(const u in C){const p=C[u];if(p)for(const{mac:w,internal:g}of p)g||(P+=1,this._isVirtualMachineMacAddress(w.toUpperCase())&&(b+=1))}this._value=P>0?b/P:0}return this._value}};let I;async function f(){return I||(I=(async()=>await S()||R.generateUuid())()),I}e.getMachineId=f;async function S(){try{const b=await new Promise((C,u)=>{z(["crypto"],C,u)}),P=(0,D.getMac)();return b.createHash("sha256").update(P,"utf8").digest("hex")}catch(b){t.onUnexpectedError(b);return}}}),define(ee[23],ie([0,1,40,27,140,8,30,77,9,4,18,7]),function(z,e,E,t,k,R,D,I,f,S,b,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.writeFileSync=e.configureFlushOnWrite=e.SymlinkSupport=e.whenDeleted=e.readdirSync=e.rimrafSync=e.RimRafMode=void 0;var C;(function(ae){ae[ae.UNLINK=0]="UNLINK",ae[ae.MOVE=1]="MOVE"})(C=e.RimRafMode||(e.RimRafMode={}));async function u(ae,fe=C.UNLINK){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");return fe===C.UNLINK?w(ae):p(ae)}async function p(ae){try{const fe=(0,D.randomPath)((0,t.tmpdir)());try{await E.promises.rename(ae,fe)}catch(K){return K.code==="ENOENT"?void 0:w(ae)}w(fe).catch(K=>{})}catch(fe){if(fe.code!=="ENOENT")throw fe}}async function w(ae){return(0,k.promisify)(E.rm)(ae,{recursive:!0,force:!0,maxRetries:3})}function g(ae){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");E.rmSync(ae,{recursive:!0,force:!0,maxRetries:3})}e.rimrafSync=g;async function h(ae,fe){return d(await(fe?v(ae):(0,k.promisify)(E.readdir)(ae)))}async function v(ae){try{return await(0,k.promisify)(E.readdir)(ae,{withFileTypes:!0})}catch(q){console.warn("[node.js fs] readdir with filetypes failed with error: ",q)}const fe=[],K=await h(ae);for(const q of K){let F=!1,A=!1,O=!1;try{const U=await e.Promises.lstat((0,f.join)(ae,q));F=U.isFile(),A=U.isDirectory(),O=U.isSymbolicLink()}catch(U){console.warn("[node.js fs] unexpected error from lstat after readdir: ",U)}fe.push({name:q,isFile:()=>F,isDirectory:()=>A,isSymbolicLink:()=>O})}return fe}function m(ae){return d(E.readdirSync(ae))}e.readdirSync=m;function d(ae){return ae.map(fe=>typeof fe=="string"?S.isMacintosh?(0,I.normalizeNFC)(fe):fe:(fe.name=S.isMacintosh?(0,I.normalizeNFC)(fe.name):fe.name,fe))}async function l(ae){const fe=await h(ae),K=[];for(const q of fe)await s.existsDirectory((0,f.join)(ae,q))&&K.push(q);return K}function n(ae,fe=1e3){return new Promise(K=>{let q=!1;const F=setInterval(()=>{q||(q=!0,E.access(ae,A=>{q=!1,A&&(clearInterval(F),K(void 0))}))},fe)})}e.whenDeleted=n;var s;(function(ae){async function fe(F){let A;try{if(A=await e.Promises.lstat(F),!A.isSymbolicLink())return{stat:A}}catch{}try{return{stat:await e.Promises.stat(F),symbolicLink:A?.isSymbolicLink()?{dangling:!1}:void 0}}catch(O){if(O.code==="ENOENT"&&A)return{stat:A,symbolicLink:{dangling:!0}};if(S.isWindows&&O.code==="EACCES")try{return{stat:await e.Promises.stat(await e.Promises.readlink(F)),symbolicLink:{dangling:!1}}}catch(U){if(U.code==="ENOENT"&&A)return{stat:A,symbolicLink:{dangling:!0}};throw U}throw O}}ae.stat=fe;async function K(F){try{const{stat:A,symbolicLink:O}=await ae.stat(F);return A.isFile()&&O?.dangling!==!0}catch{}return!1}ae.existsFile=K;async function q(F){try{const{stat:A,symbolicLink:O}=await ae.stat(F);return A.isDirectory()&&O?.dangling!==!0}catch{}return!1}ae.existsDirectory=q})(s=e.SymlinkSupport||(e.SymlinkSupport={}));const i=new R.ResourceQueue;function o(ae,fe,K){return i.queueFor(P.URI.file(ae),b.extUriBiasedIgnorePathCase).queue(()=>{const q=M(K);return new Promise((F,A)=>a(ae,fe,q,O=>O?A(O):F()))})}let r=!0;function c(ae){r=ae}e.configureFlushOnWrite=c;function a(ae,fe,K,q){if(!r)return E.writeFile(ae,fe,{mode:K.mode,flag:K.flag},q);E.open(ae,K.flag,K.mode,(F,A)=>{if(F)return q(F);E.writeFile(A,fe,O=>{if(O)return E.close(A,()=>q(O));E.fdatasync(A,U=>(U&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",U),c(!1)),E.close(A,ne=>q(ne))))})})}function y(ae,fe,K){const q=M(K);if(!r)return E.writeFileSync(ae,fe,{mode:q.mode,flag:q.flag});const F=E.openSync(ae,q.flag,q.mode);try{E.writeFileSync(F,fe);try{E.fdatasyncSync(F)}catch(A){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",A),c(!1)}}finally{E.closeSync(F)}}e.writeFileSync=y;function M(ae){return ae?{mode:typeof ae.mode=="number"?ae.mode:438,flag:typeof ae.flag=="string"?ae.flag:"w"}:{mode:438,flag:"w"}}async function T(ae,fe){if(ae!==fe)try{await e.Promises.rename(ae,fe)}catch(K){if(ae.toLowerCase()!==fe.toLowerCase()&&K.code==="EXDEV"||ae.endsWith("."))await _(ae,fe,{preserveSymlinks:!1}),await u(ae,C.MOVE);else throw K}}async function _(ae,fe,K){return G(ae,fe,{root:{source:ae,target:fe},options:K,handledSourcePaths:new Set})}const Y=511;async function G(ae,fe,K){if(K.handledSourcePaths.has(ae))return;K.handledSourcePaths.add(ae);const{stat:q,symbolicLink:F}=await s.stat(ae);if(F){if(K.options.preserveSymlinks)try{return await se(ae,fe,K)}catch(A){console.warn("[node.js fs] copy of symlink failed: ",A)}if(F.dangling)return}return q.isDirectory()?V(ae,fe,q.mode&Y,K):oe(ae,fe,q.mode&Y)}async function V(ae,fe,K,q){await e.Promises.mkdir(fe,{recursive:!0,mode:K});const F=await h(ae);for(const A of F)await G((0,f.join)(ae,A),(0,f.join)(fe,A),q)}async function oe(ae,fe,K){await e.Promises.copyFile(ae,fe),await e.Promises.chmod(fe,K)}async function se(ae,fe,K){let q=await e.Promises.readlink(ae);(0,D.isEqualOrParent)(q,K.root.source,!S.isLinux)&&(q=(0,f.join)(K.root.target,q.substr(K.root.source.length+1))),await e.Promises.symlink(q,fe)}e.Promises=new class{get access(){return(0,k.promisify)(E.access)}get stat(){return(0,k.promisify)(E.stat)}get lstat(){return(0,k.promisify)(E.lstat)}get utimes(){return(0,k.promisify)(E.utimes)}get read(){return(ae,fe,K,q,F)=>new Promise((A,O)=>{E.read(ae,fe,K,q,F,(U,ne,N)=>U?O(U):A({bytesRead:ne,buffer:N}))})}get readFile(){return(0,k.promisify)(E.readFile)}get write(){return(ae,fe,K,q,F)=>new Promise((A,O)=>{E.write(ae,fe,K,q,F,(U,ne,N)=>U?O(U):A({bytesWritten:ne,buffer:N}))})}get appendFile(){return(0,k.promisify)(E.appendFile)}get fdatasync(){return(0,k.promisify)(E.fdatasync)}get truncate(){return(0,k.promisify)(E.truncate)}get rename(){return(0,k.promisify)(E.rename)}get copyFile(){return(0,k.promisify)(E.copyFile)}get open(){return(0,k.promisify)(E.open)}get close(){return(0,k.promisify)(E.close)}get symlink(){return(0,k.promisify)(E.symlink)}get readlink(){return(0,k.promisify)(E.readlink)}get chmod(){return(0,k.promisify)(E.chmod)}get mkdir(){return(0,k.promisify)(E.mkdir)}get unlink(){return(0,k.promisify)(E.unlink)}get rmdir(){return(0,k.promisify)(E.rmdir)}get realpath(){return(0,k.promisify)(E.realpath)}async exists(ae){try{return await e.Promises.access(ae),!0}catch{return!1}}get readdir(){return h}get readDirsInDir(){return l}get writeFile(){return o}get rm(){return u}get move(){return T}get copy(){return _}}}),define(ee[100],ie([0,1,40,9,4,25,23]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.realpathSync=e.realpath=e.realcase=e.realcaseSync=void 0;function I(C){if(k.isLinux)return C;const u=(0,t.dirname)(C);if(C===u)return C;const p=((0,t.basename)(C)||C).toLowerCase();try{const g=(0,D.readdirSync)(u).filter(h=>h.toLowerCase()===p);if(g.length===1){const h=I(u);if(h)return(0,t.join)(h,g[0])}else if(g.length>1){const h=g.indexOf(p);if(h>=0){const v=I(u);if(v)return(0,t.join)(v,g[h])}}}catch{}return null}e.realcaseSync=I;async function f(C){if(k.isLinux)return C;const u=(0,t.dirname)(C);if(C===u)return C;const p=((0,t.basename)(C)||C).toLowerCase();try{const g=(await D.Promises.readdir(u)).filter(h=>h.toLowerCase()===p);if(g.length===1){const h=await f(u);if(h)return(0,t.join)(h,g[0])}else if(g.length>1){const h=g.indexOf(p);if(h>=0){const v=await f(u);if(v)return(0,t.join)(v,g[h])}}}catch{}return null}e.realcase=f;async function S(C){try{return await D.Promises.realpath(C)}catch{const p=P(C);return await D.Promises.access(p,E.constants.R_OK),p}}e.realpath=S;function b(C){try{return E.realpathSync(C)}catch{const p=P(C);return E.accessSync(p,E.constants.R_OK),p}}e.realpathSync=b;function P(C){return(0,R.rtrim)((0,t.normalize)(C),t.sep)}}),define(ee[141],ie([0,1,27,9,23]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFirstAvailablePowerShellInstallation=e.enumeratePowerShellInstallations=void 0;const R=/^\d+$/,D=/^Microsoft.PowerShell_.*/,I=/^Microsoft.PowerShellPreview_.*/;var f;(function(d){d[d.x64=0]="x64",d[d.x86=1]="x86",d[d.ARM=2]="ARM"})(f||(f={}));let S;switch(process.arch){case"ia32":case"x32":S=1;break;case"arm":case"arm64":S=2;break;default:S=0;break}let b;process.env.PROCESSOR_ARCHITEW6432?b=process.env.PROCESSOR_ARCHITEW6432==="ARM64"?2:0:process.env.PROCESSOR_ARCHITECTURE==="ARM64"?b=2:process.env.PROCESSOR_ARCHITECTURE==="X86"?b=1:b=0;class P{constructor(l,n,s){this.exePath=l,this.displayName=n,this.knownToExist=s}async exists(){return this.knownToExist===void 0&&(this.knownToExist=await k.SymlinkSupport.existsFile(this.exePath)),this.knownToExist}}function C({useAlternateBitness:d=!1}={}){return d?S===0?process.env["ProgramFiles(x86)"]||null:b===0&&process.env.ProgramW6432||null:process.env.ProgramFiles||null}async function u({useAlternateBitness:d=!1,findPreview:l=!1}={}){const n=C({useAlternateBitness:d});if(!n)return null;const s=t.join(n,"PowerShell");if(!await k.SymlinkSupport.existsDirectory(s))return null;let i=-1,o=null;for(const a of await k.Promises.readdir(s)){let y=-1;if(l){const T=a.indexOf("-");if(T<0)continue;const _=a.substring(0,T);if(!R.test(_)||a.substring(T+1)!=="preview")continue;y=parseInt(_,10)}else{if(!R.test(a))continue;y=parseInt(a,10)}if(y<=i)continue;const M=t.join(s,a,"pwsh.exe");!await k.SymlinkSupport.existsFile(M)||(o=M,i=y)}if(!o)return null;const r=n.includes("x86")?" (x86)":"",c=l?" Preview":"";return new P(o,`PowerShell${c}${r}`,!0)}async function p({findPreview:d}={}){if(!process.env.LOCALAPPDATA)return null;const l=t.join(process.env.LOCALAPPDATA,"Microsoft","WindowsApps");if(!await k.SymlinkSupport.existsDirectory(l))return null;const{pwshMsixDirRegex:n,pwshMsixName:s}=d?{pwshMsixDirRegex:I,pwshMsixName:"PowerShell Preview (Store)"}:{pwshMsixDirRegex:D,pwshMsixName:"PowerShell (Store)"};for(const i of await k.Promises.readdir(l))if(n.test(i)){const o=t.join(l,i,"pwsh.exe");return new P(o,s)}return null}function w(){const d=t.join(E.homedir(),".dotnet","tools","pwsh.exe");return new P(d,".NET Core PowerShell Global Tool")}function g(){const d=t.join(process.env.windir,S===1&&b!==1?"SysNative":"System32","WindowsPowerShell","v1.0","powershell.exe");return new P(d,"Windows PowerShell",!0)}async function*h(){let d=await u();d&&(yield d),d=await u({useAlternateBitness:!0}),d&&(yield d),d=await p(),d&&(yield d),d=w(),d&&(yield d),d=await u({findPreview:!0}),d&&(yield d),d=await p({findPreview:!0}),d&&(yield d),d=await u({useAlternateBitness:!0,findPreview:!0}),d&&(yield d),d=g(),d&&(yield d)}async function*v(){for await(const d of h())await d.exists()&&(yield d)}e.enumeratePowerShellInstallations=v;async function m(){for await(const d of v())return d;return null}e.getFirstAvailablePowerShellInstallation=m}),define(ee[83],ie([0,1,9,4,32,80,12,23]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.win32=e.createQueuedSender=e.getWindowsShell=e.TerminateResponseCode=e.Source=void 0,Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return R.Source}}),Object.defineProperty(e,"TerminateResponseCode",{enumerable:!0,get:function(){return R.TerminateResponseCode}});function f(P=k.env){return P.comspec||"cmd.exe"}e.getWindowsShell=f;function S(P){let C=[],u=!1;const p=function(w){if(u){C.push(w);return}(!P.send(w,h=>{if(h&&console.error(h),u=!1,C.length>0){const v=C.slice(0);C=[],v.forEach(m=>p(m))}})||t.isWindows)&&(u=!0)};return{send:p}}e.createQueuedSender=S;var b;(function(P){async function C(u,p,w){if(E.isAbsolute(u))return u;if(p===void 0&&(p=k.cwd()),E.dirname(u)!=="."||(w===void 0&&D.isString(k.env.PATH)&&(w=k.env.PATH.split(E.delimiter)),w===void 0||w.length===0))return E.join(p,u);async function h(v){if(await I.Promises.exists(v)){let m;try{m=await I.Promises.stat(v)}catch(d){d.message.startsWith("EACCES")&&(m=await I.Promises.lstat(v))}return m?!m.isDirectory():!1}return!1}for(const v of w){let m;if(E.isAbsolute(v)?m=E.join(v,u):m=E.join(p,v,u),await h(m))return m;let d=m+".com";if(await h(d)||(d=m+".exe",await h(d)))return d}return E.join(p,u)}P.findExecutable=C})(b=e.win32||(e.win32={}))}),define(ee[101],ie([0,1,45,14]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listProcesses=void 0;function k(D){return new Promise((I,f)=>{let S;const b=new Map;function P(u,p,w,g,h){const v=b.get(p);if(u===D||v){const m={name:C(w),cmd:w,pid:u,ppid:p,load:g,mem:h};b.set(u,m),u===D&&(S=m),v&&(v.children||(v.children=[]),v.children.push(m),v.children.length>1&&(v.children=v.children.sort((d,l)=>d.pid-l.pid)))}}function C(u){const p=/--vscode-window-kind=shared-process/,w=/--vscode-window-kind=issue-reporter/,g=/--vscode-window-kind=process-explorer/,h=/--utility-sub-type=network/,v=/--utility-sub-type=node.mojom.NodeService/,m=/--crashes-directory/,d=/\\pipe\\winpty-control/,l=/conhost\.exe/,n=/--type=([a-zA-Z-]+)/;if(m.exec(u))return"electron-crash-reporter";if(d.exec(u))return"winpty-process";if(l.exec(u))return"console-window-host (Windows internal process)";let s=n.exec(u);if(s&&s.length===2){if(s[1]==="renderer")return p.exec(u)?"shared-process":w.exec(u)?"issue-reporter":g.exec(u)?"process-explorer":"window";if(s[1]==="utility"){if(h.exec(u))return"utility-network-service";if(v.exec(u))return"extension-host"}return s[1]}const i=/[a-zA-Z-]+\.js/g;let o="";do s=i.exec(u),s&&(o+=s+" ");while(s);return o&&u.indexOf("node ")<0&&u.indexOf("node.exe")<0?`electron_node ${o}`:u}if(process.platform==="win32"){const u=p=>p.indexOf("\\\\?\\")===0||p.indexOf("\\??\\")===0?p.substr(4):p.indexOf('"\\\\?\\')===0||p.indexOf('"\\??\\')===0?'"'+p.substr(5):p;new Promise((p,w)=>{z(["windows-process-tree"],p,w)}).then(p=>{p.getProcessList(D,w=>{if(!w){f(new Error(`Root process ${D} not found`));return}p.getProcessCpuUsage(w,g=>{const h=new Map;g.forEach(v=>{const m=u(v.commandLine||"");h.set(v.pid,{name:C(m),cmd:m,pid:v.pid,ppid:v.ppid,load:v.cpu||0,mem:v.memory||0})}),S=h.get(D),S?(h.forEach(v=>{const m=h.get(v.ppid);m&&(m.children||(m.children=[]),m.children.push(v))}),h.forEach(v=>{v.children&&(v.children=v.children.sort((m,d)=>m.pid-d.pid))}),I(S)):f(new Error(`Root process ${D} not found`))})},p.ProcessDataFlag.CommandLine|p.ProcessDataFlag.Memory)})}else{let u=function(){let p=[S];const w=[];for(;p.length;){const h=p.shift();h&&(w.push(h.pid),h.children&&(p=p.concat(h.children)))}let g=JSON.stringify(t.FileAccess.asFileUri("vs/base/node/cpuUsage.sh",z).fsPath);g+=" "+w.join(" "),(0,E.exec)(g,{},(h,v,m)=>{if(h||m)f(h||new Error(m.toString()));else{const d=v.toString().split(` `);for(let l=0;l{if(p||g)if(process.platform!=="linux")f(p||new Error(g.toString()));else{const h=JSON.stringify(t.FileAccess.asFileUri("vs/base/node/ps.sh",z).fsPath);(0,E.exec)(h,{},(v,m,d)=>{v||d?f(v||new Error(d.toString())):(R(m,P),u())})}else{const h=w.toString().trim(),v="-ax -o pid=,ppid=,pcpu=,pmem=,command=";(0,E.exec)(`${h} ${v}`,{maxBuffer:1e3*1024,env:{LC_NUMERIC:"en_US.UTF-8"}},(m,d,l)=>{m||l&&!l.includes("screen size is bogus")?f(m||new Error(l.toString())):(R(d,P),process.platform==="linux"?u():S?I(S):f(new Error(`Root process ${D} not found`)))})}})}})}e.listProcesses=k;function R(D,I){const f=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/,S=D.toString().split(` `);for(const b of S){const P=f.exec(b.trim());P&&P.length===6&&I(parseInt(P[1]),parseInt(P[2]),P[5],parseFloat(P[3]),parseFloat(P[4]))}}}),define(ee[142],ie([0,1,27,4,141,83]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSystemShellSync=e.getSystemShell=void 0;async function D(u,p){return u===1?t.isWindows?P():R.getWindowsShell(p):S(u,p)}e.getSystemShell=D;function I(u,p){return u===1?t.isWindows?C(p):R.getWindowsShell(p):S(u,p)}e.getSystemShellSync=I;let f=null;function S(u,p){if(t.isLinux&&u===2||t.isMacintosh&&u===3)return"/bin/bash";if(!f){let w;if(t.isWindows)w="/bin/bash";else{if(w=p.SHELL,!w)try{w=(0,E.userInfo)().shell}catch{}w||(w="sh"),w==="/bin/false"&&(w="/bin/bash")}f=w}return f}let b=null;async function P(){return b||(b=(await(0,k.getFirstAvailablePowerShellInstallation)()).exePath),b}function C(u){if(b)return b;const p=t.isWindows&&parseFloat((0,E.release)())>=10,w=u.hasOwnProperty("PROCESSOR_ARCHITEW6432"),g=`${u.windir}\\${w?"Sysnative":"System32"}\\WindowsPowerShell\\v1.0\\powershell.exe`;return p?g:R.getWindowsShell(u)}});var we=this&&this.__decorate||function(z,e,E,t){var k=arguments.length,R=k<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,E):t,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(z,e,E,t);else for(var I=z.length-1;I>=0;I--)(D=z[I])&&(R=(k<3?D(R):k>3?D(e,E,R):D(e,E))||R);return k>3&&R&&Object.defineProperty(e,E,R),R};define(ee[46],ie([0,1,24,8,17,22,53,16,3,2,68,25,12]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.logWithColors=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.ResponseType=e.RequestType=void 0;var u;(function(F){F[F.Promise=100]="Promise",F[F.PromiseCancel=101]="PromiseCancel",F[F.EventListen=102]="EventListen",F[F.EventDispose=103]="EventDispose"})(u=e.RequestType||(e.RequestType={}));function p(F){switch(F){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var w;(function(F){F[F.Initialize=200]="Initialize",F[F.PromiseSuccess=201]="PromiseSuccess",F[F.PromiseError=202]="PromiseError",F[F.PromiseErrorObj=203]="PromiseErrorObj",F[F.EventFire=204]="EventFire"})(w=e.ResponseType||(e.ResponseType={}));function g(F){switch(F){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var h;(function(F){F[F.Uninitialized=0]="Uninitialized",F[F.Idle=1]="Idle"})(h||(h={}));class v{constructor(A){this.buffer=A,this.pos=0}read(A){const O=this.buffer.slice(this.pos,this.pos+A);return this.pos+=O.byteLength,O}}class m{constructor(){this.buffers=[]}get buffer(){return k.VSBuffer.concat(this.buffers)}write(A){this.buffers.push(A)}}var d;(function(F){F[F.Undefined=0]="Undefined",F[F.String=1]="String",F[F.Buffer=2]="Buffer",F[F.VSBuffer=3]="VSBuffer",F[F.Array=4]="Array",F[F.Object=5]="Object"})(d||(d={}));function l(F){const A=k.VSBuffer.alloc(4);return A.writeUInt32BE(F,0),A}function n(F){return F.read(4).readUInt32BE(0)}function s(F){const A=k.VSBuffer.alloc(1);return A.writeUInt8(F,0),A}const i={Undefined:s(d.Undefined),String:s(d.String),Buffer:s(d.Buffer),VSBuffer:s(d.VSBuffer),Array:s(d.Array),Object:s(d.Object)},o=typeof Buffer<"u";function r(F,A){if(typeof A>"u")F.write(i.Undefined);else if(typeof A=="string"){const O=k.VSBuffer.fromString(A);F.write(i.String),F.write(l(O.byteLength)),F.write(O)}else if(o&&Buffer.isBuffer(A)){const O=k.VSBuffer.wrap(A);F.write(i.Buffer),F.write(l(O.byteLength)),F.write(O)}else if(A instanceof k.VSBuffer)F.write(i.VSBuffer),F.write(l(A.byteLength)),F.write(A);else if(Array.isArray(A)){F.write(i.Array),F.write(l(A.length));for(const O of A)r(F,O)}else{const O=k.VSBuffer.fromString(JSON.stringify(A));F.write(i.Object),F.write(l(O.byteLength)),F.write(O)}}function c(F){switch(F.read(1).readUInt8(0)){case d.Undefined:return;case d.String:return F.read(n(F)).toString();case d.Buffer:return F.read(n(F)).buffer;case d.VSBuffer:return F.read(n(F));case d.Array:{const O=n(F),U=[];for(let ne=0;nethis.onRawMessage(N)),this.sendResponse({type:200})}registerChannel(A,O){this.channels.set(A,O),setTimeout(()=>this.flushPendingRequests(A),0)}sendResponse(A){switch(A.type){case 200:{const O=this.send([A.type]);this.logger?.logOutgoing(O,0,1,g(A.type));return}case 201:case 202:case 204:case 203:{const O=this.send([A.type,A.id],A.data);this.logger?.logOutgoing(O,A.id,1,g(A.type),A.data);return}}}send(A,O=void 0){const U=new m;return r(U,A),r(U,O),this.sendBuffer(U.buffer)}sendBuffer(A){try{return this.protocol.send(A),A.byteLength}catch{return 0}}onRawMessage(A){const O=new v(A),U=c(O),ne=c(O),N=U[0];switch(N){case 100:return this.logger?.logIncoming(A.byteLength,U[1],1,`${p(N)}: ${U[2]}.${U[3]}`,ne),this.onPromise({type:N,id:U[1],channelName:U[2],name:U[3],arg:ne});case 102:return this.logger?.logIncoming(A.byteLength,U[1],1,`${p(N)}: ${U[2]}.${U[3]}`,ne),this.onEventListen({type:N,id:U[1],channelName:U[2],name:U[3],arg:ne});case 101:return this.logger?.logIncoming(A.byteLength,U[1],1,`${p(N)}`),this.disposeActiveRequest({type:N,id:U[1]});case 103:return this.logger?.logIncoming(A.byteLength,U[1],1,`${p(N)}`),this.disposeActiveRequest({type:N,id:U[1]})}}onPromise(A){const O=this.channels.get(A.channelName);if(!O){this.collectPendingRequest(A);return}const U=new R.CancellationTokenSource;let ne;try{ne=O.call(this.ctx,A.name,A.arg,U.token)}catch(L){ne=Promise.reject(L)}const N=A.id;ne.then(L=>{this.sendResponse({id:N,data:L,type:201}),this.activeRequests.delete(A.id)},L=>{L instanceof Error?this.sendResponse({id:N,data:{message:L.message,name:L.name,stack:L.stack?L.stack.split?L.stack.split(` `):L.stack:void 0},type:202}):this.sendResponse({id:N,data:L,type:203}),this.activeRequests.delete(A.id)});const $=(0,S.toDisposable)(()=>U.cancel());this.activeRequests.set(A.id,$)}onEventListen(A){const O=this.channels.get(A.channelName);if(!O){this.collectPendingRequest(A);return}const U=A.id,N=O.listen(this.ctx,A.name,A.arg)($=>this.sendResponse({id:U,data:$,type:204}));this.activeRequests.set(A.id,N)}disposeActiveRequest(A){const O=this.activeRequests.get(A.id);O&&(O.dispose(),this.activeRequests.delete(A.id))}collectPendingRequest(A){let O=this.pendingRequests.get(A.channelName);O||(O=[],this.pendingRequests.set(A.channelName,O));const U=setTimeout(()=>{console.error(`Unknown channel: ${A.channelName}`),A.type===100&&this.sendResponse({id:A.id,data:{name:"Unknown channel",message:`Channel name '${A.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);O.push({request:A,timeoutTimer:U})}flushPendingRequests(A){const O=this.pendingRequests.get(A);if(O){for(const U of O)switch(clearTimeout(U.timeoutTimer),U.request.type){case 100:this.onPromise(U.request);break;case 102:this.onEventListen(U.request);break}this.pendingRequests.delete(A)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,S.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=a;var y;(function(F){F[F.LocalSide=0]="LocalSide",F[F.OtherSide=1]="OtherSide"})(y=e.RequestInitiator||(e.RequestInitiator={}));class M{constructor(A,O=null){this.protocol=A,this.isDisposed=!1,this.state=h.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new f.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(U=>this.onBuffer(U)),this.logger=O}getChannel(A){const O=this;return{call(U,ne,N){return O.isDisposed?Promise.reject(new I.CancellationError):O.requestPromise(A,U,ne,N)},listen(U,ne){return O.isDisposed?f.Event.None:O.requestEvent(A,U,ne)}}}requestPromise(A,O,U,ne=R.CancellationToken.None){const N=this.lastRequestId++,L={id:N,type:100,channelName:A,name:O,arg:U};if(ne.isCancellationRequested)return Promise.reject(new I.CancellationError);let W;return new Promise((H,X)=>{if(ne.isCancellationRequested)return X(new I.CancellationError);const re=()=>{const ce=ge=>{switch(ge.type){case 201:this.handlers.delete(N),H(ge.data);break;case 202:{this.handlers.delete(N);const De=new Error(ge.data.message);De.stack=Array.isArray(ge.data.stack)?ge.data.stack.join(` `):ge.data.stack,De.name=ge.data.name,X(De);break}case 203:this.handlers.delete(N),X(ge.data);break}};this.handlers.set(N,ce),this.sendRequest(L)};let B=null;this.state===h.Idle?re():(B=(0,t.createCancelablePromise)(ce=>this.whenInitialized()),B.then(()=>{B=null,re()}));const x=()=>{B?(B.cancel(),B=null):this.sendRequest({id:N,type:101}),X(new I.CancellationError)},Z=ne.onCancellationRequested(x);W=(0,S.combinedDisposable)((0,S.toDisposable)(x),Z),this.activeRequests.add(W)}).finally(()=>{this.activeRequests.delete(W)})}requestEvent(A,O,U){const ne=this.lastRequestId++,$={id:ne,type:102,channelName:A,name:O,arg:U};let L=null;const W=new f.Emitter({onFirstListenerAdd:()=>{L=(0,t.createCancelablePromise)(H=>this.whenInitialized()),L.then(()=>{L=null,this.activeRequests.add(W),this.sendRequest($)})},onLastListenerRemove:()=>{L?(L.cancel(),L=null):(this.activeRequests.delete(W),this.sendRequest({id:ne,type:103}))}}),j=H=>W.fire(H.data);return this.handlers.set(ne,j),W.event}sendRequest(A){switch(A.type){case 100:case 102:{const O=this.send([A.type,A.id,A.channelName,A.name],A.arg);this.logger?.logOutgoing(O,A.id,0,`${p(A.type)}: ${A.channelName}.${A.name}`,A.arg);return}case 101:case 103:{const O=this.send([A.type,A.id]);this.logger?.logOutgoing(O,A.id,0,p(A.type));return}}}send(A,O=void 0){const U=new m;return r(U,A),r(U,O),this.sendBuffer(U.buffer)}sendBuffer(A){try{return this.protocol.send(A),A.byteLength}catch{return 0}}onBuffer(A){const O=new v(A),U=c(O),ne=c(O),N=U[0];switch(N){case 200:return this.logger?.logIncoming(A.byteLength,0,0,g(N)),this.onResponse({type:U[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(A.byteLength,U[1],0,g(N),ne),this.onResponse({type:U[0],id:U[1],data:ne})}}onResponse(A){if(A.type===200){this.state=h.Idle,this._onDidInitialize.fire();return}this.handlers.get(A.id)?.(A)}get onDidInitializePromise(){return f.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===h.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,S.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}we([D.memoize],M.prototype,"onDidInitializePromise",null),e.ChannelClient=M;class T{get connections(){const A=[];return this._connections.forEach(O=>A.push(O)),A}constructor(A){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new f.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new f.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,A(({protocol:O,onDidClientDisconnect:U})=>{f.Event.once(O.onMessage)(N=>{const $=new v(N),L=c($),W=new a(O,L),j=new M(O);this.channels.forEach((X,re)=>W.registerChannel(re,X));const H={channelServer:W,channelClient:j,ctx:L};this._connections.add(H),this._onDidAddConnection.fire(H),U(()=>{W.dispose(),j.dispose(),this._connections.delete(H),this._onDidRemoveConnection.fire(H)})})})}getChannel(A,O){const U=this;return{call(ne,N,$){let L;if((0,C.isFunction)(O)){const j=(0,E.getRandomElement)(U.connections.filter(O));L=j?Promise.resolve(j):f.Event.toPromise(f.Event.filter(U.onDidAddConnection,O))}else L=O.routeCall(U,ne,N);const W=L.then(j=>j.channelClient.getChannel(A));return Y(W).call(ne,N,$)},listen(ne,N){if((0,C.isFunction)(O))return U.getMulticastEvent(A,O,ne,N);const $=O.routeEvent(U,ne,N).then(L=>L.channelClient.getChannel(A));return Y($).listen(ne,N)}}}getMulticastEvent(A,O,U,ne){const N=this;let $=new S.DisposableStore;const L=new f.Emitter({onFirstListenerAdd:()=>{$=new S.DisposableStore;const W=new f.EventMultiplexer,j=new Map,H=re=>{const x=re.channelClient.getChannel(A).listen(U,ne),Z=W.add(x);j.set(re,Z)},X=re=>{const B=j.get(re);!B||(B.dispose(),j.delete(re))};N.connections.filter(O).forEach(H),f.Event.filter(N.onDidAddConnection,O)(H,void 0,$),N.onDidRemoveConnection(X,void 0,$),W.event(L.fire,L,$),$.add(W)},onLastListenerRemove:()=>{$.dispose()}});return L.event}registerChannel(A,O){this.channels.set(A,O),this._connections.forEach(U=>{U.channelServer.registerChannel(A,O)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=T;class _{constructor(A,O,U=null){const ne=new m;r(ne,O),A.send(ne.buffer),this.channelClient=new M(A,U),this.channelServer=new a(A,O,U)}getChannel(A){return this.channelClient.getChannel(A)}registerChannel(A,O){this.channelServer.registerChannel(A,O)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=_;function Y(F){return{call(A,O,U){return F.then(ne=>ne.call(A,O,U))},listen(A,O){const U=new f.Relay;return F.then(ne=>U.input=ne.listen(A,O)),U.event}}}e.getDelayedChannel=Y;function G(F){let A=!1;return{call(O,U,ne){return A?F.call(O,U,ne):(0,t.timeout)(0).then(()=>A=!0).then(()=>F.call(O,U,ne))},listen(O,U){if(A)return F.listen(O,U);const ne=new f.Relay;return(0,t.timeout)(0).then(()=>A=!0).then(()=>ne.input=F.listen(O,U)),ne.event}}}e.getNextTickChannel=G;class V{constructor(A){this.fn=A}routeCall(A){return this.route(A)}routeEvent(A){return this.route(A)}async route(A){for(const O of A.connections)if(await Promise.resolve(this.fn(O.ctx)))return Promise.resolve(O);return await f.Event.toPromise(A.onDidAddConnection),await this.route(A)}}e.StaticRouter=V;var oe;(function(F){function A(N,$){const L=N,W=$&&$.disableMarshalling,j=new Map;for(const H in L)U(H)&&j.set(H,f.Event.buffer(L[H],!0));return new class{listen(H,X,re){const B=j.get(X);if(B)return B;if(ne(X)){const x=L[X];if(typeof x=="function")return x.call(L,re)}throw new Error(`Event not found: ${X}`)}call(H,X,re){const B=L[X];if(typeof B=="function"){if(!W&&Array.isArray(re))for(let x=0;xE.VSBuffer.wrap(S.data)),f.start()}send(f){this.port.postMessage(f.buffer)}disconnect(){this.port.close()}}e.Protocol=R;class D extends k.IPCClient{constructor(f,S){const b=new R(f);super(b,S),this.protocol=b}dispose(){this.protocol.disconnect()}}e.Client=D}),define(ee[102],ie([0,1,17,3,2,46]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentProtocol=e.BufferedEmitter=e.Client=e.Protocol=e.ProtocolConstants=e.ChunkStream=e.SocketCloseEventType=e.SocketDiagnostics=e.SocketDiagnosticsEventType=void 0;var D;(function(o){o.Created="created",o.Read="read",o.Write="write",o.Open="open",o.Error="error",o.Close="close",o.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",o.NodeEndReceived="nodeEndReceived",o.NodeEndSent="nodeEndSent",o.NodeDrainBegin="nodeDrainBegin",o.NodeDrainEnd="nodeDrainEnd",o.zlibInflateError="zlibInflateError",o.zlibInflateData="zlibInflateData",o.zlibInflateInitialWrite="zlibInflateInitialWrite",o.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",o.zlibInflateWrite="zlibInflateWrite",o.zlibInflateFlushFired="zlibInflateFlushFired",o.zlibDeflateError="zlibDeflateError",o.zlibDeflateData="zlibDeflateData",o.zlibDeflateWrite="zlibDeflateWrite",o.zlibDeflateFlushFired="zlibDeflateFlushFired",o.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",o.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",o.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",o.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",o.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",o.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",o.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",o.ProtocolHeaderRead="protocolHeaderRead",o.ProtocolMessageRead="protocolMessageRead",o.ProtocolHeaderWrite="protocolHeaderWrite",o.ProtocolMessageWrite="protocolMessageWrite",o.ProtocolWrite="protocolWrite"})(D=e.SocketDiagnosticsEventType||(e.SocketDiagnosticsEventType={}));var I;(function(o){o.enableDiagnostics=!1,o.records=[];const r=new WeakMap;let c=0;function a(M,T){if(!r.has(M)){const _=String(++c);r.set(M,_)}return r.get(M)}function y(M,T,_,Y){if(!o.enableDiagnostics)return;const G=a(M,T);if(Y instanceof E.VSBuffer||Y instanceof Uint8Array||Y instanceof ArrayBuffer||ArrayBuffer.isView(Y)){const V=E.VSBuffer.alloc(Y.byteLength);V.set(Y),o.records.push({timestamp:Date.now(),id:G,label:T,type:_,buff:V})}else o.records.push({timestamp:Date.now(),id:G,label:T,type:_,data:Y})}o.traceSocketEvent=y})(I=e.SocketDiagnostics||(e.SocketDiagnostics={}));var f;(function(o){o[o.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",o[o.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(f=e.SocketCloseEventType||(e.SocketCloseEventType={}));let S=null;function b(){return S||(S=E.VSBuffer.alloc(0)),S}class P{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(r){this._chunks.push(r),this._totalLength+=r.byteLength}read(r){return this._read(r,!0)}peek(r){return this._read(r,!1)}_read(r,c){if(r===0)return b();if(r>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===r){const T=this._chunks[0];return c&&(this._chunks.shift(),this._totalLength-=r),T}if(this._chunks[0].byteLength>r){const T=this._chunks[0].slice(0,r);return c&&(this._chunks[0]=this._chunks[0].slice(r),this._totalLength-=r),T}const a=E.VSBuffer.alloc(r);let y=0,M=0;for(;r>0;){const T=this._chunks[M];if(T.byteLength>r){const _=T.slice(0,r);a.set(_,y),y+=r,c&&(this._chunks[M]=T.slice(r),this._totalLength-=r),r-=r}else a.set(T,y),y+=T.byteLength,c?(this._chunks.shift(),this._totalLength-=T.byteLength):M++,r-=T.byteLength}return a}}e.ChunkStream=P;var C;(function(o){o[o.None=0]="None",o[o.Regular=1]="Regular",o[o.Control=2]="Control",o[o.Ack=3]="Ack",o[o.Disconnect=5]="Disconnect",o[o.ReplayRequest=6]="ReplayRequest",o[o.Pause=7]="Pause",o[o.Resume=8]="Resume",o[o.KeepAlive=9]="KeepAlive"})(C||(C={}));function u(o){switch(o){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting";case 9:return"KeepAlive"}}var p;(function(o){o[o.HeaderLength=13]="HeaderLength",o[o.AcknowledgeTime=2e3]="AcknowledgeTime",o[o.TimeoutTime=2e4]="TimeoutTime",o[o.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",o[o.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime"})(p=e.ProtocolConstants||(e.ProtocolConstants={}));class w{constructor(r,c,a,y){this.type=r,this.id=c,this.ack=a,this.data=y,this.writtenTime=0}get size(){return this.data.byteLength}}class g extends k.Disposable{constructor(r){super(),this._onMessage=this._register(new t.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=r,this._isDisposed=!1,this._incomingData=new P,this._register(this._socket.onData(c=>this.acceptChunk(c))),this.lastReadTime=Date.now()}acceptChunk(r){if(!(!r||r.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(r);this._incomingData.byteLength>=this._state.readLen;){const c=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=c.readUInt32BE(9),this._state.messageType=c.readUInt8(0),this._state.id=c.readUInt32BE(1),this._state.ack=c.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:u(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const a=this._state.messageType,y=this._state.id,M=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._socket.traceSocketEvent("protocolMessageRead",c),this._onMessage.fire(new w(a,y,M,c)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class h{constructor(r){this._writeNowTimeout=null,this._isDisposed=!1,this._isPaused=!1,this._socket=r,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(r){if(this._isDisposed)return;r.writtenTime=Date.now(),this.lastWriteTime=Date.now();const c=E.VSBuffer.alloc(13);c.writeUInt8(r.type,0),c.writeUInt32BE(r.id,1),c.writeUInt32BE(r.ack,5),c.writeUInt32BE(r.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:u(r.type),id:r.id,ack:r.ack,messageSize:r.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",r.data),this._writeSoon(c,r.data)}_bufferAdd(r,c){const a=this._totalLength===0;return this._data.push(r,c),this._totalLength+=r.byteLength+c.byteLength,a}_bufferTake(){const r=E.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,r}_writeSoon(r,c){this._bufferAdd(r,c)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;const r=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:r.byteLength}),this._socket.write(r)}}class v extends k.Disposable{constructor(r){super(),this._onMessage=new t.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new t.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=r,this._socketWriter=this._register(new h(this._socket)),this._socketReader=this._register(new g(this._socket)),this._register(this._socketReader.onMessage(c=>{c.type===1&&this._onMessage.fire(c.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(r){this._socketWriter.write(new w(1,0,0,r))}}e.Protocol=v;class m extends R.IPCClient{static fromSocket(r,c){return new m(new v(r),c)}get onDidDispose(){return this.protocol.onDidDispose}constructor(r,c,a=null){super(r,c,a),this.protocol=r}dispose(){super.dispose();const r=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),r.end()}}e.Client=m;class d{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new t.Emitter({onFirstListenerAdd:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onLastListenerRemove:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(r){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(r):this._emitter.fire(r):this._bufferedMessages.push(r)}flushBuffer(){this._bufferedMessages=[]}}e.BufferedEmitter=d;class l{constructor(r){this.data=r,this.next=null}}class n{constructor(){this._first=null,this._last=null}length(){let r=0,c=this._first;for(;c;)c=c.next,r++;return r}peek(){return this._first?this._first.data:null}toArray(){const r=[];let c=0,a=this._first;for(;a;)r[c++]=a.data,a=a.next;return r}pop(){if(!!this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(r){const c=new l(r);if(!this._first){this._first=c,this._last=c;return}this._last.next=c,this._last=c}}class s{static getInstance(){return s._INSTANCE||(s._INSTANCE=new s),s._INSTANCE}constructor(){this.lastRuns=[];const r=Date.now();for(let c=0;c{for(let c=s._HISTORY_LENGTH;c>=1;c--)this.lastRuns[c]=this.lastRuns[c-1];this.lastRuns[0]=Date.now()},1e3)}load(){const r=Date.now(),c=(1+s._HISTORY_LENGTH)*1e3;let a=0;for(let y=0;y=.5}}s._HISTORY_LENGTH=10,s._INSTANCE=null;class i{get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}constructor(r,c=null,a=s.getInstance()){this._onControlMessage=new d,this.onControlMessage=this._onControlMessage.event,this._onMessage=new d,this.onMessage=this._onMessage.event,this._onDidDispose=new d,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new d,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new d,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=a,this._isReconnecting=!1,this._outgoingUnackMsg=new n,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=[],this._socket=r,this._socketWriter=new h(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new g(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(y=>this._receiveMessage(y))),this._socketDisposables.push(this._socket.onClose(y=>this._onSocketClose.fire(y))),c&&this._socketReader.acceptChunk(c),this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3)}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables=(0,k.dispose)(this._socketDisposables)}drain(){return this._socketWriter.drain()}sendDisconnect(){const r=new w(5,0,0,b());this._socketWriter.write(r),this._socketWriter.flush()}sendPause(){const r=new w(7,0,0,b());this._socketWriter.write(r)}sendResume(){const r=new w(8,0,0,b());this._socketWriter.write(r)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(r,c){this._isReconnecting=!0,this._socketDisposables=(0,k.dispose)(this._socketDisposables),this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=r,this._socketWriter=new h(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new g(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(a=>this._receiveMessage(a))),this._socketDisposables.push(this._socket.onClose(a=>this._onSocketClose.fire(a))),this._socketReader.acceptChunk(c)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const r=new w(3,0,this._incomingAckId,b());this._socketWriter.write(r);const c=this._outgoingUnackMsg.toArray();for(let a=0,y=c.length;athis._outgoingAckId){this._outgoingAckId=r.ack;do{const c=this._outgoingUnackMsg.peek();if(c&&c.id<=r.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(r.type){case 0:break;case 1:{if(r.id>this._incomingMsgId)if(r.id!==this._incomingMsgId+1){const c=Date.now();c-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=c,this._socketWriter.write(new w(6,0,0,b())))}else this._incomingMsgId=r.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(r.data);break}case 2:{this._onControlMessage.fire(r.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{const c=this._outgoingUnackMsg.toArray();for(let a=0,y=c.length;a=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-r+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;const r=this._outgoingUnackMsg.peek(),c=Date.now()-r.writtenTime,a=Date.now()-this._socketReader.lastReadTime,y=Date.now()-this._lastSocketTimeoutTime;if(c>=2e4&&a>=2e4&&y>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:c,timeSinceLastReceivedSomeData:a});return}const M=Math.max(2e4-c,2e4-a,2e4-y,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},M)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const r=new w(3,0,this._incomingAckId,b());this._socketWriter.write(r)}_sendKeepAlive(){const r=new w(9,0,0,b());this._socketWriter.write(r)}}e.PersistentProtocol=i}),define(ee[144],ie([0,1,41,17,3,2,46,129]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;function f(b,P){const C=k.Event.fromNodeEventEmitter(E.validatedIpcMain,P,(p,w)=>({event:p,message:w})),u=k.Event.filter(C,({event:p})=>p.sender.id===b);return k.Event.map(u,({message:p})=>p&&t.VSBuffer.wrap(p))}class S extends D.IPCServer{static getOnDidClientConnect(){const P=k.Event.fromNodeEventEmitter(E.validatedIpcMain,"vscode:hello",({sender:C})=>C);return k.Event.map(P,C=>{const u=C.id;S.Clients.get(u)?.dispose();const w=new k.Emitter;S.Clients.set(u,(0,R.toDisposable)(()=>w.fire()));const g=f(u,"vscode:message"),h=k.Event.any(k.Event.signal(f(u,"vscode:disconnect")),w.event);return{protocol:new I.Protocol(C,g),onDidClientDisconnect:h}})}constructor(){super(S.getOnDidClientConnect())}}e.Server=S,S.Clients=new Map}),define(ee[103],ie([0,1,41,3,29,143]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.Client=void 0;class D extends R.Client{constructor(S,b){super({addEventListener:(P,C)=>S.addListener(P,C),removeEventListener:(P,C)=>S.removeListener(P,C),postMessage:P=>S.postMessage(P),start:()=>S.start(),close:()=>S.close()},b)}}e.Client=D;async function I(f){if(f.isDestroyed()||f.webContents.isDestroyed())throw new Error("ipc.mp#connect: Cannot talk to window because it is closed or destroyed");const S=(0,k.generateUuid)();f.webContents.send("vscode:createMessageChannel",S);const b=t.Event.fromNodeEventEmitter(E.validatedIpcMain,"vscode:createMessageChannelResult",(C,u)=>({nonce:u,port:C.ports[0]})),{port:P}=await t.Event.toPromise(t.Event.once(t.Event.filter(b,C=>C.nonce===S)));return P}e.connect=I}),define(ee[145],ie([0,1,45,8,17,22,138,16,3,2,50,83,80,46]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Server=void 0;class p extends u.ChannelServer{constructor(h){super({send:v=>{try{process.send?.(v.buffer.toString("base64"))}catch{}},onMessage:f.Event.fromNodeEventEmitter(process,"message",v=>k.VSBuffer.wrap(Buffer.from(v,"base64")))},h),process.once("disconnect",()=>this.dispose())}}e.Server=p;class w{constructor(h,v){this.modulePath=h,this.options=v,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new f.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const m=v&&v.timeout?v.timeout:6e4;this.disposeDelayer=new t.Delayer(m),this.child=null,this._client=null}getChannel(h){const v=this;return{call(m,d,l){return v.requestPromise(h,m,d,l)},listen(m,d){return v.requestEvent(h,m,d)}}}requestPromise(h,v,m,d=R.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(d.isCancellationRequested)return Promise.reject(I.canceled());this.disposeDelayer.cancel();const l=this.getCachedChannel(h),n=(0,t.createCancelablePromise)(o=>l.call(v,m,o)),s=d.onCancellationRequested(()=>n.cancel()),i=(0,S.toDisposable)(()=>n.cancel());return this.activeRequests.add(i),n.finally(()=>{s.dispose(),this.activeRequests.delete(i),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),n}requestEvent(h,v,m){if(!this.disposeDelayer)return f.Event.None;this.disposeDelayer.cancel();let d;const l=new f.Emitter({onFirstListenerAdd:()=>{d=this.getCachedChannel(h).listen(v,m)(l.fire,l),this.activeRequests.add(d)},onLastListenerRemove:()=>{this.activeRequests.delete(d),d.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return l.event}get client(){if(!this._client){const h=this.options&&this.options.args?this.options.args:[],v=Object.create(null);v.env={...(0,b.deepClone)(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options&&this.options.env&&(v.env={...v.env,...this.options.env}),this.options&&this.options.freshExecArgv&&(v.execArgv=[]),this.options&&typeof this.options.debug=="number"&&(v.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&typeof this.options.debugBrk=="number"&&(v.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),v.execArgv===void 0&&(v.execArgv=process.execArgv.filter(r=>!/^--inspect(-brk)?=/.test(r))),(0,C.removeDangerousEnvVariables)(v.env),this.child=(0,E.fork)(this.modulePath,h,v);const m=new f.Emitter;f.Event.fromNodeEventEmitter(this.child,"message",r=>r)(r=>{if((0,D.isRemoteConsoleLog)(r)){(0,D.log)(r,`IPC Library: ${this.options.serverName}`);return}m.fire(k.VSBuffer.wrap(Buffer.from(r,"base64")))});const l=this.options.useQueue?(0,P.createQueuedSender)(this.child):this.child,n=r=>this.child&&this.child.connected&&l.send(r.buffer.toString("base64")),s=m.event,i={send:n,onMessage:s};this._client=new u.ChannelClient(i);const o=()=>this.disposeClient();process.once("exit",o),this.child.on("error",r=>console.warn('IPC "'+this.options.serverName+'" errored with '+r)),this.child.on("exit",(r,c)=>{process.removeListener("exit",o),this.activeRequests.forEach(a=>(0,S.dispose)(a)),this.activeRequests.clear(),r!==0&&c!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+r+" and signal "+c),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:r,signal:c})})}return this._client}getCachedChannel(h){let v=this.channels.get(h);return v||(v=this.client.getChannel(h),this.channels.set(h,v)),v}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer&&(this.disposeDelayer.cancel(),this.disposeDelayer=void 0),this.disposeClient(),this.activeRequests.clear()}}e.Client=w}),define(ee[84],ie([0,1,17,16,3,2,9,4,29,46,102]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.serve=e.Server=e.createStaticIPCHandle=e.createRandomIPCHandle=e.XDG_RUNTIME_DIR=e.WebSocketNodeSocket=e.NodeSocket=void 0;function P(){return{crypto:z.__$__nodeRequire("crypto"),zlib:z.__$__nodeRequire("zlib"),net:z.__$__nodeRequire("net"),os:z.__$__nodeRequire("os")}}class C{traceSocketEvent(a,y){b.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,a,y)}constructor(a,y=""){this._canWrite=!0,this.debugLabel=y,this.socket=a,this.traceSocketEvent("created",{type:"NodeSocket"}),this._errorListener=M=>{if(this.traceSocketEvent("error",{code:M?.code,message:M?.message}),M){if(M.code==="EPIPE")return;(0,t.onUnexpectedError)(M)}},this.socket.on("error",this._errorListener),this._closeListener=M=>{this.traceSocketEvent("close",{hadError:M}),this._canWrite=!1},this.socket.on("close",this._closeListener),this._endListener=()=>{this.traceSocketEvent("nodeEndReceived"),this._canWrite=!1},this.socket.on("end",this._endListener)}dispose(){this.socket.off("error",this._errorListener),this.socket.off("close",this._closeListener),this.socket.off("end",this._endListener),this.socket.destroy()}onData(a){const y=M=>{this.traceSocketEvent("read",M),a(E.VSBuffer.wrap(M))};return this.socket.on("data",y),{dispose:()=>this.socket.off("data",y)}}onClose(a){const y=M=>{a({type:0,hadError:M,error:void 0})};return this.socket.on("close",y),{dispose:()=>this.socket.off("close",y)}}onEnd(a){const y=()=>{a()};return this.socket.on("end",y),{dispose:()=>this.socket.off("end",y)}}write(a){if(!(this.socket.destroyed||!this._canWrite))try{this.traceSocketEvent("write",a),this.socket.write(a.buffer,y=>{if(y){if(y.code==="EPIPE")return;(0,t.onUnexpectedError)(y)}})}catch(y){if(y.code==="EPIPE")return;(0,t.onUnexpectedError)(y)}}end(){this.traceSocketEvent("nodeEndSent"),this.socket.end()}drain(){return this.traceSocketEvent("nodeDrainBegin"),new Promise((a,y)=>{if(this.socket.bufferSize===0){this.traceSocketEvent("nodeDrainEnd"),a();return}const M=()=>{this.socket.off("close",M),this.socket.off("end",M),this.socket.off("error",M),this.socket.off("timeout",M),this.socket.off("drain",M),this.traceSocketEvent("nodeDrainEnd"),a()};this.socket.on("close",M),this.socket.on("end",M),this.socket.on("error",M),this.socket.on("timeout",M),this.socket.on("drain",M)})}}e.NodeSocket=C;var u;(function(c){c[c.MinHeaderByteSize=2]="MinHeaderByteSize"})(u||(u={}));var p;(function(c){c[c.PeekHeader=1]="PeekHeader",c[c.ReadHeader=2]="ReadHeader",c[c.ReadBody=3]="ReadBody",c[c.Fin=4]="Fin"})(p||(p={}));class w extends R.Disposable{get permessageDeflate(){return this._flowManager.permessageDeflate}get recordedInflateBytes(){return this._flowManager.recordedInflateBytes}traceSocketEvent(a,y){this.socket.traceSocketEvent(a,y)}constructor(a,y,M,T){super(),this._onData=this._register(new k.Emitter),this._onClose=this._register(new k.Emitter),this._isEnded=!1,this._state={state:1,readLen:2,fin:0,compressed:!1,firstFrameOfMessage:!0,mask:0},this.socket=a,this.traceSocketEvent("created",{type:"WebSocketNodeSocket",permessageDeflate:y,inflateBytesLength:M?.byteLength||0,recordInflateBytes:T}),this._flowManager=this._register(new g(this,y,M,T,this._onData,(_,Y)=>this._write(_,Y))),this._register(this._flowManager.onError(_=>{console.error(_),(0,t.onUnexpectedError)(_),this._onClose.fire({type:0,hadError:!0,error:_})})),this._incomingData=new b.ChunkStream,this._register(this.socket.onData(_=>this._acceptChunk(_))),this._register(this.socket.onClose(_=>this._onClose.fire(_)))}dispose(){this._flowManager.isProcessingWriteQueue()?this._register(this._flowManager.onDidFinishProcessingWriteQueue(()=>{this.dispose()})):(this.socket.dispose(),super.dispose())}onData(a){return this._onData.event(a)}onClose(a){return this._onClose.event(a)}onEnd(a){return this.socket.onEnd(a)}write(a){this._flowManager.writeMessage(a)}_write(a,y){if(this._isEnded)return;this.traceSocketEvent("webSocketNodeSocketWrite",a);let M=2;a.byteLength<126?M+=0:a.byteLength<2**16?M+=2:M+=8;const T=E.VSBuffer.alloc(M);if(y?T.writeUInt8(194,0):T.writeUInt8(130,0),a.byteLength<126)T.writeUInt8(a.byteLength,1);else if(a.byteLength<2**16){T.writeUInt8(126,1);let _=1;T.writeUInt8(a.byteLength>>>8&255,++_),T.writeUInt8(a.byteLength>>>0&255,++_)}else{T.writeUInt8(127,1);let _=1;T.writeUInt8(0,++_),T.writeUInt8(0,++_),T.writeUInt8(0,++_),T.writeUInt8(0,++_),T.writeUInt8(a.byteLength>>>24&255,++_),T.writeUInt8(a.byteLength>>>16&255,++_),T.writeUInt8(a.byteLength>>>8&255,++_),T.writeUInt8(a.byteLength>>>0&255,++_)}this.socket.write(E.VSBuffer.concat([T,a]))}end(){this._isEnded=!0,this.socket.end()}_acceptChunk(a){if(a.byteLength!==0){for(this._incomingData.acceptChunk(a);this._incomingData.byteLength>=this._state.readLen;)if(this._state.state===1){const y=this._incomingData.peek(this._state.readLen),M=y.readUInt8(0),T=(M&128)>>>7,_=(M&64)>>>6,Y=y.readUInt8(1),G=(Y&128)>>>7,V=Y&127;this._state.state=2,this._state.readLen=2+(G?4:0)+(V===126?2:0)+(V===127?8:0),this._state.fin=T,this._state.firstFrameOfMessage&&(this._state.compressed=Boolean(_)),this._state.firstFrameOfMessage=Boolean(T),this._state.mask=0,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{headerSize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin})}else if(this._state.state===2){const y=this._incomingData.read(this._state.readLen),M=y.readUInt8(1),T=(M&128)>>>7;let _=M&127,Y=1;_===126?_=y.readUInt8(++Y)*2**8+y.readUInt8(++Y):_===127&&(_=y.readUInt8(++Y)*0+y.readUInt8(++Y)*0+y.readUInt8(++Y)*0+y.readUInt8(++Y)*0+y.readUInt8(++Y)*2**24+y.readUInt8(++Y)*2**16+y.readUInt8(++Y)*2**8+y.readUInt8(++Y));let G=0;T&&(G=y.readUInt8(++Y)*2**24+y.readUInt8(++Y)*2**16+y.readUInt8(++Y)*2**8+y.readUInt8(++Y)),this._state.state=3,this._state.readLen=_,this._state.mask=G,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{bodySize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,mask:this._state.mask})}else if(this._state.state===3){const y=this._incomingData.read(this._state.readLen);this.traceSocketEvent("webSocketNodeSocketReadData",y),m(y,this._state.mask),this.traceSocketEvent("webSocketNodeSocketUnmaskedData",y),this._state.state=1,this._state.readLen=2,this._state.mask=0,this._flowManager.acceptFrame(y,this._state.compressed,!!this._state.fin)}}}async drain(){this.traceSocketEvent("webSocketNodeSocketDrainBegin"),this._flowManager.isProcessingWriteQueue()&&await k.Event.toPromise(this._flowManager.onDidFinishProcessingWriteQueue),await this.socket.drain(),this.traceSocketEvent("webSocketNodeSocketDrainEnd")}}e.WebSocketNodeSocket=w;class g extends R.Disposable{get permessageDeflate(){return Boolean(this._zlibInflateStream&&this._zlibDeflateStream)}get recordedInflateBytes(){return this._zlibInflateStream?this._zlibInflateStream.recordedInflateBytes:E.VSBuffer.alloc(0)}constructor(a,y,M,T,_,Y){super(),this._tracer=a,this._onData=_,this._writeFn=Y,this._onError=this._register(new k.Emitter),this.onError=this._onError.event,this._writeQueue=[],this._readQueue=[],this._onDidFinishProcessingWriteQueue=this._register(new k.Emitter),this.onDidFinishProcessingWriteQueue=this._onDidFinishProcessingWriteQueue.event,this._isProcessingWriteQueue=!1,this._isProcessingReadQueue=!1,y?(this._zlibInflateStream=this._register(new h(this._tracer,T,M,{windowBits:15})),this._zlibDeflateStream=this._register(new v(this._tracer,{windowBits:15})),this._register(this._zlibInflateStream.onError(G=>this._onError.fire(G))),this._register(this._zlibDeflateStream.onError(G=>this._onError.fire(G)))):(this._zlibInflateStream=null,this._zlibDeflateStream=null)}writeMessage(a){this._writeQueue.push(a),this._processWriteQueue()}async _processWriteQueue(){if(!this._isProcessingWriteQueue){for(this._isProcessingWriteQueue=!0;this._writeQueue.length>0;){const a=this._writeQueue.shift();if(this._zlibDeflateStream){const y=await this._deflateMessage(this._zlibDeflateStream,a);this._writeFn(y,!0)}else this._writeFn(a,!1)}this._isProcessingWriteQueue=!1,this._onDidFinishProcessingWriteQueue.fire()}}isProcessingWriteQueue(){return this._isProcessingWriteQueue}_deflateMessage(a,y){return new Promise((M,T)=>{a.write(y),a.flush(_=>M(_))})}acceptFrame(a,y,M){this._readQueue.push({data:a,isCompressed:y,isLastFrameOfMessage:M}),this._processReadQueue()}async _processReadQueue(){if(!this._isProcessingReadQueue){for(this._isProcessingReadQueue=!0;this._readQueue.length>0;){const a=this._readQueue.shift();if(this._zlibInflateStream&&a.isCompressed){const y=await this._inflateFrame(this._zlibInflateStream,a.data,a.isLastFrameOfMessage);this._onData.fire(y)}else this._onData.fire(a.data)}this._isProcessingReadQueue=!1}}_inflateFrame(a,y,M){return new Promise((T,_)=>{a.write(y),M&&a.write(E.VSBuffer.fromByteArray([0,0,255,255])),a.flush(Y=>T(Y))})}}class h extends R.Disposable{get recordedInflateBytes(){return this._recordInflateBytes?E.VSBuffer.concat(this._recordedInflateBytes):E.VSBuffer.alloc(0)}constructor(a,y,M,T){super(),this._tracer=a,this._recordInflateBytes=y,this._onError=this._register(new k.Emitter),this.onError=this._onError.event,this._recordedInflateBytes=[],this._pendingInflateData=[],this._zlibInflate=P().zlib.createInflateRaw(T),this._zlibInflate.on("error",_=>{this._tracer.traceSocketEvent("zlibInflateError",{message:_?.message,code:_?.code}),this._onError.fire(_)}),this._zlibInflate.on("data",_=>{this._tracer.traceSocketEvent("zlibInflateData",_),this._pendingInflateData.push(E.VSBuffer.wrap(_))}),M&&(this._tracer.traceSocketEvent("zlibInflateInitialWrite",M.buffer),this._zlibInflate.write(M.buffer),this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateInitialFlushFired"),this._pendingInflateData.length=0}))}write(a){this._recordInflateBytes&&this._recordedInflateBytes.push(a.clone()),this._tracer.traceSocketEvent("zlibInflateWrite",a),this._zlibInflate.write(a.buffer)}flush(a){this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateFlushFired");const y=E.VSBuffer.concat(this._pendingInflateData);this._pendingInflateData.length=0,a(y)})}}class v extends R.Disposable{constructor(a,y){super(),this._tracer=a,this._onError=this._register(new k.Emitter),this.onError=this._onError.event,this._pendingDeflateData=[],this._zlibDeflate=P().zlib.createDeflateRaw({windowBits:15}),this._zlibDeflate.on("error",M=>{this._tracer.traceSocketEvent("zlibDeflateError",{message:M?.message,code:M?.code}),this._onError.fire(M)}),this._zlibDeflate.on("data",M=>{this._tracer.traceSocketEvent("zlibDeflateData",M),this._pendingDeflateData.push(E.VSBuffer.wrap(M))})}write(a){this._tracer.traceSocketEvent("zlibDeflateWrite",a.buffer),this._zlibDeflate.write(a.buffer)}flush(a){this._zlibDeflate.flush(2,()=>{this._tracer.traceSocketEvent("zlibDeflateFlushFired");let y=E.VSBuffer.concat(this._pendingDeflateData);this._pendingDeflateData.length=0,y=y.slice(0,y.byteLength-4),a(y)})}}function m(c,a){if(a===0)return;const y=c.byteLength>>>2;for(let V=0;V>>24&255,Y=a>>>16&255,G=a>>>8&255;T>=1&&c.writeUInt8(c.readUInt8(M)^_,M),T>=2&&c.writeUInt8(c.readUInt8(M+1)^Y,M+1),T>=3&&c.writeUInt8(c.readUInt8(M+2)^G,M+2)}e.XDG_RUNTIME_DIR=typeof process<"u"?process.env.XDG_RUNTIME_DIR:void 0;const d={[2]:107,[1]:103};function l(){const c=(0,f.generateUuid)();if(process.platform==="win32")return`\\\\.\\pipe\\vscode-ipc-${c}-sock`;let a;return e.XDG_RUNTIME_DIR?a=(0,D.join)(e.XDG_RUNTIME_DIR,`vscode-ipc-${c}.sock`):a=(0,D.join)(P().os.tmpdir(),`vscode-ipc-${c}.sock`),s(a),a}e.createRandomIPCHandle=l;function n(c,a,y){const M=P().crypto.createHash("md5").update(c).digest("hex");if(process.platform==="win32")return`\\\\.\\pipe\\${M}-${y}-${a}-sock`;let T;return e.XDG_RUNTIME_DIR&&!process.env.VSCODE_PORTABLE?T=(0,D.join)(e.XDG_RUNTIME_DIR,`vscode-${M.substr(0,8)}-${y}-${a}.sock`):T=(0,D.join)(c,`${y}-${a}.sock`),s(T),T}e.createStaticIPCHandle=n;function s(c){const a=d[I.platform];typeof a=="number"&&c.length>=a&&console.warn(`WARNING: IPC handle "${c}" is longer than ${a} chars, try a shorter --user-data-dir`)}class i extends S.IPCServer{static toClientConnectionEvent(a){const y=k.Event.fromNodeEventEmitter(a,"connection");return k.Event.map(y,M=>({protocol:new b.Protocol(new C(M,"ipc-server-connection")),onDidClientDisconnect:k.Event.once(k.Event.fromNodeEventEmitter(M,"close"))}))}constructor(a){super(i.toClientConnectionEvent(a)),this.server=a}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}e.Server=i;function o(c){return new Promise((a,y)=>{const M=P().net.createServer();M.on("error",y),M.listen(c,()=>{M.removeListener("error",y),a(new i(M))})})}e.serve=o;function r(c,a){return new Promise((y,M)=>{const T=P().net.createConnection(c,()=>{T.removeListener("error",M),y(b.Client.fromSocket(new C(T,`ipc-client${a}`),a))});T.once("error",M)})}e.connect=r}),define(ee[104],ie([0,1,8,3,2,12]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var D;(function(P){P[P.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST"})(D=e.StorageHint||(e.StorageHint={}));function I(P){const C=P;return C?.changed instanceof Map||C?.deleted instanceof Set}e.isStorageItemsChangeEvent=I;var f;(function(P){P[P.None=0]="None",P[P.Initialized=1]="Initialized",P[P.Closed=2]="Closed"})(f=e.StorageState||(e.StorageState={}));class S extends k.Disposable{constructor(C,u=Object.create(null)){super(),this.database=C,this.options=u,this._onDidChangeStorage=this._register(new t.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=f.None,this.cache=new Map,this.flushDelayer=new E.ThrottledDelayer(S.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(C=>this.onDidChangeItemsExternal(C)))}onDidChangeItemsExternal(C){C.changed?.forEach((u,p)=>this.accept(p,u)),C.deleted?.forEach(u=>this.accept(u,void 0))}accept(C,u){if(this.state===f.Closed)return;let p=!1;(0,R.isUndefinedOrNull)(u)?p=this.cache.delete(C):this.cache.get(C)!==u&&(this.cache.set(C,u),p=!0),p&&this._onDidChangeStorage.fire(C)}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===f.None&&(this.state=f.Initialized,this.options.hint!==D.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(C,u){const p=this.cache.get(C);return(0,R.isUndefinedOrNull)(p)?u:p}getBoolean(C,u){const p=this.get(C);return(0,R.isUndefinedOrNull)(p)?u:p==="true"}getNumber(C,u){const p=this.get(C);return(0,R.isUndefinedOrNull)(p)?u:parseInt(p,10)}async set(C,u){if(this.state===f.Closed)return;if((0,R.isUndefinedOrNull)(u))return this.delete(C);const p=String(u);if(this.cache.get(C)!==p)return this.cache.set(C,p),this.pendingInserts.set(C,p),this.pendingDeletes.delete(C),this._onDidChangeStorage.fire(C),this.doFlush()}async delete(C){if(!(this.state===f.Closed||!this.cache.delete(C)))return this.pendingDeletes.has(C)||this.pendingDeletes.add(C),this.pendingInserts.delete(C),this._onDidChangeStorage.fire(C),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=f.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const C={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(C).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(C){if(!!this.hasPending)return this.doFlush(C)}async doFlush(C){return this.flushDelayer.trigger(()=>this.flushPending(),C)}async whenFlushed(){if(!!this.hasPending)return new Promise(C=>this.whenFlushedCallbacks.push(C))}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=S,S.DEFAULT_FLUSH_DELAY=100;class b{constructor(){this.onDidChangeItemsExternal=t.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(C){C.insert?.forEach((u,p)=>this.items.set(p,u)),C.delete?.forEach(u=>this.items.delete(u))}async close(){}}e.InMemoryStorageDatabase=b}),define(ee[146],ie([0,1,8,3,39,9,23]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteStorageDatabase=void 0;class I{get onDidChangeItemsExternal(){return t.Event.None}constructor(b,P=Object.create(null)){this.path=b,this.options=P,this.name=(0,R.basename)(this.path),this.logger=new f(this.options.logging),this.whenConnected=this.connect(this.path)}async getItems(){const b=await this.whenConnected,P=new Map;return(await this.all(b,"SELECT * FROM ItemTable")).forEach(u=>P.set(u.key,u.value)),this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] getItems(): ${P.size} rows`),P}async updateItems(b){const P=await this.whenConnected;return this.doUpdateItems(P,b)}doUpdateItems(b,P){return this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] updateItems(): insert(${P.insert?(0,k.mapToString)(P.insert):"0"}), delete(${P.delete?(0,k.setToString)(P.delete):"0"})`),this.transaction(b,()=>{const C=P.insert,u=P.delete;if(C&&C.size>0){const p=[];p.push([]);let w=0;C.forEach((g,h)=>{let v=p[w];v.length>I.MAX_HOST_PARAMETERS&&(w++,v=[],p.push(v)),v.push(h,g)}),p.forEach(g=>{this.prepare(b,`INSERT INTO ItemTable VALUES ${new Array(g.length/2).fill("(?,?)").join(",")}`,h=>h.run(g),()=>{const h=[];let v=0;return C.forEach((m,d)=>{h.push(d),v+=m.length}),`Keys: ${h.join(", ")} Length: ${v}`})})}if(u&&u.size){const p=[];p.push([]);let w=0;u.forEach(g=>{let h=p[w];h.length>I.MAX_HOST_PARAMETERS&&(w++,h=[],p.push(h)),h.push(g)}),p.forEach(g=>{this.prepare(b,`DELETE FROM ItemTable WHERE key IN (${new Array(g.length).fill("?").join(",")})`,h=>h.run(g),()=>{const h=[];return u.forEach(v=>{h.push(v)}),`Keys: ${h.join(", ")}`})})}})}async close(b){this.logger.trace(`[storage ${this.name}] close()`);const P=await this.whenConnected;return this.doClose(P,b)}doClose(b,P){return new Promise((C,u)=>{b.db.close(p=>(p&&this.handleSQLiteError(b,`[storage ${this.name}] close(): ${p}`),this.path===I.IN_MEMORY_PATH?C():!b.isErroneous&&!b.isInMemory?this.backup().then(C,w=>(this.logger.error(`[storage ${this.name}] backup(): ${w}`),C())):typeof P=="function"?D.Promises.unlink(this.path).then(()=>this.doConnect(this.path).then(w=>{const g=()=>this.doClose(w,void 0);return this.doUpdateItems(w,{insert:P()}).then(()=>g(),h=>(g(),Promise.reject(h)))})).then(C,u):u(p||new Error("Database has errors or is in-memory without recovery option"))))})}backup(){const b=this.toBackupPath(this.path);return D.Promises.copy(this.path,b,{preserveSymlinks:!1})}toBackupPath(b){return`${b}.backup`}async checkIntegrity(b){this.logger.trace(`[storage ${this.name}] checkIntegrity(full: ${b})`);const P=await this.whenConnected,C=await this.get(P,b?"PRAGMA integrity_check":"PRAGMA quick_check"),u=b?C.integrity_check:C.quick_check;return P.isErroneous?`${u} (last error: ${P.lastError})`:P.isInMemory?`${u} (in-memory!)`:u}async connect(b,P=!0){this.logger.trace(`[storage ${this.name}] open(${b}, retryOnBusy: ${P})`);try{return await this.doConnect(b)}catch(C){if(this.logger.error(`[storage ${this.name}] open(): Unable to open DB due to ${C}`),C.code==="SQLITE_BUSY"&&P)return await(0,E.timeout)(I.BUSY_OPEN_TIMEOUT),this.connect(b,!1);try{await D.Promises.unlink(b);try{await D.Promises.rename(this.toBackupPath(b),b)}catch{}return await this.doConnect(b)}catch(u){return this.logger.error(`[storage ${this.name}] open(): Unable to use backup due to ${u}`),this.doConnect(I.IN_MEMORY_PATH)}}}handleSQLiteError(b,P){b.isErroneous=!0,b.lastError=P,this.logger.error(P)}doConnect(b){return new Promise((P,C)=>{new Promise((u,p)=>{z(["@vscode/sqlite3"],u,p)}).then(u=>{const p={db:new(this.logger.isTracing?u.verbose().Database:u.Database)(b,w=>w?p.db&&w.code!=="SQLITE_CANTOPEN"?p.db.close(()=>C(w)):C(w):this.exec(p,["PRAGMA user_version = 1;","CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)"].join("")).then(()=>P(p),g=>p.db.close(()=>C(g)))),isInMemory:b===I.IN_MEMORY_PATH};p.db.on("error",w=>this.handleSQLiteError(p,`[storage ${this.name}] Error (event): ${w}`)),this.logger.isTracing&&p.db.on("trace",w=>this.logger.trace(`[storage ${this.name}] Trace (event): ${w}`))},C)})}exec(b,P){return new Promise((C,u)=>{b.db.exec(P,p=>p?(this.handleSQLiteError(b,`[storage ${this.name}] exec(): ${p}`),u(p)):C())})}get(b,P){return new Promise((C,u)=>{b.db.get(P,(p,w)=>p?(this.handleSQLiteError(b,`[storage ${this.name}] get(): ${p}`),u(p)):C(w))})}all(b,P){return new Promise((C,u)=>{b.db.all(P,(p,w)=>p?(this.handleSQLiteError(b,`[storage ${this.name}] all(): ${p}`),u(p)):C(w))})}transaction(b,P){return new Promise((C,u)=>{b.db.serialize(()=>{b.db.run("BEGIN TRANSACTION"),P(),b.db.run("END TRANSACTION",p=>p?(this.handleSQLiteError(b,`[storage ${this.name}] transaction(): ${p}`),u(p)):C())})})}prepare(b,P,C,u){const p=b.db.prepare(P),w=g=>{this.handleSQLiteError(b,`[storage ${this.name}] prepare(): ${g} (${P}). Details: ${u()}`)};p.on("error",w),C(p),p.finalize(g=>{g&&w(g),p.removeListener("error",w)})}}e.SQLiteStorageDatabase=I,I.IN_MEMORY_PATH=":memory:",I.BUSY_OPEN_TIMEOUT=2e3,I.MAX_HOST_PARAMETERS=256;class f{constructor(b){b&&typeof b.logTrace=="function"&&process.env[f.VSCODE_TRACE_STORAGE]&&(this.logTrace=b.logTrace),b&&typeof b.logError=="function"&&(this.logError=b.logError)}get isTracing(){return!!this.logTrace}trace(b){this.logTrace?.(b)}error(b){this.logError?.(b)}}f.VSCODE_TRACE_STORAGE="VSCODE_TRACE_STORAGE"}),define(ee[147],ie([11,10]),function(z,e){return z.create("vs/code/electron-main/app",e)}),define(ee[148],ie([11,10]),function(z,e){return z.create("vs/platform/configuration/common/configurationRegistry",e)}),define(ee[149],ie([11,10]),function(z,e){return z.create("vs/platform/dialogs/electron-main/dialogMainService",e)}),define(ee[150],ie([11,10]),function(z,e){return z.create("vs/platform/environment/node/argv",e)}),define(ee[151],ie([11,10]),function(z,e){return z.create("vs/platform/environment/node/argvHelper",e)}),define(ee[152],ie([11,10]),function(z,e){return z.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(ee[153],ie([11,10]),function(z,e){return z.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(ee[154],ie([11,10]),function(z,e){return z.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(ee[155],ie([11,10]),function(z,e){return z.create("vs/platform/extensions/common/extensionValidator",e)}),define(ee[156],ie([11,10]),function(z,e){return z.create("vs/platform/externalTerminal/node/externalTerminalService",e)}),define(ee[157],ie([11,10]),function(z,e){return z.create("vs/platform/files/common/fileService",e)}),define(ee[158],ie([11,10]),function(z,e){return z.create("vs/platform/files/common/files",e)}),define(ee[159],ie([11,10]),function(z,e){return z.create("vs/platform/files/common/io",e)}),define(ee[160],ie([11,10]),function(z,e){return z.create("vs/platform/files/electron-main/diskFileSystemProviderServer",e)}),define(ee[161],ie([11,10]),function(z,e){return z.create("vs/platform/files/node/diskFileSystemProvider",e)}),define(ee[162],ie([11,10]),function(z,e){return z.create("vs/platform/issue/electron-main/issueMainService",e)}),define(ee[163],ie([11,10]),function(z,e){return z.create("vs/platform/menubar/electron-main/menubar",e)}),define(ee[164],ie([11,10]),function(z,e){return z.create("vs/platform/native/electron-main/nativeHostMainService",e)}),define(ee[165],ie([11,10]),function(z,e){return z.create("vs/platform/request/common/request",e)}),define(ee[166],ie([11,10]),function(z,e){return z.create("vs/platform/shell/node/shellEnv",e)}),define(ee[167],ie([11,10]),function(z,e){return z.create("vs/platform/telemetry/common/telemetryService",e)}),define(ee[168],ie([11,10]),function(z,e){return z.create("vs/platform/update/common/update.config.contribution",e)}),define(ee[169],ie([11,10]),function(z,e){return z.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(ee[170],ie([11,10]),function(z,e){return z.create("vs/platform/windows/electron-main/windowImpl",e)}),define(ee[171],ie([11,10]),function(z,e){return z.create("vs/platform/windows/electron-main/windowsMainService",e)}),define(ee[172],ie([11,10]),function(z,e){return z.create("vs/platform/workspace/common/workspace",e)}),define(ee[173],ie([11,10]),function(z,e){return z.create("vs/platform/workspaces/electron-main/workspacesHistoryMainService",e)}),define(ee[174],ie([11,10]),function(z,e){return z.create("vs/platform/workspaces/electron-main/workspacesManagementMainService",e)}),define(ee[175],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function E(k){return k&&k.hasOwnProperty("folderUri")}e.isFolderBackupInfo=E;function t(k){return k&&k.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=t}),define(ee[176],ie([0,1,7]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeFolderInfos=e.deserializeWorkspaceInfos=e.isEmptyWindowBackupInfo=void 0;function t(D){return typeof D?.backupFolder=="string"}e.isEmptyWindowBackupInfo=t;function k(D){let I=[];try{Array.isArray(D.workspaces)&&(I=D.workspaces.map(f=>({workspace:{id:f.id,configPath:E.URI.parse(f.configURIPath)},remoteAuthority:f.remoteAuthority})))}catch{}return I}e.deserializeWorkspaceInfos=k;function R(D){let I=[];try{Array.isArray(D.folders)&&(I=D.folders.map(f=>({folderUri:E.URI.parse(f.folderUri),remoteAuthority:f.remoteAuthority})))}catch{}return I}e.deserializeFolderInfos=R}),define(ee[177],ie([0,1,3,2]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class k{constructor(){this._onCloseEmitter=new E.Emitter,this._onReloadEmitter=new E.Emitter,this._onTerminateEmitter=new E.Emitter,this._onAttachEmitter=new E.Emitter}call(I,f,S){switch(f){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:S[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:S[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:S[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:S[0],port:S[1],subId:S[2]}))}throw new Error("Method not implemented.")}listen(I,f,S){switch(f){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}e.ExtensionHostDebugBroadcastChannel=k,k.ChannelName="extensionhostdebugservice";class R extends t.Disposable{constructor(I){super(),this.channel=I}reload(I){this.channel.call("reload",[I])}get onReload(){return this.channel.listen("reload")}close(I){this.channel.call("close",[I])}get onClose(){return this.channel.listen("close")}attachSession(I,f,S){this.channel.call("attach",[I,f,S])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(I,f){this.channel.call("terminate",[I,f])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(I,f){return this.channel.call("openExtensionDevelopmentHostWindow",[I,f])}}e.ExtensionHostDebugChannelClient=R}),define(ee[178],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncryptionMainService=void 0;class E{constructor(k){this.machineId=k}encryption(){return new Promise((k,R)=>z(["vscode-encrypt"],k,R))}async encrypt(k){try{return(await this.encryption()).encrypt(this.machineId,k)}catch{return k}}async decrypt(k){try{return(await this.encryption()).decrypt(this.machineId,k)}catch{return k}}}e.EncryptionMainService=E}),define(ee[179],ie([0,1,132,53,14,9,32,18,7]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parsePtyHostPort=e.parseSearchPort=e.parseExtensionHostPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class S{get appRoot(){return(0,R.dirname)(k.FileAccess.asFileUri("",z).fsPath)}get userHome(){return f.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return f.URI.file((0,R.join)(this.userDataPath,"User"))}get tmpDir(){return f.URI.file(this.paths.tmpDir)}get cacheHome(){return f.URI.file(this.userDataPath)}get stateResource(){return(0,I.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome}get userDataSyncHome(){return(0,I.joinPath)(this.userRoamingDataHome,"sync")}get logsPath(){if(!this.args.logsPath){const w=(0,E.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,R.join)(this.userDataPath,"logs",w)}return this.args.logsPath}get userDataSyncLogResource(){return f.URI.file((0,R.join)(this.logsPath,"userDataSync.log"))}get editSessionsLogResource(){return f.URI.file((0,R.join)(this.logsPath,"editSessions.log"))}get remoteTunnelLogResource(){return f.URI.file((0,R.join)(this.logsPath,"remoteTunnel.log"))}get sync(){return this.args.sync}get machineSettingsResource(){return(0,I.joinPath)(f.URI.file((0,R.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,I.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,I.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,I.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const w=D.env.VSCODE_PORTABLE;return w?f.URI.file((0,R.join)(w,"argv.json")):(0,I.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return f.URI.file((0,R.join)(this.userDataPath,"Workspaces"))}get installSourcePath(){return(0,R.join)(this.userDataPath,"installSource")}get builtinExtensionsPath(){const w=this.args["builtin-extensions-dir"];return w?(0,R.resolve)(w):(0,R.normalize)((0,R.join)(k.FileAccess.asFileUri("",z).fsPath,"..","extensions"))}get extensionsDownloadLocation(){const w=this.args["extensions-download-dir"];return w?f.URI.file((0,R.resolve)(w)):f.URI.file((0,R.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const w=this.args["extensions-dir"];if(w)return(0,R.resolve)(w);const g=D.env.VSCODE_EXTENSIONS;if(g)return g;const h=D.env.VSCODE_PORTABLE;return h?(0,R.join)(h,"extensions"):(0,I.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const w=this.args.extensionDevelopmentPath;if(Array.isArray(w))return w.map(g=>/^[^:/?#]+?:\/\//.test(g)?f.URI.parse(g):f.URI.file((0,R.normalize)(g)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(w=>w==="ui"||w==="workspace"||w==="web"?w:"workspace")}get extensionTestsLocationURI(){const w=this.args.extensionTestsPath;if(w)return/^[^:/?#]+?:\/\//.test(w)?f.URI.parse(w):f.URI.file((0,R.normalize)(w))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const w=this.args["disable-extension"];if(w){if(typeof w=="string")return[w];if(Array.isArray(w)&&w.length>0)return w}return!1}get debugExtensionHost(){return b(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!D.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(w=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(w))}get extensionLogLevel(){const w=[];for(const g of this.args.log||[]){const h=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(g);h&&h[1]&&h[2]&&w.push([h[1],h[2]])}return w.length?w:void 0}get serviceMachineIdResource(){return(0,I.joinPath)(f.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get telemetryLogResource(){return f.URI.file((0,R.join)(this.logsPath,"telemetry.log"))}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get policyFile(){if(this.args["__enable-file-policy"]){const w=D.env.VSCODE_PORTABLE;return w?f.URI.file((0,R.join)(w,"policy.json")):(0,I.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(w){this.args.continueOn=w}get args(){return this._args}constructor(w,g,h){this._args=w,this.paths=g,this.productService=h,this.editSessionId=this.args.editSessionId}}we([t.memoize],S.prototype,"appRoot",null),we([t.memoize],S.prototype,"userHome",null),we([t.memoize],S.prototype,"userDataPath",null),we([t.memoize],S.prototype,"appSettingsHome",null),we([t.memoize],S.prototype,"tmpDir",null),we([t.memoize],S.prototype,"cacheHome",null),we([t.memoize],S.prototype,"stateResource",null),we([t.memoize],S.prototype,"userRoamingDataHome",null),we([t.memoize],S.prototype,"userDataSyncHome",null),we([t.memoize],S.prototype,"userDataSyncLogResource",null),we([t.memoize],S.prototype,"editSessionsLogResource",null),we([t.memoize],S.prototype,"remoteTunnelLogResource",null),we([t.memoize],S.prototype,"sync",null),we([t.memoize],S.prototype,"machineSettingsResource",null),we([t.memoize],S.prototype,"workspaceStorageHome",null),we([t.memoize],S.prototype,"localHistoryHome",null),we([t.memoize],S.prototype,"keyboardLayoutResource",null),we([t.memoize],S.prototype,"argvResource",null),we([t.memoize],S.prototype,"isExtensionDevelopment",null),we([t.memoize],S.prototype,"untitledWorkspacesHome",null),we([t.memoize],S.prototype,"installSourcePath",null),we([t.memoize],S.prototype,"builtinExtensionsPath",null),we([t.memoize],S.prototype,"extensionsPath",null),we([t.memoize],S.prototype,"extensionDevelopmentLocationURI",null),we([t.memoize],S.prototype,"extensionDevelopmentKind",null),we([t.memoize],S.prototype,"extensionTestsLocationURI",null),we([t.memoize],S.prototype,"debugExtensionHost",null),we([t.memoize],S.prototype,"logLevel",null),we([t.memoize],S.prototype,"extensionLogLevel",null),we([t.memoize],S.prototype,"serviceMachineIdResource",null),we([t.memoize],S.prototype,"telemetryLogResource",null),we([t.memoize],S.prototype,"disableWorkspaceTrust",null),we([t.memoize],S.prototype,"policyFile",null),e.AbstractNativeEnvironmentService=S;function b(p,w){return u(p["inspect-extensions"],p["inspect-brk-extensions"],5870,w,p.debugId,p.extensionEnvironment)}e.parseExtensionHostPort=b;function P(p,w){return u(p["inspect-search"],p["inspect-brk-search"],5876,w,p.extensionEnvironment)}e.parseSearchPort=P;function C(p,w){return u(p["inspect-ptyhost"],p["inspect-brk-ptyhost"],5877,w,p.extensionEnvironment)}e.parsePtyHostPort=C;function u(p,w,g,h,v,m){const l=Number(w||p)||(h?null:g),n=l?Boolean(!!w):!1;let s;if(m)try{s=JSON.parse(m)}catch{}return{port:l,break:n,debugId:v,env:s}}}),define(ee[105],ie([0,1,276,4,150]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildVersionMessage=e.buildHelpMessage=e.formatOptions=e.parseArgs=e.OPTIONS=void 0;const R={o:(0,k.localize)(0,null),e:(0,k.localize)(1,null),t:(0,k.localize)(2,null)};e.OPTIONS={tunnel:{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,k.localize)(3,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"},user:{type:"subcommand",options:{login:{type:"subcommand",options:{provider:{type:"string"},"access-token":{type:"string"}}}}}}},diff:{type:"boolean",cat:"o",alias:"d",args:["file","file"],description:(0,k.localize)(4,null)},merge:{type:"boolean",cat:"o",alias:"m",args:["path1","path2","base","result"],description:(0,k.localize)(5,null)},add:{type:"boolean",cat:"o",alias:"a",args:"folder",description:(0,k.localize)(6,null)},goto:{type:"boolean",cat:"o",alias:"g",args:"file:line[:character]",description:(0,k.localize)(7,null)},"new-window":{type:"boolean",cat:"o",alias:"n",description:(0,k.localize)(8,null)},"reuse-window":{type:"boolean",cat:"o",alias:"r",description:(0,k.localize)(9,null)},wait:{type:"boolean",cat:"o",alias:"w",description:(0,k.localize)(10,null)},waitMarkerFilePath:{type:"string"},locale:{type:"string",cat:"o",args:"locale",description:(0,k.localize)(11,null)},"user-data-dir":{type:"string",cat:"o",args:"dir",description:(0,k.localize)(12,null)},profile:{type:"string",cat:"o",args:"settingsProfileName",description:(0,k.localize)(13,null)},help:{type:"boolean",cat:"o",alias:"h",description:(0,k.localize)(14,null)},"extensions-dir":{type:"string",deprecates:["extensionHomePath"],cat:"e",args:"dir",description:(0,k.localize)(15,null)},"extensions-download-dir":{type:"string"},"builtin-extensions-dir":{type:"string"},"list-extensions":{type:"boolean",cat:"e",description:(0,k.localize)(16,null)},"show-versions":{type:"boolean",cat:"e",description:(0,k.localize)(17,null)},category:{type:"string",cat:"e",description:(0,k.localize)(18,null),args:"category"},"install-extension":{type:"string[]",cat:"e",args:"ext-id | path",description:(0,k.localize)(19,null)},"pre-release":{type:"boolean",cat:"e",description:(0,k.localize)(20,null)},"uninstall-extension":{type:"string[]",cat:"e",args:"ext-id",description:(0,k.localize)(21,null)},"enable-proposed-api":{type:"string[]",allowEmptyValue:!0,cat:"e",args:"ext-id",description:(0,k.localize)(22,null)},version:{type:"boolean",cat:"t",alias:"v",description:(0,k.localize)(23,null)},verbose:{type:"boolean",cat:"t",global:!0,description:(0,k.localize)(24,null)},log:{type:"string[]",cat:"t",args:"level",global:!0,description:(0,k.localize)(25,null)},status:{type:"boolean",alias:"s",cat:"t",description:(0,k.localize)(26,null)},"prof-startup":{type:"boolean",cat:"t",description:(0,k.localize)(27,null)},"prof-append-timers":{type:"string"},"no-cached-data":{type:"boolean"},"prof-startup-prefix":{type:"string"},"prof-v8-extensions":{type:"boolean"},"disable-extensions":{type:"boolean",deprecates:["disableExtensions"],cat:"t",description:(0,k.localize)(28,null)},"disable-extension":{type:"string[]",cat:"t",args:"ext-id",description:(0,k.localize)(29,null)},sync:{type:"string",cat:"t",description:(0,k.localize)(30,null),args:["on | off"]},"inspect-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugPluginHost"],args:"port",cat:"t",description:(0,k.localize)(31,null)},"inspect-brk-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugBrkPluginHost"],args:"port",cat:"t",description:(0,k.localize)(32,null)},"disable-gpu":{type:"boolean",cat:"t",description:(0,k.localize)(33,null)},"ms-enable-electron-run-as-node":{type:"boolean",global:!0},"max-memory":{type:"string",cat:"t",description:(0,k.localize)(34,null),args:"memory"},telemetry:{type:"boolean",cat:"t",description:(0,k.localize)(35,null)},remote:{type:"string",allowEmptyValue:!0},"folder-uri":{type:"string[]",cat:"o",args:"uri"},"file-uri":{type:"string[]",cat:"o",args:"uri"},"locate-extension":{type:"string[]"},extensionDevelopmentPath:{type:"string[]"},extensionDevelopmentKind:{type:"string[]"},extensionTestsPath:{type:"string"},extensionEnvironment:{type:"string"},debugId:{type:"string"},debugRenderer:{type:"boolean"},"inspect-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-brk-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-search":{type:"string",deprecates:["debugSearch"],allowEmptyValue:!0},"inspect-brk-search":{type:"string",deprecates:["debugBrkSearch"],allowEmptyValue:!0},"export-default-configuration":{type:"string"},"install-source":{type:"string"},"enable-smoke-test-driver":{type:"boolean"},logExtensionHostCommunication:{type:"boolean"},"skip-release-notes":{type:"boolean"},"skip-welcome":{type:"boolean"},"disable-telemetry":{type:"boolean"},"disable-updates":{type:"boolean"},"disable-keytar":{type:"boolean"},"disable-workspace-trust":{type:"boolean"},"disable-crash-reporter":{type:"boolean"},"crash-reporter-directory":{type:"string"},"crash-reporter-id":{type:"string"},"skip-add-to-recently-opened":{type:"boolean"},"unity-launch":{type:"boolean"},"open-url":{type:"boolean"},"file-write":{type:"boolean"},"file-chmod":{type:"boolean"},"install-builtin-extension":{type:"string[]"},force:{type:"boolean"},"do-not-sync":{type:"boolean"},trace:{type:"boolean"},"trace-category-filter":{type:"string"},"trace-options":{type:"string"},"force-user-env":{type:"boolean"},"force-disable-user-env":{type:"boolean"},"open-devtools":{type:"boolean"},logsPath:{type:"string"},"__enable-file-policy":{type:"boolean"},editSessionId:{type:"string"},continueOn:{type:"string"},"locate-shell-integration-path":{type:"string",args:["bash","pwsh","zsh","fish"]},"enable-coi":{type:"boolean"},"no-proxy-server":{type:"boolean"},"no-sandbox":{type:"boolean",alias:"sandbox"},"proxy-server":{type:"string"},"proxy-bypass-list":{type:"string"},"proxy-pac-url":{type:"string"},"js-flags":{type:"string"},inspect:{type:"string",allowEmptyValue:!0},"inspect-brk":{type:"string",allowEmptyValue:!0},nolazy:{type:"boolean"},"force-device-scale-factor":{type:"string"},"force-renderer-accessibility":{type:"boolean"},"ignore-certificate-errors":{type:"boolean"},"allow-insecure-localhost":{type:"boolean"},"log-net-log":{type:"string"},vmodule:{type:"string"},_urls:{type:"string[]"},"disable-dev-shm-usage":{type:"boolean"},"profile-temp":{type:"boolean"},_:{type:"string[]"}};const D={onUnknownOption:()=>{},onMultipleValues:()=>{},onEmptyValue:()=>{},onDeprecatedOption:()=>{}};function I(w,g,h=D){const v=w.find(c=>c.length>0&&c[0]!=="-"),m={},d=["_"],l=[],n={};let s;for(const c in g){const a=g[c];a.type==="subcommand"?c===v&&(s=a):(a.alias&&(m[c]=a.alias),a.type==="string"||a.type==="string[]"?(d.push(c),a.deprecates&&d.push(...a.deprecates)):a.type==="boolean"&&(l.push(c),a.deprecates&&l.push(...a.deprecates)),a.global&&(n[c]=a))}if(s&&v){const c=n;for(const T in s.options)c[T]=s.options[T];const a=w.filter(T=>T!==v),y=h.getSubcommandReporter?h.getSubcommandReporter(v):void 0,M=I(a,c,y);return{[v]:M,_:[]}}const i=E(w,{string:d,boolean:l,alias:m}),o={},r=i;o._=i._.map(c=>String(c)).filter(c=>c.length>0),delete r._;for(const c in g){const a=g[c];if(a.type==="subcommand")continue;a.alias&&delete r[a.alias];let y=r[c];if(a.deprecates)for(const M of a.deprecates)r.hasOwnProperty(M)&&(y||(y=r[M],y&&h.onDeprecatedOption(M,a.deprecationMessage||(0,k.localize)(36,null,c))),delete r[M]);if(typeof y<"u"){if(a.type==="string[]"){if(Array.isArray(y)||(y=[y]),!a.allowEmptyValue){const M=y.filter(T=>T.length>0);M.length!==y.length&&(h.onEmptyValue(c),y=M.length>0?M:void 0)}}else a.type==="string"&&(Array.isArray(y)?(y=y.pop(),h.onMultipleValues(c,y)):!y&&!a.allowEmptyValue&&(h.onEmptyValue(c),y=void 0));o[c]=y,a.deprecationMessage&&h.onDeprecatedOption(c,a.deprecationMessage)}delete r[c]}for(const c in r)h.onUnknownOption(c);return o}e.parseArgs=I;function f(w,g){let h="";return g.args&&(Array.isArray(g.args)?h=` <${g.args.join("> <")}>`:h=` <${g.args}>`),g.alias?`-${g.alias} --${w}${h}`:`--${w}${h}`}function S(w,g){const h=[];for(const v in w){const m=w[v],d=f(v,m);h.push([d,m.description])}return b(h,g)}e.formatOptions=S;function b(w,g){const v=w.reduce((l,n)=>Math.max(l,n[0].length),12)+2+1;if(g-v<25)return w.reduce((l,n)=>l.concat([` ${n[0]}`,` ${n[1]}`]),[]);const m=g-v-1,d=[];for(const l of w){const n=l[0],s=C(l[1],m),i=P(v-n.length-2);d.push(" "+n+i+s[0]);for(let o=1;o[o.command,o.description]),d)),n.push("")),n.join(` `)}e.buildHelpMessage=u;function p(w,g){return`${w||(0,k.localize)(43,null)} ${g||(0,k.localize)(44,null)} ${process.arch}`}e.buildVersionMessage=p}),define(ee[180],ie([0,1,79,177,105]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronExtensionHostDebugBroadcastChannel=void 0;class R extends t.ExtensionHostDebugBroadcastChannel{constructor(I,f){super(),this.windowsMainService=I,this.userDataProfilesMainService=f}call(I,f,S){return f==="openExtensionDevelopmentHostWindow"?this.openExtensionDevelopmentHostWindow(S[0],S[1]):super.call(I,f,S)}async openExtensionDevelopmentHostWindow(I,f){const S=(0,k.parseArgs)(I,k.OPTIONS);S.debugRenderer=f;const b=S.extensionDevelopmentPath;if(!b)return{success:!1};const[P]=await this.windowsMainService.openExtensionDevelopmentHostWindow(b,{context:5,cli:S,profile:await this.userDataProfilesMainService.checkAndCreateProfileFromCli(S)});if(!f)return{success:!0};const C=P.win;if(!C)return{success:!0};const u=C.webContents.debugger;let p=u.isAttached()?1/0:0;const w=(0,E.createServer)(g=>{p++===0&&u.attach();let h=!1;const v=l=>{h||g.write(JSON.stringify(l)+"\0")},m=(l,n,s,i)=>v({method:n,params:s,sessionId:i});C.on("close",()=>{u.removeListener("message",m),g.end(),h=!0}),u.addListener("message",m);let d=Buffer.alloc(0);g.on("data",l=>{d=Buffer.concat([d,l]);for(let n=d.indexOf(0);n!==-1;n=d.indexOf(0)){let s;try{const i=d.slice(0,n).toString("utf8");d=d.slice(n+1),s=JSON.parse(i)}catch(i){console.error("error reading cdp line",i)}u.sendCommand(s.method,s.params,s.sessionId).then(i=>v({id:s.id,sessionId:s.sessionId,result:i})).catch(i=>v({id:s.id,sessionId:s.sessionId,error:{code:0,message:i.message}}))}}),g.on("error",l=>{console.error("error on cdp pipe:",l)}),g.on("close",()=>{h=!0,--p===0&&u.detach()})});return await new Promise(g=>w.listen(0,g)),C.on("close",()=>w.close()),{rendererDebugPort:w.address().port,success:!0}}}e.ElectronExtensionHostDebugBroadcastChannel=R}),define(ee[59],ie([0,1,277,151,105]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isLaunchedFromCli=e.addArg=e.parseCLIProcessArgv=e.parseMainProcessArgv=void 0;const R=2048;function D(C,u){const p=(d,l)=>{console.warn((0,t.localize)(0,null,d,l))},w=d=>{console.warn((0,t.localize)(1,null,d))},g=(d,l)=>{console.warn((0,t.localize)(2,null,d,l))},h=d=>({onUnknownOption:l=>{d!=="tunnel"&&console.warn((0,t.localize)(3,null,l,d))},onMultipleValues:p,onEmptyValue:w,onDeprecatedOption:g,getSubcommandReporter:d!=="tunnel"?h:void 0}),v={onUnknownOption:d=>{console.warn((0,t.localize)(4,null,d))},onMultipleValues:p,onEmptyValue:w,onDeprecatedOption:g,getSubcommandReporter:h},m=(0,k.parseArgs)(C,k.OPTIONS,u?v:void 0);return m.goto&&m._.forEach(d=>E(/^(\w:)?[^:]+(:\d*){0,2}$/.test(d),(0,t.localize)(5,null))),m["max-memory"]&&E(parseInt(m["max-memory"])>=R,`The max-memory argument cannot be specified lower than ${R} MB.`),m}function I(C){const u=C.findIndex(p=>!/^-/.test(p));if(u>-1)return[...C.slice(0,u),...C.slice(u+1)]}function f(C){let[,...u]=C;process.env.VSCODE_DEV&&(u=I(u)||[]);const p=!P(process.env);return D(u,p)}e.parseMainProcessArgv=f;function S(C){let[,,...u]=C;return process.env.VSCODE_DEV&&(u=I(u)||[]),D(u,!0)}e.parseCLIProcessArgv=S;function b(C,...u){const p=C.indexOf("--");return p===-1?C.push(...u):C.splice(p,0,...u),C}e.addArg=b;function P(C){return C.VSCODE_CLI==="1"}e.isLaunchedFromCli=P}),function(){"use strict";function z(e,E,t){function k(D,I){const f=R(D,I),S=[f];return e.isAbsolute(f)||S.unshift(t),e.resolve(...S)}function R(D,I){process.env.VSCODE_DEV&&(I="code-oss-dev");const f=process.env.VSCODE_PORTABLE;if(f)return e.join(f,"user-data");let S=process.env.VSCODE_APPDATA;if(S)return e.join(S,I);const b=D["user-data-dir"];if(b)return b;switch(process.platform){case"win32":if(S=process.env.APPDATA,!S){const P=process.env.USERPROFILE;if(typeof P!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");S=e.join(P,"AppData","Roaming")}break;case"darwin":S=e.join(E.homedir(),"Library","Application Support");break;case"linux":S=process.env.XDG_CONFIG_HOME||e.join(E.homedir(),".config");break;default:throw new Error("Platform not supported")}return e.join(S,I)}return{getUserDataPath:k}}if(typeof define=="function")define(ee[181],ie([182,27,32]),function(e,E,t){return z(e,E,t.cwd())});else if(typeof module=="object"&&typeof module.exports=="object"){const e=require("path"),E=require("os");module.exports=z(e,E,process.env.VSCODE_CWD||process.cwd())}else throw new Error("Unknown context")}(),define(ee[183],ie([0,1,27,179,181]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeEnvironmentService=void 0;class R extends t.AbstractNativeEnvironmentService{constructor(I,f){super(I,{homeDir:(0,E.homedir)(),tmpDir:(0,E.tmpdir)(),userDataDir:(0,k.getUserDataPath)(I,f.nameShort)},f)}}e.NativeEnvironmentService=R}),define(ee[184],ie([0,1,40,27,30]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWaitMarkerFileSync=void 0;function R(D){const I=(0,k.randomPath)((0,t.tmpdir)());try{return(0,E.writeFileSync)(I,""),D&&console.log(`Marker file for --wait created: ${I}`),I}catch(f){D&&console.error(`Failed to create marker file for --wait: ${f}`);return}}e.createWaitMarkerFileSync=R}),define(ee[185],ie([0,1,12,153]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function k(D,I,f){try{R(D,I,f)}catch{}return D}e.localizeManifest=k;function R(D,I,f){const S=(b,P,C)=>{const u=b[P];if((0,E.isString)(u)){const p=u,w=p.length;if(w>1&&p[0]==="%"&&p[w-1]==="%"){const g=p.substr(1,w-2);let h=I[g];h===void 0&&f&&(h=f[g]);const v=typeof h=="string"?h:h.message;if(v!==void 0){const m=f?.[g],d=typeof m=="string"?m:m?.message;if(C&&(P==="title"||P==="category")&&d&&d!==v){const l={value:v,original:d};b[P]=l}else b[P]=v}else console.warn(`[${D.name}]: ${(0,t.localize)(0,null,g)}`)}}else if((0,E.isObject)(u))for(const p in u)u.hasOwnProperty(p)&&(p==="commands"?S(u,p,!0):S(u,p,C));else if(Array.isArray(u))for(let p=0;p=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,I=/^-(\d{4})(\d{2})(\d{2})$/;function f(h){return h=h.trim(),h==="*"||D.test(h)}e.isValidVersionStr=f;function S(h){if(!f(h))return null;if(h=h.trim(),h==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const v=h.match(D);return v?{hasCaret:v[1]==="^",hasGreaterEquals:v[1]===">=",majorBase:v[2]==="x"?0:parseInt(v[2],10),majorMustEqual:v[2]!=="x",minorBase:v[4]==="x"?0:parseInt(v[4],10),minorMustEqual:v[4]!=="x",patchBase:v[6]==="x"?0:parseInt(v[6],10),patchMustEqual:v[6]!=="x",preRelease:v[8]||null}:null}e.parseVersion=S;function b(h){if(!h)return null;const v=h.majorBase,m=h.majorMustEqual,d=h.minorBase;let l=h.minorMustEqual;const n=h.patchBase;let s=h.patchMustEqual;h.hasCaret&&(v===0||(l=!1),s=!1);let i=0;if(h.preRelease){const o=I.exec(h.preRelease);if(o){const[,r,c,a]=o;i=Date.UTC(Number(r),Number(c)-1,Number(a))}}return{majorBase:v,majorMustEqual:m,minorBase:d,minorMustEqual:l,patchBase:n,patchMustEqual:s,isMinimum:h.hasGreaterEquals,notBefore:i}}e.normalizeVersion=b;function P(h,v,m){let d;typeof h=="string"?d=b(S(h)):d=h;let l;v instanceof Date?l=v.getTime():typeof v=="string"&&(l=new Date(v).getTime());let n;if(typeof m=="string"?n=b(S(m)):n=m,!d||!n)return!1;const s=d.majorBase,i=d.minorBase,o=d.patchBase;let r=n.majorBase,c=n.minorBase,a=n.patchBase;const y=n.notBefore;let M=n.majorMustEqual,T=n.minorMustEqual,_=n.patchMustEqual;return n.isMinimum?s>r?!0:sc?!0:i=a:(s===1&&r===0&&(!M||!T||!_)&&(r=1,c=0,a=0,M=!0,T=!1,_=!1),sr?!M:ic?!T:oa?!_:!(l&&l"u"&&typeof d.browser>"u")return n.push([t.default.Error,k.localize(7,null,"activationEvents","main")]),n}if(typeof d.extensionKind<"u"&&typeof d.main>"u"&&n.push([t.default.Warning,k.localize(8,null,"extensionKind")]),typeof d.main<"u"){if(typeof d.main!="string")return n.push([t.default.Error,k.localize(9,null,"main")]),n;{const o=(0,E.joinPath)(m,d.main);(0,E.isEqualOrParent)(o,m)||n.push([t.default.Warning,k.localize(10,null,o.path,m.path)])}if(typeof d.activationEvents>"u")return n.push([t.default.Error,k.localize(11,null,"activationEvents","main")]),n}if(typeof d.browser<"u"){if(typeof d.browser!="string")return n.push([t.default.Error,k.localize(12,null,"browser")]),n;{const o=(0,E.joinPath)(m,d.browser);(0,E.isEqualOrParent)(o,m)||n.push([t.default.Warning,k.localize(13,null,o.path,m.path)])}if(typeof d.activationEvents>"u")return n.push([t.default.Error,k.localize(14,null,"activationEvents","browser")]),n}if(!R.valid(d.version))return n.push([t.default.Error,k.localize(15,null)]),n;const s=[];if(!u(h,v,d,l,s))for(const o of s)n.push([t.default.Error,o]);return n}e.validateExtensionManifest=C;function u(h,v,m,d,l){return d||typeof m.main>"u"&&typeof m.browser>"u"?!0:w(h,v,m.engines.vscode,l)}e.isValidExtensionVersion=u;function p(h,v,m){return h==="*"||w(v,m,h)}e.isEngineValid=p;function w(h,v,m,d=[]){const l=b(S(m));if(!l)return d.push(k.localize(16,null,m)),!1;if(l.majorBase===0){if(!l.majorMustEqual||!l.minorMustEqual)return d.push(k.localize(17,null,m)),!1}else if(!l.majorMustEqual)return d.push(k.localize(18,null,m)),!1;return P(h,v,l)?!0:(d.push(k.localize(19,null,h,m)),!1)}function g(h){if(!Array.isArray(h))return!1;for(let v=0,m=h.length;v incoming)[${[...I.incoming.keys()].join(", ")}] (outgoing ->)[${[...I.outgoing.keys()].join(",")}] `);return R.join(` `)}findCycleSlow(){for(const[R,D]of this._nodes){const I=new Set([R]),f=this._findCycle(D,I);if(f)return f}}_findCycle(R,D){for(const[I,f]of R.outgoing){if(D.has(I))return[...D,I].join(" -> ");D.add(I);const S=this._findCycle(f,D);if(S)return S;D.delete(I)}}}e.Graph=t}),define(ee[5],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var E;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function I(f){return f[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=I})(E=e._util||(e._util={})),e.IInstantiationService=k("instantiationService");function t(D,I,f){I[E.DI_TARGET]===I?I[E.DI_DEPENDENCIES].push({id:D,index:f}):(I[E.DI_DEPENDENCIES]=[{id:D,index:f}],I[E.DI_TARGET]=I)}function k(D){if(E.serviceIds.has(D))return E.serviceIds.get(D);const I=function(f,S,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");t(I,f,b)};return I.toString=()=>D,E.serviceIds.set(D,I),I}e.createDecorator=k;function R(D){return D}e.refineServiceDecorator=R}),define(ee[60],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupMainService=void 0,e.IBackupMainService=(0,E.createDecorator)("backupMainService")}),define(ee[19],ie([0,1,12,7,5]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getMigratedSettingValue=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,k.createDecorator)("configurationService");function R(h){return h&&typeof h=="object"&&(!h.overrideIdentifier||typeof h.overrideIdentifier=="string")&&(!h.resource||h.resource instanceof t.URI)}e.isConfigurationOverrides=R;function D(h){return h&&typeof h=="object"&&(!h.overrideIdentifiers||Array.isArray(h.overrideIdentifiers))&&!h.overrideIdentifier&&(!h.resource||h.resource instanceof t.URI)}e.isConfigurationUpdateOverrides=D;var I;(function(h){h[h.APPLICATION=1]="APPLICATION",h[h.USER=2]="USER",h[h.USER_LOCAL=3]="USER_LOCAL",h[h.USER_REMOTE=4]="USER_REMOTE",h[h.WORKSPACE=5]="WORKSPACE",h[h.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",h[h.DEFAULT=7]="DEFAULT",h[h.MEMORY=8]="MEMORY"})(I=e.ConfigurationTarget||(e.ConfigurationTarget={}));function f(h){switch(h){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=f;function S(h,v){const m=Object.create(null);for(const d in h)b(m,d,h[d],v);return m}e.toValuesTree=S;function b(h,v,m,d){const l=v.split("."),n=l.pop();let s=h;for(let i=0;i"u"?m:n}e.getConfigurationValue=u;function p(h,v,m){Object.keys(v).forEach(d=>{d!=="__proto__"&&(d in h?E.isObject(h[d])&&E.isObject(v[d])?p(h[d],v[d],m):m&&(h[d]=v[d]):h[d]=v[d])})}e.merge=p;function w(h,v,m){const d=h.inspect(v),l=h.inspect(m);return typeof d.userValue<"u"||typeof d.workspaceValue<"u"||typeof d.workspaceFolderValue<"u"?d.value:typeof l.userValue<"u"||typeof l.workspaceValue<"u"||typeof l.workspaceFolderValue<"u"?l.value:d.defaultValue}e.getMigratedSettingValue=w;function g(h){return h.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=g}),define(ee[70],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryCredentialsProvider=e.ICredentialsMainService=e.ICredentialsService=void 0,e.ICredentialsService=(0,E.createDecorator)("credentialsService"),e.ICredentialsMainService=(0,E.createDecorator)("credentialsMainService");class t{constructor(){this.secretVault={}}async getPassword(R,D){return this.secretVault[R]?.[D]??null}async setPassword(R,D,I){this.secretVault[R]=this.secretVault[R]??{},this.secretVault[R][D]=I}async deletePassword(R,D){return this.secretVault[R]?.[D]?(delete this.secretVault[R][D],Object.keys(this.secretVault[R]).length===0&&delete this.secretVault[R],!0):!1}async findPassword(R){return JSON.stringify(this.secretVault[R])??null}async findCredentials(R){const D=[];for(const I of Object.keys(this.secretVault[R]||{}))D.push({account:I,password:this.secretVault[R][I]});return D}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=t}),define(ee[85],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullDiagnosticsService=e.isRemoteDiagnosticError=e.IDiagnosticsService=e.ID=void 0,e.ID="diagnosticsService",e.IDiagnosticsService=(0,E.createDecorator)(e.ID);function t(R){return!!R.hostName&&!!R.errorMessage}e.isRemoteDiagnosticError=t;class k{async getPerformanceInfo(D,I){return{}}async getSystemInfo(D,I){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(D,I){return""}async getWorkspaceFileExtensions(D){return{extensions:[]}}async reportWorkspaceStats(D){}}e.NullDiagnosticsService=k}),define(ee[106],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEncryptionMainService=void 0,e.IEncryptionMainService=(0,E.createDecorator)("encryptionMainService")}),define(ee[34],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,E.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,E.refineServiceDecorator)(e.IEnvironmentService)}),define(ee[26],ie([0,1,53,9,84,34,183,5]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentMainService=e.IEnvironmentMainService=void 0,e.IEnvironmentMainService=(0,I.refineServiceDecorator)(R.IEnvironmentService);class f extends D.NativeEnvironmentService{get cachedLanguagesPath(){return(0,t.join)(this.userDataPath,"clp")}get backupHome(){return(0,t.join)(this.userDataPath,"Backups")}get mainIPCHandle(){return(0,k.createStaticIPCHandle)(this.userDataPath,"main",this.productService.version)}get mainLockfile(){return(0,t.join)(this.userDataPath,"code.lock")}get disableUpdates(){return!!this.args["disable-updates"]}get disableKeytar(){return!!this.args["disable-keytar"]}get crossOriginIsolated(){return!!this.args["enable-coi"]}get codeCachePath(){return process.env.VSCODE_CODE_CACHE_PATH||void 0}get useCodeCache(){return!!this.codeCachePath}}we([E.memoize],f.prototype,"cachedLanguagesPath",null),we([E.memoize],f.prototype,"backupHome",null),we([E.memoize],f.prototype,"mainIPCHandle",null),we([E.memoize],f.prototype,"mainLockfile",null),we([E.memoize],f.prototype,"disableUpdates",null),we([E.memoize],f.prototype,"disableKeytar",null),we([E.memoize],f.prototype,"crossOriginIsolated",null),we([E.memoize],f.prototype,"codeCachePath",null),we([E.memoize],f.prototype,"useCodeCache",null),e.EnvironmentMainService=f}),define(ee[191],ie([0,1,152,5]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.PreferencesLabel=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension";function k(h){switch(h){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=k;function R(h){switch(h){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=R;function D(h,v){switch(h){case 3:return v==="x64"?"win32-x64":v==="ia32"?"win32-ia32":v==="arm64"?"win32-arm64":"unknown";case 2:return v==="x64"?"linux-x64":v==="arm64"?"linux-arm64":v==="arm"?"linux-armhf":"unknown";case"alpine":return v==="x64"?"alpine-x64":v==="arm64"?"alpine-arm64":"unknown";case 1:return v==="x64"?"darwin-x64":v==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=D;function I(h,v){return v==="web"&&!h.includes("web")}e.isNotWebExtensionInWebTargetPlatform=I;function f(h,v,m){return I(v,m)?!1:h==="undefined"||h==="universal"?!0:h==="unknown"?!1:h===m?!0:S(m).includes(h)}e.isTargetPlatformCompatible=f;function S(h){switch(h){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=S;function b(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(!h.uuid||typeof h.uuid=="string")}e.isIExtensionIdentifier=b;var P;(function(h){h[h.NoneOrRelevance=0]="NoneOrRelevance",h[h.LastUpdatedDate=1]="LastUpdatedDate",h[h.Title=2]="Title",h[h.PublisherName=3]="PublisherName",h[h.InstallCount=4]="InstallCount",h[h.PublishedDate=10]="PublishedDate",h[h.AverageRating=6]="AverageRating",h[h.WeightedRating=12]="WeightedRating"})(P=e.SortBy||(e.SortBy={}));var C;(function(h){h[h.Default=0]="Default",h[h.Ascending=1]="Ascending",h[h.Descending=2]="Descending"})(C=e.SortOrder||(e.SortOrder={}));var u;(function(h){h.Install="install",h.Uninstall="uninstall"})(u=e.StatisticType||(e.StatisticType={}));var p;(function(h){h[h.None=1]="None",h[h.Install=2]="Install",h[h.Update=3]="Update",h[h.Migrate=4]="Migrate"})(p=e.InstallOperation||(e.InstallOperation={})),e.IExtensionGalleryService=(0,t.createDecorator)("extensionGalleryService");var w;(function(h){h.Unsupported="Unsupported",h.Deprecated="Deprecated",h.Malicious="Malicious",h.Incompatible="Incompatible",h.IncompatiblePreRelease="IncompatiblePreRelease",h.IncompatibleTargetPlatform="IncompatibleTargetPlatform",h.ReleaseVersionNotFound="ReleaseVersionNotFound",h.Invalid="Invalid",h.Download="Download",h.Extract="Extract",h.Delete="Delete",h.Rename="Rename",h.CorruptZip="CorruptZip",h.IncompleteZip="IncompleteZip",h.Internal="Internal",h.Signature="Signature"})(w=e.ExtensionManagementErrorCode||(e.ExtensionManagementErrorCode={}));class g extends Error{constructor(v,m){super(v),this.code=m,this.name=m}}e.ExtensionManagementError=g,e.IExtensionManagementService=(0,t.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,t.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,t.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,E.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLabel=(0,E.localize)(1,null),e.PreferencesLocalizedLabel={value:e.PreferencesLabel,original:"Preferences"}}),define(ee[192],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,E.createDecorator)("extensionUrlTrustService")}),define(ee[193],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcExtensionHostStarterChannelName=e.IExtensionHostStarter=void 0,e.IExtensionHostStarter=(0,E.createDecorator)("extensionHostStarter"),e.ipcExtensionHostStarterChannelName="extensionHostStarter"}),define(ee[107],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=e.DEFAULT_TERMINAL_OSX=e.IExternalTerminalService=void 0,e.IExternalTerminalService=(0,E.createDecorator)("externalTerminal"),e.DEFAULT_TERMINAL_OSX="Terminal.app",e.IExternalTerminalMainService=(0,E.createDecorator)("externalTerminal")}),define(ee[194],ie([0,1,45,14,9,4,80,23,83,156,107]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxExternalTerminalService=e.MacExternalTerminalService=e.WindowsExternalTerminalService=void 0;const P=S.localize(0,null);class C{async getDefaultTerminalForPlatforms(){return{windows:u.getDefaultTerminalWindows(),linux:await w.getDefaultTerminalLinuxReady(),osx:"xterm"}}}class u extends C{openTerminal(d,l){return this.spawnTerminal(E,d,f.getWindowsShell(),l)}spawnTerminal(d,l,n,s){const i=l.windowsExec||u.getDefaultTerminalWindows();s&&s[1]===":"&&(s=s[0].toUpperCase()+s.substr(1));const o=k.basename(i).toLowerCase();if(o==="cmder"||o==="cmder.exe")return d.spawn(i,s?[s]:void 0),Promise.resolve(void 0);const r=["/c","start","/wait"];return i.indexOf(" ")>=0&&r.push('""'),r.push(i),(o==="wt"||o==="wt.exe")&&r.push("-d ."),new Promise((c,a)=>{const y=g(process),M=d.spawn(n,r,{cwd:s,env:y});M.on("error",a),M.on("exit",()=>c())})}runInTerminal(d,l,n,s,i){const o="windowsExec"in i&&i.windowsExec?i.windowsExec:u.getDefaultTerminalWindows();return new Promise((r,c)=>{const a=`"${l} - ${P}"`,y=`""${n.join('" "')}" & pause"`,M=["/c","start",a,"/wait",o,"/c",y],T=Object.assign({},g(process),s);Object.keys(T).filter(G=>T[G]===null).forEach(G=>delete T[G]);const _={cwd:l,env:T,windowsVerbatimArguments:!0};E.spawn(u.CMD,M,_).on("error",G=>{c(h(G))}),r(void 0)})}static getDefaultTerminalWindows(){if(!u._DEFAULT_TERMINAL_WINDOWS){const d=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");u._DEFAULT_TERMINAL_WINDOWS=`${process.env.windir?process.env.windir:"C:\\Windows"}\\${d?"Sysnative":"System32"}\\cmd.exe`}return u._DEFAULT_TERMINAL_WINDOWS}}e.WindowsExternalTerminalService=u,u.CMD="cmd.exe";class p extends C{openTerminal(d,l){return this.spawnTerminal(E,d,l)}runInTerminal(d,l,n,s,i){const o=i.osxExec||b.DEFAULT_TERMINAL_OSX;return new Promise((r,c)=>{if(o===b.DEFAULT_TERMINAL_OSX||o==="iTerm.app"){const a=o===b.DEFAULT_TERMINAL_OSX?"TerminalHelper":"iTermHelper",M=[t.FileAccess.asFileUri(`vs/workbench/contrib/externalTerminal/node/${a}.scpt`,z).fsPath,"-t",d||P,"-w",l];for(const Y of n)M.push("-a"),M.push(Y);if(s){const Y=Object.assign({},g(process),s);for(const G in Y){const V=Y[G];V===null?(M.push("-u"),M.push(G)):(M.push("-e"),M.push(`${G}=${V}`))}}let T="";const _=E.spawn(p.OSASCRIPT,M);_.on("error",Y=>{c(h(Y))}),_.stderr.on("data",Y=>{T+=Y.toString()}),_.on("exit",Y=>{if(Y===0)r(void 0);else if(T){const G=T.split(` `,1);c(new Error(G[0]))}else c(new Error(S.localize(1,null,a,Y)))})}else c(new Error(S.localize(2,null,o)))})}spawnTerminal(d,l,n){const s=l.osxExec||b.DEFAULT_TERMINAL_OSX;return new Promise((i,o)=>{const r=["-a",s];n&&r.push(n);const c=g(process),a=d.spawn("/usr/bin/open",r,{cwd:n,env:c});a.on("error",o),a.on("exit",()=>i())})}}e.MacExternalTerminalService=p,p.OSASCRIPT="/usr/bin/osascript";class w extends C{openTerminal(d,l){return this.spawnTerminal(E,d,l)}runInTerminal(d,l,n,s,i){const o=i.linuxExec?Promise.resolve(i.linuxExec):w.getDefaultTerminalLinuxReady();return new Promise((r,c)=>{const a=[];o.then(y=>{y.indexOf("gnome-terminal")>=0?a.push("-x"):a.push("-e"),a.push("bash"),a.push("-c");const M=`${v(n)}; echo; read -p "${w.WAIT_MESSAGE}" -n1;`;a.push(`''${M}''`);const T=Object.assign({},g(process),s);Object.keys(T).filter(V=>T[V]===null).forEach(V=>delete T[V]);const _={cwd:l,env:T};let Y="";const G=E.spawn(y,a,_);G.on("error",V=>{c(h(V))}),G.stderr.on("data",V=>{Y+=V.toString()}),G.on("exit",V=>{if(V===0)r(void 0);else if(Y){const oe=Y.split(` `,1);c(new Error(oe[0]))}else c(new Error(S.localize(4,null,y,V)))})})})}static async getDefaultTerminalLinuxReady(){if(!w._DEFAULT_TERMINAL_LINUX_READY)if(!R.isLinux)w._DEFAULT_TERMINAL_LINUX_READY=Promise.resolve("xterm");else{const d=await I.Promises.exists("/etc/debian_version");w._DEFAULT_TERMINAL_LINUX_READY=new Promise(l=>{d?l("x-terminal-emulator"):process.env.DESKTOP_SESSION==="gnome"||process.env.DESKTOP_SESSION==="gnome-classic"?l("gnome-terminal"):process.env.DESKTOP_SESSION==="kde-plasma"?l("konsole"):process.env.COLORTERM?l(process.env.COLORTERM):process.env.TERM?l(process.env.TERM):l("xterm")})}return w._DEFAULT_TERMINAL_LINUX_READY}spawnTerminal(d,l,n){const s=l.linuxExec?Promise.resolve(l.linuxExec):w.getDefaultTerminalLinuxReady();return new Promise((i,o)=>{s.then(r=>{const c=g(process),a=d.spawn(r,[],{cwd:n,env:c});a.on("error",o),a.on("exit",()=>i())})})}}e.LinuxExternalTerminalService=w,w.WAIT_MESSAGE=S.localize(3,null);function g(m){const d={...m.env};return(0,D.sanitizeProcessEnvironment)(d),d}function h(m){return"errno"in m&&m.errno==="ENOENT"&&"path"in m&&typeof m.path=="string"?new Error(S.localize(5,null,m.path)):m}function v(m){let d="";for(const l of m)l.indexOf(" ")>=0?d+='"'+l+'"':d+=l,d+=" ";return d}}),define(ee[15],ie([0,1,58,9,25,12,7,158,5]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPlatformLimits=e.Arch=e.ByteSize=e.FALLBACK_MAX_MEMORY_SIZE_MB=e.MIN_MAX_MEMORY_SIZE_MB=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,f.createDecorator)("fileService");function S(K){return K.create===!0}e.isFileOpenForWriteOptions=S;var b;(function(K){K[K.Unknown=0]="Unknown",K[K.File=1]="File",K[K.Directory=2]="Directory",K[K.SymbolicLink=64]="SymbolicLink"})(b=e.FileType||(e.FileType={}));var P;(function(K){K[K.Readonly=1]="Readonly"})(P=e.FilePermission||(e.FilePermission={}));var C;(function(K){K[K.FileReadWrite=2]="FileReadWrite",K[K.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",K[K.FileReadStream=16]="FileReadStream",K[K.FileFolderCopy=8]="FileFolderCopy",K[K.PathCaseSensitive=1024]="PathCaseSensitive",K[K.Readonly=2048]="Readonly",K[K.Trash=4096]="Trash",K[K.FileWriteUnlock=8192]="FileWriteUnlock",K[K.FileAtomicRead=16384]="FileAtomicRead",K[K.FileClone=32768]="FileClone"})(C=e.FileSystemProviderCapabilities||(e.FileSystemProviderCapabilities={}));function u(K){return!!(K.capabilities&2)}e.hasReadWriteCapability=u;function p(K){return!!(K.capabilities&8)}e.hasFileFolderCopyCapability=p;function w(K){return!!(K.capabilities&32768)}e.hasFileCloneCapability=w;function g(K){return!!(K.capabilities&4)}e.hasOpenReadWriteCloseCapability=g;function h(K){return!!(K.capabilities&16)}e.hasFileReadStreamCapability=h;function v(K){return u(K)?!!(K.capabilities&16384):!1}e.hasFileAtomicReadCapability=v;var m;(function(K){K.FileExists="EntryExists",K.FileNotFound="EntryNotFound",K.FileNotADirectory="EntryNotADirectory",K.FileIsADirectory="EntryIsADirectory",K.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",K.FileTooLarge="EntryTooLarge",K.FileWriteLocked="EntryWriteLocked",K.NoPermissions="NoPermissions",K.Unavailable="Unavailable",K.Unknown="Unknown"})(m=e.FileSystemProviderErrorCode||(e.FileSystemProviderErrorCode={}));class d extends Error{constructor(q,F){super(q),this.code=F}}e.FileSystemProviderError=d;function l(K,q){const F=new d(K.toString(),q);return s(F,q),F}e.createFileSystemProviderError=l;function n(K){return K||l((0,I.localize)(0,null),m.Unknown)}e.ensureFileSystemProviderError=n;function s(K,q){return K.name=q?`${q} (FileSystemError)`:"FileSystemError",K}e.markAsFileSystemProviderError=s;function i(K){if(!K)return m.Unknown;if(K instanceof d)return K.code;const q=/^(.+) \(FileSystemError\)$/.exec(K.name);if(!q)return m.Unknown;switch(q[1]){case m.FileExists:return m.FileExists;case m.FileIsADirectory:return m.FileIsADirectory;case m.FileNotADirectory:return m.FileNotADirectory;case m.FileNotFound:return m.FileNotFound;case m.FileExceedsMemoryLimit:return m.FileExceedsMemoryLimit;case m.FileTooLarge:return m.FileTooLarge;case m.FileWriteLocked:return m.FileWriteLocked;case m.NoPermissions:return m.NoPermissions;case m.Unavailable:return m.Unavailable}return m.Unknown}e.toFileSystemProviderErrorCode=i;function o(K){if(K instanceof T)return K.fileOperationResult;switch(i(K)){case m.FileNotFound:return 1;case m.FileIsADirectory:return 0;case m.FileNotADirectory:return 10;case m.FileWriteLocked:return 5;case m.NoPermissions:return 6;case m.FileExists:return 4;case m.FileExceedsMemoryLimit:return 9;case m.FileTooLarge:return 7;default:return 11}}e.toFileOperationResult=o;var r;(function(K){K[K.CREATE=0]="CREATE",K[K.DELETE=1]="DELETE",K[K.MOVE=2]="MOVE",K[K.COPY=3]="COPY",K[K.WRITE=4]="WRITE"})(r=e.FileOperation||(e.FileOperation={}));class c{constructor(q,F,A){this.resource=q,this.operation=F,this.target=A}isOperation(q){return this.operation===q}}e.FileOperationEvent=c;var a;(function(K){K[K.UPDATED=0]="UPDATED",K[K.ADDED=1]="ADDED",K[K.DELETED=2]="DELETED"})(a=e.FileChangeType||(e.FileChangeType={}));class y{constructor(q,F){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawChanges=[],this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[],this.rawChanges=q;const A=new Map;for(const O of q){const U=A.get(O.type);switch(U?U.push([O.resource,O]):A.set(O.type,[[O.resource,O]]),O.type){case 1:this.rawAdded.push(O.resource);break;case 0:this.rawUpdated.push(O.resource);break;case 2:this.rawDeleted.push(O.resource);break}}for(const[O,U]of A)switch(O){case 1:this.added=E.TernarySearchTree.forUris(()=>F),this.added.fill(U);break;case 0:this.updated=E.TernarySearchTree.forUris(()=>F),this.updated.fill(U);break;case 2:this.deleted=E.TernarySearchTree.forUris(()=>F),this.deleted.fill(U);break}}contains(q,...F){return this.doContains(q,{includeChildren:!1},...F)}affects(q,...F){return this.doContains(q,{includeChildren:!0},...F)}doContains(q,F,...A){if(!q)return!1;const O=A.length>0;return!!((!O||A.includes(1))&&(this.added?.get(q)||F.includeChildren&&this.added?.findSuperstr(q))||(!O||A.includes(0))&&(this.updated?.get(q)||F.includeChildren&&this.updated?.findSuperstr(q))||(!O||A.includes(2))&&(this.deleted?.findSubstr(q)||F.includeChildren&&this.deleted?.findSuperstr(q)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=y;function M(K,q,F){return!K||!q||K===q||q.length>K.length?!1:(q.charAt(q.length-1)!==t.sep&&(q+=t.sep),F?(0,k.startsWithIgnoreCase)(K,q):K.indexOf(q)===0)}e.isParent=M;class T extends Error{constructor(q,F,A){super(q),this.fileOperationResult=F,this.options=A}}e.FileOperationError=T;class _ extends T{constructor(q,F,A){super(q,2,A),this.stat=F}}e.NotModifiedSinceFileOperationError=_;var Y;(function(K){K[K.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",K[K.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",K[K.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",K[K.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",K[K.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",K[K.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",K[K.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",K[K.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",K[K.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",K[K.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",K[K.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",K[K.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"})(Y=e.FileOperationResult||(e.FileOperationResult={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude";var G;(function(K){K[K.FILE=0]="FILE",K[K.FOLDER=1]="FOLDER",K[K.ROOT_FOLDER=2]="ROOT_FOLDER"})(G=e.FileKind||(e.FileKind={})),e.ETAG_DISABLED="";function V(K){if(!(typeof K.size!="number"||typeof K.mtime!="number"))return K.mtime.toString(29)+K.size.toString(31)}e.etag=V;async function oe(K,q){if(!q.hasProvider(D.URI.from({scheme:K.scheme})))return new Promise(F=>{const A=q.onDidChangeFileSystemProviderRegistrations(O=>{O.scheme===K.scheme&&O.added&&(A.dispose(),F())})})}e.whenProviderRegistered=oe,e.MIN_MAX_MEMORY_SIZE_MB=2048,e.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class se{static formatSize(q){return(0,R.isNumber)(q)||(q=0),qE.VSBuffer.concat(v.map(m=>E.VSBuffer.wrap(m))).buffer),h=this.channel.listen("readFileStream",[u,p])(v=>{if(v instanceof E.VSBuffer)g.write(v.buffer);else{if(v==="end")g.end();else{let m=v;m instanceof Error||(m=(0,b.createFileSystemProviderError)((0,t.toErrorMessage)(m),b.FileSystemProviderErrorCode.Unknown)),g.error(m),g.end()}h.dispose()}});return w.onCancellationRequested(()=>{g.error((0,k.canceled)()),g.end(),h.dispose()}),g}writeFile(u,p,w){return this.channel.call("writeFile",[u,E.VSBuffer.wrap(p),w])}open(u,p){return this.channel.call("open",[u,p])}close(u){return this.channel.call("close",[u])}async read(u,p,w,g,h){const[v,m]=await this.channel.call("read",[u,p,h]);return w.set(v.buffer.slice(0,m),g),m}write(u,p,w,g,h){return this.channel.call("write",[u,p,E.VSBuffer.wrap(w),g,h])}mkdir(u){return this.channel.call("mkdir",[u])}delete(u,p){return this.channel.call("delete",[u,p])}rename(u,p,w){return this.channel.call("rename",[u,p,w])}copy(u,p,w){return this.channel.call("copy",[u,p,w])}cloneFile(u,p){return this.channel.call("cloneFile",[u,p])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(u=>{if(Array.isArray(u)){const p=u;this._onDidChange.fire(p.map(w=>({resource:f.URI.revive(w.resource),type:w.type})))}else{const p=u;this._onDidWatchError.fire(p)}}))}watch(u,p){const w=(0,S.generateUuid)();return this.channel.call("watch",[this.sessionId,w,u,p]),(0,D.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,w]))}}e.DiskFileSystemProviderClient=P}),define(ee[108],ie([0,1,17,16,159,15]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function D(b,P,C,u,p,w){let g;try{await I(b,P,C,u,p,w)}catch(h){g=h}finally{g&&p.errorTransformer&&(g=p.errorTransformer(g)),typeof g<"u"&&C.error(g),C.end()}}e.readFileIntoStream=D;async function I(b,P,C,u,p,w){f(w);const g=await b.open(P,{create:!1});try{f(w);let h=0,v=0,m=p&&typeof p.length=="number"?p.length:void 0,d=E.VSBuffer.alloc(Math.min(p.bufferSize,typeof m=="number"?m:p.bufferSize)),l=p&&typeof p.position=="number"?p.position:0,n=0;do v=await b.read(g,l,d.buffer,n,d.byteLength-n),l+=v,n+=v,h+=v,typeof m=="number"&&(m-=v),n===d.byteLength&&(await C.write(u(d)),d=E.VSBuffer.alloc(Math.min(p.bufferSize,typeof m=="number"?m:p.bufferSize)),n=0);while(v>0&&(typeof m!="number"||m>0)&&f(w)&&S(h,p));if(n>0){let s=n;typeof m=="number"&&(s=Math.min(n,m)),C.write(u(d.slice(0,s)))}}catch(h){throw(0,R.ensureFileSystemProviderError)(h)}finally{await b.close(g)}}function f(b){if(b.isCancellationRequested)throw(0,t.canceled)();return!0}function S(b,P){if(P?.limits){if(typeof P.limits.memory=="number"&&b>P.limits.memory)throw(0,R.createFileSystemProviderError)((0,k.localize)(0,null),R.FileSystemProviderErrorCode.FileExceedsMemoryLimit);if(typeof P.limits.size=="number"&&b>P.limits.size)throw(0,R.createFileSystemProviderError)((0,k.localize)(1,null),R.FileSystemProviderErrorCode.FileTooLarge)}return!0}}),define(ee[71],ie([0,1,99,2,9,4,7,15]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWatcherPatterns=e.normalizeWatcherPattern=e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function f(h){return h.recursive===!0}e.isRecursiveWatchRequest=f;class S extends t.Disposable{constructor(v,m,d,l){super(),this.onFileChanges=v,this.onLogMessage=m,this.verboseLogging=d,this.options=l,this.watcherDisposables=this._register(new t.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const v=new t.DisposableStore;this.watcherDisposables.value=v,this.watcher=this.createWatcher(v),this.watcher.setVerboseLogging(this.verboseLogging),v.add(this.watcher.onDidChangeFile(m=>this.onFileChanges(m))),v.add(this.watcher.onDidLogMessage(m=>this.onLogMessage(m))),v.add(this.watcher.onDidError(m=>this.onError(m)))}onError(v){this.options.restartOnError?this.restartCounter({type:v.type,resource:D.URI.file(v.path)}))}e.toFileChanges=C;function u(h){const v=new g;for(const m of h)v.processEvent(m);return v.coalesce()}e.coalesceEvents=u;function p(h,v){return typeof v=="string"&&!v.startsWith(E.GLOBSTAR)&&!(0,k.isAbsolute)(v)?{base:h,pattern:v}:v}e.normalizeWatcherPattern=p;function w(h,v){const m=[];for(const d of v)m.push((0,E.parse)(p(h,d)));return m}e.parseWatcherPatterns=w;class g{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(v){return R.isLinux?v.path:v.path.toLowerCase()}processEvent(v){const m=this.mapPathToChange.get(this.toKey(v));let d=!1;if(m){const l=m.type,n=v.type;m.path!==v.path&&(v.type===2||v.type===1)?d=!0:l===1&&n===2?(this.mapPathToChange.delete(this.toKey(v)),this.coalesced.delete(m)):l===2&&n===1?m.type=0:l===1&&n===0||(m.type=n)}else d=!0;d&&(this.coalesced.add(v),this.mapPathToChange.set(this.toKey(v),v))}coalesce(){const v=[],m=[];return Array.from(this.coalesced).filter(d=>d.type!==2?(v.push(d),!1):!0).sort((d,l)=>d.path.length-l.path.length).filter(d=>m.some(l=>(0,I.isParent)(d.path,l,!R.isLinux))?!1:(m.push(d.path),!0)).concat(v)}}}),define(ee[196],ie([0,1,40,8,22,30,2,77,9,4,100,23,71]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchFileContents=e.NodeJSFileWatcherLibrary=void 0;class u extends D.Disposable{constructor(g,h,v,m){super(),this.request=g,this.onDidFilesChange=h,this.onLogMessage=v,this.verboseLogging=m,this.throttledFileChangesWorker=new t.ThrottledWorker({maxWorkChunkSize:100,throttleDelay:200,maxBufferedWork:1e4},d=>this.onDidFilesChange(d)),this.fileChangesDelayer=this._register(new t.ThrottledDelayer(u.FILE_CHANGES_HANDLER_DELAY)),this.fileChangesBuffer=[],this.excludes=(0,C.parseWatcherPatterns)(this.request.path,this.request.excludes),this.includes=this.request.includes?(0,C.parseWatcherPatterns)(this.request.path,this.request.includes):void 0,this.cts=new k.CancellationTokenSource,this.ready=this.watch()}async watch(){try{const g=await this.normalizePath(this.request);if(this.cts.token.isCancellationRequested)return;const h=await P.Promises.stat(g);this._register(await this.doWatch(g,h.isDirectory()))}catch(g){g.code!=="ENOENT"?this.error(g):this.trace(g)}}async normalizePath(g){let h=g.path;try{h=await P.Promises.realpath(g.path),g.path===h&&(h=await(0,b.realcase)(g.path)??g.path),g.path!==h&&this.trace(`correcting a path to watch that seems to be a symbolic link or wrong casing (original: ${g.path}, real: ${h})`)}catch{}return h}async doWatch(g,h){if(S.isMacintosh&&(0,R.isEqualOrParent)(g,"/Volumes/",!0))return this.error(`Refusing to watch ${g} for changes using fs.watch() for possibly being a network share where watching is unreliable and unstable.`),D.Disposable.None;const v=new k.CancellationTokenSource(this.cts.token),m=new D.DisposableStore;try{const d=(0,f.basename)(g),l=(0,E.watch)(g);m.add((0,D.toDisposable)(()=>{l.removeAllListeners(),l.close()})),this.trace(`Started watching: '${g}'`);const n=new Set;if(h)try{for(const i of await P.Promises.readdir(g))n.add(i)}catch(i){this.error(i)}const s=new Map;m.add((0,D.toDisposable)(()=>{for(const[,i]of s)i.dispose();s.clear()})),l.on("error",(i,o)=>{this.error(`Failed to watch ${g} for changes using fs.watch() (${i}, ${o})`),this.dispose()}),l.on("change",(i,o)=>{if(v.token.isCancellationRequested)return;this.trace(`[raw] ["${i}"] ${o}`);let r="";if(o&&(r=o.toString(),S.isMacintosh&&(r=(0,I.normalizeNFC)(r))),!(!r||i!=="change"&&i!=="rename"))if(h)if(i==="rename"){s.get(r)?.dispose();const c=setTimeout(async()=>{if(s.delete(r),r===d&&!await P.Promises.exists(g)){this.warn("Watcher shutdown because watched path got deleted"),this.dispose();return}const a=await this.existsChildStrictCase((0,f.join)(g,r));if(v.token.isCancellationRequested)return;let y;a?n.has(r)?y=0:(y=1,n.add(r)):(n.delete(r),y=2),this.onFileChange({path:(0,f.join)(this.request.path,r),type:y})},u.FILE_DELETE_HANDLER_DELAY);s.set(r,(0,D.toDisposable)(()=>clearTimeout(c)))}else{let c;n.has(r)?c=0:(c=1,n.add(r)),this.onFileChange({path:(0,f.join)(this.request.path,r),type:c})}else if(i==="rename"||r!==d){const c=setTimeout(async()=>{const a=await P.Promises.exists(g);v.token.isCancellationRequested||(a?(this.onFileChange({path:this.request.path,type:0},!0),m.add(await this.doWatch(g,!1))):(await this.onFileChange({path:this.request.path,type:2},!0),this.dispose()))},u.FILE_DELETE_HANDLER_DELAY);m.clear(),m.add((0,D.toDisposable)(()=>clearTimeout(c)))}else this.onFileChange({path:this.request.path,type:0},!0)})}catch(d){await P.Promises.exists(g)&&!v.token.isCancellationRequested&&this.error(`Failed to watch ${g} for changes using fs.watch() (${d.toString()})`)}return(0,D.toDisposable)(()=>{v.dispose(!0),m.dispose()})}async onFileChange(g,h=!1){if(!this.cts.token.isCancellationRequested){this.verboseLogging&&this.trace(`${g.type===1?"[ADDED]":g.type===2?"[DELETED]":"[CHANGED]"} ${g.path}`),!h&&this.excludes.some(v=>v(g.path))?this.verboseLogging&&this.trace(` >> ignored (excluded) ${g.path}`):!h&&this.includes&&this.includes.length>0&&!this.includes.some(v=>v(g.path))?this.verboseLogging&&this.trace(` >> ignored (not included) ${g.path}`):this.fileChangesBuffer.push(g);try{await this.fileChangesDelayer.trigger(async()=>{const v=this.fileChangesBuffer;this.fileChangesBuffer=[];const m=(0,C.coalesceEvents)(v);if(m.length>0){if(this.verboseLogging)for(const l of m)this.trace(`>> normalized ${l.type===1?"[ADDED]":l.type===2?"[DELETED]":"[CHANGED]"} ${l.path}`);this.throttledFileChangesWorker.work(m)?this.throttledFileChangesWorker.pending>0&&this.trace(`started throttling events due to large amount of file change events at once (pending: ${this.throttledFileChangesWorker.pending}, most recent change: ${m[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`):this.warn(`started ignoring events due to too many file change events at once (incoming: ${m.length}, most recent change: ${m[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`)}})}catch{}}}async existsChildStrictCase(g){if(S.isLinux)return P.Promises.exists(g);try{const h=(0,f.basename)(g);return(await P.Promises.readdir((0,f.dirname)(g))).some(m=>m===h)}catch(h){return this.trace(h),!1}}setVerboseLogging(g){this.verboseLogging=g}error(g){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"error",message:`[File Watcher (node.js)] ${g}`})}warn(g){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"warn",message:`[File Watcher (node.js)] ${g}`})}trace(g){!this.cts.token.isCancellationRequested&&this.verboseLogging&&this.onLogMessage?.({type:"trace",message:`[File Watcher (node.js)] ${g}`})}dispose(){this.trace(`stopping file watcher on ${this.request.path}`),this.cts.dispose(!0),super.dispose()}}e.NodeJSFileWatcherLibrary=u,u.FILE_DELETE_HANDLER_DELAY=100,u.FILE_CHANGES_HANDLER_DELAY=50;async function p(w,g,h,v,m=512){const d=await P.Promises.open(w,"r"),l=Buffer.allocUnsafe(m),n=new k.CancellationTokenSource(v);let s,i=!1;const o={path:w,excludes:[],recursive:!1},r=new u(o,c=>{(async()=>{for(const{type:a}of c)if(a===0){if(i)return;i=!0;try{for(;!n.token.isCancellationRequested;){const{bytesRead:y}=await P.Promises.read(d,l,0,m,null);if(!y||n.token.isCancellationRequested)break;g(l.slice(0,y))}}catch(y){s=new Error(y),n.dispose(!0)}finally{i=!1}}})()});return await r.ready,h(),new Promise((c,a)=>{n.token.onCancellationRequested(async()=>{r.dispose();try{await P.Promises.close(d)}catch(y){s=new Error(y)}s?a(s):c()})})}e.watchFileContents=p}),define(ee[197],ie([0,1,3,99,2,4,196]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcher=void 0;class I extends k.Disposable{constructor(){super(...arguments),this._onDidChangeFile=this._register(new E.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidLogMessage=this._register(new E.Emitter),this.onDidLogMessage=this._onDidLogMessage.event,this.onDidError=E.Event.None,this.watchers=new Map,this.verboseLogging=!1}async watch(S){const b=this.normalizeRequests(S),P=b.filter(u=>{const p=this.watchers.get(u.path);return p?!(0,t.patternsEquals)(p.request.excludes,u.excludes)||!(0,t.patternsEquals)(p.request.includes,u.includes):!0}),C=Array.from(this.watchers.values()).filter(({request:u})=>!b.find(p=>p.path===u.path&&(0,t.patternsEquals)(p.excludes,u.excludes)&&(0,t.patternsEquals)(p.includes,u.includes))).map(({request:u})=>u.path);P.length&&this.trace(`Request to start watching: ${P.map(u=>`${u.path} (excludes: ${u.excludes.length>0?u.excludes:""}, includes: ${u.includes&&u.includes.length>0?JSON.stringify(u.includes):""})`).join(",")}`),C.length&&this.trace(`Request to stop watching: ${C.join(",")}`);for(const u of C)this.stopWatching(u);for(const u of P)this.startWatching(u)}startWatching(S){const b=new D.NodeJSFileWatcherLibrary(S,C=>this._onDidChangeFile.fire(C),C=>this._onDidLogMessage.fire(C),this.verboseLogging),P={request:S,instance:b};this.watchers.set(S.path,P)}async stop(){for(const[S]of this.watchers)this.stopWatching(S);this.watchers.clear()}stopWatching(S){const b=this.watchers.get(S);b&&(this.watchers.delete(S),b.instance.dispose())}normalizeRequests(S){const b=new Map;for(const P of S){const C=R.isLinux?P.path:P.path.toLowerCase();b.set(C,P)}return Array.from(b.values())}async setVerboseLogging(S){this.verboseLogging=S;for(const[,b]of this.watchers)b.instance.setVerboseLogging(S)}trace(S){this.verboseLogging&&this._onDidLogMessage.fire({type:"trace",message:this.toMessage(S)})}toMessage(S,b){return b?`[File Watcher (node.js)] ${S} (path: ${b.request.path})`:`[File Watcher (node.js)] ${S}`}}e.NodeJSWatcher=I}),define(ee[198],ie([0,1,71,197]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcherClient=void 0;class k extends E.AbstractNonRecursiveWatcherClient{constructor(D,I,f){super(D,I,f),this.init()}createWatcher(){return new t.NodeJSWatcher}}e.NodeJSWatcherClient=k}),define(ee[199],ie([0,1,14,46,145,71]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class D extends R.AbstractUniversalWatcherClient{constructor(f,S,b){super(f,S,b),this.init()}createWatcher(f){const S=f.add(new k.Client(E.FileAccess.asFileUri("bootstrap-fork",z).fsPath,{serverName:"File Watcher",args:["--type=fileWatcher"],env:{VSCODE_AMD_ENTRYPOINT:"vs/platform/files/node/watcher/watcherMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true"}}));return f.add(S.onDidProcessExit(({code:b,signal:P})=>this.onError(`terminated by itself with code ${b}, signal: ${P}`))),t.ProxyChannel.toService((0,t.getNextTickChannel)(S.getChannel("watcher")))}}e.UniversalWatcherClient=D}),define(ee[86],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class E{constructor(...k){this._entries=new Map;for(const[R,D]of k)this.set(R,D)}set(k,R){const D=this._entries.get(k);return this._entries.set(k,R),D}has(k){return this._entries.has(k)}get(k){return this._entries.get(k)}}e.ServiceCollection=E}),define(ee[200],ie([0,1,8,16,2,69,190,5,86,95]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const b=!1;class P extends Error{constructor(g){super("cyclic dependency between services"),this.message=g.findCycleSlow()??`UNABLE to detect cycle, dumping graph: ${g.toString()}`}}class C{constructor(g=new f.ServiceCollection,h=!1,v,m=b){this._services=g,this._strict=h,this._parent=v,this._enableTracing=m,this._activeInstantiations=new Set,this._services.set(I.IInstantiationService,this),this._globalGraph=m?v?._globalGraph??new D.Graph(d=>d):void 0}createChild(g){return new C(g,this._strict,this,this._enableTracing)}invokeFunction(g,...h){const v=p.traceInvocation(this._enableTracing,g);let m=!1;try{return g({get:l=>{if(m)throw(0,t.illegalState)("service accessor is only valid during the invocation of its target method");const n=this._getOrCreateServiceInstance(l,v);if(!n)throw new Error(`[invokeFunction] unknown service '${l}'`);return n}},...h)}finally{m=!0,v.stop()}}createInstance(g,...h){let v,m;return g instanceof R.SyncDescriptor?(v=p.traceCreation(this._enableTracing,g.ctor),m=this._createInstance(g.ctor,g.staticArguments.concat(h),v)):(v=p.traceCreation(this._enableTracing,g),m=this._createInstance(g,h,v)),v.stop(),m}_createInstance(g,h=[],v){const m=I._util.getServiceDependencies(g).sort((n,s)=>n.index-s.index),d=[];for(const n of m){const s=this._getOrCreateServiceInstance(n.id,v);s||this._throwIfStrict(`[createInstance] ${g.name} depends on UNKNOWN service ${n.id}.`,!1),d.push(s)}const l=m.length>0?m[0].index:h.length;if(h.length!==l){console.trace(`[createInstance] First service dependency of ${g.name} at position ${l+1} conflicts with ${h.length} static arguments`);const n=l-h.length;n>0?h=h.concat(new Array(n)):h=h.slice(0,l)}return Reflect.construct(g,h.concat(d))}_setServiceInstance(g,h){if(this._services.get(g)instanceof R.SyncDescriptor)this._services.set(g,h);else if(this._parent)this._parent._setServiceInstance(g,h);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(g){const h=this._services.get(g);return!h&&this._parent?this._parent._getServiceInstanceOrDescriptor(g):h}_getOrCreateServiceInstance(g,h){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(g));const v=this._getServiceInstanceOrDescriptor(g);return v instanceof R.SyncDescriptor?this._safeCreateAndCacheServiceInstance(g,v,h.branch(g,!0)):(h.branch(g,!1),v)}_safeCreateAndCacheServiceInstance(g,h,v){if(this._activeInstantiations.has(g))throw new Error(`illegal state - RECURSIVELY instantiating service '${g}'`);this._activeInstantiations.add(g);try{return this._createAndCacheServiceInstance(g,h,v)}finally{this._activeInstantiations.delete(g)}}_createAndCacheServiceInstance(g,h,v){const m=new D.Graph(n=>n.id.toString());let d=0;const l=[{id:g,desc:h,_trace:v}];for(;l.length;){const n=l.pop();if(m.lookupOrInsertNode(n),d++>1e3)throw new P(m);for(const s of I._util.getServiceDependencies(n.desc.ctor)){const i=this._getServiceInstanceOrDescriptor(s.id);if(i||this._throwIfStrict(`[createInstance] ${g} depends on ${s.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(n.id),String(s.id)),i instanceof R.SyncDescriptor){const o={id:s.id,desc:i,_trace:n._trace.branch(s.id,!0)};m.insertEdge(n,o),l.push(o)}}}for(;;){const n=m.roots();if(n.length===0){if(!m.isEmpty())throw new P(m);break}for(const{data:s}of n){if(this._getServiceInstanceOrDescriptor(s.id)instanceof R.SyncDescriptor){const o=this._createServiceInstanceWithOwner(s.id,s.desc.ctor,s.desc.staticArguments,s.desc.supportsDelayedInstantiation,s._trace);this._setServiceInstance(s.id,o)}m.removeNode(s)}}return this._getServiceInstanceOrDescriptor(g)}_createServiceInstanceWithOwner(g,h,v=[],m,d){if(this._services.get(g)instanceof R.SyncDescriptor)return this._createServiceInstance(g,h,v,m,d);if(this._parent)return this._parent._createServiceInstanceWithOwner(g,h,v,m,d);throw new Error(`illegalState - creating UNKNOWN service instance ${h.name}`)}_createServiceInstance(g,h,v=[],m,d){if(m){const l=new C(void 0,this._strict,this,this._enableTracing);l._globalGraphImplicitDependency=String(g);const n=new Map,s=new E.IdleValue(()=>{const i=l._createInstance(h,v,d);for(const[o,r]of n){const c=i[o];if(typeof c=="function")for(const a of r)c.apply(i,a)}return n.clear(),i});return new Proxy(Object.create(null),{get(i,o){if(!s.isInitialized&&typeof o=="string"&&(o.startsWith("onDid")||o.startsWith("onWill"))){let a=n.get(o);return a||(a=new S.LinkedList,n.set(o,a)),(M,T,_)=>{const Y=a.push([M,T,_]);return(0,k.toDisposable)(Y)}}if(o in i)return i[o];const r=s.value;let c=r[o];return typeof c!="function"||(c=c.bind(r),i[o]=c),c},set(i,o,r){return s.value[o]=r,!0}})}else return this._createInstance(h,v,d)}_throwIfStrict(g,h){if(h&&console.warn(g),this._strict)throw new Error(g)}}e.InstantiationService=C;var u;(function(w){w[w.Creation=0]="Creation",w[w.Invocation=1]="Invocation",w[w.Branch=2]="Branch"})(u||(u={}));class p{static traceInvocation(g,h){return g?new p(1,h.name||new Error().stack.split(` `).slice(3,4).join(` `)):p._None}static traceCreation(g,h){return g?new p(0,h.name):p._None}constructor(g,h){this.type=g,this.name=h,this._start=Date.now(),this._dep=[]}branch(g,h){const v=new p(2,g.toString());return this._dep.push([g,h,v]),v}stop(){const g=Date.now()-this._start;p._totals+=g;let h=!1;function v(d,l){const n=[],s=new Array(d+1).join(" ");for(const[i,o,r]of l._dep)if(o&&r){h=!0,n.push(`${s}CREATES -> ${i}`);const c=v(d+1,r);c&&n.push(c)}else n.push(`${s}uses -> ${i}`);return n.join(` `)}const m=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${v(1,this)}`,`DONE, took ${g.toFixed(2)}ms (grand total ${p._totals.toFixed(2)}ms)`];(g>2||h)&&p.all.add(m.join(` `))}}e.Trace=p,p.all=new Set,p._None=new class extends p{constructor(){super(-1,null)}stop(){}branch(){return this}},p._totals=0}),define(ee[6],ie([0,1,44,3,2,39,4,7,5]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLoggerService=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.LogService=e.MultiplexLogService=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.format=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,f.createDecorator)("logService"),e.ILoggerService=(0,f.createDecorator)("loggerService");function S(){return new Date().toISOString()}var b;(function(c){c[c.Trace=0]="Trace",c[c.Debug=1]="Debug",c[c.Info=2]="Info",c[c.Warning=3]="Warning",c[c.Error=4]="Error",c[c.Critical=5]="Critical",c[c.Off=6]="Off"})(b=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=b.Info;function P(c,a,y){switch(a){case b.Trace:c.trace(y);break;case b.Debug:c.debug(y);break;case b.Info:c.info(y);break;case b.Warning:c.warn(y);break;case b.Error:c.error(y);break;case b.Critical:c.critical(y);break;default:throw new Error("Invalid log level")}}e.log=P;function C(c){let a="";for(let y=0;y0?" ":"")+M}return a}e.format=C;class u extends k.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new t.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(a){this.level!==a&&(this.level=a,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=u;class p extends u{constructor(a){super(),this.logAlways=a}checkLogLevel(a){return this.logAlways||this.getLevel()<=a}trace(a,...y){this.checkLogLevel(b.Trace)&&this.log(b.Trace,C([a,...y]))}debug(a,...y){this.checkLogLevel(b.Debug)&&this.log(b.Debug,C([a,...y]))}info(a,...y){this.checkLogLevel(b.Info)&&this.log(b.Info,C([a,...y]))}warn(a,...y){this.checkLogLevel(b.Warning)&&this.log(b.Warning,C([a,...y]))}error(a,...y){if(this.checkLogLevel(b.Error))if(a instanceof Error){const M=Array.prototype.slice.call(arguments);M[0]=a.stack,this.log(b.Error,C(M))}else this.log(b.Error,C([a,...y]))}critical(a,...y){this.checkLogLevel(b.Critical)&&this.log(b.Critical,C([a,...y]))}flush(){}}e.AbstractMessageLogger=p;class w extends u{constructor(a=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(a),this.useColors=!D.isWindows}trace(a,...y){this.getLevel()<=b.Trace&&(this.useColors?console.log(`\x1B[90m[main ${S()}]\x1B[0m`,a,...y):console.log(`[main ${S()}]`,a,...y))}debug(a,...y){this.getLevel()<=b.Debug&&(this.useColors?console.log(`\x1B[90m[main ${S()}]\x1B[0m`,a,...y):console.log(`[main ${S()}]`,a,...y))}info(a,...y){this.getLevel()<=b.Info&&(this.useColors?console.log(`\x1B[90m[main ${S()}]\x1B[0m`,a,...y):console.log(`[main ${S()}]`,a,...y))}warn(a,...y){this.getLevel()<=b.Warning&&(this.useColors?console.warn(`\x1B[93m[main ${S()}]\x1B[0m`,a,...y):console.warn(`[main ${S()}]`,a,...y))}error(a,...y){this.getLevel()<=b.Error&&(this.useColors?console.error(`\x1B[91m[main ${S()}]\x1B[0m`,a,...y):console.error(`[main ${S()}]`,a,...y))}critical(a,...y){this.getLevel()<=b.Critical&&(this.useColors?console.error(`\x1B[90m[main ${S()}]\x1B[0m`,a,...y):console.error(`[main ${S()}]`,a,...y))}dispose(){}flush(){}}e.ConsoleMainLogger=w;class g extends u{constructor(a=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(a)}trace(a,...y){this.getLevel()<=b.Trace&&console.log("%cTRACE","color: #888",a,...y)}debug(a,...y){this.getLevel()<=b.Debug&&console.log("%cDEBUG","background: #eee; color: #888",a,...y)}info(a,...y){this.getLevel()<=b.Info&&console.log("%c INFO","color: #33f",a,...y)}warn(a,...y){this.getLevel()<=b.Warning&&console.log("%c WARN","color: #993",a,...y)}error(a,...y){this.getLevel()<=b.Error&&console.log("%c ERR","color: #f33",a,...y)}critical(a,...y){this.getLevel()<=b.Critical&&console.log("%cCRITI","background: #f33; color: white",a,...y)}dispose(){}flush(){}}e.ConsoleLogger=g;class h extends u{constructor(a,y=e.DEFAULT_LOG_LEVEL){super(),this.adapter=a,this.setLevel(y)}trace(a,...y){this.getLevel()<=b.Trace&&this.adapter.log(b.Trace,[this.extractMessage(a),...y])}debug(a,...y){this.getLevel()<=b.Debug&&this.adapter.log(b.Debug,[this.extractMessage(a),...y])}info(a,...y){this.getLevel()<=b.Info&&this.adapter.log(b.Info,[this.extractMessage(a),...y])}warn(a,...y){this.getLevel()<=b.Warning&&this.adapter.log(b.Warning,[this.extractMessage(a),...y])}error(a,...y){this.getLevel()<=b.Error&&this.adapter.log(b.Error,[this.extractMessage(a),...y])}critical(a,...y){this.getLevel()<=b.Critical&&this.adapter.log(b.Critical,[this.extractMessage(a),...y])}extractMessage(a){return typeof a=="string"?a:(0,E.toErrorMessage)(a,this.getLevel()<=b.Trace)}dispose(){}flush(){}}e.AdapterLogger=h;class v extends u{constructor(a){super(),this.logServices=a,a.length&&this.setLevel(a[0].getLevel())}setLevel(a){for(const y of this.logServices)y.setLevel(a);super.setLevel(a)}trace(a,...y){for(const M of this.logServices)M.trace(a,...y)}debug(a,...y){for(const M of this.logServices)M.debug(a,...y)}info(a,...y){for(const M of this.logServices)M.info(a,...y)}warn(a,...y){for(const M of this.logServices)M.warn(a,...y)}error(a,...y){for(const M of this.logServices)M.error(a,...y)}critical(a,...y){for(const M of this.logServices)M.critical(a,...y)}flush(){for(const a of this.logServices)a.flush()}dispose(){for(const a of this.logServices)a.dispose()}}e.MultiplexLogService=v;class m extends k.Disposable{constructor(a){super(),this.logger=a,this._register(a)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(a){this.logger.setLevel(a)}getLevel(){return this.logger.getLevel()}trace(a,...y){this.logger.trace(a,...y)}debug(a,...y){this.logger.debug(a,...y)}info(a,...y){this.logger.info(a,...y)}warn(a,...y){this.logger.warn(a,...y)}error(a,...y){this.logger.error(a,...y)}critical(a,...y){this.logger.critical(a,...y)}flush(){this.logger.flush()}}e.LogService=m;class d extends k.Disposable{constructor(a,y){super(),this.logLevel=a,this.loggerItems=new R.ResourceMap,this._register(y(M=>this.setLevel(M)))}getLoggers(){return[...this.loggerItems.values()].map(({logger:a})=>a)}getLogger(a){return this.loggerItems.get(a)?.logger}createLogger(a,y,M){let T=this.loggerItems.get(a)?.logger;return T||(M=y?.always?b.Trace:M,T=this.doCreateLogger(a,M??this.logLevel,y),this.loggerItems.set(a,{logger:T,logLevel:M})),T}setLevel(a,y){const M=I.URI.isUri(a)?a:void 0,T=M?y:a;if(M){const _=this.loggerItems.get(M);_&&_.logLevel!==T&&(_.logLevel=T,_.logger.setLevel(T))}else this.logLevel=T,this.loggerItems.forEach(({logLevel:_,logger:Y})=>{_===void 0&&Y.setLevel(this.logLevel)})}getLogLevel(a){return this.loggerItems.get(a)?.logLevel}dispose(){this.loggerItems.forEach(({logger:a})=>a.dispose()),this.loggerItems.clear(),super.dispose()}}e.AbstractLoggerService=d;class l{constructor(){this.onDidChangeLogLevel=new t.Emitter().event}setLevel(a){}getLevel(){return b.Info}trace(a,...y){}debug(a,...y){}info(a,...y){}warn(a,...y){}error(a,...y){}critical(a,...y){}dispose(){}flush(){}}e.NullLogger=l;class n extends l{}e.NullLogService=n;class s extends d{constructor(){super(b.Info,t.Event.None)}doCreateLogger(a,y,M){return new l}}e.NullLoggerService=s;function i(c){if(c.verbose)return b.Trace;if(typeof c.logLevel=="string"){const a=o(c.logLevel.toLowerCase());if(a!==void 0)return a}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=i;function o(c){switch(c){case"trace":return b.Trace;case"debug":return b.Debug;case"info":return b.Info;case"warn":return b.Warning;case"error":return b.Error;case"critical":return b.Critical;case"off":return b.Off}}e.parseLogLevel=o;function r(c){switch(c){case b.Trace:return"trace";case b.Debug:return"debug";case b.Info:return"info";case b.Warning:return"warn";case b.Error:return"error";case b.Critical:return"critical";case b.Off:return"off"}}e.LogLevelToString=r});var te=this&&this.__param||function(z,e){return function(E,t){e(E,t,z)}};define(ee[201],ie([0,1,70,3,2,6,4,8]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCredentialsMainService=void 0;let f=class Et extends k.Disposable{constructor(b){super(),this.logService=b,this._onDidChangePassword=this._register(new t.Emitter),this.onDidChangePassword=this._onDidChangePassword.event}async getPassword(b,P){this.logService.trace("Getting password from keytar:",b,P);let C;try{C=await this.withKeytar()}catch{return null}const u=await(0,I.retry)(()=>C.getPassword(b,P),50,3);if(!u)return this.logService.trace("Did not get a password from keytar for account:",P),u;let p,w;try{const g=JSON.parse(u);p=g.content,w=g.hasNextChunk}catch{}if(!p||!w)return this.logService.trace("Got password from keytar for account:",P),u;try{let g=1;for(;w;){const h=await(0,I.retry)(()=>C.getPassword(b,`${P}-${g}`),50,3),v=JSON.parse(h);p+=v.content,w=v.hasNextChunk,g++}return this.logService.trace(`Got ${g}-chunked password from keytar for account:`,P),p}catch(g){return this.logService.error(g),u}}async setPassword(b,P,C){this.logService.trace("Setting password using keytar:",b,P);let u;try{u=await this.withKeytar()}catch(p){throw this.surfaceKeytarLoadError?.(p),p}if(D.isWindows&&C.length>Et.MAX_PASSWORD_LENGTH){let p=0,w=0,g=!0;for(;g;){const h=C.substring(p,p+Et.PASSWORD_CHUNK_SIZE);p+=Et.PASSWORD_CHUNK_SIZE,g=C.length-p>0;const v={content:h,hasNextChunk:g};await(0,I.retry)(()=>u.setPassword(b,w?`${P}-${w}`:P,JSON.stringify(v)),50,3),w++}this.logService.trace(`Got${w?` ${w}-chunked`:""} password from keytar for account:`,P)}else await(0,I.retry)(()=>u.setPassword(b,P,C),50,3),this.logService.trace("Got password from keytar for account:",P);this._onDidChangePassword.fire({service:b,account:P})}async deletePassword(b,P){this.logService.trace("Deleting password using keytar:",b,P);let C;try{C=await this.withKeytar()}catch(h){throw this.surfaceKeytarLoadError?.(h),h}const u=await C.getPassword(b,P);if(!u)return this.logService.trace("Did not get a password to delete from keytar for account:",P),!1;let p,w;try{const h=JSON.parse(u);p=h.content,w=h.hasNextChunk}catch{}let g=0;if(p&&w)try{for(g++;w;){const h=`${P}-${g}`,v=await C.getPassword(b,h);await C.deletePassword(b,h),w=JSON.parse(v).hasNextChunk,g++}}catch(h){this.logService.error(h)}return await C.deletePassword(b,P)?(this._onDidChangePassword.fire({service:b,account:P}),this.logService.trace(`Deleted${g?` ${g}-chunked`:""} password from keytar for account:`,P),!0):(this.logService.trace(`Keytar failed to delete${g?` ${g}-chunked`:""} password for account:`,P),!1)}async findPassword(b){let P;try{P=await this.withKeytar()}catch{return null}return await P.findPassword(b)}async findCredentials(b){let P;try{P=await this.withKeytar()}catch{return[]}return await P.findCredentials(b)}clear(){return this._keytarCache instanceof E.InMemoryCredentialsProvider?this._keytarCache.clear():Promise.resolve()}};f.MAX_PASSWORD_LENGTH=2500,f.PASSWORD_CHUNK_SIZE=f.MAX_PASSWORD_LENGTH-100,f=we([te(0,R.ILogService)],f),e.BaseCredentialsMainService=f}),define(ee[202],ie([0,1,24,8,16,3,2,9,71,6]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class b extends D.Disposable{constructor(C,u){super(),this.logService=C,this.options=u,this._onDidChangeFile=this._register(new R.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new R.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new t.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new t.ThrottledDelayer(0))}watch(C,u){return u.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(C,u):this.watchNonRecursive(C,u)}watchUniversal(C,u){const p={path:this.toFilePath(C),excludes:u.excludes,includes:u.includes,recursive:u.recursive},w=(0,E.insert)(this.universalPathsToWatch,p);return this.refreshUniversalWatchers(),(0,D.toDisposable)(()=>{w(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(C=>(0,k.onUnexpectedError)(C))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(u=>this._onDidChangeFile.fire((0,f.toFileChanges)(u)),u=>this.onWatcherLogMessage(u),this.logService.getLevel()===S.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===S.LogLevel.Trace)})));const C=this.options?.watcher?.recursive?.usePolling;if(C===!0)for(const u of this.universalPathsToWatch)(0,f.isRecursiveWatchRequest)(u)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(C))for(const u of this.universalPathsToWatch)(0,f.isRecursiveWatchRequest)(u)&&C.includes(u.path)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(C,u){const p={path:this.toFilePath(C),excludes:u.excludes,includes:u.includes,recursive:!1},w=(0,E.insert)(this.nonRecursivePathsToWatch,p);return this.refreshNonRecursiveWatchers(),(0,D.toDisposable)(()=>{w(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(C=>(0,k.onUnexpectedError)(C))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(C=>this._onDidChangeFile.fire((0,f.toFileChanges)(C)),C=>this.onWatcherLogMessage(C),this.logService.getLevel()===S.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===S.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(C){C.type==="error"&&this._onDidWatchError.fire(C.message),this.logService[C.type](C.message)}toFilePath(C){return(0,I.normalize)(C.fsPath)}}e.AbstractDiskFileSystemProvider=b}),define(ee[203],ie([0,1,24,8,17,22,3,67,66,2,58,14,72,18,57,157,15,108,6]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let m=class extends S.Disposable{constructor(l){super(),this.logService=l,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new D.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new D.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new D.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new D.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new D.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new D.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new t.ResourceQueue)}registerProvider(l,n){if(this.provider.has(l))throw new Error(`A filesystem provider for the scheme '${l}' is already registered.`);(0,C.mark)(`code/registerFilesystem/${l}`);const s=new S.DisposableStore;return this.provider.set(l,n),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:l,provider:n}),s.add(n.onDidChangeFile(i=>this._onDidFilesChange.fire(new g.FileChangesEvent(i,!this.isPathCaseSensitive(n))))),typeof n.onDidWatchError=="function"&&s.add(n.onDidWatchError(i=>this._onDidWatchError.fire(new Error(i)))),s.add(n.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:n,scheme:l}))),(0,S.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:l,provider:n}),this.provider.delete(l),(0,S.dispose)(s)})}getProvider(l){return this.provider.get(l)}async activateProvider(l){const n=[];this._onWillActivateFileSystemProvider.fire({scheme:l,join(s){n.push(s)}}),!this.provider.has(l)&&await t.Promises.settled(n)}async canHandleResource(l){return await this.activateProvider(l.scheme),this.hasProvider(l)}hasProvider(l){return this.provider.has(l.scheme)}hasCapability(l,n){const s=this.provider.get(l.scheme);return!!(s&&s.capabilities&n)}listCapabilities(){return f.Iterable.map(this.provider,([l,n])=>({scheme:l,capabilities:n.capabilities}))}async withProvider(l){if(!(0,u.isAbsolutePath)(l))throw new g.FileOperationError((0,w.localize)(0,null,this.resourceForError(l)),8);await this.activateProvider(l.scheme);const n=this.provider.get(l.scheme);if(!n){const s=new Error;throw s.name="ENOPRO",s.message=(0,w.localize)(1,null,l.toString()),s}return n}async withReadProvider(l){const n=await this.withProvider(l);if((0,g.hasOpenReadWriteCloseCapability)(n)||(0,g.hasReadWriteCapability)(n)||(0,g.hasFileReadStreamCapability)(n))return n;throw new Error(`Filesystem provider for scheme '${l.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(l){const n=await this.withProvider(l);if((0,g.hasOpenReadWriteCloseCapability)(n)||(0,g.hasReadWriteCapability)(n))return n;throw new Error(`Filesystem provider for scheme '${l.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(l,n){try{return await this.doResolveFile(l,n)}catch(s){throw(0,g.toFileSystemProviderErrorCode)(s)===g.FileSystemProviderErrorCode.FileNotFound?new g.FileOperationError((0,w.localize)(2,null,this.resourceForError(l)),1):(0,g.ensureFileSystemProviderError)(s)}}async doResolveFile(l,n){const s=await this.withProvider(l),i=this.isPathCaseSensitive(s),o=n?.resolveTo,r=n?.resolveSingleChildDescendants,c=n?.resolveMetadata,a=await s.stat(l);let y;return this.toFileStat(s,l,a,void 0,!!c,(M,T)=>(y||(y=b.TernarySearchTree.forUris(()=>!i),y.set(l,!0),o&&y.fill(!0,o)),y.get(M.resource)||y.findSuperstr(M.resource.with({query:null,fragment:null}))?!0:M.isDirectory&&r?T===1:!1))}async toFileStat(l,n,s,i,o,r){const{providerExtUri:c}=this.getExtUri(l),a={resource:n,name:c.basename(n),isFile:(s.type&g.FileType.File)!==0,isDirectory:(s.type&g.FileType.Directory)!==0,isSymbolicLink:(s.type&g.FileType.SymbolicLink)!==0,mtime:s.mtime,ctime:s.ctime,size:s.size,readonly:Boolean((s.permissions??0)&g.FilePermission.Readonly)||Boolean(l.capabilities&2048),etag:(0,g.etag)({mtime:s.mtime,size:s.size}),children:void 0};if(a.isDirectory&&r(a,i)){try{const y=await l.readdir(n),M=await t.Promises.settled(y.map(async([T,_])=>{try{const Y=c.joinPath(n,T),G=o?await l.stat(Y):{type:_};return await this.toFileStat(l,Y,G,y.length,o,r)}catch(Y){return this.logService.trace(Y),null}}));a.children=(0,E.coalesce)(M)}catch(y){this.logService.trace(y),a.children=[]}return a}return a}async resolveAll(l){return t.Promises.settled(l.map(async n=>{try{return{stat:await this.doResolveFile(n.resource,n.options),success:!0}}catch(s){return this.logService.trace(s),{stat:void 0,success:!1}}}))}async stat(l){const n=await this.withProvider(l),s=await n.stat(l);return this.toFileStat(n,l,s,void 0,!0,()=>!1)}async exists(l){const n=await this.withProvider(l);try{return!!await n.stat(l)}catch{return!1}}async canCreateFile(l,n){try{await this.doValidateCreateFile(l,n)}catch(s){return s}return!0}async doValidateCreateFile(l,n){if(!n?.overwrite&&await this.exists(l))throw new g.FileOperationError((0,w.localize)(3,null,this.resourceForError(l)),3,n)}async createFile(l,n=k.VSBuffer.fromString(""),s){await this.doValidateCreateFile(l,s);const i=await this.writeFile(l,n);return this._onDidRunOperation.fire(new g.FileOperationEvent(l,0,i)),i}async writeFile(l,n,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(l),l),{providerExtUri:o}=this.getExtUri(i);try{await this.validateWriteFile(i,l,s)||await this.mkdirp(i,o.dirname(l));let c;if((0,g.hasReadWriteCapability)(i)&&!(n instanceof k.VSBuffer))if((0,p.isReadableStream)(n)){const a=await(0,p.peekStream)(n,3);a.ended?c=k.VSBuffer.concat(a.buffer):c=a}else c=(0,p.peekReadable)(n,a=>k.VSBuffer.concat(a),3);else c=n;!(0,g.hasOpenReadWriteCloseCapability)(i)||(0,g.hasReadWriteCapability)(i)&&c instanceof k.VSBuffer?await this.doWriteUnbuffered(i,l,s,c):await this.doWriteBuffered(i,l,s,c instanceof k.VSBuffer?(0,k.bufferToReadable)(c):c),this._onDidRunOperation.fire(new g.FileOperationEvent(l,4))}catch(r){throw new g.FileOperationError((0,w.localize)(4,null,this.resourceForError(l),(0,g.ensureFileSystemProviderError)(r).toString()),(0,g.toFileOperationResult)(r),s)}return this.resolve(l,{resolveMetadata:!0})}async validateWriteFile(l,n,s){if(!!s?.unlock&&!(l.capabilities&8192))throw new Error((0,w.localize)(5,null,this.resourceForError(n)));let o;try{o=await l.stat(n)}catch{return}if((o.type&g.FileType.Directory)!==0)throw new g.FileOperationError((0,w.localize)(6,null,this.resourceForError(n)),0,s);if(this.throwIfFileIsReadonly(n,o),typeof s?.mtime=="number"&&typeof s.etag=="string"&&s.etag!==g.ETAG_DISABLED&&typeof o.mtime=="number"&&typeof o.size=="number"&&s.mtime{this.writeQueue.queueFor(n,this.getExtUri(l).providerExtUri).queue(async()=>{try{const c=await this.doReadFile(l,n,s,i);o(c)}catch(c){r(c)}})})}async doReadFile(l,n,s,i){const o=await this.doReadFileStream(l,n,{...s,preferUnbuffered:!0},i);return{...o,value:await(0,k.streamToBuffer)(o.value)}}async readFileStream(l,n,s){const i=await this.withReadProvider(l);return this.doReadFileStream(i,l,n,s)}async doReadFileStream(l,n,s,i){const o=new R.CancellationTokenSource(i),r=this.validateReadFile(n,s).then(a=>a,a=>{throw o.cancel(),a});let c;try{return typeof s?.etag=="string"&&s.etag!==g.ETAG_DISABLED&&await r,s?.atomic&&(0,g.hasFileAtomicReadCapability)(l)||!((0,g.hasOpenReadWriteCloseCapability)(l)||(0,g.hasFileReadStreamCapability)(l))||(0,g.hasReadWriteCapability)(l)&&s?.preferUnbuffered?c=this.readFileUnbuffered(l,n,s):(0,g.hasFileReadStreamCapability)(l)?c=this.readFileStreamed(l,n,o.token,s):c=this.readFileBuffered(l,n,o.token,s),{...await r,value:c}}catch(a){c&&await(0,p.consumeStream)(c);const y=(0,w.localize)(8,null,this.resourceForError(n),(0,g.ensureFileSystemProviderError)(a).toString());throw a instanceof g.NotModifiedSinceFileOperationError?new g.NotModifiedSinceFileOperationError(y,a.stat,s):new g.FileOperationError(y,(0,g.toFileOperationResult)(a),s)}}readFileStreamed(l,n,s,i=Object.create(null)){const o=l.readFileStream(n,i,s);return(0,p.transform)(o,{data:r=>r instanceof k.VSBuffer?r:k.VSBuffer.wrap(r),error:r=>new g.FileOperationError((0,w.localize)(9,null,this.resourceForError(n),(0,g.ensureFileSystemProviderError)(r).toString()),(0,g.toFileOperationResult)(r),i)},r=>k.VSBuffer.concat(r))}readFileBuffered(l,n,s,i=Object.create(null)){const o=(0,k.newWriteableBufferStream)();return(0,h.readFileIntoStream)(l,n,o,r=>r,{...i,bufferSize:this.BUFFER_SIZE,errorTransformer:r=>new g.FileOperationError((0,w.localize)(10,null,this.resourceForError(n),(0,g.ensureFileSystemProviderError)(r).toString()),(0,g.toFileOperationResult)(r),i)},s),o}readFileUnbuffered(l,n,s){const i=(0,p.newWriteableStream)(o=>k.VSBuffer.concat(o));return(async()=>{try{let o;s?.atomic&&(0,g.hasFileAtomicReadCapability)(l)?o=await l.readFile(n,{atomic:!0}):o=await l.readFile(n),typeof s?.position=="number"&&(o=o.slice(s.position)),typeof s?.length=="number"&&(o=o.slice(0,s.length)),this.validateReadFileLimits(n,o.byteLength,s),i.end(k.VSBuffer.wrap(o))}catch(o){i.error(o),i.end()}})(),i}async validateReadFile(l,n){const s=await this.resolve(l,{resolveMetadata:!0});if(s.isDirectory)throw new g.FileOperationError((0,w.localize)(11,null,this.resourceForError(l)),0,n);if(typeof n?.etag=="string"&&n.etag!==g.ETAG_DISABLED&&n.etag===s.etag)throw new g.NotModifiedSinceFileOperationError((0,w.localize)(12,null),s,n);return this.validateReadFileLimits(l,s.size,n),s}validateReadFileLimits(l,n,s){if(s?.limits){let i;if(typeof s.limits.memory=="number"&&n>s.limits.memory&&(i=9),typeof s.limits.size=="number"&&n>s.limits.size&&(i=7),typeof i=="number")throw new g.FileOperationError((0,w.localize)(13,null,this.resourceForError(l)),i)}}async canMove(l,n,s){return this.doCanMoveCopy(l,n,"move",s)}async canCopy(l,n,s){return this.doCanMoveCopy(l,n,"copy",s)}async doCanMoveCopy(l,n,s,i){if(l.toString()!==n.toString())try{const o=s==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(l),l):await this.withReadProvider(l),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n);await this.doValidateMoveCopy(o,l,r,n,s,i)}catch(o){return o}return!0}async move(l,n,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(l),l),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),r=await this.doMoveCopy(i,l,o,n,"move",!!s),c=await this.resolve(n,{resolveMetadata:!0});return this._onDidRunOperation.fire(new g.FileOperationEvent(l,r==="move"?2:3,c)),c}async copy(l,n,s){const i=await this.withReadProvider(l),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),r=await this.doMoveCopy(i,l,o,n,"copy",!!s),c=await this.resolve(n,{resolveMetadata:!0});return this._onDidRunOperation.fire(new g.FileOperationEvent(l,r==="copy"?3:2,c)),c}async doMoveCopy(l,n,s,i,o,r){if(n.toString()===i.toString())return o;const{exists:c,isSameResourceWithDifferentPathCase:a}=await this.doValidateMoveCopy(l,n,s,i,o,r);if(c&&!a&&r&&await this.del(i,{recursive:!0}),await this.mkdirp(s,this.getExtUri(s).providerExtUri.dirname(i)),o==="copy"){if(l===s&&(0,g.hasFileFolderCopyCapability)(l))await l.copy(n,i,{overwrite:r});else{const y=await this.resolve(n);y.isDirectory?await this.doCopyFolder(l,y,s,i):await this.doCopyFile(l,n,s,i)}return o}else return l===s?(await l.rename(n,i,{overwrite:r}),o):(await this.doMoveCopy(l,n,s,i,"copy",r),await this.del(n,{recursive:!0}),"copy")}async doCopyFile(l,n,s,i){if((0,g.hasOpenReadWriteCloseCapability)(l)&&(0,g.hasOpenReadWriteCloseCapability)(s))return this.doPipeBuffered(l,n,s,i);if((0,g.hasOpenReadWriteCloseCapability)(l)&&(0,g.hasReadWriteCapability)(s))return this.doPipeBufferedToUnbuffered(l,n,s,i);if((0,g.hasReadWriteCapability)(l)&&(0,g.hasOpenReadWriteCloseCapability)(s))return this.doPipeUnbufferedToBuffered(l,n,s,i);if((0,g.hasReadWriteCapability)(l)&&(0,g.hasReadWriteCapability)(s))return this.doPipeUnbuffered(l,n,s,i)}async doCopyFolder(l,n,s,i){await s.mkdir(i),Array.isArray(n.children)&&await t.Promises.settled(n.children.map(async o=>{const r=this.getExtUri(s).providerExtUri.joinPath(i,o.name);return o.isDirectory?this.doCopyFolder(l,await this.resolve(o.resource),s,r):this.doCopyFile(l,o.resource,s,r)}))}async doValidateMoveCopy(l,n,s,i,o,r){let c=!1;if(l===s){const{providerExtUri:y,isPathCaseSensitive:M}=this.getExtUri(l);if(M||(c=y.isEqual(n,i)),c&&o==="copy")throw new Error((0,w.localize)(14,null,this.resourceForError(n),this.resourceForError(i)));if(!c&&y.isEqualOrParent(i,n))throw new Error((0,w.localize)(15,null,this.resourceForError(n),this.resourceForError(i)))}const a=await this.exists(i);if(a&&!c){if(!r)throw new g.FileOperationError((0,w.localize)(16,null,this.resourceForError(n),this.resourceForError(i)),4);if(l===s){const{providerExtUri:y}=this.getExtUri(l);if(y.isEqualOrParent(n,i))throw new Error((0,w.localize)(17,null,this.resourceForError(n),this.resourceForError(i)))}}return{exists:a,isSameResourceWithDifferentPathCase:c}}getExtUri(l){const n=this.isPathCaseSensitive(l);return{providerExtUri:n?u.extUri:u.extUriIgnorePathCase,isPathCaseSensitive:n}}isPathCaseSensitive(l){return!!(l.capabilities&1024)}async createFolder(l){const n=this.throwIfFileSystemIsReadonly(await this.withProvider(l),l);await this.mkdirp(n,l);const s=await this.resolve(l,{resolveMetadata:!0});return this._onDidRunOperation.fire(new g.FileOperationEvent(l,0,s)),s}async mkdirp(l,n){const s=[],{providerExtUri:i}=this.getExtUri(l);for(;!i.isEqual(n,i.dirname(n));)try{if(((await l.stat(n)).type&g.FileType.Directory)===0)throw new Error((0,w.localize)(18,null,this.resourceForError(n)));break}catch(o){if((0,g.toFileSystemProviderErrorCode)(o)!==g.FileSystemProviderErrorCode.FileNotFound)throw o;s.push(i.basename(n)),n=i.dirname(n)}for(let o=s.length-1;o>=0;o--){n=i.joinPath(n,s[o]);try{await l.mkdir(n)}catch(r){if((0,g.toFileSystemProviderErrorCode)(r)!==g.FileSystemProviderErrorCode.FileExists)throw r}}}async canDelete(l,n){try{await this.doValidateDelete(l,n)}catch(s){return s}return!0}async doValidateDelete(l,n){const s=this.throwIfFileSystemIsReadonly(await this.withProvider(l),l);if(!!n?.useTrash&&!(s.capabilities&4096))throw new Error((0,w.localize)(19,null,this.resourceForError(l)));let o;try{o=await s.stat(l)}catch{}if(o)this.throwIfFileIsReadonly(l,o);else throw new g.FileOperationError((0,w.localize)(20,null,this.resourceForError(l)),1);if(!!!n?.recursive){const c=await this.resolve(l);if(c.isDirectory&&Array.isArray(c.children)&&c.children.length>0)throw new Error((0,w.localize)(21,null,this.resourceForError(l)))}return s}async del(l,n){const s=await this.doValidateDelete(l,n),i=!!n?.useTrash,o=!!n?.recursive;await s.delete(l,{recursive:o,useTrash:i}),this._onDidRunOperation.fire(new g.FileOperationEvent(l,1))}async cloneFile(l,n){const s=await this.withProvider(l),i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n);if(s===i&&this.getExtUri(s).providerExtUri.isEqual(l,n))return;if(s===i&&(0,g.hasFileCloneCapability)(s))return s.cloneFile(l,n);await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(n));const o=this.writeQueue.queueFor(l,this.getExtUri(s).providerExtUri);return s===i&&(0,g.hasFileFolderCopyCapability)(s)?o.queue(()=>s.copy(l,n,{overwrite:!0})):o.queue(()=>this.doCopyFile(s,l,i,n))}watch(l,n={recursive:!1,excludes:[]}){const s=new S.DisposableStore;let i=!1,o=()=>{i=!0};return s.add((0,S.toDisposable)(()=>o())),(async()=>{try{const r=await this.doWatch(l,n);i?(0,S.dispose)(r):o=()=>(0,S.dispose)(r)}catch(r){this.logService.error(r)}})(),s}async doWatch(l,n){const s=await this.withProvider(l),i=(0,I.hash)([this.getExtUri(s).providerExtUri.getComparisonKey(l),n]);let o=this.activeWatchers.get(i);return o||(o={count:0,disposable:s.watch(l,n)},this.activeWatchers.set(i,o)),o.count+=1,(0,S.toDisposable)(()=>{o&&(o.count--,o.count===0&&((0,S.dispose)(o.disposable),this.activeWatchers.delete(i)))})}dispose(){super.dispose();for(const[,l]of this.activeWatchers)(0,S.dispose)(l.disposable);this.activeWatchers.clear()}async doWriteBuffered(l,n,s,i){return this.writeQueue.queueFor(n,this.getExtUri(l).providerExtUri).queue(async()=>{const o=await l.open(n,{create:!0,unlock:s?.unlock??!1});try{(0,p.isReadableStream)(i)||(0,p.isReadableBufferedStream)(i)?await this.doWriteStreamBufferedQueued(l,o,i):await this.doWriteReadableBufferedQueued(l,o,i)}catch(r){throw(0,g.ensureFileSystemProviderError)(r)}finally{await l.close(o)}})}async doWriteStreamBufferedQueued(l,n,s){let i=0,o;if((0,p.isReadableBufferedStream)(s)){if(s.buffer.length>0){const r=k.VSBuffer.concat(s.buffer);await this.doWriteBuffer(l,n,r,r.byteLength,i,0),i+=r.byteLength}if(s.ended)return;o=s.stream}else o=s;return new Promise((r,c)=>{(0,p.listenStream)(o,{onData:async a=>{o.pause();try{await this.doWriteBuffer(l,n,a,a.byteLength,i,0)}catch(y){return c(y)}i+=a.byteLength,setTimeout(()=>o.resume())},onError:a=>c(a),onEnd:()=>r()})})}async doWriteReadableBufferedQueued(l,n,s){let i=0,o;for(;(o=s.read())!==null;)await this.doWriteBuffer(l,n,o,o.byteLength,i,0),i+=o.byteLength}async doWriteBuffer(l,n,s,i,o,r){let c=0;for(;cthis.doWriteUnbufferedQueued(l,n,s,i))}async doWriteUnbufferedQueued(l,n,s,i){let o;i instanceof k.VSBuffer?o=i:(0,p.isReadableStream)(i)?o=await(0,k.streamToBuffer)(i):(0,p.isReadableBufferedStream)(i)?o=await(0,k.bufferedStreamToBuffer)(i):o=(0,k.readableToBuffer)(i),await l.writeFile(n,o.buffer,{create:!0,overwrite:!0,unlock:s?.unlock??!1})}async doPipeBuffered(l,n,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeBufferedQueued(l,n,s,i))}async doPipeBufferedQueued(l,n,s,i){let o,r;try{o=await l.open(n,{create:!1}),r=await s.open(i,{create:!0,unlock:!1});const c=k.VSBuffer.alloc(this.BUFFER_SIZE);let a=0,y=0,M=0;do M=await l.read(o,a,c.buffer,y,c.byteLength-y),await this.doWriteBuffer(s,r,c,M,a,y),a+=M,y+=M,y===c.byteLength&&(y=0);while(M>0)}catch(c){throw(0,g.ensureFileSystemProviderError)(c)}finally{await t.Promises.settled([typeof o=="number"?l.close(o):Promise.resolve(),typeof r=="number"?s.close(r):Promise.resolve()])}}async doPipeUnbuffered(l,n,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(l,n,s,i))}async doPipeUnbufferedQueued(l,n,s,i){return s.writeFile(i,await l.readFile(n),{create:!0,overwrite:!0,unlock:!1})}async doPipeUnbufferedToBuffered(l,n,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(l,n,s,i))}async doPipeUnbufferedToBufferedQueued(l,n,s,i){const o=await s.open(i,{create:!0,unlock:!1});try{const r=await l.readFile(n);await this.doWriteBuffer(s,o,k.VSBuffer.wrap(r),r.byteLength,0,0)}catch(r){throw(0,g.ensureFileSystemProviderError)(r)}finally{await s.close(o)}}async doPipeBufferedToUnbuffered(l,n,s,i){const o=await(0,k.streamToBuffer)(this.readFileBuffered(l,n,R.CancellationToken.None));await this.doWriteUnbuffered(s,i,void 0,o)}throwIfFileSystemIsReadonly(l,n){if(l.capabilities&2048)throw new g.FileOperationError((0,w.localize)(22,null,this.resourceForError(n)),6);return l}throwIfFileIsReadonly(l,n){if((n.permissions??0)&g.FilePermission.Readonly)throw new g.FileOperationError((0,w.localize)(23,null,this.resourceForError(l)),6)}resourceForError(l){return l.scheme===P.Schemas.file?l.fsPath:l.toString(!0)}};m=we([te(0,v.ILogService)],m),e.FileService=m}),define(ee[87],ie([0,1,40,278,8,39,17,3,30,2,9,4,18,57,23,161,15,108,202,44,199,198]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0,(()=>{try{(0,t.gracefulify)(E)}catch(s){console.error(`Error enabling graceful-fs: ${(0,m.toErrorMessage)(s)}`)}})();class n extends v.AbstractDiskFileSystemProvider{constructor(i,o){super(i,o),this.onDidChangeCapabilities=I.Event.None,this.resourceLocks=new R.ResourceMap(r=>C.extUriBiasedIgnorePathCase.getComparisonKey(r)),this.mapHandleToPos=new Map,this.mapHandleToLock=new Map,this.writeHandles=new Map}get capabilities(){return this._capabilities||(this._capabilities=57374,P.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(i){try{const{stat:o,symbolicLink:r}=await p.SymlinkSupport.stat(this.toFilePath(i));return{type:this.toType(o,r),ctime:o.birthtime.getTime(),mtime:o.mtime.getTime(),size:o.size}}catch(o){throw this.toFileSystemProviderError(o)}}async readdir(i){try{const o=await p.Promises.readdir(this.toFilePath(i),{withFileTypes:!0}),r=[];return await Promise.all(o.map(async c=>{try{let a;c.isSymbolicLink()?a=(await this.stat((0,C.joinPath)(i,c.name))).type:a=this.toType(c),r.push([c.name,a])}catch(a){this.logService.trace(a)}})),r}catch(o){throw this.toFileSystemProviderError(o)}}toType(i,o){let r;return o?.dangling?r=g.FileType.Unknown:i.isFile()?r=g.FileType.File:i.isDirectory()?r=g.FileType.Directory:r=g.FileType.Unknown,o&&(r|=g.FileType.SymbolicLink),r}async createResourceLock(i){const o=this.toFilePath(i);this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${o})`);let r;for(;r=this.resourceLocks.get(i);)this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${o})`),await r.wait();const c=new k.Barrier;return this.resourceLocks.set(i,c),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${o})`),(0,S.toDisposable)(()=>{this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${o})`),this.resourceLocks.get(i)===c&&(this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${o})`),this.resourceLocks.delete(i)),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${o})`),c.open()})}async readFile(i,o){let r;try{o?.atomic&&(this.traceLock(`[Disk FileSystemProvider]: atomic read operation started (${this.toFilePath(i)})`),r=await this.createResourceLock(i));const c=this.toFilePath(i);return await p.Promises.readFile(c)}catch(c){throw this.toFileSystemProviderError(c)}finally{r?.dispose()}}traceLock(i){n.TRACE_LOG_RESOURCE_LOCKS&&this.logService.trace(i)}readFileStream(i,o,r){const c=(0,u.newWriteableStream)(a=>D.VSBuffer.concat(a.map(y=>D.VSBuffer.wrap(y))).buffer);return(0,h.readFileIntoStream)(this,i,c,a=>a.buffer,{...o,bufferSize:256*1024},r),c}async writeFile(i,o,r){let c;try{const a=this.toFilePath(i);if(!r.create||!r.overwrite){if(await p.Promises.exists(a)){if(!r.overwrite)throw(0,g.createFileSystemProviderError)((0,w.localize)(0,null),g.FileSystemProviderErrorCode.FileExists)}else if(!r.create)throw(0,g.createFileSystemProviderError)((0,w.localize)(1,null),g.FileSystemProviderErrorCode.FileNotFound)}c=await this.open(i,{create:!0,unlock:r.unlock}),await this.write(c,0,o,0,o.byteLength)}catch(a){throw await this.toFileSystemProviderWriteError(i,a)}finally{typeof c=="number"&&await this.close(c)}}static configureFlushOnWrite(i){n.canFlush=i}async open(i,o){const r=this.toFilePath(i);let c;(0,g.isFileOpenForWriteOptions)(o)&&(c=await this.createResourceLock(i));let a;try{if((0,g.isFileOpenForWriteOptions)(o)&&o.unlock)try{const{stat:M}=await p.SymlinkSupport.stat(r);M.mode&128||await p.Promises.chmod(r,M.mode|128)}catch(M){this.logService.trace(M)}let y;if((0,g.isFileOpenForWriteOptions)(o)){if(P.isWindows)try{await p.Promises.truncate(r,0),y="r+"}catch(M){M.code!=="ENOENT"&&this.logService.trace(M)}y||(y="w")}else y="r";a=await p.Promises.open(r,y)}catch(y){throw c?.dispose(),(0,g.isFileOpenForWriteOptions)(o)?await this.toFileSystemProviderWriteError(i,y):this.toFileSystemProviderError(y)}if(this.mapHandleToPos.set(a,0),(0,g.isFileOpenForWriteOptions)(o)&&this.writeHandles.set(a,i),c){const y=this.mapHandleToLock.get(a);this.traceLock(`[Disk FileSystemProvider]: open() - storing lock for handle ${a} (${r})`),this.mapHandleToLock.set(a,c),y&&(this.traceLock(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${a} (${r})`),y.dispose())}return a}async close(i){const o=this.mapHandleToLock.get(i);try{if(this.mapHandleToPos.delete(i),this.writeHandles.delete(i)&&n.canFlush)try{await p.Promises.fdatasync(i)}catch(r){n.configureFlushOnWrite(!1),this.logService.error(r)}return await p.Promises.close(i)}catch(r){throw this.toFileSystemProviderError(r)}finally{o&&(this.mapHandleToLock.get(i)===o&&(this.traceLock(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${i}`),this.mapHandleToLock.delete(i)),this.traceLock(`[Disk FileSystemProvider]: close() - disposing lock for handle ${i}`),o.dispose())}}async read(i,o,r,c,a){const y=this.normalizePos(i,o);let M=null;try{M=(await p.Promises.read(i,r,c,a,y)).bytesRead}catch(T){throw this.toFileSystemProviderError(T)}finally{this.updatePos(i,y,M)}return M}normalizePos(i,o){return o===this.mapHandleToPos.get(i)?null:o}updatePos(i,o,r){const c=this.mapHandleToPos.get(i);typeof c=="number"&&(typeof o=="number"||(typeof r=="number"?this.mapHandleToPos.set(i,c+r):this.mapHandleToPos.delete(i)))}async write(i,o,r,c,a){return(0,k.retry)(()=>this.doWrite(i,o,r,c,a),100,3)}async doWrite(i,o,r,c,a){const y=this.normalizePos(i,o);let M=null;try{M=(await p.Promises.write(i,r,c,a,y)).bytesWritten}catch(T){throw await this.toFileSystemProviderWriteError(this.writeHandles.get(i),T)}finally{this.updatePos(i,y,M)}return M}async mkdir(i){try{await p.Promises.mkdir(this.toFilePath(i))}catch(o){throw this.toFileSystemProviderError(o)}}async delete(i,o){try{const r=this.toFilePath(i);o.recursive?await p.Promises.rm(r,p.RimRafMode.MOVE):await p.Promises.unlink(r)}catch(r){throw this.toFileSystemProviderError(r)}}async rename(i,o,r){const c=this.toFilePath(i),a=this.toFilePath(o);if(c!==a)try{await this.validateTargetDeleted(i,o,"move",r.overwrite),await p.Promises.move(c,a)}catch(y){throw(y.code==="EINVAL"||y.code==="EBUSY"||y.code==="ENAMETOOLONG")&&(y=new Error((0,w.localize)(2,null,(0,b.basename)(c),(0,b.basename)((0,b.dirname)(a)),y.toString()))),this.toFileSystemProviderError(y)}}async copy(i,o,r){const c=this.toFilePath(i),a=this.toFilePath(o);if(c!==a)try{await this.validateTargetDeleted(i,o,"copy",r.overwrite),await p.Promises.copy(c,a,{preserveSymlinks:!0})}catch(y){throw(y.code==="EINVAL"||y.code==="EBUSY"||y.code==="ENAMETOOLONG")&&(y=new Error((0,w.localize)(3,null,(0,b.basename)(c),(0,b.basename)((0,b.dirname)(a)),y.toString()))),this.toFileSystemProviderError(y)}}async validateTargetDeleted(i,o,r,c){const a=this.toFilePath(i),y=this.toFilePath(o);let M=!1;if(!!(this.capabilities&1024)||(M=(0,f.isEqual)(a,y,!0)),M&&r==="copy")throw(0,g.createFileSystemProviderError)((0,w.localize)(4,null),g.FileSystemProviderErrorCode.FileExists);if(!M&&await p.Promises.exists(y)){if(!c)throw(0,g.createFileSystemProviderError)((0,w.localize)(5,null),g.FileSystemProviderErrorCode.FileExists);await this.delete(o,{recursive:!0,useTrash:!1})}}async cloneFile(i,o){return this.doCloneFile(i,o,!1)}async doCloneFile(i,o,r){const c=this.toFilePath(i),a=this.toFilePath(o),y=!!(this.capabilities&1024);if((0,f.isEqual)(c,a,!y))return;const M=new S.DisposableStore;try{const[T,_]=await Promise.all([this.createResourceLock(i),this.createResourceLock(o)]);M.add(T),M.add(_),r&&await p.Promises.mkdir((0,b.dirname)(a),{recursive:!0}),await p.Promises.copyFile(c,a)}catch(T){if(T.code==="ENOENT"&&!r)return this.doCloneFile(i,o,!0);throw this.toFileSystemProviderError(T)}finally{M.dispose()}}createUniversalWatcher(i,o,r){return new d.UniversalWatcherClient(c=>i(c),c=>o(c),r)}createNonRecursiveWatcher(i,o,r){return new l.NodeJSWatcherClient(c=>i(c),c=>o(c),r)}toFileSystemProviderError(i){if(i instanceof g.FileSystemProviderError)return i;let o;switch(i.code){case"ENOENT":o=g.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":o=g.FileSystemProviderErrorCode.FileIsADirectory;break;case"ENOTDIR":o=g.FileSystemProviderErrorCode.FileNotADirectory;break;case"EEXIST":o=g.FileSystemProviderErrorCode.FileExists;break;case"EPERM":case"EACCES":o=g.FileSystemProviderErrorCode.NoPermissions;break;default:o=g.FileSystemProviderErrorCode.Unknown}return(0,g.createFileSystemProviderError)(i,o)}async toFileSystemProviderWriteError(i,o){let r=this.toFileSystemProviderError(o);if(i&&r.code===g.FileSystemProviderErrorCode.NoPermissions)try{const{stat:c}=await p.SymlinkSupport.stat(this.toFilePath(i));c.mode&128||(r=(0,g.createFileSystemProviderError)(o,g.FileSystemProviderErrorCode.FileWriteLocked))}catch(c){this.logService.trace(c)}return r}}e.DiskFileSystemProvider=n,n.TRACE_LOG_RESOURCE_LOCKS=!1,n.canFlush=!0}),define(ee[204],ie([0,1,3,87,2,17,57,22]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSessionFileWatcher=e.AbstractDiskFileSystemProviderChannel=void 0;class f extends k.Disposable{constructor(P,C){super(),this.provider=P,this.logService=C,this.sessionToWatcher=new Map,this.watchRequests=new Map}call(P,C,u){const p=this.getUriTransformer(P);switch(C){case"stat":return this.stat(p,u[0]);case"readdir":return this.readdir(p,u[0]);case"open":return this.open(p,u[0],u[1]);case"close":return this.close(u[0]);case"read":return this.read(u[0],u[1],u[2]);case"readFile":return this.readFile(p,u[0],u[1]);case"write":return this.write(u[0],u[1],u[2],u[3],u[4]);case"writeFile":return this.writeFile(p,u[0],u[1],u[2]);case"rename":return this.rename(p,u[0],u[1],u[2]);case"copy":return this.copy(p,u[0],u[1],u[2]);case"cloneFile":return this.cloneFile(p,u[0],u[1]);case"mkdir":return this.mkdir(p,u[0]);case"delete":return this.delete(p,u[0],u[1]);case"watch":return this.watch(p,u[0],u[1],u[2],u[3]);case"unwatch":return this.unwatch(u[0],u[1])}throw new Error(`IPC Command ${C} not found`)}listen(P,C,u){const p=this.getUriTransformer(P);switch(C){case"fileChange":return this.onFileChange(p,u[0]);case"readFileStream":return this.onReadFileStream(p,u[0],u[1])}throw new Error(`Unknown event ${C}`)}stat(P,C){const u=this.transformIncoming(P,C,!0);return this.provider.stat(u)}readdir(P,C){const u=this.transformIncoming(P,C);return this.provider.readdir(u)}async readFile(P,C,u){const p=this.transformIncoming(P,C,!0),w=await this.provider.readFile(p,u);return R.VSBuffer.wrap(w)}onReadFileStream(P,C,u){const p=this.transformIncoming(P,C,!0),w=new I.CancellationTokenSource,g=new E.Emitter({onLastListenerRemove:()=>{w.cancel()}}),h=this.provider.readFileStream(p,u,w.token);return(0,D.listenStream)(h,{onData:v=>g.fire(R.VSBuffer.wrap(v)),onError:v=>g.fire(v),onEnd:()=>{g.fire("end"),g.dispose(),w.dispose()}}),g.event}writeFile(P,C,u,p){const w=this.transformIncoming(P,C);return this.provider.writeFile(w,u.buffer,p)}open(P,C,u){const p=this.transformIncoming(P,C,!0);return this.provider.open(p,u)}close(P){return this.provider.close(P)}async read(P,C,u){const p=R.VSBuffer.alloc(u),w=0,g=await this.provider.read(P,C,p.buffer,w,u);return[p,g]}write(P,C,u,p,w){return this.provider.write(P,C,u.buffer,p,w)}mkdir(P,C){const u=this.transformIncoming(P,C);return this.provider.mkdir(u)}delete(P,C,u){const p=this.transformIncoming(P,C);return this.provider.delete(p,u)}rename(P,C,u,p){const w=this.transformIncoming(P,C),g=this.transformIncoming(P,u);return this.provider.rename(w,g,p)}copy(P,C,u,p){const w=this.transformIncoming(P,C),g=this.transformIncoming(P,u);return this.provider.copy(w,g,p)}cloneFile(P,C,u){const p=this.transformIncoming(P,C),w=this.transformIncoming(P,u);return this.provider.cloneFile(p,w)}onFileChange(P,C){const u=new E.Emitter({onFirstListenerAdd:()=>{this.sessionToWatcher.set(C,this.createSessionFileWatcher(P,u))},onLastListenerRemove:()=>{(0,k.dispose)(this.sessionToWatcher.get(C)),this.sessionToWatcher.delete(C)}});return u.event}async watch(P,C,u,p,w){const g=this.sessionToWatcher.get(C);if(g){const h=this.transformIncoming(P,p),v=g.watch(u,h,w);this.watchRequests.set(C+u,v)}}async unwatch(P,C){const u=P+C,p=this.watchRequests.get(u);p&&((0,k.dispose)(p),this.watchRequests.delete(u))}dispose(){super.dispose();for(const[,P]of this.watchRequests)P.dispose();this.watchRequests.clear();for(const[,P]of this.sessionToWatcher)P.dispose();this.sessionToWatcher.clear()}}e.AbstractDiskFileSystemProviderChannel=f;class S extends k.Disposable{constructor(P,C,u,p){super(),this.uriTransformer=P,this.logService=u,this.environmentService=p,this.watcherRequests=new Map,this.fileWatcher=this._register(new t.DiskFileSystemProvider(this.logService,{watcher:{recursive:this.getRecursiveWatcherOptions(this.environmentService)}})),this.registerListeners(C)}registerListeners(P){const C=this._register(new E.Emitter);this._register(C.event(u=>{P.fire(u.map(p=>({resource:this.uriTransformer.transformOutgoingURI(p.resource),type:p.type})))})),this._register(this.fileWatcher.onDidChangeFile(u=>C.fire(u))),this._register(this.fileWatcher.onDidWatchError(u=>P.fire(u)))}getRecursiveWatcherOptions(P){}getExtraExcludes(P){}watch(P,C,u){const p=this.getExtraExcludes(this.environmentService);return Array.isArray(p)&&(u.excludes=[...u.excludes,...p]),this.watcherRequests.set(P,this.fileWatcher.watch(C,u)),(0,k.toDisposable)(()=>{(0,k.dispose)(this.watcherRequests.get(P)),this.watcherRequests.delete(P)})}dispose(){super.dispose();for(const[,P]of this.watcherRequests)P.dispose();this.watcherRequests.clear()}}e.AbstractSessionFileWatcher=S}),define(ee[205],ie([0,1,13,160,4,7,15,9,204,139]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderChannel=void 0;class b extends f.AbstractDiskFileSystemProviderChannel{constructor(u,p,w){super(u,p),this.environmentService=w}getUriTransformer(u){return S.DefaultURITransformer}transformIncoming(u,p){return R.URI.revive(p)}async delete(u,p,w){if(!w.useTrash)return super.delete(u,p,w);const g=this.transformIncoming(u,p),h=(0,I.normalize)(g.fsPath);try{await E.shell.trashItem(h)}catch{throw(0,D.createFileSystemProviderError)(k.isWindows?(0,t.localize)(0,null,(0,I.basename)(h)):(0,t.localize)(1,null,(0,I.basename)(h)),D.FileSystemProviderErrorCode.Unknown)}}createSessionFileWatcher(u,p){return new P(u,p,this.logService,this.environmentService)}}e.DiskFileSystemProviderChannel=b;class P extends f.AbstractSessionFileWatcher{watch(u,p,w){if(w.recursive)throw(0,D.createFileSystemProviderError)("Recursive file watching is not supported from main process for performance reasons.",D.FileSystemProviderErrorCode.Unavailable);return super.watch(u,p,w)}}}),define(ee[206],ie([0,1,6]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferLogService=void 0;function t(R,D){switch(D){case E.LogLevel.Trace:return R.trace;case E.LogLevel.Debug:return R.debug;case E.LogLevel.Info:return R.info;case E.LogLevel.Warning:return R.warn;case E.LogLevel.Error:return R.error;case E.LogLevel.Critical:return R.critical;default:throw new Error("Invalid log level")}}class k extends E.AbstractLogger{constructor(D=E.DEFAULT_LOG_LEVEL){super(),this.buffer=[],this._logger=void 0,this.setLevel(D),this._register(this.onDidChangeLogLevel(I=>{this._logger?.setLevel(I)}))}set logger(D){this._logger=D;for(const{level:I,args:f}of this.buffer)t(D,I).apply(D,f);this.buffer=[]}_log(D,...I){this._logger?t(this._logger,D).apply(this._logger,I):this.getLevel()<=D&&this.buffer.push({level:D,args:I})}trace(D,...I){this._log(E.LogLevel.Trace,D,...I)}debug(D,...I){this._log(E.LogLevel.Debug,D,...I)}info(D,...I){this._log(E.LogLevel.Info,D,...I)}warn(D,...I){this._log(E.LogLevel.Warning,D,...I)}error(D,...I){this._log(E.LogLevel.Error,D,...I)}critical(D,...I){this._log(E.LogLevel.Critical,D,...I)}dispose(){this._logger?.dispose()}flush(){this._logger?.flush()}}e.BufferLogService=k}),define(ee[207],ie([0,1,3,7,6]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FollowerLogService=e.LoggerChannelClient=e.LoggerChannel=e.LogLevelChannelClient=e.LogLevelChannel=void 0;class R{constructor(C,u){this.logService=C,this.loggerService=u,this.onDidChangeLogLevel=E.Event.buffer(C.onDidChangeLogLevel,!0)}listen(C,u){switch(u){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${u}`)}async call(C,u,p){switch(u){case"setLevel":return p[1]?this.loggerService.setLevel(t.URI.revive(p[1]),p[0]):this.logService.setLevel(p[0])}throw new Error(`Call not found: ${u}`)}}e.LogLevelChannel=R;class D{constructor(C){this.channel=C}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(C,u){D.setLevel(this.channel,C,u)}static setLevel(C,u,p){return C.call("setLevel",[u,p])}}e.LogLevelChannelClient=D;class I{constructor(C){this.loggerService=C,this.loggers=new Map}listen(C,u){throw new Error(`Event not found: ${u}`)}async call(C,u,p){switch(u){case"createLogger":this.createLogger(t.URI.revive(p[0]),p[1]);return;case"log":return this.log(t.URI.revive(p[0]),p[1]);case"consoleLog":return this.consoleLog(p[0],p[1])}throw new Error(`Call not found: ${u}`)}createLogger(C,u){this.loggers.set(C.toString(),this.loggerService.createLogger(C,u))}consoleLog(C,u){let p=console.log;switch(C){case k.LogLevel.Error:p=console.error;break;case k.LogLevel.Warning:p=console.warn;break;case k.LogLevel.Info:p=console.info;break}p.call(console,...u)}log(C,u){const p=this.loggers.get(C.toString());if(!p)throw new Error("Create the logger before logging");for(const[w,g]of u)(0,k.log)(p,w,g)}}e.LoggerChannel=I;class f extends k.AbstractLoggerService{constructor(C,u,p){super(C,u),this.channel=p}createConsoleMainLogger(){return new k.AdapterLogger({log:(C,u)=>{this.channel.call("consoleLog",[C,u])}})}doCreateLogger(C,u,p){return new S(this.channel,C,u,p)}}e.LoggerChannelClient=f;class S extends k.AbstractMessageLogger{constructor(C,u,p,w){super(w?.always),this.channel=C,this.file=u,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(p),this.channel.call("createLogger",[u,w]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(C,u){const p=[[C,u]];this.isLoggerCreated?this.doLog(p):this.buffer.push(...p)}doLog(C){this.channel.call("log",[this.file,C])}}class b extends k.LogService{constructor(C,u){super(u),this.parent=C,this._register(C.onDidChangeLogLevel(p=>u.setLevel(p)))}setLevel(C){super.setLevel(C),this.parent.setLevel(C)}}e.FollowerLogService=b}),define(ee[208],ie([0,1,15,6]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpdLogLogger=void 0;async function k(I,f,S,b,P){try{const C=await new Promise((p,w)=>{z(["spdlog"],p,w)});C.setFlushOn(t.LogLevel.Trace);const u=await C.createAsyncRotatingLogger(I,f,S,b);return P?u.clearFormatters():u.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),u}catch(C){console.error(C)}return null}function R(I,f,S){switch(f){case t.LogLevel.Trace:I.trace(S);break;case t.LogLevel.Debug:I.debug(S);break;case t.LogLevel.Info:I.info(S);break;case t.LogLevel.Warning:I.warn(S);break;case t.LogLevel.Error:I.error(S);break;case t.LogLevel.Critical:I.critical(S);break;default:throw new Error("Invalid log level")}}class D extends t.AbstractMessageLogger{constructor(f,S,b,P,C){super(),this.buffer=[],this.setLevel(C),this._loggerCreationPromise=this._createSpdLogLogger(f,S,b,P),this._register(this.onDidChangeLogLevel(u=>{this._logger?.setLevel(u)}))}async _createSpdLogLogger(f,S,b,P){const C=b?6:1,u=30/C*E.ByteSize.MB,p=await k(f,S,u,C,P);if(p){this._logger=p,this._logger.setLevel(this.getLevel());for(const{level:w,message:g}of this.buffer)R(this._logger,w,g);this.buffer=[]}}log(f,S){this._logger?R(this._logger,f,S):this.getLevel()<=f&&this.buffer.push({level:f,message:S})}flush(){this._logger?this._logger.flush():this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger())}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}e.SpdLogLogger=D}),define(ee[209],ie([0,1,29,6,208]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerService=void 0;let R=class extends t.AbstractLoggerService{constructor(I){super(I.getLevel(),I.onDidChangeLogLevel)}doCreateLogger(I,f,S){return new k.SpdLogLogger(S?.name||(0,E.generateUuid)(),I.fsPath,!S?.donotRotate,!!S?.donotUseFormatters,f)}};R=we([te(0,t.ILogService)],R),e.LoggerService=R}),define(ee[210],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMenubarMenuItemAction=e.isMenubarMenuItemRecentAction=e.isMenubarMenuItemSeparator=e.isMenubarMenuItemSubmenu=void 0;function E(D){return D.submenu!==void 0}e.isMenubarMenuItemSubmenu=E;function t(D){return D.id==="vscode.menubar.separator"}e.isMenubarMenuItemSeparator=t;function k(D){return D.uri!==void 0}e.isMenubarMenuItemRecentAction=k;function R(D){return!E(D)&&!t(D)&&!k(D)}e.isMenubarMenuItemAction=R}),define(ee[36],ie([0,1,3,66,2,5]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,R.createDecorator)("policy");class D extends k.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new E.Emitter),this.onDidChange=this._onDidChange.event}async registerPolicyDefinitions(S){const b=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...S,...this.policyDefinitions},b!==Object.keys(this.policyDefinitions).length&&await this.initializePolicies(S),t.Iterable.reduce(this.policies.entries(),(P,[C,u])=>({...P,[C]:u}),{})}getPolicyValue(S){return this.policies.get(S)}serialize(){return t.Iterable.reduce(Object.entries(this.policyDefinitions),(S,[b,P])=>({...S,[b]:{definition:P,value:this.policies.get(b)}}),{})}}e.AbstractPolicyService=D;class I{constructor(){this.onDidChange=E.Event.None}async registerPolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=I}),define(ee[211],ie([0,1,8,3,66,12,15,6,36]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilePolicyService=void 0;function S(P,C){const u=[];for(const p of k.Iterable.concat(P.keys(),C.keys()))P.get(p)!==C.get(p)&&u.push(p);return u}let b=class extends f.AbstractPolicyService{constructor(C,u,p){super(),this.file=C,this.fileService=u,this.logService=p,this.throttledDelayer=this._register(new E.ThrottledDelayer(500));const w=t.Event.filter(u.onDidFilesChange,g=>g.affects(C));this._register(u.watch(C)),this._register(w(()=>this.throttledDelayer.trigger(()=>this.refresh())))}async initializePolicies(C){await this.refresh()}async read(){const C=new Map;try{const u=await this.fileService.readFile(this.file),p=JSON.parse(u.value.toString());if(!(0,R.isObject)(p))throw new Error("Policy file isn't a JSON object");for(const w of Object.keys(p))this.policyDefinitions[w]&&C.set(w,p[w])}catch(u){u.fileOperationResult!==1&&this.logService.error("[FilePolicyService] Failed to read policies",u)}return C}async refresh(){const C=await this.read(),u=S(this.policies,C);this.policies=C,u.length>0&&this._onDidChange.fire(u)}};b=we([te(1,D.IFileService),te(2,I.ILogService)],b),e.FilePolicyService=b}),define(ee[212],ie([0,1,3,2,36]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyChannelClient=e.PolicyChannel=void 0;class R{constructor(f){this.service=f,this.disposables=new t.DisposableStore}listen(f,S){switch(S){case"onDidChange":return E.Event.map(this.service.onDidChange,b=>b.reduce((P,C)=>({...P,[C]:this.service.getPolicyValue(C)??null}),{}),this.disposables)}throw new Error(`Event not found: ${S}`)}call(f,S,b){switch(S){case"registerPolicyDefinitions":return this.service.registerPolicyDefinitions(b)}throw new Error(`Call not found: ${S}`)}dispose(){this.disposables.dispose()}}e.PolicyChannel=R;class D extends k.AbstractPolicyService{constructor(f,S){super(),this.channel=S;for(const b in f){const{definition:P,value:C}=f[b];this.policyDefinitions[b]=P,C!==void 0&&this.policies.set(b,C)}this.channel.listen("onDidChange")(b=>{for(const P in b){const C=b[P];C===null?this.policies.delete(P):this.policies.set(P,C)}this._onDidChange.fire(Object.keys(b))})}async initializePolicies(f){const S=await this.channel.call("registerPolicyDefinitions",f);for(const b in S)this.policies.set(b,S[b])}}e.PolicyChannelClient=D}),define(ee[54],ie([0,1,14,4,32,18]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D;if(typeof t.globals.vscode<"u"&&typeof t.globals.vscode.context<"u"){const I=t.globals.vscode.context.configuration();if(I)D=I.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(typeof z?.__$__nodeRequire=="function"){const I=(0,R.dirname)(E.FileAccess.asFileUri("",z));if(D=z.__$__nodeRequire((0,R.joinPath)(I,"product.json").fsPath),k.env.VSCODE_DEV&&Object.assign(D,{nameShort:`${D.nameShort} Dev`,nameLong:`${D.nameLong} Dev`,dataFolderName:`${D.dataFolderName}-dev`,serverDataFolderName:D.serverDataFolderName?`${D.serverDataFolderName}-dev`:void 0}),!D.version){const f=z.__$__nodeRequire((0,R.joinPath)(I,"package.json").fsPath);Object.assign(D,{version:f.version})}}else D={},Object.keys(D).length===0&&Object.assign(D,{version:"1.72.0-dev",nameShort:"Code - OSS Dev",nameLong:"Code - OSS Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=D}),define(ee[20],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,E.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(ee[213],ie([0,1,78,6,20]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionUrlTrustService=void 0;let R=class{constructor(I,f){this.productService=I,this.logService=f,this.trustedExtensionUrlPublicKeys=new Map}async isExtensionUrlTrusted(I,f){if(!this.productService.trustedExtensionUrlPublicKeys)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","There are no configured trusted keys"),!1;const S=/^(.*)#([^#]+)$/.exec(f);if(!S)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri has no fragment",f),!1;const[,b,P]=S;let C=this.trustedExtensionUrlPublicKeys.get(I);if(!C){if(C=this.productService.trustedExtensionUrlPublicKeys[I],!C||C.length===0)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Extension doesn't have any trusted keys",I),!1;this.trustedExtensionUrlPublicKeys.set(I,[...C])}const u=Buffer.from(decodeURIComponent(P),"base64");if(u.length<=6)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri fragment is not a signature",f),!1;const p=u.slice(0,6),w=u.readUIntBE(0,6),g=Date.now()-w;if(g<0||g>36e5)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri has expired",f),!1;const h=u.slice(6),v=E.createVerify("SHA256");v.write(p),v.write(Buffer.from(b)),v.end();for(let m=0;m0&&I.charAt(I.length-1)==="#"?I.substring(0,I.length-1):I}class R{constructor(){this._onDidChangeSchema=new E.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(f,S){this.schemasById[k(f)]=S,this._onDidChangeSchema.fire(f)}notifySchemaChanged(f){this._onDidChangeSchema.fire(f)}getSchemaContributions(){return{schemas:this.schemasById}}}const D=new R;t.Registry.add(e.Extensions.JSONContribution,D)}),define(ee[62],ie([0,1,24,3,12,148,19,215,47]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var S;(function(l){l.Multiline="multilineText",l.Singleline="singlelineText"})(S=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var b;(function(l){l[l.APPLICATION=1]="APPLICATION",l[l.MACHINE=2]="MACHINE",l[l.WINDOW=3]="WINDOW",l[l.RESOURCE=4]="RESOURCE",l[l.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",l[l.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(b=e.ConfigurationScope||(e.ConfigurationScope={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const P=f.Registry.as(I.Extensions.JSONContribution);class C{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new t.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new t.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:R.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},P.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(n,s=!0){this.registerConfigurations([n],s)}registerConfigurations(n,s=!0){const i=this.doRegisterConfigurations(n,s);P.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}deregisterConfigurations(n){const s=this.doDeregisterConfigurations(n);P.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}updateConfigurations({add:n,remove:s}){const i=[];i.push(...this.doDeregisterConfigurations(s)),i.push(...this.doRegisterConfigurations(n,!1)),P.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,E.distinct)(i)})}registerDefaultConfigurations(n){const s=[],i=[];for(const{overrides:o,source:r}of n)for(const c in o)if(s.push(c),e.OVERRIDE_PROPERTY_REGEX.test(c)){const a=this.configurationDefaultsOverrides.get(c),y=a?.valuesSources??new Map;if(r)for(const Y of Object.keys(o[c]))y.set(Y,r);const M={...a?.value||{},...o[c]};this.configurationDefaultsOverrides.set(c,{source:r,value:M,valuesSources:y});const T=(0,D.getLanguageTagSettingPlainKey)(c),_={type:"object",default:M,description:R.localize(1,null,T),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:M,source:k.isString(r)?void 0:r,defaultValueSource:r};i.push(...w(c)),this.configurationProperties[c]=_,this.defaultLanguageConfigurationOverridesNode.properties[c]=_}else{this.configurationDefaultsOverrides.set(c,{value:o[c],source:r});const a=this.configurationProperties[c];a&&(this.updatePropertyDefaultValue(c,a),this.updateSchema(c,a))}this.registerOverrideIdentifiers(i),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s,defaultsOverrides:!0})}deregisterDefaultConfigurations(n){const s=[];for(const{overrides:i,source:o}of n)for(const r in i){const c=this.configurationDefaultsOverrides.get(r),a=k.isString(o)?o:o?.id,y=k.isString(c?.source)?c?.source:c?.source?.id;if(a===y)if(s.push(r),this.configurationDefaultsOverrides.delete(r),e.OVERRIDE_PROPERTY_REGEX.test(r))delete this.configurationProperties[r],delete this.defaultLanguageConfigurationOverridesNode.properties[r];else{const M=this.configurationProperties[r];M&&(this.updatePropertyDefaultValue(r,M),this.updateSchema(r,M))}}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...n){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(n){for(const s of n)this.overrideIdentifiers.add(s);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(n,s){const i=[];return n.forEach(o=>{i.push(...this.validateAndRegisterProperties(o,s,o.extensionInfo,o.restrictedProperties)),this.configurationContributors.push(o),this.registerJSONConfiguration(o)}),i}doDeregisterConfigurations(n){const s=[],i=o=>{if(o.properties)for(const r in o.properties){s.push(r);const c=this.configurationProperties[r];c?.policy?.name&&this.policyConfigurations.delete(c.policy.name),delete this.configurationProperties[r],this.removeFromSchema(r,o.properties[r])}o.allOf?.forEach(r=>i(r))};for(const o of n){i(o);const r=this.configurationContributors.indexOf(o);r!==-1&&this.configurationContributors.splice(r,1)}return s}validateAndRegisterProperties(n,s=!0,i,o,r=3){r=k.isUndefinedOrNull(n.scope)?r:n.scope;const c=[],a=n.properties;if(a)for(const M in a){const T=a[M];if(s&&m(M,T)){delete a[M];continue}if(T.source=i,T.defaultDefaultValue=a[M].default,this.updatePropertyDefaultValue(M,T),e.OVERRIDE_PROPERTY_REGEX.test(M)?T.scope=void 0:(T.scope=k.isUndefinedOrNull(T.scope)?r:T.scope,T.restricted=k.isUndefinedOrNull(T.restricted)?!!o?.includes(M):T.restricted),a[M].hasOwnProperty("included")&&!a[M].included){this.excludedConfigurationProperties[M]=a[M],delete a[M];continue}else this.configurationProperties[M]=a[M],a[M].policy?.name&&this.policyConfigurations.set(a[M].policy.name,M);!a[M].deprecationMessage&&a[M].markdownDeprecationMessage&&(a[M].deprecationMessage=a[M].markdownDeprecationMessage),c.push(M)}const y=n.allOf;if(y)for(const M of y)c.push(...this.validateAndRegisterProperties(M,s,i,o,r));return c}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(n){const s=i=>{const o=i.properties;if(o)for(const c in o)this.updateSchema(c,o[c]);i.allOf?.forEach(s)};s(n)}updateSchema(n,s){switch(e.allSettings.properties[n]=s,s.scope){case 1:e.applicationSettings.properties[n]=s;break;case 2:e.machineSettings.properties[n]=s;break;case 6:e.machineOverridableSettings.properties[n]=s;break;case 3:e.windowSettings.properties[n]=s;break;case 4:e.resourceSettings.properties[n]=s;break;case 5:e.resourceSettings.properties[n]=s,this.resourceLanguageSettingsSchema.properties[n]=s;break}}removeFromSchema(n,s){switch(delete e.allSettings.properties[n],s.scope){case 1:delete e.applicationSettings.properties[n];break;case 2:delete e.machineSettings.properties[n];break;case 6:delete e.machineOverridableSettings.properties[n];break;case 3:delete e.windowSettings.properties[n];break;case 4:case 5:delete e.resourceSettings.properties[n],delete this.resourceLanguageSettingsSchema.properties[n];break}}updateOverridePropertyPatternKey(){for(const n of this.overrideIdentifiers.values()){const s=`[${n}]`,i={type:"object",description:R.localize(2,null),errorMessage:R.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(s,i),e.allSettings.properties[s]=i,e.applicationSettings.properties[s]=i,e.machineSettings.properties[s]=i,e.machineOverridableSettings.properties[s]=i,e.windowSettings.properties[s]=i,e.resourceSettings.properties[s]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const n={type:"object",description:R.localize(4,null),errorMessage:R.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(n,s){const i=this.configurationDefaultsOverrides.get(n);let o=i?.value,r=i?.source;k.isUndefined(o)&&(o=s.defaultDefaultValue,r=void 0),k.isUndefined(o)&&(o=h(s.type)),s.default=o,s.defaultValueSource=r}}const u="\\[([^\\]]+)\\]",p=new RegExp(u,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${u})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function w(l){const n=[];if(e.OVERRIDE_PROPERTY_REGEX.test(l)){let s=p.exec(l);for(;s?.length;){const i=s[1].trim();i&&n.push(i),s=p.exec(l)}}return(0,E.distinct)(n)}e.overrideIdentifiersFromKey=w;function g(l){return l.reduce((n,s)=>`${n}[${s}]`,"")}e.keyFromOverrideIdentifiers=g;function h(l){switch(Array.isArray(l)?l[0]:l){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=h;const v=new C;f.Registry.add(e.Extensions.Configuration,v);function m(l,n){return l.trim()?e.OVERRIDE_PROPERTY_REGEX.test(l)?R.localize(7,null,l):v.getConfigurationProperties()[l]!==void 0?R.localize(8,null,l):n.policy?.name&&v.getPolicyConfigurations().get(n.policy?.name)!==void 0?R.localize(9,null,l,n.policy?.name,v.getPolicyConfigurations().get(n.policy?.name)):null:R.localize(6,null)}e.validateProperty=m;function d(){const l=[],n=v.getConfigurationProperties();for(const s of Object.keys(n))l.push([s,n[s].scope]);return l.push(["launch",4]),l.push(["task",4]),l}e.getScopes=d}),define(ee[109],ie([0,1,24,3,43,2,39,50,12,7,19,62,47]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;class u{constructor(s={},i=[],o=[],r){this._contents=s,this._keys=i,this._overrides=o,this.raw=r,this.frozen=!1,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const s=this.raw.map(i=>{if(i instanceof u)return i;const o=new p("");return o.parseRaw(i),o.configurationModel});this._rawConfiguration=s.reduce((i,o)=>o===i?o:i.merge(o),s[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}isFrozen(){return this.frozen}getValue(s){return s?(0,b.getConfigurationValue)(this.contents,s):this.contents}inspect(s,i){const o=this.rawConfiguration.getValue(s),r=i?this.rawConfiguration.getOverrideValue(s,i):void 0,c=i?this.rawConfiguration.override(i).getValue(s):o;return{value:o,override:r,merged:c}}getOverrideValue(s,i){const o=this.getContentsForOverrideIdentifer(i);return o?s?(0,b.getConfigurationValue)(o,s):o:void 0}getKeysForOverrideIdentifier(s){const i=[];for(const o of this.overrides)o.identifiers.includes(s)&&i.push(...o.keys);return E.distinct(i)}getAllOverrideIdentifiers(){const s=[];for(const i of this.overrides)s.push(...i.identifiers);return E.distinct(s)}override(s){let i=this.overrideConfigurations.get(s);return i||(i=this.createOverrideConfigurationModel(s),this.overrideConfigurations.set(s,i)),i}merge(...s){const i=I.deepClone(this.contents),o=I.deepClone(this.overrides),r=[...this.keys],c=this.raw?.length?[...this.raw]:[this];for(const a of s)if(c.push(...a.raw?.length?a.raw:[a]),!a.isEmpty()){this.mergeContents(i,a.contents);for(const y of a.overrides){const[M]=o.filter(T=>E.equals(T.identifiers,y.identifiers));M?(this.mergeContents(M.contents,y.contents),M.keys.push(...y.keys),M.keys=E.distinct(M.keys)):o.push(I.deepClone(y))}for(const y of a.keys)r.indexOf(y)===-1&&r.push(y)}return new u(i,r,o,c.every(a=>a instanceof u)?void 0:c)}freeze(){return this.frozen=!0,this}clone(){return new u(I.deepClone(this.contents),[...this.keys],I.deepClone(this.overrides))}createOverrideConfigurationModel(s){const i=this.getContentsForOverrideIdentifer(s);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const o={};for(const r of E.distinct([...Object.keys(this.contents),...Object.keys(i)])){let c=this.contents[r];const a=i[r];a&&(typeof c=="object"&&typeof a=="object"?(c=I.deepClone(c),this.mergeContents(c,a)):c=a),o[r]=c}return new u(o,this.keys,this.overrides)}mergeContents(s,i){for(const o of Object.keys(i)){if(o in s&&f.isObject(s[o])&&f.isObject(i[o])){this.mergeContents(s[o],i[o]);continue}s[o]=I.deepClone(i[o])}}checkAndFreeze(s){return this.frozen&&!Object.isFrozen(s)?I.deepFreeze(s):s}getContentsForOverrideIdentifer(s){let i=null,o=null;const r=c=>{c&&(o?this.mergeContents(o,c):o=I.deepClone(c))};for(const c of this.overrides)E.equals(c.identifiers,[s])?i=c.contents:c.identifiers.includes(s)&&r(c.contents);return r(i),o}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(s,i){this.addKey(s),(0,b.addToValueTree)(this.contents,s,i,o=>{throw new Error(o)})}removeValue(s){this.removeKey(s)&&(0,b.removeFromValueTree)(this.contents,s)}addKey(s){let i=this.keys.length;for(let o=0;o{const T={};y(T),c.push(r),r=T,o=null},onObjectProperty:T=>{o=T},onObjectEnd:()=>{r=c.pop()},onArrayBegin:()=>{const T=[];y(T),c.push(r),r=T,o=null},onArrayEnd:()=>{r=c.pop()},onLiteralValue:y,onError:(T,_,Y)=>{a.push({error:T,offset:_,length:Y})}};if(s)try{k.visit(s,M),i=r[0]||{}}catch(T){console.error(`Error while parsing settings file ${this._name}: ${T}`),this._parseErrors=[T]}return i}doParseRaw(s,i){const o=C.Registry.as(P.Extensions.Configuration).getConfigurationProperties(),r=this.filter(s,o,!0,i);s=r.raw;const c=(0,b.toValuesTree)(s,M=>console.error(`Conflict in settings file ${this._name}: ${M}`)),a=Object.keys(s),y=this.toOverrides(s,M=>console.error(`Conflict in settings file ${this._name}: ${M}`));return{contents:c,keys:a,overrides:y,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(s,i,o,r){let c=!1;if(!r?.scopes&&!r?.skipRestricted)return{raw:s,restricted:[],hasExcludedProperties:c};const a={},y=[];for(const M in s)if(P.OVERRIDE_PROPERTY_REGEX.test(M)&&o){const T=this.filter(s[M],i,!1,r);a[M]=T.raw,c=c||T.hasExcludedProperties,y.push(...T.restricted)}else{const T=i[M],_=T?typeof T.scope<"u"?T.scope:3:void 0;T?.restricted&&y.push(M),(_===void 0||r.scopes===void 0||r.scopes.includes(_))&&!(r.skipRestricted&&T?.restricted)?a[M]=s[M]:c=!0}return{raw:a,restricted:y,hasExcludedProperties:c}}toOverrides(s,i){const o=[];for(const r of Object.keys(s))if(P.OVERRIDE_PROPERTY_REGEX.test(r)){const c={};for(const a in s[r])c[a]=s[r][a];o.push({identifiers:(0,P.overrideIdentifiersFromKey)(r),keys:Object.keys(c),contents:(0,b.toValuesTree)(c,i)})}return o}}e.ConfigurationModelParser=p;class w extends R.Disposable{constructor(s,i,o,r){super(),this.userSettingsResource=s,this.scopes=i,this.fileService=r,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new p(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(o.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,c=>c.contains(this.userSettingsResource)),t.Event.filter(this.fileService.onDidRunOperation,c=>(c.isOperation(0)||c.isOperation(3)||c.isOperation(1)||c.isOperation(4))&&o.isEqual(c.resource,s)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const s=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(s.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new u}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=w;class g{constructor(s,i,o,r,c,a,y,M,T,_,Y,G,V){this.key=s,this.overrides=i,this.value=o,this.overrideIdentifiers=r,this.defaultConfiguration=c,this.policyConfiguration=a,this.applicationConfiguration=y,this.userConfiguration=M,this.localUserConfiguration=T,this.remoteUserConfiguration=_,this.workspaceConfiguration=Y,this.folderConfigurationModel=G,this.memoryInspectValue=V}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.localUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.remoteUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class h{constructor(s,i,o,r,c=new u,a=new u,y=new D.ResourceMap,M=new u,T=new D.ResourceMap,_=!0){this._defaultConfiguration=s,this._policyConfiguration=i,this._applicationConfiguration=o,this._localUserConfiguration=r,this._remoteUserConfiguration=c,this._workspaceConfiguration=a,this._folderConfigurations=y,this._memoryConfiguration=M,this._memoryConfigurationByResource=T,this._freeze=_,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new D.ResourceMap,this._userConfiguration=null}getValue(s,i,o){return this.getConsolidatedConfigurationModel(s,i,o).getValue(s)}updateValue(s,i,o={}){let r;o.resource?(r=this._memoryConfigurationByResource.get(o.resource),r||(r=new u,this._memoryConfigurationByResource.set(o.resource,r))):r=this._memoryConfiguration,i===void 0?r.removeValue(s):r.setValue(s,i),o.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(s,i,o){const r=this.getConsolidatedConfigurationModel(s,i,o),c=E.distinct(r.overrides.map(M=>M.identifiers).flat()).filter(M=>r.getOverrideValue(s,M)!==void 0),a=this.getFolderConfigurationModelForResource(i.resource,o),y=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration;return new g(s,i,r.getValue(s),c.length?c:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration.freeze(),this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration.freeze(),this.userConfiguration.freeze(),this.localUserConfiguration.freeze(),this.remoteUserConfiguration.freeze(),o?this._workspaceConfiguration.freeze():void 0,a?a.freeze():void 0,y.inspect(s,i.overrideIdentifier))}keys(s){const i=this.getFolderConfigurationModelForResource(void 0,s);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:i?i.freeze().keys:[]}}updateDefaultConfiguration(s){this._defaultConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(s){this._policyConfiguration=s}updateApplicationConfiguration(s){this._applicationConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(s){this._localUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(s){this._remoteUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(s){this._workspaceConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(s,i){this._folderConfigurations.set(s,i),this._foldersConsolidatedConfigurations.delete(s)}deleteFolderConfiguration(s){this.folderConfigurations.delete(s),this._foldersConsolidatedConfigurations.delete(s)}compareAndUpdateDefaultConfiguration(s,i){const o=[];if(!i){const{added:r,updated:c,removed:a}=d(this._defaultConfiguration,s);i=[...r,...c,...a]}for(const r of i)for(const c of(0,P.overrideIdentifiersFromKey)(r)){const a=this._defaultConfiguration.getKeysForOverrideIdentifier(c),y=s.getKeysForOverrideIdentifier(c),M=[...y.filter(T=>a.indexOf(T)===-1),...a.filter(T=>y.indexOf(T)===-1),...a.filter(T=>!I.equals(this._defaultConfiguration.override(c).getValue(T),s.override(c).getValue(T)))];o.push([c,M])}return this.updateDefaultConfiguration(s),{keys:i,overrides:o}}compareAndUpdatePolicyConfiguration(s){const{added:i,updated:o,removed:r}=d(this._policyConfiguration,s),c=[...i,...o,...r];return c.length&&this.updatePolicyConfiguration(s),{keys:c,overrides:[]}}compareAndUpdateApplicationConfiguration(s){const{added:i,updated:o,removed:r,overrides:c}=d(this.applicationConfiguration,s),a=[...i,...o,...r];return a.length&&this.updateApplicationConfiguration(s),{keys:a,overrides:c}}compareAndUpdateLocalUserConfiguration(s){const{added:i,updated:o,removed:r,overrides:c}=d(this.localUserConfiguration,s),a=[...i,...o,...r];return a.length&&this.updateLocalUserConfiguration(s),{keys:a,overrides:c}}compareAndUpdateRemoteUserConfiguration(s){const{added:i,updated:o,removed:r,overrides:c}=d(this.remoteUserConfiguration,s),a=[...i,...o,...r];return a.length&&this.updateRemoteUserConfiguration(s),{keys:a,overrides:c}}compareAndUpdateWorkspaceConfiguration(s){const{added:i,updated:o,removed:r,overrides:c}=d(this.workspaceConfiguration,s),a=[...i,...o,...r];return a.length&&this.updateWorkspaceConfiguration(s),{keys:a,overrides:c}}compareAndUpdateFolderConfiguration(s,i){const o=this.folderConfigurations.get(s),{added:r,updated:c,removed:a,overrides:y}=d(o,i),M=[...r,...c,...a];return(M.length||!o)&&this.updateFolderConfiguration(s,i),{keys:M,overrides:y}}compareAndDeleteFolderConfiguration(s){const i=this.folderConfigurations.get(s);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(s);const{added:o,updated:r,removed:c,overrides:a}=d(i,void 0);return{keys:[...o,...r,...c],overrides:a}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(s,i,o){let r=this.getConsolidatedConfigurationModelForResource(i,o);return i.overrideIdentifier&&(r=r.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(s)!==void 0&&(r=r.merge(this._policyConfiguration)),r}getConsolidatedConfigurationModelForResource({resource:s},i){let o=this.getWorkspaceConsolidatedConfiguration();if(i&&s){const r=i.getFolder(s);r&&(o=this.getFolderConsolidatedConfiguration(r.uri)||o);const c=this._memoryConfigurationByResource.get(s);c&&(o=o.merge(c))}return o}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(s){let i=this._foldersConsolidatedConfigurations.get(s);if(!i){const o=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(s);r?(i=o.merge(r),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(s,i)):i=o}return i}getFolderConfigurationModelForResource(s,i){if(i&&s){const o=i.getFolder(s);if(o)return this._folderConfigurations.get(o.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((s,i)=>{const{contents:o,overrides:r,keys:c}=this._folderConfigurations.get(i);return s.push([i,{contents:o,overrides:r,keys:c}]),s},[])}}allKeys(){const s=new Set;return this._defaultConfiguration.freeze().keys.forEach(i=>s.add(i)),this.userConfiguration.freeze().keys.forEach(i=>s.add(i)),this._workspaceConfiguration.freeze().keys.forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.freeze().keys.forEach(o=>s.add(o))),[...s.values()]}allOverrideIdentifiers(){const s=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>s.add(i)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.freeze().getAllOverrideIdentifiers().forEach(o=>s.add(o))),[...s.values()]}getAllKeysForOverrideIdentifier(s){const i=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(s).forEach(o=>i.add(o)),this.userConfiguration.getKeysForOverrideIdentifier(s).forEach(o=>i.add(o)),this._workspaceConfiguration.getKeysForOverrideIdentifier(s).forEach(o=>i.add(o)),this._folderConfigurations.forEach(o=>o.getKeysForOverrideIdentifier(s).forEach(r=>i.add(r))),[...i.values()]}static parse(s){const i=this.parseConfigurationModel(s.defaults),o=this.parseConfigurationModel(s.policy),r=this.parseConfigurationModel(s.application),c=this.parseConfigurationModel(s.user),a=this.parseConfigurationModel(s.workspace),y=s.folders.reduce((M,T)=>(M.set(S.URI.revive(T[0]),this.parseConfigurationModel(T[1])),M),new D.ResourceMap);return new h(i,o,r,c,new u,a,y,new u,new D.ResourceMap,!1)}static parseConfigurationModel(s){return new u(s.contents,s.keys,s.overrides).freeze()}}e.Configuration=h;function v(...n){if(n.length===0)return{keys:[],overrides:[]};if(n.length===1)return n[0];const s=new Set,i=new Map;for(const r of n)r.keys.forEach(c=>s.add(c)),r.overrides.forEach(([c,a])=>{const y=(0,D.getOrSet)(i,c,new Set);a.forEach(M=>y.add(M))});const o=[];return i.forEach((r,c)=>o.push([c,[...r.values()]])),{keys:[...s.values()],overrides:o}}e.mergeChanges=v;class m{constructor(s,i,o,r){this.change=s,this.previous=i,this.currentConfiguraiton=o,this.currentWorkspace=r,this._previousConfiguration=void 0;const c=new Set;s.keys.forEach(y=>c.add(y)),s.overrides.forEach(([,y])=>y.forEach(M=>c.add(M))),this.affectedKeys=[...c.values()];const a=new u;this.affectedKeys.forEach(y=>a.setValue(y,{})),this.affectedKeysTree=a.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=h.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(s,i){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,s)){if(i){const o=this.previousConfiguration?this.previousConfiguration.getValue(s,i,this.previous?.workspace):void 0,r=this.currentConfiguraiton.getValue(s,i,this.currentWorkspace);return!I.equals(o,r)}return!0}return!1}doesAffectedKeysTreeContains(s,i){let o=(0,b.toValuesTree)({[i]:!0},()=>{}),r;for(;typeof o=="object"&&(r=Object.keys(o)[0]);){if(s=s[r],!s)return!1;o=o[r]}return!0}}e.ConfigurationChangeEvent=m;function d(n,s){const{added:i,removed:o,updated:r}=l(s?.rawConfiguration,n?.rawConfiguration),c=[],a=n?.getAllOverrideIdentifiers()||[],y=s?.getAllOverrideIdentifiers()||[];if(s){const M=y.filter(T=>!a.includes(T));for(const T of M)c.push([T,s.getKeysForOverrideIdentifier(T)])}if(n){const M=a.filter(T=>!y.includes(T));for(const T of M)c.push([T,n.getKeysForOverrideIdentifier(T)])}if(s&&n){for(const M of a)if(y.includes(M)){const T=l({contents:n.getOverrideValue(void 0,M)||{},keys:n.getKeysForOverrideIdentifier(M)},{contents:s.getOverrideValue(void 0,M)||{},keys:s.getKeysForOverrideIdentifier(M)});c.push([M,[...T.added,...T.removed,...T.updated]])}}return{added:i,removed:o,updated:r,overrides:c}}function l(n,s){const i=n?s?n.keys.filter(c=>s.keys.indexOf(c)===-1):[...n.keys]:[],o=s?n?s.keys.filter(c=>n.keys.indexOf(c)===-1):[...s.keys]:[],r=[];if(n&&s){for(const c of s.keys)if(n.keys.indexOf(c)!==-1){const a=(0,b.getConfigurationValue)(s.contents,c),y=(0,b.getConfigurationValue)(n.contents,c);I.equals(a,y)||r.push(c)}}return{added:i,removed:o,updated:r}}}),define(ee[216],ie([0,1,24,3,2,50,12,19,109,62,6,36,47]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfigurationModel=e.DefaultConfiguration=void 0;class u extends k.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event}get configurationModel(){return this._configurationModel||(this._configurationModel=new p(this.getConfigurationDefaultOverrides())),this._configurationModel}async initialize(){return this._configurationModel=void 0,this._register(C.Registry.as(S.Extensions.Configuration).onDidUpdateConfiguration(({properties:v,defaultsOverrides:m})=>this.onDidUpdateConfiguration(v,m))),this.configurationModel}reload(){return this._configurationModel=void 0,this.configurationModel}onDidUpdateConfiguration(v,m){this._configurationModel=void 0,this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:v})}getConfigurationDefaultOverrides(){return{}}}e.DefaultConfiguration=u;class p extends f.ConfigurationModel{constructor(v={}){const m=C.Registry.as(S.Extensions.Configuration).getConfigurationProperties(),d=Object.keys(m),l=Object.create(null),n=[];for(const s in m){const i=v[s],o=i!==void 0?i:m[s].default;(0,I.addToValueTree)(l,s,o,r=>console.error(`Conflict in default settings: ${r}`))}for(const s of Object.keys(l))S.OVERRIDE_PROPERTY_REGEX.test(s)&&n.push({identifiers:(0,S.overrideIdentifiersFromKey)(s),keys:Object.keys(l[s]),contents:(0,I.toValuesTree)(l[s],i=>console.error(`Conflict in default settings file: ${i}`))});super(l,d,n)}}e.DefaultConfigurationModel=p;class w{constructor(){this.onDidChangeConfiguration=t.Event.None,this.configurationModel=new f.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=w;let g=class extends k.Disposable{get configurationModel(){return this._configurationModel}constructor(v,m,d){super(),this.defaultConfiguration=v,this.policyService=m,this.logService=d,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new f.ConfigurationModel}async initialize(){return this.update(await this.registerPolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(v=>this.onDidChangePolicies(v))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:v})=>this.update(await this.registerPolicyDefinitions(v),!0))),this._configurationModel}async registerPolicyDefinitions(v){const m={},d=[],l=C.Registry.as(S.Extensions.Configuration).getConfigurationProperties();for(const n of v){const s=l[n];if(!s){d.push(n);continue}if(s.policy){if(s.type!=="string"&&s.type!=="number"){this.logService.warn(`Policy ${s.policy.name} has unsupported type ${s.type}`);continue}d.push(n),m[s.policy.name]={type:s.type}}}return(0,D.isEmptyObject)(m)||await this.policyService.registerPolicyDefinitions(m),d}onDidChangePolicies(v){const m=C.Registry.as(S.Extensions.Configuration).getPolicyConfigurations(),d=(0,E.coalesce)(v.map(l=>m.get(l)));this.update(d,!0)}update(v,m){const d=C.Registry.as(S.Extensions.Configuration).getConfigurationProperties(),l=[],n=this._configurationModel.isEmpty();for(const s of v){const i=d[s]?.policy?.name;if(i){const o=this.policyService.getPolicyValue(i);(n?o!==void 0:!(0,R.equals)(this._configurationModel.getValue(s),o))&&l.push([s,o])}else this._configurationModel.getValue(s)!==void 0&&l.push([s,void 0])}if(l.length){const s=this._configurationModel;this._configurationModel=new f.ConfigurationModel;for(const i of s.keys)this._configurationModel.setValue(i,s.getValue(i));for(const[i,o]of l)o===void 0?this._configurationModel.removeValue(i):this._configurationModel.setValue(i,o);m&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};g=we([te(1,P.IPolicyService),te(2,b.ILogService)],g),e.PolicyConfiguration=g}),define(ee[217],ie([0,1,8,3,2,18,19,109,216,36]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationService=void 0;class b extends k.Disposable{constructor(C,u,p,w){super(),this.settingsResource=C,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.defaultConfiguration=this._register(new f.DefaultConfiguration),this.policyConfiguration=p instanceof S.NullPolicyService?new f.NullPolicyConfiguration:this._register(new f.PolicyConfiguration(this.defaultConfiguration,p,w)),this.userConfiguration=this._register(new I.UserSettings(this.settingsResource,void 0,R.extUriBiasedIgnorePathCase,u)),this.configuration=new I.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,new I.ConfigurationModel,new I.ConfigurationModel),this.reloadConfigurationScheduler=this._register(new E.RunOnceScheduler(()=>this.reloadConfiguration(),50)),this._register(this.defaultConfiguration.onDidChangeConfiguration(({defaults:g,properties:h})=>this.onDidDefaultConfigurationChange(g,h))),this._register(this.policyConfiguration.onDidChangeConfiguration(g=>this.onDidPolicyConfigurationChange(g))),this._register(this.userConfiguration.onDidChange(()=>this.reloadConfigurationScheduler.schedule()))}async initialize(){const[C,u,p]=await Promise.all([this.defaultConfiguration.initialize(),this.policyConfiguration.initialize(),this.userConfiguration.loadConfiguration()]);this.configuration=new I.Configuration(C,u,new I.ConfigurationModel,p)}getConfigurationData(){return this.configuration.toData()}getValue(C,u){const p=typeof C=="string"?C:void 0,w=(0,D.isConfigurationOverrides)(C)?C:(0,D.isConfigurationOverrides)(u)?u:{};return this.configuration.getValue(p,w,void 0)}updateValue(C,u,p,w){return Promise.reject(new Error("not supported"))}inspect(C){return this.configuration.inspect(C,{},void 0)}keys(){return this.configuration.keys(void 0)}async reloadConfiguration(){const C=await this.userConfiguration.loadConfiguration();this.onDidChangeUserConfiguration(C)}onDidChangeUserConfiguration(C){const u=this.configuration.toData(),p=this.configuration.compareAndUpdateLocalUserConfiguration(C);this.trigger(p,u,2)}onDidDefaultConfigurationChange(C,u){const p=this.configuration.toData(),w=this.configuration.compareAndUpdateDefaultConfiguration(C,u);this.trigger(w,p,7)}onDidPolicyConfigurationChange(C){const u=this.configuration.toData(),p=this.configuration.compareAndUpdatePolicyConfiguration(C);this.trigger(p,u,7)}trigger(C,u,p){const w=new I.ConfigurationChangeEvent(C,{data:u},this.configuration);w.source=p,w.sourceConfig=this.getTargetConfiguration(p),this._onDidChangeConfiguration.fire(w)}getTargetConfiguration(C){switch(C){case 7:return this.configuration.defaults.contents;case 2:return this.configuration.localUserConfiguration.contents}return{}}}e.ConfigurationService=b}),define(ee[218],ie([0,1,16,5]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,t.createDecorator)("remoteAuthorityResolverService");var k;(function(D){D.Unknown="Unknown",D.NotAvailable="NotAvailable",D.TemporarilyNotAvailable="TemporarilyNotAvailable",D.NoResolverFound="NoResolverFound"})(k=e.RemoteAuthorityResolverErrorCode||(e.RemoteAuthorityResolverErrorCode={}));class R extends E.ErrorNoTelemetry{static isNotAvailable(I){return I instanceof R&&I._code===k.NotAvailable}static isTemporarilyNotAvailable(I){return I instanceof R&&I._code===k.TemporarilyNotAvailable}static isNoResolverFound(I){return I instanceof R&&I._code===k.NoResolverFound}static isHandled(I){return I instanceof R&&I.isHandled}constructor(I,f=k.Unknown,S){super(I),this._message=I,this._code=f,this._detail=S,this.isHandled=f===k.NotAvailable&&S===!0,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,R.prototype)}}e.RemoteAuthorityResolverError=R}),define(ee[63],ie([0,1,14]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function t(S){return S.scheme===E.Schemas.vscodeRemote?S.authority:void 0}e.getRemoteAuthority=t;function k(S){if(!S)return;const b=S.indexOf("+");return b<0?S:S.substr(0,b)}e.getRemoteName=k;function R(S){return`/${S.quality??"oss"}-${S.commit??"dev"}`}e.getRemoteServerRootPath=R;function D(S){const{host:b,port:P}=f(S);if(typeof P>"u")throw new Error("Remote authority doesn't contain a port!");return{host:b,port:P}}e.parseAuthorityWithPort=D;function I(S,b){let{host:P,port:C}=f(S);return typeof C>"u"&&(C=b),{host:P,port:C}}e.parseAuthorityWithOptionalPort=I;function f(S){const b=S.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(b)return{host:b[1],port:parseInt(b[2],10)};const P=S.match(/^(\[[0-9a-z:]+\])$/);if(P)return{host:P[1],port:void 0};const C=S.match(/(.*):(\d+)$/);return C?{host:C[1],port:parseInt(C[2],10)}:{host:S,port:void 0}}}),define(ee[110],ie([0,1,25,5,63]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.isIExtensionIdentifier=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=e.MANIFEST_CACHE_FOLDER=void 0,e.MANIFEST_CACHE_FOLDER="CachedExtensions",e.USER_MANIFEST_CACHE_FILE="user",e.BUILTIN_MANIFEST_CACHE_FILE="builtin",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function R(p){if(typeof p=="object"&&p!==null&&p.supported!==!0)return p.description}e.getWorkspaceSupportTypeMessage=R;function D(p){return p&&typeof p=="object"&&typeof p.id=="string"&&(!p.uuid||typeof p.uuid=="string")}e.isIExtensionIdentifier=D,e.EXTENSION_CATEGORIES=["Azure","Data Science","Debuggers","Extension Packs","Education","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Testing","Themes","Visualization","Other"];var I;(function(p){p[p.System=0]="System",p[p.User=1]="User"})(I=e.ExtensionType||(e.ExtensionType={}));var f;(function(p){p.WIN32_X64="win32-x64",p.WIN32_IA32="win32-ia32",p.WIN32_ARM64="win32-arm64",p.LINUX_X64="linux-x64",p.LINUX_ARM64="linux-arm64",p.LINUX_ARMHF="linux-armhf",p.ALPINE_X64="alpine-x64",p.ALPINE_ARM64="alpine-arm64",p.DARWIN_X64="darwin-x64",p.DARWIN_ARM64="darwin-arm64",p.WEB="web",p.UNIVERSAL="universal",p.UNKNOWN="unknown",p.UNDEFINED="undefined"})(f=e.TargetPlatform||(e.TargetPlatform={}));class S{constructor(w){this.value=w,this._lower=w.toLowerCase()}static equals(w,g){if(typeof w>"u"||w===null)return typeof g>"u"||g===null;if(typeof g>"u"||g===null)return!1;if(typeof w=="string"||typeof g=="string"){const h=typeof w=="string"?w:w.value,v=typeof g=="string"?g:g.value;return E.equalsIgnoreCase(h,v)}return w._lower===g._lower}static toKey(w){return typeof w=="string"?w.toLowerCase():w._lower}}e.ExtensionIdentifier=S;function b(p){return P(p)}e.isApplicationScopedExtension=b;function P(p){return p.contributes&&p.contributes.localizations?p.contributes.localizations.length>0:!1}e.isLanguagePackExtension=P;function C(p){return p.contributes&&p.contributes.authentication?p.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=C;function u(p,w){if(w){const g=`onResolveRemoteAuthority:${(0,k.getRemoteName)(w)}`;return p.activationEvents?.indexOf(g)!==-1}return!1}e.isResolverExtension=u,e.IBuiltinExtensionsScannerService=(0,t.createDecorator)("IBuiltinExtensionsScannerService")}),define(ee[111],ie([0,1,25,191,110,4,7,16,32]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.isAlpineLinux=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function S(s,i){return s.uuid&&i.uuid?s.uuid===i.uuid:s.id===i.id?!0:(0,E.compareIgnoreCase)(s.id,i.id)===0}e.areSameExtensions=S;const b=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class P{static create(i){const o=i.manifest?i.manifest.version:i.version,r=i.manifest?i.targetPlatform:i.properties.targetPlatform;return new P(i.identifier,o,r)}static parse(i){const o=b.exec(i);return o&&o[1]&&o[2]?new P({id:o[1]},o[2],o[4]||void 0):null}constructor(i,o,r="undefined"){this.version=o,this.targetPlatform=r,this.id=i.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(i){return i instanceof P?S(this,i)&&this.version===i.version&&this.targetPlatform===i.targetPlatform:!1}}e.ExtensionKey=P;const C=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function u(s){const i=C.exec(s);return i&&i[1]?[w(i[1]),i[2]]:[w(s),void 0]}e.getIdAndVersion=u;function p(s,i){return`${s}.${i}`}e.getExtensionId=p;function w(s){return s.toLocaleLowerCase()}e.adoptToGalleryExtensionId=w;function g(s,i){return w(p(s,i))}e.getGalleryExtensionId=g;function h(s,i){const o=[],r=c=>{for(const a of o)if(a.some(y=>S(i(y),i(c))))return a;return null};for(const c of s){const a=r(c);a?a.push(c):o.push([c])}return o}e.groupByExtension=h;function v(s){return{id:s.identifier.id,name:s.manifest.name,galleryId:null,publisherId:s.publisherId,publisherName:s.manifest.publisher,publisherDisplayName:s.publisherDisplayName,dependencies:s.manifest.extensionDependencies&&s.manifest.extensionDependencies.length>0}}e.getLocalExtensionTelemetryData=v;function m(s){return{id:s.identifier.id,name:s.name,galleryId:s.identifier.uuid,publisherId:s.publisherId,publisherName:s.publisher,publisherDisplayName:s.publisherDisplayName,isPreReleaseVersion:s.properties.isPreReleaseVersion,dependencies:!!(s.properties.dependencies&&s.properties.dependencies.length>0),isSigned:s.isSigned,...s.telemetryData}}e.getGalleryExtensionTelemetryData=m,e.BetterMergeId=new k.ExtensionIdentifier("pprice.better-merge");function d(s,i){const o=[],r=i.manifest.extensionDependencies?.slice(0)??[];for(;r.length;){const c=r.shift();if(c&&o.every(a=>!S(a.identifier,{id:c}))){const a=s.filter(y=>S(y.identifier,{id:c}));a.length===1&&(o.push(a[0]),r.push(...a[0].manifest.extensionDependencies?.slice(0)??[]))}}return o}e.getExtensionDependencies=d;async function l(s,i){if(!R.isLinux)return!1;let o;try{o=(await s.readFile(D.URI.file("/etc/os-release"))).value.toString()}catch{try{o=(await s.readFile(D.URI.file("/usr/lib/os-release"))).value.toString()}catch(c){i.debug("Error while getting the os-release file.",(0,I.getErrorMessage)(c))}}return!!o&&(o.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}e.isAlpineLinux=l;async function n(s,i){const o=await l(s,i),r=(0,t.getTargetPlatform)(o?"alpine":R.platform,f.arch);return i.debug("ComputeTargetPlatform:",r),r}e.computeTargetPlatform=n}),define(ee[73],ie([0,1,8,17,2,39,7,111,15,5,6]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=e.IExtensionsProfileScannerService=void 0,e.IExtensionsProfileScannerService=(0,S.createDecorator)("IExtensionsProfileScannerService");let P=class extends k.Disposable{constructor(u,p){super(),this.fileService=u,this.logService=p,this.resourcesAccessQueueMap=new R.ResourceMap}scanProfileExtensions(u){return this.withProfileExtensions(u)}addExtensionsToProfile(u,p){return this.withProfileExtensions(p,w=>(w=w.filter(g=>u.some(([h])=>!(0,I.areSameExtensions)(g.identifier,h.identifier))),w.push(...u.map(([g,h])=>({identifier:g.identifier,version:g.manifest.version,location:g.location,metadata:h}))),w))}removeExtensionFromProfile(u,p){return this.withProfileExtensions(p,w=>w.filter(g=>!(0,I.areSameExtensions)(g.identifier,u)))}async withProfileExtensions(u,p){return this.getResourceAccessQueue(u).queue(async()=>{let w=[];try{const g=await this.fileService.readFile(u),h=JSON.parse(g.value.toString());for(const v of h){if(!v.identifier){this.logService.info("Ignoring invalid extension while scanning. Identifier does not exist.",v);continue}if(!v.location){this.logService.info("Ignoring invalid extension while scanning. Location does not exist.",v);continue}if(!v.version){this.logService.info("Ignoring invalid extension while scanning. Version does not exist.",v);continue}w.push({identifier:v.identifier,location:D.URI.revive(v.location),version:v.version,metadata:v.metadata})}}catch(g){g.fileOperationResult!==1&&this.logService.error(g)}if(p){w=p(w);const g=w.map(h=>({identifier:h.identifier,version:h.version,location:h.location.toJSON(),metadata:h.metadata}));await this.fileService.writeFile(u,t.VSBuffer.fromString(JSON.stringify(g)))}return w})}getResourceAccessQueue(u){let p=this.resourcesAccessQueueMap.get(u);return p||(p=new E.Queue,this.resourcesAccessQueueMap.set(u,p)),p}};P=we([te(0,f.IFileService),te(1,b.ILogService)],P),e.ExtensionsProfileScannerService=P}),define(ee[219],ie([0,1,8,17,22,16,3,2,29,102,218,63]),function(z,e,E,t,k,R,D,I,f,S,b,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostPersistentConnection=e.ManagementPersistentConnection=e.PersistentConnection=e.ReconnectionPermanentFailureEvent=e.ConnectionGainEvent=e.ReconnectionRunningEvent=e.ReconnectionWaitEvent=e.ConnectionLostEvent=e.PersistentConnectionEventType=e.connectRemoteAgentTunnel=e.connectRemoteAgentExtensionHost=e.connectRemoteAgentManagement=e.ConnectionType=void 0;const C=30*1e3;var u;(function(N){N[N.Management=1]="Management",N[N.ExtensionHost=2]="ExtensionHost",N[N.Tunnel=3]="Tunnel"})(u=e.ConnectionType||(e.ConnectionType={}));function p(N){switch(N){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function w(N){const $=new k.CancellationTokenSource;return setTimeout(()=>$.cancel(),N),$.token}function g(N,$){if(N.isCancellationRequested||$.isCancellationRequested)return k.CancellationToken.Cancelled;const L=new k.CancellationTokenSource;return N.onCancellationRequested(()=>L.cancel()),$.onCancellationRequested(()=>L.cancel()),L.token}class h{get didTimeout(){return this._state==="timedout"}constructor($){this._state="pending",this._disposables=new I.DisposableStore,this.promise=new Promise((L,W)=>{this._resolvePromise=L,this._rejectPromise=W}),$.isCancellationRequested?this._timeout():this._disposables.add($.onCancellationRequested(()=>this._timeout()))}registerDisposable($){this._state==="pending"?this._disposables.add($):$.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){const $=new Error("Time limit reached");return $.code="ETIMEDOUT",$.syscall="connect",$}resolve($){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise($))}reject($){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise($))}}function v(N,$){const L=new h($);return L.registerDisposable(N.onControlMessage(W=>{const j=JSON.parse(W.toString()),H=F(j);H?L.reject(H):L.resolve(j)})),L.promise}function m(N,$,L,W,j,H,X,re){const B=new h(re);return $.connect(L,W,j,H,X,(x,Z)=>{B.didTimeout?(x&&N.error(x),Z?.dispose()):x||!Z?B.reject(x):B.resolve(Z)}),B.promise}function d(N,$){const L=new h($);return N.then(W=>{L.didTimeout||L.resolve(W)},W=>{L.didTimeout||L.reject(W)}),L.promise}async function l(N,$,L,W){const j=U(N,$);N.logService.trace(`${j} 1/6. invoking socketFactory.connect().`);let H;try{H=await m(N.logService,N.socketFactory,N.host,N.port,(0,P.getRemoteServerRootPath)(N),`reconnectionToken=${N.reconnectionToken}&reconnection=${N.reconnectionProtocol?"true":"false"}`,`renderer-${p($)}-${N.reconnectionToken}`,W)}catch(Z){throw N.logService.error(`${j} socketFactory.connect() failed or timed out. Error:`),N.logService.error(Z),Z}N.logService.trace(`${j} 2/6. socketFactory.connect() was successful.`);let X,re;N.reconnectionProtocol?(N.reconnectionProtocol.beginAcceptReconnection(H,null),X=N.reconnectionProtocol,re=!1):(X=new S.PersistentProtocol(H,null),re=!0),N.logService.trace(`${j} 3/6. sending AuthRequest control message.`);const B=await d(N.signService.createNewMessage((0,f.generateUuid)()),W),x={type:"auth",auth:N.connectionToken||"00000000000000000000",data:B.data};X.sendControl(t.VSBuffer.fromString(JSON.stringify(x)));try{const Z=await v(X,g(W,w(1e4)));if(Z.type!=="sign"||typeof Z.data!="string"){const Te=new Error("Unexpected handshake message");throw Te.code="VSCODE_CONNECTION_ERROR",Te}if(N.logService.trace(`${j} 4/6. received SignRequest control message.`),!await d(N.signService.validate(B,Z.signedData),W)){const Te=new Error("Refused to connect to unsupported server");throw Te.code="VSCODE_CONNECTION_ERROR",Te}const ge=await d(N.signService.sign(Z.data),W),De={type:"connectionType",commit:N.commit,signedData:ge,desiredConnectionType:$};return L&&(De.args=L),N.logService.trace(`${j} 5/6. sending ConnectionTypeRequest control message.`),X.sendControl(t.VSBuffer.fromString(JSON.stringify(De))),{protocol:X,ownsProtocol:re}}catch(Z){throw Z&&Z.code==="ETIMEDOUT"&&(N.logService.error(`${j} the handshake timed out. Error:`),N.logService.error(Z)),Z&&Z.code==="VSCODE_CONNECTION_ERROR"&&(N.logService.error(`${j} received error control message when negotiating connection. Error:`),N.logService.error(Z)),re&&q(X),Z}}async function n(N,$,L,W){const j=Date.now(),H=U(N,$),{protocol:X,ownsProtocol:re}=await l(N,$,L,W),B=new h(W);return B.registerDisposable(X.onControlMessage(x=>{const Z=JSON.parse(x.toString()),ce=F(Z);ce?(N.logService.error(`${H} received error control message when negotiating connection. Error:`),N.logService.error(ce),re&&q(X),B.reject(ce)):(N.reconnectionProtocol?.endAcceptReconnection(),N.logService.trace(`${H} 6/6. handshake finished, connection is up and running after ${ne(j)}!`),B.resolve({protocol:X,firstMessage:Z}))})),B.promise}async function s(N,$){const{protocol:L}=await n(N,1,void 0,$);return{protocol:L}}async function i(N,$,L){const{protocol:W,firstMessage:j}=await n(N,2,$,L),H=j&&j.debugPort;return{protocol:W,debugPort:H}}async function o(N,$,L){const W=Date.now(),j=U(N,3),{protocol:H}=await l(N,3,$,L);return N.logService.trace(`${j} 6/6. handshake finished, connection is up and running after ${ne(W)}!`),H}async function r(N,$,L){const{host:W,port:j,connectionToken:H}=await N.addressProvider.getAddress();return{commit:N.commit,quality:N.quality,host:W,port:j,connectionToken:H,reconnectionToken:$,reconnectionProtocol:L,socketFactory:N.socketFactory,signService:N.signService,logService:N.logService}}async function c(N,$,L){return y(N,async W=>{const{protocol:j}=await s(W,k.CancellationToken.None);return new fe(N,$,L,W.reconnectionToken,j)})}e.connectRemoteAgentManagement=c;async function a(N,$){return y(N,async L=>{const{protocol:W,debugPort:j}=await i(L,$,k.CancellationToken.None);return new K(N,$,L.reconnectionToken,W,j)})}e.connectRemoteAgentExtensionHost=a;async function y(N,$){for(let W=1;;W++)try{const j=(0,f.generateUuid)(),H=await r(N,j,null);return await $(H)}catch(j){if(W<5)N.logService.error(`[remote-connection][attempt ${W}] An error occurred in initial connection! Will retry... Error:`),N.logService.error(j);else throw N.logService.error(`[remote-connection][attempt ${W}] An error occurred in initial connection! It will be treated as a permanent error. Error:`),N.logService.error(j),ae.triggerPermanentFailure(0,0,b.RemoteAuthorityResolverError.isHandled(j)),j}}async function M(N,$,L){const W=await r(N,(0,f.generateUuid)(),null);return await o(W,{host:$,port:L},k.CancellationToken.None)}e.connectRemoteAgentTunnel=M;function T(N){return(0,E.createCancelablePromise)($=>new Promise((L,W)=>{const j=setTimeout(L,N*1e3);$.onCancellationRequested(()=>{clearTimeout(j),L()})}))}var _;(function(N){N[N.ConnectionLost=0]="ConnectionLost",N[N.ReconnectionWait=1]="ReconnectionWait",N[N.ReconnectionRunning=2]="ReconnectionRunning",N[N.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",N[N.ConnectionGain=4]="ConnectionGain"})(_=e.PersistentConnectionEventType||(e.PersistentConnectionEventType={}));class Y{constructor($,L){this.reconnectionToken=$,this.millisSinceLastIncomingData=L,this.type=0}}e.ConnectionLostEvent=Y;class G{constructor($,L,W,j){this.reconnectionToken=$,this.millisSinceLastIncomingData=L,this.durationSeconds=W,this.cancellableTimer=j,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=G;class V{constructor($,L,W){this.reconnectionToken=$,this.millisSinceLastIncomingData=L,this.attempt=W,this.type=2}}e.ReconnectionRunningEvent=V;class oe{constructor($,L,W){this.reconnectionToken=$,this.millisSinceLastIncomingData=L,this.attempt=W,this.type=4}}e.ConnectionGainEvent=oe;class se{constructor($,L,W,j){this.reconnectionToken=$,this.millisSinceLastIncomingData=L,this.attempt=W,this.handled=j,this.type=3}}e.ReconnectionPermanentFailureEvent=se;class ae extends I.Disposable{static triggerPermanentFailure($,L,W){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=$,this._permanentFailureAttempt=L,this._permanentFailureHandled=W,this._instances.forEach(j=>j._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach($=>$._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach($=>$._pauseSocketWriting())}get _isPermanentFailure(){return this._permanentFailure||ae._permanentFailure}constructor($,L,W,j,H){super(),this._connectionType=$,this._options=L,this.reconnectionToken=W,this.protocol=j,this._reconnectionFailureIsFatal=H,this._onDidStateChange=this._register(new D.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._onDidStateChange.fire(new oe(this.reconnectionToken,0,0)),this._register(j.onSocketClose(X=>{const re=O(this._connectionType,this.reconnectionToken,!0);X?X.type===0?(this._options.logService.info(`${re} received socket close event (hadError: ${X.hadError}).`),X.error&&this._options.logService.error(X.error)):(this._options.logService.info(`${re} received socket close event (wasClean: ${X.wasClean}, code: ${X.code}, reason: ${X.reason}).`),X.event&&this._options.logService.error(X.event)):this._options.logService.info(`${re} received socket close event.`),this._beginReconnecting()})),this._register(j.onSocketTimeout(X=>{const re=O(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${re} received socket timeout event (unacknowledgedMsgCount: ${X.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${X.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${X.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),ae._instances.push(this),this._register((0,I.toDisposable)(()=>{const X=ae._instances.indexOf(this);X>=0&&ae._instances.splice(X,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(ae._permanentFailureMillisSinceLastIncomingData,ae._permanentFailureAttempt,ae._permanentFailureHandled)}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure)return;const $=O(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${$} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new Y(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const L=[0,5,5,10,10,10,10,10,30];let W=-1;do{W++;const j=W0){const X=T(j);this._onDidStateChange.fire(new G(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),j,X)),this._options.logService.info(`${$} waiting for ${j} seconds before reconnecting...`);try{await X}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${$} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new V(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),W+1)),this._options.logService.info(`${$} resolving connection...`);const H=await r(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${$} connecting to ${H.host}:${H.port}...`),await this._reconnect(H,w(C)),this._options.logService.info(`${$} reconnected!`),this._onDidStateChange.fire(new oe(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),W+1));break}catch(H){if(H.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${$} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(H),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),W+1,!1);break}if(W>360){this._options.logService.error(`${$} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`),this._options.logService.error(H),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),W+1,!1);break}if(b.RemoteAuthorityResolverError.isTemporarilyNotAvailable(H)){this._options.logService.info(`${$} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(H);continue}if((H.code==="ETIMEDOUT"||H.code==="ENETUNREACH"||H.code==="ECONNREFUSED"||H.code==="ECONNRESET")&&H.syscall==="connect"){this._options.logService.info(`${$} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(H);continue}if((0,R.isCancellationError)(H)){this._options.logService.info(`${$} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(H);continue}if(H instanceof b.RemoteAuthorityResolverError){this._options.logService.error(`${$} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(H),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),W+1,b.RemoteAuthorityResolverError.isHandled(H));break}this._options.logService.error(`${$} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(H),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),W+1,!1);break}}while(!this._isPermanentFailure)}_onReconnectionPermanentFailure($,L,W){this._reconnectionFailureIsFatal?ae.triggerPermanentFailure($,L,W):this._gotoPermanentFailure($,L,W)}_gotoPermanentFailure($,L,W){this._onDidStateChange.fire(new se(this.reconnectionToken,$,L,W)),q(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=ae,ae._permanentFailure=!1,ae._permanentFailureMillisSinceLastIncomingData=0,ae._permanentFailureAttempt=0,ae._permanentFailureHandled=!1,ae._instances=[];class fe extends ae{constructor($,L,W,j,H){super(1,$,j,H,!0),this.client=this._register(new S.Client(H,{remoteAuthority:L,clientId:W},$.ipcLogger))}async _reconnect($,L){await s($,L)}}e.ManagementPersistentConnection=fe;class K extends ae{constructor($,L,W,j,H){super(2,$,W,j,!1),this._startArguments=L,this.debugPort=H}async _reconnect($,L){await i($,this._startArguments,L)}}e.ExtensionHostPersistentConnection=K;function q(N){try{N.acceptDisconnect();const $=N.getSocket();N.dispose(),$.dispose()}catch($){(0,R.onUnexpectedError)($)}}function F(N){if(N&&N.type==="error"){const $=new Error(`Connection error: ${N.reason}`);return $.code="VSCODE_CONNECTION_ERROR",$}return null}function A(N,$){for(;N.length<$;)N+=" ";return N}function O(N,$,L){return`[remote-connection][${A(p(N),13)}][${$.substr(0,5)}\u2026][${L?"reconnect":"initial"}]`}function U(N,$){return`${O($,N.reconnectionToken,!!N.reconnectionProtocol)}[${N.host}:${N.port}]`}function ne(N){return`${Date.now()-N} ms`}}),define(ee[220],ie([0,1,79,84]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nodeSocketFactory=void 0,e.nodeSocketFactory=new class{connect(k,R,D,I,f,S){const b=C=>S(C,void 0),P=E.createConnection({host:k,port:R},()=>{P.removeListener("error",b);const C=Buffer.alloc(16);for(let g=0;g<16;g++)C[g]=Math.round(Math.random()*256);const u=C.toString("base64"),p=[`GET ws://${/:/.test(k)?`[${k}]`:k}:${R}${D}?${I}&skipWebSocketFrames=true HTTP/1.1`,"Connection: Upgrade","Upgrade: websocket",`Sec-WebSocket-Key: ${u}`];P.write(p.join(`\r `)+`\r \r `);const w=g=>{g.toString().indexOf(`\r \r `)>=0&&(P.off("data",w),S(void 0,new t.NodeSocket(P,f)))};P.on("data",w)});P.setNoDelay(!0),P.once("error",b)}}}),define(ee[221],ie([0,1,27,45,40,182]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWSLFeatureInstalled=void 0;let D;async function I(u=!1){return(D===void 0||u)&&(D=f()),D}e.hasWSLFeatureInstalled=I;async function f(){const u=S();if(u===void 0)return!1;if(u>=22e3){const p=P();if(p)return new Promise(w=>{t.execFile(p,["--status"],g=>w(!g))})}else{const p=C();if(p)try{if((await k.promises.stat(p)).isFile())return!0}catch{}}return!1}function S(){const u=/(\d+)\.(\d+)\.(\d+)/g.exec(E.release());if(u)return parseInt(u[3])}function b(u){const p=process.env.SystemRoot;if(p){const w=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");return R.join(p,w?"Sysnative":"System32",u)}}function P(){return b("wsl.exe")}function C(){return b("lxss\\LxssManager.dll")}}),define(ee[55],ie([0,1,17,165,62,5,47]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.IRequestService=void 0,e.IRequestService=(0,R.createDecorator)("requestService");function I(w){return w.res.statusCode&&w.res.statusCode>=200&&w.res.statusCode<300||w.res.statusCode===1223}e.isSuccess=I;function f(w){return w.res.statusCode===204}async function S(w){return f(w)?null:(await(0,E.streamToBuffer)(w.stream)).toString()}e.asText=S;async function b(w){if(!I(w))throw new Error("Server returned "+w.res.statusCode);return S(w)}e.asTextOrError=b;async function P(w){if(!I(w))throw new Error("Server returned "+w.res.statusCode);if(f(w))return null;const h=(await(0,E.streamToBuffer)(w.stream)).toString();try{return JSON.parse(h)}catch(v){throw v.message+=`: `+h,v}}e.asJson=P;function C(w){p(w)}e.updateProxyConfigurationsScope=C;let u;function p(w){const g=D.Registry.as(k.Extensions.Configuration),h=u;u={id:"http",order:15,title:(0,t.localize)(0,null),type:"object",scope:w,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks5?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,t.localize)(1,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,t.localize)(2,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,t.localize)(3,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,t.localize)(4,null),(0,t.localize)(5,null),(0,t.localize)(6,null),(0,t.localize)(7,null)],default:"override",description:(0,t.localize)(8,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,t.localize)(9,null),restricted:!0}}},g.updateConfigurations({add:[u],remove:h?[h]:[]})}p(2)}),define(ee[222],ie([0,1,17,22]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestChannelClient=e.RequestChannel=void 0;class k{constructor(I){this.service=I}listen(I,f){throw new Error("Invalid listen")}call(I,f,S,b=t.CancellationToken.None){switch(f){case"request":return this.service.request(S[0],b).then(async({res:P,stream:C})=>{const u=await(0,E.streamToBuffer)(C);return[{statusCode:P.statusCode,headers:P.headers},u]});case"resolveProxy":return this.service.resolveProxy(S[0])}throw new Error("Invalid call")}}e.RequestChannel=k;class R{constructor(I){this.channel=I}async request(I,f){const[S,b]=await this.channel.call("request",[I],f);return{res:S,stream:(0,E.bufferToStream)(b)}}async resolveProxy(I){return this.channel.call("resolveProxy",[I])}}e.RequestChannelClient=R}),define(ee[223],ie([0,1,224,12]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProxyAgent=void 0;function k(D,I){return D.protocol==="http:"?I.HTTP_PROXY||I.http_proxy||null:D.protocol==="https:"&&(I.HTTPS_PROXY||I.https_proxy||I.HTTP_PROXY||I.http_proxy)||null}async function R(D,I,f={}){const S=(0,E.parse)(D),b=f.proxyUrl||k(S,I);if(!b)return null;const P=(0,E.parse)(b);if(!/^https?:$/.test(P.protocol||""))return null;const C={host:P.hostname||"",port:P.port||(P.protocol==="https"?"443":"80"),auth:P.auth,rejectUnauthorized:(0,t.isBoolean)(f.strictSSL)?f.strictSSL:!0};return S.protocol==="http:"?new(await new Promise((u,p)=>{z(["http-proxy-agent"],u,p)}))(C):new(await new Promise((u,p)=>{z(["https-proxy-agent"],u,p)}))(C)}e.getProxyAgent=R}),define(ee[112],ie([0,1,45,9,166,22,44,16,4,29,142,59,8]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getResolvedShellEnv=void 0;const u=1e4;let p;async function w(h,v,m){return v["force-disable-user-env"]?(h.trace("resolveShellEnv(): skipped (--force-disable-user-env)"),{}):f.isWindows?(h.trace("resolveShellEnv(): skipped (Windows)"),{}):(0,P.isLaunchedFromCli)(m)&&!v["force-user-env"]?(h.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"),{}):((0,P.isLaunchedFromCli)(m)?h.trace("resolveShellEnv(): running (--force-user-env)"):h.trace("resolveShellEnv(): running (macOS/Linux)"),p||(p=C.Promises.withAsyncBody(async(d,l)=>{const n=new R.CancellationTokenSource,s=setTimeout(()=>{n.dispose(!0),l(new Error((0,k.localize)(0,null)))},u);try{d(await g(h,n.token))}catch(i){!(0,I.isCancellationError)(i)&&!n.token.isCancellationRequested?l(new Error((0,k.localize)(1,null,(0,D.toErrorMessage)(i)))):d({})}finally{clearTimeout(s),n.dispose()}})),p)}e.getResolvedShellEnv=w;async function g(h,v){const m=process.env.ELECTRON_RUN_AS_NODE;h.trace("getUnixShellEnvironment#runAsNode",m);const d=process.env.ELECTRON_NO_ATTACH_CONSOLE;h.trace("getUnixShellEnvironment#noAttach",d);const l=(0,S.generateUuid)().replace(/-/g,"").substr(0,12),n=new RegExp(l+"(.*)"+l),s={...process.env,ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1"};h.trace("getUnixShellEnvironment#env",s);const i=await(0,b.getSystemShell)(f.OS,s);return h.trace("getUnixShellEnvironment#shell",i),new Promise((o,r)=>{if(v.isCancellationRequested)return r((0,I.canceled)());const c=(0,t.basename)(i);let a,y;const M=process.versions.electron&&process.versions["microsoft-build"]?"--ms-enable-electron-run-as-node":"";/^pwsh(-preview)?$/.test(c)?(a=`& '${process.execPath}' ${M} -p '''${l}'' + JSON.stringify(process.env) + ''${l}'''`,y=["-Login","-Command"]):(a=`'${process.execPath}' ${M} -p '"${l}" + JSON.stringify(process.env) + "${l}"'`,c==="tcsh"?y=["-ic"]:y=["-ilc"]),h.trace("getUnixShellEnvironment#spawn",JSON.stringify(y),a);const T=(0,E.spawn)(i,[...y,a],{detached:!0,stdio:["ignore","pipe","pipe"],env:s});v.onCancellationRequested(()=>(T.kill(),r((0,I.canceled)()))),T.on("error",G=>{h.error("getUnixShellEnvironment#errorChildProcess",(0,D.toErrorMessage)(G)),r(G)});const _=[];T.stdout.on("data",G=>_.push(G));const Y=[];T.stderr.on("data",G=>Y.push(G)),T.on("close",(G,V)=>{const oe=Buffer.concat(_).toString("utf8");h.trace("getUnixShellEnvironment#raw",oe);const se=Buffer.concat(Y).toString("utf8");if(se.trim()&&h.trace("getUnixShellEnvironment#stderr",se),G||V)return r(new Error((0,k.localize)(2,null,G,V)));const ae=n.exec(oe),fe=ae?ae[1]:"{}";try{const K=JSON.parse(fe);m?K.ELECTRON_RUN_AS_NODE=m:delete K.ELECTRON_RUN_AS_NODE,d?K.ELECTRON_NO_ATTACH_CONSOLE=d:delete K.ELECTRON_NO_ATTACH_CONSOLE,delete K.XDG_RUNTIME_DIR,h.trace("getUnixShellEnvironment#result",K),o(K)}catch(K){h.error("getUnixShellEnvironment#errorCaught",(0,D.toErrorMessage)(K)),r(K)}})})}}),define(ee[88],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISignService=e.SIGN_SERVICE_ID=void 0,e.SIGN_SERVICE_ID="signService",e.ISignService=(0,E.createDecorator)(e.SIGN_SERVICE_ID)}),define(ee[225],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignService=void 0;class E{constructor(){this.validators=new Map}vsda(){return new Promise((k,R)=>z(["vsda"],k,R))}async createNewMessage(k){try{const R=await this.vsda(),D=new R.validator;if(D){const I=String(E._nextId++);return this.validators.set(I,D),{id:I,data:D.createNewMessage(k)}}}catch{}return{id:"",data:k}}async validate(k,R){if(!k.id)return!0;const D=this.validators.get(k.id);if(!D)return!1;this.validators.delete(k.id);try{return D.validate(R)==="ok"}catch{return!1}}async sign(k){try{const R=await this.vsda(),D=new R.signer;if(D)return D.sign(k)}catch{}return k}}e.SignService=E,E._nextId=1}),define(ee[37],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStateMainService=void 0,e.IStateMainService=(0,E.createDecorator)("stateMainService")}),define(ee[21],ie([0,1,13,41,8,3,2,4,32,12,5,6,37,26]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleMainService=e.LifecycleMainPhase=e.ShutdownReason=e.ILifecycleMainService=void 0,e.ILifecycleMainService=(0,b.createDecorator)("lifecycleMainService");var p;(function(h){h[h.QUIT=1]="QUIT",h[h.KILL=2]="KILL"})(p=e.ShutdownReason||(e.ShutdownReason={}));var w;(function(h){h[h.Starting=1]="Starting",h[h.Ready=2]="Ready",h[h.AfterWindowOpen=3]="AfterWindowOpen",h[h.Eventually=4]="Eventually"})(w=e.LifecycleMainPhase||(e.LifecycleMainPhase={}));let g=class Ct extends D.Disposable{get quitRequested(){return this._quitRequested}get wasRestarted(){return this._wasRestarted}get phase(){return this._phase}constructor(v,m,d){super(),this.logService=v,this.stateMainService=m,this.environmentMainService=d,this._onBeforeShutdown=this._register(new R.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new R.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onWillLoadWindow=this._register(new R.Emitter),this.onWillLoadWindow=this._onWillLoadWindow.event,this._onBeforeCloseWindow=this._register(new R.Emitter),this.onBeforeCloseWindow=this._onBeforeCloseWindow.event,this._quitRequested=!1,this._wasRestarted=!1,this._phase=1,this.windowToCloseRequest=new Set,this.oneTimeListenerTokenGenerator=0,this.windowCounter=0,this.pendingQuitPromise=void 0,this.pendingQuitPromiseResolve=void 0,this.pendingWillShutdownPromise=void 0,this.mapWindowIdToPendingUnload=new Map,this.phaseWhen=new Map,this.resolveRestarted(),this.when(2).then(()=>this.registerListeners())}resolveRestarted(){this._wasRestarted=!!this.stateMainService.getItem(Ct.QUIT_AND_RESTART_KEY),this._wasRestarted&&this.stateMainService.removeItem(Ct.QUIT_AND_RESTART_KEY)}registerListeners(){const v=()=>{this._quitRequested||(this.trace("Lifecycle#app.on(before-quit)"),this._quitRequested=!0,this.trace("Lifecycle#onBeforeShutdown.fire()"),this._onBeforeShutdown.fire(),I.isMacintosh&&this.windowCounter===0&&this.fireOnWillShutdown(1))};E.app.addListener("before-quit",v);const m=()=>{this.trace("Lifecycle#app.on(window-all-closed)"),(this._quitRequested||!I.isMacintosh)&&E.app.quit()};E.app.addListener("window-all-closed",m),E.app.once("will-quit",d=>{this.trace("Lifecycle#app.on(will-quit)"),d.preventDefault(),this.fireOnWillShutdown(1).finally(()=>{this.resolvePendingQuitPromise(!1),E.app.removeListener("before-quit",v),E.app.removeListener("window-all-closed",m),E.app.quit()})})}fireOnWillShutdown(v){if(this.pendingWillShutdownPromise)return this.pendingWillShutdownPromise;this.trace("Lifecycle#onWillShutdown.fire()");const m=[];return this._onWillShutdown.fire({reason:v,join(d){m.push(d)}}),this.pendingWillShutdownPromise=(async()=>{try{await k.Promises.settled(m)}catch(d){this.logService.error(d)}try{await this.stateMainService.close()}catch(d){this.logService.error(d)}})(),this.pendingWillShutdownPromise}set phase(v){if(vthis._onWillLoadWindow.fire({window:v,workspace:l.workspace,reason:l.reason})));const d=(0,S.assertIsDefined)(v.win);d.on("close",l=>{const n=v.id;if(this.windowToCloseRequest.has(n)){this.windowToCloseRequest.delete(n);return}this.trace(`Lifecycle#window.on('close') - window ID ${v.id}`),l.preventDefault(),this.unload(v,1).then(s=>{if(s){this.windowToCloseRequest.delete(n);return}this.windowToCloseRequest.add(n),this.trace(`Lifecycle#onBeforeCloseWindow.fire() - window ID ${n}`),this._onBeforeCloseWindow.fire(v),v.close()})}),d.on("closed",()=>{this.trace(`Lifecycle#window.on('closed') - window ID ${v.id}`),this.windowCounter--,m.dispose(),this.windowCounter===0&&(!I.isMacintosh||this._quitRequested)&&this.fireOnWillShutdown(1)})}async reload(v,m){await this.unload(v,3)||v.reload(m)}unload(v,m){const d=this.mapWindowIdToPendingUnload.get(v.id);if(d)return d;const l=this.doUnload(v,m).finally(()=>{this.mapWindowIdToPendingUnload.delete(v.id)});return this.mapWindowIdToPendingUnload.set(v.id,l),l}async doUnload(v,m){if(!v.isReady)return!1;this.trace(`Lifecycle#unload() - window ID ${v.id}`);const d=this._quitRequested?2:m,l=await this.onBeforeUnloadWindowInRenderer(v,d);return l?(this.trace(`Lifecycle#unload() - veto in renderer (window ID ${v.id})`),this.handleWindowUnloadVeto(l)):(await this.onWillUnloadWindowInRenderer(v,d),!1)}handleWindowUnloadVeto(v){return v?(this.resolvePendingQuitPromise(!0),this._quitRequested=!1,!0):!1}resolvePendingQuitPromise(v){this.pendingQuitPromiseResolve&&(this.pendingQuitPromiseResolve(v),this.pendingQuitPromiseResolve=void 0,this.pendingQuitPromise=void 0)}onBeforeUnloadWindowInRenderer(v,m){return new Promise(d=>{const l=this.oneTimeListenerTokenGenerator++,n=`vscode:ok${l}`,s=`vscode:cancel${l}`;t.validatedIpcMain.once(n,()=>{d(!1)}),t.validatedIpcMain.once(s,()=>{d(!0)}),v.send("vscode:onBeforeUnload",{okChannel:n,cancelChannel:s,reason:m})})}onWillUnloadWindowInRenderer(v,m){return new Promise(d=>{const n=`vscode:reply${this.oneTimeListenerTokenGenerator++}`;t.validatedIpcMain.once(n,()=>d()),v.send("vscode:onWillUnload",{replyChannel:n,reason:m})})}quit(v){return this.trace(`Lifecycle#quit() - begin (willRestart: ${v})`),this.pendingQuitPromise?(this.trace("Lifecycle#quit() - returning pending quit promise"),this.pendingQuitPromise):(v&&this.stateMainService.setItem(Ct.QUIT_AND_RESTART_KEY,!0),this.pendingQuitPromise=new Promise(m=>{this.pendingQuitPromiseResolve=m,this.trace("Lifecycle#quit() - calling app.quit()"),E.app.quit()}),this.pendingQuitPromise)}trace(v){this.environmentMainService.args["enable-smoke-test-driver"]?this.logService.info(v):this.logService.trace(v)}async relaunch(v){this.trace("Lifecycle#relaunch()");const m=process.argv.slice(1);if(v?.addArgs&&m.push(...v.addArgs),v?.removeArgs)for(const n of v.removeArgs){const s=m.indexOf(n);s>=0&&m.splice(s,1)}const d=()=>{try{if(I.isWindows){const n=(0,f.cwd)();n!==process.cwd()&&process.chdir(n)}}catch(n){this.logService.error(n)}this.trace("Lifecycle#relaunch() - calling app.relaunch()"),E.app.relaunch({args:m})};E.app.once("quit",d),await this.quit(!0)&&E.app.removeListener("quit",d)}async kill(v){this.trace("Lifecycle#kill()"),await this.fireOnWillShutdown(2),await Promise.race([(0,k.timeout)(1e3),(async()=>{for(const m of E.BrowserWindow.getAllWindows())if(m&&!m.isDestroyed()){let d;m.webContents&&!m.webContents.isDestroyed()?d=new Promise(l=>m.once("closed",l)):d=Promise.resolve(),m.destroy(),await d}})()]),E.app.exit(v)}};g.QUIT_AND_RESTART_KEY="lifecycle.quitAndRestart",g=we([te(0,P.ILogService),te(1,C.IStateMainService),te(2,u.IEnvironmentMainService)],g),e.LifecycleMainService=g}),define(ee[226],ie([0,1,4,3,2,5,21]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutMainService=e.IKeyboardLayoutMainService=void 0,e.IKeyboardLayoutMainService=(0,R.createDecorator)("keyboardLayoutMainService");let I=class extends k.Disposable{constructor(b){super(),this._onDidChangeKeyboardLayout=this._register(new t.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._initPromise=null,this._keyboardLayoutData=null,b.when(3).then(()=>this._initialize())}_initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){const b=await new Promise((P,C)=>{z(["native-keymap"],P,C)});this._keyboardLayoutData=f(b),E.isCI||b.onDidChangeKeyboardLayout(()=>{this._keyboardLayoutData=f(b),this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData)})}async getKeyboardLayoutData(){return await this._initialize(),this._keyboardLayoutData}};I=we([te(0,D.ILifecycleMainService)],I),e.KeyboardLayoutMainService=I;function f(S){const b=S.getKeyMap(),P=S.getCurrentKeyboardLayout();return{keyboardMapping:b,keyboardLayoutInfo:P}}}),define(ee[227],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStateService=void 0,e.IStateService=(0,E.createDecorator)("stateService")}),define(ee[228],ie([0,1,8,17,12,34,15,6]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateService=e.FileStorage=void 0;class f{constructor(P,C,u){this.storagePath=P,this.logService=C,this.fileService=u,this.storage=Object.create(null),this.lastSavedStorageContents="",this.flushDelayer=new E.ThrottledDelayer(100),this.initializing=void 0,this.closing=void 0}init(){return this.initializing||(this.initializing=this.doInit()),this.initializing}async doInit(){try{this.lastSavedStorageContents=(await this.fileService.readFile(this.storagePath)).value.toString(),this.storage=JSON.parse(this.lastSavedStorageContents)}catch(P){P.fileOperationResult!==1&&this.logService.error(P)}}getItem(P,C){const u=this.storage[P];return(0,k.isUndefinedOrNull)(u)?C:u}setItem(P,C){this.setItems([{key:P,data:C}])}setItems(P){let C=!1;for(const{key:u,data:p}of P)this.storage[u]!==p&&((0,k.isUndefinedOrNull)(p)?(0,k.isUndefined)(this.storage[u])||(this.storage[u]=void 0,C=!0):(this.storage[u]=p,C=!0));C&&this.save()}removeItem(P){(0,k.isUndefined)(this.storage[P])||(this.storage[P]=void 0,this.save())}async save(){if(!this.closing)return this.flushDelayer.trigger(()=>this.doSave())}async doSave(){if(!this.initializing)return;await this.initializing;const P=JSON.stringify(this.storage,null,4);if(P!==this.lastSavedStorageContents)try{await this.fileService.writeFile(this.storagePath,t.VSBuffer.fromString(P)),this.lastSavedStorageContents=P}catch(C){this.logService.error(C)}}async close(){return this.closing||(this.closing=this.flushDelayer.trigger(()=>this.doSave(),0)),this.closing}}e.FileStorage=f;let S=class{constructor(P,C,u){this.fileStorage=new f(P.stateResource,C,u)}async init(){await this.fileStorage.init()}getItem(P,C){return this.fileStorage.getItem(P,C)}};S=we([te(0,R.IEnvironmentService),te(1,I.ILogService),te(2,D.IFileService)],S),e.StateService=S}),define(ee[229],ie([0,1,228]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateMainService=void 0;class t extends E.StateService{setItem(R,D){this.fileStorage.setItem(R,D)}setItems(R){this.fileStorage.setItems(R)}removeItem(R){this.fileStorage.removeItem(R)}close(){return this.fileStorage.close()}}e.StateMainService=t}),define(ee[113],ie([0,1,4,32,7,29]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;function D(S){if(E.platform===2&&/^penguin(\.|$)/i.test(S))return"chromebook"}async function I(S,b,P,C,u,p,w,g,h,v){const m=Object.create(null);m["common.machineId"]=w,m.sessionID=(0,R.generateUuid)()+Date.now(),m.commitHash=u,m.version=p,m["common.platformVersion"]=(b||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),m["common.platform"]=(0,E.PlatformToString)(E.platform),m["common.nodePlatform"]=t.platform,m["common.nodeArch"]=C,m["common.product"]=v||"desktop",g&&(m["common.msftInternal"]=g);let d=0;const l=Date.now();Object.defineProperties(m,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-l,enumerable:!0},"common.sequence":{get:()=>d++,enumerable:!0}}),E.isLinuxSnap&&(m["common.snap"]="true");const n=D(P);n&&(m["common.platformDetail"]=n);try{const s=await S.readFile(k.URI.file(h));m["common.source"]=s.value.toString().slice(0,30)}catch{}return m}e.resolveCommonProperties=I;function f(S){const b=t.env.USERDNSDOMAIN;if(!b)return!1;const P=b.toLowerCase();return S.some(C=>P===C)}e.verifyMicrosoftInternalDomain=f}),define(ee[35],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,E.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,E.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var t;(function(R){R[R.NONE=0]="NONE",R[R.CRASH=1]="CRASH",R[R.ERROR=2]="ERROR",R[R.USAGE=3]="USAGE"})(t=e.TelemetryLevel||(e.TelemetryLevel={}));var k;(function(R){R.OFF="off",R.CRASH="crash",R.ERROR="error",R.ON="all"})(k=e.TelemetryConfiguration||(e.TelemetryConfiguration={}))}),define(ee[230],ie([0,1,27,8,43,14,9,4,7,82,23,101,85,15,20,35]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsService=e.collectLaunchConfigs=e.getMachineInfo=e.collectWorkspaceStats=void 0;const g=new Map;async function h(n,s){const i=`${n}::${s.join(":")}`,o=g.get(i);if(o)return o;const r=[{tag:"grunt.js",filePattern:/^gruntfile\.js$/i},{tag:"gulp.js",filePattern:/^gulpfile\.js$/i},{tag:"tsconfig.json",filePattern:/^tsconfig\.json$/i},{tag:"package.json",filePattern:/^package\.json$/i},{tag:"jsconfig.json",filePattern:/^jsconfig\.json$/i},{tag:"tslint.json",filePattern:/^tslint\.json$/i},{tag:"eslint.json",filePattern:/^eslint\.json$/i},{tag:"tasks.json",filePattern:/^tasks\.json$/i},{tag:"launch.json",filePattern:/^launch\.json$/i},{tag:"settings.json",filePattern:/^settings\.json$/i},{tag:"webpack.config.js",filePattern:/^webpack\.config\.js$/i},{tag:"project.json",filePattern:/^project\.json$/i},{tag:"makefile",filePattern:/^makefile$/i},{tag:"sln",filePattern:/^.+\.sln$/i},{tag:"csproj",filePattern:/^.+\.csproj$/i},{tag:"cmake",filePattern:/^.+\.cmake$/i},{tag:"github-actions",filePattern:/^.+\.ya?ml$/i,relativePathPattern:/^\.github(?:\/|\\)workflows$/i},{tag:"devcontainer.json",filePattern:/^devcontainer\.json$/i},{tag:"dockerfile",filePattern:/^(dockerfile|docker\-compose\.ya?ml)$/i}],c=new Map,a=new Map,y=2e4;function M(_,Y,G,V){const oe=Y.substring(_.length+1);return t.Promises.withAsyncBody(async se=>{let ae;try{ae=await b.Promises.readdir(Y,{withFileTypes:!0})}catch{se();return}if(V.count>=y){V.count+=ae.length,V.maxReached=!0,se();return}let fe=ae.length;if(fe===0){se();return}let K=ae;V.count+ae.length>y&&(V.maxReached=!0,fe=y-V.count,K=ae.slice(0,fe)),V.count+=ae.length;for(const q of K)if(q.isDirectory()){if(G.includes(q.name)||await M(_,(0,D.join)(Y,q.name),G,V),--fe===0){se();return}}else{const F=q.name.lastIndexOf(".");if(F>=0){const A=q.name.substring(F+1);A&&c.set(A,(c.get(A)??0)+1)}for(const A of r)A.relativePathPattern?.test(oe)!==!1&&A.filePattern.test(q.name)&&a.set(A.tag,(a.get(A.tag)??0)+1);if(--fe===0){se();return}}})}const T=t.Promises.withAsyncBody(async _=>{const Y={count:0,maxReached:!1};await M(n,n,s,Y);const G=await d(n);_({configFiles:v(a),fileTypes:v(c),fileCount:Y.count,maxFilesReached:Y.maxReached,launchConfigFiles:G})});return g.set(i,T),T}e.collectWorkspaceStats=h;function v(n){return Array.from(n.entries(),([s,i])=>({name:s,count:i})).sort((s,i)=>i.count-s.count)}function m(){const n={os:`${E.type()} ${E.arch()} ${E.release()}`,memory:`${(E.totalmem()/u.ByteSize.GB).toFixed(2)}GB (${(E.freemem()/u.ByteSize.GB).toFixed(2)}GB free)`,vmHint:`${Math.round(S.virtualMachineHint.value()*100)}%`},s=E.cpus();return s&&s.length>0&&(n.cpus=`${s[0].model} (${s.length} x ${s[0].speed})`),n}e.getMachineInfo=m;async function d(n){try{const s=new Map,i=(0,D.join)(n,".vscode","launch.json"),o=await b.Promises.readFile(i),r=[],c=(0,k.parse)(o.toString(),r);if(r.length)return console.log(`Unable to parse ${i}`),[];if((0,k.getNodeType)(c)==="object"&&c.configurations)for(const a of c.configurations){const y=a.type;y&&(s.has(y)?s.set(y,s.get(y)+1):s.set(y,1))}return v(s)}catch{return[]}}e.collectLaunchConfigs=d;let l=class{constructor(s,i){this.telemetryService=s,this.productService=i}formatMachineInfo(s){const i=[];return i.push(`OS Version: ${s.os}`),i.push(`CPUs: ${s.cpus}`),i.push(`Memory (System): ${s.memory}`),i.push(`VM: ${s.vmHint}`),i.join(` `)}formatEnvironment(s){const i=[];i.push(`Version: ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit||"Commit unknown"}, ${this.productService.date||"Date unknown"})`),i.push(`OS Version: ${E.type()} ${E.arch()} ${E.release()}`);const o=E.cpus();return o&&o.length>0&&i.push(`CPUs: ${o[0].model} (${o.length} x ${o[0].speed})`),i.push(`Memory (System): ${(E.totalmem()/u.ByteSize.GB).toFixed(2)}GB (${(E.freemem()/u.ByteSize.GB).toFixed(2)}GB free)`),I.isWindows||i.push(`Load (avg): ${E.loadavg().map(r=>Math.round(r)).join(", ")}`),i.push(`VM: ${Math.round(S.virtualMachineHint.value()*100)}%`),i.push(`Screen Reader: ${s.screenReader?"yes":"no"}`),i.push(`Process Argv: ${s.mainArguments.join(" ")}`),i.push(`GPU Status: ${this.expandGPUFeatures(s.gpuFeatureStatus)}`),i.join(` `)}async getPerformanceInfo(s,i){return Promise.all([(0,P.listProcesses)(s.mainPID),this.formatWorkspaceMetadata(s)]).then(async o=>{let[r,c]=o,a=this.formatProcessList(s,r);return i.forEach(y=>{if((0,C.isRemoteDiagnosticError)(y))a+=` ${y.errorMessage}`,c+=` ${y.errorMessage}`;else if(a+=` Remote: ${y.hostName}`,y.processes&&(a+=` ${this.formatProcessList(s,y.processes)}`),y.workspaceMetadata){c+=` | Remote: ${y.hostName}`;for(const M of Object.keys(y.workspaceMetadata)){const T=y.workspaceMetadata[M];let _=`${T.fileCount} files`;T.maxFilesReached&&(_=`more than ${_}`),c+=`| Folder (${M}): ${_}`,c+=this.formatWorkspaceStats(T)}}}),{processInfo:a,workspaceInfo:c}})}async getSystemInfo(s,i){const{memory:o,vmHint:r,os:c,cpus:a}=m(),y={os:c,memory:o,cpus:a,vmHint:r,processArgs:`${s.mainArguments.join(" ")}`,gpuStatus:s.gpuFeatureStatus,screenReader:`${s.screenReader?"yes":"no"}`,remoteData:i};return I.isWindows||(y.load=`${E.loadavg().map(M=>Math.round(M)).join(", ")}`),I.isLinux&&(y.linuxEnv={desktopSession:process.env.DESKTOP_SESSION,xdgSessionDesktop:process.env.XDG_SESSION_DESKTOP,xdgCurrentDesktop:process.env.XDG_CURRENT_DESKTOP,xdgSessionType:process.env.XDG_SESSION_TYPE}),Promise.resolve(y)}async getDiagnostics(s,i){const o=[];return(0,P.listProcesses)(s.mainPID).then(async r=>(o.push(""),o.push(this.formatEnvironment(s)),o.push(""),o.push(this.formatProcessList(s,r)),s.windows.some(c=>c.folderURIs&&c.folderURIs.length>0&&!c.remoteAuthority)&&(o.push(""),o.push("Workspace Stats: "),o.push(await this.formatWorkspaceMetadata(s))),i.forEach(c=>{if((0,C.isRemoteDiagnosticError)(c))o.push(` ${c.errorMessage}`);else if(o.push(` `),o.push(`Remote: ${c.hostName}`),o.push(this.formatMachineInfo(c.machineInfo)),c.processes&&o.push(this.formatProcessList(s,c.processes)),c.workspaceMetadata)for(const a of Object.keys(c.workspaceMetadata)){const y=c.workspaceMetadata[a];let M=`${y.fileCount} files`;y.maxFilesReached&&(M=`more than ${M}`),o.push(`Folder (${a}): ${M}`),o.push(this.formatWorkspaceStats(y))}}),o.push(""),o.push(""),o.join(` `)))}formatWorkspaceStats(s){const i=[];let r=0;const c=(T,_)=>{const Y=` ${T}(${_})`;r+Y.length>60?(i.push(a),a="| ",r=a.length):r+=Y.length,a+=Y};let a="| File types:";const y=10,M=s.fileTypes.length>y?y:s.fileTypes.length;for(let T=0;T=0&&(a="| Conf files:",r=0,s.configFiles.forEach(T=>{c(T.name,T.count)}),i.push(a)),s.launchConfigFiles.length>0){let T="| Launch Configs:";s.launchConfigFiles.forEach(_=>{T+=_.count>1?` ${_.name}(${_.count})`:` ${_.name}`}),i.push(T)}return i.join(` `)}expandGPUFeatures(s){const i=Math.max(...Object.keys(s).map(o=>o.length));return Object.keys(s).map(o=>`${o}: ${" ".repeat(i-o.length)} ${s[o]}`).join(` `)}formatWorkspaceMetadata(s){const i=[],o=[];return s.windows.forEach(r=>{r.folderURIs.length===0||!!r.remoteAuthority||(i.push(`| Window (${r.title})`),r.folderURIs.forEach(c=>{const a=f.URI.revive(c);if(a.scheme===R.Schemas.file){const y=a.fsPath;o.push(h(y,["node_modules",".git"]).then(M=>{let T=`${M.fileCount} files`;M.maxFilesReached&&(T=`more than ${T}`),i.push(`| Folder (${(0,D.basename)(y)}): ${T}`),i.push(this.formatWorkspaceStats(M))}).catch(M=>{i.push(`| Error: Unable to collect workspace stats for folder ${y} (${M.toString()})`)}))}else i.push(`| Folder (${a.toString()}): Workspace stats not available.`)}))}),Promise.all(o).then(r=>i.join(` `)).catch(r=>`Unable to collect workspace stats: ${r}`)}formatProcessList(s,i){const o=new Map;s.windows.forEach(c=>o.set(c.pid,c.title));const r=[];return r.push("CPU % Mem MB PID Process"),i&&this.formatProcessItem(s.mainPID,o,r,i,0),r.join(` `)}formatProcessItem(s,i,o,r,c){const a=c===0;let y;a?y=r.pid===s?`${this.productService.applicationName} main`:"remote agent":(y=`${" ".repeat(c)} ${r.name}`,r.name==="window"&&(y=`${y} (${i.get(r.pid)})`));const M=process.platform==="win32"?r.mem:E.totalmem()*(r.mem/100);o.push(`${r.load.toFixed(0).padStart(5," ")} ${(M/u.ByteSize.MB).toFixed(0).padStart(6," ")} ${r.pid.toFixed(0).padStart(6," ")} ${y}`),Array.isArray(r.children)&&r.children.forEach(T=>this.formatProcessItem(s,i,o,T,c+1))}async getWorkspaceFileExtensions(s){const i=new Set;for(const{uri:o}of s.folders){const r=f.URI.revive(o);if(r.scheme!==R.Schemas.file)continue;const c=r.fsPath;try{(await h(c,["node_modules",".git"])).fileTypes.forEach(y=>i.add(y.name))}catch{}}return{extensions:[...i]}}async reportWorkspaceStats(s){for(const{uri:i}of s.folders){const o=f.URI.revive(i);if(o.scheme!==R.Schemas.file)continue;const r=o.fsPath;try{const c=await h(r,["node_modules",".git"]);this.telemetryService.publicLog2("workspace.stats",{"workspace.id":s.telemetryId,rendererSessionId:s.rendererSessionId}),c.fileTypes.forEach(a=>{this.telemetryService.publicLog2("workspace.stats.file",{rendererSessionId:s.rendererSessionId,type:a.name,count:a.count})}),c.launchConfigFiles.forEach(a=>{this.telemetryService.publicLog2("workspace.stats.launchConfigFile",{rendererSessionId:s.rendererSessionId,type:a.name,count:a.count})}),c.configFiles.forEach(a=>{this.telemetryService.publicLog2("workspace.stats.configFiles",{rendererSessionId:s.rendererSessionId,type:a.name,count:a.count})})}catch{}}}};l=we([te(0,w.ITelemetryService),te(1,p.IProductService)],l),e.DiagnosticsService=l}),define(ee[231],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAppenderClient=e.TelemetryAppenderChannel=void 0;class E{constructor(R){this.appenders=R}listen(R,D){throw new Error(`Event not found: ${D}`)}call(R,D,{eventName:I,data:f}){return this.appenders.forEach(S=>S.log(I,f)),Promise.resolve(null)}}e.TelemetryAppenderChannel=E;class t{constructor(R){this.channel=R}log(R,D){return this.channel.call("log",{eventName:R,data:D}).then(void 0,I=>`Failed to log telemetry: ${console.warn(I)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=t}),define(ee[74],ie([0,1,50,97,12,19,113,35]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=void 0;class f{constructor(){this.sendErrorTelemetry=!1,this.telemetryLevel=(0,t.staticObservableValue)(0)}publicLog(o,r){return Promise.resolve(void 0)}publicLog2(o,r){return this.publicLog(o,r)}publicLogError(o,r){return Promise.resolve(void 0)}publicLogError2(o,r){return this.publicLogError(o,r)}setExperimentProperty(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId",firstSessionDate:"someValue.firstSessionDate"})}}e.NullTelemetryServiceShape=f,e.NullTelemetryService=new f;class S{async publicLog(o,r,c){}async publicLogError(o,r,c){}}e.NullEndpointTelemetryService=S,e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function b(i,o){return o.onDidChangeConfiguration(r=>{r.source!==7&&i.publicLog2("updateConfiguration",{configurationSource:(0,R.ConfigurationTargetToString)(r.source),configurationKeys:h(r.sourceConfig)})})}e.configurationTelemetry=b;function P(i,o){return!(o.disableTelemetry||!i.enableTelemetry||o.extensionTestsLocationURI)}e.supportsTelemetry=P;function C(i){const o=i.getValue(I.TELEMETRY_SETTING_ID),r=i.getValue("telemetry.enableCrashReporter");if(i.getValue(I.TELEMETRY_OLD_SETTING_ID)===!1||r===!1)return 0;switch(o??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=C;function u(i){const o={},r={},c={};g(i,c);for(let a in c){a=a.length>150?a.substr(a.length-149):a;const y=c[a];typeof y=="number"?r[a]=y:typeof y=="boolean"?r[a]=y?1:0:typeof y=="string"?(y.length>8192&&console.warn(`Telemetry property: ${a} has been trimmed to 8192, the original length is ${y.length}`),o[a]=y.substring(0,8191)):typeof y<"u"&&y!==null&&(o[a]=y)}return{properties:o,measurements:r}}e.validateTelemetryData=u;const p=["ssh-remote","dev-container","attached-container","wsl","tunneling","codespaces"];function w(i){if(!i)return"none";for(const o of p)if(i.startsWith(`${o}+`))return o;return"other"}e.cleanRemoteAuthority=w;function g(i,o,r=0,c){if(!!i)for(const a of Object.getOwnPropertyNames(i)){const y=i[a],M=c?c+a:a;Array.isArray(y)?o[M]=(0,E.safeStringify)(y):y instanceof Date?o[M]=y.toISOString():(0,k.isObject)(y)?r<2?g(y,o,r+1,M+"."):o[M]=(0,E.safeStringify)(y):o[M]=y}}function h(i){if(!i)return[];const o=[];return v(o,"",i),o}function v(i,o,r){r&&typeof r=="object"&&!Array.isArray(r)?Object.keys(r).forEach(c=>v(i,o?`${o}.${c}`:c,r[c])):i.push(o)}function m(i,o){const r=i.msftInternalDomains||[],c=o.getValue("telemetry.internalTesting");return(0,D.verifyMicrosoftInternalDomain)(r)||c}e.isInternalTelemetry=m;function d(i){return[i.appRoot,i.extensionsPath,i.userHome.fsPath,i.tmpDir.fsPath,i.userDataPath]}e.getPiiPathsFromEnvironment=d;function l(i,o){if(!i||!i.includes("/")&&!i.includes("\\"))return i;let r=i;const c=[];for(const T of o)for(;;){const _=T.exec(i);if(!_)break;c.push([_.index,T.lastIndex])}const a=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,y=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let M=0;for(r="";;){const T=y.exec(i);if(!T)break;const _=c.some(([Y,G])=>T.index",M=y.lastIndex)}return M`;return i}function s(i,o){return(0,E.cloneAndChange)(i,r=>{if(typeof r=="string"){let c=r;c=l(c,o);for(const a of o)c=c.replace(a,"");return c=n(c),c}})}e.cleanData=s}),define(ee[232],ie([0,1,188,74]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function k(R,D,I,f,S,b,P){const C={"X-Market-Client-Id":`VSCode ${R}`,"User-Agent":`VSCode ${R} (${D.nameShort})`};if((0,t.supportsTelemetry)(D,I)&&(0,t.getTelemetryLevel)(f)===3){const u=await(0,E.getServiceMachineId)(I,S,b),{sessionId:p}=await P.getTelemetryInfo();C["X-Market-User-Id"]=u,C["VSCode-SessionId"]=p}return C}e.resolveMarketplaceHeaders=k}),define(ee[233],ie([0,1,2,50,97,4,25,167,19,62,54,20,47,35,74]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let w=class{constructor(v,m,d){this._configurationService=m,this._productService=d,this._experimentProperties={},this.telemetryLevel=new k.MutableObservableValue(3),this._disposables=new E.DisposableStore,this._cleanupPatterns=[],this._appenders=v.appenders,this._commonProperties=v.commonProperties||Promise.resolve({}),this._piiPaths=v.piiPaths||[],this._sendErrorTelemetry=!!v.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const l of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,D.escapeRegExpCharacters)(l),"gi"));this._updateTelemetryLevel(),this._configurationService.onDidChangeConfiguration(this._updateTelemetryLevel,this,this._disposables)}setExperimentProperty(v,m){this._experimentProperties[v]=m}_updateTelemetryLevel(){let v=(0,p.getTelemetryLevel)(this._configurationService);const m=this._productService.enabledTelemetryLevels;if(m){this._sendErrorTelemetry=this.sendErrorTelemetry?m.error:!1;const d=m.usage?3:m.error?2:0;v=Math.min(v,d)}this.telemetryLevel.value=v}get sendErrorTelemetry(){return this._sendErrorTelemetry}async getTelemetryInfo(){const v=await this._commonProperties,m=v.sessionID,d=v["common.machineId"],l=v["common.firstSessionDate"],n=v["common.msftInternal"];return{sessionId:m,machineId:d,firstSessionDate:l,msftInternal:n}}dispose(){this._disposables.dispose()}_log(v,m,d,l){return this.telemetryLevel.value{d=(0,t.mixin)(d,this._experimentProperties),d=(0,p.cleanData)(d,this._cleanupPatterns),d=(0,t.mixin)(d,n),this._appenders.forEach(s=>s.log(v,d))},n=>{console.error(n)})}publicLog(v,m,d){return this._log(v,3,m,d)}publicLog2(v,m,d){return this.publicLog(v,m,d)}publicLogError(v,m){return this._sendErrorTelemetry?this._log(v,2,m,!0):Promise.resolve(void 0)}publicLogError2(v,m){return this.publicLogError(v,m)}};w.IDLE_START_EVENT_NAME="UserIdleStart",w.IDLE_STOP_EVENT_NAME="UserIdleStop",w=we([te(1,f.IConfigurationService),te(2,P.IProductService)],w),e.TelemetryService=w;function g(){const h=(0,I.localize)(0,null,b.default.nameLong),v=b.default.privacyStatementUrl?(0,I.localize)(2,null,"https://aka.ms/vscode-telemetry",b.default.privacyStatementUrl):(0,I.localize)(1,null,"https://aka.ms/vscode-telemetry"),m=R.isWeb?"":(0,I.localize)(3,null),d=(0,I.localize)(4,null),l=(0,I.localize)(5,null),n=(0,I.localize)(6,null),s=(0,I.localize)(7,null),i=` | | ${d} | ${l} | ${n} | |:------|:---------------------:|:---------------:|:--------------:| | all | \u2713 | \u2713 | \u2713 | | error | \u2713 | \u2713 | - | | crash | \u2713 | - | - | | off | - | - | - | `,o=(0,I.localize)(8,null);return` ${h} ${v} ${m}   ${s} ${i}   ${o} `}C.Registry.as(S.Extensions.Configuration).registerConfiguration({id:u.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,I.localize)(9,null),properties:{[u.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,I.localize)(10,null),(0,I.localize)(11,null),(0,I.localize)(12,null),(0,I.localize)(13,null)],markdownDescription:g(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),C.Registry.as(S.Extensions.Configuration).registerConfiguration({id:u.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,I.localize)(14,null),properties:{[u.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:b.default.privacyStatementUrl?(0,I.localize)(16,null,b.default.nameLong,b.default.privacyStatementUrl):(0,I.localize)(15,null,b.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,I.localize)(17,null,`\`#${u.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(ee[234],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var E;(function(R){R.DARK="dark",R.LIGHT="light",R.HIGH_CONTRAST_DARK="hcDark",R.HIGH_CONTRAST_LIGHT="hcLight"})(E=e.ColorScheme||(e.ColorScheme={}));function t(R){return R===E.HIGH_CONTRAST_DARK||R===E.HIGH_CONTRAST_LIGHT}e.isHighContrast=t;function k(R){return R===E.DARK||R===E.HIGH_CONTRAST_DARK}e.isDark=k}),define(ee[235],ie([0,1,119,3,2,5,47,234]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.FolderThemeIcon=e.FileThemeIcon=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=(0,R.createDecorator)("themeService");var f;(function(g){function h(v){return v&&typeof v=="object"&&typeof v.id=="string"}g.isThemeColor=h})(f=e.ThemeColor||(e.ThemeColor={}));function S(g){return{id:g}}e.themeColorFromId=S;var b;(function(g){function h(o){return o&&typeof o=="object"&&typeof o.id=="string"&&(typeof o.color>"u"||f.isThemeColor(o.color))}g.isThemeIcon=h;const v=new RegExp(`^\\$\\((${E.CSSIcon.iconNameExpression}(?:${E.CSSIcon.iconModifierExpression})?)\\)$`);function m(o){const r=v.exec(o);if(!r)return;const[,c]=r;return{id:c}}g.fromString=m;function d(o){return{id:o}}g.fromId=d;function l(o,r){let c=o.id;const a=c.lastIndexOf("~");return a!==-1&&(c=c.substring(0,a)),r&&(c=`${c}~${r}`),{id:c}}g.modify=l;function n(o){const r=o.id.lastIndexOf("~");if(r!==-1)return o.id.substring(r+1)}g.getModifier=n;function s(o,r){return o.id===r.id&&o.color?.id===r.color?.id}g.isEqual=s;function i(o,r){return{id:o.id,color:r?S(r):void 0}}g.asThemeIcon=i,g.asClassNameArray=E.CSSIcon.asClassNameArray,g.asClassName=E.CSSIcon.asClassName,g.asCSSSelector=E.CSSIcon.asCSSSelector})(b=e.ThemeIcon||(e.ThemeIcon={})),e.FileThemeIcon=E.Codicon.file,e.FolderThemeIcon=E.Codicon.folder;function P(g){switch(g){case I.ColorScheme.DARK:return"vs-dark";case I.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case I.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=P,e.Extensions={ThemingContribution:"base.contributions.theming"};class C{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new t.Emitter}onColorThemeChange(h){return this.themingParticipants.push(h),this.onThemingParticipantAddedEmitter.fire(h),(0,k.toDisposable)(()=>{const v=this.themingParticipants.indexOf(h);this.themingParticipants.splice(v,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}const u=new C;D.Registry.add(e.Extensions.ThemingContribution,u);function p(g){return u.onColorThemeChange(g)}e.registerThemingParticipant=p;class w extends k.Disposable{constructor(h){super(),this.themeService=h,this.theme=h.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(v=>this.onThemeChange(v)))}onThemeChange(h){this.theme=h,this.updateStyles()}updateStyles(){}getColor(h,v){let m=this.theme.getColor(h);return m&&v&&(m=v(m,this.theme)),m?m.toString():null}}e.Themable=w}),define(ee[64],ie([0,1,13,3,2,4,19,5,37]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeMainService=e.IThemeMainService=void 0;const S="#FFFFFF",b="#1E1E1E",P="#000000",C="#FFFFFF",u="theme",p="themeBackground",w="windowSplash";e.IThemeMainService=(0,I.createDecorator)("themeMainService");let g=class extends k.Disposable{constructor(v,m){super(),this.stateMainService=v,this.configurationService=m,this._onDidChangeColorScheme=this._register(new t.Emitter),this.onDidChangeColorScheme=this._onDidChangeColorScheme.event,E.nativeTheme.on("updated",()=>{this._onDidChangeColorScheme.fire(this.getColorScheme())})}getColorScheme(){if(R.isWindows){if(E.nativeTheme.shouldUseHighContrastColors)return{dark:E.nativeTheme.shouldUseInvertedColorScheme,highContrast:!0}}else if(R.isMacintosh){if(E.nativeTheme.shouldUseInvertedColorScheme||E.nativeTheme.shouldUseHighContrastColors)return{dark:E.nativeTheme.shouldUseDarkColors,highContrast:!0}}else if(R.isLinux&&E.nativeTheme.shouldUseHighContrastColors)return{dark:!0,highContrast:!0};return{dark:E.nativeTheme.shouldUseDarkColors,highContrast:!1}}getBackgroundColor(){const v=this.getColorScheme();if(v.highContrast&&this.configurationService.getValue("window.autoDetectHighContrast"))return v.dark?P:C;let m=this.stateMainService.getItem(p,null);if(!m)switch(this.stateMainService.getItem(u,"vs-dark").split(" ")[0]){case"vs":m=S;break;case"hc-black":m=P;break;case"hc-light":m=C;break;default:m=b}return R.isMacintosh&&m.toUpperCase()===b&&(m="#171717"),m}saveWindowSplash(v,m){this.stateMainService.setItems([{key:u,data:m.baseTheme},{key:p,data:m.colorInfo.background},{key:w,data:m}]),typeof v=="number"&&this.updateBackgroundColor(v,m)}updateBackgroundColor(v,m){for(const d of E.BrowserWindow.getAllWindows())if(d.id===v){d.setBackgroundColor(m.colorInfo.background);break}}getWindowSplash(){return this.stateMainService.getItem(w)}};g=we([te(0,f.IStateMainService),te(1,D.IConfigurationService)],g),e.ThemeMainService=g}),define(ee[114],ie([0,1,3,19,5,6]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,k.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,k.createDecorator)("sharedTunnelsService");var D;(function(w){w.Http="http",w.Https="https"})(D=e.TunnelProtocol||(e.TunnelProtocol={}));var I;(function(w){w.ConstantPrivate="constantPrivate",w.Private="private",w.Public="public"})(I=e.TunnelPrivacyId||(e.TunnelPrivacyId={}));var f;(function(w){w[w.Notify=1]="Notify",w[w.OpenBrowser=2]="OpenBrowser",w[w.OpenPreview=3]="OpenPreview",w[w.Silent=4]="Silent",w[w.Ignore=5]="Ignore",w[w.OpenBrowserOnce=6]="OpenBrowserOnce"})(f=e.ProvidedOnAutoForward||(e.ProvidedOnAutoForward={}));function S(w){if(w.scheme!=="http"&&w.scheme!=="https")return;const g=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(w.authority);if(!!g)return{address:g[1],port:+g[2]}}e.extractLocalHostUriMetaDataForPortMapping=S,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function b(w){return e.LOCALHOST_ADDRESSES.indexOf(w)>=0}e.isLocalhost=b,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function P(w){return e.ALL_INTERFACES_ADDRESSES.indexOf(w)>=0}e.isAllInterfaces=P;function C(w,g,h,v){if(h===1)return!1;if(h===2&&P(g)){const m=/(\d+)\.(\d+)\.(\d+)/g.exec(v);if(m?.length===4&&parseInt(m[1])>=18)return!1}return w<1024}e.isPortPrivileged=C;class u{constructor(g,h,v){this.remoteAddress=g,this.localAddress=h,this._dispose=v,this._onDispose=new E.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=u;let p=class{constructor(g,h){this.logService=g,this.configurationService=h,this._onTunnelOpened=new E.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new E.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new E.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const g=this.configurationService.getValue("remote.localPortHost");return!g||g==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(g){return this._tunnelProvider=g,g?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(g){this._canElevate=g.elevation,this._privacyOptions=g.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const g=[],h=Array.from(this._tunnels.values());for(const v of h){const m=Array.from(v.values());for(const d of m){const l=await d.value;l&&g.push(l)}}return g}async dispose(){for(const g of this._tunnels.values()){for(const{value:h}of g.values())await h.then(v=>v?.dispose());g.clear()}this._tunnels.clear()}setEnvironmentTunnel(g,h,v,m,d){this.addTunnelToMap(g,h,Promise.resolve({tunnelRemoteHost:g,tunnelRemotePort:h,localAddress:v,privacy:m,protocol:d,dispose:()=>Promise.resolve()}))}async getExistingTunnel(g,h){(P(g)||b(g))&&(g=e.LOCALHOST_ADDRESSES[0]);const v=this.getTunnelFromMap(g,h);if(v)return++v.refcount,v.value}openTunnel(g,h,v,m,d=!1,l,n){if(this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${h}:${v} on local port ${m}.`),!g)return;if(h||(h="localhost"),this._tunnelProvider&&this._factoryInProgress.has(v)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const s=this.retainOrCreateTunnel(g,h,v,m,d,l,n);return s?s.then(i=>{if(!i){this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyTunnelFromMap(h,v);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const o=this.makeTunnel(i);return(i.tunnelRemoteHost!==h||i.tunnelRemotePort!==v)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(o),o}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),s)}makeTunnel(g){return{tunnelRemotePort:g.tunnelRemotePort,tunnelRemoteHost:g.tunnelRemoteHost,tunnelLocalPort:g.tunnelLocalPort,localAddress:g.localAddress,privacy:g.privacy,protocol:g.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${g.tunnelRemoteHost}:${g.tunnelRemotePort} `);const h=this._tunnels.get(g.tunnelRemoteHost);if(h){const v=h.get(g.tunnelRemotePort);v&&(v.refcount--,await this.tryDisposeTunnel(g.tunnelRemoteHost,g.tunnelRemotePort,v))}}}}async tryDisposeTunnel(g,h,v){if(v.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${g}:${h}.`);const m=v.value.then(async d=>{d&&(await d.dispose(!0),this._onTunnelClosed.fire({host:d.tunnelRemoteHost,port:d.tunnelRemotePort}))});return this._tunnels.has(g)&&this._tunnels.get(g).delete(h),m}}async closeTunnel(g,h){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${g}:${h} `);const v=this._tunnels.get(g);if(v&&v.has(h)){const m=v.get(h);m.refcount=0,await this.tryDisposeTunnel(g,h,m)}}addTunnelToMap(g,h,v){this._tunnels.has(g)||this._tunnels.set(g,new Map),this._tunnels.get(g).set(h,{refcount:1,value:v})}async removeEmptyTunnelFromMap(g,h){const v=this._tunnels.get(g);v&&(await v.get(h)||v.delete(h),v.size===0&&this._tunnels.delete(g))}getTunnelFromMap(g,h){const v=[g];b(g)?(v.push(...e.LOCALHOST_ADDRESSES),v.push(...e.ALL_INTERFACES_ADDRESSES)):P(g)&&v.push(...e.ALL_INTERFACES_ADDRESSES);const m=v.map(d=>this._tunnels.get(d));for(const d of m){const l=d?.get(h);if(l)return l}}canTunnel(g){return!!S(g)}createWithProvider(g,h,v,m,d,l,n){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${h}:${v} on local port ${m}.`);const s=v;this._factoryInProgress.add(s);const i=m===void 0?v:m,o={elevationRequired:d?this.isPortPrivileged(i):!1},r={remoteAddress:{host:h,port:v},localAddressPort:m,privacy:l,public:l?l!==I.Private:void 0,protocol:n},c=g.forwardPort(r,o);return c?(this.addTunnelToMap(h,v,c),c.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(s)})):this._factoryInProgress.delete(s),c}};p=we([te(0,R.ILogService),te(1,t.IConfigurationService)],p),e.AbstractTunnelService=p}),define(ee[236],ie([0,1,79,27,96,220,8,2,19,6,20,219,114,88,4]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedTunnelsService=e.TunnelService=e.BaseTunnelService=void 0;async function w(d,l,n,s,i){let o;for(let r=3;r&&(o?.dispose(),o=await new g(d,l,n,s,i).waitForReady(),!(i&&k.BROWSER_RESTRICTED_PORTS[i]||!k.BROWSER_RESTRICTED_PORTS[o.tunnelLocalPort]));r--);return o}class g extends I.Disposable{constructor(l,n,s,i,o){super(),this.defaultTunnelHost=n,this.suggestedLocalPort=o,this.privacy=C.TunnelPrivacyId.Private,this._socketsDispose=new Map,this._options=l,this._server=E.createServer(),this._barrier=new D.Barrier,this._listeningListener=()=>this._barrier.open(),this._server.on("listening",this._listeningListener),this._connectionListener=r=>this._onConnection(r),this._server.on("connection",this._connectionListener),this._errorListener=()=>{},this._server.on("error",this._errorListener),this.tunnelRemotePort=i,this.tunnelRemoteHost=s}async dispose(){super.dispose(),this._server.removeListener("listening",this._listeningListener),this._server.removeListener("connection",this._connectionListener),this._server.removeListener("error",this._errorListener),this._server.close(),Array.from(this._socketsDispose.values()).forEach(n=>{n()})}async waitForReady(){const l=this.suggestedLocalPort??this.tunnelRemotePort,n=(0,C.isAllInterfaces)(this.defaultTunnelHost)?"0.0.0.0":"127.0.0.1";let s=await(0,k.findFreePortFaster)(l,2,1e3,n),i=null;return this._server.listen(s,this.defaultTunnelHost),await this._barrier.wait(),i=this._server.address(),i||(s=0,this._server.listen(s,this.defaultTunnelHost),await this._barrier.wait(),i=this._server.address()),this.tunnelLocalPort=i.port,this.localAddress=`${this.tunnelRemoteHost==="127.0.0.1"?"127.0.0.1":"localhost"}:${i.port}`,this}async _onConnection(l){l.pause();const n=(0,C.isLocalhost)(this.tunnelRemoteHost)||(0,C.isAllInterfaces)(this.tunnelRemoteHost)?"localhost":this.tunnelRemoteHost,s=await(0,P.connectRemoteAgentTunnel)(this._options,n,this.tunnelRemotePort),i=s.getSocket().socket,o=s.readEntireBuffer();s.dispose(),o.byteLength>0&&l.write(o.buffer),l.on("end",()=>{l.localAddress&&this._socketsDispose.delete(l.localAddress),i.end()}),l.on("close",()=>i.end()),l.on("error",()=>{l.localAddress&&this._socketsDispose.delete(l.localAddress),i.destroy()}),i.on("end",()=>l.end()),i.on("close",()=>l.end()),i.on("error",()=>{l.destroy()}),l.pipe(i),i.pipe(l),l.localAddress&&this._socketsDispose.set(l.localAddress,()=>{l.end(),i.end()})}}let h=class extends C.AbstractTunnelService{constructor(l,n,s,i,o){super(n,o),this.socketFactory=l,this.signService=s,this.productService=i}isPortPrivileged(l){return(0,C.isPortPrivileged)(l,this.defaultTunnelHost,p.OS,t.release())}retainOrCreateTunnel(l,n,s,i,o,r,c){const a=this.getTunnelFromMap(n,s);if(a)return++a.refcount,a.value;if(this._tunnelProvider)return this.createWithProvider(this._tunnelProvider,n,s,i,o,r,c);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${n}:${s} on local port ${i}.`);const y={commit:this.productService.commit,quality:this.productService.quality,socketFactory:this.socketFactory,addressProvider:l,signService:this.signService,logService:this.logService,ipcLogger:null},M=w(y,this.defaultTunnelHost,n,s,i);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(n,s,M),M}}};h=we([te(1,S.ILogService),te(2,u.ISignService),te(3,b.IProductService),te(4,f.IConfigurationService)],h),e.BaseTunnelService=h;let v=class extends h{constructor(l,n,s,i){super(R.nodeSocketFactory,l,n,s,i)}};v=we([te(0,S.ILogService),te(1,u.ISignService),te(2,b.IProductService),te(3,f.IConfigurationService)],v),e.TunnelService=v;let m=class extends I.Disposable{constructor(l,n,s,i){super(),this.logService=l,this.productService=n,this.signService=s,this.configurationService=i,this._tunnelServices=new Map}async openTunnel(l,n,s,i,o,r,c,a){if(this.logService.trace(`ForwardedPorts: (SharedTunnelService) openTunnel request for ${s}:${i} on local port ${o}.`),!this._tunnelServices.has(l)){const y=new v(this.logService,this.signService,this.productService,this.configurationService);this._register(y),this._tunnelServices.set(l,y),y.onTunnelClosed(async()=>{(await y.tunnels).length===0&&(y.dispose(),this._tunnelServices.delete(l))})}return this._tunnelServices.get(l).openTunnel(n,s,i,o,r,c,a)}};m=we([te(0,S.ILogService),te(1,b.IProductService),te(2,u.ISignService),te(3,f.IConfigurationService)],m),e.SharedTunnelsService=m}),define(ee[48],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.UpdateType=e.StateType=void 0;var t;(function(R){R.Uninitialized="uninitialized",R.Idle="idle",R.CheckingForUpdates="checking for updates",R.AvailableForDownload="available for download",R.Downloading="downloading",R.Downloaded="downloaded",R.Updating="updating",R.Ready="ready"})(t=e.StateType||(e.StateType={}));var k;(function(R){R[R.Setup=0]="Setup",R[R.Archive=1]="Archive",R[R.Snap=2]="Snap"})(k=e.UpdateType||(e.UpdateType={})),e.State={Uninitialized:{type:"uninitialized"},Idle:(R,D)=>({type:"idle",updateType:R,error:D}),CheckingForUpdates:R=>({type:"checking for updates",explicit:R}),AvailableForDownload:R=>({type:"available for download",update:R}),Downloading:R=>({type:"downloading",update:R}),Downloaded:R=>({type:"downloaded",update:R}),Updating:R=>({type:"updating",update:R}),Ready:R=>({type:"ready",update:R})},e.IUpdateService=(0,E.createDecorator)("updateService")}),define(ee[237],ie([0,1,4,168,62,47]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),R.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,t.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,t.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,t.localize)(2,null),(0,t.localize)(3,null),(0,t.localize)(4,null),(0,t.localize)(5,null)],policy:{name:"UpdateMode",minimumVersion:"1.67"}},"update.channel":{type:"string",default:"default",scope:1,description:(0,t.localize)(6,null),deprecationMessage:(0,t.localize)(7,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,t.localize)(8,null),description:(0,t.localize)(9,null),included:E.isWindows&&!E.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:(0,t.localize)(10,null),tags:["usesOnlineServices"]}}})}),define(ee[238],ie([0,1,3,48]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class k{constructor(I){this.service=I}listen(I,f){switch(f){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${f}`)}call(I,f,S){switch(f){case"checkForUpdates":return this.service.checkForUpdates(S);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion();case"_applySpecificUpdate":return this.service._applySpecificUpdate(S)}throw new Error(`Call not found: ${f}`)}}e.UpdateChannel=k;class R{get state(){return this._state}set state(I){this._state=I,this._onStateChange.fire(I)}constructor(I){this.channel=I,this._onStateChange=new E.Emitter,this.onStateChange=this._onStateChange.event,this._state=t.State.Uninitialized,this.channel.listen("onStateChange")(f=>this.state=f),this.channel.call("_getInitialState").then(f=>this.state=f)}checkForUpdates(I){return this.channel.call("checkForUpdates",I)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}_applySpecificUpdate(I){return this.channel.call("_applySpecificUpdate",I)}}e.UpdateChannelClient=R}),define(ee[89],ie([0,1,8,22,3,19,26,21,6,20,55,48]),function(z,e,E,t,k,R,D,I,f,S,b,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractUpdateService=e.createUpdateURL=void 0;function C(p,w,g){return`${g.updateUrl}/api/update/${p}/${w}/${g.commit}`}e.createUpdateURL=C;let u=class{get state(){return this._state}setState(w){this.logService.info("update#setState",w.type),this._state=w,this._onStateChange.fire(w)}constructor(w,g,h,v,m,d){this.lifecycleMainService=w,this.configurationService=g,this.environmentMainService=h,this.requestService=v,this.logService=m,this.productService=d,this._state=P.State.Uninitialized,this._onStateChange=new k.Emitter,this.onStateChange=this._onStateChange.event}async initialize(){if(!this.environmentMainService.isBuilt)return;if(this.environmentMainService.disableUpdates){this.logService.info("update#ctor - updates are disabled by the environment");return}if(!this.productService.updateUrl||!this.productService.commit){this.logService.info("update#ctor - updates are disabled as there is no update URL");return}const w=this.getUpdateMode(),g=this.getProductQuality(w);if(!g){this.logService.info("update#ctor - updates are disabled by user preference");return}if(this.url=this.buildUpdateFeedUrl(g),!this.url){this.logService.info("update#ctor - updates are disabled as the update URL is badly formed");return}if(this.setState(P.State.Idle(this.getUpdateType())),w==="manual"){this.logService.info("update#ctor - manual checks only; automatic updates are disabled by user preference");return}w==="start"?(this.logService.info("update#ctor - startup checks only; automatic updates are disabled by user preference"),setTimeout(()=>this.checkForUpdates(!1),30*1e3)):this.scheduleCheckForUpdates(30*1e3).then(void 0,h=>this.logService.error(h))}getUpdateMode(){return(0,R.getMigratedSettingValue)(this.configurationService,"update.mode","update.channel")}getProductQuality(w){return w==="none"?void 0:this.productService.quality}scheduleCheckForUpdates(w=60*60*1e3){return(0,E.timeout)(w).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(w){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(w)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}async doDownloadUpdate(w){}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}async doApplyUpdate(){}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(w=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${w}`),!w&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}async isLatestVersion(){return this.url?await this.getUpdateMode()==="none"?!1:(await this.requestService.request({url:this.url},t.CancellationToken.None)).res.statusCode===204:void 0}async _applySpecificUpdate(w){}getUpdateType(){return 1}doQuitAndInstall(){}};u=we([te(0,I.ILifecycleMainService),te(1,R.IConfigurationService),te(2,D.IEnvironmentMainService),te(3,b.IRequestService),te(4,f.ILogService),te(5,S.IProductService)],u),e.AbstractUpdateService=u}),define(ee[239],ie([0,1,13,53,3,2,19,26,21,6,20,55,35,48,89]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DarwinUpdateService=void 0;let w=class extends p.AbstractUpdateService{get onRawError(){return k.Event.fromNodeEventEmitter(E.autoUpdater,"error",(h,v)=>v)}get onRawUpdateNotAvailable(){return k.Event.fromNodeEventEmitter(E.autoUpdater,"update-not-available")}get onRawUpdateAvailable(){return k.Event.fromNodeEventEmitter(E.autoUpdater,"update-available",(h,v,m)=>({url:v,version:m,productVersion:m}))}get onRawUpdateDownloaded(){return k.Event.fromNodeEventEmitter(E.autoUpdater,"update-downloaded",(h,v,m,d)=>({releaseNotes:v,version:m,productVersion:m,date:d}))}constructor(h,v,m,d,l,n,s){super(h,v,d,l,n,s),this.telemetryService=m,this.disposables=new R.DisposableStore}async initialize(){await super.initialize(),this.onRawError(this.onError,this,this.disposables),this.onRawUpdateAvailable(this.onUpdateAvailable,this,this.disposables),this.onRawUpdateDownloaded(this.onUpdateDownloaded,this,this.disposables),this.onRawUpdateNotAvailable(this.onUpdateNotAvailable,this,this.disposables)}onError(h){this.logService.error("UpdateService error:",h);const m=(this.state.type==="checking for updates"?this.state.explicit:!0)?h:void 0;this.setState(u.State.Idle(1,m))}buildUpdateFeedUrl(h){let v;this.productService.darwinUniversalAssetId?v=this.productService.darwinUniversalAssetId:v=process.arch==="x64"?"darwin":"darwin-arm64";const m=(0,p.createUpdateURL)(v,h,this.productService);try{E.autoUpdater.setFeedURL({url:m})}catch(d){this.logService.error("Failed to set update feed URL",d);return}return m}doCheckForUpdates(h){this.setState(u.State.CheckingForUpdates(h)),E.autoUpdater.checkForUpdates()}onUpdateAvailable(h){this.state.type==="checking for updates"&&this.setState(u.State.Downloading(h))}onUpdateDownloaded(h){this.state.type==="downloading"&&(this.telemetryService.publicLog2("update:downloaded",{version:h.version}),this.setState(u.State.Ready(h)))}onUpdateNotAvailable(){this.state.type==="checking for updates"&&(this.telemetryService.publicLog2("update:notAvailable",{explicit:this.state.explicit}),this.setState(u.State.Idle(1)))}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),E.autoUpdater.quitAndInstall()}dispose(){this.disposables.dispose()}};we([t.memoize],w.prototype,"onRawError",null),we([t.memoize],w.prototype,"onRawUpdateNotAvailable",null),we([t.memoize],w.prototype,"onRawUpdateAvailable",null),we([t.memoize],w.prototype,"onRawUpdateDownloaded",null),w=we([te(0,f.ILifecycleMainService),te(1,D.IConfigurationService),te(2,C.ITelemetryService),te(3,I.IEnvironmentMainService),te(4,P.IRequestService),te(5,S.ILogService),te(6,b.IProductService)],w),e.DarwinUpdateService=w}),define(ee[240],ie([0,1,45,40,8,3,9,26,21,6,35,48]),function(z,e,E,t,k,R,D,I,f,S,b,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnapUpdateService=void 0;let C=class{get state(){return this._state}setState(w){this.logService.info("update#setState",w.type),this._state=w,this._onStateChange.fire(w)}constructor(w,g,h){if(this.lifecycleMainService=w,this.logService=h,this._state=P.State.Uninitialized,this._onStateChange=new R.Emitter,this.onStateChange=this._onStateChange.event,g.disableUpdates){this.logService.info("update#ctor - updates are disabled");return}this.setState(P.State.Idle(this.getUpdateType())),this.scheduleCheckForUpdates(30*1e3).then(void 0,v=>this.logService.error(v))}scheduleCheckForUpdates(w=60*60*1e3){return(0,k.timeout)(w).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(w){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(w)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}doDownloadUpdate(w){return Promise.resolve(void 0)}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}doApplyUpdate(){return Promise.resolve(void 0)}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(w=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${w}`),!w&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}getUpdateType(){return 2}doQuitAndInstall(){}async _applySpecificUpdate(w){}};C=we([te(0,f.ILifecycleMainService),te(1,I.IEnvironmentMainService),te(2,S.ILogService)],C);let u=class extends C{constructor(w,g,h,v,m,d){super(h,v,m),this.snap=w,this.snapRevision=g,this.telemetryService=d;const l=(0,t.watch)(D.dirname(this.snap)),n=R.Event.fromNodeEventEmitter(l,"change",(r,c)=>c),s=R.Event.filter(n,r=>r==="current"),o=R.Event.debounce(s,(r,c)=>c,2e3)(()=>this.checkForUpdates(!1));h.onWillShutdown(()=>{o.dispose(),l.close()})}doCheckForUpdates(){this.setState(P.State.CheckingForUpdates(!1)),this.isUpdateAvailable().then(w=>{w?this.setState(P.State.Ready({version:"something",productVersion:"something"})):(this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(P.State.Idle(2)))},w=>{this.logService.error(w),this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(P.State.Idle(2,w.message||w))})}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),(0,E.spawn)("sleep 3 && "+D.basename(process.argv[0]),{shell:!0,detached:!0,stdio:"ignore"})}async isUpdateAvailable(){const w=await new Promise((h,v)=>(0,t.realpath)(`${D.dirname(this.snap)}/current`,(m,d)=>m?v(m):h(d))),g=D.basename(w);return this.snapRevision!==g}isLatestVersion(){return this.isUpdateAvailable().then(void 0,w=>{this.logService.error("update#checkForSnapUpdate(): Could not get realpath of application.")})}};u=we([te(2,f.ILifecycleMainService),te(3,I.IEnvironmentMainService),te(4,S.ILogService),te(5,b.ITelemetryService)],u),e.SnapUpdateService=u}),define(ee[51],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,E.createDecorator)("IUriIdentityService")}),define(ee[241],ie([0,1,51,189,15,18,125,3,2]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class S{constructor(C){this.uri=C,this.time=S._clock++}touch(){return this.time=S._clock++,this}}S._clock=0;let b=class{constructor(C){this._fileService=C,this._dispooables=new f.DisposableStore,this._limit=2**16;const u=new Map,p=w=>{let g=u.get(w.scheme);return g===void 0&&(g=C.hasProvider(w)&&!this._fileService.hasCapability(w,1024),u.set(w.scheme,g)),g};this._dispooables.add(I.Event.any(C.onDidChangeFileSystemProviderRegistrations,C.onDidChangeFileSystemProviderCapabilities)(w=>{u.delete(w.scheme)})),this.extUri=new R.ExtUri(p),this._canonicalUris=new D.SkipList((w,g)=>this.extUri.compare(w,g,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(C){this._fileService.hasProvider(C)&&(C=(0,R.normalizePath)(C));const u=this._canonicalUris.get(C);return u?u.touch().uri.with({fragment:C.fragment}):(this._canonicalUris.set(C,new S(C)),this._checkTrim(),C)}_checkTrim(){if(this._canonicalUris.sizep[1].touchw[1].touch?-1:0);S._clock=0,this._canonicalUris.clear();const u=this._limit*.5;for(let p=0;pp.test(g.ctx));if(w)return w}}}return this.next.routeCall(I,f,S,b)}routeEvent(I,f){throw new Error(`Event not found: ${f}`)}}e.URLHandlerRouter=R}),define(ee[243],ie([0,1,8,2,7,20]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class D extends t.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(S,b){const P=[...this.handlers.values()];return(0,E.first)(P.map(C=>()=>C.handleURL(S,b)),void 0,!1).then(C=>C||!1)}registerHandler(S){return this.handlers.add(S),(0,t.toDisposable)(()=>this.handlers.delete(S))}}e.AbstractURLService=D;let I=class extends D{constructor(S){super(),this.productService=S}create(S){let{authority:b,path:P,query:C,fragment:u}=S||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return b&&P&&P.indexOf("/")!==0&&(P=`/${P}`),k.URI.from({scheme:this.productService.urlProtocol,authority:b,path:P,query:C,fragment:u})}};I=we([te(0,R.IProductService)],I),e.NativeURLService=I}),define(ee[244],ie([0,1,13,8,3,2,4,7]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronURLListener=void 0;function f(b){try{return I.URI.parse(b)}catch{return null}}class S{constructor(P,C,u,p,w){if(this.urlService=C,this.uris=[],this.retryCount=0,this.flushDisposable=R.Disposable.None,this.disposables=new R.DisposableStore,this.uris=P,D.isWindows){const v=p.isBuilt?[]:[`"${p.appRoot}"`];v.push("--open-url","--"),E.app.setAsDefaultProtocolClient(w.urlProtocol,process.execPath,v)}const g=k.Event.map(k.Event.fromNodeEventEmitter(E.app,"open-url",(v,m)=>({event:v,url:m})),({event:v,url:m})=>(v.preventDefault(),m));this.disposables.add(g(v=>{const m=f(v);!m||this.urlService.open(m,{originalUrl:v})})),u.getWindows().filter(v=>v.isReady).length>0?this.flush():k.Event.once(u.onDidSignalReadyWindow)(this.flush,this,this.disposables)}async flush(){if(this.retryCount++>10)return;const P=[];for(const C of this.uris)await this.urlService.open(C.uri,{originalUrl:C.url})||P.push(C);P.length!==0&&(this.uris=P,this.flushDisposable=(0,t.disposableTimeout)(()=>this.flush(),500))}dispose(){this.disposables.dispose(),this.flushDisposable.dispose()}}e.ElectronURLListener=S}),define(ee[245],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebviewManagerService=void 0,e.IWebviewManagerService=(0,E.createDecorator)("webviewManagerService")}),define(ee[246],ie([0,1,13,2,14,7]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewProtocolProvider=void 0;class D extends t.Disposable{constructor(){super();const f=this.handleWebviewRequest.bind(this);E.protocol.registerFileProtocol(k.Schemas.vscodeWebview,f)}handleWebviewRequest(f,S){try{const b=R.URI.parse(f.url),P=D.validWebviewFilePaths.get(b.path);if(typeof P=="string"){const C=`vs/workbench/contrib/webview/browser/pre/${P}`,u=k.FileAccess.asFileUri(C,z);return S({path:decodeURIComponent(u.fsPath),headers:{...k.COI.getHeadersFromQuery(f.url),"Cross-Origin-Resource-Policy":"cross-origin"}})}else return S({error:-10})}catch{}return S({error:-2})}}e.WebviewProtocolProvider=D,D.validWebviewFilePaths=new Map([["/index.html","index.html"],["/fake.html","fake.html"],["/service-worker.js","service-worker.js"]])}),define(ee[75],ie([0,1,4]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.useWindowControlsOverlay=e.getTitleBarStyle=e.getMenuBarVisibility=e.isFileToOpen=e.isFolderToOpen=e.isWorkspaceToOpen=e.WindowMinimumSize=void 0,e.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};function t(b){return!!b.workspaceUri}e.isWorkspaceToOpen=t;function k(b){return!!b.folderUri}e.isFolderToOpen=k;function R(b){return!!b.fileUri}e.isFileToOpen=R;function D(b){const P=I(b),C=b.getValue("window.menuBarVisibility");return C==="default"||P==="native"&&C==="compact"||E.isMacintosh&&E.isNative?"classic":C}e.getMenuBarVisibility=D;function I(b){if(E.isWeb)return"custom";const P=b.getValue("window");if(P){if(E.isMacintosh&&P.nativeTabs===!0||E.isMacintosh&&P.nativeFullScreen===!1)return"native";const p=P.titleBarStyle;if(p==="native"||p==="custom")return p}return E.isLinux?"native":"custom"}e.getTitleBarStyle=I;function f(b){if(!E.isWindows||E.isWeb||I(b)==="native")return!1;const P=b.getValue("window.experimental.windowControlsOverlay.enabled");return typeof P=="boolean"?P:!1}e.useWindowControlsOverlay=f;function S(b=0){return Math.pow(1.2,b)}e.zoomLevelToZoomFactor=S}),define(ee[116],ie([0,1]),function(z,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowError=e.WindowMode=e.defaultWindowState=e.UnloadReason=e.LoadReason=void 0;var E;(function(I){I[I.INITIAL=1]="INITIAL",I[I.LOAD=2]="LOAD",I[I.RELOAD=3]="RELOAD"})(E=e.LoadReason||(e.LoadReason={}));var t;(function(I){I[I.CLOSE=1]="CLOSE",I[I.QUIT=2]="QUIT",I[I.RELOAD=3]="RELOAD",I[I.LOAD=4]="LOAD"})(t=e.UnloadReason||(e.UnloadReason={}));const k=function(I=1){return{width:1024,height:768,mode:I}};e.defaultWindowState=k;var R;(function(I){I[I.Maximized=0]="Maximized",I[I.Normal=1]="Normal",I[I.Minimized=2]="Minimized",I[I.Fullscreen=3]="Fullscreen"})(R=e.WindowMode||(e.WindowMode={}));var D;(function(I){I[I.UNRESPONSIVE=1]="UNRESPONSIVE",I[I.PROCESS_GONE=2]="PROCESS_GONE",I[I.LOAD=3]="LOAD"})(D=e.WindowError||(e.WindowError={}))}),define(ee[31],ie([0,1,5]),function(z,e,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenContext=e.IWindowsMainService=void 0,e.IWindowsMainService=(0,E.createDecorator)("windowsMainService");var t;(function(k){k[k.CLI=0]="CLI",k[k.DOCK=1]="DOCK",k[k.MENU=2]="MENU",k[k.DIALOG=3]="DIALOG",k[k.DESKTOP=4]="DESKTOP",k[k.API=5]="API"})(t=e.OpenContext||(e.OpenContext={}))}),define(ee[247],ie([0,1,13,22,3,67,2,29,70,106,6,20,31]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyAuthHandler=void 0;var u;(function(w){w[w.Initial=1]="Initial",w[w.StoredCredentialsUsed=2]="StoredCredentialsUsed",w[w.LoginDialogShown=3]="LoginDialogShown"})(u||(u={}));let p=class extends D.Disposable{constructor(g,h,v,m,d){super(),this.logService=g,this.windowsMainService=h,this.credentialsService=v,this.encryptionMainService=m,this.productService=d,this.PROXY_CREDENTIALS_SERVICE_KEY=`${this.productService.urlProtocol}.proxy-credentials`,this.pendingProxyResolve=void 0,this.state=u.Initial,this.sessionCredentials=void 0,this.registerListeners()}registerListeners(){const g=k.Event.fromNodeEventEmitter(E.app,"login",(h,v,m,d,l)=>({event:h,webContents:v,req:m,authInfo:d,callback:l}));this._register(g(this.onLogin,this))}async onLogin({event:g,authInfo:h,req:v,callback:m}){if(!h.isProxy)return;if(!this.pendingProxyResolve&&this.state===u.LoginDialogShown&&v.firstAuthAttempt){this.logService.trace("auth#onLogin (proxy) - exit - proxy dialog already shown");return}g.preventDefault();let d;if(this.pendingProxyResolve)this.logService.trace("auth#onLogin (proxy) - pending proxy handling found"),d=await this.pendingProxyResolve;else{this.logService.trace("auth#onLogin (proxy) - no pending proxy handling found, starting new"),this.pendingProxyResolve=this.resolveProxyCredentials(h);try{d=await this.pendingProxyResolve}finally{this.pendingProxyResolve=void 0}}m(d?.username,d?.password)}async resolveProxyCredentials(g){this.logService.trace("auth#resolveProxyCredentials (proxy) - enter");try{const h=await this.doResolveProxyCredentials(g);if(h)return this.logService.trace("auth#resolveProxyCredentials (proxy) - got credentials"),h;this.logService.trace("auth#resolveProxyCredentials (proxy) - did not get credentials")}finally{this.logService.trace("auth#resolveProxyCredentials (proxy) - exit")}}async doResolveProxyCredentials(g){this.logService.trace("auth#doResolveProxyCredentials - enter",g);const h=String((0,R.hash)({scheme:g.scheme,host:g.host,port:g.port}));let v,m;try{const s=await this.credentialsService.getPassword(this.PROXY_CREDENTIALS_SERVICE_KEY,h);if(s){const i=JSON.parse(await this.encryptionMainService.decrypt(s));v=i.username,m=i.password}}catch(s){this.logService.error(s)}if(this.state!==u.StoredCredentialsUsed&&typeof v=="string"&&typeof m=="string")return this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found stored credentials to use"),this.state=u.StoredCredentialsUsed,{username:v,password:m};const d=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(!d){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - no opened window found to show dialog in");return}this.logService.trace(`auth#doResolveProxyCredentials (proxy) - asking window ${d.id} to handle proxy login`);const l={authInfo:g,username:this.sessionCredentials?.username??v,password:this.sessionCredentials?.password??m,replyChannel:`vscode:proxyAuthResponse:${(0,I.generateUuid)()}`};d.sendWhenReady("vscode:openProxyAuthenticationDialog",t.CancellationToken.None,l),this.state=u.LoginDialogShown;const n=await new Promise(s=>{const i=async(o,r,c)=>{if(r===l.replyChannel)if(this.logService.trace(`auth#doResolveProxyCredentials - exit - received credentials from window ${d.id}`),d.win?.webContents.off("ipc-message",i),c){const a={username:c.username,password:c.password};try{if(c.remember){const y=await this.encryptionMainService.encrypt(JSON.stringify(a));await this.credentialsService.setPassword(this.PROXY_CREDENTIALS_SERVICE_KEY,h,y)}else await this.credentialsService.deletePassword(this.PROXY_CREDENTIALS_SERVICE_KEY,h)}catch(y){this.logService.error(y)}s({username:a.username,password:a.password})}else s(void 0)};d.win?.webContents.on("ipc-message",i)});return this.sessionCredentials=n,n}};p=we([te(0,b.ILogService),te(1,C.IWindowsMainService),te(2,f.ICredentialsMainService),te(3,S.IEncryptionMainService),te(4,P.IProductService)],p),e.ProxyAuthHandler=p}),define(ee[248],ie([0,1,70,6,34,20,31,201]),function(z,e,E,t,k,R,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CredentialsNativeMainService=void 0;let f=class extends I.BaseCredentialsMainService{constructor(b,P,C,u){super(b),this.environmentMainService=P,this.productService=C,this.windowsMainService=u,this.surfaceKeytarLoadError=p=>{this.windowsMainService.sendToFocused("vscode:showCredentialsError",p.message??p)}}async getSecretStoragePrefix(){return Promise.resolve(this.productService.urlProtocol)}async withKeytar(){if(this._keytarCache)return this._keytarCache;if(this.environmentMainService.disableKeytar)return this.logService.info("Keytar is disabled. Using in-memory credential store instead."),this._keytarCache=new E.InMemoryCredentialsProvider,this._keytarCache;const b=await new Promise((P,C)=>{z(["keytar"],P,C)});return await b.findCredentials("test-keytar-loads"),this._keytarCache=b,this._keytarCache}};f=we([te(0,t.ILogService),te(1,k.INativeEnvironmentService),te(2,R.IProductService),te(3,D.IWindowsMainService)],f),e.CredentialsNativeMainService=f}),define(ee[249],ie([0,1,16,2,3,6,21,81,45,279,8,14,50,4,32,13,31]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostStarter=void 0;const h=w.UtilityProcess,v=typeof h<"u";let m=class Ut{constructor(s,i,o){this._logService=s,this._windowsMainService=o,this._shutdown=!1,this._extHosts=new Map,i.onWillShutdown(r=>{this._shutdown=!0,r.join(this._waitForAllExit(6e3))})}dispose(){}_getExtHost(s){const i=this._extHosts.get(s);if(!i)throw new Error("Unknown extension host!");return i}onDynamicStdout(s){return this._getExtHost(s).onStdout}onDynamicStderr(s){return this._getExtHost(s).onStderr}onDynamicMessage(s){return this._getExtHost(s).onMessage}onDynamicError(s){return this._getExtHost(s).onError}onDynamicExit(s){return this._getExtHost(s).onExit}async canUseUtilityProcess(){return v}async createExtensionHost(s){if(this._shutdown)throw(0,E.canceled)();const i=String(++Ut._lastId);let o;if(s){if(!v)throw new Error("Cannot use UtilityProcess!");o=new l(i,this._logService,this._windowsMainService)}else o=new d(i,this._logService);return this._extHosts.set(i,o),o.onExit(({pid:r,code:c,signal:a})=>{this._logService.info(`Extension host with pid ${r} exited with code: ${c}, signal: ${a}.`),setTimeout(()=>{o.dispose(),this._extHosts.delete(i)})}),{id:i}}async start(s,i){if(this._shutdown)throw(0,E.canceled)();return this._getExtHost(s).start(i)}async enableInspectPort(s){if(this._shutdown)throw(0,E.canceled)();const i=this._extHosts.get(s);return i?i.enableInspectPort():!1}async kill(s){if(this._shutdown)throw(0,E.canceled)();const i=this._extHosts.get(s);!i||i.kill()}async _killAllNow(){for(const[,s]of this._extHosts)s.kill()}async _waitForAllExit(s){const i=[];for(const[,o]of this._extHosts)i.push(o.waitForExit(s));return b.Promises.settled(i).then(()=>{})}};m._lastId=0,m=we([te(0,R.ILogService),te(1,D.ILifecycleMainService),te(2,g.IWindowsMainService)],m),e.ExtensionHostStarter=m;let d=class extends t.Disposable{constructor(s,i){super(),this.id=s,this._logService=i,this._onStdout=this._register(new k.Emitter),this.onStdout=this._onStdout.event,this._onStderr=this._register(new k.Emitter),this.onStderr=this._onStderr.event,this._onMessage=this._register(new k.Emitter),this.onMessage=this._onMessage.event,this._onError=this._register(new k.Emitter),this.onError=this._onError.event,this._onExit=this._register(new k.Emitter),this.onExit=this._onExit.event,this._process=null,this._hasExited=!1}start(s){u.isCI&&this._logService.info("Calling fork to start extension host...");const i=I.StopWatch.create(!1);this._process=(0,f.fork)(P.FileAccess.asFileUri("bootstrap-fork",z).fsPath,["--type=extensionHost","--skipWorkspaceStorageLock"],(0,C.mixin)({cwd:(0,p.cwd)()},s));const o=i.elapsed(),r=this._process.pid;this._logService.info(`Starting extension host with pid ${r} (fork() took ${o} ms).`);const c=new S.StringDecoder("utf-8");this._process.stdout?.on("data",y=>{const M=typeof y=="string"?y:c.write(y);this._onStdout.fire(M)});const a=new S.StringDecoder("utf-8");this._process.stderr?.on("data",y=>{const M=typeof y=="string"?y:a.write(y);this._onStderr.fire(M)}),this._process.on("message",y=>{this._onMessage.fire(y)}),this._process.on("error",y=>{this._onError.fire({error:(0,E.transformErrorForSerialization)(y)})}),this._process.on("exit",(y,M)=>{this._hasExited=!0,this._onExit.fire({pid:r,code:y,signal:M})})}enableInspectPort(){return this._process?(this._logService.info(`Enabling inspect port on extension host with pid ${this._process.pid}.`),typeof process._debugProcess=="function"?(process._debugProcess(this._process.pid),!0):u.isWindows?!1:(this._process.kill("SIGUSR1"),!0)):!1}kill(){!this._process||(this._logService.info(`Killing extension host with pid ${this._process.pid}.`),this._process.kill())}async waitForExit(s){if(!this._process)return;const i=this._process.pid;this._logService.info(`Waiting for extension host with pid ${i} to exit.`),await Promise.race([k.Event.toPromise(this.onExit),(0,b.timeout)(s)]),this._hasExited||(this._logService.info(`Extension host with pid ${i} did not exit within ${s}ms.`),this._process.kill())}};d=we([te(1,R.ILogService)],d);let l=class extends t.Disposable{constructor(s,i,o){super(),this.id=s,this._logService=i,this._windowsMainService=o,this.onError=k.Event.None,this._onStdout=this._register(new k.Emitter),this.onStdout=this._onStdout.event,this._onStderr=this._register(new k.Emitter),this.onStderr=this._onStderr.event,this._onMessage=this._register(new k.Emitter),this.onMessage=this._onMessage.event,this._onExit=this._register(new k.Emitter),this.onExit=this._onExit.event,this._process=null,this._hasExited=!1}start(s){const i=this._windowsMainService.getWindowById(s.responseWindowId);if(!i){this._logService.info(`UtilityProcess<${this.id}>: Refusing to create new Extension Host UtilityProcess because requesting window cannot be found...`);return}const o=i.win;if(!o||o.isDestroyed()||o.webContents.isDestroyed()){this._logService.info(`UtilityProcess<${this.id}>: Refusing to create new Extension Host UtilityProcess because requesting window cannot be found...`);return}const r=`extensionHost${this.id}`,c=P.FileAccess.asFileUri("bootstrap-fork.js",z).fsPath,a=["--type=extensionHost","--skipWorkspaceStorageLock"],y=s.execArgv||[],M={...s.env},T=!0;for(const se of Object.keys(M))M[se]=String(M[se]);this._logService.info(`UtilityProcess<${this.id}>: Creating new...`),this._process=new h(c,a,{serviceName:r,env:M,execArgv:y,allowLoadingUnsignedLibraries:T});const _=new S.StringDecoder("utf-8");this._process.stdout?.on("data",se=>{const ae=typeof se=="string"?se:_.write(se);this._onStdout.fire(ae)});const Y=new S.StringDecoder("utf-8");this._process.stderr?.on("data",se=>{const ae=typeof se=="string"?se:Y.write(se);this._onStderr.fire(ae)}),this._process.on("message",se=>{this._onMessage.fire(se)}),this._register(k.Event.fromNodeEventEmitter(this._process,"spawn")(()=>{this._logService.info(`UtilityProcess<${this.id}>: received spawn event.`)}));const G=k.Event.fromNodeEventEmitter(this._process,"exit",(se,ae)=>ae);this._register(G(se=>{this._logService.info(`UtilityProcess<${this.id}>: received exit event with code ${se}.`),this._hasExited=!0,this._onExit.fire({pid:this._process.pid,code:se,signal:""})}));const{port1:V,port2:oe}=new w.MessageChannelMain;this._process.postMessage("null",[oe]),o.webContents.postMessage(s.responseChannel,s.responseNonce,[V])}enableInspectPort(){return this._process?(this._logService.info(`UtilityProcess<${this.id}>: Enabling inspect port on extension host with pid ${this._process.pid}.`),typeof process._debugProcess=="function"?(process._debugProcess(this._process.pid),!0):!1):!1}kill(){!this._process||(this._logService.info(`UtilityProcess<${this.id}>: Killing extension host with pid ${this._process.pid}.`),this._process.kill())}async waitForExit(s){if(!this._process)return;const i=this._process.pid;this._logService.info(`UtilityProcess<${this.id}>: Waiting for extension host with pid ${i} to exit.`),await Promise.race([k.Event.toPromise(this.onExit),(0,b.timeout)(s)]),this._hasExited||(this._logService.info(`UtilityProcess<${this.id}>: Extension host with pid ${i} did not exit within ${s}ms, will kill it now.`),this._process.kill())}};l=we([te(1,R.ILogService),te(2,g.IWindowsMainService)],l)}),define(ee[250],ie([0,1,13,3,2,246,31]),function(z,e,E,t,k,R,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewMainService=void 0;let I=class extends k.Disposable{constructor(S){super(),this.windowsMainService=S,this._onFoundInFrame=this._register(new t.Emitter),this.onFoundInFrame=this._onFoundInFrame.event,this._register(new R.WebviewProtocolProvider)}async setIgnoreMenuShortcuts(S,b){let P;if(typeof S.windowId=="number"){const{windowId:C}=S,u=this.windowsMainService.getWindowById(C);if(!u?.win)throw new Error(`Invalid windowId: ${C}`);P=u.win.webContents}else{const{webContentsId:C}=S;if(P=E.webContents.fromId(C),!P)throw new Error(`Invalid webContentsId: ${C}`)}P.isDestroyed()||P.setIgnoreMenuShortcuts(b)}async findInFrame(S,b,P,C){const p=this.getFrameByName(S,b);if(typeof p.findInFrame=="function"){p.findInFrame(P,{findNext:C.findNext,forward:C.forward});const w=(g,h)=>{h.finalUpdate&&(this._onFoundInFrame.fire(h),p.removeListener("found-in-frame",w))};p.on("found-in-frame",w)}}async stopFindInFrame(S,b,P){const u=this.getFrameByName(S,b);typeof u.stopFindInFrame=="function"&&u.stopFindInFrame(P.keepSelection?"keepSelection":"clearSelection")}getFrameByName(S,b){const P=this.windowsMainService.getWindowById(S.windowId);if(!P?.win)throw new Error(`Invalid windowId: ${S}`);const C=P.win.webContents.mainFrame.framesInSubtree.find(u=>u.name===b);if(!C)throw new Error(`Unknown frame: ${b}`);return C}};I=we([te(0,D.IWindowsMainService)],I),e.WebviewMainService=I}),define(ee[251],ie([0,1,8,3,2]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveWindowManager=void 0;class R extends k.Disposable{constructor({onDidOpenWindow:I,onDidFocusWindow:f,getActiveWindowId:S}){super(),this.disposables=this._register(new k.DisposableStore),t.Event.latch(t.Event.any(I,f))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=(0,E.createCancelablePromise)(()=>S()),(async()=>{try{const P=await this.firstActiveWindowIdPromise;this.activeWindowId=typeof this.activeWindowId=="number"?this.activeWindowId:P}catch{}finally{this.firstActiveWindowIdPromise=void 0}})()}setActiveWindow(I){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise.cancel(),this.firstActiveWindowIdPromise=void 0),this.activeWindowId=I}async getActiveClientId(){return`window:${this.firstActiveWindowIdPromise?await this.firstActiveWindowIdPromise:this.activeWindowId}`}}e.ActiveWindowManager=R}),define(ee[28],ie([0,1,172,9,58,18,7,5,14]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,I.createDecorator)("contextService");function S(s){const i=s;return typeof i?.id=="string"&&D.URI.isUri(i.uri)}e.isSingleFolderWorkspaceIdentifier=S,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"};function b(s,i){if(typeof s=="string"||typeof s>"u")return typeof s=="string"?{id:(0,t.basename)(s)}:i?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:void 0;const o=s;if(o.configuration)return{id:o.id,configPath:o.configuration};if(o.folders.length===1)return{id:o.id,uri:o.folders[0].uri}}e.toWorkspaceIdentifier=b;function P(s){const i=s;return typeof i?.id=="string"&&D.URI.isUri(i.configPath)}e.isWorkspaceIdentifier=P;function C(s){const i=s;if(i?.uri)return{id:i.id,uri:D.URI.revive(i.uri)};const o=s;if(o?.configPath)return{id:o.id,configPath:D.URI.revive(o.configPath)};if(s?.id)return{id:s.id}}e.reviveIdentifier=C;var u;(function(s){s[s.EMPTY=1]="EMPTY",s[s.FOLDER=2]="FOLDER",s[s.WORKSPACE=3]="WORKSPACE"})(u=e.WorkbenchState||(e.WorkbenchState={}));function p(s){const i=s;return!!(i&&typeof i=="object"&&typeof i.id=="string"&&Array.isArray(i.folders))}e.isWorkspace=p;function w(s){const i=s;return!!(i&&typeof i=="object"&&D.URI.isUri(i.uri)&&typeof i.name=="string"&&typeof i.toResource=="function")}e.isWorkspaceFolder=w;class g{constructor(i,o,r,c,a){this._id=i,this._transient=r,this._configuration=c,this._ignorePathCasing=a,this._foldersMap=k.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=o}update(i){this._id=i.id,this._configuration=i.configuration,this._transient=i.transient,this._ignorePathCasing=i._ignorePathCasing,this.folders=i.folders}get folders(){return this._folders}set folders(i){this._folders=i,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(i){this._configuration=i}getFolder(i){return i&&this._foldersMap.findSubstr(i)||null}updateFoldersMap(){this._foldersMap=k.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const i of this.folders)this._foldersMap.set(i.uri,i)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=g;class h{constructor(i,o){this.raw=o,this.uri=i.uri,this.index=i.index,this.name=i.name}toResource(i){return(0,R.joinPath)(this.uri,i)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=h;function v(s){return new h({uri:s,index:0,name:(0,R.basenameOrAuthority)(s)},{uri:s.toString()})}e.toWorkspaceFolder=v,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,E.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function m(s,i){return R.extUriBiasedIgnorePathCase.isEqualOrParent(s,i.untitledWorkspacesHome)}e.isUntitledWorkspace=m;function d(s){let i;return D.URI.isUri(s)?i=s:i=s.configuration,i?.scheme===f.Schemas.tmp}e.isTemporaryWorkspace=d;function l(s,i){return!m(s,i)&&!d(s)}e.isSavedWorkspace=l;function n(s){return(typeof s=="string"?(0,t.extname)(s):(0,R.extname)(s))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=n}),define(ee[56],ie([0,1,13,8,67,33,2,77,4,12,23,149,5,6,28]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogMainService=e.IDialogMainService=void 0,e.IDialogMainService=(0,C.createDecorator)("dialogMainService");let w=class{constructor(h){this.logService=h,this.windowFileDialogLocks=new Map,this.windowDialogQueues=new Map,this.noWindowDialogueQueue=new t.Queue}pickFileFolder(h,v){return this.doPick({...h,pickFolders:!0,pickFiles:!0,title:(0,P.localize)(0,null)},v)}pickFolder(h,v){return this.doPick({...h,pickFolders:!0,title:(0,P.localize)(1,null)},v)}pickFile(h,v){return this.doPick({...h,pickFiles:!0,title:(0,P.localize)(2,null)},v)}pickWorkspace(h,v){const m=(0,P.localize)(3,null),d=(0,R.mnemonicButtonLabel)((0,P.localize)(4,null)),l=p.WORKSPACE_FILTER;return this.doPick({...h,pickFiles:!0,title:m,filters:l,buttonLabel:d},v)}async doPick(h,v){const m={title:h.title,buttonLabel:h.buttonLabel,filters:h.filters,defaultPath:h.defaultPath};(typeof h.pickFiles=="boolean"||typeof h.pickFolders=="boolean")&&(m.properties=void 0,h.pickFiles&&h.pickFolders&&(m.properties=["multiSelections","openDirectory","openFile","createDirectory"])),m.properties||(m.properties=["multiSelections",h.pickFolders?"openDirectory":"openFile","createDirectory"]),f.isMacintosh&&m.properties.push("treatPackageAsDirectory");const d=await this.showOpenDialog(m,(0,S.withNullAsUndefined)(v||E.BrowserWindow.getFocusedWindow()));if(d&&d.filePaths&&d.filePaths.length>0)return d.filePaths}getWindowDialogQueue(h){if(h){let v=this.windowDialogQueues.get(h.id);return v||(v=new t.Queue,this.windowDialogQueues.set(h.id,v)),v}else return this.noWindowDialogueQueue}showMessageBox(h,v){return this.getWindowDialogQueue(v).queue(async()=>v?E.dialog.showMessageBox(v,h):E.dialog.showMessageBox(h))}async showSaveDialog(h,v){const m=this.acquireFileDialogLock(h,v);if(!m)return this.logService.error("[DialogMainService]: file save dialog is already or will be showing for the window with the same configuration"),{canceled:!0};try{return await this.getWindowDialogQueue(v).queue(async()=>{let d;return v?d=await E.dialog.showSaveDialog(v,h):d=await E.dialog.showSaveDialog(h),d.filePath=this.normalizePath(d.filePath),d})}finally{(0,D.dispose)(m)}}normalizePath(h){return h&&f.isMacintosh&&(h=(0,I.normalizeNFC)(h)),h}normalizePaths(h){return h.map(v=>this.normalizePath(v))}async showOpenDialog(h,v){h.defaultPath&&(await b.Promises.exists(h.defaultPath)||(h.defaultPath=void 0));const m=this.acquireFileDialogLock(h,v);if(!m)return this.logService.error("[DialogMainService]: file open dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePaths:[]};try{return await this.getWindowDialogQueue(v).queue(async()=>{let d;return v?d=await E.dialog.showOpenDialog(v,h):d=await E.dialog.showOpenDialog(h),d.filePaths=this.normalizePaths(d.filePaths),d})}finally{(0,D.dispose)(m)}}acquireFileDialogLock(h,v){if(!v)return D.Disposable.None;this.logService.trace("[DialogMainService]: request to acquire file dialog lock",h);let m=this.windowFileDialogLocks.get(v.id);m||(m=new Set,this.windowFileDialogLocks.set(v.id,m));const d=(0,k.hash)(h);if(!m.has(d))return this.logService.trace("[DialogMainService]: new file dialog lock created",h),m.add(d),(0,D.toDisposable)(()=>{this.logService.trace("[DialogMainService]: file dialog lock disposed",h),m?.delete(d),m?.size===0&&this.windowFileDialogLocks.delete(v.id)})}};w=we([te(0,u.ILogService)],w),e.DialogMainService=w}),define(ee[252],ie([0,1,3,2,68,28]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDatabaseChannel=void 0;class D extends t.Disposable{constructor(f,S){super(),this.logService=f,this.storageMainService=S,this.onDidChangeApplicationStorageEmitter=this._register(new E.Emitter),this.mapProfileToOnDidChangeProfileStorageEmitter=new Map,this.registerStorageChangeListeners(S.applicationStorage,this.onDidChangeApplicationStorageEmitter)}registerStorageChangeListeners(f,S){this._register(E.Event.debounce(f.onDidChangeStorage,(b,P)=>(b?b.push(P):b=[P],b),D.STORAGE_CHANGE_DEBOUNCE_TIME)(b=>{b.length&&S.fire(this.serializeStorageChangeEvents(b,f))}))}serializeStorageChangeEvents(f,S){const b=new Map,P=new Set;return f.forEach(C=>{const u=S.get(C.key);typeof u=="string"?b.set(C.key,u):P.add(C.key)}),{changed:Array.from(b.entries()),deleted:Array.from(P.values())}}listen(f,S,b){switch(S){case"onDidChangeStorage":{const P=b.profile?(0,k.revive)(b.profile):void 0;if(!P)return this.onDidChangeApplicationStorageEmitter.event;let C=this.mapProfileToOnDidChangeProfileStorageEmitter.get(P.id);return C||(C=this._register(new E.Emitter),this.registerStorageChangeListeners(this.storageMainService.profileStorage(P),C),this.mapProfileToOnDidChangeProfileStorageEmitter.set(P.id,C)),C.event}}throw new Error(`Event not found: ${S}`)}async call(f,S,b){const P=b.profile?(0,k.revive)(b.profile):void 0,C=(0,R.reviveIdentifier)(b.workspace),u=await this.withStorageInitialized(P,C);switch(S){case"getItems":return Array.from(u.items.entries());case"updateItems":{const p=b;if(p.insert)for(const[w,g]of p.insert)u.set(w,g);p.delete?.forEach(w=>u.delete(w));break}case"isUsed":{const p=b.payload;if(typeof p=="string")return this.storageMainService.isUsed(p)}default:throw new Error(`Call not found: ${S}`)}}async withStorageInitialized(f,S){let b;S?b=this.storageMainService.workspaceStorage(S):f?b=this.storageMainService.profileStorage(f):b=this.storageMainService.applicationStorage;try{await b.init()}catch(P){this.logService.error(`StorageIPC#init: Unable to init ${S?"workspace":f?"profile":"application"} storage due to ${P}`)}return b}}e.StorageDatabaseChannel=D,D.STORAGE_CHANGE_DEBOUNCE_TIME=100}),define(ee[38],ie([0,1,67,3,2,18,12,7,169,34,15,5,6,28,39,51,8,29,25]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.EXTENSIONS_RESOURCE_NAME=e.reviveProfile=e.IUserDataProfilesService=e.PROFILES_ENABLEMENT_CONFIG=e.isUserDataProfile=void 0;function m(i){const o=i;return!!(o&&typeof o=="object"&&typeof o.id=="string"&&typeof o.isDefault=="boolean"&&typeof o.name=="string"&&I.URI.isUri(o.location)&&I.URI.isUri(o.globalStorageHome)&&I.URI.isUri(o.settingsResource)&&I.URI.isUri(o.keybindingsResource)&&I.URI.isUri(o.tasksResource)&&I.URI.isUri(o.snippetsHome)&&((0,D.isUndefined)(o.extensionsResource)||I.URI.isUri(o.extensionsResource)))}e.isUserDataProfile=m,e.PROFILES_ENABLEMENT_CONFIG="workbench.experimental.settingsProfiles.enabled",e.IUserDataProfilesService=(0,P.createDecorator)("IUserDataProfilesService");function d(i,o){return{id:i.id,isDefault:i.isDefault,name:i.name,shortName:i.shortName,location:I.URI.revive(i.location).with({scheme:o}),globalStorageHome:I.URI.revive(i.globalStorageHome).with({scheme:o}),settingsResource:I.URI.revive(i.settingsResource).with({scheme:o}),keybindingsResource:I.URI.revive(i.keybindingsResource).with({scheme:o}),tasksResource:I.URI.revive(i.tasksResource).with({scheme:o}),snippetsHome:I.URI.revive(i.snippetsHome).with({scheme:o}),extensionsResource:I.URI.revive(i.extensionsResource)?.with({scheme:o}),useDefaultFlags:i.useDefaultFlags,isTransient:i.isTransient}}e.reviveProfile=d,e.EXTENSIONS_RESOURCE_NAME="extensions.json";function l(i,o,r,c){return{id:i,name:o,location:r,isDefault:!1,shortName:c?.shortName,globalStorageHome:(0,R.joinPath)(r,"globalStorage"),settingsResource:(0,R.joinPath)(r,"settings.json"),keybindingsResource:(0,R.joinPath)(r,"keybindings.json"),tasksResource:(0,R.joinPath)(r,"tasks.json"),snippetsHome:(0,R.joinPath)(r,"snippets"),extensionsResource:(0,R.joinPath)(r,e.EXTENSIONS_RESOURCE_NAME),useDefaultFlags:c?.useDefaultFlags,isTransient:c?.transient}}e.toUserDataProfile=l;let n=class extends k.Disposable{get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(o,r,c,a){super(),this.environmentService=o,this.fileService=r,this.uriIdentityService=c,this.logService=a,this.enabled=!1,this.defaultProfileShouldIncludeExtensionsResourceAlways=!1,this._onDidChangeProfiles=this._register(new t.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new t.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new t.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new t.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new p.ResourceMap},this.profilesHome=(0,R.joinPath)(this.environmentService.userRoamingDataHome,"profiles")}setEnablement(o){this.enabled!==o&&(this._profilesObject=void 0,this.enabled=o)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const o=this.enabled?this.getStoredProfiles().map(y=>l((0,R.basename)(y.location),y.name,y.location,{shortName:y.shortName,useDefaultFlags:y.useDefaultFlags})):[];let r;const c=new p.ResourceMap,a=l((0,E.hash)(this.environmentService.userRoamingDataHome.path).toString(16),(0,f.localize)(0,null),this.environmentService.userRoamingDataHome);if(o.unshift({...a,isDefault:!0,extensionsResource:this.defaultProfileShouldIncludeExtensionsResourceAlways||o.length>0||this.transientProfilesObject.profiles.length>0?a.extensionsResource:void 0}),o.length){const y=this.getStoredProfileAssociations();if(y.workspaces)for(const[M,T]of Object.entries(y.workspaces)){const _=I.URI.parse(M),Y=I.URI.parse(T),G=o.find(V=>this.uriIdentityService.extUri.isEqual(V.location,Y));G&&c.set(_,G)}if(y.emptyWindow){const M=I.URI.parse(y.emptyWindow);r=o.find(T=>this.uriIdentityService.extUri.isEqual(T.location,M))}}this._profilesObject={profiles:o,workspaces:c,emptyWindow:r}}return this._profilesObject}async createTransientProfile(o){const r="Temp",c=new RegExp(`${(0,v.escapeRegExpCharacters)(r)}\\s(\\d+)`);let a=0;for(const M of this.profiles){const T=c.exec(M.name),_=T?parseInt(T[1]):0;a=_>a?_:a}const y=`${r} ${a+1}`;return this.createProfile((0,E.hash)((0,h.generateUuid)()).toString(16),y,{transient:!0},o)}async createNamedProfile(o,r,c){return this.createProfile((0,E.hash)((0,h.generateUuid)()).toString(16),o,r,c)}async createProfile(o,r,c,a){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const y=await this.doCreateProfile(o,r,c);return a&&await this.setProfileForWorkspace(a,y),y}async doCreateProfile(o,r,c){let a=this.profileCreationPromises.get(r);return a||(a=(async()=>{try{const y=this.profiles.find(_=>_.name===r||_.id===o);if(y)return y;const M=l(o,r,(0,R.joinPath)(this.profilesHome,o),c);await this.fileService.createFolder(M.location);const T=[];return this._onWillCreateProfile.fire({profile:M,join(_){T.push(_)}}),await g.Promises.settled(T),this.updateProfiles([M],[],[]),M}finally{this.profileCreationPromises.delete(r)}})(),this.profileCreationPromises.set(r,a)),a}async updateProfile(o,r){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);let c=this.profiles.find(a=>a.id===o.id);if(!c)throw new Error(`Profile '${o.name}' does not exist`);return c=l(c.id,r.name??c.name,c.location,{shortName:r.shortName??c.shortName,transient:r.transient??c.isTransient,useDefaultFlags:r.useDefaultFlags??c.useDefaultFlags}),this.updateProfiles([],[],[c]),c}async removeProfile(o){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);if(o.isDefault)throw new Error("Cannot remove default profile");const r=this.profiles.find(a=>a.id===o.id);if(!r)throw new Error(`Profile '${o.name}' does not exist`);const c=[];this._onWillRemoveProfile.fire({profile:r,join(a){c.push(a)}});try{await Promise.allSettled(c)}catch(a){this.logService.error(a)}r.id===this.profilesObject.emptyWindow?.id&&(this.profilesObject.emptyWindow=void 0);for(const a of[...this.profilesObject.workspaces.keys()])r.id===this.profilesObject.workspaces.get(a)?.id&&this.profilesObject.workspaces.delete(a);this.updateStoredProfileAssociations(),this.updateProfiles([],[r],[]);try{this.profiles.length===1?await this.fileService.del(this.profilesHome,{recursive:!0}):await this.fileService.del(r.location,{recursive:!0})}catch(a){this.logService.error(a)}}getOrSetProfileForWorkspace(o,r=this.defaultProfile){if(!this.enabled)return this.defaultProfile;let c=this.getProfileForWorkspace(o);return c||(c=r,this.profiles.length>1&&this.setProfileForWorkspaceSync(o,c)),c}async setProfileForWorkspace(o,r){this.setProfileForWorkspaceSync(o,r)}setProfileForWorkspaceSync(o,r){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const c=this.profiles.find(a=>a.id===r.id);if(!c)throw new Error(`Profile '${r.name}' does not exist`);this.updateWorkspaceAssociation(o,c)}unsetWorkspace(o,r){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);this.updateWorkspaceAssociation(o,void 0,r)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindow=void 0,this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindow=void 0,this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(!!this.enabled&&await this.fileService.exists(this.profilesHome)){const o=await this.fileService.resolve(this.profilesHome);await Promise.all((o.children||[]).filter(r=>r.isDirectory&&this.profiles.every(c=>!this.uriIdentityService.extUri.isEqual(c.location,r.resource))).map(r=>this.fileService.del(r.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const o=this.transientProfilesObject.profiles.filter(r=>!this.isProfileAssociatedToWorkspace(r));await Promise.allSettled(o.map(r=>this.removeProfile(r)))}getProfileForWorkspace(o){const r=this.getWorkspace(o);return I.URI.isUri(r)?this.transientProfilesObject.workspaces.get(r)??this.profilesObject.workspaces.get(r):this.transientProfilesObject.emptyWindow??this.profilesObject.emptyWindow}getWorkspace(o){return(0,u.isSingleFolderWorkspaceIdentifier)(o)?o.uri:(0,u.isWorkspaceIdentifier)(o)?o.configPath:"empty-window"}isProfileAssociatedToWorkspace(o){return!!(this.uriIdentityService.extUri.isEqual(this.transientProfilesObject.emptyWindow?.location,o.location)||[...this.transientProfilesObject.workspaces.values()].some(r=>this.uriIdentityService.extUri.isEqual(r.location,o.location))||this.uriIdentityService.extUri.isEqual(this.profilesObject.emptyWindow?.location,o.location)||[...this.profilesObject.workspaces.values()].some(r=>this.uriIdentityService.extUri.isEqual(r.location,o.location)))}updateProfiles(o,r,c){const a=[...this.profiles,...o],y=[];this.transientProfilesObject.profiles=[];for(let M of a)M.isDefault||r.some(T=>M.id===T.id)||(M=c.find(T=>M.id===T.id)??M,M.isTransient?this.transientProfilesObject.profiles.push(M):y.push({location:M.location,name:M.name,shortName:M.shortName,useDefaultFlags:M.useDefaultFlags}));this.saveStoredProfiles(y),this._profilesObject=void 0,this.triggerProfilesChanges(o,r,c)}triggerProfilesChanges(o,r,c){this._onDidChangeProfiles.fire({added:o,removed:r,updated:c,all:this.profiles})}updateWorkspaceAssociation(o,r,c){c=r?.isTransient?!0:c,c||this.updateWorkspaceAssociation(o,void 0,!0);const a=this.getWorkspace(o),y=c?this.transientProfilesObject:this.profilesObject;I.URI.isUri(a)?(y.workspaces.delete(a),r&&y.workspaces.set(a,r)):y.emptyWindow=r,c||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const o={};for(const[c,a]of this.profilesObject.workspaces.entries())o[c.toString()]=a.location.toString();const r=this.profilesObject.emptyWindow?.location.toString();this.saveStoredProfileAssociations({workspaces:o,emptyWindow:r}),this._profilesObject=void 0}getStoredProfiles(){return[]}saveStoredProfiles(o){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(o){throw new Error("not implemented")}};n.PROFILES_KEY="userDataProfiles",n.PROFILE_ASSOCIATIONS_KEY="profileAssociations",n=we([te(0,S.IEnvironmentService),te(1,b.IFileService),te(2,w.IUriIdentityService),te(3,C.ILogService)],n),e.UserDataProfilesService=n;class s extends n{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(o){this.storedProfiles=o}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(o){this.storedProfileAssociations=o}}e.InMemoryUserDataProfilesService=s}),define(ee[90],ie([0,1,24,8,50,17,16,43,135,2,14,9,4,18,187,98,12,7,154,34,111,110,186,15,5,6,20,3,68,73,38,51,185]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var Y;(function(K){function q(F,A){if(F===A)return!0;const O=Object.keys(F),U=new Set;for(const ne of Object.keys(A))U.add(ne);if(O.length!==U.size)return!1;for(const ne of O){if(F[ne]!==A[ne])return!1;U.delete(ne)}return U.size===0}K.equals=q})(Y=e.Translations||(e.Translations={})),e.IExtensionsScannerService=(0,i.createDecorator)("IExtensionsScannerService");let G=class extends S.Disposable{constructor(q,F,A,O,U,ne,N,$,L,W,j){super(),this.systemExtensionsLocation=q,this.userExtensionsLocation=F,this.extensionsControlLocation=A,this.cacheLocation=O,this.userDataProfilesService=U,this.extensionsProfileScannerService=ne,this.fileService=N,this.logService=$,this.environmentService=L,this.productService=W,this.instantiationService=j,this._onDidChangeCache=this._register(new c.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,u.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(se,(0,u.joinPath)(this.cacheLocation,l.BUILTIN_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(se,(0,u.joinPath)(this.cacheLocation,l.USER_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(oe,this.obsoleteFile)),this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,d.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(q,F,A){const[O,U]=await Promise.all([this.scanSystemExtensions(q),this.scanUserExtensions(F)]),ne=A?await this.scanExtensionsUnderDevelopment(q,[...O,...U]):[];return this.dedupExtensions(O,U,ne,await this.getTargetPlatform(),!0)}async scanSystemExtensions(q){const F=[];F.push(this.scanDefaultSystemExtensions(!!q.useCache,q.language)),F.push(this.scanDevSystemExtensions(q.language,!!q.checkControlFile));const[A,O]=await Promise.all(F);return this.applyScanOptions([...A,...O],0,q,!1)}async scanUserExtensions(q){this.logService.trace("Started scanning user extensions");const F=await this.createExtensionScannerInput(q.profileLocation??this.userExtensionsLocation,!!q.profileLocation,1,!q.includeUninstalled,q.language);let O=await(q.useCache&&!F.devMode&&F.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner).scanExtensions(F);return O=await this.applyScanOptions(O,1,q,!0),this.logService.trace("Scanned user extensions:",O.length),O}async scanExtensionsUnderDevelopment(q,F){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const A=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(O=>O.scheme===b.Schemas.file).map(async O=>{const U=await this.createExtensionScannerInput(O,!1,1,!0,q.language,!1);return(await this.extensionsScanner.scanOneOrMultipleExtensions(U)).map(N=>(N.type=F.find($=>(0,d.areSameExtensions)($.identifier,N.identifier))?.type??N.type,this.extensionsScanner.validate(N,U)))}))).flat();return this.applyScanOptions(A,"development",q,!0)}return[]}async scanExistingExtension(q,F,A){const O=await this.createExtensionScannerInput(q,!1,F,!0,A.language),U=await this.extensionsScanner.scanExtension(O);return!U||!A.includeInvalid&&!U.isValid?null:U}async scanOneOrMultipleExtensions(q,F,A){const O=await this.createExtensionScannerInput(q,!1,F,!0,A.language),U=await this.extensionsScanner.scanOneOrMultipleExtensions(O);return this.applyScanOptions(U,F,A,!0)}async scanMetadata(q){const F=(0,u.joinPath)(q,"package.json"),A=(await this.fileService.readFile(F)).value.toString();return JSON.parse(A).__metadata}async updateMetadata(q,F){const A=(0,u.joinPath)(q,"package.json"),O=(await this.fileService.readFile(A)).value.toString(),U=JSON.parse(O);F.isMachineScoped=F.isMachineScoped||void 0,F.isBuiltin=F.isBuiltin||void 0,F.installedTimestamp=F.installedTimestamp||void 0,U.__metadata={...U.__metadata,...F},await this.fileService.writeFile((0,u.joinPath)(q,"package.json"),R.VSBuffer.fromString(JSON.stringify(U,null," ")))}async applyScanOptions(q,F,A,O){return A.includeAllVersions||(q=this.dedupExtensions(F===0?q:void 0,F===1?q:void 0,F==="development"?q:void 0,await this.getTargetPlatform(),O)),A.includeInvalid||(q=q.filter(U=>U.isValid)),q.sort((U,ne)=>{const N=P.basename(U.location.fsPath),$=P.basename(ne.location.fsPath);return N<$?-1:N>$?1:0})}dedupExtensions(q,F,A,O,U){const ne=($,L,W)=>{if($.isValid&&!L.isValid)return!1;if($.isValid===L.isValid){if(U&&p.gt($.manifest.version,L.manifest.version))return this.logService.debug(`Skipping extension ${L.location.path} with lower version ${L.manifest.version} in favour of ${$.location.path} with version ${$.manifest.version}`),!1;if(p.eq($.manifest.version,L.manifest.version)){if($.type===0)return this.logService.debug(`Skipping extension ${L.location.path} in favour of system extension ${$.location.path} with same version`),!1;if($.targetPlatform===O)return this.logService.debug(`Skipping extension ${L.location.path} from different target platform ${L.targetPlatform}`),!1}}return W?this.logService.warn(`Overwriting user extension ${$.location.path} with ${L.location.path}.`):this.logService.debug(`Overwriting user extension ${$.location.path} with ${L.location.path}.`),!0},N=new Map;return q?.forEach($=>{const L=l.ExtensionIdentifier.toKey($.identifier.id),W=N.get(L);(!W||ne(W,$,!1))&&N.set(L,$)}),F?.forEach($=>{const L=l.ExtensionIdentifier.toKey($.identifier.id),W=N.get(L);if(!W&&q&&$.type===0){this.logService.debug(`Skipping obsolete system extension ${$.location.path}.`);return}(!W||ne(W,$,!1))&&N.set(L,$)}),A?.forEach($=>{const L=l.ExtensionIdentifier.toKey($.identifier.id),W=N.get(L);(!W||ne(W,$,!0))&&N.set(L,$),N.set(L,$)}),[...N.values()]}async scanDefaultSystemExtensions(q,F){this.logService.trace("Started scanning system extensions");const A=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,F),U=await(q&&!A.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(A);return this.logService.trace("Scanned system extensions:",U.length),U}async scanDevSystemExtensions(q,F){const A=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!A?.length)return[];this.logService.trace("Started scanning dev system extensions");const O=F?await this.getBuiltInExtensionControl():{},U=[],ne=h.URI.file(P.normalize(P.join(b.FileAccess.asFileUri("",z).fsPath,"..",".build","builtInExtensions")));for(const $ of A){const L=O[$.name]||"marketplace";switch(L){case"disabled":break;case"marketplace":U.push((0,u.joinPath)(ne,$.name));break;default:U.push(h.URI.file(L));break}}const N=await Promise.all(U.map(async $=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput($,!1,0,!0,q))));return this.logService.trace("Scanned dev system extensions:",N.length),(0,E.coalesce)(N)}async getBuiltInExtensionControl(){try{const q=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(q.value.toString())}catch{return{}}}async createExtensionScannerInput(q,F,A,O,U,ne=!0){const N=await this.getTranslations(U??C.language),$=await this.getMtime(q),L=F?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,W=L?await this.getMtime(L):void 0;return new V(q,$,L,W,F,A,O,ne,this.productService.version,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,U,N)}async getMtime(q){try{const F=await this.fileService.stat(q);if(typeof F.mtime=="number")return F.mtime}catch{}}};G=we([te(4,M.IUserDataProfilesService),te(5,y.IExtensionsProfileScannerService),te(6,s.IFileService),te(7,o.ILogService),te(8,m.IEnvironmentService),te(9,r.IProductService),te(10,i.IInstantiationService)],G),e.AbstractExtensionsScannerService=G;class V{constructor(q,F,A,O,U,ne,N,$,L,W,j,H,X,re){this.location=q,this.mtime=F,this.applicationExtensionslocation=A,this.applicationExtensionslocationMtime=O,this.profile=U,this.type=ne,this.excludeObsolete=N,this.validate=$,this.productVersion=L,this.productDate=W,this.productCommit=j,this.devMode=H,this.language=X,this.translations=re}static createNlsConfiguration(q){return{language:q.language,pseudo:q.language==="pseudo",devMode:q.devMode,translations:q.translations}}static equals(q,F){return(0,u.isEqual)(q.location,F.location)&&q.mtime===F.mtime&&(0,u.isEqual)(q.applicationExtensionslocation,F.applicationExtensionslocation)&&q.applicationExtensionslocationMtime===F.applicationExtensionslocationMtime&&q.profile===F.profile&&q.type===F.type&&q.excludeObsolete===F.excludeObsolete&&q.validate===F.validate&&q.productVersion===F.productVersion&&q.productDate===F.productDate&&q.productCommit===F.productCommit&&q.devMode===F.devMode&&q.language===F.language&&Y.equals(q.translations,F.translations)}}let oe=class extends S.Disposable{constructor(q,F,A,O,U){super(),this.obsoleteFile=q,this.extensionsProfileScannerService=F,this.uriIdentityService=A,this.fileService=O,this.logService=U}async scanExtensions(q){const F=q.profile?await this.scanExtensionsFromProfile(q):await this.scanExtensionsFromLocation(q);let A={};if(q.excludeObsolete&&q.type===1)try{const O=(await this.fileService.readFile(this.obsoleteFile)).value.toString();A=JSON.parse(O)}catch{}return(0,g.isEmptyObject)(A)?F:F.filter(O=>!A[d.ExtensionKey.create(O).toString()])}async scanExtensionsFromLocation(q){const F=await this.fileService.resolve(q.location);if(!F.children?.length)return[];const A=await Promise.all(F.children.map(async O=>{if(!O.isDirectory||q.type===1&&(0,u.basename)(O.resource).indexOf(".")===0)return null;const U=new V(O.resource,q.mtime,q.applicationExtensionslocation,q.applicationExtensionslocationMtime,q.profile,q.type,q.excludeObsolete,q.validate,q.productVersion,q.productDate,q.productCommit,q.devMode,q.language,q.translations);return this.scanExtension(U)}));return(0,E.coalesce)(A).sort((O,U)=>O.location.path!0,q);if(q.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(q.location,q.applicationExtensionslocation)){F=F.filter(O=>!O.metadata?.isApplicationScoped);const A=await this.scanExtensionsFromProfileResource(q.applicationExtensionslocation,O=>!!O.metadata?.isApplicationScoped,q);F.push(...A)}return F}async scanExtensionsFromProfileResource(q,F,A){const O=await this.extensionsProfileScannerService.scanProfileExtensions(q);if(!O.length)return[];const U=await Promise.all(O.map(async ne=>{if(F(ne)){const N=new V(ne.location,A.mtime,A.applicationExtensionslocation,A.applicationExtensionslocationMtime,A.profile,A.type,A.excludeObsolete,A.validate,A.productVersion,A.productDate,A.productCommit,A.devMode,A.language,A.translations);return this.scanExtension(N,ne.metadata)}return null}));return(0,E.coalesce)(U)}async scanOneOrMultipleExtensions(q){try{if(await this.fileService.exists((0,u.joinPath)(q.location,"package.json"))){const F=await this.scanExtension(q);return F?[F]:[]}else return await this.scanExtensions(q)}catch(F){return this.logService.error(`Error scanning extensions at ${q.location.path}:`,(0,D.getErrorMessage)(F)),[]}}async scanExtension(q,F){try{let A=await this.scanExtensionManifest(q.location);if(A){A.publisher||(A.publisher=l.UNDEFINED_PUBLISHER),F=F??A.__metadata,delete A.__metadata;const O=(0,d.getGalleryExtensionId)(A.publisher,A.name),U=F?.id?{id:O,uuid:F.id}:{id:O},ne=F?.isSystem?0:q.type,N=ne===0||!!F?.isBuiltin;A=await this.translateManifest(q.location,A,V.createNlsConfiguration(q));const $={type:ne,identifier:U,manifest:A,location:q.location,isBuiltin:N,targetPlatform:F?.targetPlatform??"undefined",metadata:F,isValid:!0,validations:[]};return q.validate?this.validate($,q):$}}catch(A){q.type!==0&&this.logService.error(A)}return null}validate(q,F){let A=!0;const O=(0,n.validateExtensionManifest)(F.productVersion,F.productDate,F.location,q.manifest,q.isBuiltin);for(const[U,ne]of O)U===w.default.Error&&(A=!1,this.logService.error(this.formatMessage(F.location,ne)));return q.isValid=A,q.validations=O,q}async scanExtensionManifest(q){const F=(0,u.joinPath)(q,"package.json");let A;try{A=(await this.fileService.readFile(F)).value.toString()}catch(U){return(0,s.toFileOperationResult)(U)!==1&&this.logService.error(this.formatMessage(q,(0,v.localize)(0,null,F.path,U.message))),null}let O;try{O=JSON.parse(A)}catch{const ne=[];(0,I.parse)(A,ne);for(const N of ne)this.logService.error(this.formatMessage(q,(0,v.localize)(1,null,F.path,N.offset,N.length,(0,f.getParseErrorMessage)(N.error))));return null}return(0,I.getNodeType)(O)!=="object"?(this.logService.error(this.formatMessage(q,(0,v.localize)(2,null,F.path))),null):O}async translateManifest(q,F,A){const O=await this.getLocalizedMessages(q,F,A);if(O)try{const U=[],ne=await this.resolveOriginalMessageBundle(O.default,U);if(U.length>0)return U.forEach($=>{this.logService.error(this.formatMessage(q,(0,v.localize)(3,null,O.default?.path,(0,f.getParseErrorMessage)($.error))))}),F;if((0,I.getNodeType)(O)!=="object")return this.logService.error(this.formatMessage(q,(0,v.localize)(4,null,O.default?.path))),F;const N=O.values||Object.create(null);return(0,_.localizeManifest)(F,N,ne)}catch{}return F}async getLocalizedMessages(q,F,A){const O=(0,u.joinPath)(q,"package.nls.json"),U=(L,W)=>{W.forEach(j=>{this.logService.error(this.formatMessage(q,(0,v.localize)(5,null,L?.path,(0,f.getParseErrorMessage)(j.error))))})},ne=L=>{this.logService.error(this.formatMessage(q,(0,v.localize)(6,null,L?.path)))},N=`${F.publisher}.${F.name}`,$=A.translations[N];if($)try{const L=h.URI.file($),W=(await this.fileService.readFile(L)).value.toString(),j=[],H=(0,I.parse)(W,j);return j.length>0?(U(L,j),{values:void 0,default:O}):(0,I.getNodeType)(H)!=="object"?(ne(L),{values:void 0,default:O}):{values:H.contents?H.contents.package:void 0,default:O}}catch{return{values:void 0,default:O}}else{if(!await this.fileService.exists(O))return;let W;try{W=await this.findMessageBundles(q,A)}catch{return}if(!W.localized)return{values:void 0,default:W.original};try{const j=(await this.fileService.readFile(W.localized)).value.toString(),H=[],X=(0,I.parse)(j,H);return H.length>0?(U(W.localized,H),{values:void 0,default:W.original}):(0,I.getNodeType)(X)!=="object"?(ne(W.localized),{values:void 0,default:W.original}):{values:X,default:W.original}}catch{return{values:void 0,default:W.original}}}}async resolveOriginalMessageBundle(q,F){if(q)try{const A=(await this.fileService.readFile(q)).value.toString();return(0,I.parse)(A,F)}catch{}}findMessageBundles(q,F){return new Promise((A,O)=>{const U=ne=>{const N=(0,u.joinPath)(q,`package.nls.${ne}.json`);this.fileService.exists(N).then($=>{$&&A({localized:N,original:(0,u.joinPath)(q,"package.nls.json")});const L=ne.lastIndexOf("-");L===-1?A({localized:(0,u.joinPath)(q,"package.nls.json"),original:null}):(ne=ne.substring(0,L),U(ne))})};if(F.devMode||F.pseudo||!F.language)return A({localized:(0,u.joinPath)(q,"package.nls.json"),original:null});U(F.language)})}formatMessage(q,F){return`[${q.path}]: ${F}`}};oe=we([te(1,y.IExtensionsProfileScannerService),te(2,T.IUriIdentityService),te(3,s.IFileService),te(4,o.ILogService)],oe);let se=class extends oe{constructor(q,F,A,O,U,ne){super(F,A,O,U,ne),this.cacheFile=q,this.cacheValidatorThrottler=this._register(new t.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new c.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(q){const F=await this.readExtensionCache();if(this.input=q,F&&F.input&&V.equals(F.input,this.input))return this.cacheValidatorThrottler.trigger(()=>this.validateCache()),F.result.map(O=>(O.location=h.URI.revive(O.location),O));const A=await super.scanExtensions(q);return await this.writeExtensionCache({input:q,result:A}),A}async readExtensionCache(){try{const q=await this.fileService.readFile(this.cacheFile),F=JSON.parse(q.value.toString());return{result:F.result,input:(0,a.revive)(F.input)}}catch(q){this.logService.debug("Error while reading the extension cache file:",this.cacheFile.path,(0,D.getErrorMessage)(q))}return null}async writeExtensionCache(q){try{await this.fileService.writeFile(this.cacheFile,R.VSBuffer.fromString(JSON.stringify(q)))}catch(F){this.logService.debug("Error while writing the extension cache file:",this.cacheFile.path,(0,D.getErrorMessage)(F))}}async validateCache(){if(!this.input)return;const q=await this.readExtensionCache();if(!q)return;const F=q.result,A=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!k.equals(A,F))try{await this.fileService.del(this.cacheFile),this._onDidChangeCache.fire()}catch(O){this.logService.error(O)}}};se=we([te(2,y.IExtensionsProfileScannerService),te(3,T.IUriIdentityService),te(4,s.IFileService),te(5,o.ILogService)],se);function ae(K,q){const F=(0,d.getExtensionId)(K.manifest.publisher,K.manifest.name);return{id:F,identifier:new l.ExtensionIdentifier(F),isBuiltin:K.type===0,isUserBuiltin:K.type===1&&K.isBuiltin,isUnderDevelopment:q,extensionLocation:K.location,uuid:K.identifier.uuid,targetPlatform:K.targetPlatform,...K.manifest}}e.toExtensionDescription=ae;class fe extends G{constructor(q,F,A,O,U,ne,N,$,L,W,j){super(q,F,(0,u.joinPath)(A,".vscode-oss-dev","extensions","control.json"),(0,u.joinPath)(O,l.MANIFEST_CACHE_FOLDER),U,ne,N,$,L,W,j),this.translationsPromise=(async()=>{if(C.translationsConfigFile)try{const H=await this.fileService.readFile(h.URI.file(C.translationsConfigFile));return JSON.parse(H.value.toString())}catch{}return Object.create(null)})()}getTranslations(q){return this.translationsPromise}}e.NativeExtensionsScannerService=fe}),define(ee[253],ie([0,1,7,34,73,90,15,5,6,20,38]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsScannerService=void 0;let P=class extends R.NativeExtensionsScannerService{constructor(u,p,w,g,h,v,m){super(E.URI.file(h.builtinExtensionsPath),E.URI.file(h.extensionsPath),h.userHome,E.URI.file(h.userDataPath),u,p,w,g,h,v,m)}};P=we([te(0,b.IUserDataProfilesService),te(1,k.IExtensionsProfileScannerService),te(2,D.IFileService),te(3,f.ILogService),te(4,t.INativeEnvironmentService),te(5,S.IProductService),te(6,I.IInstantiationService)],P),e.ExtensionsScannerService=P}),define(ee[254],ie([0,1,13,2,14,9,4,58,7,29,41,34,6,38]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolMainService=void 0;let p=class extends t.Disposable{constructor(g,h,v){super(),this.environmentService=g,this.logService=v,this.validRoots=I.TernarySearchTree.forPaths(!D.isLinux),this.validExtensions=new Set([".svg",".png",".jpg",".jpeg",".gif",".bmp",".webp"]),this.addValidFileRoot(g.appRoot),this.addValidFileRoot(g.extensionsPath),this.addValidFileRoot(h.defaultProfile.globalStorageHome.fsPath),this.addValidFileRoot(g.workspaceStorageHome.fsPath),this.handleProtocols()}handleProtocols(){const{defaultSession:g}=E.session;g.protocol.registerFileProtocol(k.Schemas.vscodeFileResource,(h,v)=>this.handleResourceRequest(h,v)),g.protocol.interceptFileProtocol(k.Schemas.file,(h,v)=>this.handleFileRequest(h,v)),this._register((0,t.toDisposable)(()=>{g.protocol.unregisterProtocol(k.Schemas.vscodeFileResource),g.protocol.uninterceptProtocol(k.Schemas.file)}))}addValidFileRoot(g){const h=(0,R.normalize)(g);return this.validRoots.get(h)?t.Disposable.None:(this.validRoots.set(h,!0),(0,t.toDisposable)(()=>this.validRoots.delete(h)))}handleFileRequest(g,h){const v=f.URI.parse(g.url);return this.logService.error(`Refused to load resource ${v.fsPath} from ${k.Schemas.file}: protocol (original URL: ${g.url})`),h({error:-3})}handleResourceRequest(g,h){const v=this.requestToNormalizedFilePath(g);let m;return this.environmentService.crossOriginIsolated&&((0,R.basename)(v)==="workbench.html"||(0,R.basename)(v)==="workbench-dev.html"?m=k.COI.CoopAndCoep:m=k.COI.getHeadersFromQuery(g.url)),this.validRoots.findSubstr(v)?h({path:v,headers:m}):this.validExtensions.has((0,R.extname)(v).toLowerCase())?h({path:v}):(this.logService.error(`${k.Schemas.vscodeFileResource}: Refused to load resource ${v} from ${k.Schemas.vscodeFileResource}: protocol (original URL: ${g.url})`),h({error:-3}))}requestToNormalizedFilePath(g){const h=f.URI.parse(g.url),v=k.FileAccess.asFileUri(h);return(0,R.normalize)(v.fsPath)}createIPCObjectUrl(){let g;const h=f.URI.from({scheme:"vscode",path:(0,S.generateUuid)()}),v=h.toString(),m=async()=>g;return b.validatedIpcMain.handle(v,m),this.logService.trace(`IPC Object URL: Registered new channel ${v}.`),{resource:h,update:d=>g=d,dispose:()=>{this.logService.trace(`IPC Object URL: Removed channel ${v}.`),b.validatedIpcMain.removeHandler(v)}}}};p=we([te(0,P.INativeEnvironmentService),te(1,u.IUserDataProfilesService),te(2,C.ILogService)],p),e.ProtocolMainService=p}),define(ee[255],ie([0,1,13,41,8,3,2,14,12,103,26,21,6,54,61,64,44,38,36]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcess=void 0;let m=class extends D.Disposable{constructor(l,n,s,i,o,r,c,a,y){super(),this.machineId=l,this.userEnv=n,this.environmentMainService=s,this.userDataProfilesService=i,this.lifecycleMainService=o,this.logService=r,this.policyService=c,this.themeMainService=a,this.protocolMainService=y,this.firstWindowConnectionBarrier=new k.Barrier,this.window=void 0,this.windowCloseListener=void 0,this._onDidError=this._register(new R.Emitter),this.onDidError=R.Event.buffer(this._onDidError.event),this._whenReady=void 0,this._whenIpcReady=void 0,this.registerListeners()}registerListeners(){t.validatedIpcMain.on("vscode:createSharedProcessMessageChannel",(l,n)=>this.onWindowConnection(l,n)),t.validatedIpcMain.on("vscode:relaySharedProcessWorkerMessageChannel",(l,n)=>this.onWorkerConnection(l,n)),this._register(this.lifecycleMainService.onWillShutdown(()=>this.onWillShutdown()))}async onWindowConnection(l,n){this.logService.trace("SharedProcess: on vscode:createSharedProcessMessageChannel"),this.firstWindowConnectionBarrier.isOpen()||this.firstWindowConnectionBarrier.open(),await this.whenReady();const s=await this.connect();if(l.sender.isDestroyed())return s.close();l.sender.postMessage("vscode:createSharedProcessMessageChannelResult",n,[s])}onWorkerConnection(l,n){this.logService.trace("SharedProcess: onWorkerConnection",n);const s=new D.DisposableStore,i=r=>{!this.isAlive()||(this.logService.trace(`SharedProcess: disposing worker (reason: '${r}')`,n),s.dispose(),this.send("vscode:electron-main->shared-process=disposeWorker",n))},o=E.BrowserWindow.fromId(n.reply.windowId);if(!o||o.isDestroyed()||o.webContents.isDestroyed()||!n.reply.channel){i("unavailable");return}s.add(R.Event.filter(this.lifecycleMainService.onWillLoadWindow,r=>r.window.win===o)(()=>i("load"))),s.add(R.Event.fromNodeEventEmitter(o,"closed")(()=>i("closed"))),o.webContents.postMessage(n.reply.channel,n.reply.nonce,l.ports)}onWillShutdown(){const l=this.window;!l||(this.send("vscode:electron-main->shared-process=exit"),this.windowCloseListener&&(l.removeListener("close",this.windowCloseListener),this.windowCloseListener=void 0),setTimeout(()=>{try{l.close()}catch{}this.window=void 0},0))}send(l,...n){if(!this.isAlive()){this.logService.warn(`Sending IPC message to channel '${l}' for shared process window that is destroyed`);return}try{this.window?.webContents.send(l,...n)}catch(s){this.logService.warn(`Error sending IPC message to channel '${l}' of shared process: ${(0,g.toErrorMessage)(s)}`)}}whenReady(){return this._whenReady||(this._whenReady=new Promise(l=>t.validatedIpcMain.once("vscode:shared-process->electron-main=init-done",()=>{this.logService.trace("SharedProcess: Overall ready"),l()}))),this._whenReady}get whenIpcReady(){return this._whenIpcReady||(this._whenIpcReady=(async()=>{await this.firstWindowConnectionBarrier.wait(),this.createWindow(),this.registerWindowListeners(),await new Promise(l=>t.validatedIpcMain.once("vscode:shared-process->electron-main=ipc-ready",()=>{this.logService.trace("SharedProcess: IPC ready"),l()}))})()),this._whenIpcReady}createWindow(){const l=this._register(this.protocolMainService.createIPCObjectUrl());this.window=new E.BrowserWindow({show:!1,backgroundColor:this.themeMainService.getBackgroundColor(),webPreferences:{preload:I.FileAccess.asFileUri("vs/base/parts/sandbox/electron-browser/preload.js",z).fsPath,additionalArguments:[`--vscode-window-config=${l.resource.toString()}`,"--vscode-window-kind=shared-process"],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",nodeIntegration:!0,nodeIntegrationInWorker:!0,contextIsolation:!1,enableWebSQL:!1,spellcheck:!1,images:!1,webgl:!1}}),l.update({machineId:this.machineId,windowId:this.window.id,appRoot:this.environmentMainService.appRoot,codeCachePath:this.environmentMainService.codeCachePath,profiles:this.userDataProfilesService.profiles,userEnv:this.userEnv,args:this.environmentMainService.args,logLevel:this.logService.getLevel(),product:u.default,policiesData:this.policyService.serialize()}),this.window.loadURL(I.FileAccess.asBrowserUri(`vs/code/electron-browser/sharedProcess/sharedProcess${this.environmentMainService.isBuilt?"":"-dev"}.html`,z).toString(!0))}registerWindowListeners(){!this.window||(this.windowCloseListener=l=>{this.logService.trace("SharedProcess#close prevented"),l.preventDefault(),this.window?.isVisible()&&this.window.hide()},this.window.on("close",this.windowCloseListener),this.window.webContents.on("render-process-gone",(l,n)=>this._onDidError.fire({type:2,details:n})),this.window.on("unresponsive",()=>this._onDidError.fire({type:1})),this.window.webContents.on("did-fail-load",(l,n,s)=>this._onDidError.fire({type:3,details:{reason:s,exitCode:n}})))}async connect(){await this.whenIpcReady;const l=(0,f.assertIsDefined)(this.window);return(0,S.connect)(l)}async toggle(){await this.whenIpcReady,this.window&&(this.window.isVisible()?(this.window.webContents.closeDevTools(),this.window.hide()):(this.window.show(),this.window.webContents.openDevTools()))}isVisible(){return this.window?.isVisible()??!1}isAlive(){const l=this.window;return l?!l.isDestroyed()&&!l.webContents.isDestroyed():!1}};m=we([te(2,b.IEnvironmentMainService),te(3,h.IUserDataProfilesService),te(4,P.ILifecycleMainService),te(5,C.ILogService),te(6,v.IPolicyService),te(7,w.IThemeMainService),te(8,p.IProtocolMainService)],m),e.SharedProcess=m}),define(ee[91],ie([0,1,8,3,2,72,12,104,5,38]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,f.createDecorator)("storageService");var b;(function(v){v[v.NONE=0]="NONE",v[v.SHUTDOWN=1]="SHUTDOWN"})(b=e.WillSaveStateReason||(e.WillSaveStateReason={}));var P;(function(v){v[v.APPLICATION=-1]="APPLICATION",v[v.PROFILE=0]="PROFILE",v[v.WORKSPACE=1]="WORKSPACE"})(P=e.StorageScope||(e.StorageScope={}));var C;(function(v){v[v.USER=0]="USER",v[v.MACHINE=1]="MACHINE"})(C=e.StorageTarget||(e.StorageTarget={}));function u(v){const m=v.get(e.TARGET_KEY);if(m)try{return JSON.parse(m)}catch{}return Object.create(null)}e.loadKeyTargets=u;class p extends k.Disposable{constructor(m={flushInterval:p.DEFAULT_FLUSH_INTERVAL}){super(),this.options=m,this._onDidChangeValue=this._register(new t.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new t.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new t.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new E.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new k.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,E.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,k.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,R.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,R.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(m,d){if(d===e.TARGET_KEY){switch(m){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:m})}else this._onDidChangeValue.fire({scope:m,key:d,target:this.getKeyTargets(m)[d]})}emitWillSaveState(m){this._onWillSaveState.fire({reason:m})}get(m,d,l){return this.getStorage(d)?.get(m,l)}getBoolean(m,d,l){return this.getStorage(d)?.getBoolean(m,l)}getNumber(m,d,l){return this.getStorage(d)?.getNumber(m,l)}store(m,d,l,n){if((0,D.isUndefinedOrNull)(d)){this.remove(m,l);return}this.withPausedEmitters(()=>{this.updateKeyTarget(m,l,n),this.getStorage(l)?.set(m,d)})}remove(m,d){this.withPausedEmitters(()=>{this.updateKeyTarget(m,d,void 0),this.getStorage(d)?.delete(m)})}withPausedEmitters(m){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{m()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(m,d){const l=[],n=this.getKeyTargets(m);for(const s of Object.keys(n))n[s]===d&&l.push(s);return l}updateKeyTarget(m,d,l){const n=this.getKeyTargets(d);typeof l=="number"?n[m]!==l&&(n[m]=l,this.getStorage(d)?.set(e.TARGET_KEY,JSON.stringify(n))):typeof n[m]=="number"&&(delete n[m],this.getStorage(d)?.set(e.TARGET_KEY,JSON.stringify(n)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(m){switch(m){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(m){const d=this.getStorage(m);return d?u(d):Object.create(null)}isNew(m){return this.getBoolean(e.IS_NEW_KEY,m)===!0}async flush(m=b.NONE){this._onWillSaveState.fire({reason:m});const d=this.getStorage(-1),l=this.getStorage(0),n=this.getStorage(1);switch(m){case b.NONE:await E.Promises.settled([d?.whenFlushed()??Promise.resolve(),l?.whenFlushed()??Promise.resolve(),n?.whenFlushed()??Promise.resolve()]);break;case b.SHUTDOWN:await E.Promises.settled([d?.flush(0)??Promise.resolve(),l?.flush(0)??Promise.resolve(),n?.flush(0)??Promise.resolve()]);break}}async log(){const m=this.getStorage(-1)?.items??new Map,d=this.getStorage(0)?.items??new Map,l=this.getStorage(1)?.items??new Map;return h(m,d,l,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(m,d){return this.emitWillSaveState(b.NONE),(0,S.isUserDataProfile)(m)?this.switchToProfile(m,d):this.switchToWorkspace(m,d)}canSwitchProfile(m,d){return!(m.id===d.id||w(d)&&w(m))}switchData(m,d,l,n){this.withPausedEmitters(()=>{if(n)for(const[s,i]of m)d.set(s,i);else{const s=new Set;for(const[i,o]of m)s.add(i),d.get(i)!==o&&this.emitDidChangeValue(l,i);for(const[i]of d.items)s.has(i)||this.emitDidChangeValue(l,i)}})}}e.AbstractStorageService=p,p.DEFAULT_FLUSH_INTERVAL=60*1e3;function w(v){return v.isDefault||!!v.useDefaultFlags?.uiState}e.isProfileUsingDefaultStorage=w;class g extends p{constructor(){super(),this.applicationStorage=this._register(new I.Storage(new I.InMemoryStorageDatabase)),this.profileStorage=this._register(new I.Storage(new I.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new I.Storage(new I.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(m=>this.emitDidChangeValue(1,m))),this._register(this.profileStorage.onDidChangeStorage(m=>this.emitDidChangeValue(0,m))),this._register(this.applicationStorage.onDidChangeStorage(m=>this.emitDidChangeValue(-1,m)))}getStorage(m){switch(m){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(m){switch(m){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(m){return!1}}e.InMemoryStorageService=g;async function h(v,m,d,l,n,s){const i=Y=>{try{return JSON.parse(Y)}catch{return Y}},o=new Map,r=new Map;v.forEach((Y,G)=>{o.set(G,Y),r.set(G,i(Y))});const c=new Map,a=new Map;m.forEach((Y,G)=>{c.set(G,Y),a.set(G,i(Y))});const y=new Map,M=new Map;d.forEach((Y,G)=>{y.set(G,Y),M.set(G,i(Y))}),console.group(l!==n?`Storage: Application (path: ${l})`:`Storage: Application & Profile (path: ${l}, default profile)`);const T=[];if(o.forEach((Y,G)=>{T.push({key:G,value:Y})}),console.table(T),console.groupEnd(),console.log(r),l!==n){console.group(`Storage: Profile (path: ${n}, profile specific)`);const Y=[];c.forEach((G,V)=>{Y.push({key:V,value:G})}),console.table(Y),console.groupEnd(),console.log(a)}console.group(`Storage: Workspace (path: ${s})`);const _=[];y.forEach((Y,G)=>{_.push({key:G,value:Y})}),console.table(_),console.groupEnd(),console.log(M)}e.logStorage=h}),define(ee[256],ie([0,1,24,8,3,2,9,81,7,23,104,146,6,91,35,28]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageMain=e.WorkspaceStorageMain=e.ApplicationStorageMain=e.ProfileStorageMain=void 0;class g extends R.Disposable{get storage(){return this._storage}constructor(s,i){super(),this.logService=s,this.fileService=i,this._onDidChangeStorage=this._register(new k.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this._onDidCloseStorage=this._register(new k.Emitter),this.onDidCloseStorage=this._onDidCloseStorage.event,this._storage=new b.Storage(new b.InMemoryStorageDatabase),this.initializePromise=void 0,this.whenInitPromise=new t.DeferredPromise,this.whenInit=this.whenInitPromise.p,this.state=b.StorageState.None}init(){return this.initializePromise||(this.initializePromise=(async()=>{if(this.state===b.StorageState.None)try{const s=await this.doCreate();this._storage.dispose(),this._storage=s,this._register(s.onDidChangeStorage(o=>this._onDidChangeStorage.fire({key:o}))),await this.doInit(s);const i=s.getBoolean(u.IS_NEW_KEY);i===void 0?s.set(u.IS_NEW_KEY,!0):i&&s.set(u.IS_NEW_KEY,!1)}catch(s){this.logService.error(`[storage main] initialize(): Unable to init storage due to ${s}`)}finally{this.state=b.StorageState.Initialized,this.whenInitPromise.complete()}})()),this.initializePromise}createLoggingOptions(){return{logTrace:this.logService.getLevel()===C.LogLevel.Trace?s=>this.logService.trace(s):void 0,logError:s=>this.logService.error(s)}}doInit(s){return s.init()}get items(){return this._storage.items}get(s,i){return this._storage.get(s,i)}set(s,i){return this._storage.set(s,i)}delete(s){return this._storage.delete(s)}async close(){const s=new I.StopWatch(!1);await this.doClose(),s.stop(),s.elapsed()>g.LOG_SLOW_CLOSE_THRESHOLD&&await this.logSlowClose(s),this._onDidCloseStorage.fire()}async logSlowClose(s){if(!!this.path)try{const i=(0,E.top)(Array.from(this._storage.items.entries()).map(([r,c])=>({key:r,length:c.length})),(r,c)=>c.length-r.length,5).map(r=>`${r.key}:${r.length}`).join(", "),o=(await this.fileService.stat(f.URI.file(this.path))).size;this.logService.warn(`[storage main] detected slow close() operation: Time: ${s.elapsed()}ms, DB size: ${o}b, Large Keys: ${i}`)}catch(i){this.logService.error("[storage main] figuring out stats for slow DB on close() resulted in an error",i)}}async doClose(){this.initializePromise&&await this.initializePromise,this.state=b.StorageState.Closed,await this._storage.close()}}g.LOG_SLOW_CLOSE_THRESHOLD=2e3;class h extends g{get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.profile.globalStorageHome.fsPath,h.STORAGE_NAME)}constructor(s,i,o,r){super(o,r),this.profile=s,this.options=i}async doCreate(){return new b.Storage(new P.SQLiteStorageDatabase(this.path??P.SQLiteStorageDatabase.IN_MEMORY_PATH,{logging:this.createLoggingOptions()}))}}h.STORAGE_NAME="state.vscdb";class v extends h{constructor(s,i,o,r){super(s,i,o,r)}}e.ProfileStorageMain=v;class m extends h{constructor(s,i,o,r){super(i.defaultProfile,s,o,r)}async doInit(s){await super.doInit(s),this.updateTelemetryState(s)}updateTelemetryState(s){s.get(p.firstSessionDateStorageKey,void 0)===void 0&&s.set(p.firstSessionDateStorageKey,new Date().toUTCString());const o=s.get(p.currentSessionDateStorageKey,void 0),r=new Date().toUTCString();s.set(p.lastSessionDateStorageKey,typeof o>"u"?null:o),s.set(p.currentSessionDateStorageKey,r)}}e.ApplicationStorageMain=m;class d extends g{get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id,d.WORKSPACE_STORAGE_NAME)}constructor(s,i,o,r,c){super(o,c),this.workspace=s,this.options=i,this.environmentService=r}async doCreate(){const{storageFilePath:s,wasCreated:i}=await this.prepareWorkspaceStorageFolder();return new b.Storage(new P.SQLiteStorageDatabase(s,{logging:this.createLoggingOptions()}),{hint:i?b.StorageHint.STORAGE_DOES_NOT_EXIST:void 0})}async prepareWorkspaceStorageFolder(){if(this.options.useInMemoryStorage)return{storageFilePath:P.SQLiteStorageDatabase.IN_MEMORY_PATH,wasCreated:!0};const s=(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id),i=(0,D.join)(s,d.WORKSPACE_STORAGE_NAME);return await S.Promises.exists(s)?{storageFilePath:i,wasCreated:!1}:(await S.Promises.mkdir(s,{recursive:!0}),this.ensureWorkspaceStorageFolderMeta(s),{storageFilePath:i,wasCreated:!0})}async ensureWorkspaceStorageFolderMeta(s){let i;if((0,w.isSingleFolderWorkspaceIdentifier)(this.workspace)?i={folder:this.workspace.uri.toString()}:(0,w.isWorkspaceIdentifier)(this.workspace)&&(i={workspace:this.workspace.configPath.toString()}),i)try{const o=(0,D.join)(s,d.WORKSPACE_META_NAME);await S.Promises.exists(o)||await S.Promises.writeFile(o,JSON.stringify(i,void 0,2))}catch(o){this.logService.error(`[storage main] ensureWorkspaceStorageFolderMeta(): Unable to create workspace storage metadata due to ${o}`)}}}e.WorkspaceStorageMain=d,d.WORKSPACE_STORAGE_NAME="state.vscdb",d.WORKSPACE_META_NAME="workspace.json";class l extends g{get path(){}async doCreate(){return new b.Storage(new b.InMemoryStorageDatabase)}}e.InMemoryStorageMain=l}),define(ee[257],ie([0,1,68,34,15,6,227,51,38]),function(z,e,E,t,k,R,D,I,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesService=void 0;let S=class At extends f.UserDataProfilesService{constructor(P,C,u,p,w){super(u,p,C,w),this.stateService=P}getStoredProfiles(){return(0,E.revive)(this.stateService.getItem(At.PROFILES_KEY,[]))}getStoredProfileAssociations(){return(0,E.revive)(this.stateService.getItem(At.PROFILE_ASSOCIATIONS_KEY,{}))}};S=we([te(0,D.IStateService),te(1,I.IUriIdentityService),te(2,t.IEnvironmentService),te(3,k.IFileService),te(4,R.ILogService)],S),e.UserDataProfilesService=S}),define(ee[42],ie([0,1,7,34,15,5,6,37,51,38,257]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesMainService=e.IUserDataProfilesMainService=void 0,e.IUserDataProfilesMainService=(0,R.refineServiceDecorator)(S.IUserDataProfilesService);let P=class dt extends b.UserDataProfilesService{constructor(u,p,w,g,h){super(u,p,w,g,h),this.stateMainService=u}setEnablement(u){super.setEnablement(u),this.enabled||(this.saveStoredProfiles([]),this.saveStoredProfileAssociations({}))}checkAndCreateProfileFromCli(u){if(!!this.isEnabled()){if(u.profile){const p=this.profiles.find(w=>w.name===u.profile);return p?Promise.resolve(p):this.createNamedProfile(u.profile)}if(u["profile-temp"])return this.createTransientProfile()}}saveStoredProfiles(u){u.length?this.stateMainService.setItem(dt.PROFILES_KEY,u):this.stateMainService.removeItem(dt.PROFILES_KEY)}saveStoredProfileAssociations(u){u.emptyWindow||u.workspaces?this.stateMainService.setItem(dt.PROFILE_ASSOCIATIONS_KEY,u):this.stateMainService.removeItem(dt.PROFILE_ASSOCIATIONS_KEY)}getStoredProfileAssociations(){const u="workspaceAndProfileInfo",p=this.stateMainService.getItem(u,void 0);if(p){this.stateMainService.removeItem(u);const w=p.reduce((g,{workspace:h,profile:v})=>(g[E.URI.revive(h).toString()]=E.URI.revive(v).toString(),g),{});this.stateMainService.setItem(dt.PROFILE_ASSOCIATIONS_KEY,{workspaces:w})}return super.getStoredProfileAssociations()}};P=we([te(0,I.IStateMainService),te(1,f.IUriIdentityService),te(2,t.IEnvironmentService),te(3,k.IFileService),te(4,D.ILogService)],P),e.UserDataProfilesMainService=P}),define(ee[258],ie([0,1,2,18,73,90,15,6,38,42]),function(z,e,E,t,k,R,D,I,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultExtensionsProfileInitHandler=void 0;let b=class extends E.Disposable{constructor(C,u,p,w,g){super(),this.userDataProfilesService=C,this.fileService=u,this.extensionsScannerService=p,this.extensionsProfileScannerService=w,C.isEnabled()?(this._register(C.onWillCreateProfile(h=>{C.profiles.length===1&&h.join(this.initialize())})),this._register(C.onDidChangeProfiles(h=>{C.profiles.length===1&&this.uninitialize()}))):this.uninitialize().then(null,h=>g.error(h))}async initialize(){const C=this.getDefaultExtensionsProfileResource();try{await this.fileService.del(C)}catch{}const u=await this.extensionsScannerService.scanUserExtensions({includeInvalid:!0});await this.extensionsProfileScannerService.addExtensionsToProfile(u.map(p=>[p,p.metadata]),C)}async uninitialize(){try{await this.fileService.del(this.getDefaultExtensionsProfileResource())}catch{}}getDefaultExtensionsProfileResource(){return this.userDataProfilesService.defaultProfile.extensionsResource??(0,t.joinPath)(this.userDataProfilesService.defaultProfile.location,f.EXTENSIONS_RESOURCE_NAME)}};b=we([te(0,S.IUserDataProfilesMainService),te(1,D.IFileService),te(2,R.IExtensionsScannerService),te(3,k.IExtensionsProfileScannerService),te(4,I.ILogService)],b),e.DefaultExtensionsProfileInitHandler=b}),define(ee[259],ie([0,1,13,24,4,7,23,19,59,5,6,115,31,42]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaunchMainService=e.ILaunchMainService=e.ID=void 0,e.ID="launchMainService",e.ILaunchMainService=(0,S.createDecorator)(e.ID);let p=class{constructor(g,h,v,m,d){this.logService=g,this.windowsMainService=h,this.urlService=v,this.configurationService=m,this.userDataProfilesMainService=d}async start(g,h){this.logService.trace("Received data from other instance: ",g,h),k.isMacintosh&&E.app.focus({steal:!0});const v=this.parseOpenUrl(g);if(v.length){let m=Promise.resolve();if(this.windowsMainService.getWindowCount()===0){const d=(0,t.firstOrDefault)(await this.windowsMainService.openEmptyWindow({context:4}));d&&(m=d.ready())}m.then(()=>{for(const{uri:d,url:l}of v)this.urlService.open(d,{originalUrl:l})})}else return this.startOpenWindow(g,h)}parseOpenUrl(g){return g["open-url"]&&g._urls&&g._urls.length>0?(0,t.coalesce)(g._urls.map(h=>{try{return{uri:R.URI.parse(h),url:h}}catch{return null}})):[]}async startOpenWindow(g,h){const v=(0,f.isLaunchedFromCli)(h)?0:4;let m=[];const d=g.wait&&g.waitMarkerFilePath?R.URI.file(g.waitMarkerFilePath):void 0,l=g.remote||void 0,n=await this.userDataProfilesMainService.checkAndCreateProfileFromCli(g),s={context:v,cli:g,userEnv:h,waitMarkerFileURI:d,remoteAuthority:l,profile:n};if(g.extensionDevelopmentPath)await this.windowsMainService.openExtensionDevelopmentHostWindow(g.extensionDevelopmentPath,s);else if(!g._.length&&!g["folder-uri"]&&!g["file-uri"]){let i=!1;if(g["new-window"]||g["unity-launch"]||n)i=!0;else if(g["reuse-window"])i=!1;else switch(this.configurationService.getValue("window")?.openWithoutArgumentsInNewWindow||"default"){case"on":i=!0;break;case"off":i=!1;break;default:i=!k.isMacintosh}if(i)m=await this.windowsMainService.open({...s,forceNewWindow:!0,forceEmpty:!0});else{const o=this.windowsMainService.getLastActiveWindow();o?(this.windowsMainService.openExistingWindow(o,s),m=[o]):m=await this.windowsMainService.open({...s,forceEmpty:!0})}}else m=await this.windowsMainService.open({...s,forceNewWindow:g["new-window"],preferNewWindow:!g["reuse-window"]&&!g.wait,forceReuseWindow:g["reuse-window"],diffMode:g.diff,mergeMode:g.merge,addMode:g.add,noRecentEntry:!!g["skip-add-to-recently-opened"],gotoLineMode:g.goto});if(d&&m.length===1&&m[0])return Promise.race([m[0].whenClosedOrLoaded,(0,D.whenDeleted)(d.fsPath)]).then(()=>{},()=>{})}async getMainProcessId(){return this.logService.trace("Received request for process ID from other instance."),process.pid}};p=we([te(0,b.ILogService),te(1,C.IWindowsMainService),te(2,P.IURLService),te(3,I.IConfigurationService),te(4,u.IUserDataProfilesMainService)],p),e.LaunchMainService=p}),define(ee[92],ie([0,1,7,49,3,2,34,15,5,21,6,91,256,38,42,51]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationStorageMainService=e.IApplicationStorageMainService=e.StorageMainService=e.IStorageMainService=void 0,e.IStorageMainService=(0,f.createDecorator)("storageMainService");let g=class extends R.Disposable{constructor(m,d,l,n,s,i){super(),this.logService=m,this.environmentService=d,this.userDataProfilesService=l,this.lifecycleMainService=n,this.fileService=s,this.uriIdentityService=i,this.shutdownReason=void 0,this._onDidChangeProfileStorage=this._register(new k.Emitter),this.onDidChangeProfileStorage=this._onDidChangeProfileStorage.event,this.applicationStorage=this.createApplicationStorage(),this.mapProfileToStorage=new Map,this.mapWorkspaceToStorage=new Map,this.registerListeners()}getStorageOptions(){return{useInMemoryStorage:!!this.environmentService.extensionTestsLocationURI}}registerListeners(){(async()=>(await this.lifecycleMainService.when(3),this.applicationStorage.init()))(),this._register(this.lifecycleMainService.onWillLoadWindow(m=>{m.window.profile&&this.profileStorage(m.window.profile).init(),m.workspace&&this.workspaceStorage(m.workspace).init()})),this._register(this.lifecycleMainService.onWillShutdown(m=>{this.logService.trace("storageMainService#onWillShutdown()"),this.shutdownReason=m.reason,m.join(this.applicationStorage.close());for(const[,d]of this.mapProfileToStorage)m.join(d.close());for(const[,d]of this.mapWorkspaceToStorage)m.join(d.close())})),this._register(this.userDataProfilesService.onWillCreateProfile(m=>{m.join((async()=>{await this.fileService.exists(m.profile.globalStorageHome)||await this.fileService.createFolder(m.profile.globalStorageHome)})())})),this._register(this.userDataProfilesService.onWillRemoveProfile(m=>{const d=this.mapProfileToStorage.get(m.profile.id);d&&m.join(d.close())}))}createApplicationStorage(){this.logService.trace("StorageMainService: creating application storage");const m=new C.ApplicationStorageMain(this.getStorageOptions(),this.userDataProfilesService,this.logService,this.fileService);return(0,t.once)(m.onDidCloseStorage)(()=>{this.logService.trace("StorageMainService: closed application storage")}),m}profileStorage(m){if((0,P.isProfileUsingDefaultStorage)(m))return this.applicationStorage;let d=this.mapProfileToStorage.get(m.id);if(!d){this.logService.trace(`StorageMainService: creating profile storage (${m.name})`),d=this.createProfileStorage(m),this.mapProfileToStorage.set(m.id,d);const l=this._register(d.onDidChangeStorage(n=>this._onDidChangeProfileStorage.fire({...n,storage:d,profile:m})));(0,t.once)(d.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed profile storage (${m.name})`),this.mapProfileToStorage.delete(m.id),l.dispose()})}return d}createProfileStorage(m){return this.shutdownReason===2?new C.InMemoryStorageMain(this.logService,this.fileService):new C.ProfileStorageMain(m,this.getStorageOptions(),this.logService,this.fileService)}workspaceStorage(m){let d=this.mapWorkspaceToStorage.get(m.id);return d||(this.logService.trace(`StorageMainService: creating workspace storage (${m.id})`),d=this.createWorkspaceStorage(m),this.mapWorkspaceToStorage.set(m.id,d),(0,t.once)(d.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed workspace storage (${m.id})`),this.mapWorkspaceToStorage.delete(m.id)})),d}createWorkspaceStorage(m){return this.shutdownReason===2?new C.InMemoryStorageMain(this.logService,this.fileService):new C.WorkspaceStorageMain(m,this.getStorageOptions(),this.logService,this.environmentService,this.fileService)}isUsed(m){const d=E.URI.file(m);for(const l of[this.applicationStorage,...this.mapProfileToStorage.values(),...this.mapWorkspaceToStorage.values()])if(!!l.path&&this.uriIdentityService.extUri.isEqualOrParent(E.URI.file(l.path),d))return!0;return!1}};g=we([te(0,b.ILogService),te(1,D.IEnvironmentService),te(2,p.IUserDataProfilesMainService),te(3,S.ILifecycleMainService),te(4,I.IFileService),te(5,w.IUriIdentityService)],g),e.StorageMainService=g,e.IApplicationStorageMainService=(0,f.createDecorator)("applicationStorageMainService");let h=class extends P.AbstractStorageService{constructor(m,d){super(),this.userDataProfilesService=m,this.storageMainService=d,this.whenReady=this.storageMainService.applicationStorage.whenInit}doInitialize(){return this.storageMainService.applicationStorage.whenInit}getStorage(m){if(m===-1)return this.storageMainService.applicationStorage.storage}getLogDetails(m){if(m===-1)return this.userDataProfilesService.defaultProfile.globalStorageHome.fsPath}shouldFlushWhenIdle(){return!1}switch(){throw new Error("Migrating storage is unsupported from main process")}switchToProfile(){throw new Error("Switching storage profile is unsupported from main process")}switchToWorkspace(){throw new Error("Switching storage workspace is unsupported from main process")}hasScope(){throw new Error("Main process is never profile or workspace scoped")}};h=we([te(0,u.IUserDataProfilesService),te(1,e.IStorageMainService)],h),e.ApplicationStorageMainService=h}),define(ee[260],ie([0,1,2,21,42]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataTransientProfilesHandler=void 0;let R=class extends E.Disposable{constructor(I,f){super(),this.userDataProfilesService=f,this._register(I.onWillLoadWindow(S=>{S.reason===2&&this.unsetTransientProfileForWorkspace(S.window.openedWorkspace??"empty-window")})),this._register(I.onBeforeCloseWindow(S=>this.unsetTransientProfileForWorkspace(S.openedWorkspace??"empty-window")))}async unsetTransientProfileForWorkspace(I){this.userDataProfilesService.getOrSetProfileForWorkspace(I).isTransient&&(this.userDataProfilesService.unsetWorkspace(I,!0),await this.userDataProfilesService.cleanUpTransientProfiles())}};R=we([te(0,t.ILifecycleMainService),te(1,k.IUserDataProfilesMainService)],R),e.UserDataTransientProfilesHandler=R}),define(ee[261],ie([0,1,3,2,91]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfileStorageChangesListenerChannel=void 0;class R extends t.Disposable{constructor(I,f,S){super(),this.storageMainService=I,this.userDataProfilesService=f,this.logService=S;const b=this._register(new t.MutableDisposable);this._onDidChange=this._register(new E.Emitter({onFirstListenerAdd:()=>b.value=this.registerStorageChangeListeners(),onLastListenerRemove:()=>b.value=void 0}))}registerStorageChangeListeners(){this.logService.debug("ProfileStorageChangesListenerChannel#registerStorageChangeListeners");const I=new t.DisposableStore;return I.add(E.Event.debounce(this.storageMainService.applicationStorage.onDidChangeStorage,(f,S)=>(f?f.push(S.key):f=[S.key],f),100)(f=>this.onDidChangeApplicationStorage(f))),I.add(E.Event.debounce(this.storageMainService.onDidChangeProfileStorage,(f,S)=>{f||(f=new Map);let b=f.get(S.profile.id);return b||f.set(S.profile.id,b={profile:S.profile,keys:[],storage:S.storage}),b.keys.push(S.key),f},100)(f=>this.onDidChangeProfileStorage(f))),I}onDidChangeApplicationStorage(I){const f=I.includes(k.TARGET_KEY)?[this.userDataProfilesService.defaultProfile]:[],S=[];if(I=I.filter(b=>b!==k.TARGET_KEY),I.length){const b=(0,k.loadKeyTargets)(this.storageMainService.applicationStorage.storage);S.push({profile:this.userDataProfilesService.defaultProfile,changes:I.map(P=>({key:P,scope:0,target:b[P]}))})}this.triggerEvents(f,S)}onDidChangeProfileStorage(I){const f=[],S=new Map;for(const[b,P]of I.entries()){P.keys.includes(k.TARGET_KEY)&&f.push(P.profile);const C=P.keys.filter(u=>u!==k.TARGET_KEY);if(C.length){const u=(0,k.loadKeyTargets)(P.storage.storage);S.set(b,{profile:P.profile,changes:C.map(p=>({key:p,scope:0,target:u[p]}))})}}this.triggerEvents(f,[...S.values()])}triggerEvents(I,f){(I.length||f.length)&&this._onDidChange.fire({valueChanges:f,targetChanges:I})}listen(I,f,S){switch(f){case"onDidChange":return this._onDidChange.event}throw new Error(`Event not found: ${f}`)}async call(I,f){throw new Error(`Call not found: ${f}`)}}e.ProfileStorageChangesListenerChannel=R}),define(ee[117],ie([0,1,18,7,28]),function(z,e,E,t,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findWindowOnExtensionDevelopmentPath=e.findWindowOnWorkspaceOrFolder=e.findWindowOnFile=void 0;async function R(f,S,b){for(const C of f){const u=C.openedWorkspace;if((0,k.isWorkspaceIdentifier)(u)){const p=await b(u);if(p){if(p.folders.some(w=>E.extUriBiasedIgnorePathCase.isEqualOrParent(S,w.uri)))return C}else if(E.extUriBiasedIgnorePathCase.isEqualOrParent(S,u.configPath))return C}}const P=f.filter(C=>(0,k.isSingleFolderWorkspaceIdentifier)(C.openedWorkspace)&&E.extUriBiasedIgnorePathCase.isEqualOrParent(S,C.openedWorkspace.uri));if(P.length)return P.sort((C,u)=>-(C.openedWorkspace.uri.path.length-u.openedWorkspace.uri.path.length))[0]}e.findWindowOnFile=R;function D(f,S){for(const b of f)if((0,k.isWorkspaceIdentifier)(b.openedWorkspace)&&E.extUriBiasedIgnorePathCase.isEqual(b.openedWorkspace.configPath,S)||(0,k.isSingleFolderWorkspaceIdentifier)(b.openedWorkspace)&&E.extUriBiasedIgnorePathCase.isEqual(b.openedWorkspace.uri,S))return b}e.findWindowOnWorkspaceOrFolder=D;function I(f,S){const b=P=>S.some(C=>E.extUriBiasedIgnorePathCase.isEqual(t.URI.file(C),t.URI.file(P)));for(const P of f)if(P.config?.extensionDevelopmentPath?.some(C=>b(C)))return P}e.findWindowOnExtensionDevelopmentPath=I}),define(ee[262],ie([0,1,13,2,4,18,7,19,21,6,37,31,116,28]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowsStateStoreData=e.restoreWindowsState=e.WindowsStateHandler=void 0;let p=class Tt extends t.Disposable{get state(){return this._state}constructor(d,l,n,s,i){super(),this.windowsMainService=d,this.stateMainService=l,this.lifecycleMainService=n,this.logService=s,this.configurationService=i,this._state=w(this.stateMainService.getItem(Tt.windowsStateStorageKey)),this.lastClosedState=void 0,this.shuttingDown=!1,this.registerListeners()}registerListeners(){E.app.on("browser-window-blur",()=>{this.shuttingDown||this.saveWindowsState()}),this.lifecycleMainService.onBeforeCloseWindow(d=>this.onBeforeCloseWindow(d)),this.lifecycleMainService.onBeforeShutdown(()=>this.onBeforeShutdown()),this.windowsMainService.onDidChangeWindowsCount(d=>{d.newCount-d.oldCount>0&&(this.lastClosedState=void 0)}),this.windowsMainService.onDidDestroyWindow(d=>this.onBeforeCloseWindow(d))}onBeforeShutdown(){this.shuttingDown=!0,this.saveWindowsState()}saveWindowsState(){const d=new Set,l={openedWindows:[],lastPluginDevelopmentHostWindow:this._state.lastPluginDevelopmentHostWindow,lastActiveWindow:this.lastClosedState};if(!l.lastActiveWindow){let i=this.windowsMainService.getLastActiveWindow();(!i||i.isExtensionDevelopmentHost)&&(i=this.windowsMainService.getWindows().find(o=>!o.isExtensionDevelopmentHost)),i&&(l.lastActiveWindow=this.toWindowState(i),l.lastActiveWindow.uiState.mode===3&&d.add(l.lastActiveWindow.uiState.display))}const n=this.windowsMainService.getWindows().find(i=>i.isExtensionDevelopmentHost&&!i.isExtensionTestHost);n&&(l.lastPluginDevelopmentHostWindow=this.toWindowState(n),l.lastPluginDevelopmentHostWindow.uiState.mode===3&&(d.has(l.lastPluginDevelopmentHostWindow.uiState.display)?k.isMacintosh&&!n.win?.isSimpleFullScreen()&&(l.lastPluginDevelopmentHostWindow.uiState.mode=1):d.add(l.lastPluginDevelopmentHostWindow.uiState.display))),this.windowsMainService.getWindowCount()>1&&(l.openedWindows=this.windowsMainService.getWindows().filter(i=>!i.isExtensionDevelopmentHost).map(i=>{const o=this.toWindowState(i);return o.uiState.mode===3&&(d.has(o.uiState.display)?k.isMacintosh&&o.windowId!==l.lastActiveWindow?.windowId&&!i.win?.isSimpleFullScreen()&&(o.uiState.mode=1):d.add(o.uiState.display)),o}));const s=h(l);this.stateMainService.setItem(Tt.windowsStateStorageKey,s),this.shuttingDown&&this.logService.trace("[WindowsStateHandler] onBeforeShutdown",s)}onBeforeCloseWindow(d){if(this.lifecycleMainService.quitRequested)return;const l=this.toWindowState(d);d.isExtensionDevelopmentHost&&!d.isExtensionTestHost?this._state.lastPluginDevelopmentHostWindow=l:!d.isExtensionDevelopmentHost&&d.openedWorkspace&&this._state.openedWindows.forEach(n=>{const s=(0,u.isWorkspaceIdentifier)(d.openedWorkspace)&&n.workspace?.id===d.openedWorkspace.id,i=(0,u.isSingleFolderWorkspaceIdentifier)(d.openedWorkspace)&&n.folderUri&&R.extUriBiasedIgnorePathCase.isEqual(n.folderUri,d.openedWorkspace.uri);(s||i)&&(n.uiState=l.uiState)}),this.windowsMainService.getWindowCount()===1&&(this.lastClosedState=l)}toWindowState(d){return{windowId:d.id,workspace:(0,u.isWorkspaceIdentifier)(d.openedWorkspace)?d.openedWorkspace:void 0,folderUri:(0,u.isSingleFolderWorkspaceIdentifier)(d.openedWorkspace)?d.openedWorkspace.uri:void 0,backupPath:d.backupPath,remoteAuthority:d.remoteAuthority,uiState:d.serializeWindowState()}}getNewWindowState(d){const l=this.doGetNewWindowState(d),n=this.configurationService.getValue("window");if(l.mode===3){let s;l.hasDefaultState?s=!!(n?.newWindowDimensions&&["fullscreen","inherit","offset"].indexOf(n.newWindowDimensions)>=0):s=!!(this.lifecycleMainService.wasRestarted||n?.restoreFullscreen),s||(l.mode=1)}return l}doGetNewWindowState(d){const l=this.windowsMainService.getLastActiveWindow();if(!d.extensionTestsPath){if(!!d.extensionDevelopmentPath&&this.state.lastPluginDevelopmentHostWindow)return this.state.lastPluginDevelopmentHostWindow.uiState;const c=d.workspace;if((0,u.isWorkspaceIdentifier)(c)){const y=this.state.openedWindows.filter(M=>M.workspace&&M.workspace.id===c.id).map(M=>M.uiState);if(y.length)return y[0]}if((0,u.isSingleFolderWorkspaceIdentifier)(c)){const y=this.state.openedWindows.filter(M=>M.folderUri&&R.extUriBiasedIgnorePathCase.isEqual(M.folderUri,c.uri)).map(M=>M.uiState);if(y.length)return y[0]}else if(d.backupPath){const y=this.state.openedWindows.filter(M=>M.backupPath===d.backupPath).map(M=>M.uiState);if(y.length)return y[0]}const a=this.lastClosedState||this.state.lastActiveWindow;if(!l&&a)return a.uiState}let n;const s=E.screen.getAllDisplays();if(s.length===1)n=s[0];else{if(k.isMacintosh){const c=E.screen.getCursorScreenPoint();n=E.screen.getDisplayNearestPoint(c)}!n&&l&&(n=E.screen.getDisplayMatching(l.getBounds())),n||(n=E.screen.getPrimaryDisplay()||s[0])}let i=(0,C.defaultWindowState)();i.x=Math.round(n.bounds.x+n.bounds.width/2-i.width/2),i.y=Math.round(n.bounds.y+n.bounds.height/2-i.height/2);const o=this.configurationService.getValue("window");let r=!0;if(o?.newWindowDimensions){if(o.newWindowDimensions==="maximized")i.mode=0,r=!1;else if(o.newWindowDimensions==="fullscreen")i.mode=3,r=!1;else if((o.newWindowDimensions==="inherit"||o.newWindowDimensions==="offset")&&l){const c=l.serializeWindowState();c.mode===3?i.mode=3:i=c,r=i.mode!==3&&o.newWindowDimensions==="offset"}}return r&&(i=this.ensureNoOverlap(i)),i.hasDefaultState=!0,i}ensureNoOverlap(d){if(this.windowsMainService.getWindows().length===0)return d;d.x=typeof d.x=="number"?d.x:0,d.y=typeof d.y=="number"?d.y:0;const l=this.windowsMainService.getWindows().map(n=>n.getBounds());for(;l.some(n=>n.x===d.x||n.y===d.y);)d.x+=30,d.y+=30;return d}};p.windowsStateStorageKey="windowsState",p=we([te(0,P.IWindowsMainService),te(1,b.IStateMainService),te(2,f.ILifecycleMainService),te(3,S.ILogService),te(4,I.IConfigurationService)],p),e.WindowsStateHandler=p;function w(m){const d={openedWindows:[]},l=m||{openedWindows:[]};return l.lastActiveWindow&&(d.lastActiveWindow=g(l.lastActiveWindow)),l.lastPluginDevelopmentHostWindow&&(d.lastPluginDevelopmentHostWindow=g(l.lastPluginDevelopmentHostWindow)),Array.isArray(l.openedWindows)&&(d.openedWindows=l.openedWindows.map(n=>g(n))),d}e.restoreWindowsState=w;function g(m){const d={uiState:m.uiState};return m.backupPath&&(d.backupPath=m.backupPath),m.remoteAuthority&&(d.remoteAuthority=m.remoteAuthority),m.folder&&(d.folderUri=D.URI.parse(m.folder)),m.workspaceIdentifier&&(d.workspace={id:m.workspaceIdentifier.id,configPath:D.URI.parse(m.workspaceIdentifier.configURIPath)}),d}function h(m){return{lastActiveWindow:m.lastActiveWindow&&v(m.lastActiveWindow),lastPluginDevelopmentHostWindow:m.lastPluginDevelopmentHostWindow&&v(m.lastPluginDevelopmentHostWindow),openedWindows:m.openedWindows.map(d=>v(d))}}e.getWindowsStateStoreData=h;function v(m){return{workspaceIdentifier:m.workspace&&{id:m.workspace.id,configURIPath:m.workspace.configPath.toString()},folder:m.folderUri&&m.folderUri.toString(),backupPath:m.backupPath,remoteAuthority:m.remoteAuthority,uiState:m.uiState}}}),define(ee[93],ie([0,1,30,43,123,33,14,9,4,18,7,5,63,28]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=e.rewriteWorkspaceFileForNewLocation=e.toWorkspaceFolders=e.getStoredWorkspaceFolder=e.isStoredWorkspaceFolder=e.isRecentFile=e.isRecentFolder=e.isRecentWorkspace=e.IWorkspacesService=void 0,e.IWorkspacesService=(0,P.createDecorator)("workspacesService");function p(M){return M.hasOwnProperty("workspace")}e.isRecentWorkspace=p;function w(M){return M.hasOwnProperty("folderUri")}e.isRecentFolder=w;function g(M){return M.hasOwnProperty("fileUri")}e.isRecentFile=g;function h(M){return v(M)||m(M)}e.isStoredWorkspaceFolder=h;function v(M){const T=M;return typeof T?.path=="string"&&(!T.name||typeof T.name=="string")}function m(M){const T=M;return typeof T?.uri=="string"&&(!T.name||typeof T.name=="string")}function d(M,T,_,Y,G){if(M.scheme!==Y.scheme)return{name:_,uri:M.toString(!0)};let V=T?void 0:G.relativePath(Y,M);if(V!==void 0)V.length===0?V=".":f.isWindows&&(V=l(V));else if(M.scheme===D.Schemas.file)V=M.fsPath,f.isWindows&&(V=l(V));else if(G.isEqualAuthority(M.authority,Y.authority))V=M.path;else return{name:_,uri:M.toString(!0)};return{name:_,path:V}}e.getStoredWorkspaceFolder=d;function l(M){return M=(0,R.normalizeDriveLetter)(M),(0,E.isUNC)(M)||(M=(0,E.toSlashes)(M)),M}function n(M,T,_){const Y=[],G=new Set,V=_.dirname(T);for(const oe of M){let se;if(v(oe))oe.path&&(se=_.resolvePath(V,oe.path));else if(m(oe))try{se=b.URI.parse(oe.uri),se.path[0]!==I.posix.sep&&(se=se.with({path:I.posix.sep+se.path}))}catch(ae){console.warn(ae)}if(se){const ae=_.getComparisonKey(se);if(!G.has(ae)){G.add(ae);const fe=oe.name||_.basenameOrAuthority(se);Y.push(new u.WorkspaceFolder({uri:se,name:fe,index:Y.length},oe))}}}return Y}e.toWorkspaceFolders=n;function s(M,T,_,Y,G){const V=i(T,M),oe=G.dirname(T),se=G.dirname(Y),ae=[];for(const F of V.folders){const A=v(F)?G.resolvePath(oe,F.path):b.URI.parse(F.uri);let O;_?O=!1:O=!v(F)||(0,I.isAbsolute)(F.path),ae.push(d(A,O,F.name,se,G))}const fe={insertSpaces:!1,tabSize:4,eol:f.isLinux||f.isMacintosh?` `:`\r `},K=k.setProperty(M,["folders"],ae,fe);let q=k.applyEdits(M,K);return(0,S.isEqualAuthority)(V.remoteAuthority,(0,C.getRemoteAuthority)(Y))&&(q=k.applyEdits(q,k.removeProperty(q,["remoteAuthority"],fe))),q}e.rewriteWorkspaceFileForNewLocation=s;function i(M,T){const _=t.parse(T);if(_&&Array.isArray(_.folders))_.folders=_.folders.filter(Y=>h(Y));else throw new Error(`${M} looks like an invalid workspace file.`);return _}function o(M){return M.workspace&&typeof M.workspace=="object"&&typeof M.workspace.id=="string"&&typeof M.workspace.configPath=="string"}function r(M){return typeof M.folderUri=="string"}function c(M){return typeof M.fileUri=="string"}function a(M,T){const _={workspaces:[],files:[]};if(M){const Y=function(V,oe){for(let se=0;se{const oe=V.label,se=V.remoteAuthority;o(V)?_.workspaces.push({label:oe,remoteAuthority:se,workspace:{id:V.workspace.id,configPath:b.URI.parse(V.workspace.configPath)}}):r(V)?_.workspaces.push({label:oe,remoteAuthority:se,folderUri:b.URI.parse(V.folderUri)}):c(V)&&_.files.push({label:oe,remoteAuthority:se,fileUri:b.URI.parse(V.fileUri)})})}return _}e.restoreRecentlyOpened=a;function y(M){const T={entries:[]};for(const _ of M.workspaces)w(_)?T.entries.push({folderUri:_.folderUri.toString(),label:_.label,remoteAuthority:_.remoteAuthority}):T.entries.push({workspace:{id:_.workspace.id,configPath:_.workspace.configPath.toString()},label:_.label,remoteAuthority:_.remoteAuthority});for(const _ of M.files)T.entries.push({fileUri:_.fileUri.toString(),label:_.label,remoteAuthority:_.remoteAuthority});return T}e.toStoreData=y}),define(ee[94],ie([0,1,78,14,4,18]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEmptyWorkspaceIdentifier=e.getSingleFolderWorkspaceIdentifier=e.getWorkspaceIdentifier=e.NON_EMPTY_WORKSPACE_ID_LENGTH=void 0,e.NON_EMPTY_WORKSPACE_ID_LENGTH=128/4;function D(S){function b(){let P=S.scheme===t.Schemas.file?(0,R.originalFSPath)(S):S.toString();return k.isLinux||(P=P.toLowerCase()),(0,E.createHash)("md5").update(P).digest("hex")}return{id:b(),configPath:S}}e.getWorkspaceIdentifier=D;function I(S,b){function P(){if(S.scheme!==t.Schemas.file)return(0,E.createHash)("md5").update(S.toString()).digest("hex");if(!b)return;let u;return k.isLinux?u=b.ino:k.isMacintosh?u=b.birthtime.getTime():k.isWindows&&(typeof b.birthtimeMs=="number"?u=Math.floor(b.birthtimeMs):u=b.birthtime.getTime()),(0,E.createHash)("md5").update(S.fsPath).update(u?String(u):"").digest("hex")}const C=P();if(typeof C=="string")return{id:C,uri:S}}e.getSingleFolderWorkspaceIdentifier=I;function f(){return{id:(Date.now()+Math.round(Math.random()*1e3)).toString()}}e.createEmptyWorkspaceIdentifier=f}),define(ee[263],ie([0,1,78,30,14,9,4,18,23,176,19,26,37,15,6,175,28,94]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackupMainService=void 0;let v=class Ot{constructor(d,l,n,s){this.environmentMainService=d,this.configurationService=l,this.logService=n,this.stateMainService=s,this.backupHome=this.environmentMainService.backupHome,this.workspaces=[],this.folders=[],this.emptyWindows=[],this.backupUriComparer=I.extUriBiasedIgnorePathCase,this.backupPathComparer={isEqual:(i,o)=>(0,t.isEqual)(i,o,!D.isLinux)}}async initialize(){const d=await this.initializeAndMigrateBackupWorkspacesMetadata();this.emptyWindows=await this.validateEmptyWorkspaces(d.emptyWindows),this.workspaces=await this.validateWorkspaces((0,S.deserializeWorkspaceInfos)(d)),this.folders=await this.validateFolders((0,S.deserializeFolderInfos)(d)),this.storeWorkspacesMetadata()}async initializeAndMigrateBackupWorkspacesMetadata(){let d=this.stateMainService.getItem(Ot.backupWorkspacesMetadataStorageKey);if(!d)try{const l=(0,R.join)(this.backupHome,"workspaces.json"),n=await f.Promises.readFile(l,"utf8");try{await f.Promises.unlink(l)}catch{}const s=JSON.parse(n);d={workspaces:Array.isArray(s.rootURIWorkspaces)?s.rootURIWorkspaces:[],folders:Array.isArray(s.folderWorkspaceInfos)?s.folderWorkspaceInfos:[],emptyWindows:Array.isArray(s.emptyWorkspaceInfos)?s.emptyWorkspaceInfos:[]}}catch(l){l.code!=="ENOENT"&&this.logService.error(`Backup: Could not migrate legacy backup workspaces metadata: ${l.toString()}`)}return d??{workspaces:[],folders:[],emptyWindows:[]}}getWorkspaceBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.workspaces.slice(0)}getFolderBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.folders.slice(0)}isHotExitEnabled(){return this.getHotExitConfig()!==u.HotExitConfiguration.OFF}isHotExitOnExitAndWindowClose(){return this.getHotExitConfig()===u.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE}getHotExitConfig(){return this.configurationService.getValue()?.files?.hotExit||u.HotExitConfiguration.ON_EXIT}getEmptyWindowBackups(){return this.emptyWindows.slice(0)}registerWorkspaceBackup(d,l){this.workspaces.some(s=>d.workspace.id===s.workspace.id)||(this.workspaces.push(d),this.storeWorkspacesMetadata());const n=(0,R.join)(this.backupHome,d.workspace.id);return l?this.moveBackupFolder(n,l).then(()=>n):n}async moveBackupFolder(d,l){if(await f.Promises.exists(d)&&await this.convertToEmptyWindowBackup(d),await f.Promises.exists(l))try{await f.Promises.rename(l,d)}catch(n){this.logService.error(`Backup: Could not move backup folder to new location: ${n.toString()}`)}}registerFolderBackup(d){return this.folders.some(l=>this.backupUriComparer.isEqual(d.folderUri,l.folderUri))||(this.folders.push(d),this.storeWorkspacesMetadata()),(0,R.join)(this.backupHome,this.getFolderHash(d))}registerEmptyWindowBackup(d){return this.emptyWindows.some(l=>!!l.backupFolder&&this.backupPathComparer.isEqual(l.backupFolder,d.backupFolder))||(this.emptyWindows.push(d),this.storeWorkspacesMetadata()),(0,R.join)(this.backupHome,d.backupFolder)}async validateWorkspaces(d){if(!Array.isArray(d))return[];const l=new Set,n=[];for(const s of d){const i=s.workspace;if(!(0,g.isWorkspaceIdentifier)(i))return[];if(!l.has(i.id)){l.add(i.id);const o=(0,R.join)(this.backupHome,i.id);await this.doHasBackups(o)?i.configPath.scheme!==k.Schemas.file||await f.Promises.exists(i.configPath.fsPath)?n.push(s):await this.convertToEmptyWindowBackup(o):await this.deleteStaleBackup(o)}}return n}async validateFolders(d){if(!Array.isArray(d))return[];const l=[],n=new Set;for(const s of d){const i=s.folderUri,o=this.backupUriComparer.getComparisonKey(i);if(!n.has(o)){n.add(o);const r=(0,R.join)(this.backupHome,this.getFolderHash(s));await this.doHasBackups(r)?i.scheme!==k.Schemas.file||await f.Promises.exists(i.fsPath)?l.push(s):await this.convertToEmptyWindowBackup(r):await this.deleteStaleBackup(r)}}return l}async validateEmptyWorkspaces(d){if(!Array.isArray(d))return[];const l=[],n=new Set;for(const s of d){const i=s.backupFolder;if(typeof i!="string")return[];if(!n.has(i)){n.add(i);const o=(0,R.join)(this.backupHome,i);await this.doHasBackups(o)?l.push(s):await this.deleteStaleBackup(o)}}return l}async deleteStaleBackup(d){try{await f.Promises.rm(d,f.RimRafMode.MOVE)}catch(l){this.logService.error(`Backup: Could not delete stale backup: ${l.toString()}`)}}prepareNewEmptyWindowBackup(){let d=(0,h.createEmptyWorkspaceIdentifier)();for(;this.emptyWindows.some(l=>!!l.backupFolder&&this.backupPathComparer.isEqual(l.backupFolder,d.id));)d=(0,h.createEmptyWorkspaceIdentifier)();return{backupFolder:d.id}}async convertToEmptyWindowBackup(d){const l=this.prepareNewEmptyWindowBackup(),n=(0,R.join)(this.backupHome,l.backupFolder);try{await f.Promises.rename(d,n)}catch(s){return this.logService.error(`Backup: Could not rename backup folder: ${s.toString()}`),!1}return this.emptyWindows.push(l),!0}async getDirtyWorkspaces(){const d=[];for(const l of this.workspaces)await this.hasBackups(l)&&d.push(l);for(const l of this.folders)await this.hasBackups(l)&&d.push(l);return d}hasBackups(d){let l;return(0,S.isEmptyWindowBackupInfo)(d)?l=(0,R.join)(this.backupHome,d.backupFolder):(0,w.isFolderBackupInfo)(d)?l=(0,R.join)(this.backupHome,this.getFolderHash(d)):l=(0,R.join)(this.backupHome,d.workspace.id),this.doHasBackups(l)}async doHasBackups(d){try{const l=await f.Promises.readdir(d);for(const n of l)try{if((await f.Promises.readdir((0,R.join)(d,n))).length>0)return!0}catch{}}catch{}return!1}storeWorkspacesMetadata(){const d={workspaces:this.workspaces.map(({workspace:l,remoteAuthority:n})=>{const s={id:l.id,configURIPath:l.configPath.toString()};return n&&(s.remoteAuthority=n),s}),folders:this.folders.map(({folderUri:l,remoteAuthority:n})=>{const s={folderUri:l.toString()};return n&&(s.remoteAuthority=n),s}),emptyWindows:this.emptyWindows.map(({backupFolder:l,remoteAuthority:n})=>{const s={backupFolder:l};return n&&(s.remoteAuthority=n),s})};this.stateMainService.setItem(Ot.backupWorkspacesMetadataStorageKey,d)}getFolderHash(d){const l=d.folderUri;let n;return l.scheme===k.Schemas.file?n=D.isLinux?l.fsPath:l.fsPath.toLowerCase():n=l.toString().toLowerCase(),(0,E.createHash)("md5").update(n).digest("hex")}};v.backupWorkspacesMetadataStorageKey="backupWorkspaces",v=we([te(0,P.IEnvironmentMainService),te(1,b.IConfigurationService),te(2,p.ILogService),te(3,C.IStateMainService)],v),e.BackupMainService=v}),define(ee[52],ie([0,1,13,3,43,33,2,14,9,18,12,23,174,60,56,26,5,6,20,42,117,28,93,94]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesManagementMainService=e.IWorkspacesManagementMainService=void 0,e.IWorkspacesManagementMainService=(0,g.createDecorator)("workspacesManagementMainService");let i=class extends D.Disposable{constructor(r,c,a,y,M,T){super(),this.environmentMainService=r,this.logService=c,this.userDataProfilesMainService=a,this.backupMainService=y,this.dialogMainService=M,this.productService=T,this._onDidDeleteUntitledWorkspace=this._register(new t.Emitter),this.onDidDeleteUntitledWorkspace=this._onDidDeleteUntitledWorkspace.event,this._onDidEnterWorkspace=this._register(new t.Emitter),this.onDidEnterWorkspace=this._onDidEnterWorkspace.event,this.untitledWorkspacesHome=this.environmentMainService.untitledWorkspacesHome,this.untitledWorkspaces=[]}async initialize(){this.untitledWorkspaces=[];try{const r=(await P.Promises.readdir(this.untitledWorkspacesHome.fsPath)).map(c=>(0,S.joinPath)(this.untitledWorkspacesHome,c,l.UNTITLED_WORKSPACE_NAME));for(const c of r){const a=(0,s.getWorkspaceIdentifier)(c),y=await this.resolveLocalWorkspace(c);y?this.untitledWorkspaces.push({workspace:a,remoteAuthority:y.remoteAuthority}):await this.deleteUntitledWorkspace(a)}}catch(r){r.code!=="ENOENT"&&this.logService.warn(`Unable to read folders in ${this.untitledWorkspacesHome} (${r}).`)}}resolveLocalWorkspace(r){return this.doResolveLocalWorkspace(r,c=>P.Promises.readFile(c,"utf8"))}doResolveLocalWorkspace(r,c){if(!!this.isWorkspacePath(r)&&r.scheme===I.Schemas.file)try{const a=c(r.fsPath);return a instanceof Promise?a.then(y=>this.doResolveWorkspace(r,y),y=>{}):this.doResolveWorkspace(r,a)}catch{return}}isWorkspacePath(r){return(0,l.isUntitledWorkspace)(r,this.environmentMainService)||(0,l.hasWorkspaceFileExtension)(r)}doResolveWorkspace(r,c){try{const a=this.doParseStoredWorkspace(r,c),y=(0,s.getWorkspaceIdentifier)(r);return{id:y.id,configPath:y.configPath,folders:(0,n.toWorkspaceFolders)(a.folders,y.configPath,S.extUriBiasedIgnorePathCase),remoteAuthority:a.remoteAuthority,transient:a.transient}}catch(a){this.logService.warn(a.toString())}}doParseStoredWorkspace(r,c){const a=(0,k.parse)(c);if(a&&Array.isArray(a.folders))a.folders=a.folders.filter(y=>(0,n.isStoredWorkspaceFolder)(y));else throw new Error(`${r.toString(!0)} looks like an invalid workspace file.`);return a}async createUntitledWorkspace(r,c){const{workspace:a,storedWorkspace:y}=this.newUntitledWorkspace(r,c),M=a.configPath.fsPath;return await P.Promises.mkdir((0,f.dirname)(M),{recursive:!0}),await P.Promises.writeFile(M,JSON.stringify(y,null," ")),this.untitledWorkspaces.push({workspace:a,remoteAuthority:c}),a}newUntitledWorkspace(r=[],c){const a=(Date.now()+Math.round(Math.random()*1e3)).toString(),y=(0,S.joinPath)(this.untitledWorkspacesHome,a),M=(0,S.joinPath)(y,l.UNTITLED_WORKSPACE_NAME),T=[];for(const _ of r)T.push((0,n.getStoredWorkspaceFolder)(_.uri,!0,_.name,y,S.extUriBiasedIgnorePathCase));return{workspace:(0,s.getWorkspaceIdentifier)(M),storedWorkspace:{folders:T,remoteAuthority:c}}}async getWorkspaceIdentifier(r){return(0,s.getWorkspaceIdentifier)(r)}isUntitledWorkspace(r){return(0,l.isUntitledWorkspace)(r.configPath,this.environmentMainService)}async deleteUntitledWorkspace(r){!this.isUntitledWorkspace(r)||(await this.doDeleteUntitledWorkspace(r),this.userDataProfilesMainService.isEnabled()&&this.userDataProfilesMainService.unsetWorkspace(r),this._onDidDeleteUntitledWorkspace.fire(r))}async doDeleteUntitledWorkspace(r){const c=(0,S.originalFSPath)(r.configPath);try{await P.Promises.rm((0,f.dirname)(c));const a=(0,f.join)(this.environmentMainService.workspaceStorageHome.fsPath,r.id);await P.Promises.exists(a)&&await P.Promises.writeFile((0,f.join)(a,"obsolete"),""),this.untitledWorkspaces=this.untitledWorkspaces.filter(y=>y.workspace.id!==r.id)}catch(a){this.logService.warn(`Unable to delete untitled workspace ${c} (${a}).`)}}getUntitledWorkspaces(){return this.untitledWorkspaces}async enterWorkspace(r,c,a){if(!r||!r.win||!r.isReady||!await this.isValidTargetWorkspacePath(r,c,a))return;const M=await this.doEnterWorkspace(r,(0,s.getWorkspaceIdentifier)(a));if(!!M)return this._onDidEnterWorkspace.fire({window:r,workspace:M.workspace}),M}async isValidTargetWorkspacePath(r,c,a){if(!a)return!0;if((0,l.isWorkspaceIdentifier)(r.openedWorkspace)&&S.extUriBiasedIgnorePathCase.isEqual(r.openedWorkspace.configPath,a))return!1;if((0,d.findWindowOnWorkspaceOrFolder)(c,a)){const y={title:this.productService.nameLong,type:"info",buttons:[(0,R.mnemonicButtonLabel)((0,C.localize)(0,null))],message:(0,C.localize)(1,null,(0,S.basename)(a)),detail:(0,C.localize)(2,null),noLink:!0,defaultId:0};return await this.dialogMainService.showMessageBox(y,(0,b.withNullAsUndefined)(E.BrowserWindow.getFocusedWindow())),!1}return!0}async doEnterWorkspace(r,c){if(!r.config)return;r.focus();let a;return r.config.extensionDevelopmentPath||(r.config.backupPath?a=await this.backupMainService.registerWorkspaceBackup({workspace:c,remoteAuthority:r.remoteAuthority},r.config.backupPath):a=this.backupMainService.registerWorkspaceBackup({workspace:c,remoteAuthority:r.remoteAuthority})),(0,l.isWorkspaceIdentifier)(r.openedWorkspace)&&this.isUntitledWorkspace(r.openedWorkspace)&&await this.deleteUntitledWorkspace(r.openedWorkspace),r.config.workspace=c,r.config.backupPath=a,{workspace:c,backupPath:a}}};i=we([te(0,w.IEnvironmentMainService),te(1,h.ILogService),te(2,m.IUserDataProfilesMainService),te(3,u.IBackupMainService),te(4,p.IDialogMainService),te(5,v.IProductService)],i),e.WorkspacesManagementMainService=i}),define(ee[118],ie([0,1,13,41,22,5,31,28,52,12,6]),function(z,e,E,t,k,R,D,I,f,S,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsMainService=e.IDiagnosticsMainService=e.ID=void 0,e.ID="diagnosticsMainService",e.IDiagnosticsMainService=(0,R.createDecorator)(e.ID);let P=class{constructor(u,p,w){this.windowsMainService=u,this.workspacesManagementMainService=p,this.logService=w}async getRemoteDiagnostics(u){const p=this.windowsMainService.getWindows();return(await Promise.all(p.map(async g=>{const h=g.remoteAuthority;if(!h)return;const v=`vscode:getDiagnosticInfoResponse${g.id}`,m={includeProcesses:u.includeProcesses,folders:u.includeWorkspaceMetadata?await this.getFolderURIs(g):void 0};return new Promise(d=>{g.sendWhenReady("vscode:getDiagnosticInfo",k.CancellationToken.None,{replyChannel:v,args:m}),t.validatedIpcMain.once(v,(l,n)=>{n||d({hostName:h,errorMessage:`Unable to resolve connection to '${h}'.`}),d(n)}),setTimeout(()=>{d({hostName:h,errorMessage:`Connection to '${h}' could not be established`})},5e3)})}))).filter(g=>!!g)}async getMainDiagnostics(){this.logService.trace("Received request for main process info from other instance.");const u=[];for(const p of E.BrowserWindow.getAllWindows()){const w=this.windowsMainService.getWindowById(p.id);w?u.push(await this.codeWindowToInfo(w)):u.push(this.browserWindowToInfo(p))}return{mainPID:process.pid,mainArguments:process.argv.slice(1),windows:u,screenReader:!!E.app.accessibilitySupportEnabled,gpuFeatureStatus:E.app.getGPUFeatureStatus()}}async codeWindowToInfo(u){const p=await this.getFolderURIs(u),w=(0,S.assertIsDefined)(u.win);return this.browserWindowToInfo(w,p,u.remoteAuthority)}browserWindowToInfo(u,p=[],w){return{pid:u.webContents.getOSProcessId(),title:u.getTitle(),folderURIs:p,remoteAuthority:w}}async getFolderURIs(u){const p=[],w=u.openedWorkspace;if((0,I.isSingleFolderWorkspaceIdentifier)(w))p.push(w.uri);else if((0,I.isWorkspaceIdentifier)(w)){const g=await this.workspacesManagementMainService.resolveLocalWorkspace(w.configPath);g&&g.folders.forEach(v=>{p.push(v.uri)})}return p}};P=we([te(0,D.IWindowsMainService),te(1,f.IWorkspacesManagementMainService),te(2,b.ILogService)],P),e.DiagnosticsMainService=P}),define(ee[65],ie([0,1,45,13,27,140,53,3,33,2,14,9,4,7,100,82,23,96,164,56,26,5,21,6,20,64,31,28,52,17,221,214]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostMainService=e.INativeHostMainService=void 0,e.INativeHostMainService=(0,l.createDecorator)("nativeHostMainService");let _=class extends S.Disposable{constructor(G,V,oe,se,ae,fe,K,q,F){super(),this.sharedProcess=G,this.windowsMainService=V,this.dialogMainService=oe,this.lifecycleMainService=se,this.environmentMainService=ae,this.logService=fe,this.productService=K,this.themeMainService=q,this.workspacesManagementMainService=F,this.onDidOpenWindow=I.Event.map(this.windowsMainService.onDidOpenWindow,A=>A.id),this.onDidTriggerSystemContextMenu=I.Event.filter(I.Event.map(this.windowsMainService.onDidTriggerSystemContextMenu,({window:A,x:O,y:U})=>({windowId:A.id,x:O,y:U})),({windowId:A})=>!!this.windowsMainService.getWindowById(A)),this.onDidMaximizeWindow=I.Event.filter(I.Event.fromNodeEventEmitter(t.app,"browser-window-maximize",(A,O)=>O.id),A=>!!this.windowsMainService.getWindowById(A)),this.onDidUnmaximizeWindow=I.Event.filter(I.Event.fromNodeEventEmitter(t.app,"browser-window-unmaximize",(A,O)=>O.id),A=>!!this.windowsMainService.getWindowById(A)),this.onDidBlurWindow=I.Event.filter(I.Event.fromNodeEventEmitter(t.app,"browser-window-blur",(A,O)=>O.id),A=>!!this.windowsMainService.getWindowById(A)),this.onDidFocusWindow=I.Event.any(I.Event.map(I.Event.filter(I.Event.map(this.windowsMainService.onDidChangeWindowsCount,()=>this.windowsMainService.getLastActiveWindow()),A=>!!A),A=>A.id),I.Event.filter(I.Event.fromNodeEventEmitter(t.app,"browser-window-focus",(A,O)=>O.id),A=>!!this.windowsMainService.getWindowById(A))),this.onDidResumeOS=I.Event.fromNodeEventEmitter(t.powerMonitor,"resume"),this.onDidChangeColorScheme=this.themeMainService.onDidChangeColorScheme,this._onDidChangePassword=this._register(new I.Emitter),this.onDidChangePassword=this._onDidChangePassword.event,this.onDidChangeDisplay=I.Event.debounce(I.Event.any(I.Event.filter(I.Event.fromNodeEventEmitter(t.screen,"display-metrics-changed",(A,O,U)=>U),A=>!(Array.isArray(A)&&A.length===1&&A[0]==="workArea")),I.Event.fromNodeEventEmitter(t.screen,"display-added"),I.Event.fromNodeEventEmitter(t.screen,"display-removed")),()=>{},100)}get windowId(){throw new Error("Not implemented in electron-main")}async getWindows(){return this.windowsMainService.getWindows().map(V=>({id:V.id,workspace:V.openedWorkspace??(0,c.toWorkspaceIdentifier)(V.backupPath,V.isExtensionDevelopmentHost),title:V.win?.getTitle()??"",filename:V.getRepresentedFilename(),dirty:V.isDocumentEdited()}))}async getWindowCount(G){return this.windowsMainService.getWindowCount()}async getActiveWindowId(G){const V=t.BrowserWindow.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(V)return V.id}openWindow(G,V,oe){return Array.isArray(V)?this.doOpenWindow(G,V,oe):this.doOpenEmptyWindow(G,V)}async doOpenWindow(G,V,oe=Object.create(null)){V.length>0&&await this.windowsMainService.open({context:5,contextWindowId:G,urisToOpen:V,cli:this.environmentMainService.args,forceNewWindow:oe.forceNewWindow,forceReuseWindow:oe.forceReuseWindow,preferNewWindow:oe.preferNewWindow,diffMode:oe.diffMode,mergeMode:oe.mergeMode,addMode:oe.addMode,gotoLineMode:oe.gotoLineMode,noRecentEntry:oe.noRecentEntry,waitMarkerFileURI:oe.waitMarkerFileURI,remoteAuthority:oe.remoteAuthority||void 0})}async doOpenEmptyWindow(G,V){await this.windowsMainService.openEmptyWindow({context:5,contextWindowId:G},V)}async toggleFullScreen(G){this.windowById(G)?.toggleFullScreen()}async handleTitleDoubleClick(G){this.windowById(G)?.handleTitleDoubleClick()}async isMaximized(G){const V=this.windowById(G);return V?.win?V.win.isMaximized():!1}async maximizeWindow(G){const V=this.windowById(G);V?.win&&V.win.maximize()}async unmaximizeWindow(G){const V=this.windowById(G);V?.win&&V.win.unmaximize()}async minimizeWindow(G){const V=this.windowById(G);V?.win&&V.win.minimize()}async updateWindowControls(G,V){const oe=this.windowById(G);oe&&oe.updateWindowControls(V)}async focusWindow(G,V){V&&typeof V.windowId=="number"&&(G=V.windowId),this.windowById(G)?.focus({force:V?.force??!1})}async setMinimumSize(G,V,oe){const se=this.windowById(G);if(se?.win){const[ae,fe]=se.win.getSize(),[K,q]=se.win.getMinimumSize(),[F,A]=[V??K,oe??q],[O,U]=[Math.max(ae,F),Math.max(fe,A)];(K!==F||q!==A)&&se.win.setMinimumSize(F,A),(ae!==O||fe!==U)&&se.win.setSize(O,U)}}async saveWindowSplash(G,V){this.themeMainService.saveWindowSplash(G,V)}async installShellCommand(G){const{source:V,target:oe}=await this.getShellCommandLink();try{const{symbolicLink:se}=await g.SymlinkSupport.stat(V);if(se&&!se.dangling){const ae=await(0,p.realpath)(V);if(oe===ae)return}await g.Promises.unlink(V)}catch(se){if(se.code!=="ENOENT")throw se}try{await g.Promises.symlink(oe,V)}catch(se){if(se.code!=="EACCES"&&se.code!=="ENOENT")throw se;const{response:ae}=await this.showMessageBox(G,{title:this.productService.nameLong,type:"info",message:(0,v.localize)(0,null,this.productService.nameShort),buttons:[(0,f.mnemonicButtonLabel)((0,v.localize)(1,null)),(0,f.mnemonicButtonLabel)((0,v.localize)(2,null))],noLink:!0,defaultId:0,cancelId:1});if(ae===0)try{const fe=`osascript -e "do shell script \\"mkdir -p /usr/local/bin && ln -sf '${oe}' '${V}'\\" with administrator privileges"`;await(0,R.promisify)(E.exec)(fe)}catch{throw new Error((0,v.localize)(3,null,V))}}}async uninstallShellCommand(G){const{source:V}=await this.getShellCommandLink();try{await g.Promises.unlink(V)}catch(oe){switch(oe.code){case"EACCES":{const{response:se}=await this.showMessageBox(G,{title:this.productService.nameLong,type:"info",message:(0,v.localize)(4,null,this.productService.nameShort),buttons:[(0,f.mnemonicButtonLabel)((0,v.localize)(5,null)),(0,f.mnemonicButtonLabel)((0,v.localize)(6,null))],noLink:!0,defaultId:0,cancelId:1});if(se===0)try{const ae=`osascript -e "do shell script \\"rm '${V}'\\" with administrator privileges"`;await(0,R.promisify)(E.exec)(ae)}catch{throw new Error((0,v.localize)(7,null,V))}break}case"ENOENT":break;default:throw oe}}}async getShellCommandLink(){const G=(0,P.resolve)(this.environmentMainService.appRoot,"bin","code"),V=`/usr/local/bin/${this.productService.applicationName}`;if(!await g.Promises.exists(G))throw new Error((0,v.localize)(8,null,G));return{source:V,target:G}}async showMessageBox(G,V){return this.dialogMainService.showMessageBox(V,this.toBrowserWindow(G))}async showSaveDialog(G,V){return this.dialogMainService.showSaveDialog(V,this.toBrowserWindow(G))}async showOpenDialog(G,V){return this.dialogMainService.showOpenDialog(V,this.toBrowserWindow(G))}toBrowserWindow(G){const V=this.windowById(G);if(V?.win)return V.win}async pickFileFolderAndOpen(G,V){const oe=await this.dialogMainService.pickFileFolder(V);oe&&await this.doOpenPicked(await Promise.all(oe.map(async se=>await g.SymlinkSupport.existsDirectory(se)?{folderUri:u.URI.file(se)}:{fileUri:u.URI.file(se)})),V,G)}async pickFolderAndOpen(G,V){const oe=await this.dialogMainService.pickFolder(V);oe&&await this.doOpenPicked(oe.map(se=>({folderUri:u.URI.file(se)})),V,G)}async pickFileAndOpen(G,V){const oe=await this.dialogMainService.pickFile(V);oe&&await this.doOpenPicked(oe.map(se=>({fileUri:u.URI.file(se)})),V,G)}async pickWorkspaceAndOpen(G,V){const oe=await this.dialogMainService.pickWorkspace(V);oe&&await this.doOpenPicked(oe.map(se=>({workspaceUri:u.URI.file(se)})),V,G)}async doOpenPicked(G,V,oe){await this.windowsMainService.open({context:3,contextWindowId:oe,cli:this.environmentMainService.args,urisToOpen:G,forceNewWindow:V.forceNewWindow})}async showItemInFolder(G,V){t.shell.showItemInFolder(V)}async setRepresentedFilename(G,V){this.windowById(G)?.setRepresentedFilename(V)}async setDocumentEdited(G,V){this.windowById(G)?.setDocumentEdited(V)}async openExternal(G,V){return C.isLinuxSnap?this.safeSnapOpenExternal(V):t.shell.openExternal(V),!0}safeSnapOpenExternal(G){const V=process.env.GDK_PIXBUF_MODULE_FILE,oe=process.env.GDK_PIXBUF_MODULEDIR;delete process.env.GDK_PIXBUF_MODULE_FILE,delete process.env.GDK_PIXBUF_MODULEDIR,t.shell.openExternal(G),process.env.GDK_PIXBUF_MODULE_FILE=V,process.env.GDK_PIXBUF_MODULEDIR=oe}moveItemToTrash(G,V){return t.shell.trashItem(V)}async isAdmin(){let G;return C.isWindows?G=(await new Promise((V,oe)=>{z(["native-is-elevated"],V,oe)}))():G=process.getuid()===0,G}async writeElevated(G,V,oe,se){const ae=await new Promise((fe,K)=>{z(["@vscode/sudo-prompt"],fe,K)});return new Promise((fe,K)=>{const q=[`"${this.cliPath}"`];se?.unlock&&q.push("--file-chmod"),q.push("--file-write",`"${V.fsPath}"`,`"${oe.fsPath}"`);const F={name:this.productService.nameLong.replace("-",""),icns:C.isMacintosh&&this.environmentMainService.isBuilt?(0,P.join)((0,P.dirname)(this.environmentMainService.appRoot),`${this.productService.nameShort}.icns`):void 0};ae.exec(q.join(" "),F,(A,O,U)=>{O&&this.logService.trace(`[sudo-prompt] received stdout: ${O}`),U&&this.logService.trace(`[sudo-prompt] received stderr: ${U}`),A?K(A):fe(void 0)})})}get cliPath(){return C.isWindows?this.environmentMainService.isBuilt?(0,P.join)((0,P.dirname)(process.execPath),"bin",`${this.productService.applicationName}.cmd`):(0,P.join)(this.environmentMainService.appRoot,"scripts","code-cli.bat"):C.isLinux?this.environmentMainService.isBuilt?(0,P.join)((0,P.dirname)(process.execPath),"bin",`${this.productService.applicationName}`):(0,P.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh"):this.environmentMainService.isBuilt?(0,P.join)(this.environmentMainService.appRoot,"bin","code"):(0,P.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh")}async getOSStatistics(){return{totalmem:(0,k.totalmem)(),freemem:(0,k.freemem)(),loadavg:(0,k.loadavg)()}}async getOSProperties(){return{arch:(0,k.arch)(),platform:(0,k.platform)(),release:(0,k.release)(),type:(0,k.type)(),cpus:(0,k.cpus)()}}async getOSVirtualMachineHint(){return w.virtualMachineHint.value()}async getOSColorScheme(){return this.themeMainService.getColorScheme()}async hasWSLFeatureInstalled(){return C.isWindows&&(0,M.hasWSLFeatureInstalled)()}async killProcess(G,V,oe){process.kill(V,oe)}async readClipboardText(G,V){return t.clipboard.readText(V)}async writeClipboardText(G,V,oe){return t.clipboard.writeText(V,oe)}async readClipboardFindText(G){return t.clipboard.readFindText()}async writeClipboardFindText(G,V){return t.clipboard.writeFindText(V)}async writeClipboardBuffer(G,V,oe,se){return t.clipboard.writeBuffer(V,Buffer.from(oe.buffer),se)}async readClipboardBuffer(G,V){return y.VSBuffer.wrap(t.clipboard.readBuffer(V))}async hasClipboard(G,V,oe){return t.clipboard.has(V,oe)}async newWindowTab(){await this.windowsMainService.open({context:5,cli:this.environmentMainService.args,forceNewTabbedWindow:!0,forceEmpty:!0,remoteAuthority:this.environmentMainService.args.remote||void 0})}async showPreviousWindowTab(){t.Menu.sendActionToFirstResponder("selectPreviousTab:")}async showNextWindowTab(){t.Menu.sendActionToFirstResponder("selectNextTab:")}async moveWindowTabToNewWindow(){t.Menu.sendActionToFirstResponder("moveTabToNewWindow:")}async mergeAllWindowTabs(){t.Menu.sendActionToFirstResponder("mergeAllWindows:")}async toggleWindowTabsBar(){t.Menu.sendActionToFirstResponder("toggleTabBar:")}async updateTouchBar(G,V){this.windowById(G)?.updateTouchBar(V)}async notifyReady(G){this.windowById(G)?.setReady()}async relaunch(G,V){return this.lifecycleMainService.relaunch(V)}async reload(G,V){const oe=this.windowById(G);if(oe){if((0,c.isWorkspaceIdentifier)(oe.openedWorkspace)){const se=oe.openedWorkspace.configPath;if(se.scheme===b.Schemas.file&&(await this.workspacesManagementMainService.resolveLocalWorkspace(se))?.transient)return this.openWindow(oe.id,{forceReuseWindow:!0})}return this.lifecycleMainService.reload(oe,V?.disableExtensions!==void 0?{_:[],"disable-extensions":V.disableExtensions}:void 0)}}async closeWindow(G){this.closeWindowById(G,G)}async closeWindowById(G,V){const oe=this.windowById(V);if(oe?.win)return oe.win.close()}async quit(G){const V=this.windowsMainService.getLastActiveWindow();V?.isExtensionDevelopmentHost&&this.windowsMainService.getWindowCount()>1&&V.win?V.win.close():this.lifecycleMainService.quit()}async exit(G,V){await this.lifecycleMainService.kill(V)}async resolveProxy(G,V){const se=this.windowById(G)?.win?.webContents?.session;if(se)return se.resolveProxy(V)}findFreePort(G,V,oe,se,ae=1){return(0,h.findFreePort)(V,oe,se,ae)}async openDevTools(G,V){const oe=this.windowById(G);oe?.win&&oe.win.webContents.openDevTools(V)}async toggleDevTools(G){const V=this.windowById(G);V?.win&&V.win.webContents.toggleDevTools()}async sendInputEvent(G,V){const oe=this.windowById(G);oe?.win&&(V.type==="mouseDown"||V.type==="mouseUp")&&oe.win.webContents.sendInputEvent(V)}async toggleSharedProcessWindow(){return this.sharedProcess.toggle()}async profileRenderer(G,V,oe){const se=this.windowById(G);if(!se||!se.win)throw new Error;return await new T.WindowProfiler(se.win,V,this.logService).inspect(oe)}async windowsGetStringRegKey(G,V,oe,se){if(!C.isWindows)return;const ae=await new Promise((fe,K)=>{z(["@vscode/windows-registry"],fe,K)});try{return ae.GetStringRegKey(V,oe,se)}catch{return}}windowById(G){if(typeof G=="number")return this.windowsMainService.getWindowById(G)}};we([D.memoize],_.prototype,"cliPath",null),_=we([te(1,r.IWindowsMainService),te(2,m.IDialogMainService),te(3,n.ILifecycleMainService),te(4,d.IEnvironmentMainService),te(5,s.ILogService),te(6,i.IProductService),te(7,o.IThemeMainService),te(8,a.IWorkspacesManagementMainService)],_),e.NativeHostMainService=_}),define(ee[264],ie([0,1,13,41,27,33,2,14,4,101,162,85,118,56,26,5,6,65,54,20,61,75,30,12]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IssueMainService=e.IIssueMainService=void 0,e.IIssueMainService=(0,w.createDecorator)("issueMainService");let i=class Nt{constructor(r,c,a,y,M,T,_,Y,G){this.userEnv=r,this.environmentMainService=c,this.logService=a,this.diagnosticsService=y,this.diagnosticsMainService=M,this.dialogMainService=T,this.nativeHostMainService=_,this.protocolMainService=Y,this.productService=G,this.issueReporterWindow=null,this.issueReporterParentWindow=null,this.processExplorerWindow=null,this.processExplorerParentWindow=null,this.registerListeners()}registerListeners(){t.validatedIpcMain.on("vscode:issueSystemInfoRequest",async r=>{const[c,a]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]),y=await this.diagnosticsService.getSystemInfo(c,a);this.safeSend(r,"vscode:issueSystemInfoResponse",y)}),t.validatedIpcMain.on("vscode:listProcesses",async r=>{const c=[];try{c.push({name:(0,b.localize)(0,null),rootProcess:await(0,S.listProcesses)(process.pid)}),(await this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0})).forEach(y=>{(0,P.isRemoteDiagnosticError)(y)?c.push({name:y.hostName,rootProcess:y}):y.processes&&c.push({name:y.hostName,rootProcess:y.processes})})}catch(a){this.logService.error(`Listing processes failed: ${a}`)}this.safeSend(r,"vscode:listProcessesResponse",c)}),t.validatedIpcMain.on("vscode:issueReporterClipboard",async r=>{const c={title:this.productService.nameLong,message:(0,b.localize)(1,null),type:"warning",buttons:[(0,R.mnemonicButtonLabel)((0,b.localize)(2,null)),(0,R.mnemonicButtonLabel)((0,b.localize)(3,null))],defaultId:0,cancelId:1,noLink:!0};if(this.issueReporterWindow){const a=await this.dialogMainService.showMessageBox(c,this.issueReporterWindow);this.safeSend(r,"vscode:issueReporterClipboardResponse",a.response===0)}}),t.validatedIpcMain.on("vscode:issuePerformanceInfoRequest",async r=>{const c=await this.getPerformanceInfo();this.safeSend(r,"vscode:issuePerformanceInfoResponse",c)}),t.validatedIpcMain.on("vscode:issueReporterConfirmClose",async()=>{const r={title:this.productService.nameLong,message:(0,b.localize)(4,null),type:"warning",buttons:[(0,R.mnemonicButtonLabel)((0,b.localize)(5,null)),(0,R.mnemonicButtonLabel)((0,b.localize)(6,null))],defaultId:0,cancelId:1,noLink:!0};this.issueReporterWindow&&(await this.dialogMainService.showMessageBox(r,this.issueReporterWindow)).response===0&&this.issueReporterWindow&&(this.issueReporterWindow.destroy(),this.issueReporterWindow=null)}),t.validatedIpcMain.on("vscode:workbenchCommand",(r,c)=>{const{id:a,from:y,args:M}=c;let T;switch(y){case"issueReporter":T=this.issueReporterParentWindow;break;case"processExplorer":T=this.processExplorerParentWindow;break;default:throw new Error(`Unexpected command source: ${y}`)}T?.webContents.send("vscode:runAction",{id:a,from:y,args:M})}),t.validatedIpcMain.on("vscode:openExternal",(r,c)=>{this.nativeHostMainService.openExternal(void 0,c)}),t.validatedIpcMain.on("vscode:closeIssueReporter",r=>{this.issueReporterWindow?.close()}),t.validatedIpcMain.on("vscode:closeProcessExplorer",r=>{this.processExplorerWindow?.close()}),t.validatedIpcMain.on("vscode:windowsInfoRequest",async r=>{const c=await this.diagnosticsMainService.getMainDiagnostics();this.safeSend(r,"vscode:windowsInfoResponse",c.windows)})}safeSend(r,c,...a){r.sender.isDestroyed()||r.sender.send(c,...a)}async openReporter(r){if(!this.issueReporterWindow&&(this.issueReporterParentWindow=E.BrowserWindow.getFocusedWindow(),this.issueReporterParentWindow)){const c=new D.DisposableStore,a=c.add(this.protocolMainService.createIPCObjectUrl()),y=this.getWindowPosition(this.issueReporterParentWindow,700,800);this.issueReporterWindow=this.createBrowserWindow(y,a,{backgroundColor:r.styles.backgroundColor,title:(0,b.localize)(7,null),zoomLevel:r.zoomLevel,alwaysOnTop:!1},"issue-reporter"),a.update({appRoot:this.environmentMainService.appRoot,windowId:this.issueReporterWindow.id,userEnv:this.userEnv,data:r,disableExtensions:!!this.environmentMainService.disableExtensions,os:{type:(0,k.type)(),arch:(0,k.arch)(),release:(0,k.release)()},product:v.default}),this.issueReporterWindow.loadURL(I.FileAccess.asBrowserUri(`vs/code/electron-sandbox/issue/issueReporter${this.environmentMainService.isBuilt?"":"-dev"}.html`,z).toString(!0)),this.issueReporterWindow.on("close",()=>{this.issueReporterWindow=null,c.dispose()}),this.issueReporterParentWindow.on("closed",()=>{this.issueReporterWindow&&(this.issueReporterWindow.close(),this.issueReporterWindow=null,c.dispose())})}this.issueReporterWindow&&this.focusWindow(this.issueReporterWindow)}async openProcessExplorer(r){if(!this.processExplorerWindow&&(this.processExplorerParentWindow=E.BrowserWindow.getFocusedWindow(),this.processExplorerParentWindow)){const c=new D.DisposableStore,a=c.add(this.protocolMainService.createIPCObjectUrl()),y=this.getWindowPosition(this.processExplorerParentWindow,800,500);this.processExplorerWindow=this.createBrowserWindow(y,a,{backgroundColor:r.styles.backgroundColor,title:(0,b.localize)(8,null),zoomLevel:r.zoomLevel,alwaysOnTop:!0},"process-explorer"),a.update({appRoot:this.environmentMainService.appRoot,windowId:this.processExplorerWindow.id,userEnv:this.userEnv,data:r,product:v.default}),this.processExplorerWindow.loadURL(I.FileAccess.asBrowserUri(`vs/code/electron-sandbox/processExplorer/processExplorer${this.environmentMainService.isBuilt?"":"-dev"}.html`,z).toString(!0)),this.processExplorerWindow.on("close",()=>{this.processExplorerWindow=null,c.dispose()}),this.processExplorerParentWindow.on("close",()=>{this.processExplorerWindow&&(this.processExplorerWindow.close(),this.processExplorerWindow=null,c.dispose())})}this.processExplorerWindow&&this.focusWindow(this.processExplorerWindow)}focusWindow(r){r.isMinimized()&&r.restore(),r.focus()}createBrowserWindow(r,c,a,y){const M=new E.BrowserWindow({fullscreen:!1,skipTaskbar:!1,resizable:!0,width:r.width,height:r.height,minWidth:300,minHeight:200,x:r.x,y:r.y,title:a.title,backgroundColor:a.backgroundColor||Nt.DEFAULT_BACKGROUND_COLOR,webPreferences:{preload:I.FileAccess.asFileUri("vs/base/parts/sandbox/electron-browser/preload.js",z).fsPath,additionalArguments:[`--vscode-window-config=${c.resource.toString()}`,`--vscode-window-kind=${y}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,l.zoomLevelToZoomFactor)(a.zoomLevel),sandbox:!0,contextIsolation:!0},alwaysOnTop:a.alwaysOnTop,experimentalDarkMode:!0});return M.setMenuBarVisibility(!1),M}async getSystemStatus(){const[r,c]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return this.diagnosticsService.getDiagnostics(r,c)}getWindowPosition(r,c,a){let y;const M=E.screen.getAllDisplays();if(M.length===1)y=M[0];else{if(f.isMacintosh){const Y=E.screen.getCursorScreenPoint();y=E.screen.getDisplayNearestPoint(Y)}!y&&r&&(y=E.screen.getDisplayMatching(r.getBounds())),y||(y=E.screen.getPrimaryDisplay()||M[0])}const T={width:c,height:a},_=y.bounds;return T.x=_.x+_.width/2-T.width/2,T.y=_.y+_.height/2-T.height/2,_.width>0&&_.height>0&&(T.x<_.x&&(T.x=_.x),T.y<_.y&&(T.y=_.y),T.x>_.x+_.width&&(T.x=_.x),T.y>_.y+_.height&&(T.y=_.y),T.width>_.width&&(T.width=_.width),T.height>_.height&&(T.height=_.height)),T}async getPerformanceInfo(){try{const[r,c]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0})]);return await this.diagnosticsService.getPerformanceInfo(r,c)}catch(r){throw this.logService.warn("issueService#getPerformanceInfo ",r.message),r}}async stopTracing(){if(!this.environmentMainService.args.trace)return;const r=await E.contentTracing.stopRecording(`${(0,n.randomPath)(this.environmentMainService.userHome.fsPath,this.productService.applicationName)}.trace.txt`);await this.dialogMainService.showMessageBox({title:this.productService.nameLong,type:"info",message:(0,b.localize)(9,null),detail:(0,b.localize)(10,null,r),buttons:[(0,R.mnemonicButtonLabel)((0,b.localize)(11,null))],defaultId:0,noLink:!0},(0,s.withNullAsUndefined)(E.BrowserWindow.getFocusedWindow())),this.nativeHostMainService.showItemInFolder(void 0,r)}};i.DEFAULT_BACKGROUND_COLOR="#1E1E1E",i=we([te(1,p.IEnvironmentMainService),te(2,g.ILogService),te(3,P.IDiagnosticsService),te(4,C.IDiagnosticsMainService),te(5,u.IDialogMainService),te(6,h.INativeHostMainService),te(7,d.IProtocolMainService),te(8,m.IProductService)],i),e.IssueMainService=i}),define(ee[265],ie([0,1,22,19,26,21,6,65,20,55,35,48,89]),function(z,e,E,t,k,R,D,I,f,S,b,P,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxUpdateService=void 0;let u=class extends C.AbstractUpdateService{constructor(w,g,h,v,m,d,l,n){super(w,g,v,m,d,n),this.telemetryService=h,this.nativeHostMainService=l}buildUpdateFeedUrl(w){return(0,C.createUpdateURL)(`linux-${process.arch}`,w,this.productService)}doCheckForUpdates(w){!this.url||(this.setState(P.State.CheckingForUpdates(w)),this.requestService.request({url:this.url},E.CancellationToken.None).then(S.asJson).then(g=>{!g||!g.url||!g.version||!g.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!w}),this.setState(P.State.Idle(1))):this.setState(P.State.AvailableForDownload(g))}).then(void 0,g=>{this.logService.error(g),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!w});const h=w?g.message||g:void 0;this.setState(P.State.Idle(1,h))}))}async doDownloadUpdate(w){this.productService.downloadUrl&&this.productService.downloadUrl.length>0?this.nativeHostMainService.openExternal(void 0,this.productService.downloadUrl):w.update.url&&this.nativeHostMainService.openExternal(void 0,w.update.url),this.setState(P.State.Idle(1))}};u=we([te(0,R.ILifecycleMainService),te(1,t.IConfigurationService),te(2,b.ITelemetryService),te(3,k.IEnvironmentMainService),te(4,S.IRequestService),te(5,D.ILogService),te(6,I.INativeHostMainService),te(7,f.IProductService)],u),e.LinuxUpdateService=u}),define(ee[266],ie([0,1,45,40,27,8,22,53,9,7,126,23,19,26,15,21,6,65,20,55,35,48,89]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Win32UpdateService=void 0;async function s(c,a=1e3){for(;!c();)await(0,R.timeout)(a)}let i;function o(){return typeof i>"u"&&(i=t.existsSync(f.join(f.dirname(process.execPath),"unins000.exe"))?0:1),i}let r=class extends n.AbstractUpdateService{get cachePath(){const a=f.join((0,k.tmpdir)(),`vscode-update-${this.productService.target}-${process.arch}`);return P.Promises.mkdir(a,{recursive:!0}).then(()=>a)}constructor(a,y,M,T,_,Y,G,V,oe){super(a,y,T,_,Y,oe),this.telemetryService=M,this.fileService=G,this.nativeHostMainService=V}async initialize(){if(this.productService.target==="user"&&await this.nativeHostMainService.isAdmin(void 0)){this.logService.info("update#ctor - updates are disabled due to running as Admin in user setup");return}super.initialize()}buildUpdateFeedUrl(a){let y="win32";return process.arch!=="ia32"&&(y+=`-${process.arch}`),o()===1?y+="-archive":this.productService.target==="user"&&(y+="-user"),(0,n.createUpdateURL)(y,a,this.productService)}doCheckForUpdates(a){!this.url||(this.setState(l.State.CheckingForUpdates(a)),this.requestService.request({url:this.url},D.CancellationToken.None).then(m.asJson).then(y=>{const M=o();return!y||!y.url||!y.version||!y.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!a}),this.setState(l.State.Idle(M)),Promise.resolve(null)):M===1?(this.setState(l.State.AvailableForDownload(y)),Promise.resolve(null)):(this.setState(l.State.Downloading(y)),this.cleanup(y.version).then(()=>this.getUpdatePackagePath(y.version).then(T=>P.Promises.exists(T).then(_=>{if(_)return Promise.resolve(T);const Y=y.url,G=y.hash,V=`${T}.tmp`;return this.requestService.request({url:Y},D.CancellationToken.None).then(oe=>this.fileService.writeFile(S.URI.file(V),oe.stream)).then(G?()=>(0,b.checksum)(V,y.hash):()=>{}).then(()=>P.Promises.rename(V,T)).then(()=>T)})).then(T=>{const _=this.configurationService.getValue("update.enableWindowsBackgroundUpdates");this.availableUpdate={packagePath:T},_&&y.supportsFastUpdate?this.productService.target==="user"?this.doApplyUpdate():this.setState(l.State.Downloaded(y)):this.setState(l.State.Ready(y))})))}).then(void 0,y=>{this.logService.error(y),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!a});const M=a?y.message||y:void 0;this.setState(l.State.Idle(o(),M))}))}async doDownloadUpdate(a){a.update.url&&this.nativeHostMainService.openExternal(void 0,a.update.url),this.setState(l.State.Idle(o()))}async getUpdatePackagePath(a){const y=await this.cachePath;return f.join(y,`CodeSetup-${this.productService.quality}-${a}.exe`)}async cleanup(a=null){const y=a?Y=>!new RegExp(`${this.productService.quality}-${a}\\.exe$`).test(Y):()=>!0,M=await this.cachePath,_=(await P.Promises.readdir(M)).filter(y).map(async Y=>{try{await P.Promises.unlink(f.join(M,Y))}catch{}});await Promise.all(_)}async doApplyUpdate(){if(this.state.type!=="downloaded"&&this.state.type!=="downloading"||!this.availableUpdate)return Promise.resolve(void 0);const a=this.state.update;this.setState(l.State.Updating(a));const y=await this.cachePath;this.availableUpdate.updateFilePath=f.join(y,`CodeSetup-${this.productService.quality}-${a.version}.flag`),await P.Promises.writeFile(this.availableUpdate.updateFilePath,"flag"),(0,E.spawn)(this.availableUpdate.packagePath,["/verysilent",`/update="${this.availableUpdate.updateFilePath}"`,"/nocloseapplications","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],windowsVerbatimArguments:!0}).once("exit",()=>{this.availableUpdate=void 0,this.setState(l.State.Idle(o()))});const T=`${this.productService.win32MutexName}-ready`,_=await new Promise((Y,G)=>{z(["windows-mutex"],Y,G)});s(()=>_.isActive(T)).then(()=>this.setState(l.State.Ready(a)))}doQuitAndInstall(){this.state.type!=="ready"||!this.availableUpdate||(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.state.update.supportsFastUpdate&&this.availableUpdate.updateFilePath?t.unlinkSync(this.availableUpdate.updateFilePath):(0,E.spawn)(this.availableUpdate.packagePath,["/silent","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"]}))}getUpdateType(){return o()}async _applySpecificUpdate(a){if(this.state.type!=="idle")return;const y=this.configurationService.getValue("update.enableWindowsBackgroundUpdates"),M={version:"unknown",productVersion:"unknown",supportsFastUpdate:!!y};this.setState(l.State.Downloading(M)),this.availableUpdate={packagePath:a},y?this.productService.target==="user"?this.doApplyUpdate():this.setState(l.State.Downloaded(M)):this.setState(l.State.Ready(M))}};we([I.memoize],r.prototype,"cachePath",null),r=we([te(0,w.ILifecycleMainService),te(1,C.IConfigurationService),te(2,d.ITelemetryService),te(3,u.IEnvironmentMainService),te(4,m.IRequestService),te(5,g.ILogService),te(6,p.IFileService),te(7,h.INativeHostMainService),te(8,v.IProductService)],r),e.Win32UpdateService=r}),define(ee[267],ie([0,1,13,8,22,44,3,33,2,14,9,72,4,7,170,60,19,56,26,59,15,21,6,20,61,232,92,35,235,64,75,31,28,52,116,120,36,37,54,42]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T,_,Y,G,V,oe,se,ae,fe){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeWindow=void 0;var K;(function(F){F[F.NONE=0]="NONE",F[F.NAVIGATING=1]="NAVIGATING",F[F.READY=2]="READY"})(K||(K={}));let q=class Wt extends f.Disposable{get id(){return this._id}get win(){return this._win}get lastFocusTime(){return this._lastFocusTime}get backupPath(){return this._config?.backupPath}get openedWorkspace(){return this._config?.workspace}get profile(){return this.config?this.userDataProfilesService.getOrSetProfileForWorkspace(this.config.workspace??"empty-window",this.userDataProfilesService.profiles.find(A=>A.id===this.config?.profiles.profile.id)??this.userDataProfilesService.defaultProfile):void 0}get remoteAuthority(){return this._config?.remoteAuthority}get config(){return this._config}get isExtensionDevelopmentHost(){return!!this._config?.extensionDevelopmentPath}get isExtensionTestHost(){return!!this._config?.extensionTestsPath}get isExtensionDevelopmentTestFromCli(){return this.isExtensionDevelopmentHost&&this.isExtensionTestHost&&!this._config?.debugId}constructor(A,O,U,ne,N,$,L,W,j,H,X,re,B,x,Z,ce,ge,De,Te){super(),this.logService=O,this.environmentMainService=U,this.policyService=ne,this.userDataProfilesService=N,this.fileService=$,this.applicationStorageMainService=L,this.storageMainService=W,this.configurationService=j,this.themeMainService=H,this.workspacesManagementMainService=X,this.backupMainService=re,this.telemetryService=B,this.dialogMainService=x,this.lifecycleMainService=Z,this.productService=ce,this.protocolMainService=ge,this.windowsMainService=De,this.stateMainService=Te,this._onWillLoad=this._register(new D.Emitter),this.onWillLoad=this._onWillLoad.event,this._onDidSignalReady=this._register(new D.Emitter),this.onDidSignalReady=this._onDidSignalReady.event,this._onDidTriggerSystemContextMenu=this._register(new D.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this._onDidClose=this._register(new D.Emitter),this.onDidClose=this._onDidClose.event,this._onDidDestroy=this._register(new D.Emitter),this.onDidDestroy=this._onDidDestroy.event,this._lastFocusTime=-1,this.transientIsNativeFullScreen=void 0,this.joinNativeFullScreenTransition=void 0,this.hasWindowControlOverlay=!1,this.whenReadyCallbacks=[],this.touchBarGroups=[],this.currentHttpProxy=void 0,this.currentNoProxy=void 0,this.configObjectUrl=this._register(this.protocolMainService.createIPCObjectUrl()),this.wasLoaded=!1,this.readyState=0;{const[Me,Le]=this.restoreWindowState(A.state);this.windowState=Me,this.logService.trace("window#ctor: using window state",Me);const ve=this.windowState.mode===0||this.windowState.mode===3,pe=this.configurationService.getValue("window");let Se=!1;typeof pe?.experimental?.useSandbox=="boolean"?Se=pe.experimental.useSandbox:Se=typeof ae.default.quality=="string"&&ae.default.quality!=="stable";const ke={width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y,backgroundColor:this.themeMainService.getBackgroundColor(),minWidth:M.WindowMinimumSize.WIDTH,minHeight:M.WindowMinimumSize.HEIGHT,show:!ve,title:this.productService.nameLong,webPreferences:{preload:S.FileAccess.asFileUri("vs/base/parts/sandbox/electron-browser/preload.js",z).fsPath,additionalArguments:[`--vscode-window-config=${this.configObjectUrl.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,M.zoomLevelToZoomFactor)(pe?.zoomLevel),enableBlinkFeatures:"HighlightAPI",...Se?{sandbox:!0}:{nodeIntegration:!0,contextIsolation:!1}},experimentalDarkMode:!0};C.isLinux?ke.icon=(0,b.join)(this.environmentMainService.appRoot,"resources/linux/code.png"):C.isWindows&&!this.environmentMainService.isBuilt&&(ke.icon=(0,b.join)(this.environmentMainService.appRoot,"resources/win32/code_150x150.png")),C.isMacintosh&&!this.useNativeFullScreen()&&(ke.fullscreenable=!1),C.isMacintosh&&(ke.acceptFirstMouse=!0,pe?.clickThroughInactive===!1&&(ke.acceptFirstMouse=!1));const J=C.isMacintosh&&pe?.nativeTabs===!0;J&&(ke.tabbingIdentifier=this.productService.nameShort);const ue=(0,M.getTitleBarStyle)(this.configurationService)==="custom";if(ue&&(ke.titleBarStyle="hidden",C.isMacintosh||(ke.frame=!1),(0,M.useWindowControlsOverlay)(this.configurationService))){const he=this.themeMainService.getWindowSplash()?.colorInfo.titleBarBackground??this.themeMainService.getBackgroundColor(),ye=V.Color.fromHex(he).isDarker()?"#FFFFFF":"#000000";ke.titleBarOverlay={height:29,color:he,symbolColor:ye},this.hasWindowControlOverlay=!0}if((0,P.mark)("code/willCreateCodeBrowserWindow"),this._win=new E.BrowserWindow(ke),(0,P.mark)("code/didCreateCodeBrowserWindow"),this._id=this._win.id,C.isMacintosh&&ue&&this._win.setSheetOffset(22),ue&&(C.isWindows&&(0,M.useWindowControlsOverlay)(this.configurationService)||C.isMacintosh)){const he=this.stateMainService.getItem(Wt.windowControlHeightStateStorageKey);he&&this.updateWindowControls({height:he})}C.isWindows&&ue&&this._win.hookWindowMessage(278,()=>{const[ye,Ce]=this._win.getPosition(),Fe=E.screen.getCursorScreenPoint(),Oe=Fe.x-ye,$e=Fe.y-Ce;return(()=>!(Oe>30&&$e>=0&&$e<=Math.max(this._win.getBounds().height*.15,35)))()||(this._win.setEnabled(!1),this._win.setEnabled(!0),this._onDidTriggerSystemContextMenu.fire({x:Oe,y:$e})),0}),(C.isMacintosh||C.isWindows)&&Le&&(!J||E.BrowserWindow.getAllWindows().length===1)&&[this.windowState.width,this.windowState.height,this.windowState.x,this.windowState.y].every(he=>typeof he=="number")&&this._win.setBounds({width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y}),ve&&((0,P.mark)("code/willMaximizeCodeWindow"),this._win.maximize(),this.windowState.mode===3&&this.setFullScreen(!0),this._win.show(),(0,P.mark)("code/didMaximizeCodeWindow")),this._lastFocusTime=Date.now()}this.environmentMainService.args["open-devtools"]===!0&&this._win.webContents.openDevTools(),this.onConfigurationUpdated(),this.createTouchBar(),this.registerListeners()}setRepresentedFilename(A){C.isMacintosh?this._win.setRepresentedFilename(A):this.representedFilename=A}getRepresentedFilename(){return C.isMacintosh?this._win.getRepresentedFilename():this.representedFilename}setDocumentEdited(A){C.isMacintosh&&this._win.setDocumentEdited(A),this.documentEdited=A}isDocumentEdited(){return C.isMacintosh?this._win.isDocumentEdited():!!this.documentEdited}focus(A){C.isMacintosh&&A?.force&&E.app.focus({steal:!0}),this._win&&(this._win.isMinimized()&&this._win.restore(),this._win.focus())}setReady(){for(this.logService.trace(`window#load: window reported ready (id: ${this._id})`),this.readyState=2;this.whenReadyCallbacks.length;)this.whenReadyCallbacks.pop()(this);this._onDidSignalReady.fire()}ready(){return new Promise(A=>{if(this.isReady)return A(this);this.whenReadyCallbacks.push(A)})}get isReady(){return this.readyState===2}get whenClosedOrLoaded(){return new Promise(A=>{function O(){U.dispose(),ne.dispose(),A()}const U=this.onDidClose(()=>O()),ne=this.onWillLoad(()=>O())})}registerListeners(){this._win.on("unresponsive",()=>this.onWindowError(1)),this._win.webContents.on("render-process-gone",(O,U)=>this.onWindowError(2,U)),this._win.webContents.on("did-fail-load",(O,U,ne)=>this.onWindowError(3,{reason:ne,exitCode:U})),this._win.webContents.on("will-prevent-unload",O=>{O.preventDefault()}),this._win.on("closed",()=>{this._onDidClose.fire(),this.dispose()}),this._win.webContents.on("did-finish-load",()=>{this.pendingLoadConfig&&(this._config=this.pendingLoadConfig,this.pendingLoadConfig=void 0)}),this._win.on("focus",()=>{this._lastFocusTime=Date.now()}),this._win.on("maximize",O=>{this._config&&(this._config.maximized=!0),E.app.emit("browser-window-maximize",O,this._win)}),this._win.on("unmaximize",O=>{this._config&&(this._config.maximized=!1),E.app.emit("browser-window-unmaximize",O,this._win)}),this._win.on("enter-full-screen",()=>{this.sendWhenReady("vscode:enterFullScreen",k.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._win.on("leave-full-screen",()=>{this.sendWhenReady("vscode:leaveFullScreen",k.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._register(this.configurationService.onDidChangeConfiguration(O=>this.onConfigurationUpdated(O))),this._register(this.workspacesManagementMainService.onDidDeleteUntitledWorkspace(O=>this.onDidDeleteUntitledWorkspace(O)));const A=["https://marketplace.visualstudio.com/*","https://*.vsassets.io/*"];this._win.webContents.session.webRequest.onBeforeSendHeaders({urls:A},async(O,U)=>{const ne=await this.getMarketplaceHeaders();U({cancel:!1,requestHeaders:Object.assign(O.requestHeaders,ne)})})}getMarketplaceHeaders(){return this.marketplaceHeadersPromise||(this.marketplaceHeadersPromise=(0,o.resolveMarketplaceHeaders)(this.productService.version,this.productService,this.environmentMainService,this.configurationService,this.fileService,this.applicationStorageMainService,this.telemetryService)),this.marketplaceHeadersPromise}async onWindowError(A,O){switch(A){case 2:this.logService.error(`CodeWindow: renderer process gone (reason: ${O?.reason||""}, code: ${O?.exitCode||""})`);break;case 1:this.logService.error("CodeWindow: detected unresponsive");break;case 3:this.logService.error(`CodeWindow: failed to load (reason: ${O?.reason||""}, code: ${O?.exitCode||""})`);break}switch(this.telemetryService.publicLog2("windowerror",{type:A,reason:O?.reason,code:O?.exitCode}),A){case 1:case 2:if(this.isExtensionDevelopmentTestFromCli){this.lifecycleMainService.kill(1);return}if(this.environmentMainService.args["enable-smoke-test-driver"]){await this.destroyWindow(!1,!1),this.lifecycleMainService.quit();return}if(A===1){if(this.isExtensionDevelopmentHost||this.isExtensionTestHost||this._win&&this._win.webContents&&this._win.webContents.isDevToolsOpened())return;const U=await this.dialogMainService.showMessageBox({title:this.productService.nameLong,type:"warning",buttons:[(0,I.mnemonicButtonLabel)((0,p.localize)(0,null)),(0,I.mnemonicButtonLabel)((0,p.localize)(1,null)),(0,I.mnemonicButtonLabel)((0,p.localize)(2,null))],message:(0,p.localize)(3,null),detail:(0,p.localize)(4,null),noLink:!0,defaultId:0,cancelId:1,checkboxLabel:this._config?.workspace?(0,p.localize)(5,null):void 0},this._win);if(U.response!==1){const ne=U.response===0;await this.destroyWindow(ne,U.checkboxChecked)}}else if(A===2){let U;O?U=(0,p.localize)(7,null,O.reason,O.exitCode??""):U=(0,p.localize)(6,null);const ne=await this.dialogMainService.showMessageBox({title:this.productService.nameLong,type:"warning",buttons:[(0,I.mnemonicButtonLabel)((0,p.localize)(8,null)),(0,I.mnemonicButtonLabel)((0,p.localize)(9,null))],message:U,detail:(0,p.localize)(10,null),noLink:!0,defaultId:0,checkboxLabel:this._config?.workspace?(0,p.localize)(11,null):void 0},this._win),N=ne.response===0;await this.destroyWindow(N,ne.checkboxChecked)}break}}async destroyWindow(A,O){const U=this._config?.workspace;if(O&&U)try{const ne=this.storageMainService.workspaceStorage(U);await ne.init(),ne.delete("memento/workbench.parts.editor"),await ne.close()}catch(ne){this.logService.error(ne)}if(this._onDidDestroy.fire(),this._win?.destroy(),A&&this._config){let ne,N;(0,_.isSingleFolderWorkspaceIdentifier)(U)?ne={folderUri:U.uri}:(0,_.isWorkspaceIdentifier)(U)?ne={workspaceUri:U.configPath}:N=!0;const[$]=await this.windowsMainService.open({context:5,userEnv:this._config.userEnv,cli:{...this.environmentMainService.args,_:[]},urisToOpen:ne?[ne]:void 0,forceEmpty:N,forceNewWindow:!0,remoteAuthority:this.remoteAuthority});$.focus()}}onDidDeleteUntitledWorkspace(A){this._config?.workspace?.id===A.id&&(this._config.workspace=void 0)}onConfigurationUpdated(A){const O=this.getMenuBarVisibility();O!==this.currentMenuBarVisibility&&(this.currentMenuBarVisibility=O,this.setMenuBarVisibility(O));let U=(this.configurationService.getValue("http.proxy")||"").trim()||(process.env.https_proxy||process.env.HTTPS_PROXY||process.env.http_proxy||process.env.HTTP_PROXY||"").trim()||void 0;U?.endsWith("/")&&(U=U.substr(0,U.length-1));const ne=(process.env.no_proxy||process.env.NO_PROXY||"").trim()||void 0;if((U||"").indexOf("@")===-1&&(U!==this.currentHttpProxy||ne!==this.currentNoProxy)){this.currentHttpProxy=U,this.currentNoProxy=ne;const N=U||"",$=ne?`${ne},`:"";this.logService.trace(`Setting proxy to '${N}', bypassing '${$}'`),this._win.webContents.session.setProxy({proxyRules:N,proxyBypassRules:$,pacScript:""})}}addTabbedWindow(A){C.isMacintosh&&A.win&&this._win.addTabbedWindow(A.win)}load(A,O=Object.create(null)){this.logService.trace(`window#load: attempt to load window (id: ${this._id})`),this.isDocumentEdited()&&(!O.isReload||!this.backupMainService.isHotExitEnabled())&&this.setDocumentEdited(!1),O.isReload||(this.getRepresentedFilename()&&this.setRepresentedFilename(""),this._win.setTitle(this.productService.nameLong)),this.updateConfiguration(A,O),this.readyState===0?this._config=A:this.pendingLoadConfig=A,this.readyState=1,this._win.loadURL(S.FileAccess.asBrowserUri(`vs/code/electron-sandbox/workbench/workbench${this.environmentMainService.isBuilt?"":"-dev"}.html`,z).toString(!0));const U=this.wasLoaded;this.wasLoaded=!0,!this.environmentMainService.isBuilt&&!this.environmentMainService.extensionTestsLocationURI&&this._register(new t.RunOnceScheduler(()=>{this._win&&!this._win.isVisible()&&!this._win.isMinimized()&&(this._win.show(),this.focus({force:!0}),this._win.webContents.openDevTools())},1e4)).schedule(),this._onWillLoad.fire({workspace:A.workspace,reason:O.isReload?3:U?2:1})}updateConfiguration(A,O){const U=(this._config??this.pendingLoadConfig)?.userEnv;if(U){const ne=(0,m.isLaunchedFromCli)(U)&&!(0,m.isLaunchedFromCli)(A.userEnv),N=this.isExtensionDevelopmentHost;(ne||N)&&(A.userEnv={...U,...A.userEnv})}process.env.CHROME_CRASHPAD_PIPE_NAME&&Object.assign(A.userEnv,{CHROME_CRASHPAD_PIPE_NAME:process.env.CHROME_CRASHPAD_PIPE_NAME}),O.disableExtensions!==void 0&&(A["disable-extensions"]=O.disableExtensions),A.fullscreen=this.isFullScreen,A.maximized=this._win.isMaximized(),A.partsSplash=this.themeMainService.getWindowSplash(),(0,P.mark)("code/willOpenNewWindow"),A.perfMarks=(0,P.getMarks)(),this.configObjectUrl.update(A)}async reload(A){const O=Object.assign({},this._config);O.workspace=await this.validateWorkspaceBeforeReload(O),delete O.filesToOpenOrCreate,delete O.filesToDiff,delete O.filesToMerge,delete O.filesToWait,this.isExtensionDevelopmentHost&&A&&(O.verbose=A.verbose,O.debugId=A.debugId,O.extensionEnvironment=A.extensionEnvironment,O["inspect-extensions"]=A["inspect-extensions"],O["inspect-brk-extensions"]=A["inspect-brk-extensions"],O["extensions-dir"]=A["extensions-dir"]),O.isInitialStartup=!1,O.policiesData=this.policyService.serialize(),O.continueOn=this.environmentMainService.continueOn,O.profiles={all:this.userDataProfilesService.profiles,profile:this.profile||this.userDataProfilesService.defaultProfile},this.load(O,{isReload:!0,disableExtensions:A?.["disable-extensions"]})}async validateWorkspaceBeforeReload(A){if((0,_.isWorkspaceIdentifier)(A.workspace)){const O=A.workspace.configPath;if(O.scheme===S.Schemas.file&&!await this.fileService.exists(O))return}else if((0,_.isSingleFolderWorkspaceIdentifier)(A.workspace)){const O=A.workspace.uri;if(O.scheme===S.Schemas.file&&!await this.fileService.exists(O))return}return A.workspace}serializeWindowState(){if(!this._win)return(0,G.defaultWindowState)();if(this.isFullScreen){let U;try{U=E.screen.getDisplayMatching(this.getBounds())}catch{}const ne=(0,G.defaultWindowState)();return{mode:3,display:U?U.id:void 0,width:this.windowState.width||ne.width,height:this.windowState.height||ne.height,x:this.windowState.x||0,y:this.windowState.y||0}}const A=Object.create(null);let O;if(!C.isMacintosh&&this._win.isMaximized()?O=0:O=1,O===0?A.mode=0:A.mode=1,O===1||O===0){let U;O===1?U=this.getBounds():U=this._win.getNormalBounds(),A.x=U.x,A.y=U.y,A.width=U.width,A.height=U.height}return A}updateWindowControls(A){if(A.height&&this.stateMainService.setItem(Wt.windowControlHeightStateStorageKey,A.height),C.isWindows&&this.hasWindowControlOverlay)this._win.setTitleBarOverlay({color:A.backgroundColor?.trim()===""?void 0:A.backgroundColor,symbolColor:A.foregroundColor?.trim()===""?void 0:A.foregroundColor,height:A.height?A.height-1:void 0});else if(C.isMacintosh&&A.height!==void 0){const O=(A.height-15)/2;this._win.setTrafficLightPosition({x:O,y:O})}}restoreWindowState(A){(0,P.mark)("code/willRestoreCodeWindowState");let O=!1;if(A)try{const U=E.screen.getAllDisplays();O=U.length>1,A=this.validateWindowState(A,U)}catch(U){this.logService.warn(`Unexpected error validating window state: ${U} ${U.stack}`)}return(0,P.mark)("code/didRestoreCodeWindowState"),[A||(0,G.defaultWindowState)(),O]}validateWindowState(A,O){if(this.logService.trace(`window#validateWindowState: validating window state on ${O.length} display(s)`,A),typeof A.x!="number"||typeof A.y!="number"||typeof A.width!="number"||typeof A.height!="number"){this.logService.trace("window#validateWindowState: unexpected type of state values");return}if(A.width<=0||A.height<=0){this.logService.trace("window#validateWindowState: unexpected negative values");return}if(O.length===1){const N=this.getWorkingArea(O[0]);if(N){let $=function(){!A||typeof A.x!="number"||typeof A.y!="number"||!N||(A.xN.width&&(A.width=N.width),A.height>N.height&&(A.height=N.height),A.x>N.x+N.width-128&&(A.x=N.x+N.width-A.width),A.y>N.y+N.height-128&&(A.y=N.y+N.height-A.height),$()}return A}if(A.display&&A.mode===3){const N=O.find($=>$.id===A.display);if(N&&typeof N.bounds?.x=="number"&&typeof N.bounds?.y=="number"){this.logService.trace("window#validateWindowState: restoring fullscreen to previous display");const $=(0,G.defaultWindowState)(3);return $.x=N.bounds.x,$.y=N.bounds.y,$}}let U,ne;try{U=E.screen.getDisplayMatching({x:A.x,y:A.y,width:A.width,height:A.height}),ne=this.getWorkingArea(U)}catch{}if(U&&ne&&A.x+A.width>ne.x&&A.y+A.height>ne.y&&A.x0&&A.workArea.height>0)return A.workArea;if(A.bounds.width>0&&A.bounds.height>0)return A.bounds}getBounds(){const[A,O]=this._win.getPosition(),[U,ne]=this._win.getSize();return{x:A,y:O,width:U,height:ne}}toggleFullScreen(){this.setFullScreen(!this.isFullScreen)}setFullScreen(A){this.useNativeFullScreen()?this.setNativeFullScreen(A):this.setSimpleFullScreen(A),this.sendWhenReady(A?"vscode:enterFullScreen":"vscode:leaveFullScreen",k.CancellationToken.None),this.currentMenuBarVisibility&&this.setMenuBarVisibility(this.currentMenuBarVisibility,!1)}get isFullScreen(){return C.isMacintosh&&typeof this.transientIsNativeFullScreen=="boolean"?this.transientIsNativeFullScreen:this._win.isFullScreen()||this._win.isSimpleFullScreen()}setNativeFullScreen(A){this._win.isSimpleFullScreen()&&this._win.setSimpleFullScreen(!1),this.doSetNativeFullScreen(A)}doSetNativeFullScreen(A){C.isMacintosh&&(this.transientIsNativeFullScreen=A,this.joinNativeFullScreenTransition=new t.DeferredPromise,Promise.race([this.joinNativeFullScreenTransition.p,(0,t.timeout)(1e3)]).finally(()=>this.transientIsNativeFullScreen=void 0)),this._win.setFullScreen(A)}setSimpleFullScreen(A){this._win.isFullScreen()&&this.doSetNativeFullScreen(!1),this._win.setSimpleFullScreen(A),this._win.webContents.focus()}useNativeFullScreen(){const A=this.configurationService.getValue("window");return!A||typeof A.nativeFullScreen!="boolean"||A.nativeTabs?!0:A.nativeFullScreen!==!1}isMinimized(){return this._win.isMinimized()}getMenuBarVisibility(){let A=(0,M.getMenuBarVisibility)(this.configurationService);return["visible","toggle","hidden"].indexOf(A)<0&&(A="classic"),A}setMenuBarVisibility(A,O=!0){C.isMacintosh||(A==="toggle"&&O&&this.send("vscode:showInfoMessage",(0,p.localize)(12,null)),A==="hidden"?setTimeout(()=>{this.doSetMenuBarVisibility(A)}):this.doSetMenuBarVisibility(A))}doSetMenuBarVisibility(A){const O=this.isFullScreen;switch(A){case"classic":this._win.setMenuBarVisibility(!O),this._win.autoHideMenuBar=O;break;case"visible":this._win.setMenuBarVisibility(!0),this._win.autoHideMenuBar=!1;break;case"toggle":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!0;break;case"hidden":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!1;break}}handleTitleDoubleClick(){if(C.isMacintosh)switch(E.systemPreferences.getUserDefault("AppleActionOnDoubleClick","string")){case"Minimize":this._win.minimize();break;case"None":break;case"Maximize":default:this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}else this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}close(){this._win?.close()}sendWhenReady(A,O,...U){this.isReady?this.send(A,...U):this.ready().then(()=>{O.isCancellationRequested||this.send(A,...U)})}send(A,...O){if(this._win){if(this._win.isDestroyed()||this._win.webContents.isDestroyed()){this.logService.warn(`Sending IPC message to channel '${A}' for window that is destroyed`);return}try{this._win.webContents.send(A,...O)}catch(U){this.logService.warn(`Error sending IPC message to channel '${A}' of window ${this._id}: ${(0,R.toErrorMessage)(U)}`)}}}updateTouchBar(A){!C.isMacintosh||this.touchBarGroups.forEach((O,U)=>{const ne=A[U];O.segments=this.createTouchBarGroupSegments(ne)})}createTouchBar(){if(!!C.isMacintosh){for(let A=0;A<10;A++){const O=this.createTouchBarGroup();this.touchBarGroups.push(O)}this._win.setTouchBar(new E.TouchBar({items:this.touchBarGroups}))}}createTouchBarGroup(A=[]){const O=this.createTouchBarGroupSegments(A),U=new E.TouchBar.TouchBarSegmentedControl({segments:O,mode:"buttons",segmentStyle:"automatic",change:ne=>{this.sendWhenReady("vscode:runAction",k.CancellationToken.None,{id:U.segments[ne].id,from:"touchbar"})}});return U}createTouchBarGroupSegments(A=[]){return A.map(U=>{let ne;U.icon&&!a.ThemeIcon.isThemeIcon(U.icon)&&U.icon?.dark?.scheme===S.Schemas.file&&(ne=E.nativeImage.createFromPath(u.URI.revive(U.icon.dark).fsPath),ne.isEmpty()&&(ne=void 0));let N;return typeof U.title=="string"?N=U.title:N=U.title.value,{id:U.id,label:ne?void 0:N,icon:ne}})}dispose(){super.dispose(),this._win=null}};q.windowControlHeightStateStorageKey="windowControlHeight",q=we([te(1,n.ILogService),te(2,v.IEnvironmentMainService),te(3,oe.IPolicyService),te(4,fe.IUserDataProfilesMainService),te(5,d.IFileService),te(6,r.IApplicationStorageMainService),te(7,r.IStorageMainService),te(8,g.IConfigurationService),te(9,y.IThemeMainService),te(10,Y.IWorkspacesManagementMainService),te(11,w.IBackupMainService),te(12,c.ITelemetryService),te(13,h.IDialogMainService),te(14,l.ILifecycleMainService),te(15,s.IProductService),te(16,i.IProtocolMainService),te(17,T.IWindowsMainService),te(18,se.IStateMainService)],q),e.CodeWindow=q}),define(ee[76],ie([0,1,13,24,8,3,33,2,14,4,18,7,23,173,5,21,6,92,93,28,52,39]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesHistoryMainService=e.IWorkspacesHistoryMainService=void 0,e.IWorkspacesHistoryMainService=(0,p.createDecorator)("workspacesHistoryMainService");let n=class rt extends I.Disposable{constructor(i,o,r,c){super(),this.logService=i,this.workspacesManagementMainService=o,this.lifecycleMainService=r,this.applicationStorageMainService=c,this._onDidChangeRecentlyOpened=this._register(new R.Emitter),this.onDidChangeRecentlyOpened=this._onDidChangeRecentlyOpened.event,this.macOSRecentDocumentsUpdater=this._register(new k.ThrottledDelayer(800)),this.registerListeners()}registerListeners(){this.lifecycleMainService.when(4).then(()=>this.handleWindowsJumpList()),this._register(this.workspacesManagementMainService.onDidEnterWorkspace(i=>this.addRecentlyOpened([{workspace:i.workspace,remoteAuthority:i.window.remoteAuthority}])))}async addRecentlyOpened(i){let o=[],r=[];for(const a of i)if((0,v.isRecentWorkspace)(a))!this.workspacesManagementMainService.isUntitledWorkspace(a.workspace)&&!this.containsWorkspace(o,a.workspace)&&o.push(a);else if((0,v.isRecentFolder)(a))this.containsFolder(o,a.folderUri)||o.push(a);else{const y=this.containsFile(r,a.fileUri),M=a.fileUri.scheme===f.Schemas.file&&rt.COMMON_FILES_FILTER.indexOf((0,b.basename)(a.fileUri))>=0;!y&&!M&&(r.push(a),S.isWindows&&a.fileUri.scheme===f.Schemas.file&&E.app.addRecentDocument(a.fileUri.fsPath))}const c=await this.mergeEntriesFromStorage({workspaces:o,files:r});o=c.workspaces,r=c.files,o.length>rt.MAX_TOTAL_RECENT_ENTRIES&&(o.length=rt.MAX_TOTAL_RECENT_ENTRIES),r.length>rt.MAX_TOTAL_RECENT_ENTRIES&&(r.length=rt.MAX_TOTAL_RECENT_ENTRIES),await this.saveRecentlyOpened({workspaces:o,files:r}),this._onDidChangeRecentlyOpened.fire(),S.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments())}async removeRecentlyOpened(i){const o=y=>{const M=this.location(y);for(const T of i)if(b.extUriBiasedIgnorePathCase.isEqual(T,M))return!1;return!0},r=await this.getRecentlyOpened(),c=r.workspaces.filter(o),a=r.files.filter(o);(c.length!==r.workspaces.length||a.length!==r.files.length)&&(await this.saveRecentlyOpened({files:a,workspaces:c}),this._onDidChangeRecentlyOpened.fire(),S.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments()))}async clearRecentlyOpened(){await this.saveRecentlyOpened({workspaces:[],files:[]}),E.app.clearRecentDocuments(),this._onDidChangeRecentlyOpened.fire()}async getRecentlyOpened(){return this.mergeEntriesFromStorage()}async mergeEntriesFromStorage(i){const o=new l.ResourceMap(a=>b.extUriBiasedIgnorePathCase.getComparisonKey(a));if(i?.workspaces)for(const a of i.workspaces)o.set(this.location(a),a);const r=new l.ResourceMap(a=>b.extUriBiasedIgnorePathCase.getComparisonKey(a));if(i?.files)for(const a of i.files)r.set(this.location(a),a);const c=await this.getRecentlyOpenedFromStorage();for(const a of c.workspaces){const y=o.get(this.location(a));y?y.label=y.label??a.label:o.set(this.location(a),a)}for(const a of c.files){const y=r.get(this.location(a));y?y.label=y.label??a.label:r.set(this.location(a),a)}return{workspaces:[...o.values()],files:[...r.values()]}}async getRecentlyOpenedFromStorage(){await this.applicationStorageMainService.whenReady;let i;const o=this.applicationStorageMainService.get(rt.RECENTLY_OPENED_STORAGE_KEY,-1);if(typeof o=="string")try{i=JSON.parse(o)}catch(r){this.logService.error("Unexpected error parsing opened paths list",r)}return(0,v.restoreRecentlyOpened)(i,this.logService)}async saveRecentlyOpened(i){await this.applicationStorageMainService.whenReady,this.applicationStorageMainService.store(rt.RECENTLY_OPENED_STORAGE_KEY,JSON.stringify((0,v.toStoreData)(i)),-1,1)}location(i){return(0,v.isRecentFolder)(i)?i.folderUri:(0,v.isRecentFile)(i)?i.fileUri:i.workspace.configPath}containsWorkspace(i,o){return!!i.find(r=>(0,v.isRecentWorkspace)(r)&&r.workspace.id===o.id)}containsFolder(i,o){return!!i.find(r=>(0,v.isRecentFolder)(r)&&b.extUriBiasedIgnorePathCase.isEqual(r.folderUri,o))}containsFile(i,o){return!!i.find(r=>b.extUriBiasedIgnorePathCase.isEqual(r.fileUri,o))}async handleWindowsJumpList(){!S.isWindows||(await this.updateWindowsJumpList(),this._register(this.onDidChangeRecentlyOpened(()=>this.updateWindowsJumpList())))}async updateWindowsJumpList(){if(!S.isWindows)return;const i=[];if(i.push({type:"tasks",items:[{type:"task",title:(0,u.localize)(0,null),description:(0,u.localize)(1,null),program:process.execPath,args:"-n",iconPath:process.execPath,iconIndex:0}]}),(await this.getRecentlyOpened()).workspaces.length>0){const o=[];for(const a of E.app.getJumpListSettings().removedItems){const y=a.args;if(y){const M=/^--(folder|file)-uri\s+"([^"]+)"$/.exec(y);M&&o.push(P.URI.parse(M[2]))}}await this.removeRecentlyOpened(o);let r=!1;const c=(0,t.coalesce)((await this.getRecentlyOpened()).workspaces.slice(0,rt.MAX_WINDOWS_JUMP_LIST_ENTRIES).map(a=>{const y=(0,v.isRecentWorkspace)(a)?a.workspace:a.folderUri,{title:M,description:T}=this.getWindowsJumpListLabel(y,a.label);let _;return P.URI.isUri(y)?_=`--folder-uri "${y.toString()}"`:(r=!0,_=`--file-uri "${y.configPath.toString()}"`),{type:"task",title:M.substr(0,255),description:T.substr(0,255),program:process.execPath,args:_,iconPath:"explorer.exe",iconIndex:0}}));c.length>0&&i.push({type:"custom",name:r?(0,u.localize)(2,null):(0,u.localize)(3,null),items:c})}i.push({type:"recent"});try{const o=E.app.setJumpList(i);o&&o!=="ok"&&this.logService.warn(`updateWindowsJumpList#setJumpList unexpected result: ${o}`)}catch(o){this.logService.warn("updateWindowsJumpList#setJumpList",o)}}getWindowsJumpListLabel(i,o){if(o)return{title:(0,D.splitName)(o).name,description:o};if(P.URI.isUri(i))return{title:(0,b.basename)(i),description:this.renderJumpListPathDescription(i)};if(this.workspacesManagementMainService.isUntitledWorkspace(i))return{title:(0,u.localize)(4,null),description:""};let r=(0,b.basename)(i.configPath);return r.endsWith(m.WORKSPACE_EXTENSION)&&(r=r.substr(0,r.length-m.WORKSPACE_EXTENSION.length-1)),{title:(0,u.localize)(5,null,r),description:this.renderJumpListPathDescription(i.configPath)}}renderJumpListPathDescription(i){return i.scheme==="file"?(0,D.normalizeDriveLetter)(i.fsPath):i.toString()}async updateMacOSRecentDocuments(){if(!S.isMacintosh)return;E.app.clearRecentDocuments();const i=await this.getRecentlyOpened(),o=[];let r=0;for(let a=0;aE.app.addRecentDocument(a)),o.reverse().forEach(a=>E.app.addRecentDocument(a))}};n.MAX_TOTAL_RECENT_ENTRIES=500,n.RECENTLY_OPENED_STORAGE_KEY="history.recentlyOpenedPathsList",n.MAX_MACOS_DOCK_RECENT_WORKSPACES=7,n.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL=10,n.MAX_WINDOWS_JUMP_LIST_ENTRIES=7,n.COMMON_FILES_FILTER=["COMMIT_EDITMSG","MERGE_MSG"],n=we([te(0,g.ILogService),te(1,d.IWorkspacesManagementMainService),te(2,w.ILifecycleMainService),te(3,h.IApplicationStorageMainService)],n),e.WorkspacesHistoryMainService=n}),define(ee[268],ie([0,1,13,8,22,33,4,7,163,19,26,21,6,210,65,20,37,35,48,75,31,76]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Menubar=void 0;const n="menu";let s=class Ft{constructor(r,c,a,y,M,T,_,Y,G,V,oe){this.updateService=r,this.configurationService=c,this.windowsMainService=a,this.environmentMainService=y,this.telemetryService=M,this.workspacesHistoryMainService=T,this.stateMainService=_,this.lifecycleMainService=Y,this.logService=G,this.nativeHostMainService=V,this.productService=oe,this.fallbackMenuHandlers=Object.create(null),this.menuUpdater=new t.RunOnceScheduler(()=>this.doUpdateMenu(),0),this.menuGC=new t.RunOnceScheduler(()=>{this.oldMenus=[]},1e4),this.menubarMenus=Object.create(null),this.keybindings=Object.create(null),(D.isMacintosh||(0,m.getTitleBarStyle)(this.configurationService)==="native")&&this.restoreCachedMenubarData(),this.addFallbackHandlers(),this.closedLastWindow=!1,this.noActiveWindow=!1,this.oldMenus=[],this.install(),this.registerListeners()}restoreCachedMenubarData(){const r=this.stateMainService.getItem(Ft.lastKnownMenubarStorageKey);r&&(r.menus&&(this.menubarMenus=r.menus),r.keybindings&&(this.keybindings=r.keybindings))}addFallbackHandlers(){this.fallbackMenuHandlers["workbench.action.files.newUntitledFile"]=(T,_,Y)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:_?.id}),this.fallbackMenuHandlers["workbench.action.newWindow"]=(T,_,Y)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:_?.id}),this.fallbackMenuHandlers["workbench.action.files.openFileFolder"]=(T,_,Y)=>this.nativeHostMainService.pickFileFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(Y),telemetryExtraData:{from:n}}),this.fallbackMenuHandlers["workbench.action.files.openFolder"]=(T,_,Y)=>this.nativeHostMainService.pickFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(Y),telemetryExtraData:{from:n}}),this.fallbackMenuHandlers["workbench.action.openWorkspace"]=(T,_,Y)=>this.nativeHostMainService.pickWorkspaceAndOpen(void 0,{forceNewWindow:this.isOptionClick(Y),telemetryExtraData:{from:n}}),this.fallbackMenuHandlers["workbench.action.clearRecentFiles"]=()=>this.workspacesHistoryMainService.clearRecentlyOpened();const r=this.productService.twitterUrl;r&&(this.fallbackMenuHandlers["workbench.action.openTwitterUrl"]=()=>this.openUrl(r,"openTwitterUrl"));const c=this.productService.requestFeatureUrl;c&&(this.fallbackMenuHandlers["workbench.action.openRequestFeatureUrl"]=()=>this.openUrl(c,"openUserVoiceUrl"));const a=this.productService.reportIssueUrl;a&&(this.fallbackMenuHandlers["workbench.action.openIssueReporter"]=()=>this.openUrl(a,"openReportIssues"));const y=this.productService.licenseUrl;y&&(this.fallbackMenuHandlers["workbench.action.openLicenseUrl"]=()=>{if(D.language){const T=y.indexOf("?")>0?"&":"?";this.openUrl(`${y}${T}lang=${D.language}`,"openLicenseUrl")}else this.openUrl(y,"openLicenseUrl")});const M=this.productService.privacyStatementUrl;M&&y&&(this.fallbackMenuHandlers["workbench.action.openPrivacyStatementUrl"]=()=>{this.openUrl(M,"openPrivacyStatement")})}registerListeners(){this.lifecycleMainService.onWillShutdown(()=>this.willShutdown=!0),this.windowsMainService.onDidChangeWindowsCount(r=>this.onDidChangeWindowsCount(r)),this.nativeHostMainService.onDidBlurWindow(()=>this.onDidChangeWindowFocus()),this.nativeHostMainService.onDidFocusWindow(()=>this.onDidChangeWindowFocus())}get currentEnableMenuBarMnemonics(){const r=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof r!="boolean"?!0:r}get currentEnableNativeTabs(){if(!D.isMacintosh)return!1;const r=this.configurationService.getValue("window.nativeTabs");return typeof r!="boolean"?!1:r}updateMenu(r,c){this.menubarMenus=r.menus,this.keybindings=r.keybindings,this.stateMainService.setItem(Ft.lastKnownMenubarStorageKey,r),this.scheduleUpdateMenu()}scheduleUpdateMenu(){this.menuUpdater.schedule()}doUpdateMenu(){this.willShutdown||setTimeout(()=>{this.willShutdown||this.install()},10)}onDidChangeWindowsCount(r){!D.isMacintosh||(r.oldCount===0&&r.newCount>0||r.oldCount>0&&r.newCount===0)&&(this.closedLastWindow=r.newCount===0,this.scheduleUpdateMenu())}onDidChangeWindowFocus(){!D.isMacintosh||(this.noActiveWindow=!E.BrowserWindow.getFocusedWindow(),this.scheduleUpdateMenu())}install(){const r=E.Menu.getApplicationMenu();if(r&&this.oldMenus.push(r),Object.keys(this.menubarMenus).length===0){E.Menu.setApplicationMenu(D.isMacintosh?new E.Menu:null);return}const c=new E.Menu;let a;if(D.isMacintosh){const M=new E.Menu;a=new E.MenuItem({label:this.productService.nameShort,submenu:M}),this.setMacApplicationMenu(M),c.append(a)}if(D.isMacintosh&&!this.appMenuInstalled){this.appMenuInstalled=!0;const M=new E.Menu;M.append(new E.MenuItem({label:this.mnemonicLabel(f.localize(0,null)),click:()=>this.windowsMainService.openEmptyWindow({context:1})})),E.app.dock.setMenu(M)}if(this.shouldDrawMenu("File")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(1,null)),submenu:M});this.setMenuById(M,"File"),c.append(T)}if(this.shouldDrawMenu("Edit")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(2,null)),submenu:M});this.setMenuById(M,"Edit"),c.append(T)}if(this.shouldDrawMenu("Selection")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(3,null)),submenu:M});this.setMenuById(M,"Selection"),c.append(T)}if(this.shouldDrawMenu("View")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(4,null)),submenu:M});this.setMenuById(M,"View"),c.append(T)}if(this.shouldDrawMenu("Go")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(5,null)),submenu:M});this.setMenuById(M,"Go"),c.append(T)}if(this.shouldDrawMenu("Run")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(6,null)),submenu:M});this.setMenuById(M,"Run"),c.append(T)}if(this.shouldDrawMenu("Terminal")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(7,null)),submenu:M});this.setMenuById(M,"Terminal"),c.append(T)}let y;if(this.shouldDrawMenu("Window")){const M=new E.Menu;y=new E.MenuItem({label:this.mnemonicLabel(f.localize(8,null)),submenu:M,role:"window"}),this.setMacWindowMenu(M)}if(y&&c.append(y),this.shouldDrawMenu("Help")){const M=new E.Menu,T=new E.MenuItem({label:this.mnemonicLabel(f.localize(9,null)),submenu:M,role:"help"});this.setMenuById(M,"Help"),c.append(T)}c.items&&c.items.length>0?E.Menu.setApplicationMenu(c):E.Menu.setApplicationMenu(null),this.menuGC.schedule()}setMacApplicationMenu(r){const c=this.createMenuItem(f.localize(10,null,this.productService.nameLong),"workbench.action.showAboutDialog"),a=this.getUpdateMenuItems();let y;if(this.shouldDrawMenu("Preferences")){const se=new E.Menu;this.setMenuById(se,"Preferences"),y=new E.MenuItem({label:this.mnemonicLabel(f.localize(11,null)),submenu:se})}const M=new E.Menu,T=new E.MenuItem({label:f.localize(12,null),role:"services",submenu:M}),_=new E.MenuItem({label:f.localize(13,null,this.productService.nameLong),role:"hide",accelerator:"Command+H"}),Y=new E.MenuItem({label:f.localize(14,null),role:"hideOthers",accelerator:"Command+Alt+H"}),G=new E.MenuItem({label:f.localize(15,null),role:"unhide"}),V=new E.MenuItem(this.likeAction("workbench.action.quit",{label:f.localize(16,null,this.productService.nameLong),click:async(se,ae,fe)=>{const K=this.windowsMainService.getLastActiveWindow();(this.windowsMainService.getWindowCount()===0||!!E.BrowserWindow.getFocusedWindow()||K?.isMinimized())&&await this.confirmBeforeQuit(fe)&&this.nativeHostMainService.quit(void 0)}})),oe=[c];oe.push(...a),y&&oe.push(i(),y),oe.push(i(),T,i(),_,Y,G,i(),V),oe.forEach(se=>r.append(se))}async confirmBeforeQuit(r){if(this.windowsMainService.getWindowCount()===0)return!0;const c=this.configurationService.getValue("window.confirmBeforeClose");if(c==="always"||c==="keyboardOnly"&&this.isKeyboardEvent(r)){const a={title:this.productService.nameLong,type:"question",buttons:[(0,R.mnemonicButtonLabel)(f.localize(17,null)),(0,R.mnemonicButtonLabel)(f.localize(18,null))],message:f.localize(19,null),noLink:!0,defaultId:0,cancelId:1},{response:y}=await this.nativeHostMainService.showMessageBox(this.windowsMainService.getFocusedWindow()?.id,a);return y===0}return!0}shouldDrawMenu(r){if(!D.isMacintosh&&(0,m.getTitleBarStyle)(this.configurationService)==="custom")return!1;switch(r){case"File":case"Help":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus&&!!this.menubarMenus[r];case"Window":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus;default:return this.windowsMainService.getWindowCount()>0&&!!this.menubarMenus&&!!this.menubarMenus[r]}}setMenu(r,c){c.forEach(a=>{if((0,u.isMenubarMenuItemSeparator)(a))r.append(i());else if((0,u.isMenubarMenuItemSubmenu)(a)){const y=new E.Menu,M=new E.MenuItem({label:this.mnemonicLabel(a.label),submenu:y});this.setMenu(y,a.submenu.items),r.append(M)}else(0,u.isMenubarMenuItemRecentAction)(a)?r.append(this.createOpenRecentMenuItem(a)):(0,u.isMenubarMenuItemAction)(a)&&(a.id==="workbench.action.showAboutDialog"&&this.insertCheckForUpdatesItems(r),D.isMacintosh?this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow?this.fallbackMenuHandlers[a.id]?r.append(new E.MenuItem(this.likeAction(a.id,{label:this.mnemonicLabel(a.label),click:this.fallbackMenuHandlers[a.id]}))):r.append(this.createMenuItem(a.label,a.id,!1,a.checked)):r.append(this.createMenuItem(a.label,a.id,a.enabled!==!1,!!a.checked)):r.append(this.createMenuItem(a.label,a.id,a.enabled!==!1,!!a.checked)))})}setMenuById(r,c){this.menubarMenus&&this.menubarMenus[c]&&this.setMenu(r,this.menubarMenus[c].items)}insertCheckForUpdatesItems(r){const c=this.getUpdateMenuItems();c.length&&(c.forEach(a=>r.append(a)),r.append(i()))}createOpenRecentMenuItem(r){const c=I.URI.revive(r.uri),a=r.id,y=a==="openRecentFile"?{fileUri:c}:a==="openRecentWorkspace"?{workspaceUri:c}:{folderUri:c};return new E.MenuItem(this.likeAction(a,{label:r.label,click:async(M,T,_)=>{const Y=this.isOptionClick(_);(await this.windowsMainService.open({context:2,cli:this.environmentMainService.args,urisToOpen:[y],forceNewWindow:Y,gotoLineMode:!1,remoteAuthority:r.remoteAuthority})).length>0||await this.workspacesHistoryMainService.removeRecentlyOpened([c])}},!1))}isOptionClick(r){return!!(r&&(!D.isMacintosh&&(r.ctrlKey||r.shiftKey)||D.isMacintosh&&(r.metaKey||r.altKey)))}isKeyboardEvent(r){return!!(r.triggeredByAccelerator||r.altKey||r.ctrlKey||r.metaKey||r.shiftKey)}createRoleMenuItem(r,c,a){const y={label:this.mnemonicLabel(r),role:a,enabled:!0};return new E.MenuItem(this.withKeybinding(c,y))}setMacWindowMenu(r){const c=new E.MenuItem({label:f.localize(20,null),role:"minimize",accelerator:"Command+M",enabled:this.windowsMainService.getWindowCount()>0}),a=new E.MenuItem({label:f.localize(21,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),y=new E.MenuItem({label:f.localize(22,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),M=this.createMenuItem(f.localize(23,null),"workbench.action.switchWindow"),T=[];this.currentEnableNativeTabs&&(T.push(i()),T.push(this.createMenuItem(f.localize(24,null),"workbench.action.newWindowTab")),T.push(this.createRoleMenuItem(f.localize(25,null),"workbench.action.showPreviousWindowTab","selectPreviousTab")),T.push(this.createRoleMenuItem(f.localize(26,null),"workbench.action.showNextWindowTab","selectNextTab")),T.push(this.createRoleMenuItem(f.localize(27,null),"workbench.action.moveWindowTabToNewWindow","moveTabToNewWindow")),T.push(this.createRoleMenuItem(f.localize(28,null),"workbench.action.mergeAllWindowTabs","mergeAllWindows"))),[c,a,i(),M,...T,i(),y].forEach(_=>r.append(_))}getUpdateMenuItems(){switch(this.updateService.state.type){case"uninitialized":return[];case"idle":return[new E.MenuItem({label:this.mnemonicLabel(f.localize(29,null)),click:()=>setTimeout(()=>{this.reportMenuActionTelemetry("CheckForUpdate"),this.updateService.checkForUpdates(!0)},0)})];case"checking for updates":return[new E.MenuItem({label:f.localize(30,null),enabled:!1})];case"available for download":return[new E.MenuItem({label:this.mnemonicLabel(f.localize(31,null)),click:()=>{this.updateService.downloadUpdate()}})];case"downloading":return[new E.MenuItem({label:f.localize(32,null),enabled:!1})];case"downloaded":return[new E.MenuItem({label:this.mnemonicLabel(f.localize(33,null)),click:()=>{this.reportMenuActionTelemetry("InstallUpdate"),this.updateService.applyUpdate()}})];case"updating":return[new E.MenuItem({label:f.localize(34,null),enabled:!1})];case"ready":return[new E.MenuItem({label:this.mnemonicLabel(f.localize(35,null)),click:()=>{this.reportMenuActionTelemetry("RestartToUpdate"),this.updateService.quitAndInstall()}})]}}createMenuItem(r,c,a,y){const M=this.mnemonicLabel(r),T=typeof c=="function"?c:(oe,se,ae)=>{const fe=oe?oe.userSettingsLabel:null;let K=c;Array.isArray(c)&&(K=this.isOptionClick(ae)?c[1]:c[0]),fe&&ae.triggeredByAccelerator?this.runActionInRenderer({type:"keybinding",userSettingsLabel:fe}):this.runActionInRenderer({type:"commandId",commandId:K})},_=typeof a=="boolean"?a:this.windowsMainService.getWindowCount()>0,Y=typeof y=="boolean"?y:!1,G={label:M,click:T,enabled:_};Y&&(G.type="checkbox",G.checked=Y);let V;return typeof c=="string"?V=c:Array.isArray(c)&&(V=c[0]),D.isMacintosh&&(V==="editor.action.clipboardCutAction"?G.role="cut":V==="editor.action.clipboardCopyAction"?G.role="copy":V==="editor.action.clipboardPasteAction"&&(G.role="paste"),V==="undo"?G.click=this.makeContextAwareClickHandler(T,{inDevTools:oe=>oe.undo(),inNoWindow:()=>E.Menu.sendActionToFirstResponder("undo:")}):V==="redo"?G.click=this.makeContextAwareClickHandler(T,{inDevTools:oe=>oe.redo(),inNoWindow:()=>E.Menu.sendActionToFirstResponder("redo:")}):V==="editor.action.selectAll"&&(G.click=this.makeContextAwareClickHandler(T,{inDevTools:oe=>oe.selectAll(),inNoWindow:()=>E.Menu.sendActionToFirstResponder("selectAll:")}))),new E.MenuItem(this.withKeybinding(V,G))}makeContextAwareClickHandler(r,c){return(a,y,M)=>{const T=E.BrowserWindow.getFocusedWindow();if(!T)return c.inNoWindow();if(T.webContents.isDevToolsFocused()&&T.webContents.devToolsWebContents)return c.inDevTools(T.webContents.devToolsWebContents);r(a,y||T,M)}}runActionInRenderer(r){let c=E.BrowserWindow.getFocusedWindow();if(!c){const y=this.windowsMainService.getLastActiveWindow();y?.isMinimized()&&(c=y.win)}const a=c?this.windowsMainService.getWindowById(c.id):void 0;if(a){if(this.logService.trace("menubar#runActionInRenderer",r),D.isMacintosh&&!this.environmentMainService.isBuilt&&!a.isReady&&(r.type==="commandId"&&r.commandId==="workbench.action.toggleDevTools"||r.type!=="commandId"&&r.userSettingsLabel==="alt+cmd+i"))return;if(r.type==="commandId"){const y={id:r.commandId,from:"menu"};a.sendWhenReady("vscode:runAction",k.CancellationToken.None,y)}else{const y={userSettingsLabel:r.userSettingsLabel};a.sendWhenReady("vscode:runKeybinding",k.CancellationToken.None,y)}}else this.logService.trace("menubar#runActionInRenderer: no active window found",r)}withKeybinding(r,c){const a=typeof r=="string"?this.keybindings[r]:void 0;if(a?.label){if(a.isNative!==!1)c.accelerator=a.label,c.userSettingsLabel=a.userSettingsLabel;else if(typeof c.label=="string"){const y=c.label.indexOf("[");y>=0?c.label=`${c.label.substr(0,y)} [${a.label}]`:c.label=`${c.label} [${a.label}]`}}else c.accelerator=void 0;return c}likeAction(r,c,a=!c.accelerator){a&&(c=this.withKeybinding(r,c));const y=c.click;return c.click=(M,T,_)=>{this.reportMenuActionTelemetry(r),y?.(M,T,_)},c}openUrl(r,c){this.nativeHostMainService.openExternal(void 0,r),this.reportMenuActionTelemetry(c)}reportMenuActionTelemetry(r){this.telemetryService.publicLog2("workbenchActionExecuted",{id:r,from:n})}mnemonicLabel(r){return(0,R.mnemonicMenuLabel)(r,!this.currentEnableMenuBarMnemonics)}};s.lastKnownMenubarStorageKey="lastKnownMenubarData",s=we([te(0,v.IUpdateService),te(1,S.IConfigurationService),te(2,d.IWindowsMainService),te(3,b.IEnvironmentMainService),te(4,h.ITelemetryService),te(5,l.IWorkspacesHistoryMainService),te(6,g.IStateMainService),te(7,P.ILifecycleMainService),te(8,C.ILogService),te(9,p.INativeHostMainService),te(10,w.IProductService)],s),e.Menubar=s;function i(){return new E.MenuItem({type:"separator"})}}),define(ee[269],ie([0,1,5,21,6,268]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenubarMainService=e.IMenubarMainService=void 0,e.IMenubarMainService=(0,E.createDecorator)("menubarMainService");let D=class{constructor(f,S,b){this.instantiationService=f,this.lifecycleMainService=S,this.logService=b,this.menubar=this.installMenuBarAfterWindowOpen()}async installMenuBarAfterWindowOpen(){return await this.lifecycleMainService.when(3),this.instantiationService.createInstance(R.Menubar)}async updateMenubar(f,S){this.logService.trace("menubarService#updateMenubar",f),(await this.menubar).updateMenu(S,f)}};D=we([te(0,E.IInstantiationService),te(1,t.ILifecycleMainService),te(2,k.ILogService)],D),e.MenubarMainService=D}),define(ee[270],ie([0,1,13,23,27,24,22,3,30,49,33,2,14,9,72,4,32,18,12,7,171,60,19,56,26,15,5,21,6,54,20,61,63,37,75,267,117,262,28,94,76,52,64,36,42]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T,_,Y,G,V,oe,se,ae,fe,K,q,F,A,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsMainService=void 0;function U($){return(0,ae.isWorkspaceIdentifier)($?.workspace)}function ne($){return(0,ae.isSingleFolderWorkspaceIdentifier)($?.workspace)}let N=class ft extends P.Disposable{constructor(L,W,j,H,X,re,B,x,Z,ce,ge,De,Te,Me,Le,ve,pe,Se){super(),this.machineId=L,this.initialUserEnv=W,this.logService=j,this.stateMainService=H,this.policyService=X,this.environmentMainService=re,this.userDataProfilesMainService=B,this.lifecycleMainService=x,this.backupMainService=Z,this.configurationService=ce,this.workspacesHistoryMainService=ge,this.workspacesManagementMainService=De,this.instantiationService=Te,this.dialogMainService=Me,this.fileService=Le,this.productService=ve,this.protocolMainService=pe,this.themeMainService=Se,this._onDidOpenWindow=this._register(new I.Emitter),this.onDidOpenWindow=this._onDidOpenWindow.event,this._onDidSignalReadyWindow=this._register(new I.Emitter),this.onDidSignalReadyWindow=this._onDidSignalReadyWindow.event,this._onDidDestroyWindow=this._register(new I.Emitter),this.onDidDestroyWindow=this._onDidDestroyWindow.event,this._onDidChangeWindowsCount=this._register(new I.Emitter),this.onDidChangeWindowsCount=this._onDidChangeWindowsCount.event,this._onDidTriggerSystemContextMenu=this._register(new I.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this.windowsStateHandler=this._register(new se.WindowsStateHandler(this,this.stateMainService,this.lifecycleMainService,this.logService,this.configurationService)),this.registerListeners()}registerListeners(){this._register(this.workspacesManagementMainService.onDidEnterWorkspace(L=>this._onDidSignalReadyWindow.fire(L.window))),this._register(this.onDidSignalReadyWindow(L=>{if(L.config?.extensionDevelopmentPath||L.config?.extensionTestsPath){const W=new P.DisposableStore;if(W.add(I.Event.any(L.onDidClose,L.onDidDestroy)(()=>W.dispose())),L.config.extensionDevelopmentPath)for(const j of L.config.extensionDevelopmentPath)W.add(this.protocolMainService.addValidFileRoot(j));L.config.extensionTestsPath&&W.add(this.protocolMainService.addValidFileRoot(L.config.extensionTestsPath))}}))}openEmptyWindow(L,W){const j=this.environmentMainService.args,H=W?.remoteAuthority||void 0,X=!0,re=W?.forceReuseWindow,B=!re;return this.open({...L,cli:j,forceEmpty:X,forceNewWindow:B,forceReuseWindow:re,remoteAuthority:H})}openExistingWindow(L,W){L.focus(),this.handleWaitMarkerFile(W,[L])}async open(L){this.logService.trace("windowsManager#open"),L.addMode&&(L.initialStartup||!this.getLastActiveWindow())&&(L.addMode=!1);const W=[],j=[],H=[],X=[],re=[];let B,x=0;const Z=await this.getPathsToOpen(L);this.logService.trace("windowsManager#open pathsToOpen",Z);for(const Me of Z)ne(Me)?L.addMode?W.push(Me):j.push(Me):U(Me)?H.push(Me):Me.fileUri?(B||(B={filesToOpenOrCreate:[],filesToDiff:[],filesToMerge:[],remoteAuthority:Me.remoteAuthority}),B.filesToOpenOrCreate.push(Me)):Me.backupPath?re.push({backupFolder:(0,u.basename)(Me.backupPath),remoteAuthority:Me.remoteAuthority}):x++;L.diffMode&&B&&B.filesToOpenOrCreate.length>=2&&(B.filesToDiff=B.filesToOpenOrCreate.slice(0,2),B.filesToOpenOrCreate=[]),L.mergeMode&&B&&B.filesToOpenOrCreate.length===4&&(B.filesToMerge=B.filesToOpenOrCreate.slice(0,4),B.filesToOpenOrCreate=[],B.filesToDiff=[]),B&&L.waitMarkerFileURI&&(B.filesToWait={paths:(0,R.coalesce)([...B.filesToDiff,B.filesToMerge[3],...B.filesToOpenOrCreate]),waitMarkerFileUri:L.waitMarkerFileURI}),L.initialStartup?(X.push(...this.workspacesManagementMainService.getUntitledWorkspaces()),H.push(...X),re.push(...this.backupMainService.getEmptyWindowBackups())):re.length=0;const{windows:ce,filesOpenedInWindow:ge}=await this.doOpen(L,H,j,re,x,B,W);if(this.logService.trace(`windowsManager#open used window count ${ce.length} (workspacesToOpen: ${H.length}, foldersToOpen: ${j.length}, emptyToRestore: ${re.length}, emptyToOpen: ${x})`),ce.length>1)if(ge)ge.focus();else{const Me=this.windowsStateHandler.state.lastActiveWindow&&!L.forceEmpty&&!L.cli._.length&&!L.cli["file-uri"]&&!L.cli["folder-uri"]&&!(L.urisToOpen&&L.urisToOpen.length);let Le=!0,ve=!0;if(Me){const pe=ce.filter(Se=>this.windowsStateHandler.state.lastActiveWindow&&Se.backupPath===this.windowsStateHandler.state.lastActiveWindow.backupPath);pe.length&&(pe[0].focus(),Le=!1,ve=!1)}if(Le)for(let pe=ce.length-1;pe>=0;pe--){const Se=ce[pe];if(!(Se.openedWorkspace&&X.some(ke=>Se.openedWorkspace&&ke.workspace.id===Se.openedWorkspace.id)||Se.backupPath&&re.some(ke=>Se.backupPath&&ke.backupFolder===(0,u.basename)(Se.backupPath)))){Se.focus(),ve=!1;break}}ve&&ce[ce.length-1].focus()}const De=B&&B.filesToDiff.length>0,Te=B&&B.filesToMerge.length>0;if(!ce.some(Me=>Me.isExtensionDevelopmentHost)&&!De&&!Te&&!L.noRecentEntry){const Me=[];for(const Le of Z)U(Le)&&!Le.transient?Me.push({label:Le.label,workspace:Le.workspace,remoteAuthority:Le.remoteAuthority}):ne(Le)?Me.push({label:Le.label,folderUri:Le.workspace.uri,remoteAuthority:Le.remoteAuthority}):Le.fileUri&&Me.push({label:Le.label,fileUri:Le.fileUri,remoteAuthority:Le.remoteAuthority});this.workspacesHistoryMainService.addRecentlyOpened(Me)}return this.handleWaitMarkerFile(L,ce),ce}handleWaitMarkerFile(L,W){const j=L.waitMarkerFileURI;L.context===0&&j&&W.length===1&&W[0]&&(async()=>{await W[0].whenClosedOrLoaded;try{await this.fileService.del(j)}catch{}})()}async doOpen(L,W,j,H,X,re,B){const x=[];let Z;function ce(pe,Se){x.push(pe),Se&&(Z=pe,re=void 0)}let{openFolderInNewWindow:ge,openFilesInNewWindow:De}=this.shouldOpenNewWindow(L);if(!L.initialStartup&&B.length>0){const pe=B[0].remoteAuthority,Se=this.getLastActiveWindowForAuthority(pe);Se&&ce(this.doAddFoldersToExistingWindow(Se,B.map(ke=>ke.workspace.uri)))}const Te=j.length+W.length+H.length;if(re&&Te===0){const pe=re.filesToOpenOrCreate[0]||re.filesToDiff[0]||re.filesToMerge[3],Se=this.getWindows().filter(J=>re&&(0,h.isEqualAuthority)(J.remoteAuthority,re.remoteAuthority));let ke;pe?.fileUri&&!De&&((L.context===4||L.context===0||L.context===1)&&(ke=await(0,oe.findWindowOnFile)(Se,pe.fileUri,async J=>J.configPath.scheme===C.Schemas.file?this.workspacesManagementMainService.resolveLocalWorkspace(J.configPath):void 0)),ke||(ke=this.doGetLastActiveWindow(Se))),ke?(0,ae.isWorkspaceIdentifier)(ke.openedWorkspace)?W.push({workspace:ke.openedWorkspace,remoteAuthority:ke.remoteAuthority}):(0,ae.isSingleFolderWorkspaceIdentifier)(ke.openedWorkspace)?j.push({workspace:ke.openedWorkspace,remoteAuthority:ke.remoteAuthority}):ce(this.doOpenFilesInExistingWindow(L,ke,re),!0):ce(this.openInBrowserWindow({userEnv:L.userEnv,cli:L.cli,initialStartup:L.initialStartup,filesToOpen:re,forceNewWindow:!0,remoteAuthority:re.remoteAuthority,forceNewTabbedWindow:L.forceNewTabbedWindow,profile:L.profile}),!0)}const Me=(0,R.distinct)(W,pe=>pe.workspace.id);if(Me.length>0){const pe=(0,R.coalesce)(Me.map(Se=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Se.workspace.configPath)));if(pe.length>0){const Se=pe[0],ke=(0,h.isEqualAuthority)(re?.remoteAuthority,Se.remoteAuthority)?re:void 0;ce(this.doOpenFilesInExistingWindow(L,Se,ke),!!ke),ge=!0}for(const Se of Me){if(pe.some(ue=>ue.openedWorkspace&&ue.openedWorkspace.id===Se.workspace.id))continue;const ke=Se.remoteAuthority,J=(0,h.isEqualAuthority)(re?.remoteAuthority,ke)?re:void 0;ce(this.doOpenFolderOrWorkspace(L,Se,ge,J),!!J),ge=!0}}const Le=(0,R.distinct)(j,pe=>h.extUriBiasedIgnorePathCase.getComparisonKey(pe.workspace.uri));if(Le.length>0){const pe=(0,R.coalesce)(Le.map(Se=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Se.workspace.uri)));if(pe.length>0){const Se=pe[0],ke=(0,h.isEqualAuthority)(re?.remoteAuthority,Se.remoteAuthority)?re:void 0;ce(this.doOpenFilesInExistingWindow(L,Se,ke),!!ke),ge=!0}for(const Se of Le){if(pe.some(ue=>(0,ae.isSingleFolderWorkspaceIdentifier)(ue.openedWorkspace)&&h.extUriBiasedIgnorePathCase.isEqual(ue.openedWorkspace.uri,Se.workspace.uri)))continue;const ke=Se.remoteAuthority,J=(0,h.isEqualAuthority)(re?.remoteAuthority,ke)?re:void 0;ce(this.doOpenFolderOrWorkspace(L,Se,ge,J),!!J),ge=!0}}const ve=(0,R.distinct)(H,pe=>pe.backupFolder);if(ve.length>0)for(const pe of ve){const Se=pe.remoteAuthority,ke=(0,h.isEqualAuthority)(re?.remoteAuthority,Se)?re:void 0;ce(this.doOpenEmpty(L,!0,Se,ke,pe),!!ke),ge=!0}if(x.length===0||re){re&&!X&&X++;const pe=re?re.remoteAuthority:L.remoteAuthority;for(let Se=0;Se0?(W=await this.doExtractPathsFromAPI(L),j=!0):L.forceEmpty?W=[Object.create(null)]:L.cli._.length||L.cli["folder-uri"]||L.cli["file-uri"]?(W=await this.doExtractPathsFromCLI(L.cli),W.length===0&&W.push(Object.create(null)),j=!0):(W=await this.doGetPathsFromLastSession(),W.length===0&&W.push(Object.create(null)),H=!0),!L.addMode&&j){const X=W.filter(re=>ne(re));if(X.length>1){const re=X[0].remoteAuthority;if(X.every(B=>(0,h.isEqualAuthority)(B.remoteAuthority,re))){const B=await this.workspacesManagementMainService.createUntitledWorkspace(X.map(x=>({uri:x.workspace.uri})));W.push({workspace:B,remoteAuthority:re}),W=W.filter(x=>!ne(x))}}}if(L.initialStartup&&!H&&this.configurationService.getValue("window")?.restoreWindows==="preserve"){const X=await this.doGetPathsFromLastSession();W.unshift(...X.filter(re=>U(re)||ne(re)||re.backupPath))}return W}async doExtractPathsFromAPI(L){const W={gotoLineMode:L.gotoLineMode,remoteAuthority:L.remoteAuthority},j=await Promise.all((0,R.coalesce)(L.urisToOpen||[]).map(async H=>{const X=await this.resolveOpenable(H,W);if(X)return X.label=H.label,X;const re=this.resourceFromOpenable(H),B={title:this.productService.nameLong,type:"info",buttons:[(0,b.mnemonicButtonLabel)((0,d.localize)(0,null))],defaultId:0,message:re.scheme===C.Schemas.file?(0,d.localize)(1,null):(0,d.localize)(2,null),detail:re.scheme===C.Schemas.file?(0,d.localize)(3,null,(0,b.getPathLabel)(re,{os:w.OS,tildify:this.environmentMainService})):(0,d.localize)(4,null,re.toString(!0)),noLink:!0};this.dialogMainService.showMessageBox(B,(0,v.withNullAsUndefined)(E.BrowserWindow.getFocusedWindow()))}));return(0,R.coalesce)(j)}async doExtractPathsFromCLI(L){const W=[],j={ignoreFileNotFound:!0,gotoLineMode:L.goto,remoteAuthority:L.remote||void 0,forceOpenWorkspaceAsFile:L.diff&&L._.length===2||L.merge&&L._.length===4},H=L["folder-uri"];if(H){const B=await Promise.all(H.map(x=>{const Z=this.cliArgToUri(x);if(!!Z)return this.resolveOpenable({folderUri:Z},j)}));W.push(...(0,R.coalesce)(B))}const X=L["file-uri"];if(X){const B=await Promise.all(X.map(x=>{const Z=this.cliArgToUri(x);if(!!Z)return this.resolveOpenable((0,ae.hasWorkspaceFileExtension)(x)?{workspaceUri:Z}:{fileUri:Z},j)}));W.push(...(0,R.coalesce)(B))}const re=await Promise.all(L._.map(B=>j.remoteAuthority?this.doResolveRemotePath(B,j):this.doResolveFilePath(B,j)));return W.push(...(0,R.coalesce)(re)),W}cliArgToUri(L){try{const W=m.URI.parse(L);if(!W.scheme){this.logService.error(`Invalid URI input string, scheme missing: ${L}`);return}return W}catch(W){this.logService.error(`Invalid URI input string: ${L}, ${W.message}`)}}async doGetPathsFromLastSession(){const L=this.getRestoreWindowsSetting();switch(L){case"none":return[];case"one":case"all":case"preserve":case"folders":{const W=[];L!=="one"&&W.push(...this.windowsStateHandler.state.openedWindows),this.windowsStateHandler.state.lastActiveWindow&&W.push(this.windowsStateHandler.state.lastActiveWindow);const j=await Promise.all(W.map(async H=>{if(H.workspace){const X=await this.resolveOpenable({workspaceUri:H.workspace.configPath},{remoteAuthority:H.remoteAuthority,rejectTransientWorkspaces:!0});if(U(X))return X}else if(H.folderUri){const X=await this.resolveOpenable({folderUri:H.folderUri},{remoteAuthority:H.remoteAuthority});if(ne(X))return X}else if(L!=="folders"&&H.backupPath)return{backupPath:H.backupPath,remoteAuthority:H.remoteAuthority}}));return(0,R.coalesce)(j)}}}getRestoreWindowsSetting(){let L;return this.lifecycleMainService.wasRestarted?L="all":(L=this.configurationService.getValue("window")?.restoreWindows||"all",["preserve","all","folders","one","none"].includes(L)||(L="all")),L}async resolveOpenable(L,W=Object.create(null)){const j=this.resourceFromOpenable(L);return j.scheme===C.Schemas.file?((0,G.isFileToOpen)(L)&&(W={...W,forceOpenWorkspaceAsFile:!0}),this.doResolveFilePath(j.fsPath,W)):this.doResolveRemoteOpenable(L,W)}doResolveRemoteOpenable(L,W){let j=this.resourceFromOpenable(L);const H=(0,_.getRemoteAuthority)(j)||W.remoteAuthority;if(j=(0,h.removeTrailingPathSeparator)((0,h.normalizePath)(j)),(0,G.isFileToOpen)(L)){if(W.gotoLineMode){const{path:X,line:re,column:B}=(0,f.parseLineAndColumnAware)(j.path);return{fileUri:j.with({path:X}),options:{selection:re?{startLineNumber:re,startColumn:B||1}:void 0},remoteAuthority:H}}return{fileUri:j,remoteAuthority:H}}else if((0,G.isWorkspaceToOpen)(L))return{workspace:(0,fe.getWorkspaceIdentifier)(j),remoteAuthority:H};return{workspace:(0,fe.getSingleFolderWorkspaceIdentifier)(j),remoteAuthority:H}}resourceFromOpenable(L){return(0,G.isWorkspaceToOpen)(L)?L.workspaceUri:(0,G.isFolderToOpen)(L)?L.folderUri:L.fileUri}async doResolveFilePath(L,W){let j,H;W.gotoLineMode&&({path:L,line:j,column:H}=(0,f.parseLineAndColumnAware)(L)),L=(0,f.sanitizeFilePath)((0,u.normalize)(L),(0,g.cwd)());try{const X=await t.Promises.stat(L);if(X.isFile()){if(!W.forceOpenWorkspaceAsFile){const re=await this.workspacesManagementMainService.resolveLocalWorkspace(m.URI.file(L));if(re)return re.transient&&W.rejectTransientWorkspaces?void 0:{workspace:{id:re.id,configPath:re.configPath},type:o.FileType.File,exists:!0,remoteAuthority:re.remoteAuthority,transient:re.transient}}return{fileUri:m.URI.file(L),type:o.FileType.File,exists:!0,options:{selection:j?{startLineNumber:j,startColumn:H||1}:void 0}}}else{if(X.isDirectory())return{workspace:(0,fe.getSingleFolderWorkspaceIdentifier)(m.URI.file(L),X),type:o.FileType.Directory,exists:!0};if(!w.isWindows&&L==="/dev/null")return{fileUri:m.URI.file(L),type:o.FileType.File,exists:!0}}}catch{const re=m.URI.file(L);if(this.workspacesHistoryMainService.removeRecentlyOpened([re]),W.ignoreFileNotFound)return{fileUri:re,type:o.FileType.File,exists:!1}}}doResolveRemotePath(L,W){const j=L.charCodeAt(0),H=W.remoteAuthority;let X,re;W.gotoLineMode&&({path:L,line:X,column:re}=(0,f.parseLineAndColumnAware)(L)),j!==47&&((0,f.isWindowsDriveLetter)(j)&&L.charCodeAt(L.charCodeAt(1))===58&&(L=(0,f.toSlashes)(L)),L=`/${L}`);const B=m.URI.from({scheme:C.Schemas.vscodeRemote,authority:H,path:L});if(L.charCodeAt(L.length-1)!==47){if((0,ae.hasWorkspaceFileExtension)(L))return W.forceOpenWorkspaceAsFile?{fileUri:B,options:{selection:X?{startLineNumber:X,startColumn:re||1}:void 0},remoteAuthority:W.remoteAuthority}:{workspace:(0,fe.getWorkspaceIdentifier)(B),remoteAuthority:H};if(W.gotoLineMode||u.posix.basename(L).indexOf(".")!==-1)return{fileUri:B,options:{selection:X?{startLineNumber:X,startColumn:re||1}:void 0},remoteAuthority:H}}return{workspace:(0,fe.getSingleFolderWorkspaceIdentifier)(B),remoteAuthority:H}}shouldOpenNewWindow(L){const W=this.configurationService.getValue("window"),j=W?.openFoldersInNewWindow||"default",H=W?.openFilesInNewWindow||"off";let X=(L.preferNewWindow||L.forceNewWindow)&&!L.forceReuseWindow;!L.forceNewWindow&&!L.forceReuseWindow&&(j==="on"||j==="off")&&(X=j==="on");let re=!1;return L.forceNewWindow||L.forceReuseWindow?re=!!L.forceNewWindow&&!L.forceReuseWindow:(w.isMacintosh?L.context===1&&(re=!0):L.context!==3&&L.context!==2&&!(L.userEnv&&L.userEnv.TERM_PROGRAM==="vscode")&&(re=!0),!L.cli.extensionDevelopmentPath&&(H==="on"||H==="off")&&(re=H==="on")),{openFolderInNewWindow:!!X,openFilesInNewWindow:re}}async openExtensionDevelopmentHostWindow(L,W){const j=(0,oe.findWindowOnExtensionDevelopmentPath)(this.getWindows(),L);if(j)return this.lifecycleMainService.reload(j,W.cli),j.focus(),[j];let H=W.cli["folder-uri"]||[],X=W.cli["file-uri"]||[],re=W.cli._;if(!re.length&&!H.length&&!X.length&&!W.cli.extensionTestsPath){const Z=this.windowsStateHandler.state.lastPluginDevelopmentHostWindow,ce=Z?.workspace??Z?.folderUri;ce&&(m.URI.isUri(ce)?ce.scheme===C.Schemas.file?re=[ce.fsPath]:H=[ce.toString()]:ce.configPath.scheme===C.Schemas.file?re=[(0,h.originalFSPath)(ce.configPath)]:X=[ce.configPath.toString()])}let B=W.remoteAuthority;for(const Z of L)if(Z.match(/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/)){const ce=m.URI.parse(Z),ge=(0,_.getRemoteAuthority)(ce);ge&&(B?(0,h.isEqualAuthority)(ge,B)||this.logService.error("more than one extension development path authority"):B=ge)}re=re.filter(Z=>{const ce=m.URI.file(Z);return(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),ce)?!1:(0,h.isEqualAuthority)((0,_.getRemoteAuthority)(ce),B)}),H=H.filter(Z=>{const ce=this.cliArgToUri(Z);return ce&&!!(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),ce)?!1:ce?(0,h.isEqualAuthority)((0,_.getRemoteAuthority)(ce),B):!1}),X=X.filter(Z=>{const ce=this.cliArgToUri(Z);return ce&&!!(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),ce)?!1:ce?(0,h.isEqualAuthority)((0,_.getRemoteAuthority)(ce),B):!1}),W.cli._=re,W.cli["folder-uri"]=H,W.cli["file-uri"]=X;const x={context:W.context,cli:W.cli,forceNewWindow:!0,forceEmpty:!re.length&&!H.length&&!X.length,userEnv:W.userEnv,noRecentEntry:!0,waitMarkerFileURI:W.waitMarkerFileURI,remoteAuthority:B,profile:W.profile};return this.open(x)}openInBrowserWindow(L){const W=this.configurationService.getValue("window"),j={...this.environmentMainService.args,...L.cli,machineId:this.machineId,windowId:-1,mainPid:process.pid,appRoot:this.environmentMainService.appRoot,execPath:process.execPath,codeCachePath:this.environmentMainService.codeCachePath,backupPath:L.emptyWindowBackupInfo?(0,u.join)(this.environmentMainService.backupHome,L.emptyWindowBackupInfo.backupFolder):void 0,profiles:{all:this.userDataProfilesMainService.profiles,profile:this.resolveProfileForBrowserWindow(L)},homeDir:this.environmentMainService.userHome.fsPath,tmpDir:this.environmentMainService.tmpDir.fsPath,userDataDir:this.environmentMainService.userDataPath,remoteAuthority:L.remoteAuthority,workspace:L.workspace,userEnv:{...this.initialUserEnv,...L.userEnv},filesToOpenOrCreate:L.filesToOpen?.filesToOpenOrCreate,filesToDiff:L.filesToOpen?.filesToDiff,filesToMerge:L.filesToOpen?.filesToMerge,filesToWait:L.filesToOpen?.filesToWait,logLevel:this.logService.getLevel(),logsPath:this.environmentMainService.logsPath,product:y.default,isInitialStartup:L.initialStartup,perfMarks:(0,p.getMarks)(),os:{release:(0,k.release)(),hostname:(0,k.hostname)()},zoomLevel:typeof W?.zoomLevel=="number"?W.zoomLevel:void 0,autoDetectHighContrast:W?.autoDetectHighContrast??!0,autoDetectColorScheme:W?.autoDetectColorScheme??!1,accessibilitySupport:E.app.accessibilitySupportEnabled,colorScheme:this.themeMainService.getColorScheme(),policiesData:this.policyService.serialize(),continueOn:this.environmentMainService.continueOn};let H;if(!L.forceNewWindow&&!L.forceNewTabbedWindow&&(H=L.windowToUse||this.getLastActiveWindow(),H&&H.focus()),H){const X=H.config;!j.extensionDevelopmentPath&&X?.extensionDevelopmentPath&&(j.extensionDevelopmentPath=X.extensionDevelopmentPath,j.extensionDevelopmentKind=X.extensionDevelopmentKind,j["enable-proposed-api"]=X["enable-proposed-api"],j.verbose=X.verbose,j["inspect-extensions"]=X["inspect-extensions"],j["inspect-brk-extensions"]=X["inspect-brk-extensions"],j.debugId=X.debugId,j.extensionEnvironment=X.extensionEnvironment,j["extensions-dir"]=X["extensions-dir"],j["disable-extensions"]=X["disable-extensions"])}else{const X=this.windowsStateHandler.getNewWindowState(j);(0,p.mark)("code/willCreateCodeWindow");const re=H=this.instantiationService.createInstance(V.CodeWindow,{state:X,extensionDevelopmentPath:j.extensionDevelopmentPath,isExtensionTestHost:!!j.extensionTestsPath});(0,p.mark)("code/didCreateCodeWindow"),L.forceNewTabbedWindow&&this.getLastActiveWindow()?.addTabbedWindow(re),ft.WINDOWS.push(re),this._onDidOpenWindow.fire(re),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()-1,newCount:this.getWindowCount()}),(0,S.once)(re.onDidSignalReady)(()=>this._onDidSignalReadyWindow.fire(re)),(0,S.once)(re.onDidClose)(()=>this.onWindowClosed(re)),(0,S.once)(re.onDidDestroy)(()=>this._onDidDestroyWindow.fire(re)),re.onDidTriggerSystemContextMenu(({x,y:Z})=>this._onDidTriggerSystemContextMenu.fire({window:re,x,y:Z}));const B=(0,v.assertIsDefined)(re.win?.webContents);B.removeAllListeners("devtools-reload-page"),B.on("devtools-reload-page",()=>this.lifecycleMainService.reload(re)),this.lifecycleMainService.registerWindow(re)}return j.windowId=H.id,H.isReady?this.lifecycleMainService.unload(H,4).then(X=>{X||this.doOpenInBrowserWindow(H,j,L)}):this.doOpenInBrowserWindow(H,j,L),H}doOpenInBrowserWindow(L,W,j){W.extensionDevelopmentPath||((0,ae.isWorkspaceIdentifier)(W.workspace)?W.backupPath=this.backupMainService.registerWorkspaceBackup({workspace:W.workspace,remoteAuthority:W.remoteAuthority}):(0,ae.isSingleFolderWorkspaceIdentifier)(W.workspace)?W.backupPath=this.backupMainService.registerFolderBackup({folderUri:W.workspace.uri,remoteAuthority:W.remoteAuthority}):W.backupPath=this.backupMainService.registerEmptyWindowBackup({backupFolder:j.emptyWindowBackupInfo?.backupFolder??(0,fe.createEmptyWorkspaceIdentifier)().id,remoteAuthority:W.remoteAuthority})),L.load(W)}resolveProfileForBrowserWindow(L){let W=L.profile;return W&&this.userDataProfilesMainService.setProfileForWorkspaceSync(L.workspace??"empty-window",W),W||(W=this.userDataProfilesMainService.getOrSetProfileForWorkspace(L.workspace??"empty-window",(L.windowToUse??this.getLastActiveWindow())?.profile??this.userDataProfilesMainService.defaultProfile)),W}onWindowClosed(L){const W=ft.WINDOWS.indexOf(L);ft.WINDOWS.splice(W,1),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()+1,newCount:this.getWindowCount()})}getFocusedWindow(){const L=E.BrowserWindow.getFocusedWindow();if(L)return this.getWindowById(L.id)}getLastActiveWindow(){return this.doGetLastActiveWindow(this.getWindows())}getLastActiveWindowForAuthority(L){return this.doGetLastActiveWindow(this.getWindows().filter(W=>(0,h.isEqualAuthority)(W.remoteAuthority,L)))}doGetLastActiveWindow(L){const W=Math.max.apply(Math,L.map(j=>j.lastFocusTime));return L.find(j=>j.lastFocusTime===W)}sendToFocused(L,...W){(this.getFocusedWindow()||this.getLastActiveWindow())?.sendWhenReady(L,D.CancellationToken.None,...W)}sendToAll(L,W,j){for(const H of this.getWindows())j&&j.indexOf(H.id)>=0||H.sendWhenReady(L,D.CancellationToken.None,W)}getWindows(){return ft.WINDOWS}getWindowCount(){return ft.WINDOWS.length}getWindowById(L){const W=this.getWindows().filter(j=>j.id===L);return(0,R.firstOrDefault)(W)}getWindowByWebContents(L){const W=E.BrowserWindow.fromWebContents(L);if(!!W)return this.getWindowById(W.id)}};N.WINDOWS=[],N=we([te(2,a.ILogService),te(3,Y.IStateMainService),te(4,A.IPolicyService),te(5,i.IEnvironmentMainService),te(6,O.IUserDataProfilesMainService),te(7,c.ILifecycleMainService),te(8,l.IBackupMainService),te(9,n.IConfigurationService),te(10,K.IWorkspacesHistoryMainService),te(11,q.IWorkspacesManagementMainService),te(12,r.IInstantiationService),te(13,s.IDialogMainService),te(14,o.IFileService),te(15,M.IProductService),te(16,T.IProtocolMainService),te(17,F.IThemeMainService)],N),e.WindowsMainService=N}),define(ee[271],ie([0,1,60,31,76,52]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesMainService=void 0;let D=class{constructor(f,S,b,P){this.workspacesManagementMainService=f,this.windowsMainService=S,this.workspacesHistoryMainService=b,this.backupMainService=P,this.onDidChangeRecentlyOpened=this.workspacesHistoryMainService.onDidChangeRecentlyOpened}async enterWorkspace(f,S){const b=this.windowsMainService.getWindowById(f);if(b)return this.workspacesManagementMainService.enterWorkspace(b,this.windowsMainService.getWindows(),S)}createUntitledWorkspace(f,S,b){return this.workspacesManagementMainService.createUntitledWorkspace(S,b)}deleteUntitledWorkspace(f,S){return this.workspacesManagementMainService.deleteUntitledWorkspace(S)}getWorkspaceIdentifier(f,S){return this.workspacesManagementMainService.getWorkspaceIdentifier(S)}getRecentlyOpened(f){return this.workspacesHistoryMainService.getRecentlyOpened()}addRecentlyOpened(f,S){return this.workspacesHistoryMainService.addRecentlyOpened(S)}removeRecentlyOpened(f,S){return this.workspacesHistoryMainService.removeRecentlyOpened(S)}clearRecentlyOpened(f){return this.workspacesHistoryMainService.clearRecentlyOpened()}async getDirtyWorkspaces(){return this.backupMainService.getDirtyWorkspaces()}};D=we([te(0,R.IWorkspacesManagementMainService),te(1,t.IWindowsMainService),te(2,k.IWorkspacesHistoryMainService),te(3,E.IBackupMainService)],D),e.WorkspacesMainService=D}),define(ee[272],ie([0,1,13,41,27,17,44,16,30,49,43,33,2,14,9,4,12,7,29,82,130,46,144,103,247,147,60,263,19,70,180,85,118,56,106,178,26,59,112,192,213,193,249,107,194,195,15,205,87,69,5,86,264,226,259,21,6,207,269,65,20,63,255,88,37,252,92,113,35,231,233,74,48,238,239,265,240,266,115,242,243,244,245,250,31,270,251,28,93,76,271,52,248,36,212,42,258,222,55,73,90,253,260,261,8]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T,_,Y,G,V,oe,se,ae,fe,K,q,F,A,O,U,ne,N,$,L,W,j,H,X,re,B,x,Z,ce,ge,De,Te,Me,Le,ve,pe,Se,ke,J,ue,he,ye,Ce,Fe,Oe,$e,Ne,je,Qe,Be,Ge,Q,le,de,me,Ee,Ae,Ue,it,xe,qe,et,nt,lt,gt,St,Bt,zt,$t,_t,jt,Ht,qt,Vt,It){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeApplication=void 0;let Pt=class extends C.Disposable{constructor(be,Pe,Re,Ie,We,ze,Ze,tt,_e,Ve,Ke){super(),this.mainProcessNodeIpcServer=be,this.userEnv=Pe,this.mainInstantiationService=Re,this.logService=Ie,this.environmentMainService=We,this.lifecycleMainService=ze,this.configurationService=Ze,this.stateMainService=tt,this.fileService=_e,this.productService=Ve,this.userDataProfilesMainService=Ke,this.configureSession(),this.registerListeners()}configureSession(){const be=_e=>_e?.startsWith(`${u.Schemas.vscodeWebview}://`),Pe=new Set(["clipboard-read","clipboard-sanitized-write"]);E.session.defaultSession.setPermissionRequestHandler((_e,Ve,Ke,Je)=>be(Je.requestingUrl)?Ke(Pe.has(Ve)):Ke(!1)),E.session.defaultSession.setPermissionCheckHandler((_e,Ve,Ke,Je)=>be(Je.requestingUrl)?Pe.has(Ve):!1);const Re=new Set([u.Schemas.file,u.Schemas.vscodeFileResource,u.Schemas.vscodeRemoteResource,"devtools"]),Ie=_e=>{for(let Ve=_e;Ve;Ve=Ve.parent)if(Ve.url.startsWith(`${u.Schemas.vscodeWebview}://`))return!0;return!1},We=_e=>_e.resourceType==="xhr"||Ie(_e.frame),ze=_e=>{const Ve=_e.frame;if(!Ve||!this.windowsMainService)return!1;const Ke=E.BrowserWindow.getAllWindows();for(const Je of Ke)if(Ve.processId===Je.webContents.mainFrame.processId)return!0;return!1},Ze=(_e,Ve)=>{if(_e.path!=="/index.html")return!0;const Ke=Ve.frame;if(!Ke||!this.windowsMainService)return!1;for(const Je of this.windowsMainService.getWindows())if(Je.win&&Ke.processId===Je.win.webContents.mainFrame.processId)return!0;return!1};E.session.defaultSession.webRequest.onBeforeRequest((_e,Ve)=>{const Ke=h.URI.parse(_e.url);return Ke.scheme===u.Schemas.vscodeWebview&&!Ze(Ke,_e)?(this.logService.error("Blocked vscode-webview request",_e.url),Ve({cancel:!0})):Ke.scheme===u.Schemas.vscodeFileResource&&!ze(_e)?(this.logService.error("Blocked vscode-file request",_e.url),Ve({cancel:!0})):Ke.path.endsWith(".svg")&&!Re.has(Ke.scheme)?Ve({cancel:!We(_e)}):Ve({cancel:!1})}),E.session.defaultSession.webRequest.onHeadersReceived((_e,Ve)=>{const Ke=_e.responseHeaders,Je=Ke["content-type"]||Ke["Content-Type"];if(Je&&Array.isArray(Je)){const ot=h.URI.parse(_e.url);if(ot.path.endsWith(".svg")&&Re.has(ot.scheme))return Ke["Content-Type"]=["image/svg+xml"],Ve({cancel:!1,responseHeaders:Ke});if(!ot.path.endsWith(u.Schemas.vscodeRemoteResource)&&Je.some(ct=>ct.toLowerCase().includes("image/svg")))return Ve({cancel:!We(_e)})}return Ve({cancel:!1})});const tt=E.session.defaultSession;typeof tt.setCodeCachePath=="function"&&this.environmentMainService.codeCachePath&&tt.setCodeCachePath((0,p.join)(this.environmentMainService.codeCachePath,"chrome"))}registerListeners(){(0,I.setUnexpectedErrorHandler)(Re=>this.onUnexpectedError(Re)),process.on("uncaughtException",Re=>(0,I.onUnexpectedError)(Re)),process.on("unhandledRejection",Re=>(0,I.onUnexpectedError)(Re)),this.lifecycleMainService.onWillShutdown(()=>this.dispose()),(0,d.registerContextMenuListener)(),E.app.on("accessibility-support-changed",(Re,Ie)=>{this.windowsMainService?.sendToAll("vscode:accessibilitySupportChanged",Ie)}),E.app.on("activate",async(Re,Ie)=>{this.logService.trace("app#activate"),Ie||await this.windowsMainService?.openEmptyWindow({context:1})}),E.app.on("web-contents-created",(Re,Ie)=>{Ie.on("will-navigate",We=>{this.logService.error("webContents#will-navigate: Prevented webcontent navigation"),We.preventDefault()}),Ie.setWindowOpenHandler(({url:We})=>(this.nativeHostMainService?.openExternal(void 0,We),{action:"deny"}))});let be=[],Pe;E.app.on("open-file",(Re,Ie)=>{this.logService.trace("app#open-file: ",Ie),Re.preventDefault(),be.push((0,Ue.hasWorkspaceFileExtension)(Ie)?{workspaceUri:h.URI.file(Ie)}:{fileUri:h.URI.file(Ie)}),Pe!==void 0&&(clearTimeout(Pe),Pe=void 0),Pe=setTimeout(async()=>{await this.windowsMainService?.open({context:1,cli:this.environmentMainService.args,urisToOpen:be,gotoLineMode:!1,preferNewWindow:!0}),be=[],Pe=void 0},100)}),E.app.on("new-window-for-tab",async()=>{await this.windowsMainService?.openEmptyWindow({context:4})}),t.validatedIpcMain.handle("vscode:fetchShellEnv",Re=>{const Ie=this.windowsMainService?.getWindowByWebContents(Re.sender);let We,ze;return Ie?.config?(We=Ie.config,ze={...process.env,...Ie.config.userEnv}):(We=this.environmentMainService.args,ze=process.env),this.resolveShellEnvironment(We,ze,!1)}),t.validatedIpcMain.handle("vscode:writeNlsFile",(Re,Ie,We)=>{const ze=this.validateNlsPath([Ie]);if(!ze||typeof We!="string")throw new Error("Invalid operation (vscode:writeNlsFile)");return this.fileService.writeFile(ze,R.VSBuffer.fromString(We))}),t.validatedIpcMain.handle("vscode:readNlsFile",async(Re,...Ie)=>{const We=this.validateNlsPath(Ie);if(!We)throw new Error("Invalid operation (vscode:readNlsFile)");return(await this.fileService.readFile(We)).value.toString()}),t.validatedIpcMain.on("vscode:toggleDevTools",Re=>Re.sender.toggleDevTools()),t.validatedIpcMain.on("vscode:openDevTools",Re=>Re.sender.openDevTools()),t.validatedIpcMain.on("vscode:reloadWindow",Re=>Re.sender.reload())}validateNlsPath(be){let Pe;for(const Re of be)typeof Re=="string"&&(typeof Pe!="string"?Pe=Re:Pe=(0,p.join)(Pe,Re));if(!(typeof Pe!="string"||!(0,p.isAbsolute)(Pe)||!(0,f.isEqualOrParent)(Pe,this.environmentMainService.cachedLanguagesPath,!w.isLinux)))return h.URI.file(Pe)}onUnexpectedError(be){if(be){const Pe={message:`[uncaught exception in main]: ${be.message}`,stack:be.stack};this.windowsMainService?.sendToFocused("vscode:reportError",JSON.stringify(Pe))}this.logService.error(`[uncaught exception in main]: ${be}`),be.stack&&this.logService.error(be.stack)}async startup(){this.logService.debug("Starting VS Code"),this.logService.debug(`from: ${this.environmentMainService.appRoot}`),this.logService.debug("args:",this.environmentMainService.args);const be=this.productService.win32AppUserModelId;w.isWindows&&be&&E.app.setAppUserModelId(be);try{w.isMacintosh&&this.configurationService.getValue("window.nativeTabs")===!0&&!E.systemPreferences.getUserDefault("NSUseImprovedLayoutPass","boolean")&&E.systemPreferences.setUserDefault("NSUseImprovedLayoutPass","boolean",!0)}catch(_e){this.logService.error(_e)}const Pe=new n.Server;this.lifecycleMainService.onWillShutdown(_e=>{_e.reason===2&&Pe.dispose()}),this.logService.trace("Resolving machine identifier...");const Re=await this.resolveMachineId();this.logService.trace(`Resolved machine identifier: ${Re}`);const{sharedProcess:Ie,sharedProcessReady:We,sharedProcessClient:ze}=this.setupSharedProcess(Re),Ze=await this.initServices(Re,Ie,We);this.setUpHandlers(Ze),Ze.invokeFunction(_e=>this.initChannels(_e,Pe,ze)),await Ze.invokeFunction(_e=>this.openFirstWindow(_e,Pe)),Ze.invokeFunction(_e=>this.afterWindowOpen(_e,Ie)),this._register(new It.RunOnceScheduler(()=>{this._register((0,It.runWhenIdle)(()=>this.lifecycleMainService.phase=4,2500))},2500)).schedule()}setUpHandlers(be){this._register(be.createInstance(i.ProxyAuthHandler)),this._register(be.createInstance(Bt.DefaultExtensionsProfileInitHandler)),this._register(be.createInstance(qt.UserDataTransientProfilesHandler))}async resolveMachineId(){let be=this.stateMainService.getItem(J.machineIdKey);return(!be||w.isMacintosh&&be==="6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead")&&(be=await(0,m.getMachineId)(),this.stateMainService.setItem(J.machineIdKey,be)),be}setupSharedProcess(be){const Pe=this._register(this.mainInstantiationService.createInstance(Me.SharedProcess,be,this.userEnv)),Re=(async()=>{this.logService.trace("Main->SharedProcess#connect");const We=await Pe.connect();return this.logService.trace("Main->SharedProcess#connect: connection established"),new s.Client(We,"main")})(),Ie=(async()=>(await Pe.whenReady(),Re))();return{sharedProcess:Pe,sharedProcessReady:Ie,sharedProcessClient:Re}}async initServices(be,Pe,Re){const Ie=new j.ServiceCollection;switch(process.platform){case"win32":Ie.set(Ce.IUpdateService,new L.SyncDescriptor(je.Win32UpdateService));break;case"linux":w.isLinuxSnap?Ie.set(Ce.IUpdateService,new L.SyncDescriptor(Ne.SnapUpdateService,[process.env.SNAP,process.env.SNAP_REVISION])):Ie.set(Ce.IUpdateService,new L.SyncDescriptor($e.LinuxUpdateService));break;case"darwin":Ie.set(Ce.IUpdateService,new L.SyncDescriptor(Oe.DarwinUpdateService));break}Ie.set(me.IWindowsMainService,new L.SyncDescriptor(Ee.WindowsMainService,[be,this.userEnv],!1));const We=new Y.DialogMainService(this.logService);Ie.set(Y.IDialogMainService,We),Ie.set(re.ILaunchMainService,new L.SyncDescriptor(re.LaunchMainService,void 0,!1)),Ie.set(_.IDiagnosticsMainService,new L.SyncDescriptor(_.DiagnosticsMainService,void 0,!1)),Ie.set(T.IDiagnosticsService,l.ProxyChannel.toService((0,l.getDelayedChannel)(Re.then(tt=>tt.getChannel("diagnostics"))))),Ie.set(H.IIssueMainService,new L.SyncDescriptor(H.IssueMainService,[this.userEnv])),Ie.set(G.IEncryptionMainService,new L.SyncDescriptor(V.EncryptionMainService,[be])),Ie.set(X.IKeyboardLayoutMainService,new L.SyncDescriptor(X.KeyboardLayoutMainService)),Ie.set(ge.INativeHostMainService,new L.SyncDescriptor(ge.NativeHostMainService,[Pe],!1)),Ie.set(y.ICredentialsMainService,new L.SyncDescriptor(nt.CredentialsNativeMainService)),Ie.set(le.IWebviewManagerService,new L.SyncDescriptor(de.WebviewMainService)),Ie.set(ce.IMenubarMainService,new L.SyncDescriptor(ce.MenubarMainService)),Ie.set(fe.IExtensionUrlTrustService,new L.SyncDescriptor(K.ExtensionUrlTrustService)),Ie.set(q.IExtensionHostStarter,new L.SyncDescriptor(F.ExtensionHostStarter)),Ie.set(Se.IStorageMainService,new L.SyncDescriptor(Se.StorageMainService)),Ie.set(Se.IApplicationStorageMainService,new L.SyncDescriptor(Se.ApplicationStorageMainService)),w.isWindows?Ie.set(A.IExternalTerminalMainService,new L.SyncDescriptor(O.WindowsExternalTerminalService)):w.isMacintosh?Ie.set(A.IExternalTerminalMainService,new L.SyncDescriptor(O.MacExternalTerminalService)):w.isLinux&&Ie.set(A.IExternalTerminalMainService,new L.SyncDescriptor(O.LinuxExternalTerminalService));const ze=new c.BackupMainService(this.environmentMainService,this.configurationService,this.logService,this.stateMainService);Ie.set(r.IBackupMainService,ze);const Ze=new et.WorkspacesManagementMainService(this.environmentMainService,this.logService,this.userDataProfilesMainService,ze,We,this.productService);if(Ie.set(et.IWorkspacesManagementMainService,Ze),Ie.set(it.IWorkspacesService,new L.SyncDescriptor(qe.WorkspacesMainService,void 0,!1)),Ie.set(xe.IWorkspacesHistoryMainService,new L.SyncDescriptor(xe.WorkspacesHistoryMainService,void 0,!1)),Ie.set(Qe.IURLService,new L.SyncDescriptor(Ge.NativeURLService,void 0,!1)),(0,ye.supportsTelemetry)(this.productService,this.environmentMainService)){const tt=(0,ye.isInternalTelemetry)(this.productService,this.configurationService),_e=(0,l.getDelayedChannel)(Re.then(ct=>ct.getChannel("telemetryAppender"))),Ve=new ue.TelemetryAppenderClient(_e),Ke=(0,ke.resolveCommonProperties)(this.fileService,(0,k.release)(),(0,k.hostname)(),process.arch,this.productService.commit,this.productService.version,be,tt,this.environmentMainService.installSourcePath),Je=(0,ye.getPiiPathsFromEnvironment)(this.environmentMainService),ot={appenders:[Ve],commonProperties:Ke,piiPaths:Je,sendErrorTelemetry:!0};Ie.set(J.ITelemetryService,new L.SyncDescriptor(he.TelemetryService,[ot],!1))}else Ie.set(J.ITelemetryService,ye.NullTelemetryService);return Ie.set(_t.IExtensionsProfileScannerService,new L.SyncDescriptor(_t.ExtensionsProfileScannerService,void 0,!0)),Ie.set(jt.IExtensionsScannerService,new L.SyncDescriptor(Ht.ExtensionsScannerService,void 0,!0)),await It.Promises.settled([ze.initialize(),Ze.initialize()]),this.mainInstantiationService.createChild(Ie)}initChannels(be,Pe,Re){const Ie=l.ProxyChannel.fromService(be.get(re.ILaunchMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("launch",Ie);const We=l.ProxyChannel.fromService(be.get(_.IDiagnosticsMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("diagnostics",We);const ze=new gt.PolicyChannel(be.get(lt.IPolicyService));Pe.registerChannel("policy",ze),Re.then(Ye=>Ye.registerChannel("policy",ze));const Ze=this.fileService.getProvider(u.Schemas.file);(0,g.assertType)(Ze instanceof $.DiskFileSystemProvider);const tt=new N.DiskFileSystemProviderChannel(Ze,this.logService,this.environmentMainService);Pe.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,tt),Re.then(Ye=>Ye.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,tt));const _e=l.ProxyChannel.fromService(be.get(St.IUserDataProfilesMainService));Pe.registerChannel("userDataProfiles",_e),Re.then(Ye=>Ye.registerChannel("userDataProfiles",_e));const Ve=new zt.RequestChannel(be.get($t.IRequestService));Re.then(Ye=>Ye.registerChannel("request",Ve));const Ke=new Fe.UpdateChannel(be.get(Ce.IUpdateService));Pe.registerChannel("update",Ke);const Je=l.ProxyChannel.fromService(be.get(H.IIssueMainService));Pe.registerChannel("issue",Je);const ot=l.ProxyChannel.fromService(be.get(G.IEncryptionMainService));Pe.registerChannel("encryption",ot);const ct=l.ProxyChannel.fromService(be.get(y.ICredentialsMainService));Pe.registerChannel("credentials",ct);const kt=l.ProxyChannel.fromService(be.get(Le.ISignService));Pe.registerChannel("sign",kt);const Xe=l.ProxyChannel.fromService(be.get(X.IKeyboardLayoutMainService));Pe.registerChannel("keyboardLayout",Xe),this.nativeHostMainService=be.get(ge.INativeHostMainService);const mt=l.ProxyChannel.fromService(this.nativeHostMainService);Pe.registerChannel("nativeHost",mt),Re.then(Ye=>Ye.registerChannel("nativeHost",mt));const pt=l.ProxyChannel.fromService(be.get(it.IWorkspacesService));Pe.registerChannel("workspaces",pt);const yt=l.ProxyChannel.fromService(be.get(ce.IMenubarMainService));Pe.registerChannel("menubar",yt);const Mt=l.ProxyChannel.fromService(be.get(Qe.IURLService));Pe.registerChannel("url",Mt);const Dt=l.ProxyChannel.fromService(be.get(fe.IExtensionUrlTrustService));Pe.registerChannel("extensionUrlTrust",Dt);const wt=l.ProxyChannel.fromService(be.get(le.IWebviewManagerService));Pe.registerChannel("webview",wt);const ut=this._register(new pe.StorageDatabaseChannel(this.logService,be.get(Se.IStorageMainService)));Pe.registerChannel("storage",ut),Re.then(Ye=>Ye.registerChannel("storage",ut));const bt=this._register(new Vt.ProfileStorageChangesListenerChannel(be.get(Se.IStorageMainService),be.get(St.IUserDataProfilesMainService),this.logService));Re.then(Ye=>Ye.registerChannel("profileStorageListener",bt));const vt=l.ProxyChannel.fromService(be.get(A.IExternalTerminalMainService));Pe.registerChannel("externalTerminal",vt);const He=new Z.LogLevelChannel(be.get(x.ILogService),be.get(x.ILoggerService));Pe.registerChannel("logLevel",He),Re.then(Ye=>Ye.registerChannel("logLevel",He));const st=new Z.LoggerChannel(be.get(x.ILoggerService));Pe.registerChannel("logger",st),Re.then(Ye=>Ye.registerChannel("logger",st));const ht=new M.ElectronExtensionHostDebugBroadcastChannel(be.get(me.IWindowsMainService),be.get(St.IUserDataProfilesMainService));Pe.registerChannel("extensionhostdebugservice",ht);const at=l.ProxyChannel.fromService(be.get(q.IExtensionHostStarter));Pe.registerChannel(q.ipcExtensionHostStarterChannelName,at)}async openFirstWindow(be,Pe){const Re=this.windowsMainService=be.get(me.IWindowsMainService),Ie=be.get(Qe.IURLService),We=be.get(ge.INativeHostMainService);this.lifecycleMainService.phase=2;const ze=[],Ze=[...this.environmentMainService.args["open-url"]?this.environmentMainService.args._urls||[]:[],...global.getOpenUrls()||[]].map(He=>{try{return{uri:h.URI.parse(He),url:He}}catch{return}}).filter(He=>{if(!He||this.shouldBlockURI(He.uri))return!1;const st=this.getWindowOpenableFromProtocolLink(He.uri);return st?(ze.push(st),!1):!0}),tt=this,_e=this.environmentMainService,Ve=this.productService,Ke=this.logService;Ie.registerHandler({async handleURL(He,st){if(Ke.trace("app#handleURL: ",He.toString(!0),st),He.scheme===Ve.urlProtocol&&He.path==="workspace"&&(He=He.with({authority:"file",path:h.URI.parse(He.query).path,query:""})),tt.shouldBlockURI(He))return!0;let ht=!1;const at=new URLSearchParams(He.query);at.get("windowId")==="_blank"&&(at.delete("windowId"),He=He.with({query:at.toString()}),ht=!0),ht||=w.isMacintosh&&Re.getWindowCount()===0;const Ye=at.get("continueOn");Ye!==null&&(_e.continueOn=Ye??void 0,at.delete("continueOn"),He=He.with({query:at.toString()}));const Rt=tt.getWindowOpenableFromProtocolLink(He);if(Ke.trace("app#handleURL: windowOpenableFromProtocolLink = ",Rt),Rt){const[Lt]=await Re.open({context:5,cli:{..._e.args},urisToOpen:[Rt],forceNewWindow:ht,gotoLineMode:!0});return Lt.focus(),!0}if(ht){const[Lt]=await Re.open({context:5,cli:{..._e.args},forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,remoteAuthority:(0,Te.getRemoteAuthority)(He)});return await Lt.ready(),Ie.open(He,st)}return!1}});const Je=this._register(new Ae.ActiveWindowManager({onDidOpenWindow:We.onDidOpenWindow,onDidFocusWindow:We.onDidFocusWindow,getActiveWindowId:()=>We.getActiveWindowId(-1)})),ot=new l.StaticRouter(He=>Je.getActiveClientId().then(st=>He===st)),ct=new Be.URLHandlerRouter(ot),kt=Pe.getChannel("urlHandler",ct);Ie.registerHandler(new Be.URLHandlerChannelClient(kt)),this._register(new Q.ElectronURLListener(Ze,Ie,Re,this.environmentMainService,this.productService));const Xe=this.environmentMainService.args,mt=global.macOpenFiles,pt=(0,se.isLaunchedFromCli)(process.env)?0:4,yt=Xe._.length,Mt=!!Xe["folder-uri"],Dt=!!Xe["file-uri"],wt=Xe["skip-add-to-recently-opened"]===!0,ut=Xe.wait&&Xe.waitMarkerFilePath?h.URI.file(Xe.waitMarkerFilePath):void 0,bt=Xe.remote||void 0;if(ze.length>0)return Re.open({context:pt,cli:Xe,urisToOpen:ze,gotoLineMode:!0,initialStartup:!0});const vt=await this.userDataProfilesMainService.checkAndCreateProfileFromCli(this.environmentMainService.args);if(!yt&&!Mt&&!Dt){if(Xe["new-window"]||vt)return Re.open({context:pt,cli:Xe,forceNewWindow:!0,forceEmpty:!0,noRecentEntry:wt,waitMarkerFileURI:ut,initialStartup:!0,remoteAuthority:bt,profile:vt});if(mt.length)return Re.open({context:1,cli:Xe,urisToOpen:mt.map(He=>(0,Ue.hasWorkspaceFileExtension)(He)?{workspaceUri:h.URI.file(He)}:{fileUri:h.URI.file(He)}),noRecentEntry:wt,waitMarkerFileURI:ut,initialStartup:!0})}return Re.open({context:pt,cli:Xe,forceNewWindow:Xe["new-window"]||!yt&&Xe["unity-launch"],diffMode:Xe.diff,mergeMode:Xe.merge,noRecentEntry:wt,waitMarkerFileURI:ut,gotoLineMode:Xe.goto,initialStartup:!0,remoteAuthority:bt,profile:vt})}shouldBlockURI(be){return!!(be.authority===u.Schemas.file&&w.isWindows&&E.dialog.showMessageBoxSync({title:this.productService.nameLong,type:"question",buttons:[(0,P.mnemonicButtonLabel)((0,o.localize)(0,null)),(0,P.mnemonicButtonLabel)((0,o.localize)(1,null))],defaultId:0,cancelId:1,message:(0,o.localize)(2,null,(0,P.getPathLabel)(be,{os:w.OS,tildify:this.environmentMainService}),this.productService.nameShort),detail:(0,o.localize)(3,null),noLink:!0})===1)}getWindowOpenableFromProtocolLink(be){if(!!be.path){if(be.authority===u.Schemas.file){const Pe=h.URI.file(be.fsPath);return(0,Ue.hasWorkspaceFileExtension)(Pe)?{workspaceUri:Pe}:{fileUri:Pe}}else if(be.authority===u.Schemas.vscodeRemote){const Pe=be.path.indexOf(p.posix.sep,1);if(Pe!==-1){const Re=be.path.substring(1,Pe),Ie=be.path.substring(Pe),We=h.URI.from({scheme:u.Schemas.vscodeRemote,authority:Re,path:Ie,query:be.query,fragment:be.fragment});return(0,Ue.hasWorkspaceFileExtension)(Ie)?{workspaceUri:We}:/:[\d]+$/.test(Ie)?{fileUri:We}:{folderUri:We}}}}}afterWindowOpen(be,Pe){const Re=be.get(J.ITelemetryService),Ie=be.get(Ce.IUpdateService);this.lifecycleMainService.phase=3,this.handleSharedProcessErrors(Re,Pe),this.installMutex(),E.protocol.registerHttpProtocol(u.Schemas.vscodeRemoteResource,(We,ze)=>{ze({url:We.url.replace(/^vscode-remote-resource:/,"http:"),method:We.method})}),(Ie instanceof je.Win32UpdateService||Ie instanceof $e.LinuxUpdateService||Ie instanceof Oe.DarwinUpdateService)&&Ie.initialize(),this.resolveShellEnvironment(this.environmentMainService.args,process.env,!0),this.updateCrashReporterEnablement()}async installMutex(){const be=this.productService.win32MutexName;if(w.isWindows&&be)try{const Pe=await new Promise((Ie,We)=>{z(["windows-mutex"],Ie,We)}),Re=new Pe.Mutex(be);(0,S.once)(this.lifecycleMainService.onWillShutdown)(()=>Re.release())}catch(Pe){this.logService.error(Pe)}}handleSharedProcessErrors(be,Pe){let Re=!1;(0,S.once)(this.lifecycleMainService.onWillShutdown)(()=>Re=!0),this._register(Pe.onDidError(({type:Ie,details:We})=>{let ze;switch(Ie){case 1:ze="SharedProcess: detected unresponsive window";break;case 2:ze=`SharedProcess: renderer process gone (detail: ${We?.reason??""}, code: ${We?.exitCode??""})`;break;case 3:ze=`SharedProcess: failed to load (detail: ${We?.reason??""}, code: ${We?.exitCode??""})`;break}(0,I.onUnexpectedError)(new Error(ze)),be.publicLog2("sharedprocesserror",{type:Ie,reason:We?.reason,code:We?.exitCode,visible:Pe.isVisible(),shuttingdown:Re})}))}async resolveShellEnvironment(be,Pe,Re){try{return await(0,ae.getResolvedShellEnv)(this.logService,be,Pe)}catch(Ie){const We=(0,D.toErrorMessage)(Ie);Re?this.windowsMainService?.sendToFocused("vscode:showResolveShellEnvError",We):this.logService.error(We)}return{}}async updateCrashReporterEnablement(){try{const Pe=(await this.fileService.readFile(this.environmentMainService.argvResource)).value.toString(),Re=JSON.parse((0,b.stripComments)(Pe)),We=(0,ye.getTelemetryLevel)(this.configurationService)>=1;if(Re["enable-crash-reporter"]===void 0){const ze=[""," // Allows to disable crash reporting."," // Should restart the app if the value is changed.",` "enable-crash-reporter": ${We},`,""," // Unique id used for correlating crash reports sent from this instance."," // Do not edit this value.",` "crash-reporter-id": "${(0,v.generateUuid)()}"`,"}"],Ze=Pe.substring(0,Pe.length-2).concat(`, `,ze.join(` `));await this.fileService.writeFile(this.environmentMainService.argvResource,R.VSBuffer.fromString(Ze))}else{const ze=Pe.replace(/"enable-crash-reporter": .*,/,`"enable-crash-reporter": ${We},`);ze!==Pe&&await this.fileService.writeFile(this.environmentMainService.argvResource,R.VSBuffer.fromString(ze))}}catch(be){this.logService.error(be)}}};Pt=we([te(2,W.IInstantiationService),te(3,x.ILogService),te(4,oe.IEnvironmentMainService),te(5,B.ILifecycleMainService),te(6,a.IConfigurationService),te(7,ve.IStateMainService),te(8,ne.IFileService),te(9,De.IProductService),te(10,St.IUserDataProfilesMainService)],Pt),e.CodeApplication=Pt}),define(ee[273],ie([0,1,36,8,280,2]),function(z,e,E,t,k,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePolicyService=void 0;class D extends E.AbstractPolicyService{constructor(f){super(),this.productName=f,this.throttler=new t.Throttler,this.watcher=this._register(new R.MutableDisposable)}async initializePolicies(f){await this.throttler.queue(()=>new Promise((S,b)=>{try{this.watcher.value=(0,k.createWatcher)(this.productName,f,P=>{for(const C in P){const u=P[C];u===void 0?this.policies.delete(C):this.policies.set(C,u)}this._onDidChange.fire(Object.keys(P)),S()})}catch(P){b(P)}}))}}e.NativePolicyService=D}),define(ee[274],ie([0,1,224,8,17,16,2,12,19,34,112,6,223,281]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestService=void 0;let p=class extends D.Disposable{constructor(g,h,v){super(),this.environmentService=h,this.logService=v,this.configure(g.getValue()),this._register(g.onDidChangeConfiguration(()=>this.configure(g.getValue()),this))}configure(g){this.proxyUrl=g.http&&g.http.proxy,this.strictSSL=!!(g.http&&g.http.proxyStrictSSL),this.authorization=g.http&&g.http.proxyAuthorization}async request(g,h){this.logService.trace("RequestService#request (node) - begin",g.url);const{proxyUrl:v,strictSSL:m}=this;let d;try{d=await(0,b.getResolvedShellEnv)(this.logService,this.environmentService.args,process.env)}catch(s){this.shellEnvErrorLogged||(this.shellEnvErrorLogged=!0,this.logService.error("RequestService#request (node) resolving shell environment failed",s))}const l={...process.env,...d},n=g.agent?g.agent:await(0,C.getProxyAgent)(g.url||"",l,{proxyUrl:v,strictSSL:m});g.agent=n,g.strictSSL=m,this.authorization&&(g.headers={...g.headers||{},"Proxy-Authorization":this.authorization});try{const s=await this._request(g,h);return this.logService.trace("RequestService#request (node) - success",g.url),s}catch(s){throw this.logService.trace("RequestService#request (node) - error",g.url,s),s}}async getNodeRequest(g){return((0,E.parse)(g.url).protocol==="https:"?await new Promise((m,d)=>{z(["https"],m,d)}):await new Promise((m,d)=>{z(["http"],m,d)})).request}_request(g,h){return t.Promises.withAsyncBody(async(v,m)=>{const d=(0,E.parse)(g.url),l=g.getRawRequest?g.getRawRequest(g):await this.getNodeRequest(g),n={hostname:d.hostname,port:d.port?parseInt(d.port):d.protocol==="https:"?443:80,protocol:d.protocol,path:d.path,method:g.type||"GET",headers:g.headers,agent:g.agent,rejectUnauthorized:(0,I.isBoolean)(g.strictSSL)?g.strictSSL:!0};g.user&&g.password&&(n.auth=g.user+":"+g.password);const s=l(n,i=>{const o=(0,I.isNumber)(g.followRedirects)?g.followRedirects:3;if(i.statusCode&&i.statusCode>=300&&i.statusCode<400&&o>0&&i.headers.location)this._request({...g,url:i.headers.location,followRedirects:o-1},h).then(v,m);else{let r=i;i.headers["content-encoding"]==="gzip"&&(r=i.pipe((0,u.createGunzip)())),v({res:i,stream:(0,k.streamToBufferReadableStream)(r)})}});s.on("error",m),g.timeout&&s.setTimeout(g.timeout),g.data&&typeof g.data=="string"&&s.write(g.data),s.end(),h.onCancellationRequested(()=>{s.abort(),m(new R.CancellationError)})})}async resolveProxy(g){}};p=we([te(0,f.IConfigurationService),te(1,S.INativeEnvironmentService),te(2,P.ILogService)],p),e.RequestService=p}),define(ee[275],ie([0,1,13,274]),function(z,e,E,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestMainService=void 0;function k(D){return E.net.request}class R extends t.RequestService{request(I,f){return super.request({...I||{},getRawRequest:k},f)}}e.RequestMainService=R}),define(ee[282],ie([0,1,13,40,7,24,8,44,16,30,49,33,14,9,72,4,32,25,23,46,84,272,10,19,217,230,26,59,184,15,203,87,69,200,86,21,206,6,209,54,20,61,254,114,236,55,275,88,225,37,229,74,64,42,36,273,211,2,51,241,38,237]),function(z,e,E,t,k,R,D,I,f,S,b,P,C,u,p,w,g,h,v,m,d,l,n,s,i,o,r,c,a,y,M,T,_,Y,G,V,oe,se,ae,fe,K,q,F,A,O,U,ne,N,$,L,W,j,H,X,re,B,x,Z,ce,ge,De){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class Te{main(){try{this.startup()}catch(ve){console.error(ve.message),E.app.exit(1)}}async startup(){(0,f.setUnexpectedErrorHandler)(Ce=>console.error(Ce));const[ve,pe,Se,ke,J,ue,he,ye]=this.createServices();try{try{await this.initServices(Se,ye,ke,J,he)}catch(Ce){throw this.handleStartupDataDirError(Se,he.nameLong,Ce),Ce}await ve.invokeFunction(async Ce=>{const Fe=Ce.get(se.ILogService),Oe=Ce.get(V.ILifecycleMainService),$e=Ce.get(y.IFileService),Ne=Ce.get(se.ILoggerService),je=await this.claimInstance(Fe,Se,Oe,ve,he,!0);return v.Promises.writeFile(Se.mainLockfile,String(process.pid)).catch(Qe=>{Fe.warn(`Error writing main lockfile: ${Qe.stack}`)}),ue.logger=Ne.createLogger(k.URI.file((0,u.join)(Se.logsPath,"main.log")),{name:"main"}),(0,b.once)(Oe.onWillShutdown)(Qe=>{$e.dispose(),ke.dispose(),Qe.join(v.Promises.unlink(Se.mainLockfile).catch(()=>{}))}),ve.createInstance(l.CodeApplication,je,pe).startup()})}catch(Ce){ve.invokeFunction(this.quit,Ce)}}createServices(){const ve=new G.ServiceCollection,pe=new Z.DisposableStore;process.once("exit",()=>pe.dispose());const Se={_serviceBrand:void 0,...fe.default};ve.set(K.IProductService,Se);const ke=new r.EnvironmentMainService(this.resolveArgs(),Se),J=this.patchEnvironment(ke);ve.set(r.IEnvironmentMainService,ke);const ue=new oe.BufferLogService,he=pe.add(new se.MultiplexLogService([new se.ConsoleMainLogger((0,se.getLogLevel)(ke)),ue]));ve.set(se.ILogService,he);const ye=new M.FileService(he);ve.set(y.IFileService,ye);const Ce=new T.DiskFileSystemProvider(he);ye.registerProvider(C.Schemas.file,Ce);const Fe=new ge.UriIdentityService(ye);ve.set(ce.IUriIdentityService,Fe),ve.set(se.ILoggerService,new ae.LoggerService(he));const Oe=new W.StateMainService(ke,he,ye);ve.set(L.IStateMainService,Oe);const $e=new X.UserDataProfilesMainService(Oe,Fe,ke,ye,he);ve.set(X.IUserDataProfilesMainService,$e);const Ne=w.isWindows&&Se.win32RegValueName?pe.add(new B.NativePolicyService(Se.win32RegValueName)):ke.policyFile?pe.add(new x.FilePolicyService(ke.policyFile,ye,he)):new re.NullPolicyService;ve.set(re.IPolicyService,Ne);const je=new i.ConfigurationService($e.defaultProfile.settingsResource,ye,Ne,he);return ve.set(s.IConfigurationService,je),ve.set(V.ILifecycleMainService,new _.SyncDescriptor(V.LifecycleMainService,void 0,!1)),ve.set(U.IRequestService,new _.SyncDescriptor(ne.RequestMainService,void 0,!0)),ve.set(H.IThemeMainService,new _.SyncDescriptor(H.ThemeMainService)),ve.set(N.ISignService,new _.SyncDescriptor($.SignService,void 0,!1)),ve.set(A.ITunnelService,new _.SyncDescriptor(O.TunnelService)),ve.set(q.IProtocolMainService,new F.ProtocolMainService(ke,$e,he)),[new Y.InstantiationService(ve,!0),J,ke,je,Oe,ue,Se,$e]}patchEnvironment(ve){const pe={VSCODE_IPC_HOOK:ve.mainIPCHandle};return["VSCODE_NLS_CONFIG","VSCODE_PORTABLE"].forEach(Se=>{const ke=process.env[Se];typeof ke=="string"&&(pe[Se]=ke)}),Object.assign(process.env,pe),pe}async initServices(ve,pe,Se,ke,J){await D.Promises.settled([Promise.all([ve.extensionsPath,ve.codeCachePath,ve.logsPath,pe.defaultProfile.globalStorageHome.fsPath,ve.workspaceStorageHome.fsPath,ve.localHistoryHome.fsPath,ve.backupHome].map(ue=>ue?v.Promises.mkdir(ue,{recursive:!0}):void 0)),ke.init(),Se.initialize()]),pe.setEnablement(J.quality!=="stable"||Se.getValue(De.PROFILES_ENABLEMENT_CONFIG))}async claimInstance(ve,pe,Se,ke,J,ue){let he;try{(0,p.mark)("code/willStartMainServer"),he=await(0,d.serve)(pe.mainIPCHandle),(0,p.mark)("code/didStartMainServer"),(0,b.once)(Se.onWillShutdown)(()=>he.dispose())}catch(ye){if(ye.code!=="EADDRINUSE")throw this.handleStartupDataDirError(pe,J.nameLong,ye),ye;let Ce;try{Ce=await(0,d.connect)(pe.mainIPCHandle,"main")}catch(Ne){if(!ue||w.isWindows||Ne.code!=="ECONNREFUSED")throw Ne.code==="EPERM"&&this.showStartupWarningDialog((0,n.localize)(0,null,J.nameShort),(0,n.localize)(1,null),J.nameLong),Ne;try{(0,t.unlinkSync)(pe.mainIPCHandle)}catch(je){throw ve.warn("Could not delete obsolete instance handle",je),je}return this.claimInstance(ve,pe,Se,ke,J,!1)}if(pe.extensionTestsLocationURI&&!pe.debugExtensionHost.break){const Ne="Running extension tests from the command line is currently only supported if no other instance of Code is running.";throw ve.error(Ne),Ce.dispose(),new Error(Ne)}let Fe;!pe.args.wait&&!pe.args.status&&(Fe=setTimeout(()=>{this.showStartupWarningDialog((0,n.localize)(2,null,J.nameShort),(0,n.localize)(3,null),J.nameLong)},1e4));const Oe=m.ProxyChannel.toService(Ce.getChannel("launch"),{disableMarshalling:!0}),$e=m.ProxyChannel.toService(Ce.getChannel("diagnostics"),{disableMarshalling:!0});if(pe.args.status)return ke.invokeFunction(async()=>{const Ne=new o.DiagnosticsService(j.NullTelemetryService,J),je=await $e.getMainDiagnostics(),Qe=await $e.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0}),Be=await Ne.getDiagnostics(je,Qe);throw console.log(Be),new f.ExpectedError});throw w.isWindows&&await this.windowsAllowSetForegroundWindow(Oe,ve),ve.trace("Sending env to running instance..."),await Oe.start(pe.args,process.env),Ce.dispose(),Fe&&clearTimeout(Fe),new f.ExpectedError("Sent env to running instance. Terminating...")}if(pe.args.status)throw ve.warn("Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started."),new f.ExpectedError("Terminating...");return process.env.VSCODE_PID=String(process.pid),he}handleStartupDataDirError(ve,pe,Se){if(Se.code==="EACCES"||Se.code==="EPERM"){const ke=(0,R.coalesce)([ve.userDataPath,ve.extensionsPath,d.XDG_RUNTIME_DIR]).map(J=>(0,P.getPathLabel)(k.URI.file(J),{os:w.OS,tildify:ve}));this.showStartupWarningDialog((0,n.localize)(4,null),(0,n.localize)(5,null,(0,I.toErrorMessage)(Se),ke.join(` `)),pe)}}showStartupWarningDialog(ve,pe,Se){E.dialog.showMessageBoxSync({title:Se,type:"warning",buttons:[(0,P.mnemonicButtonLabel)((0,n.localize)(6,null))],message:ve,detail:pe,defaultId:0,noLink:!0})}async windowsAllowSetForegroundWindow(ve,pe){if(w.isWindows){const Se=await ve.getMainProcessId();pe.trace("Sending some foreground love to the running instance:",Se);try{(await new Promise((ke,J)=>{z(["windows-foreground-love"],ke,J)})).allowSetForegroundWindow(Se)}catch(ke){pe.error(ke)}}}quit(ve,pe){const Se=ve.get(se.ILogService),ke=ve.get(V.ILifecycleMainService);let J=0;pe&&(pe.isExpected?pe.message&&Se.trace(pe.message):(J=1,pe.stack?Se.error(pe.stack):Se.error(`Startup error: ${pe.toString()}`))),ke.kill(J)}resolveArgs(){const ve=this.validatePaths((0,c.parseMainProcessArgv)(process.argv));if(ve.wait&&!ve.waitMarkerFilePath){const pe=(0,a.createWaitMarkerFileSync)(ve.verbose);pe&&((0,c.addArg)(process.argv,"--waitMarkerFilePath",pe),ve.waitMarkerFilePath=pe)}return ve}validatePaths(ve){if(ve["open-url"]&&(ve._urls=ve._,ve._=[]),!ve.remote){const pe=this.doValidatePaths(ve._,ve.goto);ve._=pe}return ve}doValidatePaths(ve,pe){const Se=(0,g.cwd)(),ke=ve.map(he=>{let ye=String(he),Ce;pe&&(Ce=(0,S.parseLineAndColumnAware)(ye),ye=Ce.path),ye&&(ye=this.preparePath(Se,ye));const Fe=(0,S.sanitizeFilePath)(ye,Se),Oe=(0,u.basename)(Fe);return Oe&&!(0,S.isValidBasename)(Oe)?null:pe&&Ce?(Ce.path=Fe,this.toPath(Ce)):Fe}),J=w.isWindows||w.isMacintosh,ue=(0,R.distinct)(ke,he=>he&&J?he.toLowerCase():he||"");return(0,R.coalesce)(ue)}preparePath(ve,pe){return w.isWindows&&(pe=(0,h.rtrim)(pe,'"')),pe=(0,h.trim)((0,h.trim)(pe," ")," "),w.isWindows&&(pe=(0,u.resolve)(ve,pe),pe=(0,h.rtrim)(pe,".")),pe}toPath(ve){const pe=[ve.path];return typeof ve.line=="number"&&pe.push(String(ve.line)),typeof ve.column=="number"&&pe.push(String(ve.column)),pe.join(":")}}new Te().main()})}).call(this); //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/6261075646f055b99068d3688932416f2346dd3b/core/vs/code/electron-main/main.js.map x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586