From 1003afd1c06f1685a04cd16884d47ad0cea4a0db Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 15 May 2023 10:37:46 +0800 Subject: [PATCH] files --- public/index.html | 4 +- public/js/alex/alex.all.global.min.js | 2 + public/js/alex/react-dom.development.js | 239 + public/js/alex/react-dom.production.min.js | 25147 +++++++++++++++++++ public/js/alex/react.development.js | 3318 +++ public/js/alex/react.production.min.js | 32 + 6 files changed, 28740 insertions(+), 2 deletions(-) create mode 100644 public/js/alex/alex.all.global.min.js create mode 100644 public/js/alex/react-dom.development.js create mode 100644 public/js/alex/react-dom.production.min.js create mode 100644 public/js/alex/react.development.js create mode 100644 public/js/alex/react.production.min.js diff --git a/public/index.html b/public/index.html index 4d064c775..cd17908ae 100755 --- a/public/index.html +++ b/public/index.html @@ -45,8 +45,8 @@
- - + + diff --git a/public/js/alex/alex.all.global.min.js b/public/js/alex/alex.all.global.min.js new file mode 100644 index 000000000..80d9a754c --- /dev/null +++ b/public/js/alex/alex.all.global.min.js @@ -0,0 +1,2 @@ +/*! For license information please see alex.all.global.min.js.LICENSE.txt */ +(()=>{var e,t,n={46398:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"kotlin",aliases:["Kotlin","kotlin"],extensions:[".kt"],resolvedConfiguration:n(25910)},{id:"kotlinscript",aliases:["Kotlinscript","kotlinscript"],extensions:[".kts"],resolvedConfiguration:n(25910)}],o=[{language:"kotlin",scopeName:"source.kotlin",resolvedConfiguration:n(74789)},{language:"kotlinscript",scopeName:"source.kotlin",resolvedConfiguration:n(74789)},{scopeName:"markdown.kotlin.codeblock",resolvedConfiguration:n(4804),injectTo:["text.html.markdown"],embeddedLanguages:{"meta.embedded.block.kotlin":"kotlin"}}];return i(e,t)(r,o)}},73927:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"acss",aliases:["acss","acss"],extensions:[".acss"],resolvedConfiguration:n(13852)}],o=[{language:"acss",scopeName:"source.acss",resolvedConfiguration:n(38568)}];return i(e,t)(r,o)}},54058:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],resolvedConfiguration:n(40165)}],o=[{language:"bat",scopeName:"source.batchfile",resolvedConfiguration:n(4165)}];return i(e,t)(r,o)}},21332:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"clojure",aliases:["Clojure","clojure"],extensions:[".clj",".cljs",".cljc",".cljx",".clojure",".edn"],resolvedConfiguration:n(86121)}],o=[{language:"clojure",scopeName:"source.clojure",resolvedConfiguration:n(77617)}];return i(e,t)(r,o)}},63745:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"coffeescript",extensions:[".coffee",".cson",".iced"],aliases:["CoffeeScript","coffeescript","coffee"],resolvedConfiguration:n(38350)}],o=[{language:"coffeescript",scopeName:"source.coffee",resolvedConfiguration:n(23808)}];return i(e,t)(r,o)}},67334:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"c",extensions:[".c",".i"],aliases:["C","c"],resolvedConfiguration:n(56031)},{id:"cpp",extensions:[".cpp",".cc",".cxx",".c++",".hpp",".hh",".hxx",".h++",".h",".ii",".ino",".inl",".ipp",".hpp.in",".h.in"],aliases:["C++","Cpp","cpp"],resolvedConfiguration:n(56031)}],o=[{language:"c",scopeName:"source.c",resolvedConfiguration:n(78233)},{language:"cpp",scopeName:"source.cpp.embedded.macro",resolvedConfiguration:n(45502)},{language:"cpp",scopeName:"source.cpp",resolvedConfiguration:n(60603)},{scopeName:"source.c.platform",resolvedConfiguration:n(18979)}];return i(e,t)(r,o)}},65796:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],resolvedConfiguration:n(55059)}],o=[{language:"csharp",scopeName:"source.cs",resolvedConfiguration:n(87103)}];return i(e,t)(r,o)}},54033:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"css",aliases:["CSS","css"],extensions:[".css"],mimetypes:["text/css"],resolvedConfiguration:n(59466)}],o=[{language:"css",scopeName:"source.css",resolvedConfiguration:n(22546),tokenTypes:{"meta.function.url string.quoted":"other"}}];return i(e,t)(r,o)}},1335:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"dockerfile",extensions:[".dockerfile",".containerfile"],filenames:["Dockerfile","Containerfile"],filenamePatterns:["Dockerfile.*","Containerfile.*"],aliases:["Docker","Dockerfile","Containerfile"],resolvedConfiguration:n(83991)}],o=[{language:"dockerfile",scopeName:"source.dockerfile",resolvedConfiguration:n(71291)}];return i(e,t)(r,o)}},73851:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"fsharp",extensions:[".fs",".fsi",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],resolvedConfiguration:n(38294)}],o=[{language:"fsharp",scopeName:"source.fsharp",resolvedConfiguration:n(1842)}];return i(e,t)(r,o)}},839:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"go",extensions:[".go"],aliases:["Go"],resolvedConfiguration:n(54231)}],o=[{language:"go",scopeName:"source.go",resolvedConfiguration:n(31604)}];return i(e,t)(r,o)}},84092:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"groovy",aliases:["Groovy","groovy"],extensions:[".groovy",".gvy",".gradle"],filenames:["Jenkinsfile"],firstLine:"^#!.*\\bgroovy\\b",resolvedConfiguration:n(64798)}],o=[{language:"groovy",scopeName:"source.groovy",resolvedConfiguration:n(22358)}];return i(e,t)(r,o)}},90558:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"handlebars",extensions:[".handlebars",".hbs",".hjs"],aliases:["Handlebars","handlebars"],mimetypes:["text/x-handlebars-template"],resolvedConfiguration:n(27245)}],o=[{language:"handlebars",scopeName:"text.html.handlebars",resolvedConfiguration:n(59250)}];return i(e,t)(r,o)}},38166:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"hlsl",extensions:[".hlsl",".hlsli",".fx",".fxh",".vsh",".psh",".cginc",".compute"],aliases:["HLSL","hlsl"],resolvedConfiguration:n(38098)}],o=[{language:"hlsl",resolvedConfiguration:n(89636),scopeName:"source.hlsl"}];return i(e,t)(r,o)}},25728:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"html",extensions:[".html",".htm",".shtml",".xhtml",".xht",".mdoc",".jsp",".asp",".aspx",".jshtm",".volt",".ejs",".rhtml"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template","application/xhtml+xml"],resolvedConfiguration:n(13721)}],o=[{scopeName:"text.html.basic",resolvedConfiguration:n(75044),embeddedLanguages:{"text.html":"html","source.css":"css","source.js":"javascript","source.python":"python","source.smarty":"smarty"},tokenTypes:{"meta.tag string.quoted":"other"}},{language:"html",scopeName:"text.html.derivative",resolvedConfiguration:n(96111),embeddedLanguages:{"text.html":"html","source.css":"css","source.js":"javascript","source.python":"python","source.smarty":"smarty"},tokenTypes:{"meta.tag string.quoted":"other"}}];return i(e,t)(r,o)}},73157:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"ini",extensions:[".ini"],aliases:["Ini","ini"],resolvedConfiguration:n(67766)},{id:"properties",extensions:[".properties",".cfg",".conf",".directory",".gitattributes",".gitconfig",".gitmodules",".editorconfig"],filenames:["gitconfig"],filenamePatterns:["**/.config/git/config","**/.git/config"],aliases:["Properties","properties"],resolvedConfiguration:n(85723)}],o=[{language:"ini",scopeName:"source.ini",resolvedConfiguration:n(85247)},{language:"properties",scopeName:"source.ini",resolvedConfiguration:n(85247)}];return i(e,t)(r,o)}},94201:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"java",extensions:[".java",".jav"],aliases:["Java","java"],resolvedConfiguration:n(31845)}],o=[{language:"java",scopeName:"source.java",resolvedConfiguration:n(89061)}];return i(e,t)(r,o)}},84309:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"javascriptreact",aliases:["JavaScript React","jsx"],extensions:[".jsx"],resolvedConfiguration:n(62954)},{id:"javascript",aliases:["JavaScript","javascript","js"],extensions:[".js",".es6",".mjs",".cjs",".pac"],filenames:["jakefile"],firstLine:"^#!.*\\bnode",mimetypes:["text/javascript"],resolvedConfiguration:n(62954)},{id:"jsx-tags",aliases:[],resolvedConfiguration:n(5031)}],o=[{language:"javascriptreact",scopeName:"source.js.jsx",resolvedConfiguration:n(97758),embeddedLanguages:{"meta.tag.js":"jsx-tags","meta.tag.without-attributes.js":"jsx-tags","meta.tag.attributes.js.jsx":"javascriptreact","meta.embedded.expression.js":"javascriptreact"},tokenTypes:{"meta.template.expression":"other","entity.name.type.instance.jsdoc":"other","entity.name.function.tagged-template":"other","meta.import string.quoted":"other","variable.other.jsdoc":"other"}},{language:"javascript",scopeName:"source.js",resolvedConfiguration:n(22518),embeddedLanguages:{"meta.tag.js":"jsx-tags","meta.tag.without-attributes.js":"jsx-tags","meta.tag.attributes.js":"javascript","meta.embedded.expression.js":"javascript"},tokenTypes:{"meta.template.expression":"other","entity.name.type.instance.jsdoc":"other","entity.name.function.tagged-template":"other","meta.import string.quoted":"other","variable.other.jsdoc":"other"}},{scopeName:"source.js.regexp",resolvedConfiguration:n(22966)}];return i(e,t)(r,o)}},78587:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"json",aliases:["JSON","json"],extensions:[".json",".bowerrc",".jscsrc",".webmanifest",".js.map",".css.map",".ts.map",".har",".jslintrc",".jsonld"],filenames:["composer.lock",".watchmanconfig",".ember-cli"],mimetypes:["application/json","application/manifest+json"],resolvedConfiguration:n(85007)},{id:"jsonc",aliases:["JSON with Comments"],extensions:[".jsonc",".eslintrc",".eslintrc.json",".jsfmtrc",".jshintrc",".swcrc",".hintrc",".babelrc"],resolvedConfiguration:n(85007)}],o=[{language:"json",scopeName:"source.json",resolvedConfiguration:n(60698)},{language:"jsonc",scopeName:"source.json.comments",resolvedConfiguration:n(91802)}];return i(e,t)(r,o)}},6175:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"KCL",aliases:["KCL"],extensions:[".k"],resolvedConfiguration:n(50465)}],o=[{language:"KCL",scopeName:"source.kcl",resolvedConfiguration:n(17891)}];return i(e,t)(r,o)}},5842:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"less",aliases:["Less","less"],extensions:[".less"],mimetypes:["text/x-less","text/less"],resolvedConfiguration:n(47706)}],o=[{language:"less",scopeName:"source.css.less",resolvedConfiguration:n(78888)}];return i(e,t)(r,o)}},41494:e=>{e.exports=(e,t)=>(n=[],i=[])=>[...n.map((t=>e(t))),...i.map((e=>t(e)))]},97201:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{language:"log",scopeName:"text.log",resolvedConfiguration:n(69377)}];return i(e,t)([{id:"log",extensions:[".log","*.log.?"],aliases:["Log"]}],r)}},5597:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"lua",extensions:[".lua"],aliases:["Lua","lua"],resolvedConfiguration:n(94525)}],o=[{language:"lua",scopeName:"source.lua",resolvedConfiguration:n(76388)}];return i(e,t)(r,o)}},55297:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"makefile",aliases:["Makefile","makefile"],extensions:[".mk"],filenames:["Makefile","makefile","GNUmakefile","OCamlMakefile"],firstLine:"^#!\\s*/usr/bin/make",resolvedConfiguration:n(14427)}],o=[{language:"makefile",scopeName:"source.makefile",resolvedConfiguration:n(51628),tokenTypes:{"string.interpolated":"other"}}];return i(e,t)(r,o)}},84232:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"markdown",aliases:["Markdown","markdown"],extensions:[".md",".mkd",".mdwn",".mdown",".markdown",".markdn",".mdtxt",".mdtext",".workbook"],resolvedConfiguration:n(27765)}],o=[{language:"markdown",scopeName:"text.html.markdown",resolvedConfiguration:n(11696),embeddedLanguages:{"meta.embedded.block.html":"html","source.js":"javascript","source.css":"css","meta.embedded.block.frontmatter":"yaml","meta.embedded.block.css":"css","meta.embedded.block.ini":"ini","meta.embedded.block.java":"java","meta.embedded.block.lua":"lua","meta.embedded.block.makefile":"makefile","meta.embedded.block.perl":"perl","meta.embedded.block.r":"r","meta.embedded.block.ruby":"ruby","meta.embedded.block.php":"php","meta.embedded.block.sql":"sql","meta.embedded.block.vs_net":"vs_net","meta.embedded.block.xml":"xml","meta.embedded.block.xsl":"xsl","meta.embedded.block.yaml":"yaml","meta.embedded.block.dosbatch":"dosbatch","meta.embedded.block.clojure":"clojure","meta.embedded.block.coffee":"coffee","meta.embedded.block.c":"c","meta.embedded.block.cpp":"cpp","meta.embedded.block.diff":"diff","meta.embedded.block.dockerfile":"dockerfile","meta.embedded.block.go":"go","meta.embedded.block.groovy":"groovy","meta.embedded.block.pug":"jade","meta.embedded.block.javascript":"javascript","meta.embedded.block.json":"json","meta.embedded.block.less":"less","meta.embedded.block.objc":"objc","meta.embedded.block.scss":"scss","meta.embedded.block.perl6":"perl6","meta.embedded.block.powershell":"powershell","meta.embedded.block.python":"python","meta.embedded.block.rust":"rust","meta.embedded.block.scala":"scala","meta.embedded.block.shellscript":"shellscript","meta.embedded.block.typescript":"typescript","meta.embedded.block.typescriptreact":"typescriptreact","meta.embedded.block.csharp":"csharp","meta.embedded.block.fsharp":"fsharp"}}];return i(e,t)(r,o)}},20647:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"objective-c",extensions:[".m"],aliases:["Objective-C"],resolvedConfiguration:n(59696)},{id:"objective-cpp",extensions:[".mm"],aliases:["Objective-C++"],resolvedConfiguration:n(59696)}],o=[{language:"objective-c",scopeName:"source.objc",resolvedConfiguration:n(99848)},{language:"objective-cpp",scopeName:"source.objcpp",resolvedConfiguration:n(31299)}];return i(e,t)(r,o)}},40036:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"perl",aliases:["Perl","perl"],extensions:[".pl",".pm",".pod",".t",".PL",".psgi"],firstLine:"^#!.*\\bperl\\b",resolvedConfiguration:n(83978)},{id:"perl6",aliases:["Perl 6","perl6"],extensions:[".p6",".pl6",".pm6",".nqp"],firstLine:"(^#!.*\\bperl6\\b)|use\\s+v6",resolvedConfiguration:n(56891)}],o=[{language:"perl",scopeName:"source.perl",resolvedConfiguration:n(97072)},{language:"perl6",scopeName:"source.perl.6",resolvedConfiguration:n(81072)}];return i(e,t)(r,o)}},94444:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],firstLine:"^#!\\s*/.*\\bphp\\b",mimetypes:["application/x-php"],resolvedConfiguration:n(2972)}],o=[{language:"php",scopeName:"source.php",resolvedConfiguration:n(4175)},{language:"php",scopeName:"text.html.php",resolvedConfiguration:n(97791),embeddedLanguages:{"text.html":"html","source.php":"php","source.sql":"sql","text.xml":"xml","source.js":"javascript","source.json":"json","source.css":"css"}}];return i(e,t)(r,o)}},44963:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"powershell",extensions:[".ps1",".psm1",".psd1",".pssc",".psrc"],aliases:["PowerShell","powershell","ps","ps1"],firstLine:"^#!\\s*/.*\\bpwsh\\b",resolvedConfiguration:n(19114)}],o=[{language:"powershell",scopeName:"source.powershell",resolvedConfiguration:n(38655)}];return i(e,t)(r,o)}},5565:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"jade",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],resolvedConfiguration:n(67598)}],o=[{language:"jade",scopeName:"text.pug",resolvedConfiguration:n(48091)}];return i(e,t)(r,o)}},46932:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi",".pyi",".ipy"],aliases:["Python","py"],filenames:["Snakefile","SConstruct","SConscript"],firstLine:"^#!\\s*/?.*\\bpython[0-9.-]*\\b",resolvedConfiguration:n(69952)}],o=[{language:"python",scopeName:"source.python",resolvedConfiguration:n(70542)},{scopeName:"source.regexp.python",resolvedConfiguration:n(38864)}];return i(e,t)(r,o)}},77719:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"r",extensions:[".r",".rhistory",".rprofile",".rt"],aliases:["R","r"],resolvedConfiguration:n(48061)}],o=[{language:"r",scopeName:"source.r",resolvedConfiguration:n(88772)}];return i(e,t)(r,o)}},48394:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],resolvedConfiguration:n(39136)}],o=[{language:"razor",scopeName:"text.html.cshtml",resolvedConfiguration:n(84866),embeddedLanguages:{"section.embedded.source.cshtml":"csharp","source.css":"css","source.js":"javascript"}}];return i(e,t)(r,o)}},88768:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".rake",".ru",".erb",".podspec",".rbi"],filenames:["rakefile","gemfile","guardfile","podfile","capfile"],aliases:["Ruby","rb"],firstLine:"^#!\\s*/.*\\bruby\\b",resolvedConfiguration:n(49406)}],o=[{language:"ruby",scopeName:"source.ruby",resolvedConfiguration:n(48284)}];return i(e,t)(r,o)}},14323:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"rust",extensions:[".rs"],aliases:["Rust","rust"],resolvedConfiguration:n(90544)}],o=[{language:"rust",resolvedConfiguration:n(92656),scopeName:"source.rust"}];return i(e,t)(r,o)}},29307:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"schema",extensions:[".schema"],aliases:["Schema","fengdie Schema"],resolvedConfiguration:n(93887)}],o=[{language:"schema",scopeName:"source.schema",resolvedConfiguration:n(43396)}];return i(e,t)(r,o)}},32041:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"scss",aliases:["SCSS","scss"],extensions:[".scss"],mimetypes:["text/x-scss","text/scss"],resolvedConfiguration:n(10092)}],o=[{language:"scss",scopeName:"source.css.scss",resolvedConfiguration:n(5403)},{scopeName:"source.sassdoc",resolvedConfiguration:n(95794)}];return i(e,t)(r,o)}},95204:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"shaderlab",extensions:[".shader"],aliases:["ShaderLab","shaderlab"],resolvedConfiguration:n(90868)}],o=[{language:"shaderlab",resolvedConfiguration:n(37554),scopeName:"source.shaderlab"}];return i(e,t)(r,o)}},76451:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"shellscript",aliases:["Shell Script","shellscript","bash","sh","zsh","ksh","csh"],extensions:[".sh",".bash",".bashrc",".bash_aliases",".bash_profile",".bash_login",".ebuild",".install",".profile",".bash_logout",".zsh",".zshrc",".zprofile",".zlogin",".zlogout",".zshenv",".zsh-theme",".ksh",".csh",".cshrc",".tcshrc",".yashrc",".yash_profile"],filenames:["APKBUILD","PKGBUILD",".envrc",".hushlogin","zshrc","zshenv","zlogin","zprofile","zlogout","bashrc_Apple_Terminal","zshrc_Apple_Terminal"],firstLine:"^#!.*\\b(bash|zsh|sh|ksh|dtksh|pdksh|mksh|ash|dash|yash|sh|csh|jcsh|tcsh|itcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",resolvedConfiguration:n(25695),mimetypes:["text/x-shellscript"]}],o=[{language:"shellscript",scopeName:"source.shell",resolvedConfiguration:n(34430)}];return i(e,t)(r,o)}},36843:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"solidity",aliases:["Solidity","solidity"],extensions:[".sol"],resolvedConfiguration:n(81624)}],o=[{language:"solidity",scopeName:"source.solidity",resolvedConfiguration:n(64512)}];return i(e,t)(r,o)}},13766:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"sql",extensions:[".sql",".dsql"],aliases:["SQL"],resolvedConfiguration:n(96808)}],o=[{language:"sql",scopeName:"source.sql",resolvedConfiguration:n(55006)}];return i(e,t)(r,o)}},43566:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"swift",aliases:["Swift","swift"],extensions:[".swift"],resolvedConfiguration:n(45998)}],o=[{language:"swift",scopeName:"source.swift",resolvedConfiguration:n(14109)}];return i(e,t)(r,o)}},80378:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"typescript",aliases:["TypeScript","ts","typescript"],extensions:[".ts"],resolvedConfiguration:n(16574)},{id:"typescriptreact",aliases:["TypeScript React","tsx"],extensions:[".tsx"],resolvedConfiguration:n(16574)},{id:"jsonc",filenames:["tsconfig.json","jsconfig.json"],filenamePatterns:["tsconfig.*.json","jsconfig.*.json","tsconfig-*.json","jsconfig-*.json"]}],o=[{language:"typescript",scopeName:"source.ts",resolvedConfiguration:n(7295),tokenTypes:{"meta.template.expression":"other","entity.name.type.instance.jsdoc":"other","entity.name.function.tagged-template":"other","meta.import string.quoted":"other","variable.other.jsdoc":"other"}},{language:"typescriptreact",scopeName:"source.tsx",resolvedConfiguration:n(76660),embeddedLanguages:{"meta.tag.tsx":"jsx-tags","meta.tag.without-attributes.tsx":"jsx-tags","meta.tag.attributes.tsx":"typescriptreact","meta.embedded.expression.tsx":"typescriptreact"},tokenTypes:{"meta.template.expression":"other","entity.name.type.instance.jsdoc":"other","entity.name.function.tagged-template":"other","meta.import string.quoted":"other","variable.other.jsdoc":"other"}},{scopeName:"documentation.injection.ts",resolvedConfiguration:n(50361),injectTo:["source.ts","source.tsx"]},{scopeName:"documentation.injection.js.jsx",resolvedConfiguration:n(7680),injectTo:["source.js","source.js.jsx"]}];return i(e,t)(r,o)}},61226:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"vb",extensions:[".vb",".brs",".vbs",".bas"],aliases:["Visual Basic","vb"],resolvedConfiguration:n(47256)}],o=[{language:"vb",scopeName:"source.asp.vb.net",resolvedConfiguration:n(96624)}];return i(e,t)(r,o)}},89056:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"velocity",aliases:["Velocity","vtl"],extensions:[".vm",".vtl"],resolvedConfiguration:n(39426)}],o=[{language:"velocity",scopeName:"text.velocity",resolvedConfiguration:n(57765)},{language:"velocity",scopeName:"text.html.velocity",resolvedConfiguration:n(83742)}];return i(e,t)(r,o)}},58592:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{language:"proto3",scopeName:"source.proto",resolvedConfiguration:n(1680)}];return i(e,t)([{id:"proto3",extensions:[".proto"],aliases:["Protocol Buffers"]}],r)}},32636:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"vue",aliases:["Vue.js","vue"],extensions:[".vue"],resolvedConfiguration:n(62327)}],o=[{language:"vue",scopeName:"text.html.vue",resolvedConfiguration:n(57014)}];return i(e,t)(r,o)}},69203:(e,t,n)=>{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"xml",extensions:[".xml",".xsd",".ascx",".atom",".axml",".bpmn",".cpt",".csl",".csproj",".csproj.user",".dita",".ditamap",".dtd",".ent",".mod",".dtml",".fsproj",".fxml",".iml",".isml",".jmx",".launch",".menu",".mxml",".nuspec",".opml",".owl",".proj",".props",".pt",".publishsettings",".pubxml",".pubxml.user",".rbxlx",".rbxmx",".rdf",".rng",".rss",".shproj",".storyboard",".svg",".targets",".tld",".tmx",".vbproj",".vbproj.user",".vcxproj",".vcxproj.filters",".wsdl",".wxi",".wxl",".wxs",".xaml",".xbl",".xib",".xlf",".xliff",".xpdl",".xul",".xoml"],firstLine:"(\\<\\?xml.*)|(\\{const i=n(41494);e.exports=(e,t)=>{const r=[{id:"yaml",aliases:["YAML","yaml"],extensions:[".yml",".eyaml",".eyml",".yaml"],firstLine:"^#cloud-config",resolvedConfiguration:n(91418)}],o=[{language:"yaml",scopeName:"source.yaml",resolvedConfiguration:n(80307)}];return i(e,t)(r,o)}},51923:function(e,t,n){var i,r=n(43341).Buffer,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(5054),s=n(603),c=n(68384),l=n(40981),d=n(99957),u=n(59104),p=n(74053),h=n(26470);function m(e,t){return e.then((function(e){return Promise.resolve(t()).then((function(){return e}))}),(function(e){return Promise.resolve(t()).then((function(){throw e}))}))}function g(e){var t=new Map;return function(){for(var n=[],i=0;i=i.length)e();else{r=h.join(r,i[a]);var s=n._index.getInode(r);p.isDirInode(s)?s.entriesLoaded?o(a+1):n._readDirectory(r,s.getExtendData()).then((function(e){(e||[]).forEach((function(e){var t,i=e[0],o=e[1],a=e[2];(t=o===d.FileType.DIRECTORY?new p.DirInode:new p.FileInode(new d.default(d.FileType.FILE,-1,365))).setExtendData(a),n._index.addPathFast(h.join(r,i),t)})),s.entriesLoaded=!0,o(a+1)})).catch(t):e()}};o(0)}))},t.prototype.stat=function(e,t,n){var i,r=this._index.getInode(e);if(null===r)return n(s.ApiError.ENOENT(e));p.isFileInode(r)?(i=r.getData()).size<0&&this._stat?this._stat(e,r.getExtendData()).then((function(e){var t=e.size;i.size=t,n(null,d.default.clone(i))})).catch((function(e){n(s.ApiError.FileError(s.ErrorCode.EINVAL,e&&e.message||""))})):n(null,d.default.clone(i)):p.isDirInode(r)?(i=r.getStats(),n(null,i)):n(s.ApiError.FileError(s.ErrorCode.EINVAL,e))},t.prototype.open=function(e,t,n,i){if(t.isWriteable())return i(new s.ApiError(s.ErrorCode.EPERM,e));var o=this,a=this._index.getInode(e);if(null===a)return i(s.ApiError.ENOENT(e));if(!p.isFileInode(a))return i(s.ApiError.EISDIR(e));var l=a.getData();switch(t.pathExistsAction()){case c.ActionType.THROW_EXCEPTION:case c.ActionType.TRUNCATE_FILE:return i(s.ApiError.EEXIST(e));case c.ActionType.NOP:if(l.fileData)return i(null,new u.NoSyncFile(o,e,t,d.default.clone(l),l.fileData));this._readFile(e,a.getExtendData()).then((function(n){var a=r.from(n);return l.size=a.length,l.fileData=a,i(null,new u.NoSyncFile(o,e,t,d.default.clone(l),a))})).catch((function(e){return i(new s.ApiError(s.ErrorCode.EINVAL,e&&e.message||""))}));break;default:return i(new s.ApiError(s.ErrorCode.EINVAL,"Invalid FileMode object."))}},t.prototype.readdir=function(e,t){try{var n=this._index.getInode(e);null===n?t(s.ApiError.ENOENT(e)):p.isDirInode(n)?n.entriesLoaded?t(null,n.getListing()):t(new s.ApiError(s.ErrorCode.EINVAL,"Failed to readdir")):t(s.ApiError.ENOTDIR(e))}catch(e){t(e)}},t.prototype.readFile=function(e,t,n,i){var r=i;this.open(e,n,420,(function(e,n){if(e)return i(e);i=function(e,t){n.close((function(n){return e||(e=n),r(e,t)}))};var o=n.getBuffer();null===t?i(e,l.copyingSlice(o)):function(e,t,n){try{n(null,e.toString(t))}catch(e){n(e)}}(o,t,i)}))},t.Name="DynamicRequest",t.Options={stat:{type:"function",description:"Retrieve metadata about a file",optional:!0},readDirectory:{type:"function",description:"Retrieve all entries of a directory"},readFile:{type:"function",description:"Read the entire contents of a file."}},t}(a.BaseFileSystem);t.default=f,["stat","open","readdir"].forEach((function(e){var t=f.prototype[e];f.prototype[e]=function(n){for(var i=this,r=[],o=1;o0&&(arguments[0]=d(e,n)),t.apply(null,arguments)}:t}function p(e,t,n){return"Sync"!==e.slice(e.length-4)?function(){return arguments.length>0&&(t&&(arguments[0]=c(a.join(this._folder,arguments[0]))),n&&(arguments[1]=c(a.join(this._folder,arguments[1]))),arguments[arguments.length-1]=u(this._folder,arguments[arguments.length-1])),this._wrapped[e].apply(this._wrapped,arguments)}:function(){try{return t&&(arguments[0]=c(a.join(this._folder,arguments[0]))),n&&(arguments[1]=c(a.join(this._folder,arguments[1]))),this._wrapped[e].apply(this._wrapped,arguments)}catch(e){throw d(this._folder,e)}}}t.default=l,["diskSpace","stat","statSync","open","openSync","unlink","unlinkSync","rmdir","rmdirSync","mkdir","mkdirSync","readdir","readdirSync","exists","existsSync","realpath","realpathSync","truncate","truncateSync","readFile","readFileSync","writeFile","writeFileSync","appendFile","appendFileSync","chmod","chmodSync","chown","chownSync","utimes","utimesSync","readlink","readlinkSync"].forEach((function(e){l.prototype[e]=p(e,!0,!1)})),["rename","renameSync","link","linkSync","symlink","symlinkSync"].forEach((function(e){l.prototype[e]=p(e,!0,!0)}))},79764:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(76667),a=function(){function e(){this.store={}}return e.prototype.name=function(){return s.Name},e.prototype.clear=function(){this.store={}},e.prototype.beginTransaction=function(e){return new o.SimpleSyncRWTransaction(this)},e.prototype.get=function(e){return this.store[e]},e.prototype.put=function(e,t,n){return!(!n&&this.store.hasOwnProperty(e))&&(this.store[e]=t,!0)},e.prototype.del=function(e){delete this.store[e]},e}();t.InMemoryStore=a;var s=function(e){function t(){return e.call(this,{store:new a})||this}return r(t,e),t.Create=function(e,n){n(null,new t)},t.Name="InMemory",t.Options={},t}(o.SyncKeyValueFileSystem);t.default=s},99402:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(76667),a=n(603),s=n(43028),c=n(40981),l=function(){try{return s.default.indexedDB||s.default.mozIndexedDB||s.default.webkitIndexedDB||s.default.msIndexedDB}catch(e){return null}}();function d(e,t){switch(void 0===t&&(t=e.toString()),e.name){case"NotFoundError":return new a.ApiError(a.ErrorCode.ENOENT,t);case"QuotaExceededError":return new a.ApiError(a.ErrorCode.ENOSPC,t);default:return new a.ApiError(a.ErrorCode.EIO,t)}}function u(e,t,n){return void 0===t&&(t=a.ErrorCode.EIO),void 0===n&&(n=null),function(i){i.preventDefault(),e(new a.ApiError(t,null!==n?n:void 0))}}var p=function(){function e(e,t){this.tx=e,this.store=t}return e.prototype.get=function(e,t){try{var n=this.store.get(e);n.onerror=u(t),n.onsuccess=function(e){var n=e.target.result;t(null,void 0===n?n:c.arrayBuffer2Buffer(n))}}catch(e){t(d(e))}},e}();t.IndexedDBROTransaction=p;var h=function(e){function t(t,n){return e.call(this,t,n)||this}return r(t,e),t.prototype.put=function(e,t,n,i){try{var r=c.buffer2ArrayBuffer(t),o=void 0;(o=n?this.store.put(r,e):this.store.add(r,e)).onerror=u(i),o.onsuccess=function(e){i(null,!0)}}catch(e){i(d(e))}},t.prototype.del=function(e,t){try{var n=this.store.delete(e);n.onerror=u(t),n.onsuccess=function(e){t()}}catch(e){t(d(e))}},t.prototype.commit=function(e){setTimeout(e,0)},t.prototype.abort=function(e){var t=null;try{this.tx.abort()}catch(e){t=d(e)}finally{e(t)}},t}(p);t.IndexedDBRWTransaction=h;var m=function(){function e(e,t){this.db=e,this.storeName=t}return e.Create=function(t,n){var i=l.open(t,1);i.onupgradeneeded=function(e){var n=e.target.result;n.objectStoreNames.contains(t)&&n.deleteObjectStore(t),n.createObjectStore(t)},i.onsuccess=function(i){n(null,new e(i.target.result,t))},i.onerror=u(n,a.ErrorCode.EACCES)},e.prototype.name=function(){return g.Name+" - "+this.storeName},e.prototype.clear=function(e){try{var t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).clear();t.onsuccess=function(t){setTimeout(e,0)},t.onerror=u(e)}catch(t){e(d(t))}},e.prototype.beginTransaction=function(e){void 0===e&&(e="readonly");var t=this.db.transaction(this.storeName,e),n=t.objectStore(this.storeName);if("readwrite"===e)return new h(t,n);if("readonly"===e)return new p(t,n);throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid transaction type.")},e}();t.IndexedDBStore=m;var g=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.Create=function(e,n){void 0===e&&(e={}),m.Create(e.storeName?e.storeName:"browserfs",(function(i,r){if(r){var o=new t("number"==typeof e.cacheSize?e.cacheSize:100);o.init(r,(function(e){e?n(e):n(null,o)}))}else n(i)}))},t.isAvailable=function(){try{return void 0!==l&&null!==l.open("__browserfs_test__")}catch(e){return!1}},t.Name="IndexedDB",t.Options={storeName:{type:"string",optional:!0,description:"The name of this file system. You can have multiple IndexedDB file systems operating at once, but each must have a different name."},cacheSize:{type:"number",optional:!0,description:"The size of the inode cache. Defaults to 100. A size of 0 or below disables caching."}},t}(o.AsyncKeyValueFileSystem);t.default=g},28634:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(5054),a=n(79764),s=n(603),c=n(37022),l=n(26470),d=n(40981),u=function(e){function t(t){var n=e.call(this)||this;return n.mountList=[],n.mntMap={},n.rootFs=t,n}return r(t,e),t.Create=function(e,n){a.default.Create({},(function(i,r){if(r){var o=new t(r);try{Object.keys(e).forEach((function(t){o.mount(t,e[t])}))}catch(i){return n(i)}n(null,o)}else n(i)}))},t.isAvailable=function(){return!0},t.prototype.mount=function(e,t){if("/"!==e[0]&&(e="/"+e),e=l.resolve(e),this.mntMap[e])throw new s.ApiError(s.ErrorCode.EINVAL,"Mount point "+e+" is already taken.");d.mkdirpSync(e,511,this.rootFs),this.mntMap[e]=t,this.mountList.push(e),this.mountList=this.mountList.sort((function(e,t){return t.length-e.length}))},t.prototype.umount=function(e){if("/"!==e[0]&&(e="/"+e),e=l.resolve(e),!this.mntMap[e])throw new s.ApiError(s.ErrorCode.EINVAL,"Mount point "+e+" is already unmounted.");for(delete this.mntMap[e],this.mountList.splice(this.mountList.indexOf(e),1);"/"!==e&&0===this.rootFs.readdirSync(e).length;)this.rootFs.rmdirSync(e),e=l.dirname(e)},t.prototype._getFs=function(e){for(var t=this.mountList,n=t.length,i=0;i1?r.length:0))&&(e="/"),{fs:this.mntMap[r],path:e,mountPoint:r}}return{fs:this.rootFs,path:e,mountPoint:"/"}},t.prototype.getName=function(){return t.Name},t.prototype.diskSpace=function(e,t){t(0,0)},t.prototype.isReadOnly=function(){return!1},t.prototype.supportsLinks=function(){return!1},t.prototype.supportsProps=function(){return!1},t.prototype.supportsSynch=function(){return!0},t.prototype.standardizeError=function(e,t,n){var i=e.message.indexOf(t);return-1!==i&&(e.message=e.message.substr(0,i)+n+e.message.substr(i+t.length),e.path=n),e},t.prototype.rename=function(e,t,n){var i=this,r=this._getFs(e),o=this._getFs(t);return r.fs===o.fs?r.fs.rename(r.path,o.path,(function(a){a&&i.standardizeError(i.standardizeError(a,r.path,e),o.path,t),n(a)})):c.default.readFile(e,(function(i,r){if(i)return n(i);c.default.writeFile(t,r,(function(t){if(t)return n(t);c.default.unlink(e,n)}))}))},t.prototype.renameSync=function(e,t){var n=this._getFs(e),i=this._getFs(t);if(n.fs===i.fs)try{return n.fs.renameSync(n.path,i.path)}catch(r){throw this.standardizeError(this.standardizeError(r,n.path,e),i.path,t),r}var r=c.default.readFileSync(e);return c.default.writeFileSync(t,r),c.default.unlinkSync(e)},t.prototype.readdirSync=function(e){var t=this._getFs(e),n=null;if(t.fs!==this.rootFs)try{n=this.rootFs.readdirSync(e)}catch(e){}try{var i=t.fs.readdirSync(t.path);return null===n?i:i.concat(n.filter((function(e){return-1===i.indexOf(e)})))}catch(i){if(null===n)throw this.standardizeError(i,t.path,e);return n}},t.prototype.readdir=function(e,t){var n=this,i=this._getFs(e);i.fs.readdir(i.path,(function(r,o){if(i.fs!==n.rootFs)try{var a=n.rootFs.readdirSync(e);o=o?o.concat(a.filter((function(e){return-1===o.indexOf(e)}))):a}catch(o){if(r)return t(n.standardizeError(r,i.path,e))}else if(r)return t(n.standardizeError(r,i.path,e));t(null,o)}))},t.prototype.realpathSync=function(e,t){var n=this._getFs(e);try{var i=n.fs.realpathSync(n.path,{});return l.resolve(l.join(n.mountPoint,i))}catch(t){throw this.standardizeError(t,n.path,e)}},t.prototype.realpath=function(e,t,n){var i=this,r=this._getFs(e);r.fs.realpath(r.path,{},(function(t,o){t?n(i.standardizeError(t,r.path,e)):n(null,l.resolve(l.join(r.mountPoint,o)))}))},t.prototype.rmdirSync=function(e){var t=this._getFs(e);if(this._containsMountPt(e))throw s.ApiError.ENOTEMPTY(e);try{t.fs.rmdirSync(t.path)}catch(n){throw this.standardizeError(n,t.path,e)}},t.prototype.rmdir=function(e,t){var n=this,i=this._getFs(e);this._containsMountPt(e)?t(s.ApiError.ENOTEMPTY(e)):i.fs.rmdir(i.path,(function(r){t(r?n.standardizeError(r,i.path,e):null)}))},t.prototype._containsMountPt=function(e){for(var t=this.mountList,n=t.length,i=0;i=e.length&&r.slice(0,e.length)===e)return!0}return!1},t.Name="MountableFileSystem",t.Options={},t}(o.BaseFileSystem);function p(e,t,n){return t?function(){for(var t=[],n=0;n0&&e[0]instanceof s.ApiError&&t.standardizeError(e[0],o.path,r),a.apply(null,e)}}return o.fs[e].apply(o.fs,n)}}t.default=u;for(var h=[["exists","unlink","readlink"],["stat","mkdir","truncate"],["open","readFile","chmod","utimes"],["chown"],["writeFile","appendFile"]],m=0;m0)throw a.ApiError.ENOTEMPTY(n)}this._writable.existsSync(e)?this._writable.renameSync(e,n):this._writable.existsSync(n)||this._writable.mkdirSync(n,o),this._readable.existsSync(e)&&this._readable.readdirSync(e).forEach((function(t){i.renameSync(u.resolve(e,t),u.resolve(n,t))}))}else{if(this.existsSync(n)&&this.statSync(n,!1).isDirectory())throw a.ApiError.EISDIR(n);this.writeFileSync(n,this.readFileSync(e,null,h("r")),null,h("w"),r.mode)}e!==n&&this.existsSync(e)&&this.unlinkSync(e)},n.prototype.stat=function(e,t,n){var i=this;this.checkInitAsync(n)&&this._writable.stat(e,t,(function(r,o){if(r&&r.errno===a.ErrorCode.ENOENT){if(i._deletedFiles[e])return void n(a.ApiError.ENOENT(e));i._readable.stat(e,t,(function(e,t){t&&((t=c.default.clone(t)).mode=p(t.mode)),n(e,t)}))}else n(r,o)}))},n.prototype.statSync=function(e,t){this.checkInitialized();try{return this._writable.statSync(e,t)}catch(i){if(this._deletedFiles[e])throw a.ApiError.ENOENT(e);var n=c.default.clone(this._readable.statSync(e,t));return n.mode=p(n.mode),n}},n.prototype.open=function(e,t,n,i){var r=this;this.checkInitAsync(i)&&!this.checkPathAsync(e,i)&&this.stat(e,!1,(function(o,l){if(!l)return t.pathNotExistsAction()===s.ActionType.CREATE_FILE?r.createParentDirectoriesAsync(e,(function(o){return o?i(o):r._writable.open(e,t,n,i)})):i(a.ApiError.ENOENT(e));switch(t.pathExistsAction()){case s.ActionType.TRUNCATE_FILE:return r.createParentDirectoriesAsync(e,(function(o){if(o)return i(o);r._writable.open(e,t,n,i)}));case s.ActionType.NOP:return r._writable.exists(e,(function(o){o?r._writable.open(e,t,n,i):((l=c.default.clone(l)).mode=n,r._readable.readFile(e,null,h("r"),(function(n,o){if(n)return i(n);-1===l.size&&(l.size=o.length);var a=new m(r,e,t,l,o);i(null,a)})))}));default:return i(a.ApiError.EEXIST(e))}}))},n.prototype.openSync=function(e,n,i){if(this.checkInitialized(),this.checkPath(e),e===t.deletionLogPath)throw a.ApiError.EPERM("Cannot open deletion log.");if(!this.existsSync(e)){if(n.pathNotExistsAction()===s.ActionType.CREATE_FILE)return this.createParentDirectories(e),this._writable.openSync(e,n,i);throw a.ApiError.ENOENT(e)}switch(n.pathExistsAction()){case s.ActionType.TRUNCATE_FILE:return this.createParentDirectories(e),this._writable.openSync(e,n,i);case s.ActionType.NOP:if(this._writable.existsSync(e))return this._writable.openSync(e,n,i);var r=this._readable.readFileSync(e,null,h("r")),o=c.default.clone(this._readable.statSync(e,!1));return o.mode=i,new m(this,e,n,o,r);default:throw a.ApiError.EEXIST(e)}},n.prototype.unlink=function(e,t){var n=this;this.checkInitAsync(t)&&!this.checkPathAsync(e,t)&&this.exists(e,(function(i){if(!i)return t(a.ApiError.ENOENT(e));n._writable.exists(e,(function(i){if(i)return n._writable.unlink(e,(function(i){if(i)return t(i);n.exists(e,(function(i){i&&n.deletePath(e),t(null)}))}));n.deletePath(e),t(null)}))}))},n.prototype.unlinkSync=function(e){if(this.checkInitialized(),this.checkPath(e),!this.existsSync(e))throw a.ApiError.ENOENT(e);this._writable.existsSync(e)&&this._writable.unlinkSync(e),this.existsSync(e)&&this.deletePath(e)},n.prototype.rmdir=function(e,t){var n=this;if(this.checkInitAsync(t)){var i=function(){n.readdir(e,(function(i,r){return i?t(i):r.length?t(a.ApiError.ENOTEMPTY(e)):(n.deletePath(e),void t(null))}))};this.exists(e,(function(r){if(!r)return t(a.ApiError.ENOENT(e));n._writable.exists(e,(function(r){r?n._writable.rmdir(e,(function(r){if(r)return t(r);n._readable.exists(e,(function(e){e?i():t()}))})):i()}))}))}},n.prototype.rmdirSync=function(e){if(this.checkInitialized(),!this.existsSync(e))throw a.ApiError.ENOENT(e);if(this._writable.existsSync(e)&&this._writable.rmdirSync(e),this.existsSync(e)){if(this.readdirSync(e).length>0)throw a.ApiError.ENOTEMPTY(e);this.deletePath(e)}},n.prototype.mkdir=function(e,t,n){var i=this;this.checkInitAsync(n)&&this.exists(e,(function(r){if(r)return n(a.ApiError.EEXIST(e));i.createParentDirectoriesAsync(e,(function(r){if(r)return n(r);i._writable.mkdir(e,t,n)}))}))},n.prototype.mkdirSync=function(e,t){if(this.checkInitialized(),this.existsSync(e))throw a.ApiError.EEXIST(e);this.createParentDirectories(e),this._writable.mkdirSync(e,t)},n.prototype.readdir=function(e,t){var n=this;this.checkInitAsync(t)&&this.stat(e,!1,(function(i,r){return i?t(i):r.isDirectory()?void n._writable.readdir(e,(function(i,r){if(i&&"ENOENT"!==i.code)return t(i);!i&&r||(r=[]),n._readable.readdir(e,(function(i,o){!i&&o||(o=[]);var a={},s=r.concat(o.filter((function(t){return!n._deletedFiles[e+"/"+t]}))).filter((function(e){var t=!a[e];return a[e]=!0,t}));t(null,s)}))})):t(a.ApiError.ENOTDIR(e))}))},n.prototype.readdirSync=function(e){var t=this;if(this.checkInitialized(),!this.statSync(e,!1).isDirectory())throw a.ApiError.ENOTDIR(e);var n=[];try{n=n.concat(this._writable.readdirSync(e))}catch(e){}try{n=n.concat(this._readable.readdirSync(e).filter((function(n){return!t._deletedFiles[e+"/"+n]})))}catch(e){}var i={};return n.filter((function(e){var t=!i[e];return i[e]=!0,t}))},n.prototype.exists=function(e,t){var n=this;this.checkInitialized(),this._writable.exists(e,(function(i){if(i)return t(!0);n._readable.exists(e,(function(i){t(i&&!0!==n._deletedFiles[e])}))}))},n.prototype.existsSync=function(e){return this.checkInitialized(),this._writable.existsSync(e)||this._readable.existsSync(e)&&!0!==this._deletedFiles[e]},n.prototype.chmod=function(e,t,n,i){var r=this;this.checkInitAsync(i)&&this.operateOnWritableAsync(e,(function(o){if(o)return i(o);r._writable.chmod(e,t,n,i)}))},n.prototype.chmodSync=function(e,t,n){var i=this;this.checkInitialized(),this.operateOnWritable(e,(function(){i._writable.chmodSync(e,t,n)}))},n.prototype.chown=function(e,t,n,i,r){var o=this;this.checkInitAsync(r)&&this.operateOnWritableAsync(e,(function(a){if(a)return r(a);o._writable.chown(e,t,n,i,r)}))},n.prototype.chownSync=function(e,t,n,i){var r=this;this.checkInitialized(),this.operateOnWritable(e,(function(){r._writable.chownSync(e,t,n,i)}))},n.prototype.utimes=function(e,t,n,i){var r=this;this.checkInitAsync(i)&&this.operateOnWritableAsync(e,(function(o){if(o)return i(o);r._writable.utimes(e,t,n,i)}))},n.prototype.utimesSync=function(e,t,n){var i=this;this.checkInitialized(),this.operateOnWritable(e,(function(){i._writable.utimesSync(e,t,n)}))},n.prototype.deletePath=function(e){this._deletedFiles[e]=!0,this.updateLog("d"+e+"\n")},n.prototype.updateLog=function(e){var n=this;this._deleteLog+=e,this._deleteLogUpdatePending?this._deleteLogUpdateNeeded=!0:(this._deleteLogUpdatePending=!0,this._writable.writeFile(t.deletionLogPath,this._deleteLog,"utf8",s.FileFlag.getFileFlag("w"),420,(function(e){n._deleteLogUpdatePending=!1,e?n._deleteLogError=e:n._deleteLogUpdateNeeded&&(n._deleteLogUpdateNeeded=!1,n.updateLog(""))})))},n.prototype._reparseDeletionLog=function(){var e=this;this._deletedFiles={},this._deleteLog.split("\n").forEach((function(t){e._deletedFiles[t.slice(1)]="d"===t.slice(0,1)}))},n.prototype.checkInitialized=function(){if(!this._isInitialized)throw new a.ApiError(a.ErrorCode.EPERM,"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.");if(null!==this._deleteLogError){var e=this._deleteLogError;throw this._deleteLogError=null,e}},n.prototype.checkInitAsync=function(e){if(!this._isInitialized)return e(new a.ApiError(a.ErrorCode.EPERM,"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.")),!1;if(null!==this._deleteLogError){var t=this._deleteLogError;return this._deleteLogError=null,e(t),!1}return!0},n.prototype.checkPath=function(e){if(e===t.deletionLogPath)throw a.ApiError.EPERM(e)},n.prototype.checkPathAsync=function(e,n){return e===t.deletionLogPath&&(n(a.ApiError.EPERM(e)),!0)},n.prototype.createParentDirectoriesAsync=function(e,t){var n=u.dirname(e),i=[],r=this;function o(){if(!i.length)return t();var e=i.pop();r._readable.stat(e,!1,(function(n,i){if(!i)return t();r._writable.mkdir(e,i.mode,(function(e){if(e)return t(e);o()}))}))}this._writable.stat(n,!1,(function e(s,c){s?"/"===n?t(new a.ApiError(a.ErrorCode.EBUSY,"Invariant failed: root does not exist!")):(i.push(n),n=u.dirname(n),r._writable.stat(n,!1,e)):o()}))},n.prototype.createParentDirectories=function(e){for(var t=this,n=u.dirname(e),i=[];!this._writable.existsSync(n);)i.push(n),n=u.dirname(n);(i=i.reverse()).forEach((function(e){t._writable.mkdirSync(e,t.statSync(e,!1).mode)}))},n.prototype.operateOnWritable=function(e,t){if(!this.existsSync(e))throw a.ApiError.ENOENT(e);this._writable.existsSync(e)||this.copyToWritable(e),t()},n.prototype.operateOnWritableAsync=function(e,t){var n=this;this.exists(e,(function(i){if(!i)return t(a.ApiError.ENOENT(e));n._writable.exists(e,(function(i){if(!i)return n.copyToWritableAsync(e,t);t()}))}))},n.prototype.copyToWritable=function(e){var t=this.statSync(e,!1);t.isDirectory()?this._writable.mkdirSync(e,t.mode):this.writeFileSync(e,this._readable.readFileSync(e,null,h("r")),null,h("w"),this.statSync(e,!1).mode)},n.prototype.copyToWritableAsync=function(e,t){var n=this;this.stat(e,!1,(function(i,r){return i?t(i):r.isDirectory()?n._writable.mkdir(e,r.mode,t):void n._readable.readFile(e,null,h("r"),(function(i,o){if(i)return t(i);n.writeFile(e,o,null,h("w"),r.mode,t)}))}))},n}(o.BaseFileSystem);t.UnlockedOverlayFS=g;var f=function(e){function t(t,n){return e.call(this,new g(t,n))||this}return r(t,e),t.Create=function(e,n){try{var i=new t(e.writable,e.readable);i._initialize((function(e){n(e,i)}))}catch(e){n(e)}},t.isAvailable=function(){return g.isAvailable()},t.prototype.getOverlayedFileSystems=function(){return e.prototype.getFSUnlocked.call(this).getOverlayedFileSystems()},t.prototype.unwrap=function(){return e.prototype.getFSUnlocked.call(this)},t.prototype._initialize=function(t){e.prototype.getFSUnlocked.call(this)._initialize(t)},t.Name="OverlayFS",t.Options={writable:{type:"object",description:"The file system to write modified files to."},readable:{type:"object",description:"The file system that initially populates this file system."}},t}(d.default);t.default=f},96086:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,a=n(603),s=n(99957),c=n(5054),l=n(68384),d=n(59104),u=n(40981),p=n(49363),h=n(8916),m=n(78843).Hq,g=n(74053),f={};function _(e,t){return new Date(1980+(t>>9),(t>>5&15)-1,31&t,e>>11,e>>5&63,31&e)}function b(e,t,n,i){return 0===i?"":t?e.toString("utf8",n,n+i):p.default.byte2str(e.slice(n,n+i))}!function(e){e[e.MSDOS=0]="MSDOS",e[e.AMIGA=1]="AMIGA",e[e.OPENVMS=2]="OPENVMS",e[e.UNIX=3]="UNIX",e[e.VM_CMS=4]="VM_CMS",e[e.ATARI_ST=5]="ATARI_ST",e[e.OS2_HPFS=6]="OS2_HPFS",e[e.MAC=7]="MAC",e[e.Z_SYSTEM=8]="Z_SYSTEM",e[e.CP_M=9]="CP_M",e[e.NTFS=10]="NTFS",e[e.MVS=11]="MVS",e[e.VSE=12]="VSE",e[e.ACORN_RISC=13]="ACORN_RISC",e[e.VFAT=14]="VFAT",e[e.ALT_MVS=15]="ALT_MVS",e[e.BEOS=16]="BEOS",e[e.TANDEM=17]="TANDEM",e[e.OS_400=18]="OS_400",e[e.OSX=19]="OSX"}(t.ExternalFileAttributeType||(t.ExternalFileAttributeType={})),function(e){e[e.STORED=0]="STORED",e[e.SHRUNK=1]="SHRUNK",e[e.REDUCED_1=2]="REDUCED_1",e[e.REDUCED_2=3]="REDUCED_2",e[e.REDUCED_3=4]="REDUCED_3",e[e.REDUCED_4=5]="REDUCED_4",e[e.IMPLODE=6]="IMPLODE",e[e.DEFLATE=8]="DEFLATE",e[e.DEFLATE64=9]="DEFLATE64",e[e.TERSE_OLD=10]="TERSE_OLD",e[e.BZIP2=12]="BZIP2",e[e.LZMA=14]="LZMA",e[e.TERSE_NEW=18]="TERSE_NEW",e[e.LZ77=19]="LZ77",e[e.WAVPACK=97]="WAVPACK",e[e.PPMD=98]="PPMD"}(o=t.CompressionMethod||(t.CompressionMethod={}));var y=function(){function e(e){if(this.data=e,67324752!==e.readUInt32LE(0))throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid Zip file: Local file header has invalid signature: "+this.data.readUInt32LE(0))}return e.prototype.versionNeeded=function(){return this.data.readUInt16LE(4)},e.prototype.flags=function(){return this.data.readUInt16LE(6)},e.prototype.compressionMethod=function(){return this.data.readUInt16LE(8)},e.prototype.lastModFileTime=function(){return _(this.data.readUInt16LE(10),this.data.readUInt16LE(12))},e.prototype.rawLastModFileTime=function(){return this.data.readUInt32LE(10)},e.prototype.crc32=function(){return this.data.readUInt32LE(14)},e.prototype.fileNameLength=function(){return this.data.readUInt16LE(26)},e.prototype.extraFieldLength=function(){return this.data.readUInt16LE(28)},e.prototype.fileName=function(){return b(this.data,this.useUTF8(),30,this.fileNameLength())},e.prototype.extraField=function(){var e=30+this.fileNameLength();return this.data.slice(e,e+this.extraFieldLength())},e.prototype.totalSize=function(){return 30+this.fileNameLength()+this.extraFieldLength()},e.prototype.useUTF8=function(){return 2048==(2048&this.flags())},e}();t.FileHeader=y;var v=function(){function e(e,t,n){this.header=e,this.record=t,this.data=n}return e.prototype.decompress=function(){var e=this.header.compressionMethod(),t=f[e];if(t)return t(this.data,this.record.compressedSize(),this.record.uncompressedSize(),this.record.flag());var n=o[e];throw n||(n="Unknown: "+e),new a.ApiError(a.ErrorCode.EINVAL,"Invalid compression method on file '"+this.header.fileName()+"': "+n)},e.prototype.getHeader=function(){return this.header},e.prototype.getRecord=function(){return this.record},e.prototype.getRawData=function(){return this.data},e}();t.FileData=v;var C=function(){function e(e){this.data=e}return e.prototype.crc32=function(){return this.data.readUInt32LE(0)},e.prototype.compressedSize=function(){return this.data.readUInt32LE(4)},e.prototype.uncompressedSize=function(){return this.data.readUInt32LE(8)},e}();t.DataDescriptor=C;var S=function(){function e(e){if(this.data=e,134630224!==this.data.readUInt32LE(0))throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid archive extra data record signature: "+this.data.readUInt32LE(0))}return e.prototype.length=function(){return this.data.readUInt32LE(4)},e.prototype.extraFieldData=function(){return this.data.slice(8,8+this.length())},e}();t.ArchiveExtraDataRecord=S;var w=function(){function e(e){if(this.data=e,84233040!==this.data.readUInt32LE(0))throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid digital signature signature: "+this.data.readUInt32LE(0))}return e.prototype.size=function(){return this.data.readUInt16LE(4)},e.prototype.signatureData=function(){return this.data.slice(6,6+this.size())},e}();t.DigitalSignature=w;var E=function(){function e(e,t){if(this.zipData=e,this.data=t,33639248!==this.data.readUInt32LE(0))throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid Zip file: Central directory record has invalid signature: "+this.data.readUInt32LE(0));this._filename=this.produceFilename()}return e.prototype.versionMadeBy=function(){return this.data.readUInt16LE(4)},e.prototype.versionNeeded=function(){return this.data.readUInt16LE(6)},e.prototype.flag=function(){return this.data.readUInt16LE(8)},e.prototype.compressionMethod=function(){return this.data.readUInt16LE(10)},e.prototype.lastModFileTime=function(){return _(this.data.readUInt16LE(12),this.data.readUInt16LE(14))},e.prototype.rawLastModFileTime=function(){return this.data.readUInt32LE(12)},e.prototype.crc32=function(){return this.data.readUInt32LE(16)},e.prototype.compressedSize=function(){return this.data.readUInt32LE(20)},e.prototype.uncompressedSize=function(){return this.data.readUInt32LE(24)},e.prototype.fileNameLength=function(){return this.data.readUInt16LE(28)},e.prototype.extraFieldLength=function(){return this.data.readUInt16LE(30)},e.prototype.fileCommentLength=function(){return this.data.readUInt16LE(32)},e.prototype.diskNumberStart=function(){return this.data.readUInt16LE(34)},e.prototype.internalAttributes=function(){return this.data.readUInt16LE(36)},e.prototype.externalAttributes=function(){return this.data.readUInt32LE(38)},e.prototype.headerRelativeOffset=function(){return this.data.readUInt32LE(42)},e.prototype.produceFilename=function(){return b(this.data,this.useUTF8(),46,this.fileNameLength()).replace(/\\/g,"/")},e.prototype.fileName=function(){return this._filename},e.prototype.rawFileName=function(){return this.data.slice(46,46+this.fileNameLength())},e.prototype.extraField=function(){var e=44+this.fileNameLength();return this.data.slice(e,e+this.extraFieldLength())},e.prototype.fileComment=function(){var e=46+this.fileNameLength()+this.extraFieldLength();return b(this.data,this.useUTF8(),e,this.fileCommentLength())},e.prototype.rawFileComment=function(){var e=46+this.fileNameLength()+this.extraFieldLength();return this.data.slice(e,e+this.fileCommentLength())},e.prototype.totalSize=function(){return 46+this.fileNameLength()+this.extraFieldLength()+this.fileCommentLength()},e.prototype.isDirectory=function(){var e=this.fileName();return!!(16&this.externalAttributes())||"/"===e.charAt(e.length-1)},e.prototype.isFile=function(){return!this.isDirectory()},e.prototype.useUTF8=function(){return 2048==(2048&this.flag())},e.prototype.isEncrypted=function(){return 1==(1&this.flag())},e.prototype.getFileData=function(){var e=this.headerRelativeOffset(),t=new y(this.zipData.slice(e));return new v(t,this,this.zipData.slice(e+t.totalSize()))},e.prototype.getData=function(){return this.getFileData().decompress()},e.prototype.getRawData=function(){return this.getFileData().getRawData()},e.prototype.getStats=function(){return new s.default(s.FileType.FILE,this.uncompressedSize(),365,Date.now(),this.lastModFileTime().getTime())},e}();t.CentralDirectory=E;var k=function(){function e(e){if(this.data=e,101010256!==this.data.readUInt32LE(0))throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid Zip file: End of central directory record has invalid signature: "+this.data.readUInt32LE(0))}return e.prototype.diskNumber=function(){return this.data.readUInt16LE(4)},e.prototype.cdDiskNumber=function(){return this.data.readUInt16LE(6)},e.prototype.cdDiskEntryCount=function(){return this.data.readUInt16LE(8)},e.prototype.cdTotalEntryCount=function(){return this.data.readUInt16LE(10)},e.prototype.cdSize=function(){return this.data.readUInt32LE(12)},e.prototype.cdOffset=function(){return this.data.readUInt32LE(16)},e.prototype.cdZipCommentLength=function(){return this.data.readUInt16LE(20)},e.prototype.cdZipComment=function(){return b(this.data,!0,22,this.cdZipCommentLength())},e.prototype.rawCdZipComment=function(){return this.data.slice(22,22+this.cdZipCommentLength())},e}();t.EndOfCentralDirectory=k;var x=function(e,t,n,i){this.index=e,this.directoryEntries=t,this.eocd=n,this.data=i};t.ZipTOC=x;var T=function(e){function t(t,n){void 0===n&&(n="");var i=e.call(this)||this;return i.name=n,i._index=new g.FileIndex,i._directoryEntries=[],i._eocd=null,i._index=t.index,i._directoryEntries=t.directoryEntries,i._eocd=t.eocd,i.data=t.data,i}return r(t,e),t.Create=function(e,n){try{t._computeIndex(e.zipData,(function(i,r){if(r){var o=new t(r,e.name);n(null,o)}else n(i)}))}catch(e){n(e)}},t.isAvailable=function(){return!0},t.RegisterDecompressionMethod=function(e,t){f[e]=t},t._getEOCD=function(e){for(var t=Math.min(65557,e.length-1),n=22;n{var i=n(43341).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=n(603),o=n(68384),a=n(26470),s=n(99957),c=n(8916),l=function(e,t){return e};function d(e,t){if("function"!=typeof e)throw new Error("Callback must be a function.");var n=l(e,t);switch(t){case 1:return function(e){c.default((function(){return n(e)}))};case 2:return function(e,t){c.default((function(){return n(e,t)}))};case 3:return function(e,t,i){c.default((function(){return n(e,t,i)}))};default:throw new Error("Invalid invocation of wrapCb.")}}function u(e){if(e)return e;throw new r.ApiError(r.ErrorCode.EIO,"Initialize BrowserFS with a file system using BrowserFS.initialize(filesystem)")}function p(e,t){switch(typeof e){case"number":return e;case"string":var n=parseInt(e,8);return isNaN(n)?t:n;default:return t}}function h(e){if(e instanceof Date)return e;if("number"==typeof e)return new Date(1e3*e);throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid time.")}function m(e){if(e.indexOf("\0")>=0)throw new r.ApiError(r.ErrorCode.EINVAL,"Path must be a string without null bytes.");if(""===e)throw new r.ApiError(r.ErrorCode.EINVAL,"Path must not be empty.");return a.resolve(e)}function g(e,t,n,i){switch(null===e?"null":typeof e){case"object":return{encoding:void 0!==e.encoding?e.encoding:t,flag:void 0!==e.flag?e.flag:n,mode:p(e.mode,i)};case"string":return{encoding:e,flag:n,mode:i};case"null":case"undefined":case"function":return{encoding:t,flag:n,mode:i};default:throw new TypeError('"options" must be a string or an object, got '+typeof e+" instead.")}}function f(){}var _=function(){function e(){this.F_OK=0,this.R_OK=4,this.W_OK=2,this.X_OK=1,this.root=null,this.fdMap={},this.nextFd=100}return e.prototype.initialize=function(e){if(!e.constructor.isAvailable())throw new r.ApiError(r.ErrorCode.EINVAL,"Tried to instantiate BrowserFS with an unavailable file system.");return this.root=e},e.prototype._toUnixTimestamp=function(e){if("number"==typeof e)return e;if(e instanceof Date)return e.getTime()/1e3;throw new Error("Cannot parse time: "+e)},e.prototype.getRootFS=function(){return this.root?this.root:null},e.prototype.rename=function(e,t,n){void 0===n&&(n=f);var i=d(n,1);try{u(this.root).rename(m(e),m(t),i)}catch(e){i(e)}},e.prototype.renameSync=function(e,t){u(this.root).renameSync(m(e),m(t))},e.prototype.exists=function(e,t){void 0===t&&(t=f);var n=d(t,1);try{return u(this.root).exists(m(e),n)}catch(e){return n(!1)}},e.prototype.existsSync=function(e){try{return u(this.root).existsSync(m(e))}catch(e){return!1}},e.prototype.stat=function(e,t){void 0===t&&(t=f);var n=d(t,2);try{return u(this.root).stat(m(e),!1,n)}catch(e){return n(e)}},e.prototype.statSync=function(e){return u(this.root).statSync(m(e),!1)},e.prototype.lstat=function(e,t){void 0===t&&(t=f);var n=d(t,2);try{return u(this.root).stat(m(e),!0,n)}catch(e){return n(e)}},e.prototype.lstatSync=function(e){return u(this.root).statSync(m(e),!0)},e.prototype.truncate=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=f);var i=0;"function"==typeof t?n=t:"number"==typeof t&&(i=t);var o=d(n,1);try{if(i<0)throw new r.ApiError(r.ErrorCode.EINVAL);return u(this.root).truncate(m(e),i,o)}catch(e){return o(e)}},e.prototype.truncateSync=function(e,t){if(void 0===t&&(t=0),t<0)throw new r.ApiError(r.ErrorCode.EINVAL);return u(this.root).truncateSync(m(e),t)},e.prototype.unlink=function(e,t){void 0===t&&(t=f);var n=d(t,1);try{return u(this.root).unlink(m(e),n)}catch(e){return n(e)}},e.prototype.unlinkSync=function(e){return u(this.root).unlinkSync(m(e))},e.prototype.open=function(e,t,n,i){var r=this;void 0===i&&(i=f);var a=p(n,420),s=d(i="function"==typeof n?n:i,2);try{u(this.root).open(m(e),o.FileFlag.getFileFlag(t),a,(function(e,t){t?s(e,r.getFdForFile(t)):s(e)}))}catch(e){s(e)}},e.prototype.openSync=function(e,t,n){return void 0===n&&(n=420),this.getFdForFile(u(this.root).openSync(m(e),o.FileFlag.getFileFlag(t),p(n,420)))},e.prototype.readFile=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=f);var i=g(t,null,"r",null),a=d(n="function"==typeof t?t:n,2);try{var s=o.FileFlag.getFileFlag(i.flag);return s.isReadable()?u(this.root).readFile(m(e),i.encoding,s,a):a(new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to readFile must allow for reading."))}catch(e){return a(e)}},e.prototype.readFileSync=function(e,t){void 0===t&&(t={});var n=g(t,null,"r",null),i=o.FileFlag.getFileFlag(n.flag);if(!i.isReadable())throw new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to readFile must allow for reading.");return u(this.root).readFileSync(m(e),n.encoding,i)},e.prototype.writeFile=function(e,t,n,i){void 0===n&&(n={}),void 0===i&&(i=f);var a=g(n,"utf8","w",420),s=d(i="function"==typeof n?n:i,1);try{var c=o.FileFlag.getFileFlag(a.flag);return c.isWriteable()?u(this.root).writeFile(m(e),t,a.encoding,c,a.mode,s):s(new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to writeFile must allow for writing."))}catch(e){return s(e)}},e.prototype.writeFileSync=function(e,t,n){var i=g(n,"utf8","w",420),a=o.FileFlag.getFileFlag(i.flag);if(!a.isWriteable())throw new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to writeFile must allow for writing.");return u(this.root).writeFileSync(m(e),t,i.encoding,a,i.mode)},e.prototype.appendFile=function(e,t,n,i){void 0===i&&(i=f);var a=g(n,"utf8","a",420),s=d(i="function"==typeof n?n:i,1);try{var c=o.FileFlag.getFileFlag(a.flag);if(!c.isAppendable())return s(new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to appendFile must allow for appending."));u(this.root).appendFile(m(e),t,a.encoding,c,a.mode,s)}catch(e){s(e)}},e.prototype.appendFileSync=function(e,t,n){var i=g(n,"utf8","a",420),a=o.FileFlag.getFileFlag(i.flag);if(!a.isAppendable())throw new r.ApiError(r.ErrorCode.EINVAL,"Flag passed to appendFile must allow for appending.");return u(this.root).appendFileSync(m(e),t,i.encoding,a,i.mode)},e.prototype.fstat=function(e,t){void 0===t&&(t=f);var n=d(t,2);try{this.fd2file(e).stat(n)}catch(e){n(e)}},e.prototype.fstatSync=function(e){return this.fd2file(e).statSync()},e.prototype.close=function(e,t){var n=this;void 0===t&&(t=f);var i=d(t,1);try{this.fd2file(e).close((function(t){t||n.closeFd(e),i(t)}))}catch(e){i(e)}},e.prototype.closeSync=function(e){this.fd2file(e).closeSync(),this.closeFd(e)},e.prototype.ftruncate=function(e,t,n){void 0===n&&(n=f);var i="number"==typeof t?t:0,o=d(n="function"==typeof t?t:n,1);try{var a=this.fd2file(e);if(i<0)throw new r.ApiError(r.ErrorCode.EINVAL);a.truncate(i,o)}catch(e){o(e)}},e.prototype.ftruncateSync=function(e,t){void 0===t&&(t=0);var n=this.fd2file(e);if(t<0)throw new r.ApiError(r.ErrorCode.EINVAL);n.truncateSync(t)},e.prototype.fsync=function(e,t){void 0===t&&(t=f);var n=d(t,1);try{this.fd2file(e).sync(n)}catch(e){n(e)}},e.prototype.fsyncSync=function(e){this.fd2file(e).syncSync()},e.prototype.fdatasync=function(e,t){void 0===t&&(t=f);var n=d(t,1);try{this.fd2file(e).datasync(n)}catch(e){n(e)}},e.prototype.fdatasyncSync=function(e){this.fd2file(e).datasyncSync()},e.prototype.write=function(e,t,n,o,a,s){void 0===s&&(s=f);var c,l,u,p=null;if("string"==typeof t){var h="utf8";switch(typeof n){case"function":s=n;break;case"number":p=n,h="string"==typeof o?o:"utf8",s="function"==typeof a?a:s;break;default:return(s="function"==typeof o?o:"function"==typeof a?a:s)(new r.ApiError(r.ErrorCode.EINVAL,"Invalid arguments."))}l=0,u=(c=i.from(t,h)).length}else c=t,l=n,u=o,p="number"==typeof a?a:null,s="function"==typeof a?a:s;var m=d(s,3);try{var g=this.fd2file(e);null==p&&(p=g.getPos()),g.write(c,l,u,p,m)}catch(e){m(e)}},e.prototype.writeSync=function(e,t,n,r,o){var a,s,c,l=0;if("string"==typeof t){c="number"==typeof n?n:null;var d="string"==typeof r?r:"utf8";l=0,s=(a=i.from(t,d)).length}else a=t,l=n,s=r,c="number"==typeof o?o:null;var u=this.fd2file(e);return null==c&&(c=u.getPos()),u.writeSync(a,l,s,c)},e.prototype.read=function(e,t,n,r,o,a){var s,c,l,u,p;if(void 0===a&&(a=f),"number"==typeof t){l=t,s=n;var h=r;a="function"==typeof o?o:a,c=0,u=i.alloc(l),p=d((function(e,t,n){if(e)return a(e);a(e,n.toString(h),t)}),3)}else u=t,c=n,l=r,s=o,p=d(a,3);try{var m=this.fd2file(e);null==s&&(s=m.getPos()),m.read(u,c,l,s,p)}catch(e){p(e)}},e.prototype.readSync=function(e,t,n,r,o){var a,s,c,l,d=!1,u="utf8";"number"==typeof t?(c=t,l=n,u=r,s=0,a=i.alloc(c),d=!0):(a=t,s=n,c=r,l=o);var p=this.fd2file(e);null==l&&(l=p.getPos());var h=p.readSync(a,s,c,l);return d?[a.toString(u),h]:h},e.prototype.fchown=function(e,t,n,i){void 0===i&&(i=f);var r=d(i,1);try{this.fd2file(e).chown(t,n,r)}catch(e){r(e)}},e.prototype.fchownSync=function(e,t,n){this.fd2file(e).chownSync(t,n)},e.prototype.fchmod=function(e,t,n){var i=d(n,1);try{var r="string"==typeof t?parseInt(t,8):t;this.fd2file(e).chmod(r,i)}catch(e){i(e)}},e.prototype.fchmodSync=function(e,t){var n="string"==typeof t?parseInt(t,8):t;this.fd2file(e).chmodSync(n)},e.prototype.futimes=function(e,t,n,i){void 0===i&&(i=f);var r=d(i,1);try{var o=this.fd2file(e);"number"==typeof t&&(t=new Date(1e3*t)),"number"==typeof n&&(n=new Date(1e3*n)),o.utimes(t,n,r)}catch(e){r(e)}},e.prototype.futimesSync=function(e,t,n){this.fd2file(e).utimesSync(h(t),h(n))},e.prototype.rmdir=function(e,t){void 0===t&&(t=f);var n=d(t,1);try{e=m(e),u(this.root).rmdir(e,n)}catch(e){n(e)}},e.prototype.rmdirSync=function(e){return e=m(e),u(this.root).rmdirSync(e)},e.prototype.mkdir=function(e,t,n){void 0===n&&(n=f),"function"==typeof t&&(n=t,t=511);var i=d(n,1);try{e=m(e),u(this.root).mkdir(e,t,i)}catch(e){i(e)}},e.prototype.mkdirSync=function(e,t){u(this.root).mkdirSync(m(e),p(t,511))},e.prototype.readdir=function(e,t){void 0===t&&(t=f);var n=d(t,2);try{e=m(e),u(this.root).readdir(e,n)}catch(e){n(e)}},e.prototype.readdirSync=function(e){return e=m(e),u(this.root).readdirSync(e)},e.prototype.link=function(e,t,n){void 0===n&&(n=f);var i=d(n,1);try{e=m(e),t=m(t),u(this.root).link(e,t,i)}catch(e){i(e)}},e.prototype.linkSync=function(e,t){return e=m(e),t=m(t),u(this.root).linkSync(e,t)},e.prototype.symlink=function(e,t,n,i){void 0===i&&(i=f);var o="string"==typeof n?n:"file",a=d(i="function"==typeof n?n:i,1);try{if("file"!==o&&"dir"!==o)return a(new r.ApiError(r.ErrorCode.EINVAL,"Invalid type: "+o));e=m(e),t=m(t),u(this.root).symlink(e,t,o,a)}catch(e){a(e)}},e.prototype.symlinkSync=function(e,t,n){if(n){if("file"!==n&&"dir"!==n)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid type: "+n)}else n="file";return e=m(e),t=m(t),u(this.root).symlinkSync(e,t,n)},e.prototype.readlink=function(e,t){void 0===t&&(t=f);var n=d(t,2);try{e=m(e),u(this.root).readlink(e,n)}catch(e){n(e)}},e.prototype.readlinkSync=function(e){return e=m(e),u(this.root).readlinkSync(e)},e.prototype.chown=function(e,t,n,i){void 0===i&&(i=f);var r=d(i,1);try{e=m(e),u(this.root).chown(e,!1,t,n,r)}catch(e){r(e)}},e.prototype.chownSync=function(e,t,n){e=m(e),u(this.root).chownSync(e,!1,t,n)},e.prototype.lchown=function(e,t,n,i){void 0===i&&(i=f);var r=d(i,1);try{e=m(e),u(this.root).chown(e,!0,t,n,r)}catch(e){r(e)}},e.prototype.lchownSync=function(e,t,n){e=m(e),u(this.root).chownSync(e,!0,t,n)},e.prototype.chmod=function(e,t,n){void 0===n&&(n=f);var i=d(n,1);try{var o=p(t,-1);if(o<0)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid mode.");u(this.root).chmod(m(e),!1,o,i)}catch(e){i(e)}},e.prototype.chmodSync=function(e,t){var n=p(t,-1);if(n<0)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid mode.");e=m(e),u(this.root).chmodSync(e,!1,n)},e.prototype.lchmod=function(e,t,n){void 0===n&&(n=f);var i=d(n,1);try{var o=p(t,-1);if(o<0)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid mode.");u(this.root).chmod(m(e),!0,o,i)}catch(e){i(e)}},e.prototype.lchmodSync=function(e,t){var n=p(t,-1);if(n<1)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid mode.");u(this.root).chmodSync(m(e),!0,n)},e.prototype.utimes=function(e,t,n,i){void 0===i&&(i=f);var r=d(i,1);try{u(this.root).utimes(m(e),h(t),h(n),r)}catch(e){r(e)}},e.prototype.utimesSync=function(e,t,n){u(this.root).utimesSync(m(e),h(t),h(n))},e.prototype.realpath=function(e,t,n){void 0===n&&(n=f);var i="object"==typeof t?t:{},r=d(n="function"==typeof t?t:f,2);try{e=m(e),u(this.root).realpath(e,i,r)}catch(e){r(e)}},e.prototype.realpathSync=function(e,t){return void 0===t&&(t={}),e=m(e),u(this.root).realpathSync(e,t)},e.prototype.watchFile=function(e,t,n){throw void 0===n&&(n=f),new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.unwatchFile=function(e,t){throw void 0===t&&(t=f),new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.watch=function(e,t,n){throw void 0===n&&(n=f),new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.access=function(e,t,n){throw void 0===n&&(n=f),new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.accessSync=function(e,t){throw new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.createReadStream=function(e,t){throw new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.createWriteStream=function(e,t){throw new r.ApiError(r.ErrorCode.ENOTSUP)},e.prototype.wrapCallbacks=function(e){l=e},e.prototype.getFdForFile=function(e){var t=this.nextFd++;return this.fdMap[t]=e,t},e.prototype.fd2file=function(e){var t=this.fdMap[e];if(t)return t;throw new r.ApiError(r.ErrorCode.EBADF,"Invalid file descriptor.")},e.prototype.closeFd=function(e){delete this.fdMap[e]},e.Stats=s.default,e}();t.default=_},603:function(e,t,n){var i,r,o=n(43341).Buffer,a=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.EPERM=1]="EPERM",e[e.ENOENT=2]="ENOENT",e[e.EIO=5]="EIO",e[e.EBADF=9]="EBADF",e[e.EACCES=13]="EACCES",e[e.EBUSY=16]="EBUSY",e[e.EEXIST=17]="EEXIST",e[e.ENOTDIR=20]="ENOTDIR",e[e.EISDIR=21]="EISDIR",e[e.EINVAL=22]="EINVAL",e[e.EFBIG=27]="EFBIG",e[e.ENOSPC=28]="ENOSPC",e[e.EROFS=30]="EROFS",e[e.ENOTEMPTY=39]="ENOTEMPTY",e[e.ENOTSUP=95]="ENOTSUP"}(r=t.ErrorCode||(t.ErrorCode={})),t.ErrorStrings={},t.ErrorStrings[r.EPERM]="Operation not permitted.",t.ErrorStrings[r.ENOENT]="No such file or directory.",t.ErrorStrings[r.EIO]="Input/output error.",t.ErrorStrings[r.EBADF]="Bad file descriptor.",t.ErrorStrings[r.EACCES]="Permission denied.",t.ErrorStrings[r.EBUSY]="Resource busy or locked.",t.ErrorStrings[r.EEXIST]="File exists.",t.ErrorStrings[r.ENOTDIR]="File is not a directory.",t.ErrorStrings[r.EISDIR]="File is a directory.",t.ErrorStrings[r.EINVAL]="Invalid argument.",t.ErrorStrings[r.EFBIG]="File is too big.",t.ErrorStrings[r.ENOSPC]="No space left on disk.",t.ErrorStrings[r.EROFS]="Cannot modify a read-only file system.",t.ErrorStrings[r.ENOTEMPTY]="Directory is not empty.",t.ErrorStrings[r.ENOTSUP]="Operation is not supported.";var s=function(e){function n(n,i,o){void 0===i&&(i=t.ErrorStrings[n]);var a=e.call(this,i)||this;return a.syscall="",a.errno=n,a.code=r[n],a.path=o,a.stack=(new Error).stack,a.message="Error: "+a.code+": "+i+(a.path?", '"+a.path+"'":""),a}return a(n,e),n.fromJSON=function(e){var t=new n(0);return t.errno=e.errno,t.code=e.code,t.path=e.path,t.stack=e.stack,t.message=e.message,t},n.fromBuffer=function(e,t){return void 0===t&&(t=0),n.fromJSON(JSON.parse(e.toString("utf8",t+4,t+4+e.readUInt32LE(t))))},n.FileError=function(e,i){return new n(e,t.ErrorStrings[e],i)},n.ENOENT=function(e){return this.FileError(r.ENOENT,e)},n.EEXIST=function(e){return this.FileError(r.EEXIST,e)},n.EISDIR=function(e){return this.FileError(r.EISDIR,e)},n.ENOTDIR=function(e){return this.FileError(r.ENOTDIR,e)},n.EPERM=function(e){return this.FileError(r.EPERM,e)},n.ENOTEMPTY=function(e){return this.FileError(r.ENOTEMPTY,e)},n.prototype.toString=function(){return this.message},n.prototype.toJSON=function(){return{errno:this.errno,code:this.code,path:this.path,stack:this.stack,message:this.message}},n.prototype.writeToBuffer=function(e,t){void 0===e&&(e=o.alloc(this.bufferSize())),void 0===t&&(t=0);var n=e.write(JSON.stringify(this.toJSON()),t+4);return e.writeUInt32LE(n,t),e},n.prototype.bufferSize=function(){return 4+o.byteLength(JSON.stringify(this.toJSON()))},n}(Error);t.ApiError=s},24359:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(603),r=function(){function e(){}return e.prototype.sync=function(e){e(new i.ApiError(i.ErrorCode.ENOTSUP))},e.prototype.syncSync=function(){throw new i.ApiError(i.ErrorCode.ENOTSUP)},e.prototype.datasync=function(e){this.sync(e)},e.prototype.datasyncSync=function(){return this.syncSync()},e.prototype.chown=function(e,t,n){n(new i.ApiError(i.ErrorCode.ENOTSUP))},e.prototype.chownSync=function(e,t){throw new i.ApiError(i.ErrorCode.ENOTSUP)},e.prototype.chmod=function(e,t){t(new i.ApiError(i.ErrorCode.ENOTSUP))},e.prototype.chmodSync=function(e){throw new i.ApiError(i.ErrorCode.ENOTSUP)},e.prototype.utimes=function(e,t,n){n(new i.ApiError(i.ErrorCode.ENOTSUP))},e.prototype.utimesSync=function(e,t){throw new i.ApiError(i.ErrorCode.ENOTSUP)},e}();t.BaseFile=r},68384:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(603);!function(e){e[e.NOP=0]="NOP",e[e.THROW_EXCEPTION=1]="THROW_EXCEPTION",e[e.TRUNCATE_FILE=2]="TRUNCATE_FILE",e[e.CREATE_FILE=3]="CREATE_FILE"}(i=t.ActionType||(t.ActionType={}));var o=function(){function e(t){if(this.flagStr=t,e.validFlagStrs.indexOf(t)<0)throw new r.ApiError(r.ErrorCode.EINVAL,"Invalid flag: "+t)}return e.getFileFlag=function(t){return e.flagCache.hasOwnProperty(t)?e.flagCache[t]:e.flagCache[t]=new e(t)},e.prototype.getFlagString=function(){return this.flagStr},e.prototype.isReadable=function(){return-1!==this.flagStr.indexOf("r")||-1!==this.flagStr.indexOf("+")},e.prototype.isWriteable=function(){return-1!==this.flagStr.indexOf("w")||-1!==this.flagStr.indexOf("a")||-1!==this.flagStr.indexOf("+")},e.prototype.isTruncating=function(){return-1!==this.flagStr.indexOf("w")},e.prototype.isAppendable=function(){return-1!==this.flagStr.indexOf("a")},e.prototype.isSynchronous=function(){return-1!==this.flagStr.indexOf("s")},e.prototype.isExclusive=function(){return-1!==this.flagStr.indexOf("x")},e.prototype.pathExistsAction=function(){return this.isExclusive()?i.THROW_EXCEPTION:this.isTruncating()?i.TRUNCATE_FILE:i.NOP},e.prototype.pathNotExistsAction=function(){return(this.isWriteable()||this.isAppendable())&&"r+"!==this.flagStr?i.CREATE_FILE:i.THROW_EXCEPTION},e.flagCache={},e.validFlagStrs=["r","r+","rs","rs+","w","wx","w+","wx+","a","ax","a+","ax+"],e}();t.FileFlag=o},5054:function(e,t,n){var i,r=n(43341).Buffer,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(603),s=n(68384),c=n(26470),l=n(40981),d=function(){function e(){}return e.prototype.supportsLinks=function(){return!1},e.prototype.diskSpace=function(e,t){t(0,0)},e.prototype.openFile=function(e,t,n){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.createFile=function(e,t,n,i){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.open=function(e,t,n,i){var r=this;this.stat(e,!1,(function(o,d){if(o)switch(t.pathNotExistsAction()){case s.ActionType.CREATE_FILE:return r.stat(c.dirname(e),!1,(function(o,s){o?i(o):s&&!s.isDirectory()?i(a.ApiError.ENOTDIR(c.dirname(e))):r.createFile(e,t,n,i)}));case s.ActionType.THROW_EXCEPTION:return i(a.ApiError.ENOENT(e));default:return i(new a.ApiError(a.ErrorCode.EINVAL,"Invalid FileFlag object."))}else{if(d&&d.isDirectory())return i(a.ApiError.EISDIR(e));switch(t.pathExistsAction()){case s.ActionType.THROW_EXCEPTION:return i(a.ApiError.EEXIST(e));case s.ActionType.TRUNCATE_FILE:return r.openFile(e,t,(function(e,t){e?i(e):t?t.truncate(0,(function(){t.sync((function(){i(null,t)}))})):l.fail()}));case s.ActionType.NOP:return r.openFile(e,t,i);default:return i(new a.ApiError(a.ErrorCode.EINVAL,"Invalid FileFlag object."))}}}))},e.prototype.rename=function(e,t,n){n(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.renameSync=function(e,t){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.stat=function(e,t,n){n(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.statSync=function(e,t){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.openFileSync=function(e,t,n){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.createFileSync=function(e,t,n){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.openSync=function(e,t,n){var i;try{i=this.statSync(e,!1)}catch(i){switch(t.pathNotExistsAction()){case s.ActionType.CREATE_FILE:if(!this.statSync(c.dirname(e),!1).isDirectory())throw a.ApiError.ENOTDIR(c.dirname(e));return this.createFileSync(e,t,n);case s.ActionType.THROW_EXCEPTION:throw a.ApiError.ENOENT(e);default:throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid FileFlag object.")}}if(i.isDirectory())throw a.ApiError.EISDIR(e);switch(t.pathExistsAction()){case s.ActionType.THROW_EXCEPTION:throw a.ApiError.EEXIST(e);case s.ActionType.TRUNCATE_FILE:return this.unlinkSync(e),this.createFileSync(e,t,i.mode);case s.ActionType.NOP:return this.openFileSync(e,t,n);default:throw new a.ApiError(a.ErrorCode.EINVAL,"Invalid FileFlag object.")}},e.prototype.unlink=function(e,t){t(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.unlinkSync=function(e){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.rmdir=function(e,t){t(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.rmdirSync=function(e){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.mkdir=function(e,t,n){n(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.mkdirSync=function(e,t){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.readdir=function(e,t){t(new a.ApiError(a.ErrorCode.ENOTSUP))},e.prototype.readdirSync=function(e){throw new a.ApiError(a.ErrorCode.ENOTSUP)},e.prototype.exists=function(e,t){this.stat(e,null,(function(e){t(!e)}))},e.prototype.existsSync=function(e){try{return this.statSync(e,!0),!0}catch(e){return!1}},e.prototype.realpath=function(e,t,n){if(this.supportsLinks())for(var i=e.split(c.sep),r=0;r{Object.defineProperty(t,"__esModule",{value:!0});var i="undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g;t.default=i},92487:(e,t)=>{function n(e,t,n,i,r){return en?n+1:e+1:i===r?t:t+1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return 0;if(e.length>t.length){var i=e;e=t,t=i}for(var r=e.length,o=t.length;r>0&&e.charCodeAt(r-1)===t.charCodeAt(o-1);)r--,o--;for(var a=0;av?v+1:C+1:m===p[r+h]?c:c+1,c=C}}return v}},37022:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(5449),r=new i.default,o={},a=i.default.prototype;Object.keys(a).forEach((function(e){"function"==typeof r[e]?o[e]=function(){return r[e].apply(r,arguments)}:o[e]=r[e]})),o.changeFSModule=function(e){r=e},o.getFSModule=function(){return r},o.FS=i.default,o.Stats=i.default.Stats,t.default=o},99957:(e,t,n)=>{var i,r=n(43341).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.FILE=32768]="FILE",e[e.DIRECTORY=16384]="DIRECTORY",e[e.SYMLINK=40960]="SYMLINK"}(i=t.FileType||(t.FileType={}));var o=function(){function e(e,t,n,r,o,a,s){this.dev=0,this.ino=0,this.rdev=0,this.nlink=1,this.blksize=4096,this.uid=0,this.gid=0,this.fileData=null,this.size=t;var c=0;if("number"!=typeof r&&(r=c=Date.now()),"number"!=typeof o&&(c||(c=Date.now()),o=c),"number"!=typeof a&&(c||(c=Date.now()),a=c),"number"!=typeof s&&(c||(c=Date.now()),s=c),this.atimeMs=r,this.ctimeMs=a,this.mtimeMs=o,this.birthtimeMs=s,n)this.mode=n;else switch(e){case i.FILE:this.mode=420;break;case i.DIRECTORY:default:this.mode=511}this.blocks=Math.ceil(t/512),this.mode<4096&&(this.mode|=e)}return e.fromBuffer=function(t){var n=t.readUInt32LE(0),i=t.readUInt32LE(4);return new e(61440&i,n,4095&i,t.readDoubleLE(8),t.readDoubleLE(16),t.readDoubleLE(24))},e.clone=function(t){return new e(61440&t.mode,t.size,4095&t.mode,t.atimeMs,t.mtimeMs,t.ctimeMs,t.birthtimeMs)},Object.defineProperty(e.prototype,"atime",{get:function(){return new Date(this.atimeMs)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mtime",{get:function(){return new Date(this.mtimeMs)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctime",{get:function(){return new Date(this.ctimeMs)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"birthtime",{get:function(){return new Date(this.birthtimeMs)},enumerable:!0,configurable:!0}),e.prototype.toBuffer=function(){var e=r.alloc(32);return e.writeUInt32LE(this.size,0),e.writeUInt32LE(this.mode,4),e.writeDoubleLE(this.atime.getTime(),8),e.writeDoubleLE(this.mtime.getTime(),16),e.writeDoubleLE(this.ctime.getTime(),24),e},e.prototype.isFile=function(){return(61440&this.mode)===i.FILE},e.prototype.isDirectory=function(){return(61440&this.mode)===i.DIRECTORY},e.prototype.isSymbolicLink=function(){return(61440&this.mode)===i.SYMLINK},e.prototype.chmod=function(e){this.mode=61440&this.mode|e},e.prototype.isSocket=function(){return!1},e.prototype.isBlockDevice=function(){return!1},e.prototype.isCharacterDevice=function(){return!1},e.prototype.isFIFO=function(){return!1},e}();t.default=o},40981:(e,t,n)=>{var i=n(43341).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=n(603),o=n(92487),a=n(26470);function s(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function c(e){return e instanceof i?e:0===e.byteOffset&&e.byteLength===e.buffer.byteLength?l(e.buffer):i.from(e.buffer,e.byteOffset,e.byteLength)}function l(e){return i.from(e)}t.deprecationMessage=function(e,t,n){e&&console.warn("["+t+"] Direct file system constructor usage is deprecated for this file system, and will be removed in the next major version. Please use the '"+t+".Create("+JSON.stringify(n)+", callback)' method instead. See https://github.com/jvilk/BrowserFS/issues/176 for more details.")},t.isIE="undefined"!=typeof navigator&&!(!/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())&&-1===navigator.userAgent.indexOf("Trident")),t.isWebWorker="undefined"==typeof window,t.fail=function(){throw new Error("BFS has reached an impossible code path; please file a bug.")},t.mkdirpSync=function e(t,n,i){i.existsSync(t)||(e(a.dirname(t),n,i),i.mkdirSync(t,n))},t.buffer2ArrayBuffer=function(e){var t=s(e),n=t.byteOffset,i=t.byteLength;return 0===n&&i===t.buffer.byteLength?t.buffer:t.buffer.slice(n,n+i)},t.buffer2Uint8array=s,t.arrayish2Buffer=function(e){return e instanceof i?e:e instanceof Uint8Array?c(e):i.from(e)},t.uint8Array2Buffer=c,t.arrayBuffer2Buffer=l,t.copyingSlice=function(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=e.length),t<0||n<0||n>e.length||t>n)throw new TypeError("Invalid slice bounds on buffer of length "+e.length+": ["+t+", "+n+"]");if(0===e.length)return u();var i=s(e),r=e[0],o=(r+1)%255;return e[0]=o,i[0]===o?(i[0]=r,c(i.slice(t,n))):(e[0]=r,c(i.subarray(t,n)))};var d=null;function u(){return d||(d=i.alloc(0))}t.emptyBuffer=u,t.bufferValidator=function(e,t){i.isBuffer(e)?t():t(new r.ApiError(r.ErrorCode.EINVAL,"option must be a Buffer."))},t.checkOptions=function(e,t,n){var i=e.Options,a=e.Name,s=0,c=!1,l=!1;function d(e){c||(e&&(c=!0,n(e)),0===--s&&l&&n())}var u=function(e){if(i.hasOwnProperty(e)){var l=i[e],u=t[e];if(null==u){if(!l.optional){var p=Object.keys(t).filter((function(e){return!(e in i)})).map((function(t){return{str:t,distance:o.default(e,t)}})).filter((function(e){return e.distance<5})).sort((function(e,t){return e.distance-t.distance}));return c?{value:void 0}:(c=!0,{value:n(new r.ApiError(r.ErrorCode.EINVAL,"["+a+"] Required option '"+e+"' not provided."+(p.length>0?" You provided unrecognized option '"+p[0].str+"'; perhaps you meant to type '"+e+"'.":"")+"\nOption description: "+l.description))})}}else{if(!(Array.isArray(l.type)?-1!==l.type.indexOf(typeof u):typeof u===l.type))return c?{value:void 0}:(c=!0,{value:n(new r.ApiError(r.ErrorCode.EINVAL,"["+a+"] Value provided for option "+e+" is not the proper type. Expected "+(Array.isArray(l.type)?"one of {"+l.type.join(", ")+"}":l.type)+", but received "+typeof u+"\nOption description: "+l.description))});l.validator&&(s++,l.validator(u,d))}}};for(var p in i){var h=u(p);if("object"==typeof h)return h.value}l=!0,0!==s||c||n()}},49363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.str2byte=function(t,n){for(var i=t.length>n.length?n.length:t.length,r=0;r127){var a=e.extendedChars.indexOf(t.charAt(r));a>-1&&(o=a+128)}n[o]=r}return i},e.byte2str=function(t){for(var n=new Array(t.length),i=0;i127?e.extendedChars[r-128]:String.fromCharCode(r)}return n.join("")},e.byteLength=function(e){return e.length},e.extendedChars=["脟","眉","茅","芒","盲","脿","氓","莽","锚","毛","猫","茂","卯","矛","脛","脜","脡","忙","脝","么","枚","貌","没","霉","每","脰","脺","酶","拢","脴","脳","茠","谩","铆","贸","煤","帽","脩","陋","潞","驴","庐","卢","陆","录","隆","芦","禄","_","_","_","娄","娄","脕","脗","脌","漏","娄","娄","+","+","垄","楼","+","+","-","-","+","-","+","茫","脙","+","+","-","-","娄","-","+","陇","冒","脨","脢","脣","脠","i","脥","脦","脧","+","+","_","_","娄","脤","_","脫","脽","脭","脪","玫","脮","碌","镁","脼","脷","脹","脵","媒","脻","炉","麓","颅","卤","_","戮","露","搂","梅","赂","掳","篓","路","鹿","鲁","虏","_"," "],e}();t.default=n},74053:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(99957),r=n(26470),o=function(){function e(){this._index={},this.addPath("/",new s)}return e.fromListing=function(t){var n=new e,r=new s;n._index["/"]=r;for(var o=[["",t,r]];o.length>0;){var c=void 0,l=o.pop(),d=l[0],u=l[1],p=l[2];for(var h in u)if(u.hasOwnProperty(h)){var m=u[h],g=d+"/"+h;m?(n._index[g]=c=new s,o.push([g,m,c])):c=new a(new i.default(i.FileType.FILE,-1,365)),p&&(p._ls[h]=c)}}return n},e.prototype.fileIterator=function(e){for(var t in this._index)if(this._index.hasOwnProperty(t))for(var n=this._index[t],i=0,r=n.getListing();i{var i=n(43341).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=n(99957),o=function(){function e(e,t,n,i,r,o){this.id=e,this.size=t,this.mode=n,this.atime=i,this.mtime=r,this.ctime=o}return e.fromBuffer=function(t){if(void 0===t)throw new Error("NO");return new e(t.toString("ascii",30),t.readUInt32LE(0),t.readUInt16LE(4),t.readDoubleLE(6),t.readDoubleLE(14),t.readDoubleLE(22))},e.prototype.toStats=function(){return new r.default((61440&this.mode)===r.FileType.DIRECTORY?r.FileType.DIRECTORY:r.FileType.FILE,this.size,this.mode,this.atime,this.mtime,this.ctime)},e.prototype.getSize=function(){return 30+this.id.length},e.prototype.toBuffer=function(e){return void 0===e&&(e=i.alloc(this.getSize())),e.writeUInt32LE(this.size,0),e.writeUInt16LE(this.mode,4),e.writeDoubleLE(this.atime,6),e.writeDoubleLE(this.mtime,14),e.writeDoubleLE(this.ctime,22),e.write(this.id,30,this.id.length,"ascii"),e},e.prototype.update=function(e){var t=!1;this.size!==e.size&&(this.size=e.size,t=!0),this.mode!==e.mode&&(this.mode=e.mode,t=!0);var n=e.atime.getTime();this.atime!==n&&(this.atime=n,t=!0);var i=e.mtime.getTime();this.mtime!==i&&(this.mtime=i,t=!0);var r=e.ctime.getTime();return this.ctime!==r&&(this.ctime=r,t=!0),t},e.prototype.isFile=function(){return(61440&this.mode)===r.FileType.FILE},e.prototype.isDirectory=function(){return(61440&this.mode)===r.FileType.DIRECTORY},e}();t.default=o},76667:function(e,t,n){var i,r=n(43341).Buffer,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(5054),s=n(603),c=n(99957),l=n(26470),d=n(15894),u=n(59104),p=n(40981),h="/",m=null;function g(){return m||(m=r.from("{}"))}function f(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function _(e,t){return!e||(t(e),!1)}function b(e,t,n){return!e||(t.abort((function(){n(e)})),!1)}var y=function(e,t){this.key=e,this.value=t,this.prev=null,this.next=null},v=function(){function e(e){this.limit=e,this.size=0,this.map={},this.head=null,this.tail=null}return e.prototype.set=function(e,t){var n=new y(e,t);this.map[e]?(this.map[e].value=n.value,this.remove(n.key)):this.size>=this.limit&&(delete this.map[this.tail.key],this.size--,this.tail=this.tail.prev,this.tail.next=null),this.setHead(n)},e.prototype.get=function(e){if(this.map[e]){var t=this.map[e].value,n=new y(e,t);return this.remove(e),this.setHead(n),t}return null},e.prototype.remove=function(e){var t=this.map[e];t&&(null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.map[e],this.size--)},e.prototype.removeAll=function(){this.size=0,this.map={},this.head=null,this.tail=null},e.prototype.setHead=function(e){e.next=this.head,e.prev=null,null!==this.head&&(this.head.prev=e),this.head=e,null===this.tail&&(this.tail=e),this.size++,this.map[e.key]=e},e}(),C=function(){function e(e){this.store=e,this.originalData={},this.modifiedKeys=[]}return e.prototype.get=function(e){var t=this.store.get(e);return this.stashOldValue(e,t),t},e.prototype.put=function(e,t,n){return this.markModified(e),this.store.put(e,t,n)},e.prototype.del=function(e){this.markModified(e),this.store.del(e)},e.prototype.commit=function(){},e.prototype.abort=function(){for(var e=0,t=this.modifiedKeys;e0)throw s.ApiError.ENOTEMPTY(e);this.removeEntry(e,!0)},t.prototype.mkdirSync=function(e,t){var n=this.store.beginTransaction("readwrite"),i=r.from("{}");this.commitNewFile(n,e,c.FileType.DIRECTORY,t,i)},t.prototype.readdirSync=function(e){var t=this.store.beginTransaction("readonly");return Object.keys(this.getDirListing(t,e,this.findINode(t,e)))},t.prototype._syncSync=function(e,t,n){var i=this.store.beginTransaction("readwrite"),r=this._findINode(i,l.dirname(e),l.basename(e)),o=this.getINode(i,e,r),a=o.update(n);try{i.put(o.id,t,!0),a&&i.put(r,o.toBuffer(),!0)}catch(e){throw i.abort(),e}i.commit()},t.prototype.makeRootDirectory=function(){var e=this.store.beginTransaction("readwrite");if(void 0===e.get(h)){var t=(new Date).getTime(),n=new d.default(f(),4096,511|c.FileType.DIRECTORY,t,t,t);e.put(n.id,g(),!1),e.put(h,n.toBuffer(),!1),e.commit()}},t.prototype._findINode=function(e,t,n){var i=this,r=function(r){var o=i.getDirListing(e,t,r);if(o[n])return o[n];throw s.ApiError.ENOENT(l.resolve(t,n))};return"/"===t?""===n?h:r(this.getINode(e,t,h)):r(this.getINode(e,t+l.sep+n,this._findINode(e,l.dirname(t),l.basename(t))))},t.prototype.findINode=function(e,t){return this.getINode(e,t,this._findINode(e,l.dirname(t),l.basename(t)))},t.prototype.getINode=function(e,t,n){var i=e.get(n);if(void 0===i)throw s.ApiError.ENOENT(t);return d.default.fromBuffer(i)},t.prototype.getDirListing=function(e,t,n){if(!n.isDirectory())throw s.ApiError.ENOTDIR(t);var i=e.get(n.id);if(void 0===i)throw s.ApiError.ENOENT(t);return JSON.parse(i.toString())},t.prototype.addNewNode=function(e,t){for(var n;;)try{return n=f(),e.put(n,t,!1),n}catch(e){}throw new s.ApiError(s.ErrorCode.EIO,"Unable to commit data to key-value store.")},t.prototype.commitNewFile=function(e,t,n,i,o){var a,c=l.dirname(t),u=l.basename(t),p=this.findINode(e,c),h=this.getDirListing(e,c,p),m=(new Date).getTime();if("/"===t)throw s.ApiError.EEXIST(t);if(h[u])throw s.ApiError.EEXIST(t);try{var g=this.addNewNode(e,o);a=new d.default(g,o.length,i|n,m,m,m);var f=this.addNewNode(e,a.toBuffer());h[u]=f,e.put(p.id,r.from(JSON.stringify(h)),!0)}catch(t){throw e.abort(),t}return e.commit(),a},t.prototype.removeEntry=function(e,t){var n=this.store.beginTransaction("readwrite"),i=l.dirname(e),o=this.findINode(n,i),a=this.getDirListing(n,i,o),c=l.basename(e);if(!a[c])throw s.ApiError.ENOENT(e);var d=a[c];delete a[c];var u=this.getINode(n,e,d);if(!t&&u.isDirectory())throw s.ApiError.EISDIR(e);if(t&&!u.isDirectory())throw s.ApiError.ENOTDIR(e);try{n.del(u.id),n.del(d),n.put(o.id,r.from(JSON.stringify(a)),!0)}catch(e){throw n.abort(),e}n.commit()},t}(a.SynchronousFileSystem);t.SyncKeyValueFileSystem=w;var E=function(e){function t(t,n,i,r,o){return e.call(this,t,n,i,r,o)||this}return o(t,e),t.prototype.sync=function(e){var t=this;this.isDirty()?this._fs._sync(this.getPath(),this.getBuffer(),this.getStats(),(function(n){n||t.resetDirty(),e(n)})):e()},t.prototype.close=function(e){this.sync(e)},t}(u.default);t.AsyncKeyValueFile=E;var k=function(e){function t(t){var n=e.call(this)||this;return n._cache=null,t>0&&(n._cache=new v(t)),n}return o(t,e),t.isAvailable=function(){return!0},t.prototype.init=function(e,t){this.store=e,this.makeRootDirectory(t)},t.prototype.getName=function(){return this.store.name()},t.prototype.isReadOnly=function(){return!1},t.prototype.supportsSymlinks=function(){return!1},t.prototype.supportsProps=function(){return!1},t.prototype.supportsSynch=function(){return!1},t.prototype.empty=function(e){var t=this;this._cache&&this._cache.removeAll(),this.store.clear((function(n){_(n,e)&&t.makeRootDirectory(e)}))},t.prototype.rename=function(e,t,n){var i=this;if(this._cache){var o=this._cache;this._cache=null,o.removeAll();var a=n;n=function(e){i._cache=o,a(e)}}var c=this.store.beginTransaction("readwrite"),d=l.dirname(e),u=l.basename(e),p=l.dirname(t),h=l.basename(t),m={},g={},f=!1;if(0===(p+"/").indexOf(e+"/"))return n(new s.ApiError(s.ErrorCode.EBUSY,d));var _=function(o){i.findINodeAndDirListing(c,o,(function(a,l,_){a?f||(f=!0,c.abort((function(){n(a)}))):(m[o]=l,g[o]=_,function(){if(!f&&g.hasOwnProperty(d)&&g.hasOwnProperty(p)){var o=g[d],a=m[d],l=g[p],_=m[p];if(o[u]){var y=o[u];delete o[u];var v=function(){l[h]=y,c.put(a.id,r.from(JSON.stringify(o)),!0,(function(e){b(e,c,n)&&(d===p?c.commit(n):c.put(_.id,r.from(JSON.stringify(l)),!0,(function(e){b(e,c,n)&&c.commit(n)})))}))};l[h]?i.getINode(c,t,l[h],(function(e,i){b(e,c,n)&&(i.isFile()?c.del(i.id,(function(e){b(e,c,n)&&c.del(l[h],(function(e){b(e,c,n)&&v()}))})):c.abort((function(e){n(s.ApiError.EPERM(t))})))})):v()}else n(s.ApiError.ENOENT(e))}}())}))};_(d),d!==p&&_(p)},t.prototype.stat=function(e,t,n){var i=this.store.beginTransaction("readonly");this.findINode(i,e,(function(e,t){_(e,n)&&n(null,t.toStats())}))},t.prototype.createFile=function(e,t,n,i){var r=this,o=this.store.beginTransaction("readwrite"),a=p.emptyBuffer();this.commitNewFile(o,e,c.FileType.FILE,n,a,(function(n,o){_(n,i)&&i(null,new E(r,e,t,o.toStats(),a))}))},t.prototype.openFile=function(e,t,n){var i=this,r=this.store.beginTransaction("readonly");this.findINode(r,e,(function(o,a){_(o,n)&&r.get(a.id,(function(r,o){_(r,n)&&(void 0===o?n(s.ApiError.ENOENT(e)):n(null,new E(i,e,t,a.toStats(),o)))}))}))},t.prototype.unlink=function(e,t){this.removeEntry(e,!1,t)},t.prototype.rmdir=function(e,t){var n=this;this.readdir(e,(function(i,r){i?t(i):r.length>0?t(s.ApiError.ENOTEMPTY(e)):n.removeEntry(e,!0,t)}))},t.prototype.mkdir=function(e,t,n){var i=this.store.beginTransaction("readwrite"),o=r.from("{}");this.commitNewFile(i,e,c.FileType.DIRECTORY,t,o,n)},t.prototype.readdir=function(e,t){var n=this,i=this.store.beginTransaction("readonly");this.findINode(i,e,(function(r,o){_(r,t)&&n.getDirListing(i,e,o,(function(e,n){_(e,t)&&t(null,Object.keys(n))}))}))},t.prototype._sync=function(e,t,n,i){var r=this,o=this.store.beginTransaction("readwrite");this._findINode(o,l.dirname(e),l.basename(e),(function(a,s){b(a,o,i)&&r.getINode(o,e,s,(function(e,r){if(b(e,o,i)){var a=r.update(n);o.put(r.id,t,!0,(function(e){b(e,o,i)&&(a?o.put(s,r.toBuffer(),!0,(function(e){b(e,o,i)&&o.commit(i)})):o.commit(i))}))}}))}))},t.prototype.makeRootDirectory=function(e){var t=this.store.beginTransaction("readwrite");t.get(h,(function(n,i){if(n||void 0===i){var r=(new Date).getTime(),o=new d.default(f(),4096,511|c.FileType.DIRECTORY,r,r,r);t.put(o.id,g(),!1,(function(n){b(n,t,e)&&t.put(h,o.toBuffer(),!1,(function(n){n?t.abort((function(){e(n)})):t.commit(e)}))}))}else t.commit(e)}))},t.prototype._findINode=function(e,t,n,i){var r=this;if(this._cache){var o=this._cache.get(l.join(t,n));if(o)return i(null,o)}var a=function(e,o,a){if(e)i(e);else if(a[n]){var c=a[n];r._cache&&r._cache.set(l.join(t,n),c),i(null,c)}else i(s.ApiError.ENOENT(l.resolve(t,n)))};"/"===t?""===n?(this._cache&&this._cache.set(l.join(t,n),h),i(null,h)):this.getINode(e,t,h,(function(n,o){_(n,i)&&r.getDirListing(e,t,o,(function(e,t){a(e,0,t)}))})):this.findINodeAndDirListing(e,t,a)},t.prototype.findINode=function(e,t,n){var i=this;this._findINode(e,l.dirname(t),l.basename(t),(function(r,o){_(r,n)&&i.getINode(e,t,o,n)}))},t.prototype.getINode=function(e,t,n,i){e.get(n,(function(e,n){_(e,i)&&(void 0===n?i(s.ApiError.ENOENT(t)):i(null,d.default.fromBuffer(n)))}))},t.prototype.getDirListing=function(e,t,n,i){n.isDirectory()?e.get(n.id,(function(e,n){if(_(e,i))try{i(null,JSON.parse(n.toString()))}catch(e){i(s.ApiError.ENOENT(t))}})):i(s.ApiError.ENOTDIR(t))},t.prototype.findINodeAndDirListing=function(e,t,n){var i=this;this.findINode(e,t,(function(r,o){_(r,n)&&i.getDirListing(e,t,o,(function(e,t){_(e,n)&&n(null,o,t)}))}))},t.prototype.addNewNode=function(e,t,n){var i,r=0,o=function(){5==++r?n(new s.ApiError(s.ErrorCode.EIO,"Unable to commit data to key-value store.")):(i=f(),e.put(i,t,!1,(function(e,t){e||!t?o():n(null,i)})))};o()},t.prototype.commitNewFile=function(e,t,n,i,o,a){var c=this,u=l.dirname(t),p=l.basename(t),h=(new Date).getTime();if("/"===t)return a(s.ApiError.EEXIST(t));this.findINodeAndDirListing(e,u,(function(l,u,m){b(l,e,a)&&(m[p]?e.abort((function(){a(s.ApiError.EEXIST(t))})):c.addNewNode(e,o,(function(t,s){if(b(t,e,a)){var l=new d.default(s,o.length,i|n,h,h,h);c.addNewNode(e,l.toBuffer(),(function(t,n){b(t,e,a)&&(m[p]=n,e.put(u.id,r.from(JSON.stringify(m)),!0,(function(t){b(t,e,a)&&e.commit((function(t){b(t,e,a)&&a(null,l)}))})))}))}})))}))},t.prototype.removeEntry=function(e,t,n){var i=this;this._cache&&this._cache.remove(e);var o=this.store.beginTransaction("readwrite"),a=l.dirname(e),c=l.basename(e);this.findINodeAndDirListing(o,a,(function(a,l,d){if(b(a,o,n))if(d[c]){var u=d[c];delete d[c],i.getINode(o,e,u,(function(i,a){b(i,o,n)&&(!t&&a.isDirectory()?o.abort((function(){n(s.ApiError.EISDIR(e))})):t&&!a.isDirectory()?o.abort((function(){n(s.ApiError.ENOTDIR(e))})):o.del(a.id,(function(e){b(e,o,n)&&o.del(u,(function(e){b(e,o,n)&&o.put(l.id,r.from(JSON.stringify(d)),!0,(function(e){b(e,o,n)&&o.commit(n)}))}))})))}))}else o.abort((function(){n(s.ApiError.ENOENT(e))}))}))},t}(a.BaseFileSystem);t.AsyncKeyValueFileSystem=k},60253:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(20500),r=function(){function e(e){this._fs=e,this._mu=new i.default}return e.prototype.getName=function(){return"LockedFS2<"+this._fs.getName()+">"},e.prototype.getFSUnlocked=function(){return this._fs},e.prototype.diskSpace=function(e,t){this._fs.diskSpace(e,t)},e.prototype.isReadOnly=function(){return this._fs.isReadOnly()},e.prototype.supportsLinks=function(){return this._fs.supportsLinks()},e.prototype.supportsProps=function(){return this._fs.supportsProps()},e.prototype.supportsSynch=function(){return this._fs.supportsSynch()},e.prototype.rename=function(e,t,n){var i=this;this._mu.lock((function(){i._fs.rename(e,t,(function(e){i._mu.unlock(),n(e)}))}))},e.prototype.renameSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.renameSync(e,t)},e.prototype.stat=function(e,t,n){var i=this;this._mu.rLock((function(){i._fs.stat(e,t,(function(e,t){i._mu.rUnlock(),n(e,t)}))}))},e.prototype.statSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.statSync(e,t)},e.prototype.open=function(e,t,n,i){var r=this;t.isWriteable()?this._mu.lock((function(){r._fs.open(e,t,n,(function(e,t){r._mu.unlock(),i(e,t)}))})):this._mu.rLock((function(){r._fs.open(e,t,n,(function(e,t){r._mu.rUnlock(),i(e,t)}))}))},e.prototype.openSync=function(e,t,n){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.openSync(e,t,n)},e.prototype.unlink=function(e,t){var n=this;this._mu.lock((function(){n._fs.unlink(e,(function(e){n._mu.unlock(),t(e)}))}))},e.prototype.unlinkSync=function(e){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.unlinkSync(e)},e.prototype.rmdir=function(e,t){var n=this;this._mu.lock((function(){n._fs.rmdir(e,(function(e){n._mu.unlock(),t(e)}))}))},e.prototype.rmdirSync=function(e){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.rmdirSync(e)},e.prototype.mkdir=function(e,t,n){var i=this;this._mu.lock((function(){i._fs.mkdir(e,t,(function(e){i._mu.unlock(),n(e)}))}))},e.prototype.mkdirSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.mkdirSync(e,t)},e.prototype.readdir=function(e,t){var n=this;this._mu.rLock((function(){n._fs.readdir(e,(function(e,i){n._mu.rUnlock(),t(e,i)}))}))},e.prototype.readdirSync=function(e){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.readdirSync(e)},e.prototype.exists=function(e,t){var n=this;this._mu.rLock((function(){n._fs.exists(e,(function(e){n._mu.rUnlock(),t(e)}))}))},e.prototype.existsSync=function(e){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.existsSync(e)},e.prototype.realpath=function(e,t,n){var i=this;this._mu.rLock((function(){i._fs.realpath(e,t,(function(e,t){i._mu.rUnlock(),n(e,t)}))}))},e.prototype.realpathSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.realpathSync(e,t)},e.prototype.truncate=function(e,t,n){var i=this;this._mu.lock((function(){i._fs.truncate(e,t,(function(e){i._mu.unlock(),n(e)}))}))},e.prototype.truncateSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.truncateSync(e,t)},e.prototype.readFile=function(e,t,n,i){var r=this;n.isWriteable()&&"r+"!==n.getFlagString()?this._mu.lock((function(){r._fs.readFile(e,t,n,(function(e,t){r._mu.unlock(),i(e,t)}))})):this._mu.rLock((function(){r._fs.readFile(e,t,n,(function(e,t){r._mu.rUnlock(),i(e,t)}))}))},e.prototype.readFileSync=function(e,t,n){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.readFileSync(e,t,n)},e.prototype.writeFile=function(e,t,n,i,r,o){var a=this;this._mu.lock((function(){a._fs.writeFile(e,t,n,i,r,(function(e){a._mu.unlock(),o(e)}))}))},e.prototype.writeFileSync=function(e,t,n,i,r){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.writeFileSync(e,t,n,i,r)},e.prototype.appendFile=function(e,t,n,i,r,o){var a=this;this._mu.lock((function(){a._fs.appendFile(e,t,n,i,r,(function(e){a._mu.unlock(),o(e)}))}))},e.prototype.appendFileSync=function(e,t,n,i,r){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.appendFileSync(e,t,n,i,r)},e.prototype.chmod=function(e,t,n,i){var r=this;this._mu.lock((function(){r._fs.chmod(e,t,n,(function(e){r._mu.unlock(),i(e)}))}))},e.prototype.chmodSync=function(e,t,n){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.chmodSync(e,t,n)},e.prototype.chown=function(e,t,n,i,r){var o=this;this._mu.lock((function(){o._fs.chown(e,t,n,i,(function(e){o._mu.unlock(),r(e)}))}))},e.prototype.chownSync=function(e,t,n,i){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.chownSync(e,t,n,i)},e.prototype.utimes=function(e,t,n,i){var r=this;this._mu.lock((function(){r._fs.utimes(e,t,n,(function(e){r._mu.unlock(),i(e)}))}))},e.prototype.utimesSync=function(e,t,n){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.utimesSync(e,t,n)},e.prototype.link=function(e,t,n){var i=this;this._mu.lock((function(){i._fs.link(e,t,(function(e){i._mu.unlock(),n(e)}))}))},e.prototype.linkSync=function(e,t){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.linkSync(e,t)},e.prototype.symlink=function(e,t,n,i){var r=this;this._mu.lock((function(){r._fs.symlink(e,t,n,(function(e){r._mu.unlock(),i(e)}))}))},e.prototype.symlinkSync=function(e,t,n){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.symlinkSync(e,t,n)},e.prototype.readlink=function(e,t){var n=this;this._mu.rLock((function(){n._fs.readlink(e,(function(e,i){n._mu.rUnlock(),t(e,i)}))}))},e.prototype.readlinkSync=function(e){if(this._mu.isLocked())throw new Error("invalid sync call");return this._fs.readlinkSync(e)},e}();t.default=r},88039:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(8916),r=function(){function e(){this._locked=!1,this._waiters=[]}return e.prototype.lock=function(e){this._locked?this._waiters.push(e):(this._locked=!0,e())},e.prototype.unlock=function(){if(!this._locked)throw new Error("unlock of a non-locked mutex");var e=this._waiters.shift();e?i.default(e):this._locked=!1},e.prototype.tryLock=function(){return!this._locked&&(this._locked=!0,!0)},e.prototype.isLocked=function(){return this._locked},e}();t.default=r},59104:function(e,t,n){var i,r=n(43341).Buffer,o=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(24359),s=n(99957),c=n(603),l=n(37022),d=n(40981),u=function(e){function t(t,n,i,r,o){var a=e.call(this)||this;if(a._pos=0,a._dirty=!1,a._fs=t,a._path=n,a._flag=i,a._stat=r,a._buffer=o||d.emptyBuffer(),a._stat.size!==a._buffer.length&&a._flag.isReadable())throw new Error("Invalid buffer: Buffer is "+a._buffer.length+" long, yet Stats object specifies that file is "+a._stat.size+" long.");return a}return o(t,e),t.prototype.getBuffer=function(){return this._buffer},t.prototype.getStats=function(){return this._stat},t.prototype.getFlag=function(){return this._flag},t.prototype.getPath=function(){return this._path},t.prototype.getPos=function(){return this._flag.isAppendable()?this._stat.size:this._pos},t.prototype.advancePos=function(e){return this._pos+=e},t.prototype.setPos=function(e){return this._pos=e},t.prototype.sync=function(e){try{this.syncSync(),e()}catch(t){e(t)}},t.prototype.syncSync=function(){throw new c.ApiError(c.ErrorCode.ENOTSUP)},t.prototype.close=function(e){try{this.closeSync(),e()}catch(t){e(t)}},t.prototype.closeSync=function(){throw new c.ApiError(c.ErrorCode.ENOTSUP)},t.prototype.stat=function(e){try{e(null,s.default.clone(this._stat))}catch(t){e(t)}},t.prototype.statSync=function(){return s.default.clone(this._stat)},t.prototype.truncate=function(e,t){try{this.truncateSync(e),this._flag.isSynchronous()&&!l.default.getRootFS().supportsSynch()&&this.sync(t),t()}catch(e){return t(e)}},t.prototype.truncateSync=function(e){if(this._dirty=!0,!this._flag.isWriteable())throw new c.ApiError(c.ErrorCode.EPERM,"File not opened with a writeable mode.");if(this._stat.mtimeMs=Date.now(),e>this._buffer.length){var t=r.alloc(e-this._buffer.length,0);return this.writeSync(t,0,t.length,this._buffer.length),void(this._flag.isSynchronous()&&l.default.getRootFS().supportsSynch()&&this.syncSync())}this._stat.size=e;var n=r.alloc(e);this._buffer.copy(n,0,0,e),this._buffer=n,this._flag.isSynchronous()&&l.default.getRootFS().supportsSynch()&&this.syncSync()},t.prototype.write=function(e,t,n,i,r){try{r(null,this.writeSync(e,t,n,i),e)}catch(e){r(e)}},t.prototype.writeSync=function(e,t,n,i){if(this._dirty=!0,null==i&&(i=this.getPos()),!this._flag.isWriteable())throw new c.ApiError(c.ErrorCode.EPERM,"File not opened with a writeable mode.");var o=i+n;if(o>this._stat.size&&(this._stat.size=o,o>this._buffer.length)){var a=r.alloc(o);this._buffer.copy(a),this._buffer=a}var s=e.copy(this._buffer,i,t,t+n);return this._stat.mtimeMs=Date.now(),this._flag.isSynchronous()?(this.syncSync(),s):(this.setPos(i+s),s)},t.prototype.read=function(e,t,n,i,r){try{r(null,this.readSync(e,t,n,i),e)}catch(e){r(e)}},t.prototype.readSync=function(e,t,n,i){if(!this._flag.isReadable())throw new c.ApiError(c.ErrorCode.EPERM,"File not opened with a readable mode.");null==i&&(i=this.getPos()),i+n>this._stat.size&&(n=this._stat.size-i);var r=this._buffer.copy(e,t,i,i+n);return this._stat.atimeMs=Date.now(),this._pos=i+n,r},t.prototype.chmod=function(e,t){try{this.chmodSync(e),t()}catch(e){t(e)}},t.prototype.chmodSync=function(e){if(!this._fs.supportsProps())throw new c.ApiError(c.ErrorCode.ENOTSUP);this._dirty=!0,this._stat.chmod(e),this.syncSync()},t.prototype.isDirty=function(){return this._dirty},t.prototype.resetDirty=function(){this._dirty=!1},t}(a.BaseFile);t.default=u;var p=function(e){function t(t,n,i,r,o){return e.call(this,t,n,i,r,o)||this}return o(t,e),t.prototype.sync=function(e){e()},t.prototype.syncSync=function(){},t.prototype.close=function(e){e()},t.prototype.closeSync=function(){},t}(u);t.NoSyncFile=p},20500:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(8916),a=n(88039),s=1<<30,c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._readerWaiters=[],t._writerWaiters=[],t._readerCount=0,t._readerWait=0,t}return r(t,e),t.prototype.rLock=function(e){this._readerCount++,this._readerCount<0?this._readerWaiters.push(e):e()},t.prototype.rUnlock=function(){if(0===this._readerCount||-1073741824===this._readerCount)throw new Error("rUnlock of a non-locked rwmutex");if(this._readerCount--,this._readerCount<0&&(this._readerWait-=1,0===this._readerWait)){var e=this._writerWaiters.shift();e&&o.default(e)}},t.prototype.lock=function(t){var n=this;e.prototype.lock.call(this,(function(){n._readerWait+=n._readerCount,n._readerCount-=s,n._readerWait?n._writerWaiters.push(t):t()}))},t.prototype.unlock=function(){if(this._readerCount>=0)throw new Error("unlock of a non-locked rwmutex");this._readerCount+=s;for(var t=this._readerWaiters.length,n=0;n{Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(43028);if("undefined"!=typeof setImmediate)i=setImmediate;else{var o=r.default,a=[],s="zero-timeout-message";if(function(){if(void 0!==o.importScripts||!o.postMessage)return!1;var e=!0,t=o.onmessage;return o.onmessage=function(){e=!1},o.postMessage("","*"),o.onmessage=t,e}()){i=function(e){a.push(e),o.postMessage(s,"*")};var c=function(e){if(e.source===self&&e.data===s&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,a.length>0))return a.shift()()};o.addEventListener?o.addEventListener("message",c,!0):o.attachEvent("onmessage",c)}else if(o.MessageChannel){var l=new o.MessageChannel;l.port1.onmessage=function(e){if(a.length>0)return a.shift()()},i=function(e){a.push(e),l.port2.postMessage("")}}else i=function(e){return setTimeout(e,0)}}t.default=i},11057:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSIF_TEST_API_HOST=t.LSIF_PROD_API_HOST=void 0,r(n(82714),t),t.LSIF_PROD_API_HOST="https://redcoast.alipay.com",t.LSIF_TEST_API_HOST="http://redcoast.dev.alipay.net:8080"},82714:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LsifClient=t.OriginScheme=void 0;const r=i(n(9669));var o;!function(e){e.Jar="jar",e.Tnpm="tnpm"}(o=t.OriginScheme||(t.OriginScheme={}));t.LsifClient=class{constructor(e,t){if(this.apiHost=e,this.biz=t,["",void 0,null].includes(t))throw Error("biz 鏄繀閫夊弬鏁�")}get headers(){return{"redcoast-client":"vscode-lsif",biz:this.biz}}get requestConfig(){return{headers:this.headers,baseURL:this.apiHost}}async exists(e){const t=await r.default.post("/api/lsif/exist",e,this.requestConfig);return t.data.success&&t.data.content}async hover(e){const t=await r.default.post("/api/lsif/hover",e,this.requestConfig),{success:n,content:i}=t.data;return n?{contents:this.formatHoverContent(i.contents.value)}:{contents:[]}}async reference(e){const t=await r.default.post("/api/lsif/references",e,this.requestConfig),{success:n,content:i}=t.data;return n?i:[]}async definition(e){const t=await r.default.post("/api/lsif/definition",e,this.requestConfig),{success:n,content:i}=t.data;return n?i:[]}async jarContent(e){const t=await r.default.get("/api/lsif/jar-content",Object.assign(Object.assign({},this.requestConfig),{params:e})),{success:n,content:i,errorMsg:o}=t.data;if(!n)throw new Error(o||"failed to fetch jar content");return i}async tnpmContent(e){const{module:t,filePath:n}=e,[i,o]=t.split(":");return(await r.default.get([`${i}@${encodeURI(o)}`,n].join("/"),{baseURL:"https://unpkg.alipay.com"})).data}getModuleInfoFromUriString(e){const[t]=e.split(":");if(!this.checkScheme(t))throw Error(`鏆備笉鏀寔 ${t} 鍗忚`);switch(t){case o.Jar:return this.getJarModuleParamFromUriString(e);case o.Tnpm:return this.getTnpmModuleParamFromUriString(e)}}getJarModuleParamFromUriString(e){const t=e.replace(`${o.Jar}:`,"").match(/^([^\/]+)\/([^\/]+)\/([^\/]+)\/(.+)$/);if(!t)throw new Error("uri string not match");const[,n,i,r,a]=t;return{module:`${n}:${i}:${r}`,filePath:a}}getTnpmModuleParamFromUriString(e){const t=e.match(/[^\/]+\/([\d+\.]*\d+[^\/]*)\/(.*)/);if(!t)throw new Error("uri string not match");const[,n,i]=t,[r]=e.replace(`${o.Tnpm}:`,"").split(`/${n}/`);return{module:`${r}:${n}`,filePath:i}}async getFileContentFromUriString(e){const[t]=e.split(":");if(!this.checkScheme(t))throw Error(`鏆備笉鏀寔 ${t} 鍗忚`);const n=this.getModuleInfoFromUriString(e);switch(t){case o.Jar:return await this.jarContent(n);case o.Tnpm:return await this.tnpmContent(n)}}formatHoverContent(e=""){return e.split(/\n---\n/)}checkScheme(e){return Object.values(o).includes(e)}}},24778:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(17621));function o(e,t,n){var i;return(i=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?i+=360:i>=360&&(i-=360),i}function a(e,t,n){return 0===e.h&&0===e.s?e.s:((i=n?Math.round(100*e.s)-16*t:4===t?Math.round(100*e.s)+16:Math.round(100*e.s)+5*t)>100&&(i=100),n&&5===t&&i>10&&(i=10),i<6&&(i=6),i);var i}function s(e,t,n){return n?Math.round(100*e.v)+5*t:Math.round(100*e.v)-15*t}t.default=function(e){for(var t=[],n=r.default(e),i=5;i>0;i-=1){var c=n.toHsv(),l=r.default({h:o(c,i,!0),s:a(c,i,!0),v:s(c,i,!0)}).toHexString();t.push(l)}for(t.push(n.toHexString()),i=1;i<=4;i+=1){c=n.toHsv(),l=r.default({h:o(c,i),s:a(c,i),v:s(c,i)}).toHexString();t.push(l)}return t}},39086:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(24778));t.generate=r.default;var o={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"};t.presetPrimaryColors=o;var a={};t.presetPalettes=a,Object.keys(o).forEach((function(e){a[e]=r.default(o[e]),a[e].primary=a[e][5]}));var s=a.red;t.red=s;var c=a.volcano;t.volcano=c;var l=a.gold;t.gold=l;var d=a.orange;t.orange=d;var u=a.yellow;t.yellow=u;var p=a.lime;t.lime=p;var h=a.green;t.green=h;var m=a.cyan;t.cyan=m;var g=a.blue;t.blue=g;var f=a.geekblue;t.geekblue=f;var _=a.purple;t.purple=_;var b=a.magenta;t.magenta=b;var y=a.grey;t.grey=y},11674:(e,t,n)=>{"use strict";t.__esModule=!0;var i=n(616),r=(a(i),a(n(45697))),o=a(n(47815));a(n(42473));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=1073741823;function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,i){e=n,t.forEach((function(t){return t(e,i)}))}}}t.default=function(e,t){var n,a,p="__create-react-context-"+(0,o.default)()+"__",h=function(e){function n(){var t,i;s(this,n);for(var r=arguments.length,o=Array(r),a=0;a{"use strict";t.__esModule=!0;var i=o(n(616)),r=o(n(11674));function o(e){return e&&e.__esModule?e:{default:e}}t.default=i.default.createContext||r.default,e.exports=t.default},78680:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var i=n(88106),r=n(88239),o=n(42723),a=n(99663),s=n(22600),c=n(49135),l=n(93196),d=n(616),u=n(74220),p={primaryColor:"#333",secondaryColor:"#E6E6E6"},h=function(e){function t(){return(0,a.Z)(this,t),(0,c.Z)(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return(0,l.Z)(t,e),(0,s.Z)(t,[{key:"render",value:function(){var e,n=this.props,a=n.type,s=n.className,c=n.onClick,l=n.style,d=n.primaryColor,h=n.secondaryColor,m=(0,o.Z)(n,["type","className","onClick","style","primaryColor","secondaryColor"]),g=void 0,f=p;if(d&&(f={primaryColor:d,secondaryColor:h||(0,u.pw)(d)}),(0,u.r)(a))g=a;else if("string"==typeof a&&!(g=t.get(a,f)))return null;return g?(g&&"function"==typeof g.icon&&(g=(0,r.Z)({},g,{icon:g.icon(f.primaryColor,f.secondaryColor)})),(0,u.R_)(g.icon,"svg-"+g.name,(0,r.Z)((e={className:s,onClick:c,style:l},(0,i.Z)(e,"data-icon",g.name),(0,i.Z)(e,"width","1em"),(0,i.Z)(e,"height","1em"),(0,i.Z)(e,"fill","currentColor"),(0,i.Z)(e,"aria-hidden","true"),(0,i.Z)(e,"focusable","false"),e),m))):((0,u.cM)("type should be string or icon definiton, but got "+a),null)}}],[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:p;if(e){var n=this.definitions.get(e);return n&&"function"==typeof n.icon&&(n=(0,r.Z)({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;p.primaryColor=t,p.secondaryColor=n||(0,u.pw)(t)}},{key:"getTwoToneColors",value:function(){return(0,r.Z)({},p)}}]),t}(d.Component);h.displayName="IconReact",h.definitions=new u.a9;const m=h},69561:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i.Z});var i=n(78680)},74220:(e,t,n)=>{"use strict";n.d(t,{cM:()=>l,r:()=>d,a9:()=>p,R_:()=>h,pw:()=>m,X4:()=>g});var i=n(88239),r=n(99663),o=n(22600),a=n(39086),s=n(616),c=n(63634);function l(e){c||console.error("[@ant-design/icons-react]: "+e+".")}function d(e){return"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"==typeof e.icon||"function"==typeof e.icon)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var i=e[n];if("class"===n)t.className=i,delete t.class;else t[n]=i;return t}),{})}var p=function(){function e(){(0,r.Z)(this,e),this.collection={}}return(0,o.Z)(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function h(e,t,n){return n?s.createElement(e.tag,(0,i.Z)({key:t},u(e.attrs),n),(e.children||[]).map((function(n,i){return h(n,t+"-"+e.tag+"-"+i)}))):s.createElement(e.tag,(0,i.Z)({key:t},u(e.attrs)),(e.children||[]).map((function(n,i){return h(n,t+"-"+e.tag+"-"+i)})))}function m(e){return(0,a.generate)(e)[0]}function g(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}},85368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"}},16976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"}},67303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"}},77384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"}},79203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"}},78515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"}},34950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"}},15369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"}},20702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"}},25828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"}},77307:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"}},58749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="0 0 1024 1024",i="64 64 896 896",r="fill",o="outline",a="twotone";function s(e){for(var t=[],n=1;n{"use strict";n.d(t,{rW:()=>r,ve:()=>a,py:()=>s,WE:()=>c,vq:()=>l,T6:()=>d,VD:()=>u});var i=n(90279);function r(e,t,n){return{r:255*(0,i.sh)(e,255),g:255*(0,i.sh)(t,255),b:255*(0,i.sh)(n,255)}}function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function a(e,t,n){var r,a,s;if(e=(0,i.sh)(e,360),t=(0,i.sh)(t,100),n=(0,i.sh)(n,100),0===t)a=n,s=n,r=n;else{var c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=o(l,c,e+1/3),a=o(l,c,e),s=o(l,c,e-1/3)}return{r:255*r,g:255*a,b:255*s}}function s(e,t,n){e=(0,i.sh)(e,255),t=(0,i.sh)(t,255),n=(0,i.sh)(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=r,c=r-o,l=0===r?0:c/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/c+(t{"use strict";n.d(t,{R:()=>i});var i={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},1350:(e,t,n)=>{"use strict";n.d(t,{uA:()=>a});var i=n(86500),r=n(48701),o=n(90279);function a(e){var t={r:0,g:0,b:0},n=1,a=null,s=null,c=null,l=!1,p=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(r.R[e])e=r.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=d.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=d.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=d.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=d.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=d.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=d.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=d.hex8.exec(e))return{r:(0,i.VD)(n[1]),g:(0,i.VD)(n[2]),b:(0,i.VD)(n[3]),a:(0,i.T6)(n[4]),format:t?"name":"hex8"};if(n=d.hex6.exec(e))return{r:(0,i.VD)(n[1]),g:(0,i.VD)(n[2]),b:(0,i.VD)(n[3]),format:t?"name":"hex"};if(n=d.hex4.exec(e))return{r:(0,i.VD)(n[1]+n[1]),g:(0,i.VD)(n[2]+n[2]),b:(0,i.VD)(n[3]+n[3]),a:(0,i.T6)(n[4]+n[4]),format:t?"name":"hex8"};if(n=d.hex3.exec(e))return{r:(0,i.VD)(n[1]+n[1]),g:(0,i.VD)(n[2]+n[2]),b:(0,i.VD)(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(u(e.r)&&u(e.g)&&u(e.b)?(t=(0,i.rW)(e.r,e.g,e.b),l=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):u(e.h)&&u(e.s)&&u(e.v)?(a=(0,o.JX)(e.s),s=(0,o.JX)(e.v),t=(0,i.WE)(e.h,a,s),l=!0,p="hsv"):u(e.h)&&u(e.s)&&u(e.l)&&(a=(0,o.JX)(e.s),c=(0,o.JX)(e.l),t=(0,i.ve)(e.h,a,c),l=!0,p="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,o.Yq)(n),{ok:l,format:e.format||p,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",c="[\\s|\\(]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")\\s*\\)?",l="[\\s|\\(]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")[,|\\s]+("+s+")\\s*\\)?",d={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+c),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+c),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+c),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function u(e){return Boolean(d.CSS_UNIT.exec(String(e)))}},90279:(e,t,n)=>{"use strict";function i(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function r(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function o(e){return e<=1?100*Number(e)+"%":e}function a(e){return 1===e.length?"0"+e:String(e)}n.d(t,{sh:()=>i,Yq:()=>r,JX:()=>o,FZ:()=>a})},8227:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="1.4.0"},28982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HookType=t.CreatorStatus=t.INJECTOR_TOKEN=void 0,t.INJECTOR_TOKEN=Symbol("INJECTOR_TOKEN"),function(e){e.init="init",e.creating="creating",e.done="done"}(t.CreatorStatus||(t.CreatorStatus={})),function(e){e.Before="Before",e.After="After",e.Around="Around ",e.AfterReturning="AfterReturning",e.AfterThrowing="AfterThrowing"}(t.HookType||(t.HookType={}))},65613:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{"use strict";function n(e){return"object"==typeof e?e.constructor.name:"function"==typeof e?e.name:String(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.circularError=t.noInjectorError=t.notSupportTokenError=t.notInjectError=t.noInjectableError=t.tagOnlyError=t.onMultipleCaseNoCreatorFound=t.noProviderError=void 0,t.noProviderError=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asSingleton=void 0,t.asSingleton=function(e){var t;return function(n){return void 0===t&&(t=e(n)),t}}},50572:function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.isHooked=t.getHookMeta=t.isAspectCreator=t.makeAsHook=t.makeAsAspect=t.HookStore=t.createHookedFunction=t.applyHooks=t.HOOKED_SYMBOL=void 0,n(28660);var r=n(28982);function o(e,t,n){var i=[],o=[],l=[],d=[],u=[];return n.forEach((function(e){var t;(t=e)&&t.type===r.HookType.Before?i.push(e):!function(e){return e&&e.type===r.HookType.After}(e)?!function(e){return e&&e.type===r.HookType.Around}(e)?!function(e){return e&&e.type===r.HookType.AfterReturning}(e)?function(e){return e&&e.type===r.HookType.AfterThrowing}(e)&&u.push(e):d.push(e):l.unshift(e):o.unshift(e)})),function(){for(var n,r=[],p=0;p0?(r.has(a)||r.set(a,o(a,s,i.getHooks(n,a))),r.get(a)):s}})},t.createHookedFunction=o;var l=function(){function e(e){this.parent=e,this.hooks=new Map}return e.prototype.createHooks=function(e){var t=this,n=e.map((function(e){return t.createOneHook(e)}));return{dispose:function(){n.forEach((function(e){e.dispose()}))}}},e.prototype.hasHooks=function(e){return!!this.hooks.has(e)||!!this.parent&&this.parent.hasHooks(e)},e.prototype.getHooks=function(e,t){var n,i=[];return this.parent&&(i=this.parent.getHooks(e,t)),(null===(n=this.hooks.get(e))||void 0===n?void 0:n.has(t))&&(i=i.concat(this.hooks.get(e).get(t))),i},e.prototype.createOneHook=function(e){var t=this,n=e.target;this.hooks.has(n)||this.hooks.set(n,new Map);var i=this.hooks.get(n);return i.has(e.method)||i.set(e.method,[]),i.get(e.method).push(e),{dispose:function(){t.removeOneHook(e)}}},e.prototype.removeOneHook=function(e){var t=e.target;if(this.hooks.has(t)){var n=this.hooks.get(t);if(n.has(e.method)){var i=n.get(e.method).indexOf(e);i>-1&&n.get(e.method).splice(i,1)}}},e}();t.HookStore=l;var d=Symbol("HOOK_KEY"),u=Symbol("ASPECT_KEY");t.makeAsAspect=function(e){Reflect.defineMetadata(u,!0,e)},t.makeAsHook=function(e,t,n,i,r,o){var a=Reflect.getOwnMetadata(d,e);a||(a=[],Reflect.defineMetadata(d,a,e)),a.push({prop:t,type:n,target:i,targetMethod:r,options:o})},t.isAspectCreator=function(e){return!!Reflect.getMetadata(u,e.useClass)},t.getHookMeta=function(e){return Reflect.getOwnMetadata(d,e.prototype)||[]},t.isHooked=function(e){return e&&!!e[t.HOOKED_SYMBOL]}},87954:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(50572),t),r(n(46912),t),r(n(67876),t),r(n(95782),t),r(n(21398),t),r(n(76745),t),r(n(85678),t)},46912:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAliasCreator=t.isFactoryCreator=t.isClassCreator=t.isValueCreator=t.isToken=t.isInjectableToken=t.isAliasProvider=t.isValueProvider=t.isFactoryProvider=t.isClassProvider=t.isTypeProvider=void 0;var i=n(28982),r=n(46912);t.isTypeProvider=function(e){return"function"==typeof e},t.isClassProvider=function(e){return!!e.useClass},t.isFactoryProvider=function(e){return!!e.useFactory},t.isValueProvider=function(e){return Object.prototype.hasOwnProperty.call(e,"useValue")},t.isAliasProvider=function(e){return Object.prototype.hasOwnProperty.call(e,"useAlias")},t.isInjectableToken=function(e){return"function"==typeof e&&(0,r.isInjectable)(e)};var o=new Set([Object,String,Number,Boolean]),a=new Set(["function","string","symbol"]);t.isToken=function(e){return"function"==typeof e?!o.has(e):a.has(typeof e)},t.isValueCreator=function(e){return e.status===i.CreatorStatus.done},t.isClassCreator=function(e){return!!e.useClass},t.isFactoryCreator=function(e){return!!e.useFactory},t.isAliasCreator=function(e){return Object.prototype.hasOwnProperty.call(e,"original")&&Object.prototype.hasOwnProperty.call(e,"target")}},67876:function(e,t,n){"use strict";var i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r{"use strict";function i(e){return"object"==typeof e?e.constructor:e}Object.defineProperty(t,"__esModule",{value:!0}),t.createMetadataManager=t.createConstructorMetadataManager=void 0,n(28660),t.createConstructorMetadataManager=function(e){return{get:function(t,n){return function(e,t,n){var r=i(t);return null==n?Reflect.getMetadata(e,r):Reflect.getMetadata(e,r,n)}(e,t,n)},set:function(t,n,r){return function(e,t,n,r){var o=i(n);return null==r?Reflect.defineMetadata(e,t,o):Reflect.defineMetadata(e,t,o,r)}(e,t,n,r)}}},t.createMetadataManager=function(e){return{get:function(t,n){return null==n?Reflect.getMetadata(e,t):Reflect.getMetadata(e,t,n)},set:function(t,n,i){return null==i?Reflect.defineMetadata(e,t,n):Reflect.defineMetadata(e,t,n,i)}}}},21398:function(e,t){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.Injector=void 0;var d=a(n(87954)),u=a(n(57870)),p=n(28982),h=n(87954),m=function(){function e(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={}),this.id=d.createId("Injector"),this.creatorMap=new Map,this.depth=0,this.tagMatrix=new Map,this.domainMap=new Map,this.opts=t,this.tag=t.tag,n?(this.parent=n,this.depth=n.depth+1,this.hookStore=new h.HookStore(this.parent.hookStore)):this.hookStore=new h.HookStore,this.addProviders.apply(this,c([{token:p.INJECTOR_TOKEN,useValue:this}],s(e),!1))}return e.prototype.createChild=function(e,t){var n,r,o,a;void 0===e&&(e=[]),void 0===t&&(t={});var c=new this.constructor(e,i(i({},this.opts),t),this);if(t.dropdownForTag)try{for(var d=l(this.creatorMap.entries()),u=d.next();!u.done;u=d.next()){var p=s(u.value,2),h=p[0],m=p[1];if(m.dropdownForTag&&m.tag&&t.tag===m.tag&&!c.creatorMap.has(h)){c.creatorMap.set(h,m);var g=c.tagMatrix.get(m.tag)||new Map,f=this.tagMatrix.get(m.tag);if(f)try{for(var _=(o=void 0,l(f.entries())),b=_.next();!b.done;b=_.next()){var y=s(b.value,2),v=y[0],C=y[1];g.set(v,C)}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}c.tagMatrix.set(m.tag,g)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return c},e.prototype.get=function(e,t,n){var r,o,a;Array.isArray(t)||(n=t,t=void 0);var c=s(this.getCreator(e),1)[0];c&&(0,h.isAliasCreator)(c)&&(e=c.target);var l=null,p=this;if(t){if(n=i(i({},n),{multiple:!0}),!(l=s(this.getCreator(e),1)[0])){if(!(0,h.isTypeProvider)(e))throw u.onMultipleCaseNoCreatorFound(e);l={opts:{},parameters:[],useClass:e}}}else{if(n&&d.hasTag(n)){var m=this.exchangeToken(e,n.tag);l=(r=s(this.getCreator(m),2))[0],p=r[1]}l||(l=(o=s(this.getCreator(e),2))[0],p=o[1]),!(0,h.isTypeProvider)(e)||l||this.opts.strict||(this.parseDependencies(e),l=(a=s(this.getCreator(e),2))[0],p=a[1])}if(!l)throw u.noProviderError(e);return this.createInstance(l,e,p,n,t)},e.prototype.getFromDomain=function(){for(var e,t,n=this,i=[],r=0;r{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRTTContribution=t.ConnectionRTTBrowserService=t.ConnectionRTTBrowserServiceToken=void 0;const r=n(70655),o=n(39993),a=n(11792),s=n(29217),c=n(18570),l=n(15516),d=n(25104),u={id:"connection.start.rtt",label:(0,l.localize)("connection.start.rtt","Measure Connection RTT"),category:(0,l.localize)("command.category.developerTools","Developer Tool")},p={id:"connection.stop.rtt",label:(0,l.localize)("connection.stop.rtt","Stop Connection RTT"),category:(0,l.localize)("command.category.developerTools","Developer Tool")},h={alignment:a.StatusBarAlignment.LEFT,priority:1/0};t.ConnectionRTTBrowserServiceToken=Symbol("ConnectionRTTBrowserService");let m=class{async measure(){await this.connectionBackService.$measure()}};r.__decorate([(0,o.Autowired)(d.ConnectionBackServicePath),r.__metadata("design:type",Object)],m.prototype,"connectionBackService",void 0),m=r.__decorate([(0,o.Injectable)()],m),t.ConnectionRTTBrowserService=m;let g=i=class{registerCommands(e){e.registerCommand(u,{execute:()=>{this.interval||this.startRTTInterval()}}),e.registerCommand(p,{execute:()=>{this.interval&&(n.g.clearInterval(this.interval),this.statusBar&&(this.statusBar.dispose(),this.statusBar=void 0))}})}startRTTInterval(){this.interval=n.g.setInterval((async()=>{const e=Date.now();await this.rttService.measure();const t={text:`${Date.now()-e}ms`};if(this.statusBar)this.statusBar.update(Object.assign(Object.assign({},t),h));else{const e=this.statusBarService.addElement("connection-rtt",Object.assign(Object.assign({},t),h));this.statusBar=e}}),i.INTERVAL)}};g.INTERVAL=1e3,r.__decorate([(0,o.Autowired)(a.IStatusBarService),r.__metadata("design:type",Object)],g.prototype,"statusBarService",void 0),r.__decorate([(0,o.Autowired)(t.ConnectionRTTBrowserServiceToken),r.__metadata("design:type",m)],g.prototype,"rttService",void 0),g=i=r.__decorate([(0,c.Domain)(s.CommandContribution)],g),t.ConnectionRTTContribution=g},53722:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(25104);let c=class extends a.WithEventBus{onDidDropFile(e){this.dropService.onDidDropFile(e)}};i.__decorate([(0,r.Autowired)(s.IFileDropFrontendServiceToken),i.__metadata("design:type",Object)],c.prototype,"dropService",void 0),i.__decorate([(0,a.OnEvent)(a.FileTreeDropEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[a.FileTreeDropEvent]),i.__metadata("design:returntype",void 0)],c.prototype,"onDidDropFile",null),c=i.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution)],c),t.FileDropContribution=c},76960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDropService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(11792),s=n(90642),c=n(17735),{Path:l}=s.path,d=n(25104);let u=class extends s.WithEventBus{constructor(){super(...arguments),this.pending=new Set}onDidUploadFileStart(e){this.pending.add(e),this.createOrUpdateStatusBar()}onDidUploadFileEnd(e){this.pending.delete(e),this.createOrUpdateStatusBar()}createOrUpdateStatusBar(e){if(0===this.pending.size)return void(this.uploadStatus&&(this.uploadStatus.dispose(),this.uploadStatus=void 0));const t="sumi-upload-file-status",n=(0,o.formatLocalize)("workbench.uploadingFiles",this.pending.size,e||"0 MB"),i={text:n,alignment:a.StatusBarAlignment.RIGHT,tooltip:n,iconClass:"kaitian-icon kticon-cloud-server"};this.uploadStatus?this.uploadStatus.update(Object.assign({id:t},i)):this.uploadStatus=this.statusBarService.addElement(t,i)}onDidDropFile(e){var t;const{payload:{event:n,targetDir:i}}=e;if(!i||!(null===(t=n.dataTransfer)||void 0===t?void 0:t.files)||0===n.dataTransfer.files.length)return;const r=n.dataTransfer.items;let o=0;const a=Date.now(),s=e=>{o+=e;const t=Date.now(),n=`${(o/((t-a)/1e3)/1024/1024).toFixed(2)} MB`;this.createOrUpdateStatusBar(n)};for(const e of r){const t=e.webkitGetAsEntry();this.processFilesEntry(i,t,s)}}async processFilesEntry(e,t,n){if(t.isFile)this.processFileEntry(t,e,n);else{const i=s.Uri.file(new l(e).join(t.fullPath).toString()).toString();await this.fs.createFolder(i),this.processDirEntry(t,e,n)}}toBinaryString(e){let t;const n=e.length;let i="";for(t=0;t{const r=new File([i],e.fullPath,{type:e.type});this.doUploadFile(r,t,n)}),(()=>{}))}processDirEntry(e,t,n){e.createReader().readEntries((e=>{e.forEach((async e=>{this.processFilesEntry(t,e,n)}))}),(()=>{}))}};i.__decorate([(0,r.Autowired)(c.IFileServiceClient),i.__metadata("design:type",Object)],u.prototype,"fs",void 0),i.__decorate([(0,r.Autowired)(d.FileDropServicePath),i.__metadata("design:type",Object)],u.prototype,"dropService",void 0),i.__decorate([(0,r.Autowired)(a.IStatusBarService),i.__metadata("design:type",Object)],u.prototype,"statusBarService",void 0),u=i.__decorate([(0,r.Injectable)()],u),t.FileDropService=u},97602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSearchContribution=t.FileSearchQuickCommandHandler=t.getValidateInput=t.matchLineReg=t.quickGoToSymbol=t.quickFileOpen=void 0;const i=n(70655),r=i.__importDefault(n(43261)),o=n(39993),a=n(894),s=n(894),c=n(894),l=n(894),d=n(11792),u=n(90642),p=n(18570),h=n(92345),m=n(86412),g=n(9550),f=n(48770),_=n(82647),b=n(14238),y=n(71711),v=i.__importStar(n(63138));function C(e=""){const n=e.match(t.matchLineReg)||[];if(n.length<2)return;const i={line:Number(n[2]||0),start:Number(n[3]||0)};return new v.Range(i.line,i.start,i.line,i.start)}function S(e){return e.replace(t.matchLineReg,"$1")}t.quickFileOpen={id:"workbench.action.quickOpen",category:"File",label:"Open File..."},t.quickGoToSymbol={id:"workbench.action.gotoSymbol",category:"File",label:"Open File Symbol..."},t.matchLineReg=/^([^:#(]*)[:#(]?L?(\d+)?[:,]?(\d+)?\)?/,t.getValidateInput=S;let w=class extends f.QuickOpenBaseAction{constructor(){super({id:"file-search:splitToRight",tooltip:(0,a.localize)("file-search.quickOpen.leftRight"),class:(0,c.getIcon)("embed")})}async run(e){await this.commandService.executeCommand(a.EDITOR_COMMANDS.OPEN_RESOURCE.id,e.getUri(),{preview:!1,split:h.EditorGroupSplitAction.Right,range:C(this.injector.get(k).currentLookFor),focus:!0})}};i.__decorate([(0,o.Autowired)(a.CommandService),i.__metadata("design:type",Object)],w.prototype,"commandService",void 0),i.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),i.__metadata("design:type",o.Injector)],w.prototype,"injector",void 0),w=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],w);let E=class{hasActions(){return!0}getActions(){return[this.fileSearchActionLeftRight]}getValidateInput(e){return S(e)}};i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",w)],E.prototype,"fileSearchActionLeftRight",void 0),E=i.__decorate([(0,o.Injectable)()],E);let k=class{constructor(){this.cancelIndicator=new u.CancellationTokenSource,this.default=!0,this.prefix="...",this.description=(0,a.localize)("file-search.command.fileOpen.description"),this.prevEditorState={},this.currentLookFor=""}getModel(){return{onType:async(e,t)=>{this.cancelIndicator.cancel(),this.cancelIndicator=new u.CancellationTokenSource;const n=this.cancelIndicator.token,i=new Set;let r=[];e=e.trim().replace(/\s/g,""),this.currentLookFor=e;const o=S(e),a=this.reporterService.time(u.REPORT_NAME.QUICK_OPEN_MEASURE),s=await this.getRecentlyItems(i,o,n);if(e&&(this.logger.debug("lookFor",e,o),r=await this.getFindOutItems(i,o,n)),n.isCancellationRequested)return;const c=s.concat(r);t(c,c.length?this.fileSearchActionProvider:void 0),a.timeEnd(e.indexOf("@")>-1?"file-symbol":"file",{lookFor:e,stat:{recently:s.length,find:r.length}})}}}getOptions(){return{placeholder:(0,a.localize)("file-search.command.fileOpen.placeholder"),fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:{enableSeparateSubstringMatching:!0},getPlaceholderItem:e=>new a.QuickOpenItem({label:(0,a.localize)(e.indexOf("@")>-1?"fileSymbolResults.notfound":"fileResults.notfound"),run:()=>!1})}}onClose(e){e&&this.prevEditorState.uri&&(this.workbenchEditorService.open(this.prevEditorState.uri,{range:this.prevEditorState.range}),this.prevEditorState={}),this.prevSelected=void 0,this.commandService.executeCommand(a.EDITOR_COMMANDS.FOCUS.id),this.cancelIndicator.cancel()}onToggle(){this.cancelIndicator.cancel()}trySaveEditorState(){var e;if(this.workbenchEditorService.currentResource){let t={startColumn:1,startLineNumber:1,endColumn:1,endLineNumber:1};const n=null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.getSelections();if(n){const{selectionStartLineNumber:e,selectionStartColumn:i,positionLineNumber:r,positionColumn:o}=n[0];t=new v.Range(e,i,r,o)}this.prevEditorState={uri:this.workbenchEditorService.currentResource.uri,range:t}}}async getFindOutItems(e,t,n){var i;let r;if(t.indexOf("@")>-1){this.trySaveEditorState(),r=[];const[o,s]=t.split("@");let c;if(this.prevSelected)c=this.prevSelected.withoutFragment();else if(o){const t=await this.getQueryFiles(o,e,n);t.length&&(c=t[0].getUri())}else c=null===(i=this.workbenchEditorService.currentResource)||void 0===i?void 0:i.uri;if(!c)return[];{const e=await this.documentSymbolStore.getDocumentSymbolAsync(c)||[],t=[];this.flattenSymbols({children:e},t);const n=t.filter((e=>{const t=(0,y.matchesFuzzy)(s,e.name,!0)||[];return t&&(e.labelHighlights=t),t&&t.length})).map(((e,n)=>{var i;return new a.QuickOpenItem({uri:c,label:e.name,iconClass:(0,a.getSymbolIcon)(e.kind),description:null===(i=e.parent)||void 0===i?void 0:i.name,labelHighlights:e.labelHighlights,groupLabel:0===n?(0,a.formatLocalize)("fileSymbolResults",t.length):"",showBorder:!1,run:t=>(t===a.Mode.PREVIEW||t===a.Mode.OPEN)&&(this.locateSymbol(c,e),!0)})}));r=n}}else if(r=await this.getQueryFiles(t,e,n),r[0]){const e=await this.getItems([r[0].getUri().toString()],{groupLabel:(0,a.localize)("fileResults"),showBorder:!0});r[0]=e[0]}return r}async getQueryFiles(e,t,n){const i=await this.workspaceService.roots,r=[];i.forEach((e=>{const t=new a.URI(e.uri);if(t.scheme===u.Schemes.file)return this.logger.debug("file-search.contribution rootUri",t.toString()),r.push(t.toString())}));const o=await this.fileSearchService.find(e,{rootUris:r,fuzzyMatch:!0,limit:200,useGitIgnore:!0,noIgnoreParent:!0,excludePatterns:["*.git*",...this.getPreferenceSearchExcludes()]},n),s=await this.getItems(o.filter((e=>!t.has(e)&&!n.isCancellationRequested&&(t.add(e),!0))),{});return s.sort(this.compareItems.bind(this)),s}async flattenSymbols(e,t){e.children.forEach((e=>{t.push(e),e.children&&this.flattenSymbols(e,t)}))}async getRecentlyItems(e,t,n){const i=await this.recentFilesManager.getMostRecentlyOpenedFiles(!0)||[];return await this.getItems(i.filter((i=>{const o=new a.URI(i);return!(e.has(i)||!r.default.test(t,o.displayName)||n.isCancellationRequested)&&(e.add(i),!0)})),{groupLabel:(0,a.localize)("historyMatches")})}async getItems(e,t){const n=[];for(const[i,r]of e.entries()){const o=new a.URI(r),s=`file-icon ${await this.labelService.getIcon(o.withoutFragment())}`,c=await this.workspaceService.asRelativePath(o.parent.withoutFragment()),l=new a.QuickOpenItem({uri:o,label:o.displayName,tooltip:r,iconClass:s,description:c,groupLabel:0===i?t.groupLabel:"",showBorder:e.length>0&&0===i&&t.showBorder,run:e=>(e===a.Mode.PREVIEW&&(this.prevSelected=o),e===a.Mode.OPEN&&(this.openFile(o),!0))});n.push(l)}return n}openFile(e){const t=e.path.toString();let n=C(this.currentLookFor);n&&(n.startLineNumber||n.startColumn)||(n=C(e.fragment?t+"#"+e.fragment:t)),this.currentLookFor="",this.commandService.executeCommand(a.EDITOR_COMMANDS.OPEN_RESOURCE.id,e.withoutFragment(),{preview:!1,range:n,focus:!0})}locateSymbol(e,t){this.workbenchEditorService.open(e,{range:t.range,preview:!0})}compareItems(e,t,n="getLabel"){function i(e){return e.trim().toLowerCase()}const o=i(S(this.currentLookFor));function a(e){const t=r.default.match(o,e);return null===t?0:t.score}let s=e[n](),c=t[n]();"string"!=typeof s&&(s=s.path.toString()),"string"!=typeof c&&(c=c.path.toString()),s=i(s),c=i(c);const l=a(s),d=a(c);if(l===d){const i=s.indexOf(o),r=c.indexOf(o);if(i===r){if(s.length!==c.length)return s.lengththis.quickOpenService.open("...")}),e.registerCommand(t.quickGoToSymbol,{execute:()=>this.quickOpenService.open("...@")})}registerKeybindings(e){e.registerKeybinding({command:t.quickFileOpen.id,keybinding:"ctrlcmd+p"})}};i.__decorate([(0,o.Autowired)(k),i.__metadata("design:type",k)],x.prototype,"fileSearchQuickCommandHandler",void 0),i.__decorate([(0,o.Autowired)(f.PrefixQuickOpenService),i.__metadata("design:type",Object)],x.prototype,"quickOpenService",void 0),x=i.__decorate([(0,p.Domain)(u.CommandContribution,s.KeybindingContribution,_.QuickOpenContribution)],x),t.FileSearchContribution=x},63667:(e,t,n)=>{"use strict";Object.defineProperty(t,"X",{value:!0}),t.$=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(25104),s=n(72870),c=n(53722),l=n(76960),d=n(97602),u=n(31530),p=n(98712),h=n(83311);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[u.LanguageChangeHintContribution,d.FileSearchContribution,p.StatusBarContribution,h.ToolbarCustomizeContribution,c.FileDropContribution,s.ConnectionRTTContribution,{token:a.IFileDropFrontendServiceToken,useClass:l.FileDropService},{token:s.ConnectionRTTBrowserServiceToken,useClass:s.ConnectionRTTBrowserService}],this.backServices=[{servicePath:a.FileDropServicePath},{servicePath:a.ConnectionBackServicePath}]}};m=i.__decorate([(0,r.Injectable)()],m),t.$=m},31530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageChangeHintContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(1500);let s=class{onStart(){this.preferenceService.onSpecificPreferenceChange("general.language",(async e=>{(0,o.setLanguageId)(e.newValue);if(this.preferenceService.get("general.askReloadOnLanguageChange")){await this.dialogService.info((0,o.localize)("preference.general.language.change.refresh.info","After changing the language, it should be restarted to take effect. Will it be refreshed immediately?"),[(0,o.localize)("preference.general.language.change.refresh.later","Later"),(0,o.localize)("preference.general.language.change.refresh.now","Now")])===(0,o.localize)("preference.general.language.change.refresh.now","Now")&&this.clientApp.fireOnReload()}}))}};i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],s.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(o.IClientApp),i.__metadata("design:type",Object)],s.prototype,"clientApp",void 0),i.__decorate([(0,r.Autowired)(a.IDialogService),i.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),s=i.__decorate([(0,o.Domain)(o.ClientAppContribution)],s),t.LanguageChangeHintContribution=s},98712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusBarContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642);let s=class extends a.WithEventBus{onStart(){}handleBrowserConnectionOpen(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--statusBar-background)")}handleBrowserConnectionClose(){this.commandService.executeCommand("statusbar.changeBackgroundColor","var(--kt-statusbar-offline-background)")}};i.__decorate([(0,r.Autowired)(a.CommandService),i.__metadata("design:type",Object)],s.prototype,"commandService",void 0),i.__decorate([(0,a.OnEvent)(a.BrowserConnectionOpenEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],s.prototype,"handleBrowserConnectionOpen",null),i.__decorate([(0,a.OnEvent)(a.BrowserConnectionCloseEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],s.prototype,"handleBrowserConnectionClose",null),s=i.__decorate([(0,a.Domain)(o.ClientAppContribution)],s),t.StatusBarContribution=s},83311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(68186);let c=class{registerCommands(e){e.registerCommand({id:"toolbar.showCustomizePanel",label:"Show Toolbar Customization"},{execute:()=>{this.viewService.setVisible(!0)}})}registerComponent(e){e.register("addon/toolbar-customize",{id:"addon/toolbar-customize",component:s.ToolbarCustomizeComponent}),this.config.layoutConfig[o.SlotLocation.extra]||(this.config.layoutConfig[o.SlotLocation.extra]={modules:[]}),this.config.layoutConfig[o.SlotLocation.extra].modules.push("addon/toolbar-customize")}registerMenus(e){e.registerMenuItem(a.MenuId.KTToolbarLocationContext,{command:{id:"toolbar.showCustomizePanel",label:(0,o.localize)("toolbar.customize.menu")}})}};i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],c.prototype,"config",void 0),i.__decorate([(0,r.Autowired)(s.ToolbarCustomizeViewService),i.__metadata("design:type",s.ToolbarCustomizeViewService)],c.prototype,"viewService",void 0),c=i.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,a.MenuContribution)],c),t.ToolbarCustomizeContribution=c},68186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCustomizeComponent=t.ToolbarCustomizeViewService=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(39993),a=n(25880),s=n(894),c=i.__importDefault(n(51293));let l=class{bindSetVisibleHandle(e){this._setVisible=e}setVisible(e){this._setVisible(e)}async toggleActionVisibility(e,t,n){const i=this.preferenceService.get("toolbar.ignoreActions")||{};if(i[e]||(i[e]=[]),n){const n=i[e].indexOf(t);-1!==n&&i[e].splice(n,1)}else-1===i[e].indexOf(t)&&i[e].push(t);const r=this.preferenceService.inspect("toolbar.ignoreActions").workspaceValue?s.PreferenceScope.Workspace:s.PreferenceScope.User;await this.preferenceService.set("toolbar.ignoreActions",i,r)}};i.__decorate([(0,o.Autowired)(s.PreferenceService),i.__metadata("design:type",Object)],l.prototype,"preferenceService",void 0),l=i.__decorate([(0,o.Injectable)()],l),t.ToolbarCustomizeViewService=l;t.ToolbarCustomizeComponent=()=>{const[e,t]=r.default.useState(!1),n=(0,s.useInjectable)(l),i=(0,s.useInjectable)(s.IToolbarRegistry),o=(0,s.useInjectable)(s.PreferenceService);if(n.bindSetVisibleHandle(t),!e)return null;const d=i.getAllLocations(),u=o.get("toolbar.ignoreActions")||{};let p=o.get("toolbar.buttonDisplay","iconAndText");return r.default.createElement("div",{className:c.default["toolbar-customize-overlay"]},r.default.createElement("div",{className:c.default["toolbar-customize"]},d.map((e=>function(e){const t=[{id:"_head"},...i.getActionGroups(e)||[],{id:"_tail"}],o=[],s=u[e]||[];return t.forEach(((t,l)=>{const d=i.getToolbarActions({location:e,group:t.id});d&&d.actions.length>0&&(o.length>0&&o.push(r.default.createElement("div",{className:c.default["group-split"],key:"split-"+l})),d.actions.forEach(((t,i)=>{let l=-1===s.indexOf(t.id);const d="action-toggle-"+t.id;o.push(r.default.createElement("div",{className:c.default["action-item"],key:i+"_"+t.id},r.default.createElement(a.CheckBox,{onChange:()=>{n.toggleActionVisibility(e,t.id,!l),l=!l},defaultChecked:l,id:d,label:t.description})))})))})),0===o.length?null:r.default.createElement("div",{key:e,className:c.default["toolbar-customize-location"]},o)}(e))),r.default.createElement("div",{className:c.default["button-display"]},r.default.createElement("div",null,(0,s.localize)("toolbar-customize.buttonDisplay.description")),r.default.createElement(a.Select,{options:[{label:(0,s.localize)("toolbar-customize.buttonDisplay.icon"),value:"icon"},{label:(0,s.localize)("toolbar-customize.buttonDisplay.iconAndText"),value:"iconAndText"}],value:p,onChange:e=>{const t=o.inspect("toolbar.buttonDisplay").workspaceValue?s.PreferenceScope.Workspace:s.PreferenceScope.User;o.set("toolbar.buttonDisplay",e,t),p=e},className:c.default["button-display-select"]})),r.default.createElement("div",{className:c.default["customize-complete"]},r.default.createElement(a.Button,{type:"primary",onClick:()=>t(!1)},(0,s.localize)("toolbar-customize.complete")))))}},25104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IConnectionBackService=t.ConnectionBackServicePath=t.IFileDropFrontendServiceToken=t.IFileDropServiceToken=t.FileDropServicePath=void 0,t.FileDropServicePath="FileDropServicePath",t.IFileDropServiceToken=Symbol("IFileDropService"),t.IFileDropFrontendServiceToken=Symbol("IFileDropFrontendService"),t.ConnectionBackServicePath="ConnectionBackServicePath",t.IConnectionBackService=Symbol("IConnectionBackService")},27494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactions=t.CommentReactionSwitcher=void 0;const i=n(70655),r=n(32834),o=i.__importDefault(n(616)),a=n(894),s=n(52e3),c=n(32278),l=n(57061),d=n(52292),u=n(58512),p=i.__importDefault(n(31436));t.CommentReactionSwitcher=(0,r.observer)((({thread:e,comment:t,className:n})=>{const i=`${e.providerId}_${e.id}_${t.id}`,r=`${l.MenuId.CommentReactionSwitcherMenu}_${i}`,s=(0,a.useInjectable)(l.IMenuRegistry),d=(0,a.useInjectable)(l.AbstractMenuService);o.default.useEffect((()=>{const n=new a.Disposable,o=`${l.MenuId.CommentReactionSwitcherSubmenu}_${i}`;return n.addDispose(s.registerMenuItem(r,{submenu:o,label:o,iconClass:(0,a.getExternalIcon)("reactions"),group:"navigation"})),n.addDispose(s.registerMenuItems(o,t.reactions.map((n=>({command:{id:u.SwitchCommandReaction,label:n.label},extraTailArgs:[{thread:e,comment:t,reaction:n}]}))))),()=>n.dispose()}),[]);const p=o.default.useMemo((()=>d.createMenu(r)),[]);return o.default.createElement(c.InlineActionBar,{className:n,menus:p,regroup:e=>[e,[]],type:"icon"})})),t.CommentReactions=(0,r.observer)((({thread:e,comment:t})=>{var n;const i=(0,a.useInjectable)(a.IEventBus),r=(0,a.useInjectable)(d.IIconService),c=o.default.useCallback((n=>{i.fire(new u.CommentReactionClick({thread:e,comment:t,reaction:n}))}),[]);return o.default.createElement("div",{className:p.default.comment_reactions},null===(n=t.reactions)||void 0===n?void 0:n.filter((e=>0!==e.count)).map((e=>o.default.createElement(s.Button,{key:e.label,onClick:()=>c(e),type:"secondary",size:"small",title:e.label,className:p.default.comment_reaction,iconClass:r.fromIcon("",e.iconPath.toString(),d.IconType.Background)},"聽",e.count))))}))},27527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBody=void 0;const i=n(70655),r=n(30970),o=i.__importDefault(n(616)),a=i.__importDefault(n(5868)),s=i.__importDefault(n(31436)),c=n(5584),l=({root:e,children:t})=>a.default.createPortal(t,e);t.CommentsBody=o.default.memo((({body:e})=>{const t=o.default.useRef(null),[n,i]=o.default.useState(null),a=o.default.useMemo((()=>{const e=new r.marked.Renderer;return e.link=(e,t,n)=>`${n}`,e}),[]);return o.default.useEffect((()=>{if(t.current){const e=t.current.attachShadow({mode:"open"});n||i(e)}}),[]),o.default.createElement("div",{ref:t,className:s.default.comment_shadow_box},n&&o.default.createElement(l,{root:n},o.default.createElement("style",null,c.markdownCss),o.default.createElement("div",{dangerouslySetInnerHTML:{__html:(0,r.marked)(e,{gfm:!0,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1,renderer:a})}})))}))},72706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsFeatureRegistry=void 0;const i=n(70655),r=n(39993);let o=class{constructor(){this.config={},this.options={},this.panelTreeNodeHandlers=[],this.mentionsOptions={},this.providerFeature=new Map}registerConfig(e){this.config=Object.assign(Object.assign({},this.config),e)}registerPanelTreeNodeHandler(e){this.panelTreeNodeHandlers.push(e)}registerPanelOptions(e){this.options=Object.assign(Object.assign({},this.options),e)}registerFileUploadHandler(e){this.fileUploadHandler=e}registerMentionsOptions(e){this.mentionsOptions=e}registerZoneWidgetRender(e){this.zoneWidgetRender=e}getConfig(){return this.config}getCommentsPanelOptions(){return this.options}getCommentsPanelTreeNodeHandlers(){return this.panelTreeNodeHandlers}getFileUploadHandler(){return this.fileUploadHandler}getMentionsOptions(){return this.mentionsOptions}getZoneWidgetRender(){return this.zoneWidgetRender}registerProviderFeature(e,t){this.providerFeature.set(e,t)}getProviderFeature(e){return this.providerFeature.get(e)}};o=i.__decorate([(0,r.Injectable)()],o),t.CommentsFeatureRegistry=o},8119:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentItem=void 0;const i=n(70655),r=n(30970),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(894),l=n(32278),d=n(57061),u=n(58512),p=n(27494),h=n(27527),m=n(78288),g=i.__importDefault(n(31436)),f=(e,t)=>{const n=(0,c.useInjectable)(d.AbstractMenuService),{body:i,contextValue:r}=t,[o,s]=a.default.useState(""),l=(0,c.useInjectable)(u.ICommentsFeatureRegistry),p=a.default.useMemo((()=>l.getFileUploadHandler()),[]);a.default.useEffect((()=>{s(i)}),[i]);const h=a.default.useMemo((()=>e.createScoped()),[]),m=a.default.useMemo((()=>h.createKey("commentIsEmpty",!t.body)),[]),g=a.default.useMemo((()=>n.createMenu(d.MenuId.CommentsCommentContext,h)),[]),f=a.default.useMemo((()=>n.createMenu(d.MenuId.CommentsCommentTitle,h)),[]),_=a.default.useRef(h.createKey("comment",r));a.default.useEffect((()=>{_.current.set(r)}),[r]);const b=a.default.useCallback((e=>{m.set(!e.target.value),s(e.target.value)}),[]),y=a.default.useCallback((async e=>{if(p){const t=await p(o,e);s((e=>{const n=e+t;return m.set(!n),n}))}}),[o]);return[o,s,b,g,f,y]},_=(0,o.observer)((({reply:e,thread:t})=>{var n;const{contextKeyService:i}=t,{author:o,label:s,body:_,mode:b}=e,y=null===(n=o.iconPath)||void 0===n?void 0:n.toString(),[v,C,S,w,E,k]=f(i,e),x=a.default.useMemo((()=>{const e=(0,r.marked)(_);return/^\[^<>]+\<\/p\>\n$/.test(e)}),[_]);return a.default.createElement("div",{className:g.default.reply_item},(0,c.isUndefined)(b)||b===u.CommentMode.Preview?a.default.createElement("div",null,x?a.default.createElement(a.default.Fragment,null,y&&a.default.createElement("img",{className:g.default.reply_item_icon,src:y,alt:o.name}),a.default.createElement("span",{className:g.default.comment_item_author_name},o.name),"string"==typeof s?a.default.createElement("span",{className:g.default.comment_item_label},s):s," : ",a.default.createElement("span",{className:g.default.comment_item_body},_),e.reactions&&e.reactions.length>0&&a.default.createElement(p.CommentReactionSwitcher,{className:g.default.reply_item_title,thread:t,comment:e}),a.default.createElement(l.InlineActionBar,{separator:"inline",className:g.default.reply_item_title,menus:E,context:[{thread:t,comment:e,menuId:d.MenuId.CommentsCommentTitle}],type:"icon"})):a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:g.default.comment_item_markdown_header},a.default.createElement("div",null,y&&a.default.createElement("img",{className:g.default.reply_item_icon,src:y,alt:o.name}),a.default.createElement("span",{className:g.default.comment_item_author_name},o.name),"string"==typeof s?a.default.createElement("span",{className:g.default.comment_item_label},s):s," : "),a.default.createElement(l.InlineActionBar,{separator:"inline",className:g.default.reply_item_title,menus:E,context:[{thread:t,comment:e,menuId:d.MenuId.CommentsCommentTitle}],type:"icon"})),a.default.createElement(h.CommentsBody,{body:_}))):a.default.createElement("div",null,a.default.createElement(m.CommentsTextArea,{value:v,autoFocus:!0,onChange:S,dragFiles:k}),a.default.createElement(l.InlineActionBar,{className:g.default.comment_item_reply,menus:w,context:[{thread:t,comment:e,body:v,menuId:d.MenuId.CommentsCommentContext}],type:"button",separator:"inline",afterClick:()=>{C(_)}})),e.reactions&&e.reactions.length>0&&a.default.createElement(p.CommentReactions,{thread:t,comment:e}))}));t.CommentItem=(0,o.observer)((({thread:e,commentThreadContext:t,widget:n})=>{var i;const{readOnly:r,contextKeyService:o}=e,[b,y]=a.default.useState(!1),[v,C]=a.default.useState(""),[S,...w]=e.comments,{author:E,label:k,body:x,mode:T}=S,D=null===(i=E.iconPath)||void 0===i?void 0:i.toString(),[A,I,M,R,P,O]=f(o,S),N=(0,c.useInjectable)(u.ICommentsFeatureRegistry),L=a.default.useMemo((()=>N.getFileUploadHandler()),[]),F=a.default.useMemo((()=>o.createKey("commentIsEmpty",!0)),[]);const B=a.default.useCallback((async e=>{if(L){const t=await L(A,e);C((e=>{const n=e+t;return F.set(!n),n}))}}),[v]);return a.default.createElement("div",{className:g.default.comment_item},D&&a.default.createElement("img",{className:g.default.comment_item_icon,src:D,alt:E.name}),a.default.createElement("div",{className:g.default.comment_item_content},a.default.createElement("div",{className:g.default.comment_item_head},a.default.createElement("div",{className:g.default.comment_item_name},a.default.createElement("span",{className:g.default.comment_item_author_name},E.name),"string"==typeof k?a.default.createElement("span",{className:g.default.comment_item_label},k):k),a.default.createElement("div",{className:g.default.comment_item_actions},S.reactions&&S.reactions.length>0&&a.default.createElement(p.CommentReactionSwitcher,{thread:e,comment:S}),!r&&a.default.createElement(s.Button,{className:g.default.comment_item_reply_button,size:"small",type:"secondary",onClick:()=>y(!0)},(0,c.localize)("comments.thread.action.reply")),a.default.createElement(l.InlineActionBar,{menus:P,context:[{thread:e,comment:S,menuId:d.MenuId.CommentsCommentTitle}],type:"button"}))),(0,c.isUndefined)(T)||T===u.CommentMode.Preview?a.default.createElement(h.CommentsBody,{body:x}):a.default.createElement("div",null,a.default.createElement(m.CommentsTextArea,{value:A,autoFocus:!0,onChange:M,dragFiles:O}),a.default.createElement(l.InlineActionBar,{className:g.default.comment_item_context,menus:R,context:[{thread:e,comment:S,body:A,menuId:d.MenuId.CommentsCommentContext}],separator:"inline",type:"button",afterClick:()=>{I(x)}})),S.reactions&&S.reactions.length>0&&a.default.createElement(p.CommentReactions,{thread:e,comment:S}),(w.length>0||b)&&a.default.createElement("div",{className:g.default.comment_item_reply_wrap},w.map((t=>a.default.createElement(_,{key:t.id,thread:e,reply:t}))),b&&a.default.createElement("div",null,a.default.createElement(m.CommentsTextArea,{autoFocus:!0,value:v,onChange:function(e){F.set(!e.target.value),C(e.target.value)},placeholder:`${(0,c.localize)("comments.reply.placeholder")}...`,dragFiles:B}),a.default.createElement(l.InlineActionBar,{className:g.default.comment_item_reply,menus:t,context:[{thread:e,text:v,widget:n,menuId:d.MenuId.CommentsCommentThreadContext}],separator:"inline",type:"button",afterClick:()=>{C(""),y(!1)}})))))}))},17923:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsPanel=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(894),c=n(52e3),l=n(92345),d=n(58512),u=i.__importDefault(n(31436));t.CommentsPanel=(0,o.observer)((e=>{const t=(0,s.useInjectable)(d.ICommentsService),n=(0,s.useInjectable)(l.WorkbenchEditorService),i=(0,s.useInjectable)(d.ICommentsFeatureRegistry),[o,p]=a.default.useState([]),h=(0,s.useInjectable)(s.IEventBus);a.default.useEffect((()=>{h.on(d.CommentPanelCollapse,(()=>{p((e=>e.map((e=>((0,s.isUndefined)(e.expanded)||(e.expanded=!1),e)))))}))}),[]);const m=a.default.useCallback((e=>e.filter((e=>{var t;return!e||!e.parent||!1!==e.parent.expanded&&!1!==(null===(t=e.parent.parent)||void 0===t?void 0:t.expanded)}))),[]);a.default.useEffect((()=>{p(t.commentsTreeNodes)}),[t.commentsTreeNodes]);const g=a.default.useCallback((([e])=>{if(e){if((0,s.isUndefined)(e.expanded)){const t=o.map((t=>(t.selected=t.id===e.id,t)));p(t)}else{const t=o.map((t=>(t.id===e.id&&(t.expanded=!t.expanded),t.selected=t.id===e.id,t)));p(t)}e.onSelect?e.onSelect(e):n.open(e.uri,{range:e.thread.range})}}),[n,o]),f=a.default.useMemo((()=>i.getCommentsPanelOptions()),[]),_=a.default.useMemo((()=>f.header),[f]),b=a.default.useMemo((()=>e.viewState.height-((null==_?void 0:_.height)||0)),[e.viewState.height]),y=a.default.useMemo((()=>({width:"100%",height:b})),[b]),v=a.default.useMemo((()=>f.defaultPlaceholder),[f]),C=m(o);return a.default.createElement("div",{className:(0,r.default)(e.className,u.default.comment_panel)},null==_?void 0:_.component,C.length?a.default.createElement(c.DeprecatedRecycleTree,Object.assign({containerHeight:b,scrollContainerStyle:y,nodes:C,foldable:!0,outline:!1,onSelect:e=>g(e),leftPadding:20},f.recycleTreeProps)):v&&"string"!=typeof v?v:a.default.createElement("div",{className:u.default.panel_placeholder},v||(0,s.localize)("comments.panel.placeholder")))}))},78288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsTextArea=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(45715),a=n(25880),s=n(894),c=n(58512),l=n(27527),d=i.__importDefault(n(31436)),u=n(35355),p=(e,t)=>`@${t}`;t.CommentsTextArea=r.default.forwardRef(((e,t)=>{const{focusDelay:n=0,autoFocus:i=!1,placeholder:h="",onFocus:m,onBlur:g,onChange:f,maxRows:_=10,minRows:b=2,value:y,initialHeight:v,dragFiles:C}=e,[S,w]=r.default.useState(0),E=(0,s.useInjectable)(c.ICommentsFeatureRegistry),k=r.default.useRef(null),x=r.default.useRef(null),T=r.default.useRef(null);r.default.useImperativeHandle(t,(()=>k.current));const D=r.default.useCallback((async e=>{var t;e.stopPropagation(),e.preventDefault();const n=null===(t=e.dataTransfer)||void 0===t?void 0:t.files;n&&C&&await C(n),k.current&&(k.current.focus(),I(k.current.value))}),[C]),A=r.default.useCallback((e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}),[]),I=r.default.useCallback((e=>{const t=k.current;if(t){const n=e.toString().length;t.setSelectionRange(n,n)}}),[]);r.default.useEffect((()=>{var e;const t=k.current;if(t)return v&&t.style&&(t.style.height=v),n&&setTimeout((()=>{t.focus({preventScroll:!0})}),n),I(y),null===(e=x.current)||void 0===e||e.addEventListener("mousewheel",i,!0),()=>{var e;null===(e=x.current)||void 0===e||e.removeEventListener("mousewheel",i,!0)};function i(e){var t,n,i;const r=e.target;r&&("TEXTAREA"===r.nodeName.toUpperCase()&&r.scrollHeight>r.clientHeight||"UL"===r.nodeName.toUpperCase()||"UL"===(null===(t=r.parentElement)||void 0===t?void 0:t.nodeName.toUpperCase())||"UL"===(null===(i=null===(n=r.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.nodeName.toUpperCase()))&&e.stopPropagation()}}),[]),r.default.useEffect((()=>{0===S&&(setTimeout((()=>{var e;null===(e=k.current)||void 0===e||e.focus({preventScroll:!0})}),n),I(y))}),[S]);const M=r.default.useMemo((()=>(0,u.getMentionBoxStyle)({minRows:b,maxRows:_})),[b,_]),R=r.default.useMemo((()=>E.getMentionsOptions()),[E]),P=r.default.useCallback((async(e,t)=>{if(R.providerData){t(await R.providerData(e))}else t([])}),[R]);return r.default.createElement("div",{className:d.default.textarea_container},r.default.createElement(a.Tabs,{mini:!0,value:S,onChange:e=>w(e),tabs:[(0,s.localize)("comments.thread.textarea.write"),(0,s.localize)("comments.thread.textarea.preview")]}),r.default.createElement("div",null,0===S?r.default.createElement("div",{ref:x},r.default.createElement(o.MentionsInput,{autoFocus:i,onDragOver:A,onDrop:D,inputRef:k,ref:T,value:y,placeholder:h,onChange:f,onFocus:m,onBlur:g,style:M},r.default.createElement(o.Mention,{markup:R.markup||"@[__display__](__id__)",renderSuggestion:R.renderSuggestion,trigger:"@",data:P,displayTransform:R.displayTransform||p}))):r.default.createElement("div",{className:d.default.textarea_preview},r.default.createElement(l.CommentsBody,{body:y}))))}))},69602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsThread=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(26044),c=n(92345),l=n(58512),d=n(80211);let u=class extends a.Disposable{constructor(e,t,n,i){super(),this.uri=e,this.range=t,this.providerId=n,this.options=i,this.widgets=new Map,this._id=`thread_${(0,a.uuid)()}`,this._readOnly=!1,this.toggle=e=>{if(this.comments.length>0){const t=this.widgets.get(e);t&&t.toggle()}else this.dispose()},this.comments=i.comments?i.comments.map((e=>Object.assign(Object.assign({},e),{id:(0,a.uuid)()}))):[],this.data=this.options.data,this._contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped());new s.ResourceContextKey(this._contextKeyService).set(e),this._contextKeyService.createKey("thread",i.contextValue),this.readOnly=!!i.readOnly,this.label=i.label,this.isCollapsed=!!this.options.isCollapsed;const o=this._contextKeyService.createKey("threadsLength",this.commentsService.getThreadsByUri(e).length),c=this._contextKeyService.createKey("commentsLength",this.comments.length),l=this._contextKeyService.createKey("commentThreadIsEmpty",!this.comments.length);this._contextKeyService.createKey("commentController",n),(0,r.autorun)((()=>{c.set(this.comments.length),l.set(!this.comments.length)})),(0,r.autorun)((()=>{this.isCollapsed?this.hideAll():this.showAll()})),this.addDispose(this.commentsService.onThreadsChanged((t=>{t.uri.isEqual(e)&&o.set(this.commentsService.getThreadsByUri(e).length)}))),this.addDispose({dispose:()=>{this.comments=[]}})}set contextValue(e){this._contextKeyService.createKey("thread",e)}get contextValue(){return this._contextKeyService.getContextValue("thread")}getWidgetByEditor(e){return this.widgets.get(e)}get id(){return this._id}get contextKeyService(){return this._contextKeyService}get readOnly(){return this._readOnly}set readOnly(e){this._readOnly=e,this._contextKeyService.createKey("readOnly",this._readOnly)}get threadHeaderTitle(){if(this.label)return this.label;if(this.comments.length){const e=new Set(this.comments.map((e=>`@${e.author.name}`)));return`${(0,a.localize)("comments.participants")}: `+[...e].join(" ")}return(0,a.localize)("comments.zone.title")}getEditorsByUri(e){return this.editorCollectionService.listEditors().filter((t=>{var n;return null===(n=t.currentUri)||void 0===n?void 0:n.isEqual(e)}))}addWidgetByEditor(e){const t=this.injector.get(d.CommentsZoneWidget,[e,this]);return this.addDispose(t.onChangeZoneWidget((()=>{const t=this.commentsService.commentsThreads.filter((e=>this.isEqual(e))),n=t.findIndex((e=>e===this)),i=t.slice(n+1);for(const t of i)if(t.isShowWidget(e)){const n=t.getWidgetByEditor(e);null==n||n.resize()}}))),this.addDispose(t),this.widgets.set(e,t),e.onDispose((()=>{t.dispose(),this.widgets.delete(e)})),t}show(e){if(e){let t=this.widgets.get(e);t||(t=this.addWidgetByEditor(e)),t.show()}else{this.getEditorsByUri(this.uri).forEach((e=>{var t;let n=this.widgets.get(e);n||(n=this.addWidgetByEditor(e)),(null===(t=e.currentUri)||void 0===t?void 0:t.isEqual(this.uri))&&n.show()}))}}showWidgetsIfShowed(){var e;for(const t of this.getEditorsByUri(this.uri)){let n=this.widgets.get(t);n||(n=this.addWidgetByEditor(t)),(null===(e=t.currentUri)||void 0===e?void 0:e.isEqual(this.uri))&&n.isShow&&n.show()}}hideWidgetsByDispose(){var e;for(const[t,n]of this.widgets)!(null===(e=t.currentUri)||void 0===e?void 0:e.isEqual(this.uri))&&n.dispose()}isShowWidget(e){if(e){const t=this.widgets.get(e);return!!t&&t.isShow}for(const[,e]of this.widgets)return e.isShow;return!1}hide(e){if(e){const t=this.widgets.get(e);null==t||t.hide()}else this.hideAll()}showAll(){for(const[,e]of this.widgets)e.show()}hideAll(e){var t;for(const[n,i]of this.widgets)e?!(null===(t=n.currentUri)||void 0===t?void 0:t.isEqual(this.uri))&&i.dispose():i.hide()}addComment(...e){this.comments.push(...e.map((e=>Object.assign(Object.assign({},e),{id:(0,a.uuid)()}))))}removeComment(e){const t=this.comments.findIndex((t=>t===e));-1!==t&&this.comments.splice(t,1)}isEqual(e){return e.uri.isEqual(this.uri)&&e.range.startLineNumber===this.range.startLineNumber}};i.__decorate([(0,o.Autowired)(l.ICommentsService),i.__metadata("design:type",Object)],u.prototype,"commentsService",void 0),i.__decorate([(0,o.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],u.prototype,"globalContextKeyService",void 0),i.__decorate([(0,o.Autowired)(c.EditorCollectionService),i.__metadata("design:type",c.EditorCollectionService)],u.prototype,"editorCollectionService",void 0),i.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),i.__metadata("design:type",o.Injector)],u.prototype,"injector",void 0),i.__decorate([r.observable,i.__metadata("design:type",Array)],u.prototype,"comments",void 0),i.__decorate([r.observable,i.__metadata("design:type",Object)],u.prototype,"label",void 0),i.__decorate([r.observable,i.__metadata("design:type",Object)],u.prototype,"_readOnly",void 0),i.__decorate([r.observable,i.__metadata("design:type",Boolean)],u.prototype,"isCollapsed",void 0),i.__decorate([r.computed,i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],u.prototype,"readOnly",null),i.__decorate([r.computed,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],u.prototype,"threadHeaderTitle",null),u=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[a.URI,Object,String,Object])],u),t.CommentsThread=u},81037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneService=void 0;const i=n(70655),r=n(39993),o=n(57061),a=n(90642),s=n(69602);let c=class extends a.Disposable{constructor(e){super(),this.thread=e}get commentThreadTitle(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadTitle,this.thread.contextKeyService))}get commentThreadContext(){return this.registerDispose(this.menuService.createMenu(o.MenuId.CommentsCommentThreadContext,this.thread.contextKeyService))}};i.__decorate([(0,r.Autowired)(o.AbstractMenuService),i.__metadata("design:type",o.AbstractMenuService)],c.prototype,"menuService",void 0),i.__decorate([a.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],c.prototype,"commentThreadTitle",null),i.__decorate([a.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],c.prototype,"commentThreadContext",null),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)()),i.__metadata("design:paramtypes",[s.CommentsThread])],c),t.CommentsZoneService=c},80211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsZoneWidget=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=i.__importDefault(n(5868)),c=n(39993),l=n(894),d=n(32278),u=n(57061),p=n(97069),h=n(58512),m=n(8119),g=n(78288),f=n(81037),_=i.__importDefault(n(31436)),b=(0,o.observer)((({thread:e,widget:t})=>{const{comments:n,threadHeaderTitle:i,contextKeyService:o}=e,s=(0,l.useInjectable)(c.INJECTOR_TOKEN).get(f.CommentsZoneService,[e]),p=(0,l.useInjectable)(h.ICommentsFeatureRegistry),b=a.default.useMemo((()=>p.getFileUploadHandler()),[]),[y,v]=a.default.useState(""),C=a.default.useMemo((()=>o.createKey("commentIsEmpty",!y)),[]),S=s.commentThreadTitle,w=s.commentThreadContext,E=a.default.useCallback((e=>{const{value:t}=e.target;v(t),C.set(!t)}),[]),k=a.default.useMemo((()=>{var t;return(null===(t=p.getProviderFeature(e.providerId))||void 0===t?void 0:t.placeholder)||`${(0,l.localize)("comments.reply.placeholder")}...`}),[]),x=a.default.useCallback((async e=>{if(b){const t=await b(y,e);v((e=>{const n=e+t;return C.set(!n),n}))}}),[y]);return a.default.useEffect((()=>{const n=t.onFirstDisplay((()=>{setTimeout((()=>{t.coreEditor.monacoEditor.revealLine(e.range.startLineNumber+1)}),0)}));return()=>{n.dispose()}}),[]),a.default.createElement("div",{className:(0,r.default)(e.options.threadClassName,_.default.comment_container)},a.default.createElement("div",{className:(0,r.default)(e.options.threadHeadClassName,_.default.head)},a.default.createElement("div",{className:_.default.review_title},i),a.default.createElement(d.InlineActionBar,{menus:S,context:[{thread:e,widget:t,menuId:u.MenuId.CommentsCommentThreadTitle}],separator:"inline",type:"icon"})),a.default.createElement("div",{className:_.default.comment_body},n.length>0?a.default.createElement(m.CommentItem,{widget:t,commentThreadContext:w,thread:e}):a.default.createElement("div",null,a.default.createElement(g.CommentsTextArea,{focusDelay:100,initialHeight:"auto",value:y,onChange:E,placeholder:k,dragFiles:x}),a.default.createElement("div",{className:_.default.comment_bottom_actions},a.default.createElement(d.InlineActionBar,{className:_.default.comment_reply_actions,separator:"inline",type:"button",context:[{text:y,widget:t,thread:e,menuId:u.MenuId.CommentsCommentThreadContext}],menus:w})))))}));let y=class extends p.ResizeZoneWidget{constructor(e,t){super(e.monacoEditor,t.range),this._onShow=new l.Emitter,this.onShow=this._onShow.event,this._onHide=new l.Emitter,this.onHide=this._onHide.event,this._editor=e,this._wrapper=document.createElement("div"),this._isShow=!t.isCollapsed,this._container.appendChild(this._wrapper),this.observeContainer(this._wrapper);const n=this.commentsFeatureRegistry.getZoneWidgetRender();s.default.render(a.default.createElement(l.ConfigProvider,{value:this.appConfig},n?n(t,this):a.default.createElement(b,{thread:t,widget:this})),this._wrapper)}_fillContainer(e){}get coreEditor(){return this._editor}get isShow(){return this._isShow}show(){super.show(),this._isShow=!0,this._onShow.fire()}hide(){super.dispose(),this._isShow=!1,this._onHide.fire()}toggle(){this._isShow?this.hide():this.show()}applyClass(){}applyStyle(){}};i.__decorate([(0,c.Autowired)(l.AppConfig),i.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),i.__decorate([(0,c.Autowired)(h.ICommentsFeatureRegistry),i.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),y=i.__decorate([(0,c.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,Object])],y),t.CommentsZoneWidget=y},38798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsBrowserContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(70888),c=n(92674),l=n(58512);let d=class extends o.Disposable{onStart(){this.registerCommentsFeature(),this.listenToCreateCommentsPanel(),this.commentsService.init()}get panelBadge(){const e=this.commentsService.commentsThreads.length;return e?e+"":""}registerCommands(e){e.registerCommand({id:l.CollapseId,label:"%comments.panel.action.collapse%",iconClass:(0,o.getIcon)("collapse-all")},{execute:()=>{this.eventBus.fire(new l.CommentPanelCollapse)}}),e.registerCommand({id:l.CloseThreadId,label:"%comments.thread.action.close%",iconClass:(0,o.getIcon)("up")},{execute:e=>{const{thread:t,widget:n}=e;t.comments.length?n.isShow&&n.toggle():t.dispose()}}),e.registerCommand({id:l.SwitchCommandReaction},{execute:e=>{this.eventBus.fire(new l.CommentReactionClick(e))}})}registerMenus(e){e.registerMenuItem(a.MenuId.CommentsCommentThreadTitle,{command:l.CloseThreadId,group:"inline",order:Number.MAX_SAFE_INTEGER})}registerToolbarItems(e){e.registerItem({id:l.CollapseId,viewId:l.CommentPanelId,command:l.CollapseId,tooltip:(0,o.localize)("comments.panel.action.collapse")})}registerCommentsFeature(){this.contributions.getContributions().forEach(((e,t)=>{this.addDispose(this.commentsService.registerCommentRangeProvider(`contribution_${t}`,{getCommentingRanges:t=>e.provideCommentingRanges(t)})),e.registerCommentsFeature&&e.registerCommentsFeature(this.commentsFeatureRegistry)}))}listenToCreateCommentsPanel(){this.commentsFeatureRegistry.getCommentsPanelOptions().defaultShow?this.commentsService.registerCommentPanel():o.Event.once(this.commentsService.onThreadsCreated)((()=>{this.commentsService.registerCommentPanel()})),this.addDispose(o.Event.debounce(this.commentsService.onThreadsChanged,(()=>{}),100)((()=>{const e=this.layoutService.getTabbarHandler(l.CommentPanelId);null==e||e.setBadge(this.panelBadge)}),this))}registerEditorFeature(e){e.registerEditorFeatureContribution({contribute:e=>this.commentsService.handleOnCreateEditor(e),provideEditorOptionsForUri:async e=>(await this.commentsService.getContributionRanges(e)).length?{lineDecorationsWidth:25,lineNumbersMinChars:5}:{}})}};i.__decorate([(0,r.Autowired)(l.ICommentsService),i.__metadata("design:type",Object)],d.prototype,"commentsService",void 0),i.__decorate([(0,r.Autowired)(c.IMainLayoutService),i.__metadata("design:type",Object)],d.prototype,"layoutService",void 0),i.__decorate([(0,r.Autowired)(l.ICommentsFeatureRegistry),i.__metadata("design:type",Object)],d.prototype,"commentsFeatureRegistry",void 0),i.__decorate([(0,r.Autowired)(l.CommentsContribution),i.__metadata("design:type",Object)],d.prototype,"contributions",void 0),i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),d=i.__decorate([(0,o.Domain)(o.ClientAppContribution,s.BrowserEditorContribution,o.CommandContribution,o.TabBarToolbarContribution,a.MenuContribution)],d),t.CommentsBrowserContribution=d},28704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentsService=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=i.__importDefault(n(42348)),a=i.__importDefault(n(7739)),s=n(22188),c=n(39993),l=n(894),d=n(70888),u=n(92674),p=n(52292),h=i.__importStar(n(47219)),m=i.__importStar(n(63138)),g=n(58512),f=n(17923),_=n(69602),{dirname:b}=l.path;let y=class extends l.Disposable{constructor(){super(...arguments),this.decorationChangeEmitter=new l.Emitter,this.threads=new Map,this.threadsChangeEmitter=new l.Emitter,this.threadsCreatedEmitter=new l.Emitter,this.rangeProviderMap=new Map,this.rangeOwner=new Map,this.providerDecorationCache=new l.LRUCache(1e4),this.shouldShowCommentsSchemes=new Set(["file","git"]),this.decorationProviderDisposer=l.Disposable.NULL,this.forceUpdateCount=0}get commentsThreads(){return[...this.threads.values()]}get isMultiCommentsForSingleLine(){var e;return!!(null===(e=this.commentsFeatureRegistry.getConfig())||void 0===e?void 0:e.isMultiCommentsForSingleLine)}get currentAuthorAvatar(){var e,t;return null===(t=null===(e=this.commentsFeatureRegistry.getConfig())||void 0===e?void 0:e.author)||void 0===t?void 0:t.avatar}get filterThreadDecoration(){var e;return null===(e=this.commentsFeatureRegistry.getConfig())||void 0===e?void 0:e.filterThreadDecoration}get onThreadsChanged(){return this.threadsChangeEmitter.event}get onThreadsCreated(){return this.threadsCreatedEmitter.event}createThreadDecoration(e){var t;const n=0===e.comments.length?this.currentAuthorAvatar:null===(t=e.comments[0].author.iconPath)||void 0===t?void 0:t.toString(),i={description:"comments-thread-decoration",glyphMarginClassName:["comments-decoration","comments-thread",n?this.iconService.fromIcon("",n,p.IconType.Background):(0,l.getIcon)("message")].join(" ")};return h.ModelDecorationOptions.createDynamic(i)}createHoverDecoration(){const e={description:"comments-hover-decoration",linesDecorationsClassName:["comments-decoration","comments-add",(0,l.getIcon)("message")].join(" ")};return h.ModelDecorationOptions.createDynamic(e)}init(){this.addDispose(this.resourceService.onRegisterResourceProvider((e=>{e.scheme&&(this.shouldShowCommentsSchemes.add(e.scheme),this.registerDecorationProvider())}))),this.addDispose(this.resourceService.onUnregisterResourceProvider((e=>{e.scheme&&(this.shouldShowCommentsSchemes.delete(e.scheme),this.registerDecorationProvider())}))),this.registerDecorationProvider()}handleOnCreateEditor(e){const t=new l.Disposable;t.addDispose(e.monacoEditor.onMouseDown((t=>{if(t.target.type===m.editor.MouseTargetType.GUTTER_LINE_DECORATIONS&&t.target.element&&t.target.element.className.indexOf("comments-add")>-1){const{target:n}=t;if(n&&n.range){const{range:t}=n;if(this.commentsThreads.some((n=>0===n.comments.length&&n.uri.isEqual(e.currentUri)&&n.range.startLineNumber===t.startLineNumber)))return;this.createThread(e.currentUri,t).show(e)}}else if(t.target.type===m.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&t.target.element&&t.target.element.className.indexOf("comments-thread")>-1){const{target:n}=t;if(n&&n.range){const{range:t}=n,i=this.commentsThreads.filter((n=>n.uri.isEqual(e.currentUri)&&n.range.startLineNumber===t.startLineNumber));if(i.length){i.some((t=>t.isShowWidget(e)))?i.forEach((t=>t.hide(e))):i.forEach((t=>t.show(e)))}}}})));let n=[];return t.addDispose(e.monacoEditor.onMouseMove((0,r.default)((async t=>{const i=e.currentUri,r=t.target.range;n=i&&r&&await this.shouldShowHoverDecoration(i,r)?e.monacoEditor.deltaDecorations(n,[{range:(0,l.positionToRange)(r.startLineNumber),options:this.createHoverDecoration()}]):e.monacoEditor.deltaDecorations(n,[])}),10))),t.addDispose(e.monacoEditor.onMouseLeave((0,r.default)((()=>{n=e.monacoEditor.deltaDecorations(n,[])}),10))),t}async shouldShowHoverDecoration(e,t){if(!this.shouldShowCommentsSchemes.has(e.scheme))return!1;const n=(await this.getContributionRanges(e)).some((e=>t.startLineNumber>=e.startLineNumber&&t.startLineNumber<=e.endLineNumber)),i=this.isMultiCommentsForSingleLine||!this.commentsThreads.some((n=>n.uri.isEqual(e)&&n.range.startLineNumber===t.startLineNumber));return n&&i}createThread(e,t,n={comments:[],readOnly:!1}){const i=this.getProviderIdsByLine(t.startLineNumber)[0],r=this.injector.get(_.CommentsThread,[e,t,i,n]);return r.onDispose((()=>{this.threads.delete(r.id),this.threadsChangeEmitter.fire(r),this.decorationChangeEmitter.fire(e)})),this.threads.set(r.id,r),this.addDispose(r),this.threadsChangeEmitter.fire(r),this.threadsCreatedEmitter.fire(r),this.decorationChangeEmitter.fire(e),r}getThreadsByUri(e){return this.commentsThreads.filter((t=>t.uri.isEqual(e))).sort(((e,t)=>e.range.startLineNumber-t.range.startLineNumber))}forceUpdateTreeNodes(){this.forceUpdateCount++}get commentsTreeNodes(){let e=[];const t=[...this.threads.values()].filter((e=>e.comments.length)),n=(0,a.default)(t,(e=>e.uri));Object.keys(n).forEach((t=>{const i=n[t];if(0===i.length)return;const r=i[0],o=r.uri,a=b(o.path.toString().replace(this.appConfig.workspaceDir,"")),s=Object.assign(Object.assign({id:t,name:o.displayName,uri:o,description:a.replace(/^\//,""),parent:void 0,thread:r},i.length&&{expanded:!0,children:[]}),{_forceUpdateCount:this.forceUpdateCount});e.push(s),i.forEach((t=>{var n;if(0===t.comments.length)return;const[i,...r]=t.comments,o=Object.assign(Object.assign({id:i.id,name:i.author.name,iconStyle:{marginRight:5,backgroundSize:"14px 14px"},icon:this.iconService.fromIcon("",null===(n=i.author.iconPath)||void 0===n?void 0:n.toString(),p.IconType.Background),description:i.body,uri:t.uri,parent:s,depth:1,thread:t},r.length&&{expanded:!0,children:[]}),{comment:i}),a=r.map((e=>{var n;return{id:e.id,name:e.author.name,description:e.body,uri:t.uri,iconStyle:{marginRight:5,backgroundSize:"14px 14px"},icon:this.iconService.fromIcon("",null===(n=e.author.iconPath)||void 0===n?void 0:n.toString(),p.IconType.Background),parent:o,depth:2,thread:t,comment:e}}));e.push(o),e.push(...a)}))}));for(const t of this.commentsFeatureRegistry.getCommentsPanelTreeNodeHandlers())e=t(e);return e}async getContributionRanges(e){const t=this.providerDecorationCache.get(e.toString());if(t)return await t.promise;const n=this.documentService.getModelReference(e),i=[];for(const e of this.rangeProviderMap){const[t,r]=e;i.push((async()=>{const e=await r.getCommentingRanges(null==n?void 0:n.instance);return e&&e.length&&this.rangeOwner.set(t,e),e})())}const r=new l.Deferred;this.providerDecorationCache.set(e.toString(),r);const a=await Promise.all(i);null==n||n.dispose();const s=(0,o.default)(a).filter(Boolean);return r.resolve(s),s}registerDecorationProvider(){this.decorationProviderDisposer.dispose(),this.decorationProviderDisposer=this.editorDecorationCollectionService.registerDecorationProvider({schemes:[...this.shouldShowCommentsSchemes.values()],key:"comments",onDidDecorationChange:this.decorationChangeEmitter.event,provideEditorDecoration:e=>this.commentsThreads.map((t=>(t.uri.isEqual(e)?t.showWidgetsIfShowed():t.hideWidgetsByDispose(),t))).filter((t=>{const n=t.uri.isEqual(e);return this.filterThreadDecoration?n&&this.filterThreadDecoration(t):n})).map((e=>({range:e.range,options:this.createThreadDecoration(e)})))}),this.addDispose(this.decorationProviderDisposer)}registerCommentPanel(){this.layoutService.getTabbarHandler(g.CommentPanelId)||this.layoutService.collectTabbarComponent([{id:g.CommentPanelId,component:f.CommentsPanel}],Object.assign({badge:this.panelBadge,containerId:g.CommentPanelId,title:(0,l.localize)("comments").toUpperCase(),hidden:!1,activateKeyBinding:"ctrlcmd+shift+c"},this.commentsFeatureRegistry.getCommentsPanelOptions()),"bottom")}get panelBadge(){const e=this.commentsThreads.length;return e?e+"":""}registerCommentRangeProvider(e,t){return this.rangeProviderMap.set(e,t),this.providerDecorationCache.clear(),l.Disposable.create((()=>{this.rangeProviderMap.delete(e),this.rangeOwner.delete(e),this.providerDecorationCache.clear()}))}forceUpdateDecoration(){var e,t;const n=null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.currentUri;n&&this.decorationChangeEmitter.fire(n);const i=null===(t=this.workbenchEditorService.currentEditorGroup)||void 0===t?void 0:t.diffEditor.originalEditor.currentUri;i&&this.decorationChangeEmitter.fire(i)}getProviderIdsByLine(e){const t=[];if(1===this.rangeOwner.size)return[this.rangeOwner.keys().next().value];for(const n of this.rangeOwner){const[i,r]=n;r&&r.some((t=>t.startLineNumber<=e&&e<=t.endLineNumber))&&t.push(i)}return t}};i.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),i.__metadata("design:type",c.Injector)],y.prototype,"injector",void 0),i.__decorate([(0,c.Autowired)(l.AppConfig),i.__metadata("design:type",Object)],y.prototype,"appConfig",void 0),i.__decorate([(0,c.Autowired)(d.IEditorDecorationCollectionService),i.__metadata("design:type",Object)],y.prototype,"editorDecorationCollectionService",void 0),i.__decorate([(0,c.Autowired)(p.IIconService),i.__metadata("design:type",Object)],y.prototype,"iconService",void 0),i.__decorate([(0,c.Autowired)(g.ICommentsFeatureRegistry),i.__metadata("design:type",Object)],y.prototype,"commentsFeatureRegistry",void 0),i.__decorate([(0,c.Autowired)(d.IEditorDocumentModelService),i.__metadata("design:type",Object)],y.prototype,"documentService",void 0),i.__decorate([(0,c.Autowired)(u.IMainLayoutService),i.__metadata("design:type",Object)],y.prototype,"layoutService",void 0),i.__decorate([(0,c.Autowired)(d.WorkbenchEditorService),i.__metadata("design:type",d.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),i.__decorate([(0,c.Autowired)(d.ResourceService),i.__metadata("design:type",d.ResourceService)],y.prototype,"resourceService",void 0),i.__decorate([s.observable,i.__metadata("design:type",Object)],y.prototype,"threads",void 0),i.__decorate([s.observable,i.__metadata("design:type",Object)],y.prototype,"forceUpdateCount",void 0),i.__decorate([s.computed,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],y.prototype,"commentsThreads",null),i.__decorate([l.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],y.prototype,"isMultiCommentsForSingleLine",null),i.__decorate([l.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],y.prototype,"currentAuthorAvatar",null),i.__decorate([l.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],y.prototype,"filterThreadDecoration",null),i.__decorate([s.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],y.prototype,"forceUpdateTreeNodes",null),i.__decorate([s.computed,i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[])],y.prototype,"commentsTreeNodes",null),y=i.__decorate([(0,c.Injectable)()],y),t.CommentsService=y},17497:(e,t,n)=>{"use strict";Object.defineProperty(t,"X",{value:!0}),t.b=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(58512),s=n(72706),c=n(38798),l=n(28704);n(31436);let d=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=a.CommentsContribution,this.providers=[{token:a.ICommentsService,useClass:l.CommentsService},{token:a.ICommentsFeatureRegistry,useClass:s.CommentsFeatureRegistry},c.CommentsBrowserContribution]}};d=i.__decorate([(0,r.Injectable)()],d),t.b=d},5584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss="\nh1, h2, h3, h4, h5, h6, p {\n color: var(--foreground);\n word-break: break-all;\n}\npre:first-child,\np:first-child {\n margin-top: 0;\n}\npre:last-child,\np:last-child {\n margin-bottom: 0;\n}\npre {\n background-color: var(--textBlockQuote-background);\n border-color: var(--textBlockQuote-border);\n}\nimg {\n max-width: 100%;\n max-height: 100%;\n}\na {\n color: var(--textLink-foreground);\n}\n"},35355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMentionBoxStyle=void 0;t.getMentionBoxStyle=({maxRows:e=10,minRows:t=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:"20px",minHeight:20*t+"px",maxHeight:20*e+"px",outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}})},58512:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactionClick=t.CommentPanelCollapse=t.SwitchCommandReaction=t.CloseThreadId=t.CollapseId=t.ICommentsService=t.CommentsContribution=t.ICommentsFeatureRegistry=t.CommentPanelId=t.CommentGutterType=t.CommentThreadCollapsibleState=t.CommentMode=t.toRange=void 0;const i=n(894);t.toRange=i.positionToRange,function(e){e[e.Editor=0]="Editor",e[e.Preview=1]="Preview"}(t.CommentMode||(t.CommentMode={})),function(e){e[e.Collapsed=0]="Collapsed",e[e.Expanded=1]="Expanded"}(t.CommentThreadCollapsibleState||(t.CommentThreadCollapsibleState={})),function(e){e.Thread="thread",e.Empty="empty"}(t.CommentGutterType||(t.CommentGutterType={})),t.CommentPanelId="CommentPanel",t.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),t.CommentsContribution=Symbol("CommentsContribution"),t.ICommentsService=Symbol("ICommentsService"),t.CollapseId="comments.panel.action.collapse",t.CloseThreadId="comments.thread.action.close",t.SwitchCommandReaction="comments.comment.action.switchCommand";class r extends i.BasicEvent{}t.CommentPanelCollapse=r;class o extends i.BasicEvent{}t.CommentReactionClick=o},74566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(58512),t)},27767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616));n(23396);t.Badge=e=>{var{className:t,children:n}=e,a=i.__rest(e,["className","children"]);return o.default.createElement("span",Object.assign({className:(0,r.default)("kt-badge",t)},a),n)}},71214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(29166),s=n(23237);n(66206);const c=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function l(){}t.Button=o.default.memo((e=>{var{children:t,loading:n,className:d,type:u="primary",htmlType:p,size:h,ghost:m=!1,onClick:g,disabled:f,block:_,iconClass:b,icon:y,more:v,moreIconClass:C,menu:S,title:w,onVisibleChange:E}=e,k=i.__rest(e,["children","loading","className","type","htmlType","size","ghost","onClick","disabled","block","iconClass","icon","more","moreIconClass","menu","title","onVisibleChange"]);const x=(0,r.default)("kt-button",d,{[`kt-${u}-button-loading`]:n,[`ghost-${u}-button`]:m&&!n&&"link"!==u,[`${u}-button`]:u,[`${h}-button-size`]:h,"ghost-button":m&&"link"!==u,"block-button":_}),T=(0,r.default)(d,{"kt-clickable-icon":!!g});if("icon"===u)return o.default.createElement(s.Icon,Object.assign({tooltip:w,disabled:f,icon:y,onClick:n||f?l:g,className:T,iconClass:b},k));const D=b?o.default.createElement(s.Icon,{iconClass:b,disabled:f}):null;return v?o.default.createElement(a.Dropdown,{className:"kt-menu",overlay:S,trigger:["click"],onVisibleChange:E},o.default.createElement("button",Object.assign({},k,{disabled:f,className:x,type:p,onClick:n||f?l:g}),n&&"link"!==u&&o.default.createElement(c,null),D&&D,t,v&&o.default.createElement(s.Icon,{iconClass:C||(0,s.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",Object.assign({},k,{disabled:f,className:x,type:p,onClick:n||f?l:g}),n&&"link"!==u&&o.default.createElement(c,null),D&&D,t)}))},54811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(89065),s=n(15003);n(22979);const c=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}));t.CheckBox=e=>{var{insertClass:t,className:n,label:l,size:d="default",disabled:u,checked:p,wrapTabIndex:h}=e,m=i.__rest(e,["insertClass","className","label","size","disabled","checked","wrapTabIndex"]);(0,s.warning)(!t,"`insertClass` was deprecated, please use `className` instead");const g=(0,r.default)("kt-checkbox",t,n,{"kt-checkbox-large":"large"===d,"kt-checkbox-disabled":u}),f=m;return(0,a.isUndefined)(p)||(f.checked=p),o.default.createElement("label",{className:g,tabIndex:h},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",Object.assign({type:"checkbox",disabled:u},f)),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(c,null))),l||" ")},t.CheckBox.displayName="KTCheckBox"},24232:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const i=n(70655),r=i.__importDefault(n(616));t.ClickOutside=e=>{var{mouseEvents:t=["click"],onOutsideClick:n,children:o}=e,a=i.__rest(e,["mouseEvents","onOutsideClick","children"]);const s=r.default.useRef(null),c=r.default.useCallback((e=>{s.current&&e.target&&!s.current.contains(e.target)&&n(e)}),[n]);return r.default.useEffect((()=>(t.forEach((e=>{window.addEventListener(e,c,!0)})),()=>{t.forEach((e=>{window.removeEventListener(e,c,!0)}))})),[t]),r.default.createElement("div",Object.assign({},a,{ref:s}),o)}},24138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0,function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Empty=3]="Empty"}(t.MessageType||(t.MessageType={}))},12148:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(71214),s=n(24138),c=n(23237),l=n(77306);n(27383);const d=({onCancel:e,onOk:t,cancelText:n,okText:i})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(a.Button,{size:"large",onClick:e,type:"secondary"},n||"鍙栨秷"),o.default.createElement(a.Button,{size:"large",onClick:t},i||"纭畾"));t.Dialog=e=>{var{visible:t,onClose:n,closable:u,afterClose:p,messageType:h,icon:m,message:g,buttons:f,type:_="confirm",title:b,onOk:y,onCancel:v,okText:C,cancelText:S,getContainer:w,keyboard:E}=e,k=i.__rest(e,["visible","onClose","closable","afterClose","messageType","icon","message","buttons","type","title","onOk","onCancel","okText","cancelText","getContainer","keyboard"]);const{getIcon:x}=o.default.useContext(c.IconContext);return o.default.createElement(l.Overlay,Object.assign({visible:t,onClose:n,title:"basic"===_?b:null,closable:"basic"===_,getContainer:w,keyboard:E,footer:"basic"===_?f||o.default.createElement(d,{onCancel:v,onOk:y,okText:C,cancelText:S}):void 0,afterClose:p},k),o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},m&&o.default.createElement("div",{style:{color:m.color},className:(0,r.default)("kt-dialog-icon",(0,c.getIcon)(m.className)||x(m.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},"basic"!==_&&b&&o.default.createElement("p",{className:"kt-dialog-content_title"},b),"string"==typeof g?o.default.createElement("span",{className:"kt-dialog-message"},g):g),u&&"basic"!==_&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,c.getIcon)("close")),onClick:n})),h!==s.MessageType.Empty&&"basic"!==_&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},"confirm"===_?f||o.default.createElement(d,{onCancel:v,onOk:y,okText:C,cancelText:S}):o.default.createElement(a.Button,{size:"large",onClick:n},"鐭ラ亾浜�"))))}},92096:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655),r=i.__importDefault(n(9043)),o=i.__importDefault(n(94184)),a=i.__importDefault(n(46320)),s=i.__importDefault(n(616)),c=n(51308),l=n(15003);(0,c.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class d extends s.default.Component{constructor(){super(...arguments),this.renderOverlay=e=>{const{overlay:t}=this.props;let n;n="function"==typeof t?t():t,n=s.default.Children.only(n);const i=n.props;(0,l.warning)(!i.mode||"vertical"===i.mode,`[Dropdown] mode="${i.mode}" is not supported for Dropdown's Menu.`);const{selectable:o=!1,focusable:a=!0}=i,c=s.default.createElement("span",{className:`${e}-menu-submenu-arrow`},s.default.createElement(r.default,{className:`${e}-menu-submenu-arrow-icon`}));return"string"==typeof n.type?t:s.default.cloneElement(n,{mode:"vertical",selectable:o,focusable:a,expandIcon:c})},this.renderDropDown=()=>{const{prefixCls:e,children:t,trigger:n,disabled:i,getPopupContainer:r}=this.props,c=e||"kt-dropdown",l=s.default.Children.only(t),d=s.default.cloneElement(l,{className:(0,o.default)(l.props.className,`${c}-trigger`),disabled:i}),u=i?[]:n;let p;return u&&-1!==u.indexOf("contextMenu")&&(p=!0),s.default.createElement(a.default,Object.assign({alignPoint:p},this.props,{prefixCls:c,getPopupContainer:r,transitionName:this.getTransitionName(),trigger:u,overlay:()=>this.renderOverlay(c)}),d)}}getTransitionName(){const{placement:e="",transitionName:t}=this.props;return void 0!==t?t:e.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}t.default=d,d.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"}},29166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dropdown=void 0;const i=n(70655).__importDefault(n(92096));t.Dropdown=i.default,n(25080)},11131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContextProvider=t.IconContext=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(32705),s=n(19619);n(90917),t.IconContext=o.default.createContext({getIcon:(e,t)=>e}),t.IconContextProvider=function(e){return o.default.createElement(t.IconContext.Provider,{value:e.value},o.default.createElement(t.IconContext.Consumer,null,(t=>e.value===t?e.children:null)))};const c=function(e,n){const{size:c="small",loading:l,icon:d,iconClass:u,className:p,tooltip:h,rotate:m,anim:g,fill:f,disabled:_,onClick:b,children:y,resourceOptions:v}=e,C=i.__rest(e,["size","loading","icon","iconClass","className","tooltip","rotate","anim","fill","disabled","onClick","children","resourceOptions"]),S={rotate:m,anim:g,fill:f};let w;if(d)if(a.defaultIconMap[d])w=(0,s.getIcon)(d,S);else{const{getIcon:e,getResourceIcon:n}=o.default.useContext(t.IconContext);w=v&&n?n(d,v):e(d,S)}else w=u;return o.default.createElement("span",Object.assign({},C,{title:h,onClick:b,ref:n,className:(0,r.default)("kt-icon",w,p,{"kt-icon-loading":l,"kt-icon-disabled":!!_,[`kt-icon-${c}`]:!!c,"kt-icon-clickable":!!b,"kt-icon-resource":!!v,expanded:!!v&&v.isOpenedDirectory})}),y)};t._InternalIcon=o.default.memo(o.default.forwardRef(c)),t.Icon=o.default.memo(o.default.forwardRef(c))},81488:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(11131),s=n(19619),c=new Set;function l(e,t=0){const n=e[t];if(i=n,Boolean("string"==typeof i&&i.length&&!c.has(i))){const i=document.createElement("script");i.setAttribute("src",n),i.setAttribute("data-namespace",n),e.length>t+1&&(i.onload=()=>{l(e,t+1)},i.onerror=()=>{l(e,t+1)}),c.add(n),document.body.appendChild(i)}var i}const d={width:"1em",height:"1em",fill:"currentColor"};t.createFromIconfontCN=function(e={}){const{scriptUrl:t,extraCommonProps:n={}}=e;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?l(t.reverse()):l([t]));const c=o.default.forwardRef(((e,t)=>{const{icon:c,children:l,rotate:u,anim:p,fill:h,className:m=""}=e,g=i.__rest(e,["icon","children","rotate","anim","fill","className"]),f={rotate:u,anim:p,fill:h};let _=null;c&&(_=o.default.createElement("svg",Object.assign({},d,{focusable:"false"}),o.default.createElement("use",{xlinkHref:`#${c}`}))),l&&(_=l);const b=(0,s.getIconShapeClxList)(f);return o.default.createElement(a._InternalIcon,Object.assign({},n,g,{className:(0,r.default)(m,b),ref:t}),_)}));return c.displayName="Iconfont",c}},32705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconManager=t.defaultIconMap=t.defaultIconfont=void 0;const i=n(70655).__importDefault(n(15003)),r=n(38913);Object.defineProperty(t,"defaultIconfont",{enumerable:!0,get:function(){return r.defaultIconfont}});const o={"folder-fill-open":"folder-fill","search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-editor":"codelibrary-fill","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},a=Object.assign({},r.defaultIconfont,o);t.defaultIconMap=new Proxy(a,{get(e,t){const n=o[t];return(0,i.default)(!n,`Icon '${t}' was a typo, please use '${n}' instead`),e[t]}});t.iconManager=new class{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(e,t){this._iconMap[e]=t,this._ktIconPrefixes.push(e)}getIconClx(e){if(!e)return(0,i.default)(!1,"not a valid icon key:"+e),[];let t=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--t]][e]&&0!==t;);const n=this._iconMap[this._ktIconPrefixes[t]][e];return n?[`${this._ktIconPrefixes[t]}${n}`]:((0,i.default)(!1,"鍥炬爣搴撶己澶卞浘鏍�:"+e),[])}};t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},38913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconfont=void 0,t.defaultIconfont={"Gitlab-fill":"Gitlab-fill",LinkE:"LinkE",PR:"PR",ab:"ab",abl:"abl","add-comments":"add-comments",anymock:"anymock","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowup:"arrowup",basement:"basement","basement-fileicon":"basement-fileicon",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","bulb-fill":"bulb-fill","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-fill":"check-square-fill","check-square-o":"check-square-o",clear:"clear",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code","codelibrary-fill":"codelibrary-fill","collapse-all":"collapse-all","compass-fill":"compass-fill","content-search":"content-search",continue:"continue",control:"control","control-fill":"control-fill","dashboard-fill":"dashboard-fill","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame",delete:"delete",deploy:"deploy",detail:"detail",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleright:"doubleright",down:"down",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",execute:"execute",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","folder-fill":"folder-fill","folder-open":"folder-open","folder-open-fill":"folder-open-fill","follow-cursor":"follow-cursor",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",huoban:"huoban","huoban-blue":"huoban-blue","info-circle":"info-circle","info-circle-fill":"info-circle-fill",java:"java",kaitian:"kaitian",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading",max:"max",message:"message",min:"min",minus:"minus","minus-circle-fill":"minus-circle-fill",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile",pause:"pause",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",right:"right",rollback:"rollback",rust:"rust","save-all":"save-all",scm:"scm",search:"search",setting:"setting",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test","time-circle":"time-circle","time-circle-fill":"time-circle-fill",toolkit:"toolkit",tree:"tree",ubuntu:"ubuntu",undock:"undock",unmax:"unmax",unorderedlist:"unorderedlist",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle","warning-circle-fill":"warning-circle-fill","window-maximize":"window-maximize",hex:"hex"}},23237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const i=n(70655);i.__exportStar(n(11131),t),i.__exportStar(n(19619),t);var r=n(81488);Object.defineProperty(t,"createFromIconfontCN",{enumerable:!0,get:function(){return r.createFromIconfontCN}})},19619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.getIcon=t.getIconShapeClxList=t.updateIconMap=t.ANIM_TYPE=t.ROTATE_TYPE=void 0;const i=n(32705);!function(e){e[e.rotate_90=0]="rotate_90",e[e.rotate_180=1]="rotate_180",e[e.rotate_270=2]="rotate_270",e[e.flip_horizontal=3]="flip_horizontal",e[e.flip_vertical=4]="flip_vertical",e[e.flip_both=5]="flip_both"}(t.ROTATE_TYPE||(t.ROTATE_TYPE={})),function(e){e[e.spin=0]="spin",e[e.pulse=1]="pulse"}(t.ANIM_TYPE||(t.ANIM_TYPE={}));const r=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],o=["spin","pulse"];function a(e,t){i.iconManager.update(e,t)}function s(e){const{rotate:t,anim:n,fill:i}=e||{},a=[];return void 0!==t&&a.push(`iconfont-${r[t]}`),void 0!==n&&a.push(`iconfont-anim-${o[n]}`),i&&a.push("toggled"),a}function c(e,t){const n=i.iconManager.getIconClx(e),r=s(t);return n.push(...r),n.join(" ")}t.updateIconMap=a,t.getIconShapeClxList=s,t.getIcon=c,t.getKaitianIcon=c,t.updateKaitianIconMap=a},25880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);n(61715),i.__exportStar(n(71214),t),i.__exportStar(n(27767),t),i.__exportStar(n(34492),t),i.__exportStar(n(54811),t),i.__exportStar(n(64531),t),i.__exportStar(n(70054),t),i.__exportStar(n(77306),t),i.__exportStar(n(12148),t),i.__exportStar(n(23237),t),i.__exportStar(n(41782),t),i.__exportStar(n(79237),t),i.__exportStar(n(47047),t),i.__exportStar(n(77093),t),i.__exportStar(n(42295),t),i.__exportStar(n(90580),t),i.__exportStar(n(24138),t),i.__exportStar(n(22878),t),i.__exportStar(n(38886),t),i.__exportStar(n(24232),t),i.__exportStar(n(21372),t)},1056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const i=n(70655).__importDefault(n(616)),r=n(83249),o=n(12741);class a extends i.default.Component{constructor(){super(...arguments),this.inputRef=i.default.createRef(),this.addToHistory=e=>{this.history&&e&&e!==this.getCurrentValue()&&this.history.add(e)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const e=this.getCurrentValue()||"";this.history&&!this.history.has(e)&&this.addToHistory(e);let t=this.getNextValue();t&&(t=t===e?this.getNextValue():t),t&&this.onValueChange(t)},this.showPreviousValue=()=>{const e=this.getCurrentValue()||"";this.history&&!this.history.has(e)&&this.addToHistory(e);let t=this.getPreviousValue();t&&(t=t===e?this.getPreviousValue():t),t&&this.onValueChange(t)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=e=>{const{onValueChange:t}=this.props;this.setState({inputValue:e}),t&&t(e)},this.onKeyDown=e=>{const{onKeyDown:t}=this.props;t&&t(e)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var e;const{history:t,onReady:n}=this.props;this.history=new r.HistoryNavigator(t||[],100),this.inputProps=Object.assign({},this.props),delete this.inputProps.onReady,this.setState({inputValue:(null!==(e=this.props.value)&&void 0!==e?e:this.props.defaultValue)||""}),"function"==typeof n&&n({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const e=this.state&&this.state.inputValue;return i.default.createElement(o.Input,Object.assign({ref:this.inputRef},this.inputProps,{onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:e}))}}t.HistoryInputBox=a},12741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Input=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(23237),s=i.__importDefault(n(15003));function c(e,t,n){if("function"==typeof n){let i=t;if("click"===t.type){i=Object.create(t),i.target=e,i.currentTarget=e;const r=e.value;return e.value="",n(i),void(e.value=r)}n(i)}}n(98148),t.Input=o.default.forwardRef(((e,t)=>{const{defaultValue:n,className:l,wrapperStyle:d,size:u="default",controls:p,onChange:h,selection:m,addonBefore:g,addonAfter:f,persistFocus:_=!0,hasClear:b,afterClear:y,value:v="",onValueChange:C,onPressEnter:S,onKeyDown:w}=e,E=i.__rest(e,["defaultValue","className","wrapperStyle","size","controls","onChange","selection","addonBefore","addonAfter","persistFocus","hasClear","afterClear","value","onValueChange","onPressEnter","onKeyDown"]);(0,s.default)(!p,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const k=o.default.useRef(null),[x,T]=o.default.useState(!1),[D,A]=o.default.useState((()=>(null!=v?v:n)||"")),[I,M]=o.default.useState((()=>(null!=v?v:n)||""));o.default.useImperativeHandle(t,(()=>k.current)),o.default.useEffect((()=>{m&&void 0!==m.start&&!x&&k.current.setSelectionRange(m.start,m.end)}),[m,x]),o.default.useEffect((()=>{null!=v&&(v!==I&&v!==D&&A(v),v!==I&&M(v))}),[v]);const R=e=>{A(e),"function"==typeof C&&C(e),x||T(!0)},P=f||p,O=_?{onMouseDown:e=>{e.preventDefault()}}:{},N=(e,t)=>e?o.default.createElement("div",Object.assign({className:(0,r.default)("kt-input-addon",t)},O),o.default.Children.map(e,(e=>o.default.isValidElement(e)?o.default.cloneElement(e,O):null))):null,L=(0,r.default)("kt-input",l,{[`kt-input-${u}`]:u,"kt-input-disabled":e.disabled});return o.default.createElement("div",{className:L,style:d},N(g,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement("input",Object.assign({ref:k,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1},E,{value:D,onChange:e=>{R(e.target.value),c(k.current,e,h)},onKeyDown:e=>{13===e.keyCode&&"function"==typeof S&&S(e),"function"==typeof w&&w(e)}})),b&&D&&o.default.createElement(a.Icon,Object.assign({className:"kt-input-clear",icon:"close-circle-fill",onClick:e=>{e.preventDefault(),R(""),c(k.current,e,h),"function"==typeof y&&y()}},O))),N(P,"kt-input-addon-after"))})),t.Input.displayName="KTInput"},55674:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=void 0;const i=n(70655).__importDefault(n(616)),r=n(12741);class o extends i.default.Component{constructor(){super(...arguments),this.placeholderInputRef=i.default.createRef()}render(){const e=Object.assign({},this.props);return delete e.inputElement,delete e.innerRef,i.default.createElement(r.Input,Object.assign({},e,{type:"text",id:this.props.id,ref:this.placeholderInputRef}))}componentDidMount(){const{innerRef:e,inputElement:t}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(t,this.placeholderInputRef.current),this.applyAttributes(),t.focus(),"function"==typeof e?e(t):null!==e&&"object"==typeof e&&null===e.current&&(e.current=t)}UNSAFE_componentWillUnmount(){const{innerRef:e,inputElement:t}=this.props;t.parentElement.replaceChild(this.placeholderInputRef.current,t),null!==e&&"object"==typeof e&&e.current&&(e.current=null)}shouldComponentUpdate(e){return this.applyAttributes(e),!1}applyAttributes(e=this.props){const{className:t,id:n,inputElement:i,style:r}=e;if("string"==typeof t&&(i.className=t),"string"==typeof n&&(i.id=n),null!==r&&"object"==typeof r)for(const e in r)"string"==typeof r[e]&&i[e]&&(i[e]=r[e])}}const a=i.default.forwardRef(((e,t)=>i.default.createElement(o,Object.assign({},e,{innerRef:t}))));t.bindInputElement=function(e){return t=>i.default.createElement(a,Object.assign({},t,{inputElement:e}))}},68608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextArea=void 0;const i=n(70655).__importDefault(n(616));t.TextArea=()=>i.default.createElement("textarea",{name:"",id:"",cols:30,rows:10}),t.TextArea.displayName="KTTextArea"},11855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateInput=t.VALIDATE_TYPE=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=i.__importDefault(n(15003)),s=n(12741);var c;n(8472),function(e){e[e.INFO=1]="INFO",e[e.WRANING=0]="WRANING",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING"}(c=t.VALIDATE_TYPE||(t.VALIDATE_TYPE={})),t.ValidateInput=o.default.forwardRef(((e,t)=>{var{type:n,className:l,validate:d,onChange:u,onValueChange:p,validateMessage:h,popup:m=!0}=e,g=i.__rest(e,["type","className","validate","onChange","onValueChange","validateMessage","popup"]);const[f,_]=o.default.useState();o.default.useEffect((()=>{_(h)}),[h]),(0,a.default)(!f||f.type!==c.WRANING,"`VALIDATE_TYPE.WRANING` was a wrong typo, please use `VALIDATE_TYPE.WARNING` instead");const b=(0,r.default)({"validate-error":f&&f.type===c.ERROR,"validate-warning":f&&[c.WRANING,c.WARNING].includes(f.type),"validate-info":f&&f.type===c.INFO});return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:m})},o.default.createElement(s.Input,Object.assign({type:n,ref:t,className:(0,r.default)(l,f,b),onChange:e=>{let t;if(t="number"===e.target.type?e.target.valueAsNumber:e.target.value,"function"==typeof d){let e;e="number"===n?/^[0-9]+$/.test(t)?d(Number(t)):d(String(t)):d(t),_(e)}"function"==typeof u&&u(e),"function"==typeof p&&p(t)}},g)),(()=>{if(f&&f.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",b,{popup:m})},f.message)})())})),t.ValidateInput.displayName="ValidateInput"},34492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(68608),t),i.__exportStar(n(12741),t),i.__exportStar(n(11855),t),i.__exportStar(n(55674),t)},38886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(86885),t)},86885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const i=n(70655).__importDefault(n(616));n(81065),t.Loading=i.default.memo((()=>i.default.createElement("div",{className:"loading_indicator"}))),t.Loading.displayName="Loading"},21372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentContextProvider=t.LocalizeContextProvider=t.LocalizeContext=void 0;const i=n(70655).__importDefault(n(616)),r=n(23237),o=n(15003);function a(e){return i.default.createElement(t.LocalizeContext.Provider,{value:e.value},i.default.createElement(t.LocalizeContext.Consumer,null,(t=>e.value===t?e.children:null)))}t.LocalizeContext=i.default.createContext({localize:e=>((0,o.warning)(!1,"Using the default localize fn"),"")}),t.LocalizeContext.displayName="LocalizeContext",t.LocalizeContextProvider=a,t.ComponentContextProvider=function(e){return i.default.createElement(r.IconContextProvider,{value:e.value},i.default.createElement(a,{value:{localize:e.value.localize}},e.children))}},52625:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=(0,n(616).createContext)({inlineCollapsed:!1});t.default=i},9488:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655),r=n(50844),o=i.__importDefault(n(616)),a=i.__importDefault(n(52625));class s extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const e=this.props,{title:t}=e,n=i.__rest(e,["title"]);return o.default.createElement(a.default.Consumer,null,(({inlineCollapsed:e})=>o.default.createElement(r.Item,Object.assign({},n,{title:t}))))}}render(){return this.renderItem()}}t.default=s,s.isMenuItem=!0},99601:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655),r=i.__importDefault(n(45697)),o=n(50844),a=i.__importDefault(n(616));class s extends a.default.Component{render(){const{popupClassName:e}=this.props;return a.default.createElement(o.SubMenu,Object.assign({},this.props,{popupClassName:e}))}}s.contextTypes={antdMenuTheme:r.default.string},s.isSubMenu=1,t.default=s},29382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(50844)),a=i.__importDefault(n(616)),s=n(46871),c=i.__importDefault(n(10862)),l=i.__importDefault(n(29703)),d=n(15003),u=i.__importDefault(n(52625)),p=i.__importDefault(n(9488)),h=i.__importDefault(n(99601));n(43255);class m extends a.default.Component{constructor(e){let t;super(e),this.handleMouseEnter=e=>{this.restoreModeVerticalFromInline();const{onMouseEnter:t}=this.props;t&&t(e)},this.handleTransitionEnd=e=>{const t="width"===e.propertyName&&e.target===e.currentTarget,{className:n}=e.target,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,r="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||r)&&this.restoreModeVerticalFromInline()},this.handleClick=e=>{this.handleOpenChange([]);const{onClick:t}=this.props;t&&t(e)},this.handleOpenChange=e=>{this.setOpenKeys(e);const{onOpenChange:t}=this.props;t&&t(e)},this.renderMenu=()=>{const{prefixCls:e,className:t}=this.props,n=this.getRealMenuMode(),i=this.getOpenMotionProps(n),s=e||"kt-inner-menu",c=(0,r.default)(t,{[`${s}-inline-collapsed`]:this.getInlineCollapsed()}),l=Object.assign({openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:c,mode:n},i);"inline"!==n&&(l.onClick=this.handleClick);return this.getInlineCollapsed()&&(l.openKeys=[]),a.default.createElement(o.default,Object.assign({},this.props,l,{prefixCls:s,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter}))},(0,d.warning)(!("onOpen"in e||"onClose"in e),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,d.warning)(!("inlineCollapsed"in e&&"inline"!==e.mode),"[Menu] `inlineCollapsed` should only be used when `mode` is inline."),"openKeys"in e?t=e.openKeys:"defaultOpenKeys"in e&&(t=e.defaultOpenKeys),this.state={openKeys:t||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:e}}static getDerivedStateFromProps(e,t){const{prevProps:n}=t,i={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(i.switchingModeFromInline=!0),"openKeys"in e?i.openKeys=e.openKeys:(e.inlineCollapsed&&!n.inlineCollapsed&&(i.switchingModeFromInline=!0,i.inlineOpenKeys=t.openKeys,i.openKeys=[]),!e.inlineCollapsed&&n.inlineCollapsed&&(i.openKeys=t.inlineOpenKeys,i.inlineOpenKeys=[])),i}componentWillUnmount(){l.default.cancel(this.mountRafId)}setOpenKeys(e){"openKeys"in this.props||this.setState({openKeys:e})}getRealMenuMode(){const e=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&e)return"inline";const{mode:t}=this.props;return e?"vertical":t}getInlineCollapsed(){const{inlineCollapsed:e}=this.props;return e}getOpenMotionProps(e){const{openTransitionName:t,openAnimation:n,motion:i}=this.props;return i?{motion:i}:n?((0,d.warning)("string"==typeof n,"[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:n}):t?{openTransitionName:t}:"horizontal"===e?{motion:{motionName:"slide-up"}}:"inline"===e?{motion:c.default}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:e}=this.state;e&&this.setState({switchingModeFromInline:!1})}render(){return a.default.createElement(u.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}m.defaultProps={className:"",focusable:!1},(0,s.polyfill)(m);class g extends a.default.Component{render(){return a.default.createElement(m,Object.assign({},this.props))}}t.Menu=g,g.Divider=o.Divider,g.Item=p.default,g.SubMenu=h.default,g.ItemGroup=o.ItemGroup},47047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const i=n(70655).__importDefault(n(66130));function r(e){return(t,n)=>new Promise((r=>{i.default[e](t,n,r)}))}n(26345),t.message={success:r("success"),error:r("error"),info:r("info"),warning:r("warning"),loading:r("loading")}},66130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655),r=i.__importDefault(n(45018)),o=i.__importDefault(n(8064)),a=i.__importDefault(n(54965)),s=i.__importDefault(n(30974)),c=i.__importDefault(n(97059)),l=i.__importDefault(n(32899)),d=i.__importDefault(n(616));let u,p,h,m,g=3,f=1,_="kt-message",b="move-up";const y={info:s.default,success:r.default,error:o.default,warning:a.default,loading:c.default};const v={open:function(e){const t=void 0!==e.duration?e.duration:g,n=e.key||f++,i=new Promise((i=>{const r=()=>("function"==typeof e.onClose&&e.onClose(),i(!0));!function(e){p?e(p):l.default.newInstance({prefixCls:_,transitionName:b,style:{top:u},getContainer:h,maxCount:m},(t=>{p?e(p):(p=t,e(t))}))}((i=>{const o=y[e.type];i.notice({key:n,duration:t,style:{},content:d.default.createElement("div",{className:`${_}-custom-content${e.type?` ${_}-${e.type}`:""}`},e.icon||o&&d.default.createElement(o,null),d.default.createElement("span",null,e.content)),onClose:r})}))})),r=()=>{p&&p.removeNotice(n)};return r.then=(e,t)=>i.then(e,t),r.promise=i,r},config(e){void 0!==e.top&&(u=e.top,p=null),void 0!==e.duration&&(g=e.duration),void 0!==e.prefixCls&&(_=e.prefixCls),void 0!==e.getContainer&&(h=e.getContainer),void 0!==e.transitionName&&(b=e.transitionName,p=null),void 0!==e.maxCount&&(m=e.maxCount,p=null)},destroy(){p&&(p.destroy(),p=null)}};["success","info","warning","error","loading"].forEach((e=>{v[e]=(t,n,i)=>function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(t)?v.open(Object.assign(Object.assign({},t),{type:e})):("function"==typeof n&&(i=n,n=void 0),v.open({content:t,duration:n,type:e,onClose:i}))})),v.warn=v.warning,t.default=v},50295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyFns=void 0;const i=n(70655),r=i.__importDefault(n(81212)),o=i.__importDefault(n(94184)),a=i.__importDefault(n(45697)),s=i.__importDefault(n(12721)),c=i.__importDefault(n(97596)),l=i.__importDefault(n(616)),d=n(71214),u=n(60576);let p;t.destroyFns=[];const h=e=>{p={x:e.pageX,y:e.pageY},setTimeout((()=>p=null),100)};"undefined"!=typeof window&&window.document&&window.document.documentElement&&(0,c.default)(document.documentElement,"click",h);class m extends l.default.Component{constructor(){super(...arguments),this.handleCancel=e=>{const{onCancel:t}=this.props;t&&t(e)},this.handleOk=e=>{const{onOk:t}=this.props;t&&t(e)},this.renderFooter=e=>{const{okText:t,okType:n,cancelText:i,confirmLoading:r}=this.props;return l.default.createElement("div",null,l.default.createElement(d.Button,Object.assign({onClick:this.handleCancel},this.props.cancelButtonProps),i||e.cancelText),l.default.createElement(d.Button,Object.assign({type:n,loading:r,onClick:this.handleOk},this.props.okButtonProps),t||e.okText))},this.renderModal=()=>{const e=this.props,{prefixCls:t,footer:n,visible:a,wrapClassName:c,centered:d,getContainer:h,closeIcon:m}=e,g=i.__rest(e,["prefixCls","footer","visible","wrapClassName","centered","getContainer","closeIcon"]),f=t||"kt-modal",_=this.renderFooter((0,u.getConfirmLocale)()),b=l.default.createElement("span",{className:`${f}-close-x`},m||l.default.createElement(r.default,{className:`${f}-close-icon`}));return l.default.createElement(s.default,Object.assign({},g,{getContainer:h,prefixCls:f,wrapClassName:(0,o.default)({[`${f}-centered`]:!!d},c),footer:void 0===n?_:n,visible:a,mousePosition:p,onClose:this.handleCancel,closeIcon:b}))}}render(){return this.renderModal()}}t.default=m,m.defaultProps={width:520,transitionName:"zoom",maskTransitionName:"fade",confirmLoading:!1,visible:!1,okType:"primary"},m.propTypes={prefixCls:a.default.string,onOk:a.default.func,onCancel:a.default.func,okText:a.default.node,cancelText:a.default.node,centered:a.default.bool,width:a.default.oneOfType([a.default.number,a.default.string]),confirmLoading:a.default.bool,visible:a.default.bool,footer:a.default.node,title:a.default.node,closable:a.default.bool,closeIcon:a.default.node}},60184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const i=n(70655).__importDefault(n(50295));t.Modal=i.default,n(60373)},60576:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConfirmLocale=t.changeConfirmLocale=void 0;const n={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let i=Object.assign({},n);t.changeConfirmLocale=function(e){i=e?Object.assign(Object.assign({},i),e):Object.assign({},n)},t.getConfirmLocale=function(){return i}},41782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.close=t.open=t.notification=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(71214),s=n(24138),c=i.__importDefault(n(8905));n(54306);const l={[s.MessageType.Info]:15e3,[s.MessageType.Warning]:18e3,[s.MessageType.Error]:2e4};c.default.config({placement:"bottomRight"}),t.notification=c.default;const d=new Map;function u(e,n){switch(e){case s.MessageType.Info:t.notification.info(n);break;case s.MessageType.Warning:t.notification.warning(n);break;case s.MessageType.Error:t.notification.error(n);break;default:t.notification.open(n)}}t.open=function(e,t,n=!0,i,p,h,m,g){return new Promise((f=>{const _={key:i,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":t===s.MessageType.Info,"kt-notification-error":t===s.MessageType.Error,"kt-notification-warn":t===s.MessageType.Warning}),duration:void 0!==m?null:l[t]/1e3,onClose:()=>{g&&g(),d.delete(i),f(void 0)},btn:p?p.map(((e,t)=>o.default.createElement(a.Button,{className:(0,r.default)("kt-notification-button"),size:"small",ghost:0===t,onClick:()=>{f(e),c.default.close(i)},key:e},e))):null,message:e,description:h};d.set(i,[t,_]),n||(_.closeIcon=o.default.createElement("span",null)),u(t,_)}))},t.close=function(e){t.notification.close(e)},t.update=function(e,t){const n=d.get(e);u(n[0],Object.assign(Object.assign({},n[1]),{key:e,message:t}))}},8905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655),r=i.__importDefault(n(48935)),o=i.__importDefault(n(22447)),a=i.__importDefault(n(81212)),s=i.__importDefault(n(31802)),c=i.__importDefault(n(24156)),l=i.__importDefault(n(32899)),d=i.__importDefault(n(616)),u={};let p,h,m=4.5,g=24,f=24,_="topRight";function b(e,t=g,n=f){let i;switch(e){case"topLeft":i={left:0,top:t,bottom:"auto"};break;case"topRight":i={right:0,top:t,bottom:"auto"};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n}}return i}const y={success:r.default,info:c.default,error:o.default,warning:s.default};const v={open:function(e){const t=e.prefixCls||"kt-notification",n=`${t}-notice`,i=void 0===e.duration?m:e.duration;let r=null;e.icon?r=d.default.createElement("span",{className:`${n}-icon`},e.icon):e.type&&(r=d.default.createElement(y[e.type]||null,{className:`${n}-icon ${n}-icon-${e.type}`}));const o=!e.description&&r?d.default.createElement("span",{className:`${n}-message-single-line-auto-margin`}):null,{placement:s,top:c,bottom:g,getContainer:f,closeIcon:v}=e;!function({prefixCls:e,placement:t=_,getContainer:n=p,top:i,bottom:r,closeIcon:o=h},s){const c=`${e}-${t}`;if(u[c])return void s(u[c]);const m=d.default.createElement("span",{className:`${e}-close-x`},o||d.default.createElement(a.default,{className:`${e}-close-icon`}));l.default.newInstance({prefixCls:e,className:`${e}-${t}`,style:b(t,i,r),getContainer:n,closeIcon:m},(e=>{u[c]=e,s(e)}))}({prefixCls:t,placement:s,top:c,bottom:g,getContainer:f,closeIcon:v},(t=>{t.notice({content:d.default.createElement("div",{className:r?`${n}-with-icon`:""},r,d.default.createElement("div",{className:`${n}-message`},o,e.message),d.default.createElement("div",{className:`${n}-description`},e.description),e.btn?d.default.createElement("span",{className:`${n}-btn`},e.btn):null),duration:i,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},className:e.className})}))},close(e){Object.keys(u).forEach((t=>u[t].removeNotice(e)))},config:function(e){const{duration:t,placement:n,bottom:i,top:r,getContainer:o,closeIcon:a}=e;void 0!==t&&(m=t),void 0!==n&&(_=n),void 0!==i&&(f=i),void 0!==r&&(g=r),void 0!==o&&(p=o),void 0!==a&&(h=a)},destroy(){Object.keys(u).forEach((e=>{u[e].destroy(),delete u[e]}))}};["success","info","warning","error"].forEach((e=>{v[e]=t=>v.open(Object.assign(Object.assign({},t),{type:e}))})),v.warn=v.warning,t.default=v},77306:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(60184);n(91067);t.Overlay=e=>{var{maskClosable:t=!1,closable:n=!0,className:s,onClose:c,children:l,footer:d,title:u,getContainer:p,keyboard:h}=e,m=i.__rest(e,["maskClosable","closable","className","onClose","children","footer","title","getContainer","keyboard"]);return o.default.createElement(a.Modal,Object.assign({footer:d||null,maskClosable:t,closable:n,onCancel:c,title:u,getContainer:p,className:(0,r.default)("kt-overlay",s),keyboard:h},m),l)}},79237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.PopoverPosition=t.PopoverTriggerType=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616));n(43784);const a=n(71214);var s,c;function l(){}!function(e){e[e.hover=0]="hover",e[e.program=1]="program"}(s=t.PopoverTriggerType||(t.PopoverTriggerType={})),function(e){e.top="top",e.bottom="bottom",e.left="left",e.right="right"}(c=t.PopoverPosition||(t.PopoverPosition={}));t.Popover=e=>{var{delay:t,children:n,trigger:d,display:u,id:p,insertClass:h,popoverClass:m,content:g,position:f=c.top,title:_,titleClassName:b,action:y,onClickAction:v,disable:C}=e,S=i.__rest(e,["delay","children","trigger","display","id","insertClass","popoverClass","content","position","title","titleClassName","action","onClickAction","disable"]);const w=o.default.useRef(null),E=o.default.useRef(null),k=d||s.hover;let x,T;function D(){if(!E.current||!w.current||C)return;const{left:e,top:t,width:n,height:i}=w.current.getBoundingClientRect(),r=E.current.getBoundingClientRect();if(f===c.top){const i=r.right-window.innerWidth>0?window.innerWidth-r.width:e-r.width/2+n/2,o=t-r.height-7;E.current.style.left=(i<0?0:i)+"px",E.current.style.top=(o<0?0:o)+"px",E.current.style.visibility="visible"}else if(f===c.bottom){const o=r.right-window.innerWidth>0?window.innerWidth-r.width:e-r.width/2+n/2,a=t+i+7;E.current.style.left=(o<0?0:o)+"px",E.current.style.top=(a<0?0:a)+"px",E.current.style.visibility="visible"}else if(f===c.left){const n=e-r.width-7,o=t-r.height/2+i/2;E.current.style.left=(n<0?0:n)+"px",E.current.style.top=(o<0?0:o)+"px",E.current.style.visibility="visible"}else if(f===c.right){const o=e+n+7,a=t-r.height/2+i/2;E.current.style.left=(o<0?0:o)+"px",E.current.style.top=(a<0?0:a)+"px",E.current.style.visibility="visible"}}function A(){E.current&&w.current&&!C&&(clearTimeout(x),E.current.style.display="block",window.requestAnimationFrame((()=>{w.current&&E.current&&(D(),window.requestAnimationFrame((()=>{D(),E.current.style.visibility="visible"})))})))}return o.default.useEffect((()=>{if(!E.current)return;const e=document.body.querySelector(`body > #${CSS.escape(p)}`);return e&&document.body.removeChild(e),E.current.style.display="none",document.body.appendChild(E.current),u&&A(),()=>{const e=document.body.querySelector(`body > #${CSS.escape(p)}`);e&&document.body.removeChild(e)}}),[u]),o.default.createElement("div",Object.assign({},Object.assign({},S),{className:(0,r.default)("kt-popover",h),onMouseEnter:function(){k===s.hover&&(t?T=setTimeout((()=>{A()}),t):A())},onMouseLeave:function(){k===s.hover&&(clearTimeout(T),function(){if(!E.current)return;x=setTimeout((()=>{E.current.style.display="none",E.current.style.visibility="hidden"}),t)}())}}),o.default.createElement("div",{className:(0,r.default)(m||"","kt-popover-content",`kt-popover-${f}`),ref:E,id:p},_&&o.default.createElement("p",{className:(0,r.default)("kt-popover-title",b)},_,y&&o.default.createElement(a.Button,{size:"small",type:"link",onClick:v||l},y)),g||""),o.default.createElement("span",{ref:w},n))}},94425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleList=t.RECYCLE_LIST_OVER_SCAN_COUNT=t.RECYCLE_LIST_STABILIZATION_TIME=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=i.__importDefault(n(11728)),s=n(74061),c=n(22878);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;t.RecycleList=({width:e,height:n,maxHeight:l,minHeight:d,className:u,style:p,data:h,onReady:m,onScroll:g,itemHeight:f,header:_,footer:b,template:y,paddingBottomSize:v,getSize:C})=>{const S=(0,o.useRef)(),w=(0,o.useRef)(),E=(0,o.useRef)({}),k=(0,o.useRef)(0),x=(0,o.useRef)();(0,o.useEffect)((()=>{if("function"==typeof m){m({scrollTo:e=>{var t;null===(t=S.current)||void 0===t||t.scrollTo(e)},scrollToIndex:(e,n="start")=>{var i,r;let o=e;if(_&&o++,"number"==typeof f)null===(i=S.current)||void 0===i||i.scrollToItem(o,n);else{x.current&&clearTimeout(x.current);const i=(E.current?Object.keys(E.current):[]).slice(0,o).reduce(((e,t)=>e+T(t)),0);null===(r=S.current)||void 0===r||r.scrollToItem(e,n),x.current=setTimeout((()=>{var t;(E.current?Object.keys(E.current):[]).slice(0,o).reduce(((e,t)=>e+T(t)),0)!==i&&(null===(t=S.current)||void 0===t||t.scrollToItem(e,n)),x.current=null}),t.RECYCLE_LIST_STABILIZATION_TIME)}}})}}),[]);const T=(0,o.useCallback)((e=>C?C(Number(e)):((null==E?void 0:E.current)||[])[e]||f||100),[f,C]),D=(0,o.useCallback)((()=>{if(l){let e=0;for(let t=0;tl?l:e}}),[l,h]),A=(0,o.useCallback)((()=>{if(d)return d}),[d,h]),I=(0,o.useMemo)((()=>{let e=h.length;return _&&e++,b&&e++,e}),[h]),M=({index:e,style:t})=>{let n;if(0===e&&_)return o.default.createElement("div",{style:t},o.default.createElement(_,null));if(e+1===I&&b)return o.default.createElement("div",{style:t},o.default.createElement(b,null));if(n=_?h[e-1]:h[e],!n)return o.default.createElement("div",{style:t});const i={"aria-setsize":I,"aria-posinset":e};return o.default.createElement("div",Object.assign({tabIndex:0,style:t,role:"listitem"},i),o.default.createElement(y,{data:n,index:e}))},R=({index:e,style:t})=>{const n=(0,o.useRef)(null),i=(0,o.useRef)(),r=()=>{if(n.current){let t=0;for(let e=0;e{var n;E.current[e]!==t&&(E.current=Object.assign(Object.assign({},E.current),{[e]:t}),S.current&&(null===(n=S.current)||void 0===n||n.resetAfterIndex(0)))})(e,t)}};let a;return(0,o.useEffect)((()=>{if(n.current&&S.current){i.current=new MutationObserver(((e,t)=>{r()}));const e={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};i.current.observe(n.current,e),r()}return()=>{i.current.disconnect()}}),[n.current]),0===e&&_?o.default.createElement("div",{style:t},o.default.createElement(_,null)):e+1===I&&b?o.default.createElement("div",{style:t},o.default.createElement(b,null)):(a=_?h[e-1]:h[e],a?o.default.createElement("div",{style:t,ref:n},o.default.createElement(y,{data:a,index:e})):o.default.createElement("div",{style:t}))},P=(0,o.useMemo)((()=>h.reduce(((e,t)=>e+T(t)),0)/h.length),[h]),O=(0,o.forwardRef)(((e,t)=>{const n=e,{style:r}=n,a=i.__rest(n,["style"]);return o.default.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+(v||0)}px`})},a))})),N=e=>{k.current=e.scrollOffset,g&&g(e)};return(()=>{const i="number"!=typeof f,l=!e||!n;return(()=>{const d=({width:e,height:n})=>{w.current&&(w.current.scrollTop=k.current);const a=D(),l=A();let d=n;return l?d=Math.min(n,l):a&&(d=a),i?o.default.createElement(s.VariableSizeList,{onScroll:N,width:e,height:d,itemData:[],itemSize:T,itemCount:I,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:S,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},p),className:(0,r.default)(u,"kt-recycle-list"),innerElementType:O,outerElementType:c.ScrollbarsVirtualList,estimatedItemSize:P},R):o.default.createElement(s.FixedSizeList,{onScroll:N,width:e,height:d,itemData:[],itemSize:f,itemCount:I,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:S,outerRef:w,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},p),className:(0,r.default)(u,"recycle-list"),innerElementType:O,outerElementType:c.ScrollbarsVirtualList},M)};return l?o.default.createElement(a.default,null,d):d({width:e,height:n})})()})()}},90580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(94425),t)},42712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.RenderErrorType=void 0;const i=n(70655),r=i.__importDefault(n(43261)),o=i.__importDefault(n(616)),a=n(74061),s=n(89065),c=n(22878),l=n(62932),d=n(34163),u=n(64911),p=n(54171),h=n(71864);!function(e){e[e.RENDER_ITEM=0]="RENDER_ITEM",e[e.GET_RENDED_KEY=1]="GET_RENDED_KEY",e[e.RENDER_ERROR=2]="RENDER_ERROR"}(t.RenderErrorType||(t.RenderErrorType={}));const m=o.default.forwardRef(((e,t)=>{const n=e,{style:r}=n,a=i.__rest(n,["style"]);return o.default.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+g.PADDING_BOTTOM_SIZE}px`})},a))}));class g extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new s.DisposableCollection,this.onErrorEmitter=new s.Emitter,this.onDidUpdateEmitter=new s.Emitter,this.onDidModelChangeEmitter=new s.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new s.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new s.CancellationTokenSource,this.expandNodeCancelToken=new s.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new s.Throttler,this.doBatchUpdate=(()=>{const e=(e,t)=>{if(this.disposables.disposed)return;const{root:n}=this.props.model;let i=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof d.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&n.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const e=n.getIndexAtTreeNodeId(this.promptTargetID);if(e>-1||this.promptHandle.parent===n)if(this.promptHandle.type===h.TreeNodeType.TreeNode){const t=this.promptHandle.parent;i=t?this.getNewPromptInsertIndex(e,t):e+1}else i=e+1;else this.promptTargetID=-1}-1===i&&this.promptHandle&&this.promptHandle.constructor===d.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=i,this.idxToRendererPropsCache.clear(),t.isCancellationRequested?e():this.forceUpdate((()=>{e(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)}))};return()=>{let t;const n=new Promise((e=>t=e));return n.then((()=>{this.onDidUpdateEmitter.fire()})),((t,n)=>{const i=!!this.willUpdateTasks;if(this.willUpdateTasks=0,i){this.updateCancelToken.cancel(),this.updateCancelToken=new s.CancellationTokenSource;const t=this.updateCancelToken.token;requestAnimationFrame((()=>{t.isCancellationRequested?n():e(n,t)}))}else n.resolve()})(n,t),n}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=e=>this.promptNew(e),this.promptNewCompositeTreeNode=e=>this.promptNew(e,h.TreeNodeType.CompositeTreeNode),this.promptRename=async(e,t)=>{var n,i;const{root:r}=this.props.model,o="string"==typeof e?await r.getTreeNodeByPath(e):e;if(!u.TreeNode.is(o)||u.CompositeTreeNode.isRoot(o))throw new TypeError("Cannot rename object of type "+typeof o);const a=new l.RenamePromptHandle(t||o.name,o);return this.promptHandle=a,this.promptTargetID=o.id,r.isItemVisibleAtSurface(o)?await this.batchUpdate():await o.parent.setExpanded(!0),null===(i=null===(n=this.listRef)||void 0===n?void 0:n.current)||void 0===i||i.scrollToItem(r.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async e=>{const{root:t}=this.props.model,n="string"==typeof e?t.getTreeNodeByPath(e):e;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new s.CancellationTokenSource),n&&u.CompositeTreeNode.is(n)&&!n.disposed)return n.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async e=>{const{root:t}=this.props.model,n="string"==typeof e?t.getTreeNodeByPath(e):e;if(n&&u.CompositeTreeNode.is(n)&&!n.disposed)return this.expandNodeCancelToken.cancel(),n.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(e,t="smart",n=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:i}=this.props.model,r="string"==typeof e?i.getTreeNodeByPath(e)||await i.loadTreeNodeByPath(e):e;if(r&&!i.isItemVisibleAtSurface(r)&&await i.loadTreeNodeByPath(r.path),u.TreeNode.is(r)&&!u.CompositeTreeNode.isRoot(r))return n?this.tryScrollIntoViewWhileStable(r,t):this.tryScrollIntoView(r,t),this._isEnsuring=!1,r;this._isEnsuring=!1},this.getItemAtIndex=e=>{const{filter:t}=this.props;if(t&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[e]);let n=this.idxToRendererPropsCache.get(e);if(!n){const t=this.newPromptInsertionIndex,{root:i}=this.props.model;if(t>-1&&this.promptHandle&&this.promptHandle.constructor===d.NewPromptHandle&&!this.promptHandle.destroyed)if(e===t)n={itemType:h.TreeNodeType.NewPrompt,item:this.promptHandle};else{const r=i.getTreeNodeAtIndex(e-(e>=t?1:0));n={itemType:u.CompositeTreeNode.is(r)?h.TreeNodeType.CompositeTreeNode:h.TreeNodeType.TreeNode,item:r}}else{const t=i.getTreeNodeAtIndex(e);n=t&&t.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===l.RenamePromptHandle&&!this.promptHandle.destroyed?{itemType:h.TreeNodeType.RenamePrompt,item:this.promptHandle}:{itemType:u.CompositeTreeNode.is(t)?h.TreeNodeType.CompositeTreeNode:h.TreeNodeType.TreeNode,item:t}}this.idxToRendererPropsCache.set(e,n)}return n},this.handleListScroll=({scrollOffset:e})=>{const{model:t,height:n,itemHeight:i}=this.props;if(t.state.saveScrollOffset(e),!this.promptHandle||!i)return;let r;r=this.promptHandle instanceof d.NewPromptHandle&&this.newPromptInsertionIndex>-1?this.newPromptInsertionIndex:t.root.getIndexAtTreeNodeId(this.promptHandle.id),(e+n{const t=this.getItemAtIndex(e),{getItemKey:n}=this.props,i=n?n(t):void 0;return null!=i?i:e},this.filterItems=e=>{const{model:{root:t},filterProvider:n}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!e)return;const i=/\//.test(e),a=new Set,c=new Map,l=[];for(let e=0;e{if(t&&t.path.indexOf(e)>-1){a.add(t.id);let e=t.parent;for(;e&&!u.CompositeTreeNode.isRoot(e);)a.add(e.id),e=e.parent}}));else{let t=[];t=n?r.default.filter(e,l,n.fuzzyOptions()):r.default.filter(e,l,g.FILTER_FUZZY_OPTIONS),t.forEach((e=>{const t=e.original;a.add(t.id);let n=t.parent;for(c.set(t.id,(()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:e.string||""}})));n&&!u.CompositeTreeNode.isRoot(n);)a.add(n.id),n=n.parent}))}this.filterFlattenBranch=new Array(a.size);for(let e=0,n=0;n{const i=this.filterFlattenBranch.indexOf(e.id);if(n){const t=this.filterFlattenBranchChildrenCache.get(e.id);t&&t.length>0&&(this.filterFlattenBranch=(0,u.spliceArray)(this.filterFlattenBranch,i+1,0,t),this.filterFlattenBranchChildrenCache.delete(e.id))}else{const n=[];for(let r=i+1;re.depth))break;n.push(i.id)}this.filterFlattenBranchChildrenCache.set(e.id,n),this.filterFlattenBranch=(0,u.spliceArray)(this.filterFlattenBranch,i+1,n.length)}}))),this.filterWatcherDisposeCollection.push(s.Disposable.create((()=>{this.filterFlattenBranchChildrenCache.clear()})))},this.renderItem=({index:e,style:t})=>{var n,i,r,s,c,l,d;this.shouldComponentUpdate=a.shouldComponentUpdate.bind(this);const{children:h,overflow:m="ellipsis",supportDynamicHeights:f}=this.props,_=this.getItemAtIndex(e),b=o.default.useRef(null);if(!_)return o.default.createElement(o.default.Fragment,null);const{item:y,itemType:v,template:C}=_;if(!y)return o.default.createElement("div",{style:t});let S;u.CompositeTreeNode.is(y)?S={"aria-label":null===(n=y.accessibilityInformation)||void 0===n?void 0:n.label,"aria-expanded":y.expanded,"aria-level":y.depth,"aria-setsize":null===(r=null===(i=y.parent)||void 0===i?void 0:i.children)||void 0===r?void 0:r.length,"aria-posinset":e}:u.TreeNode.is(y)&&(S={"aria-label":null===(s=y.accessibilityInformation)||void 0===s?void 0:s.label,"aria-level":y.depth,"aria-setsize":null===(l=null===(c=y.parent)||void 0===c?void 0:c.children)||void 0===l?void 0:l.length,"aria-posinset":e});const w="ellipsis"===m?t:Object.assign(Object.assign({},t),{width:"auto",minWidth:"100%",height:`${(()=>{if(!f)return g.DEFAULT_ITEM_HEIGHT;let t=0;if(b.current){const e=b.current;t=Array.from(e.children).reduce(((e,t)=>e+t.getBoundingClientRect().height),0)}return t&&this.dynamicSizeMap.set(e,t),Math.max(t,g.DEFAULT_ITEM_HEIGHT)})()}px`});return o.default.createElement("div",Object.assign({ref:b,style:w,role:(null===(d=y.accessibilityInformation)||void 0===d?void 0:d.role)||"treeiem"},S),o.default.createElement(p.NodeRendererWrap,{item:y,depth:y.depth,itemType:v,template:C,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:u.CompositeTreeNode.is(y)?y.expanded:void 0},h))},this.layoutItem=()=>{var e,t,n;if(this.props.supportDynamicHeights&&this.listRef&&(null===(e=this.listRef)||void 0===e?void 0:e.current)&&"_getRangeToRender"in(null===(t=this.listRef)||void 0===t?void 0:t.current)){const e=null===(n=this.listRef)||void 0===n?void 0:n.current._getRangeToRender();if(e){const t=e[0],n=e[1];Array.from({length:n-t}).forEach(((e,n)=>{var i;(null===(i=this.listRef)||void 0===i?void 0:i.current).resetAfterIndex(t+n)}))}}}}getNewPromptInsertIndex(e,t){const{root:n}=this.props.model;let i=e+1;for(;i-e<=t.branchSize;i++){const e=n.getTreeNodeAtIndex(i);if(!e)return i;if(!u.CompositeTreeNode.is(e)&&!((null==e?void 0:e.depth)>t.depth+1))return i}return i}UNSAFE_componentWillUpdate(e){this.props.filter!==e.filter&&this.filterItems(e.filter),this.props.model!==e.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(e){var t,n;if(this.props.model!==e.model){this.disposables.dispose();const{model:i}=this.props;null===(n=null===(t=this.listRef)||void 0===t?void 0:t.current)||void 0===n||n.scrollTo(i.state.scrollOffset),this.disposables.push(i.onChange(this.batchUpdate.bind(this))),this.disposables.push(i.state.onDidLoadState((()=>{var e,t;null===(t=null===(e=this.listRef)||void 0===e?void 0:e.current)||void 0===t||t.scrollTo(i.state.scrollOffset)}))),this.onDidModelChangeEmitter.fire({preModel:e.model,nextModel:i})}}async promptNew(e,t=h.TreeNodeType.TreeNode){var n,i;const{root:r}=this.props.model;let o="string"==typeof e?await r.getTreeNodeByPath(e):e;if(t!==h.TreeNodeType.TreeNode&&t!==h.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${t}`);if(o&&!u.CompositeTreeNode.is(o)&&(o=o.parent,!u.CompositeTreeNode.is(o)))throw new TypeError("Cannot create new prompt at object of type "+typeof o);if(!o)throw new Error(`Cannot find node at ${e}`);const a=new d.NewPromptHandle(t,o);return this.promptHandle=a,this.promptTargetID=o.id,o===r||o.expanded&&r.isItemVisibleAtSurface(o)?await this.batchUpdate():await o.setExpanded(!0),this.newPromptInsertionIndex>=0?null===(i=null===(n=this.listRef)||void 0===n?void 0:n.current)||void 0===i||i.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(e,t="auto"){var n,i,r,o;const{root:a}=this.props.model;e.constructor!==d.NewPromptHandle||e.destroyed?a.isItemVisibleAtSurface(e)&&(null===(o=null===(r=this.listRef)||void 0===r?void 0:r.current)||void 0===o||o.scrollToItem(a.getIndexAtTreeNode(e),t)):null===(i=null===(n=this.listRef)||void 0===n?void 0:n.current)||void 0===i||i.scrollToItem(this.newPromptInsertionIndex)}tryScrollIntoViewWhileStable(e,t="smart"){const{root:n}=this.props.model;this.tryEnsureVisibleTimes>g.TRY_ENSURE_VISIBLE_MAX_TIMES?this.tryEnsureVisibleTimes=0:s.Event.once(this.props.model.onChange)((async()=>{var i,r,o,a;await this.queueUpdatePromise,e.constructor!==d.NewPromptHandle||e.destroyed?n.isItemVisibleAtSurface(e)?(null===(a=null===(o=this.listRef)||void 0===o?void 0:o.current)||void 0===a||a.scrollToItem(n.getIndexAtTreeNode(e),t),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(e,t)):null===(r=null===(i=this.listRef)||void 0===i?void 0:i.current)||void 0===r||r.scrollToItem(this.newPromptInsertionIndex)}))}componentDidMount(){var e,t;const{model:n,onReady:i}=this.props;if(null===(t=null===(e=this.listRef)||void 0===e?void 0:e.current)||void 0===t||t.scrollTo(n.state.scrollOffset),this.disposables.push(n.onChange(this.batchUpdate.bind(this))),this.disposables.push(n.state.onDidLoadState((()=>{var e,t;null===(t=null===(e=this.listRef)||void 0===e?void 0:e.current)||void 0===t||t.scrollTo(n.state.scrollOffset)}))),"function"==typeof i){i({promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:s.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event})}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(e){this._promptHandle!==e&&(this._promptHandle instanceof l.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),e.onDestroy(this.batchUpdate),this._promptHandle=e)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:e}=this.props.model,{filter:t}=this.props;return t?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===d.NewPromptHandle&&!this.promptHandle.destroyed?e.branchSize+1:e.branchSize}getItemSize(e){return this.dynamicSizeMap.get(e)||this.props.itemHeight}render(){const{children:e,itemHeight:t,width:n="100%",height:i,style:r,className:s,placeholder:l,overScanCount:d,leaveBottomBlank:u,supportDynamicHeights:p}=this.props;if(l&&0===this.adjustedRowCount){const e=l;return o.default.createElement(e,null)}const h={children:e,height:i,width:n,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:d||g.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:Object.assign({transform:"translate3d(0px, 0px, 0px)"},r),className:s,outerElementType:c.ScrollbarsVirtualList};return u&&(h.innerElementType=m),p?o.default.createElement(a.VariableSizeList,Object.assign({ref:this.listRef,itemSize:this.getItemSize.bind(this)},h),this.renderItem):o.default.createElement(a.FixedSizeList,Object.assign({ref:this.listRef,itemSize:t},h),this.renderItem)}}t.RecycleTree=g,g.PADDING_BOTTOM_SIZE=22,g.DEFAULT_ITEM_HEIGHT=22,g.TRY_ENSURE_VISIBLE_MAX_TIMES=5,g.FILTER_FUZZY_OPTIONS={pre:"",post:"",extract:e=>(null==e?void 0:e.name)||""},g.DEFAULT_OVER_SCAN_COUNT=50},54171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRendererWrap=void 0;const i=n(70655).__importDefault(n(616));class r extends i.default.Component{render(){const{item:e,itemType:t,children:n,template:r,hasPrompt:o}=this.props;return i.default.createElement(n,{item:e,itemType:t,template:r,hasPrompt:o,key:e.id})}shouldComponentUpdate(e){return!0}}t.NodeRendererWrap=r},15269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicRecycleTree=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=i.__importDefault(n(64644)),s=n(24232),c=n(42712),l=n(91657),d=n(86874),u=n(63178),p=n(90476),h=n(68555);n(24098),n(65045),i.__exportStar(n(29053),t);t.BasicRecycleTree=({width:e,height:t,itemHeight:n=22,itemClassname:i,indent:m,containerClassname:g,onClick:f,onContextMenu:_,onTwistierClick:b,onDbClick:y,resolveChildren:v,sortComparator:C,treeData:S,inlineMenus:w,inlineMenuActuator:E,onReady:k,contextMenus:x,contextMenuActuator:T})=>{const[D,A]=(0,o.useState)({show:!1}),[I,M]=(0,o.useState)([]),[R,P]=(0,o.useState)(),O=(0,o.useRef)(new h.BasicTreeService(S,v,C)),N=(0,o.useRef)(),L=o.default.createRef(),F=(0,o.useCallback)((e=>o.default.createElement(u.BasicTreeNodeRenderer,{item:e.item,itemType:e.itemType,itemHeight:n,indent:m,className:i,inlineMenus:w,inlineMenuActuator:E,onClick:z,onDbClick:U,onContextMenu:W,onTwistierClick:H,decorations:O.current.decorations.getDecorations(e.item)})),[]);(0,o.useEffect)((()=>{var e;B();const t=O.current.onDidUpdateTreeModel((async e=>{await(null==e?void 0:e.root.ensureLoaded()),P(e)})),n=()=>{var e;null===(e=O.current)||void 0===e||e.enactiveFocusedDecoration()};return null===(e=L.current)||void 0===e||e.addEventListener("blur",n,!0),()=>{var e,i;null===(e=L.current)||void 0===e||e.removeEventListener("blur",n,!0),t.dispose(),null===(i=O.current)||void 0===i||i.dispose()}}),[]);const B=async()=>{const e=O.current.model;e&&await e.root.ensureLoaded(),P(e)},j=(0,o.useCallback)((e=>{k&&k(e),N.current=e}),[]),z=(0,o.useCallback)(((e,t)=>{var n;null===(n=O.current)||void 0===n||n.activeFocusedDecoration(t),f&&f(e,t),p.BasicCompositeTreeNode.is(t)&&V(t)}),[f]),U=(0,o.useCallback)(((e,t)=>{y&&y(e,t)}),[y]),W=(0,o.useCallback)(((e,t)=>{var n,i;if(t?null===(n=O.current)||void 0===n||n.activeContextMenuDecoration(t):null===(i=O.current)||void 0===i||i.enactiveFocusedDecoration(),_)_(e,t);else{let n=[];Array.isArray(x)?n=x:"function"==typeof x&&(n=x(t));const i=new Set,r={};for(const e of n)i.add(e.group||"-1"),r[e.group||"-1"]||(r[e.group||"-1"]=[]),r[e.group||"-1"].push(e);const o=Array.from(i).sort(((e,t)=>e.localeCompare(t,"kn",{numeric:!0})));let a=[];for(const e of o)a=a.concat(r[e].map((e=>({id:e.id,label:e.title,group:e.group})))),a=a.concat([{id:`${e}_divider`,label:"",type:"divider"}]);a.pop(),JSON.stringify(a)!==JSON.stringify(I)&&M(a);const{x:s,y:c}=e.nativeEvent;A({show:!0,point:{pageX:s,pageY:c},activeNode:t})}}),[y]),V=(0,o.useCallback)((e=>{var t,n;e.expanded?null===(t=N.current)||void 0===t||t.collapseNode(e):null===(n=N.current)||void 0===n||n.expandNode(e)}),[]),H=(0,o.useCallback)(((e,t)=>{p.BasicCompositeTreeNode.is(t)&&V(t),b&&b(e,t)}),[b]),K=(0,o.useCallback)((()=>{var e;null===(e=O.current)||void 0===e||e.enactiveFocusedDecoration()}),[]),$=(0,o.useCallback)(((e,t)=>{_&&_(e)}),[]),G=(0,o.useCallback)((()=>{A(Object.assign(Object.assign({},D),{show:!1}))}),[D]),q=(0,o.useCallback)((()=>x?o.default.createElement(a.default,{popupPlacement:"bottomLeft",popupVisible:D.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:D.point||{},builtinPlacements:d.placements,popup:o.default.createElement(s.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:G},I.map((({id:e,label:t,type:n})=>o.default.createElement(l.BasicMenuItem,{key:e,id:e,label:t,type:n,focusMode:D.show,onClick:e=>{T&&T(D.activeNode,e),A({show:!1})}})))),alignPoint:!0}):null),[I,T,D]);return o.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:L,onClick:K,onContextMenu:$},q(),R?o.default.createElement(c.RecycleTree,{height:t,width:e,itemHeight:n,model:R,onReady:j,className:(0,r.default)(g)},F):null)}},91657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicMenuItem=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616));t.BasicMenuItem=({id:e,label:t,type:n,focusMode:i,onClick:a})=>{const[s,c]=o.default.useState(!1),l=o.default.useCallback((()=>{c(!!i||(e=>!e)),a(e)}),[e]),d=o.default.useCallback((()=>{}),[e,i]);return"divider"===n?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,r.default)("basic_menu_item",{"menu-open":s}),onMouseOver:d,onClick:l},t)}},86874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;t.placements={bottomLeft:{points:["tl","bl"],overflow:{adjustX:1,adjustY:1},offset:[0,4],targetOffset:[0,0]}}},90476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNode=t.BasicCompositeTreeNode=t.BasicTreeRoot=void 0;const i=n(64911);class r extends i.CompositeTreeNode{constructor(e,t,n){super(e,t),this._raw=n}get name(){return`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends i.CompositeTreeNode{constructor(e,t,n,i){super(e,t,void 0,{}),this.isExpanded=n.expanded||!1,this.id=i||this.id,this.name=String(this.id),this._displayName=n.label,this._raw=n}get displayName(){return this._displayName}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}t.BasicCompositeTreeNode=o;class a extends i.TreeNode{constructor(e,t,n,i){super(e,t,void 0,{}),this.id=i||this.id,this.name=String(this.id),this._displayName=n.label,this._raw=n}get displayName(){return this._displayName}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get raw(){return this._raw}}t.BasicTreeNode=a},63178:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNodeRenderer=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=n(71214),s=n(23237),c=n(38886),l=n(90476),d=n(29053);n(24098);t.BasicTreeNodeRenderer=({item:e,className:t,itemHeight:n=22,indent:i=8,onClick:u,onDbClick:p,onTwistierClick:h,onContextMenu:m,decorations:g,inlineMenus:f=[],inlineMenuActuator:_=(()=>{})})=>{const b=(0,o.useCallback)((t=>{u&&(t.stopPropagation(),u(t,e))}),[u]),y=(0,o.useCallback)((t=>{p&&(t.stopPropagation(),p(t,e))}),[p]),v=(0,o.useCallback)((t=>{m&&(t.stopPropagation(),t.preventDefault(),m(t,e))}),[m]),C=(0,o.useCallback)((t=>{t.stopPropagation(),h?h(t,e):u&&u(t,e)}),[u,h]),S=8+(e.depth||0)*(i||0)+(l.BasicCompositeTreeNode.is(e)?0:20)+"px",w={height:n,lineHeight:`${n}px`,paddingLeft:S},E=(0,o.useCallback)((e=>o.default.createElement(s.Icon,{icon:e.icon,className:(0,r.default)("icon",e.iconClassName),style:{maxHeight:n}})),[]),k=(0,o.useCallback)((e=>e.displayName.replace(/\n/g,"鈫�")),[]),x=(0,o.useCallback)((e=>o.default.createElement("div",{className:(0,r.default)("segment","display_name")},k(e))),[]),T=(0,o.useCallback)((e=>e.description?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},e.description):null),[]),D=(0,o.useCallback)((e=>Array.isArray(f)?f:"function"==typeof f?f(e):void 0),[f]);return o.default.createElement("div",{key:e.id,onClick:b,onDoubleClick:y,onContextMenu:v,className:(0,r.default)("tree_node",t,g?g.classlist:null),style:w,"data-id":e.id},o.default.createElement("div",{className:"content"},(e=>{return e.expandable?l.BasicCompositeTreeNode.is(e)?(t=e,n=C,g&&(null==g?void 0:g.classlist.indexOf(d.DECORATIONS.LOADING))>-1?o.default.createElement(c.Loading,null):o.default.createElement(s.Icon,{className:(0,r.default)("segment","expansion_toggle",{mod_collapsed:!t.expanded}),onClick:n,icon:"arrow-right"})):void 0:o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle")});var t,n})(e),E(e),o.default.createElement("div",{className:"overflow_wrap"},x(e),T(e)),(()=>{var t;const n=l.BasicCompositeTreeNode.is(e),i=null===(t=D(e))||void 0===t?void 0:t.filter((e=>n?e.position===d.IBasicInlineMenuPosition.TREE_CONTAINER:e.position===d.IBasicInlineMenuPosition.TREE_NODE));if(!(null==i?void 0:i.length))return null;const s=(0,o.useCallback)(((t,n)=>{t.stopPropagation(),_(e,n)}),[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},i.map((t=>o.default.createElement(a.Button,{style:{marginRight:"5px"},type:"icon",key:`${e.id}-${t.icon}`,icon:t.icon,title:t.title,onClick:e=>s(e,t)}))))})()))}},68555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeModel=t.BasicTreeService=void 0;const i=n(89065),r=n(64911),o=n(71864),a=n(90476),s=n(29053);class c extends r.Tree{constructor(e,t,n){super(),this._treeData=e,this._resolveChildren=t,this._sortComparator=n,this.selectedDecoration=new r.Decoration(s.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(s.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(s.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(s.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new i.DisposableCollection,this.onDidUpdateTreeModelEmitter=new i.Emitter,this.sortComparator=(e,t)=>this._sortComparator?this._sortComparator(e.raw,t.raw):super.sortComparator(e,t),this.activeFocusedDecoration=e=>{var t;this._contextMenuNode&&(this.contextMenuDecoration.removeTarget(this._contextMenuNode),this.focusedDecoration.removeTarget(this._contextMenuNode),this.selectedDecoration.removeTarget(this._contextMenuNode),this._contextMenuNode=void 0),e&&(this.selectedNodes.length>0&&this.selectedNodes.forEach((e=>{for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e)})),this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],null===(t=this.model)||void 0===t||t.dispatchChange())},this.activeContextMenuDecoration=e=>{var t;this._contextMenuNode&&this.contextMenuDecoration.removeTarget(this._contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(e),this._contextMenuNode=e,null===(t=this.model)||void 0===t||t.dispatchChange()},this.enactiveFocusedDecoration=()=>{var e;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0,null===(e=this.model)||void 0===e||e.dispatchChange())},this._root=new a.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""}),this._model=new l,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model),this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(e){this._decorations=new r.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.disposableCollection.push(e.watcher.on(o.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.disposableCollection.push(e.watcher.on(o.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.disposableCollection.push(this._decorations)}async resolveChildren(e){return this._resolveChildren?this.transformTreeNode(e,this._resolveChildren(null==e?void 0:e.raw)||[]):this.transformTreeNode(e,(null==e?void 0:e.raw.children)||[])}transformTreeNode(e,t){if(!t)return[];const n=[];for(const i of t)i.children?n.push(new a.BasicCompositeTreeNode(this,e,i)):n.push(new a.BasicTreeNode(this,e,i));return n}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}dispose(){this.disposableCollection.dispose()}}t.BasicTreeService=c;class l extends r.TreeModel{}t.BasicTreeModel=l},29053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DECORATIONS=t.IBasicInlineMenuPosition=void 0,function(e){e[e.TREE_NODE=1]="TREE_NODE",e[e.TREE_CONTAINER=2]="TREE_CONTAINER"}(t.IBasicInlineMenuPosition||(t.IBasicInlineMenuPosition={})),t.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},12941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const i=n(70655).__importDefault(n(616)),r=n(71864);t.RecycleTreeAdaptiveDecorator=e=>t=>{const{model:n,itemHeight:o,onReady:a}=t,s=i.default.useRef(),c=i.default.useRef(!1),[l,d]=i.default.useState(0),u=()=>{d(n.root.branchSize*o)};return i.default.useEffect((()=>{s.current=n,s.current.root&&(d(s.current.root.branchSize*o),s.current.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,u))}),[n]),i.default.useEffect((()=>{setTimeout((()=>{c.current=!0}),100)}),[l]),i.default.createElement(i.default.Fragment,null,i.default.createElement(e,Object.assign(Object.assign({},t),{height:l,onReady:e=>{a&&a(Object.assign(Object.assign({},e),{promptNewTreeNode:async t=>{var n;const i=await e.promptNewTreeNode(t);return(null===(n=s.current)||void 0===n?void 0:n.root.branchSize)?d(s.current.root.branchSize*o+o):d(o),c.current=!1,i.onDestroy((()=>{var e;(null===(e=s.current)||void 0===e?void 0:e.root.branchSize)&&d(s.current.root.branchSize*o)})),i.onCancel((()=>{s.current&&d(s.current.root.branchSize*o)})),i.onBlur((()=>c.current)),i},promptNewCompositeTreeNode:async t=>{var n;const i=await e.promptNewCompositeTreeNode(t);return(null===(n=s.current)||void 0===n?void 0:n.root.branchSize)?d(s.current.root.branchSize*o+o):d(o),i.onDestroy((()=>{var e;(null===(e=s.current)||void 0===e?void 0:e.root.branchSize)&&d(s.current.root.branchSize*o)})),i.onCancel((()=>{var e;(null===(e=s.current)||void 0===e?void 0:e.root.branchSize)&&d(s.current.root.branchSize*o)})),i.onBlur((()=>c.current)),i}}))}})))}},34875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeFilterDecorator=void 0;const i=n(70655),r=i.__importDefault(n(23493)),o=i.__importDefault(n(616)),a=n(23237),s=n(34492),c=n(21372);n(13396);const l=e=>{const{localize:t}=o.default.useContext(c.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(s.Input,Object.assign({hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small"},e,{placeholder:e.placeholder||t("tree.filter.placeholder"),addonBefore:o.default.createElement(a.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})})))};t.RecycleTreeFilterDecorator=e=>t=>{const[n,a]=o.default.useState(""),[s,c]=o.default.useState(""),{beforeFilterValueChange:d,filterEnabled:u,height:p,filterPlaceholder:h,filterAfterClear:m,onReady:g,filterAutoFocus:f}=t,_=i.__rest(t,["beforeFilterValueChange","filterEnabled","height","filterPlaceholder","filterAfterClear","onReady","filterAutoFocus"]),b=(0,r.default)((async e=>{d&&await d(e),c(e)}),500);return o.default.createElement(o.default.Fragment,null,u&&o.default.createElement(l,{afterClear:m,placeholder:h,value:n,autoFocus:f,onValueChange:e=>{a(e),b(e)}}),o.default.createElement(e,Object.assign(Object.assign({},_),{height:p-(u?30:0),onReady:e=>{g&&g(Object.assign(Object.assign({},e),{clearFilter:()=>{c(""),a("")}}))},filter:s})))}},58155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(34875),t),i.__exportStar(n(12941),t)},42295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(42712),t),i.__exportStar(n(54171),t),i.__exportStar(n(62932),t),i.__exportStar(n(64911),t),i.__exportStar(n(71864),t),i.__exportStar(n(58155),t),i.__exportStar(n(15269),t)},34163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewPromptHandle=void 0;const i=n(64911),r=n(90678);class o extends r.PromptHandle{constructor(e,t){super(),this.type=e,this.parent=t,this._id=i.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},90678:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromptHandle=t.VALIDATE_CLASS_NAME=t.PROMPT_VALIDATE_TYPE=void 0;const i=n(89065),r=n(34492);var o,a;!function(e){e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING"}(o=t.PROMPT_VALIDATE_TYPE||(t.PROMPT_VALIDATE_TYPE={})),function(e){e.INFO="validate-error",e.ERROR="validate-error",e.WARNING="validate-warning"}(a=t.VALIDATE_CLASS_NAME||(t.VALIDATE_CLASS_NAME={}));t.PromptHandle=class{constructor(){this.disposables=new i.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this.onChangeEmitter=new i.Emitter,this.onCommitEmitter=new i.Emitter,this.onCancelEmitter=new i.Emitter,this.onFocusEmitter=new i.Emitter,this.onBlurEmitter=new i.Emitter,this.onDestroyEmitter=new i.Emitter,this.handleClick=e=>{e.stopPropagation()},this.handleKeyup=e=>{this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async e=>{if("Escape"===e.key){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some((e=>!1===e.result||!!e.err)))return;this.destroy()}if("Enter"===e.key){this.isInPendingCommitState=!0,this.$.disabled=!0;if((await this.onCommitEmitter.fireAndAwait(this.$.value)).some((e=>!1===e.result||!!e.err)))return this.isInPendingCommitState=!1,this.$.disabled=!1,void this.$.focus();this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async e=>{var t;if(await(t=0,new Promise((e=>setTimeout(e,t)))),!this.$.isConnected&&!this.destroyed)return;(await this.onBlurEmitter.fireAndAwait(this.$.value)).some((e=>!1===e.result||!!e.err))||this.isInPendingCommitState||this.destroy()},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,r.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: calc(100% - 1px);"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(e,t){this.$.setSelectionRange(e,t)}addClassName(e){this.$.classList.add(e)}removeClassName(e){this.$.classList.remove(e)}addAddonAfter(e){var t,n;this._hasAddonAfter||this._destroyed||(null===(n=null===(t=this.$.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n||n.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const i=document.createElement("div");i.setAttribute("class",e),this.$addonAfter.appendChild(i)}removeAddonAfter(){var e,t,n;this._hasAddonAfter&&(null===(e=this.$addonAfter.firstChild)||void 0===e||e.remove(),null===(n=null===(t=this.$.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n||n.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(e){var t,n,i,r,s,c,l;this._hasValidateElement||this._destroyed||(null===(i=null===(n=null===(t=this.$.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.appendChild(this.$validate),this._hasValidateElement=!0);let d="validate-message popup ";e&&e.type===o.ERROR?this._validateClassName=a.ERROR:e&&e.type===o.WARNING?this._validateClassName=a.WARNING:this._validateClassName=a.INFO,d+=this._validateClassName,this.$validate.classList.value=d,this.$validate.innerText=e.message||"",null===(s=null===(r=this.$.parentElement)||void 0===r?void 0:r.parentElement)||void 0===s||s.classList.remove(a.INFO,a.ERROR,a.WARNING),null===(l=null===(c=this.$.parentElement)||void 0===c?void 0:c.parentElement)||void 0===l||l.classList.add(this._validateClassName)}removeValidateMessage(){var e,t,n,i,r;this._hasValidateElement&&(null===(n=null===(t=null===(e=this.$.parentElement)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n||n.removeChild(this.$validate),this._hasValidateElement=!1,null===(r=null===(i=this.$.parentElement)||void 0===i?void 0:i.parentElement)||void 0===r||r.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const e=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame((()=>{null==e||e.focus()}))}focusPrevActiveElement(){let e=this.$.parentElement;for(;e&&void 0===e.attributes.tabindex;)e=null==e?void 0:e.parentElement;return e}}},10481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const i=n(90678);class r extends i.PromptHandle{constructor(e,t){super(),this.originalFileName=e,this.target=t,this.$.value=e,this.setSelectionRange(0,e.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},62932:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(90678),t),i.__exportStar(n(10481),t),i.__exportStar(n(34163),t)},35718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;const i=n(89065),r=n(63898);t.Tree=class{constructor(){this.onChangedEmitter=new i.Emitter,this.onNodeRefreshedEmitter=new i.Emitter,this.toDispose=new i.DisposableCollection,this.nodes={}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}dispose(){this.toDispose.dispose()}get root(){return this._root}set root(e){this._root=e,this.root&&this.root.ensureLoaded()}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(e,t){return e.constructor===t.constructor?e.name>t.name?1:e.name{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=t.spliceArray=void 0;const i=n(89065),r=n(71864),{Path:o}=i.path;function a(e,t,n=0,i){const r=e.slice(0);return r.splice(t,n,...i||[]),r}t.spliceArray=a,function(e){e[e.EXPANDED=1]="EXPANDED",e[e.SHRINKED=2]="SHRINKED"}(t.BranchOperatorStatus||(t.BranchOperatorStatus={}));class s{constructor(e,t,n,i){this._uid=s.nextId(),this._parent=t,this._tree=e,this._disposed=!1,this._visible=!0,this._metadata=Object.assign({},i||{}),this._depth=t?t.depth+1:0,n?this._watcher=n:t&&(this._watcher=t.watcher)}static is(e){return!!e&&"depth"in e&&"name"in e&&"path"in e&&"id"in e}static getTreeNodeById(e){return s.idToTreeNode.get(e)}static getTreeNodeByPath(e){return s.pathToTreeNode.get(e)}static setTreeNode(e,t,n){s.idToTreeNode.set(e,n),s.pathToTreeNode.set(t,n)}static removeTreeNode(e,t){s.idToTreeNode.delete(e),s.pathToTreeNode.delete(t)}static getIdByPath(e){return s.pathToId.get(e)}static setIdByPath(e,t){return s.pathToId.set(e,t)}static getGlobalTreeState(e){const t=e.split(o.separator).slice(0,2).join(o.separator);let n=s.pathToGlobalTreeState.get(t);return n||(n={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new i.CancellationTokenSource,loadPathCancelToken:new i.CancellationTokenSource}),n}static setGlobalTreeState(e,t){const n=e.split(o.separator).slice(0,2).join(o.separator);let r=s.pathToGlobalTreeState.get(n);return r||(r={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new i.CancellationTokenSource,loadPathCancelToken:new i.CancellationTokenSource}),r=Object.assign(Object.assign({},r),t),s.pathToGlobalTreeState.set(n,r),r}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(e){this._parent=e}get type(){return r.TreeNodeType.TreeNode}get id(){return this._uid}set id(e){this._uid=e}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}set name(e){this.addMetadata("name",e)}get path(){return this.parent?new o(this.parent.path).join(this.name).toString():new o(`${o.separator}${this.name}`).toString()}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(e){return"name"!==e||this._metadata[e]||(this._metadata[e]=String(s.nextId())),this._metadata[e]}addMetadata(e,t){if(e in this._metadata){const n=this._metadata[e];this._metadata[e]=t,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:e,prevValue:n,value:t})}else this._metadata[e]=t,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:e,prevValue:void 0,value:t})}removeMetadata(e){if(e in this._metadata){const t=this._metadata[e];delete this._metadata[e],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:e,prevValue:t,value:void 0})}}mv(e,t=this.name){const n=this._parent;if(null===e||!c.is(e))return this._parent=void 0,void this.dispose();const i=n!==e,r=this.path;this._depth=e.depth+1,(i||t!==this.name)&&(this.addMetadata("name",t),i&&this._watcher.notifyWillChangeParent(this,n,e),this.parent&&(this.parent.unlinkItem(this,!0),this._parent=e,this.parent.insertItem(this)),i&&this._watcher.notifyDidChangeParent(this,n,e)),this.path!==r&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(e){return this._visible=e,this}dispose(){this._disposed||(this._watcher.notifyDidDispose(this),this._disposed=!0)}}t.TreeNode=s,s.nextId=(()=>{let e=0;return()=>e++})(),s.idToTreeNode=new Map,s.pathToTreeNode=new Map,s.pathToId=new Map,s.pathToGlobalTreeState=new Map;class c extends s{constructor(e,t,n,a){super(e,t,n,a),this._children=null,this.refreshThrottler=new i.Throttler,this._lock=!1,this.handleWatchEvent=async e=>{if(this.watcher.notifyWillProcessWatchEvent(this,e),e.type===r.WatchEvent.Moved){const{oldPath:t,newPath:n}=e;if("string"!=typeof t)throw new TypeError("Expected oldPath to be a string");if("string"!=typeof n)throw new TypeError("Expected newPath to be a string");if(o.isRelative(t))throw new TypeError("oldPath must be absolute");if(o.isRelative(n))throw new TypeError("newPath must be absolute");this.transferItem(t,n)}else if(e.type===r.WatchEvent.Added){const{node:t}=e;if(!s.is(t))throw new TypeError("Expected node to be a TreeNode");this.insertItem(t)}else if(e.type===r.WatchEvent.Removed){const{path:t}=e,n=new o(t),i=n.dir.toString(),r=n.base.toString();if(i===this.path&&this.children){const e=this.children.find((e=>e.name===r));e&&this.unlinkItem(e)}}else this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);this.watcher.notifyDidProcessWatchEvent(this,e)},this.isExpanded=!t,this._branchSize=0,t?this._watcher=t.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),s.setTreeNode(this.id,this.path,this))}static defaultSortComparator(e,t){return e.constructor===t.constructor?e.name>t.name?1:e.name{this.watchEvents.delete(e)};return{notifyWillProcessWatchEvent:(t,n)=>{e.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[t,n]})},notifyWillChangeParent:(t,n,i)=>{e.fire({type:r.TreeNodeEvent.WillChangeParent,args:[t,n,i]})},notifyDidChangeParent:(t,n,i)=>{e.fire({type:r.TreeNodeEvent.DidChangeParent,args:[t,n,i]})},notifyDidDispose:t=>{e.fire({type:r.TreeNodeEvent.DidDispose,args:[t]})},notifyDidProcessWatchEvent:(t,n)=>{e.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[t,n]})},notifyDidChangePath:t=>{e.fire({type:r.TreeNodeEvent.DidChangePath,args:[t]})},notifyWillChangeExpansionState:(t,n)=>{const i=this.isItemVisibleAtSurface(t);e.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[t,n,i]})},notifyDidChangeExpansionState:(t,n)=>{const i=this.isItemVisibleAtSurface(t);e.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[t,n,i]})},notifyDidChangeMetadata:(t,n)=>{e.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[t,n]})},notifyDidUpdateBranch:()=>{e.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(t,n)=>{e.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[t,n]})},notifyDidResolveChildren:(t,n)=>{e.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[t,n]})},on:(e,i)=>{const r=t((t=>{t.type===e&&i(...t.args)}));return n.push(r),r},onWatchEvent:(e,t)=>{const n=o;return this.watchEvents.set(e,{terminator:n,callback:t}),n},dispose:n}}set name(e){const t=this.path;c.isRoot(this)||"function"!=typeof this.watchTerminator?this.addMetadata("name",e):(this.watchTerminator(t),this.addMetadata("name",e),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent))}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return r.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}async ensureLoaded(e){if(!this._children)return await this.hardReloadChildren(e)}async setExpanded(e=!0,t=!1,n=!0,i){if(!this.disposed&&!c.isRoot(this)&&!this.isExpanded){if(n){const e=s.getGlobalTreeState(this.path);e.loadPathCancelToken.cancel(),e.refreshCancelToken.cancel(),s.setGlobalTreeState(this.path,{isExpanding:!0})}this.isExpanded=!0,null!==this._children||(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(i),this._watcher.notifyDidResolveChildren(this,this.isExpanded),this.isExpanded&&!(null==i?void 0:i.isCancellationRequested))?(e&&this.parent&&c.is(this.parent)&&await this.parent.setExpanded(!0,!t,!1,i),(null==i?void 0:i.isCancellationRequested)||this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,t),this._watcher.notifyDidChangeExpansionState(this,!0)),n&&s.setGlobalTreeState(this.path,{isExpanding:!1})):n&&s.setGlobalTreeState(this.path,{isExpanding:!1})}}getAllExpandedNodePath(){let e=[];if(this.children){for(let t=0;te.path.toString())))}updateTreeNodeCache(e){var t;if(s.setTreeNode(e.id,e.path,e),c.is(e)&&e.expanded&&(null===(t=e.children)||void 0===t?void 0:t.length))for(let t=0;t-1))break;const t=null==a?void 0:a.find((e=>e.path===r));if(t){if(c.is(t)){t.expanded||(t.isExpanded=!0);const r=await t.resolveChildrens(n);if(r&&(e=e.filter((e=>!r.find((t=>t===e))))),null==n?void 0:n.isCancellationRequested)return;if(e.length>0&&!(null==n?void 0:n.isCancellationRequested)&&(await t.refreshTreeNodeByPaths(e,!1,n,i),null==n?void 0:n.isCancellationRequested))return}}else{if(!a||0===a.length)break;for(let t=0;t!t.find((t=>t===e))))),null==n?void 0:n.isCancellationRequested)return;if(e.length>0){if(await s.refreshTreeNodeByPaths(e,!1,n,i),null==n?void 0:n.isCancellationRequested)return}else s.parent!==i&&s.expandBranch(s,!0);break}}}}if(r){if(e.unshift(r),t){if(this.children)for(let e=0;eo.pathDepth(e)-o.pathDepth(t)));e.length>0;){t=e.pop();const n=s.getTreeNodeByPath(t);c.is(n)&&await n.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(e=this.getAllExpandedNodePath()){if(!c.isRoot(this))return;let t;for(e=e.sort(((e,t)=>o.pathDepth(e)-o.pathDepth(t)));e.length>0;){t=e.pop();const n=s.getTreeNodeByPath(t);c.is(n)&&n.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(e=!1){if(c.isRoot(this)||this.disposed)return;if(!this.isExpanded)return;const t=s.getGlobalTreeState(this.path);t.isExpanding||(t.loadPathCancelToken.cancel(),t.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,e),this.isExpanded=!1,this._watcher.notifyDidChangeExpansionState(this,!1))}mv(e,t=this.name){const n=this.path;if(super.mv(e,t),"function"==typeof this.watchTerminator&&(this.watchTerminator(n),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let e=0;ee.name===r));if(!a)return;const l=new o(t),d=l.dir.toString(),u=d===i?this:s.getTreeNodeByPath(d);if(c.is(u))return a.mv(u,l.base.toString()),a;this.unlinkItem(a)}dispose(){if(this.watchEvents){const e=this.watchEvents.get(this.path);e&&e.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach((e=>{e.dispose()})),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(e,t){this._flattenedBranch=e,c.isRoot(this)&&!t&&this.watcher.notifyDidUpdateBranch()}expandBranch(e,t){if(this!==e&&e._flattenedBranch&&(this._branchSize+=e._branchSize),this!==e&&this._flattenedBranch){const n=this._flattenedBranch.indexOf(e.id)+1;if(0===n)return;this.setFlattenedBranch(a(this._flattenedBranch,n,0,e._flattenedBranch),t),e.setFlattenedBranch(null,t)}else this.parent&&this.parent.expandBranch(e,t)}shrinkBranch(e,t){if(this!==e&&(this._branchSize-=e._branchSize),this!==e&&this._flattenedBranch){const n=this._flattenedBranch.indexOf(e.id)+1;if(0===n)return;e.setFlattenedBranch(this._flattenedBranch.slice(n,n+e._branchSize),t),this.setFlattenedBranch(a(this._flattenedBranch,n,e._flattenedBranch?e._flattenedBranch.length:0),t)}else this.parent&&this.parent.shrinkBranch(e,t)}async hardReloadChildren(e){let t;try{t=await this._tree.resolveChildren(this)||[]}catch(e){t=[]}if(!this.expanded||(null==e?void 0:e.isCancellationRequested))return!1;const n=[],i=new Array(t.length),r=new Array(t.length);for(let i=0;ie.name===i));e&&this.unlinkItem(e)}}async refresh(){const e=s.getGlobalTreeState(this.path);if(e.isLoadingPath||e.isExpanding)return;let t;if(e.refreshCancelToken.token.isCancellationRequested){const e=new i.CancellationTokenSource;s.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:e}),t=e.token}else t=e.refreshCancelToken.token;await this.refreshThrottler.queue((async()=>this.doRefresh(t))),s.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(e){const t=this.getAllExpandedNodePath();await this.refreshTreeNodeByPaths(t,!0,e,this)}isItemVisibleAtRootSurface(e){let t=e;for(;t.parent;)t=t.parent;return t.isItemVisibleAtSurface(e)}isItemVisibleAtSurface(e){return e===this||!!this._flattenedBranch&&this._flattenedBranch.indexOf(e.id)>-1}transformToRelativePath(e){const{splitPath:t}=o,n=t(e);return n.shift(),n}async loadTreeNodeByPath(e){if(!c.isRoot(this))return;const t=s.getGlobalTreeState(this.path);if(t.isExpanding)return;t.refreshCancelToken.cancel(),t.loadPathCancelToken.cancel();const n=new i.CancellationTokenSource;s.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:n});const r=n.token,a=[],{splitPath:l,isRelative:d}=o,u=d(e)?l(e):this.transformToRelativePath(e);if(0===u.length)return s.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(r),r.isCancellationRequested)return void s.setGlobalTreeState(this.path,{isLoadingPath:!1});let p,h,m=this._children,g="";for(;m&&(h=u.shift());){let e=m.find((e=>0===e.name.indexOf(h)));if(e){if(c.is(e)){if(e._watcher.notifyWillChangeExpansionState(e,!0),e.isExpanded=!0,!e.children&&(await e.resolveChildrens(r),r.isCancellationRequested))return void s.setGlobalTreeState(this.path,{isLoadingPath:!1});a.push(e),e._watcher.notifyDidChangeExpansionState(e,!0)}if(0===u.length){let t;for(;t=a.pop();)t.expandBranch(t,!0),0===a.length&&this.updateTreeNodeCache(t);return this.watcher.notifyDidUpdateBranch(),s.setGlobalTreeState(this.path,{isLoadingPath:!1}),e}}if(!e&&p){const t=l(p.name).slice(1);if(t[0]===h){for(t.shift();t.length>0&&t[0]===u[0];)t.shift(),u.shift();h=u.shift(),e=m.find((e=>0===e.name.indexOf(h)))}}if(!e||!c.is(e)&&u.length>0){let e;for(;e=a.pop();)e.expandBranch(e,!0),0===a.length&&this.updateTreeNodeCache(e);return this.watcher.notifyDidUpdateBranch(),s.setGlobalTreeState(this.path,{isLoadingPath:!1}),p}if(c.is(e)){if(e.name.indexOf(o.separator)>0){const t=l(e.name).slice(1);for(;t.length>0&&t[0]===u[0];)t.shift(),u.shift()}if(!e._children&&(g=e.path,c.is(e))){if(e.isExpanded=!0,!e.children&&(await e.resolveChildrens(r),r.isCancellationRequested))return void s.setGlobalTreeState(this.path,{isLoadingPath:!1});a.push(e)}if(e&&0===u.length){let t;for(;t=a.pop();)t.expandBranch(t,!0),0===a.length&&this.updateTreeNodeCache(t);return this.watcher.notifyDidUpdateBranch(),s.setGlobalTreeState(this.path,{isLoadingPath:!1}),e}if(g&&g!==e.path){const t=o.splitPath(g),n=o.splitPath(e.path);n.length>t.length&&u.splice(0,n.length-t.length)}m=e._children,p=e}}if(p){let e;for(;e=a.pop();)e.expandBranch(e,!0),0===a.length&&this.updateTreeNodeCache(e);return this.watcher.notifyDidUpdateBranch(),s.setGlobalTreeState(this.path,{isLoadingPath:!1}),p}s.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(e){return this._flattenedBranch?this._flattenedBranch.indexOf(e):-1}getIndexAtTreeNode(e){return this._flattenedBranch?this._flattenedBranch.indexOf(e.id):-1}getTreeNodeAtIndex(e){const t=this._flattenedBranch[e];return s.getTreeNodeById(t)}getTreeNodeById(e){return s.getTreeNodeById(e)}getTreeNodeByPath(e){return s.getTreeNodeByPath(e)}}t.CompositeTreeNode=c},20290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecoration=t.ChangeReason=t.CompositeDecorationType=t.ClasslistComposite=void 0;const i=n(89065),r=n(90167);class o{constructor(e,t){this.addChangeListener=e,this.removeChangeListener=t}}var a,s;t.ClasslistComposite=o,function(e){e[e.Applicable=1]="Applicable",e[e.Inheritable=2]="Inheritable"}(a=t.CompositeDecorationType||(t.CompositeDecorationType={})),function(e){e[e.UnTargetDecoration=1]="UnTargetDecoration",e[e.TargetDecoration=2]="TargetDecoration"}(s=t.ChangeReason||(t.ChangeReason={}));t.CompositeDecoration=class{constructor(e,t,n){this.handleDecorationDidAddClassname=e=>{const{classname:t}=e;this.selfOwned&&t&&(this.compositeCssClasslist.classlist.push(t),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=e=>{const{classname:t}=e;if(!this.selfOwned||!t)return;const n=this.compositeCssClasslist.classlist.indexOf(t);n>-1&&(this.compositeCssClasslist.classlist.splice(n,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=e=>{const{decoration:t}=e;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...t.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=e=>{const{decoration:t}=e;this.removeDecorationClasslist(t)},this.target=e,this.type=t,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),n?(this.selfOwned=!1,this.parent=n,this.renderedDecorations=n.renderedDecorations,this.compositeCssClasslist.classlist=n.compositeCssClasslist.classlist,n.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(e){if(e){if(!this.selfOwned)return this.parentOwn(e);for(const[e]of this.renderedDecorations)this.recursiveRefresh(this,!1,s.UnTargetDecoration,e,!1);this.parent!==e&&(this.parent.linkedComposites.delete(this),this.parent=e,e.linkedComposites.add(this));for(const[t]of e.renderedDecorations)this.recursiveRefresh(this,!1,s.TargetDecoration,t,!1)}}add(e){const t=e.appliedTargets.get(this.target),n=t&&(t===r.TargetMatchMode.Self||t===r.TargetMatchMode.SelfAndChildren),i=t&&(t===r.TargetMatchMode.Children||t===r.TargetMatchMode.SelfAndChildren);if((this.type!==a.Applicable||n)&&(this.type!==a.Inheritable||i))return this.selfOwned?void(this.targetedDecorations.has(e)||(this.targetedDecorations.add(e),this.recursiveRefresh(this,!1,s.TargetDecoration,e))):(this.selfOwn(s.TargetDecoration,e),void this.targetedDecorations.add(e))}remove(e){if(this.selfOwned&&this.targetedDecorations.delete(e)){if(0===this.negatedDecorations.size&&0===this.targetedDecorations.size&&this.parent)return this.parentOwn(void 0,s.UnTargetDecoration,e);this.recursiveRefresh(this,!1,s.UnTargetDecoration,e)}}negate(e){const t=e.negatedTargets.get(this.target),n=t&&(t===r.TargetMatchMode.Self||t===r.TargetMatchMode.SelfAndChildren),i=t&&(t===r.TargetMatchMode.Children||t===r.TargetMatchMode.SelfAndChildren);if((this.type!==a.Applicable||n)&&(this.type!==a.Inheritable||i))return this.selfOwned?void(this.negatedDecorations.has(e)||(this.negatedDecorations.add(e),this.renderedDecorations.has(e)&&this.removeDecorationClasslist(e))):(this.selfOwn(s.UnTargetDecoration,e),void this.negatedDecorations.add(e))}unNegate(e){if(this.selfOwned&&this.negatedDecorations.delete(e)){if(0===this.negatedDecorations.size&&0===this.targetedDecorations.size&&this.parent)return this.parentOwn();this.renderedDecorations.has(e)||!this.parent.renderedDecorations.has(e)&&!e.appliedTargets.has(this.target)||this.recursiveRefresh(this,!1,s.TargetDecoration,e)}}selfOwn(e,t){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const n=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[e]of n.renderedDecorations)e!==t&&this.processCompositeAlteration(s.TargetDecoration,e);e===s.UnTargetDecoration&&this.parent.renderedDecorations.has(t)&&!this.renderedDecorations.has(t)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,e,t)}parentOwn(e,t,n){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),e&&this.parent!==e&&(this.parent&&this.parent.linkedComposites.delete(this),e.linkedComposites.add(this),this.parent=e),this.recursiveRefresh(this,!0,t,n)}processCompositeAlteration(e,t){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(e===s.UnTargetDecoration){const e=this.renderedDecorations.get(t);if(e){const n=t.appliedTargets.get(this.target),i=n&&(n===r.TargetMatchMode.Self||n===r.TargetMatchMode.SelfAndChildren),o=n&&(n===r.TargetMatchMode.Children||n===r.TargetMatchMode.SelfAndChildren);return(!i||this.type!==a.Applicable)&&((!o||this.type!==a.Inheritable)&&(this.removeDecorationClasslist(t,!1),e&&e.dispose(),this.renderedDecorations.delete(t)))}return!1}if(e===s.TargetDecoration){const e=t.negatedTargets.get(this.target),n=e&&(e===r.TargetMatchMode.Self||e===r.TargetMatchMode.SelfAndChildren),o=e&&(e===r.TargetMatchMode.Children||e===r.TargetMatchMode.SelfAndChildren);if(n&&this.type===a.Applicable)return!1;if(o&&this.type===a.Inheritable)return!1;if(!this.renderedDecorations.has(t)){const e=new i.DisposableCollection;return e.push(t.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),e.push(t.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),e.push(t.onDidDisableDecoration(this.handleDecorationDisable)),e.push(t.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(t,e),!t.disabled&&(this.compositeCssClasslist.classlist.push(...t.cssClassList),!0)}}return!1}recursiveRefresh(e,t,n,i,r=!0){if(!this.selfOwned&&t&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&t&&e!==this){for(const[e]of this.renderedDecorations)this.processCompositeAlteration(s.UnTargetDecoration,e);for(const[e]of this.parent.renderedDecorations)this.processCompositeAlteration(s.TargetDecoration,e);r&&this.notifyClasslistChange(!1)}else this.selfOwned&&n===s.UnTargetDecoration&&i&&this.renderedDecorations.has(i)?(this.processCompositeAlteration(n,i),r&&this.notifyClasslistChange(!1)):(this.selfOwned&&n===s.TargetDecoration&&i&&this.processCompositeAlteration(n,i)&&r||!this.selfOwned&&r)&&this.notifyClasslistChange(!1);for(const o of this.linkedComposites)o.recursiveRefresh(e,t,n,i,r)}removeDecorationClasslist(e,t=!0){if(this.selfOwned){for(const t of e.cssClassList){const e=this.compositeCssClasslist.classlist.indexOf(t);e>-1&&this.compositeCssClasslist.classlist.splice(e,1)}t&&this.notifyClasslistChange()}}notifyClasslistChange(e=!0){for(const e of[...this.classlistChangeCallbacks])e();if(e)for(const e of this.linkedComposites)e.selfOwned||e.notifyClasslistChange()}}},90167:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.TargetMatchMode=void 0;const i=n(89065),r=n(63898);var o;!function(e){e[e.None=1]="None",e[e.Self=2]="Self",e[e.Children=3]="Children",e[e.SelfAndChildren=4]="SelfAndChildren"}(o=t.TargetMatchMode||(t.TargetMatchMode={}));t.Decoration=class{constructor(...e){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new i.Emitter,this.onDidRemoveCSSClassnameEmitter=new i.Emitter,this.onDidDisableDecorationEmitter=new i.Emitter,this.onDidEnableDecorationEmitter=new i.Emitter,this.onDidAddTargetEmitter=new i.Emitter,this.onDidRemoveTargetEmitter=new i.Emitter,this.onDidNegateTargetEmitter=new i.Emitter,this.onDidUnNegateTargetEmitter=new i.Emitter,Array.isArray(e)){if(!e.every((e=>"string"==typeof e)))throw new TypeError("classlist must be of type `Array`");this._cssClassList=new Set(e)}else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(e){this._disabled=e,e?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(e){this._cssClassList.has(e)||(this._cssClassList.add(e),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:e}))}removeCSSClass(e){this._cssClassList.has(e)&&(this._cssClassList.delete(e),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:e}))}hasTarget(e){return!!this._appliedTargets.get(e)}addTarget(e,t=o.Self){if(this._appliedTargets.get(e)===t)return;if(!r.TreeNode.is(e))return;this._appliedTargets.set(e,t);const n=i.Disposable.create((()=>{this.removeTarget(e)}));return this.appliedTargetsDisposables.set(e,n),this.onDidAddTargetEmitter.fire({decoration:this,target:e}),n}removeTarget(e){if(this._appliedTargets.delete(e)){const t=this.appliedTargetsDisposables.get(e);t&&t.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:e})}}negateTarget(e,t=o.Self){if(this._negatedTargets.get(e)===t)return;if(!r.TreeNode.is(e))return;this._negatedTargets.set(e,t);const n=i.Disposable.create((()=>{this.unNegateTarget(e)}));return this.negatedTargetsDisposables.set(e,n),this.onDidNegateTargetEmitter.fire({decoration:this,target:e}),n}unNegateTarget(e){if(this._negatedTargets.delete(e)){const t=this.negatedTargetsDisposables.get(e);t&&t.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:e})}}}},60279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const i=n(89065),r=n(71864),o=n(63898),a=n(20290);t.DecorationsManager=class{constructor(e){this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new i.DisposableCollection,this.disposed=!1,this.targetDecoration=e=>{const{decoration:t,target:n}=e,i=this.getDecorationData(n);if(i){const{applicable:e,inheritable:n}=i;e.add(t),n&&n.add(t)}},this.unTargetDecoration=e=>{const{decoration:t,target:n}=e,i=this.getDecorationData(n);if(i){const{applicable:e,inheritable:n}=i;e.remove(t),n&&n.remove(t)}},this.negateDecoration=e=>{const{decoration:t,target:n}=e,i=this.getDecorationData(n);if(i){const{applicable:e,inheritable:n}=i;e.negate(t),n&&n.negate(t)}},this.unNegateDecoration=e=>{const{decoration:t,target:n}=e,i=this.getDecorationData(n);if(i){const{applicable:e,inheritable:n}=i;e.unNegate(t),n&&n.unNegate(t)}},this.switchParent=(e,t,n)=>{const i=this.decorationsMeta.get(e);if(!i)return;const r=this.getDecorationData(n);r&&(i.applicable.changeParent(r.inheritable),i.inheritable&&i.inheritable.changeParent(r.inheritable))},this.decorationsMeta.set(e,{applicable:new a.CompositeDecoration(e,a.CompositeDecorationType.Applicable),inheritable:new a.CompositeDecoration(e,a.CompositeDecorationType.Inheritable)}),this.disposables.push(e.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(e.watcher.on(r.TreeNodeEvent.DidDispose,(e=>this.decorationsMeta.delete(e))))}dispose(){for(const[e]of this.decorations)this.removeDecoration(e);this.disposables.dispose(),this.disposed=!0}addDecoration(e){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(e))return;const t=new i.DisposableCollection;t.push(e.onDidAddTarget(this.targetDecoration)),t.push(e.onDidRemoveTarget(this.unTargetDecoration)),t.push(e.onDidNegateTarget(this.negateDecoration)),t.push(e.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(e,t);for(const[t]of e.appliedTargets)this.targetDecoration({decoration:e,target:t});for(const[t]of e.negatedTargets)this.negateDecoration({decoration:e,target:t})}removeDecoration(e){const t=this.decorations.get(e);if(t){for(const[t]of e.appliedTargets){const n=this.decorationsMeta.get(t);n&&(n.applicable.remove(e),n.inheritable&&n.inheritable.remove(e))}for(const[t]of e.negatedTargets){const n=this.decorationsMeta.get(t);n&&(n.applicable.unNegate(e),n.inheritable&&n.inheritable.unNegate(e))}t.dispose(),this.decorations.delete(e)}}getDecorations(e){if(!e||!o.TreeNode.is(e))return;const t=this.getDecorationData(e);return t?t.applicable.compositeCssClasslist:void 0}getDecorationData(e){if(this.disposed)return;const t=this.decorationsMeta.get(e);if(t)return t;if(!e||!e.parent)return;const n=this.getDecorationData(e.parent);if(n){const t={applicable:new a.CompositeDecoration(e,a.CompositeDecorationType.Applicable,n.inheritable),inheritable:o.CompositeTreeNode.is(e)?new a.CompositeDecoration(e,a.CompositeDecorationType.Inheritable,n.inheritable):void 0};return this.decorationsMeta.set(e,t),t}}}},82272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(90167),t),i.__exportStar(n(60279),t),i.__exportStar(n(20290),t)},64911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(35718),t),i.__exportStar(n(63898),t),i.__exportStar(n(81929),t),i.__exportStar(n(82272),t)},63856:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeModel=void 0;const i=n(89065),r=n(71864),o=n(36799);t.TreeModel=class{constructor(){this.onChangeEmitter=new i.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get root(){return this._root}set root(e){this._root=e,this.initState(e)}get state(){return this._state}set state(e){this._state=e}init(e){this.root=e,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(e){this.state=new o.TreeStateManager(e)}loadTreeState(e){return"string"==typeof e&&(e=JSON.parse(e)),this.state.loadTreeState(e)}getTreeStateWatcher(e=!1){return new o.TreeStateWatcher(this.state,e)}resolveChildren(e){return Promise.resolve(Array.from(e.children))}}},81929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(63856),t)},20921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateManager=t.Operation=void 0;const i=n(89065),r=n(71864),o=n(63898),{Path:a}=i.path;var s;!function(e){e[e.SetExpanded=1]="SetExpanded",e[e.SetCollapsed=2]="SetCollapsed",e[e.SetActive=3]="SetActive"}(t.Operation||(t.Operation={})),function(e){e[e.Expanded=1]="Expanded",e[e.Collapsed=2]="Collapsed",e[e.Disabled=4]="Disabled"}(s||(s={}));t.TreeStateManager=class{constructor(e){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new i.Emitter,this.onChangeScrollOffsetEmitter=new i.Emitter,this.onDidChangeExpansionStateEmitter=new i.Emitter,this.onDidChangeRelativePathEmitter=new i.Emitter,this.handleExpansionChange=(e,t,n)=>{var i;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(e.id,t?s.Expanded:s.Collapsed),this.stashKeyframes&&!this.stashing){if(t){let t=e;for(;t;){if(this.stashKeyframes.has(t.id)){let e=this.stashKeyframes.get(t.id);e|=s.Disabled,this.stashKeyframes.set(t.id,e)}t=t.parent}this.stashLockingItems.add(e)}if(this.stashLockingItems&&this.stashLockingItems.has(e)&&!t){let t=e;for(;t;){if(this.stashKeyframes.has(t.id)){let e=this.stashKeyframes.get(t.id);e&=~s.Disabled,this.stashKeyframes.set(t.id,e)}t=t.parent}this.stashLockingItems.delete(e)}}let r=this.expandedDirectories.get(e);t&&!r?(r=null===(i=new a(this.root.path).relative(new a(e.path)))||void 0===i?void 0:i.toString(),this.expandedDirectories.set(e,r),this.onDidChangeExpansionStateEmitter.fire({relativePath:r,isExpanded:t,isVisibleAtSurface:n})):!t&&r&&(this.expandedDirectories.delete(e),this.onDidChangeExpansionStateEmitter.fire({relativePath:r,isExpanded:t,isVisibleAtSurface:n}))},this.handleDidChangePath=e=>{var t;if(this.expandedDirectories.has(e)){const n=this.expandedDirectories.get(e),i=null===(t=new a(this.root.path).relative(new a(e.path)))||void 0===t?void 0:t.toString();this.expandedDirectories.set(e,i),this.onDidChangeRelativePathEmitter.fire({prevPath:n,newPath:i})}},this.root=e,this.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(r.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(e){this._scrollOffset=e,this.onChangeScrollOffsetEmitter.fire(e)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(e){if(e){for(const t of e.expandedDirectories.buried)try{const e=await this.root.loadTreeNodeByPath(t);if(!e)break;e&&o.CompositeTreeNode.is(e)&&e.setCollapsed()}catch(e){}for(const t of e.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(t))break}catch(e){}this._scrollOffset="number"==typeof e.scrollPosition&&e.scrollPosition>-1?e.scrollPosition:this._scrollOffset,this.onDidLoadStateEmitter.fire()}}excludeFromStash(e){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(e)?e:e.parent,!0,this.root.isItemVisibleAtSurface(e))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const e=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[t,n]of e){const e=(n&s.Disabled)===s.Disabled,i=o.TreeNode.getTreeNodeById(t);i&&!e&&((n&s.Expanded)===s.Expanded?i.setCollapsed():(n&s.Collapsed)===s.Collapsed&&await i.setExpanded())}}}},88370:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const i=n(89065),r=n(85841);t.TreeStateWatcher=class{constructor(e,t=!1){this._disposed=!1,this.disposables=new i.DisposableCollection,this.onDidTreeStateChangeEmitter=new i.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(e.onChangeScrollOffset((e=>{this.currentState.scrollPosition=e,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)}))),this.disposables.push(e.onDidChangeRelativePath((({prevPath:e,newPath:n})=>{let i=!1;const o=new Set(this.currentState.expandedDirectories.atSurface);if(o.has(e)&&(o.delete(e),o.add(n),i=!0),this.currentState.expandedDirectories.atSurface=Array.from(o),t){const t=new Set(this.currentState.expandedDirectories.buried);t.has(e)&&(o.delete(e),o.add(n),i=!0),this.currentState.expandedDirectories.buried=Array.from(t)}i&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)}))),this.disposables.push(e.onDidChangeExpansionState((({relativePath:e,isExpanded:n,isVisibleAtSurface:i})=>{let o=!1;const a=new Set(this.currentState.expandedDirectories.atSurface),s=new Set(this.currentState.expandedDirectories.buried);if(!a.has(e)||n&&i)n&&i&&(a.add(e),o=!0);else{a.delete(e);const t=Array.from(a).filter((t=>t.indexOf(e)>=0));for(const e of t)a.delete(e),s.has(e)||s.add(e);o=!0}this.currentState.expandedDirectories.atSurface=Array.from(a),t||(!s.has(e)||n&&!i?n&&!i&&(s.add(e),o=!0):(s.delete(e),o=!0),this.currentState.expandedDirectories.buried=Array.from(s)),o&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.DirExpansionState)})))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return Object.assign(Object.assign({},this.currentState),{expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}})}toString(){return JSON.stringify(this.currentState)}}},36799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=t.TreeStateManager=void 0;var i=n(20921);Object.defineProperty(t,"TreeStateManager",{enumerable:!0,get:function(){return i.TreeStateManager}});var r=n(88370);Object.defineProperty(t,"TreeStateWatcher",{enumerable:!0,get:function(){return r.TreeStateWatcher}})},85841:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcherChangeType=t.TreeStateEvent=void 0,function(e){e[e.DidChangeScrollOffset=1]="DidChangeScrollOffset",e[e.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",e[e.DidChangeRelativePath=3]="DidChangeRelativePath",e[e.DidChange=4]="DidChange",e[e.DidLoadState=5]="DidLoadState"}(t.TreeStateEvent||(t.TreeStateEvent={})),function(e){e[e.ScrollOffset=1]="ScrollOffset",e[e.DirExpansionState=2]="DirExpansionState",e[e.PathsUpdated=3]="PathsUpdated"}(t.TreeStateWatcherChangeType||(t.TreeStateWatcherChangeType={}))},71864:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(37589),t),i.__exportStar(n(29825),t),i.__exportStar(n(10920),t)},29825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNodeType=void 0,function(e){e[e.TreeNode=1]="TreeNode",e[e.CompositeTreeNode=2]="CompositeTreeNode",e[e.NewPrompt=3]="NewPrompt",e[e.RenamePrompt=4]="RenamePrompt"}(t.TreeNodeType||(t.TreeNodeType={}))},37589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataChangeType=t.WatchEvent=t.TreeNodeEvent=void 0,function(e){e[e.WillChangeExpansionState=1]="WillChangeExpansionState",e[e.DidChangeExpansionState=2]="DidChangeExpansionState",e[e.WillChangeParent=3]="WillChangeParent",e[e.DidChangeParent=4]="DidChangeParent",e[e.DidDispose=5]="DidDispose",e[e.BranchDidUpdate=6]="BranchDidUpdate",e[e.DidChangePath=7]="DidChangePath",e[e.DidProcessWatchEvent=8]="DidProcessWatchEvent",e[e.WillProcessWatchEvent=9]="WillProcessWatchEvent",e[e.DidChangeMetadata=10]="DidChangeMetadata",e[e.DidResolveChildren=11]="DidResolveChildren",e[e.WillResolveChildren=12]="WillResolveChildren"}(t.TreeNodeEvent||(t.TreeNodeEvent={})),function(e){e[e.Added=1]="Added",e[e.Removed=2]="Removed",e[e.Changed=3]="Changed",e[e.Moved=4]="Moved"}(t.WatchEvent||(t.WatchEvent={})),function(e){e[e.Added=1]="Added",e[e.Updated=2]="Updated",e[e.Removed=3]="Removed"}(t.MetadataChangeType||(t.MetadataChangeType={}))},22878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarsVirtualList=t.Scrollbars=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(23493)),a=i.__importDefault(n(616)),s=n(31298);n(75289);t.Scrollbars=({onScroll:e,onUpdate:t,forwardedRef:n,style:c,children:l,className:d,onReachBottom:u})=>{const p=a.default.useCallback((e=>{e?n&&n(e.view):n&&n(null)}),[]);let h;const m=a.default.useCallback((0,o.default)((e=>{const{scrollTop:t,scrollHeight:n,clientHeight:i}=e;if(0===n&&0===i)return;(t+100)/(n-i)>1&&u&&u()}),100),[u]);return a.default.createElement(s.Scrollbars,{ref:p,style:Object.assign(Object.assign({},c),{overflow:"hidden"}),className:(0,r.default)(d,"kt-scrollbar"),onUpdate:e=>{if(!h)return;const{scrollTop:n}=e,i=.05*Math.min(n,20);h.style.opacity=String(i),m(e),t&&t(e)},onScroll:e,renderThumbVertical:e=>{var{style:t}=e,n=i.__rest(e,["style"]);return a.default.createElement("div",Object.assign({},n,{className:"scrollbar-thumb-vertical"}))},renderThumbHorizontal:e=>{var{style:t}=e,n=i.__rest(e,["style"]);return a.default.createElement("div",Object.assign({},n,{className:"scrollbar-thumb-horizontal"}))}},a.default.createElement("div",{ref:e=>{h=e},className:"scrollbar-decoration"}),l)},t.ScrollbarsVirtualList=a.default.forwardRef(((e,n)=>a.default.createElement(t.Scrollbars,Object.assign({},e,{forwardedRef:n}))))},64531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Select=t.isDataOptionGroups=t.isDataOptions=t.Option=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=n(616);n(81618);const s=n(23237);function c(...e){}function l(e){return!!e&&(0===e.length||void 0!==e[0].value)}function d(e){return!!e&&(0===e.length||void 0!==(t=e[0]).groupName&&l(t.options));var t}function u(e){return o.default.createElement(o.default.Fragment,null,e.data.iconClass?o.default.createElement("div",{className:(0,r.default)(e.data.iconClass,"kt-select-option-icon")}):void 0,e.data.label)}function p({group:e,index:t}){return o.default.createElement("div",{key:"header_"+t,className:"kt-select-group-header"},e.iconClass?o.default.createElement("div",{className:(0,r.default)(e.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,e.groupName))}function h(e,t){let n=t.label;if(void 0===n)try{n=t.value.toString()}catch(e){n=void 0}return"string"==typeof n&&-1!==n.indexOf(e)}function m({text:e}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},e))}t.Option=e=>{var{value:t,children:n,disabled:a,onClick:s,className:c}=e,l=i.__rest(e,["value","children","disabled","onClick","className"]);return o.default.createElement("span",Object.assign({},l,{className:(0,r.default)(c,{"kt-option-disabled":a}),onClick:()=>s&&!a&&s(t)}),n)},t.isDataOptions=l,t.isDataOptionGroups=d,t.Select=function({disabled:e,options:n,size:i="default",children:p,value:g,onChange:f,onMouseEnter:_,optionLabelProp:b,style:y,optionStyle:v,className:C,maxHeight:S,equals:w=((e,t)=>e===t),optionRenderer:E=u,groupTitleRenderer:k,footerComponent:x,headerComponent:T,showSearch:D=!1,filterOption:A=h,searchPlaceholder:I="",emptyComponent:M,selectedRenderer:R,onBeforeShowOptions:P,allowOptionsOverflow:O,dropdownRenderType:N="fixed",description:L,notMatchWarning:F}){const[B,j]=(0,a.useState)(!1),[z,U]=(0,a.useState)(""),W=o.default.useRef(null),V=o.default.useRef(null),H=(0,o.useCallback)((()=>{const e=!B;e&&P&&P()||j(e)}),[B,P,P]),K=(0,o.useCallback)((()=>{var e,t,i,r,a,s,c,u,h;if(n&&l(n)){for(const e of n)if(w(g,e.value))return{iconClass:e.iconClass,label:e.label,value:e.value};return{iconClass:null===(e=n[0])||void 0===e?void 0:e.iconClass,label:null===(t=n[0])||void 0===t?void 0:t.label,value:null===(i=n[0])||void 0===i?void 0:i.value}}if(n&&d(n)){for(const e of n)for(const t of e.options)if(w(g,t.value))return{iconClass:t.iconClass,label:t.label,value:t.value};return{iconClass:null===(a=null===(r=n[0])||void 0===r?void 0:r.options[0])||void 0===a?void 0:a.iconClass,label:null===(c=null===(s=n[0])||void 0===s?void 0:s.options[0])||void 0===c?void 0:c.label,value:null===(h=null===(u=n[0])||void 0===u?void 0:u.options[0])||void 0===h?void 0:h.value}}{const e=p&&function(e,t,n=((e,t)=>e===t)){var i,r;const a=o.default.Children.toArray(t).filter((e=>o.default.isValidElement(e))).find((t=>{var i;return t.props&&n(null===(i=t.props)||void 0===i?void 0:i.value,e)?t:null}));return(null===(i=null==a?void 0:a.props)||void 0===i?void 0:i.label)||(null===(r=null==a?void 0:a.props)||void 0===r?void 0:r.value)}(g,p);if(e)return{label:e,value:e}}return{label:g,value:g,notMatch:!0}}),[n,g]),$=K(),G=(0,r.default)("kt-select-options",{"kt-select-options-visible":B,[`kt-select-options-${i}`]:i}),q=F&&$.notMatch,Z=(0,r.default)("kt-select-value",{"kt-select-warning":q,"kt-select-disabled":e,"kt-select-value-active":B,[`kt-select-value-${i}`]:i});function Y(e,n){var i;if(!e)return null;"string"!=typeof e&&"number"!=typeof e||(e=o.default.createElement(t.Option,{value:e,label:String(e),key:`${e}_${n}`},e));const a=e,s=(null===(i=a.props)||void 0===i?void 0:i.disabled)||!1;return o.default.createElement("div",{key:`${a.props.value}_${n}`,className:(0,r.default)({"kt-select-option-select":g===a.props.value}),onMouseEnter:()=>null==_?void 0:_(a.props.value,n),onClick:s?c:()=>{j(!1),f&&f(function(e,t){return t?e.props[t]:e.props.value}(e,b))}},e)}if((0,a.useEffect)((()=>{!B&&z&&U("")}),[]),(0,a.useEffect)((()=>{if(W.current&&V.current){const e=W.current.getBoundingClientRect();O?(V.current.style.minWidth=`${e.width}px`,V.current.style.maxWidth=window.innerWidth-e.left-4+"px"):V.current.style.width=`${e.width}px`;const t=window.innerHeight-e.bottom;(!S||t{j(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[B]),z)if(n&&l(n))n=n.filter((e=>A(z,e)));else if(n&&d(n)){const e=[];for(const t of n){const n={iconClass:t.iconClass,groupName:t.groupName,options:t.options.filter((e=>A(z,e,t)))};n.options.length>0&&e.push(n)}n=e}return o.default.createElement("div",{className:(0,r.default)("kt-select-container",C),ref:W},o.default.createElement("p",{className:Z,onClick:H,style:y},D&&B?o.default.createElement("input",{className:(0,r.default)("kt-select-search"),onChange:e=>{U(e.target.value)},value:z,autoFocus:!0,placeholder:I||""}):(()=>{const e=R;return o.default.createElement(o.default.Fragment,null,e?o.default.createElement(e,{data:$}):o.default.createElement(o.default.Fragment,null,$.iconClass?o.default.createElement("span",{className:(0,r.default)($.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("span",{className:"kt-select-option"},$.label)),o.default.createElement(s.Icon,{iconClass:(0,s.getIcon)("down")}))})()),q&&o.default.createElement("div",{className:"kt-select-warning-text"},F),B&&(l(n)||d(n)?o.default.createElement(t.SelectOptionsList,{optionRenderer:E,options:n,equals:w,optionStyle:v,currentValue:g,size:i,onSelect:e=>{f&&f(e),j(!1)},groupTitleRenderer:k,className:G,style:{maxHeight:`${S}px`},ref:V,footerComponent:x,headerComponent:T,emptyComponent:M}):o.default.createElement("div",{className:G,style:{maxHeight:`${S}px`},ref:V},n&&n.map(((e,t)=>Y(e,t))),p&&function(e,t){let n=[];return n=Array.isArray(e)?o.default.Children.toArray(e).map(t):[t(e)],n}(p,Y),L&&o.default.createElement(m,{text:L}),o.default.createElement("div",{className:"kt-select-overlay",onClick:H}))))},t.SelectOptionsList=o.default.forwardRef(((e,n)=>{const{options:i,optionRenderer:a=u,equals:c=((e,t)=>e===t),onSelect:l,currentValue:h,optionStyle:m,size:g,className:f,style:_,groupTitleRenderer:b=p,renderCheck:y,headerComponent:v,footerComponent:C,emptyComponent:S}=e,w=(0,r.default)("kt-select-options",{[`kt-select-options-${g}`]:!0},f);function E(e){return e&&e.map(((e,n)=>{const i=c(h,e.value);return o.default.createElement(t.Option,{value:n,key:n,className:(0,r.default)({"kt-select-option-select":i,"kt-select-option-default":!0,"kt-option-with-check":y}),onClick:()=>l(e.value),style:m},y&&c(h,e.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(s.Icon,{icon:"check"})):void 0,o.default.createElement(a,{data:e,isCurrent:i}))}))}let k;return k=d(i)?0===i.filter((e=>e.options.length>0)).length:0===i.length,o.default.createElement("div",{className:w,style:_,ref:n,onClick:e=>{e.stopPropagation()}},v?o.default.createElement(v,null):null,k&&S?o.default.createElement(S,null):(d(i)?i.map(((e,t)=>{const n=o.default.createElement(b,{group:e,index:t});return o.default.createElement(o.default.Fragment,{key:"group_"+t},n,E(e.options))})):E(i))||S&&o.default.createElement(S,null),C?o.default.createElement(C,null):null)}))},70054:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616));n(82661);t.Tabs=e=>{const{tabs:t,className:n,value:a,onChange:s,mini:c,style:l}=e,d=i.__rest(e,["tabs","className","value","onChange","mini","style"]),u=o.default.useCallback((e=>{"function"==typeof s&&s(e)}),[]);return o.default.createElement("div",Object.assign({},d,{style:l,className:(0,r.default)("kt-tabs",n,{"kt-tabs-mini":c})}),t.map(((e,t)=>{const n=t===a?"kt-tab-selected":"";return"string"==typeof e?o.default.createElement("div",{key:t,className:(0,r.default)("kt-tab",n,{"kt-mini-tab":c}),onClick:u.bind(null,t)},e):o.default.createElement("div",{key:t,className:(0,r.default)("kt-custom-tab",n,{"kt-mini-tab":c}),onClick:u.bind(null,t)},e)})))}},77093:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(616);n(27122);t.Tooltip=({title:e,children:t,delay:n})=>{const[i,s]=(0,a.useState)(!1),c=(0,a.useRef)(null),l=(0,a.useRef)(null),d=(0,a.useRef)(null);let u;return o.default.createElement("p",{ref:c,className:"kt-tooltip-wrapper",onMouseEnter:function(){i?u&&clearTimeout(u):u=setTimeout((()=>{if(s(!0),l.current&&c.current&&d.current){const{x:e,y:t,width:n,height:i}=c.current.getBoundingClientRect(),r=l.current.getBoundingClientRect();t<1.5*r.height?(d.current.className+=" kt-tooltip-reverse-arrow",l.current.style.top=`${t+i+r.height/2}px`):l.current.style.top=t-1.5*r.height+"px",e+r.width/2>=document.body.offsetWidth?(d.current.style.right=n/2-7+"px",l.current.style.left=e+n-r.width+"px"):e-r.width/2<=0?(d.current.style.left=n/2-7+"px",l.current.style.left=`${e}px`):(d.current.style.left=r.width/2-7+"px",l.current.style.left=e+n/2-r.width/2+"px")}clearTimeout(u)}),n||500)},onMouseLeave:function(){u&&clearTimeout(u),s(!1)}},t,i&&o.default.createElement("span",{ref:l,className:(0,r.default)("kt-tooltip-content")},e,o.default.createElement("span",{ref:d,className:"kt-tooltip-arrow-placeholder"})))}},57365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=i.__importDefault(n(15003));t.Deprecated=function(e,t){return n=>(r.default.useEffect((()=>{(0,o.default)(!1,`${e.displayName||e.name} is deprecated: ${t}`)}),[]),r.default.createElement(e,n))}},69198:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(57365),t),i.__exportStar(n(15003),t),i.__exportStar(n(51308),t),i.__exportStar(n(10862),t),i.__exportStar(n(29703),t)},10862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=()=>({height:0,opacity:0}),i=e=>({height:e.scrollHeight,opacity:1}),r={motionName:"kt-motion-collapse",onAppearStart:n,onEnterStart:n,onAppearActive:i,onEnterActive:i,onLeaveStart:e=>({height:e.offsetHeight}),onLeaveActive:n};t.default=r},29703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655).__importDefault(n(54087));let r=0;const o={};function a(e,t=1){const n=r++;let a=t;return o[n]=(0,i.default)((function t(){a-=1,a<=0?(e(),delete o[n]):o[n]=(0,i.default)(t)})),n}t.default=a,a.cancel=function(e){void 0!==e&&(i.default.cancel(o[e]),delete o[e])},a.ids=o},51308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;t.tuple=(...e)=>e;t.tupleNum=(...e)=>e},15003:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noteOnce=t.warningOnce=t.call=t.resetWarned=t.note=t.warning=void 0;let n={};function i(e,t){0}function r(e,t){0}function o(e,t,i){t||n[i]||(e(!1,i),n[i]=!0)}function a(e,t){o(i,e,t)}t.warning=i,t.note=r,t.resetWarned=function(){n={}},t.call=o,t.warningOnce=a,t.noteOnce=function(e,t){o(r,e,t)},t.default=a},52608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{blue:()=>E,cyan:()=>w,geekblue:()=>k,generate:()=>p,gold:()=>b,green:()=>S,grey:()=>D,lime:()=>C,magenta:()=>T,orange:()=>y,presetDarkPalettes:()=>g,presetPalettes:()=>m,presetPrimaryColors:()=>h,purple:()=>x,red:()=>f,volcano:()=>_,yellow:()=>v});var i=n(86500),r=n(1350),o=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function a(e){var t=e.r,n=e.g,r=e.b,o=(0,i.py)(t,n,r);return{h:360*o.h,s:o.s,v:o.v}}function s(e){var t=e.r,n=e.g,r=e.b;return"#".concat((0,i.vq)(t,n,r,!1))}function c(e,t,n){var i=n/100;return{r:(t.r-e.r)*i+e.r,g:(t.g-e.g)*i+e.g,b:(t.b-e.b)*i+e.b}}function l(e,t,n){var i;return(i=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?i+=360:i>=360&&(i-=360),i}function d(e,t,n){return 0===e.h&&0===e.s?e.s:((i=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(i=1),n&&5===t&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2)));var i}function u(e,t,n){var i;return(i=n?e.v+.05*t:e.v-.15*t)>1&&(i=1),Number(i.toFixed(2))}function p(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],i=(0,r.uA)(e),p=5;p>0;p-=1){var h=a(i),m=s((0,r.uA)({h:l(h,p,!0),s:d(h,p,!0),v:u(h,p,!0)}));n.push(m)}n.push(s(i));for(var g=1;g<=4;g+=1){var f=a(i),_=s((0,r.uA)({h:l(f,g),s:d(f,g),v:u(f,g)}));n.push(_)}return"dark"===t.theme?o.map((function(e){var i=e.index,o=e.opacity;return s(c((0,r.uA)(t.backgroundColor||"#141414"),(0,r.uA)(n[i]),100*o))})):n}var h={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},m={},g={};Object.keys(h).forEach((function(e){m[e]=p(h[e]),m[e].primary=m[e][5],g[e]=p(h[e],{theme:"dark",backgroundColor:"#141414"}),g[e].primary=g[e][5]}));var f=m.red,_=m.volcano,b=m.gold,y=m.orange,v=m.yellow,C=m.lime,S=m.green,w=m.cyan,E=m.blue,k=m.geekblue,x=m.purple,T=m.magenta,D=m.grey},45018:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(45358))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},48935:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(28367))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},8064:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(26399))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},22447:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(66124))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},81212:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(63915))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},54965:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(16785))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},31802:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(22801))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},30974:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(32743))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},24156:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(28325))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},97059:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(33349))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},9043:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(i=n(43580))&&i.__esModule?i:{default:i};t.default=r,e.exports=r},84364:(e,t,n)=>{"use strict";var i=n(99702),r=n(11791);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(96938)),a=i(n(18703)),s=i(n(63124)),c=i(n(76495)),l=r(n(616)),d=i(n(94184)),u=i(n(60693)),p=i(n(85371)),h=n(7757),m=n(1902),g=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];(0,h.setTwoToneColor)("#1890ff");var f=l.forwardRef((function(e,t){var n,i=e.className,r=e.icon,h=e.spin,f=e.rotate,_=e.tabIndex,b=e.onClick,y=e.twoToneColor,v=(0,c.default)(e,g),C=l.useContext(u.default).prefixCls,S=void 0===C?"anticon":C,w=(0,d.default)(S,(n={},(0,s.default)(n,"".concat(S,"-").concat(r.name),!!r.name),(0,s.default)(n,"".concat(S,"-spin"),!!h||"loading"===r.name),n),i),E=_;void 0===E&&b&&(E=-1);var k=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,x=(0,m.normalizeTwoToneColors)(y),T=(0,a.default)(x,2),D=T[0],A=T[1];return l.createElement("span",(0,o.default)((0,o.default)({role:"img","aria-label":r.name},v),{},{ref:t,tabIndex:E,onClick:b,className:w}),l.createElement(p.default,{icon:r,primaryColor:D,secondaryColor:A,style:k}))}));f.displayName="AntdIcon",f.getTwoToneColor=h.getTwoToneColor,f.setTwoToneColor=h.setTwoToneColor;var _=f;t.default=_},60693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(0,n(616).createContext)({});t.default=i},85371:(e,t,n)=>{"use strict";var i=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(76495)),o=i(n(96938)),a=n(1902),s=["icon","className","onClick","style","primaryColor","secondaryColor"],c={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var l=function(e){var t=e.icon,n=e.className,i=e.onClick,l=e.style,d=e.primaryColor,u=e.secondaryColor,p=(0,r.default)(e,s),h=c;if(d&&(h={primaryColor:d,secondaryColor:u||(0,a.getSecondaryColor)(d)}),(0,a.useInsertStyles)(),(0,a.warning)((0,a.isIconDefinition)(t),"icon should be icon definiton, but got ".concat(t)),!(0,a.isIconDefinition)(t))return null;var m=t;return m&&"function"==typeof m.icon&&(m=(0,o.default)((0,o.default)({},m),{},{icon:m.icon(h.primaryColor,h.secondaryColor)})),(0,a.generate)(m.icon,"svg-".concat(m.name),(0,o.default)({className:n,onClick:i,style:l,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},p))};l.displayName="IconReact",l.getTwoToneColors=function(){return(0,o.default)({},c)},l.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;c.primaryColor=t,c.secondaryColor=n||(0,a.getSecondaryColor)(t),c.calculated=!!n};var d=l;t.default=d},7757:(e,t,n)=>{"use strict";var i=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.setTwoToneColor=function(e){var t=(0,a.normalizeTwoToneColors)(e),n=(0,r.default)(t,2),i=n[0],s=n[1];return o.default.setTwoToneColors({primaryColor:i,secondaryColor:s})},t.getTwoToneColor=function(){var e=o.default.getTwoToneColors();if(!e.calculated)return e.primaryColor;return[e.primaryColor,e.secondaryColor]};var r=i(n(18703)),o=i(n(85371)),a=n(1902)},45358:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(85368)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CheckCircleFilled";var d=a.forwardRef(l);t.default=d},28367:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(16976)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CheckCircleOutlined";var d=a.forwardRef(l);t.default=d},26399:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(67303)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseCircleFilled";var d=a.forwardRef(l);t.default=d},66124:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(77384)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseCircleOutlined";var d=a.forwardRef(l);t.default=d},63915:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(79203)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="CloseOutlined";var d=a.forwardRef(l);t.default=d},16785:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(78515)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ExclamationCircleFilled";var d=a.forwardRef(l);t.default=d},22801:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(34950)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="ExclamationCircleOutlined";var d=a.forwardRef(l);t.default=d},32743:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(15369)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="InfoCircleFilled";var d=a.forwardRef(l);t.default=d},28325:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(20702)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="InfoCircleOutlined";var d=a.forwardRef(l);t.default=d},33349:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(25828)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="LoadingOutlined";var d=a.forwardRef(l);t.default=d},43580:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(96938)),a=i(n(616)),s=r(n(77307)),c=r(n(84364)),l=function(e,t){return a.createElement(c.default,(0,o.default)((0,o.default)({},e),{},{ref:t,icon:s.default}))};l.displayName="RightOutlined";var d=a.forwardRef(l);t.default=d},1902:(e,t,n)=>{"use strict";var i=n(11791),r=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.warning=function(e,t){(0,l.default)(e,"[@ant-design/icons] ".concat(t))},t.isIconDefinition=function(e){return"object"===(0,a.default)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,a.default)(e.icon)||"function"==typeof e.icon)},t.normalizeAttrs=p,t.generate=function e(t,n,i){if(!i)return c.default.createElement(t.tag,(0,o.default)({key:n},p(t.attrs)),(t.children||[]).map((function(i,r){return e(i,"".concat(n,"-").concat(t.tag,"-").concat(r))})));return c.default.createElement(t.tag,(0,o.default)((0,o.default)({key:n},p(t.attrs)),i),(t.children||[]).map((function(i,r){return e(i,"".concat(n,"-").concat(t.tag,"-").concat(r))})))},t.getSecondaryColor=function(e){return(0,s.generate)(e)[0]},t.normalizeTwoToneColors=function(e){if(!e)return[];return Array.isArray(e)?e:[e]},t.useInsertStyles=t.iconStyles=t.svgBaseProps=void 0;var o=r(n(96938)),a=r(n(872)),s=n(52608),c=i(n(616)),l=r(n(19011)),d=n(30465),u=r(n(60693));function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var i=e[n];if("class"===n)t.className=i,delete t.class;else t[n]=i;return t}),{})}t.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};var h="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";t.iconStyles=h;t.useInsertStyles=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=(0,c.useContext)(u.default),n=t.csp;(0,c.useEffect)((function(){(0,d.updateCSS)(e,"@ant-design-icons",{prepend:!0,csp:n})}),[])}},76491:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},63124:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},99702:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},11791:(e,t,n)=>{var i=n(872).default;function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=a?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(o,s,c):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},3070:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},53133:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},96938:(e,t,n)=>{var i=n(63124);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}e.exports=function(e){for(var t=1;t{var i=n(52676);e.exports=function(e,t){if(null==e)return{};var n,r,o=i(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},52676:e=>{e.exports=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r},e.exports.__esModule=!0,e.exports.default=e.exports},18703:(e,t,n)=>{var i=n(87148),r=n(3070),o=n(16094),a=n(53133);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},872:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},16094:(e,t,n)=>{var i=n(76491);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},95500:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},30465:(e,t,n)=>{"use strict";var i=n(99702);Object.defineProperty(t,"__esModule",{value:!0}),t.injectCSS=s,t.removeCSS=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=l(e,n);null==i||null===(t=i.parentNode)||void 0===t||t.removeChild(i)},t.updateCSS=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a(n);if(!c.has(i)){var r=s("",n),d=r.parentNode;c.set(i,d),d.removeChild(r)}var u=l(t,n);if(u){var p,h,m;if((null===(p=n.csp)||void 0===p?void 0:p.nonce)&&u.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))u.nonce=null===(m=n.csp)||void 0===m?void 0:m.nonce;return u.innerHTML!==e&&(u.innerHTML=e),u}var g=s(e,n);return g[o]=t,g};var r=i(n(95500)),o="rc-util-key";function a(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function s(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,r.default)())return null;var i,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(i=n.csp)||void 0===i?void 0:i.nonce);o.innerHTML=e;var s=a(n),c=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&c?s.insertBefore(o,c):s.appendChild(o),o}var c=new Map;function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a(t);return Array.from(c.get(n).children).find((function(t){return"STYLE"===t.tagName&&t[o]===e}))}},19011:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.call=o,t.default=void 0,t.note=r,t.noteOnce=function(e,t){o(r,e,t)},t.resetWarned=function(){n={}},t.warning=i,t.warningOnce=a;var n={};function i(e,t){0}function r(e,t){0}function o(e,t,i){t||n[i]||(e(!1,i),n[i]=!0)}function a(e,t){o(i,e,t)}var s=a;t.default=s},15048:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var i=n(50926),r=n(30495),o=n(616),a=n.n(o),s=n(53225),c=n(84),l=n(73382),d=n(23309),u=n(18446),p=n.n(u),h=n(75887),m=n(61016);function g(e){return"function"!=typeof e?null:e()}function f(e){return"object"===(0,r.Z)(e)&&e?e:null}var _=function(e,t){var n=e.children,r=e.disabled,o=e.target,u=e.align,_=e.onAlign,b=e.monitorWindowResize,y=e.monitorBufferTime,v=void 0===y?0:y,C=a().useRef({}),S=a().useRef(),w=a().Children.only(n),E=a().useRef({});E.current.disabled=r,E.current.target=o,E.current.align=u,E.current.onAlign=_;var k=(0,m.Z)((function(){var e=E.current,t=e.disabled,n=e.target,i=e.align,r=e.onAlign;if(!t&&n){var o,a=S.current,s=g(n),d=f(n);C.current.element=s,C.current.point=d,C.current.align=i;var u=document.activeElement;return s&&(0,c.Z)(s)?o=(0,l.E3)(a,s,i):d&&(o=(0,l.zy)(a,d,i)),(0,h.vg)(u,a),r&&o&&r(a,o),!0}return!1}),v),x=(0,i.Z)(k,2),T=x[0],D=x[1],A=a().useRef({cancel:function(){}}),I=a().useRef({cancel:function(){}});a().useEffect((function(){var e=g(o),t=f(o);S.current!==I.current.element&&(I.current.cancel(),I.current.element=S.current,I.current.cancel=(0,h.ri)(S.current,T)),C.current.element===e&&(0,h.CF)(C.current.point,t)&&p()(C.current.align,u)||(T(),A.current.element!==e&&(A.current.cancel(),A.current.element=e,A.current.cancel=(0,h.ri)(e,T)))})),a().useEffect((function(){r?D():T()}),[r]);var M=a().useRef(null);return a().useEffect((function(){b?M.current||(M.current=(0,d.Z)(window,"resize",T)):M.current&&(M.current.remove(),M.current=null)}),[b]),a().useEffect((function(){return function(){A.current.cancel(),I.current.cancel(),M.current&&M.current.remove(),D()}}),[]),a().useImperativeHandle(t,(function(){return{forceAlign:function(){return T(!0)}}})),a().isValidElement(w)&&(w=a().cloneElement(w,{ref:(0,s.sQ)(w.ref,S)})),w},b=a().forwardRef(_);b.displayName="Align";const y=b},61016:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(616),r=n.n(i);const o=function(e,t){var n=r().useRef(!1),i=r().useRef(null);function o(){window.clearTimeout(i.current)}return[function r(a){if(n.current&&!0!==a)o(),i.current=window.setTimeout((function(){n.current=!1,r()}),t);else{if(!1===e())return;n.current=!0,o(),i.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,o()}]}},81605:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=n(15048).Z},75887:(e,t,n)=>{"use strict";n.d(t,{CF:()=>a,vg:()=>s,ri:()=>c});var i=n(50926),r=n(91033),o=n(68179);function a(e,t){return e===t||!(!e||!t)&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&(e.clientX===t.clientX&&e.clientY===t.clientY))}function s(e,t){e!==document.activeElement&&(0,o.Z)(t,e)&&"function"==typeof e.focus&&e.focus()}function c(e,t){var n=null,o=null;var a=new r.default((function(e){var r=(0,i.Z)(e,1)[0].target;if(document.documentElement.contains(r)){var a=r.getBoundingClientRect(),s=a.width,c=a.height,l=Math.floor(s),d=Math.floor(c);n===l&&o===d||Promise.resolve().then((function(){t({width:l,height:d})})),n=l,o=d}}));return e&&a.observe(e),function(){a.disconnect()}}},23309:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(5868),r=n.n(i);function o(e,t,n,i){var o=r().unstable_batchedUpdates?function(e){r().unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,o,i),{remove:function(){e.removeEventListener&&e.removeEventListener(t,o)}}}},68179:(e,t,n)=>{"use strict";function i(e,t){return!!e&&e.contains(t)}n.d(t,{Z:()=>i})},84:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}},35497:(e,t,n)=>{"use strict";n(616)},53225:(e,t,n)=>{"use strict";n.d(t,{sQ:()=>o});var i=n(44677);n(59864),n(35497);function r(e,t){"function"==typeof e?e(t):"object"===(0,i.Z)(e)&&e&&"current"in e&&(e.current=t)}function o(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{Z:()=>c});var i=n(616),r=n(94184),o=n.n(r),a=n(91764),s=n(22487);function c(e){var t=e.className,n=e.style,r=i.useContext(a.p).prefixCls;return(0,s.xE)()?null:i.createElement("li",{className:o()("".concat(r,"-item-divider"),t),style:n})}},36976:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(13708),r=n(616);function o(e){var t=e.icon,n=e.props,o=e.children;return("function"==typeof t?r.createElement(t,(0,i.Z)({},n)):t)||o||null}},17040:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var i=n(77550),r=n(32365),o=n(13708),a=n(74218),s=n(50926),c=n(61666),l=n(616),d=n(94184),u=n.n(d),p=n(96774),h=n.n(p),m=n(28082),g=(n(84071),n(8791)),f=n(45530),_=n(75749),b=n(91764),y=n(62120),v=n(95189),C=n(48433),S=n(92288),w=n(21699),E=n(22487),k=n(75628),x=n(66791),T=n(27236),D=n(58301),A=["prefixCls","style","className","tabIndex","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],I=[];const M=l.forwardRef((function(e,t){var n,d,p=e.prefixCls,M=void 0===p?"rc-menu":p,R=e.style,P=e.className,O=e.tabIndex,N=void 0===O?0:O,L=e.children,F=e.direction,B=e.id,j=e.mode,z=void 0===j?"vertical":j,U=e.inlineCollapsed,W=e.disabled,V=e.disabledOverflow,H=e.subMenuOpenDelay,K=void 0===H?.1:H,$=e.subMenuCloseDelay,G=void 0===$?.1:$,q=e.forceSubMenuRender,Z=e.defaultOpenKeys,Y=e.openKeys,X=e.activeKey,Q=e.defaultActiveFirst,J=e.selectable,ee=void 0===J||J,te=e.multiple,ne=void 0!==te&&te,ie=e.defaultSelectedKeys,re=e.selectedKeys,oe=e.onSelect,ae=e.onDeselect,se=e.inlineIndent,ce=void 0===se?24:se,le=e.motion,de=e.defaultMotions,ue=e.triggerSubMenuAction,pe=void 0===ue?"hover":ue,he=e.builtinPlacements,me=e.itemIcon,ge=e.expandIcon,fe=e.overflowedIndicator,_e=void 0===fe?"...":fe,be=e.overflowedIndicatorPopupClassName,ye=e.getPopupContainer,ve=e.onClick,Ce=e.onOpenChange,Se=e.onKeyDown,we=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),Ee=e._internalRenderSubMenuItem,ke=(0,c.Z)(e,A),xe=(0,_.A)(L,I),Te=l.useState(!1),De=(0,s.Z)(Te,2),Ae=De[0],Ie=De[1],Me=l.useRef(),Re=(0,D.sQ)(Me,t),Pe=(0,w.Z)(B),Oe="rtl"===F;var Ne=l.useMemo((function(){return"inline"!==z&&"vertical"!==z||!U?[z,!1]:["vertical",U]}),[z,U]),Le=(0,s.Z)(Ne,2),Fe=Le[0],Be=Le[1],je=l.useState(0),ze=(0,s.Z)(je,2),Ue=ze[0],We=ze[1],Ve=Ue>=xe.length-1||"horizontal"!==Fe||V,He=(0,m.Z)(Z,{value:Y,postState:function(e){return e||I}}),Ke=(0,s.Z)(He,2),$e=Ke[0],Ge=Ke[1],qe=function(e){Ge(e),null==Ce||Ce(e)},Ze=l.useState($e),Ye=(0,s.Z)(Ze,2),Xe=Ye[0],Qe=Ye[1],Je="inline"===Fe,et=l.useRef(!1);l.useEffect((function(){Je&&Qe($e)}),[$e]),l.useEffect((function(){et.current?Je?Ge(Xe):qe(I):et.current=!0}),[Je]);var tt=(0,k.Z)(),nt=tt.registerPath,it=tt.unregisterPath,rt=tt.refreshOverflowKeys,ot=tt.isSubPathKey,at=tt.getKeyPath,st=tt.getKeys,ct=tt.getSubPathKeys,lt=l.useMemo((function(){return{registerPath:nt,unregisterPath:it}}),[nt,it]),dt=l.useMemo((function(){return{isSubPathKey:ot}}),[ot]);l.useEffect((function(){rt(Ve?I:xe.slice(Ue+1).map((function(e){return e.key})))}),[Ue,Ve]);var ut=(0,m.Z)(X||Q&&(null===(n=xe[0])||void 0===n?void 0:n.key),{value:X}),pt=(0,s.Z)(ut,2),ht=pt[0],mt=pt[1],gt=(0,y.Z)((function(e){mt(e)})),ft=(0,y.Z)((function(){mt(void 0)})),_t=(0,m.Z)(ie||[],{value:re,postState:function(e){return Array.isArray(e)?e:null==e?I:[e]}}),bt=(0,s.Z)(_t,2),yt=bt[0],vt=bt[1],Ct=(0,y.Z)((function(e){null==ve||ve((0,v.W)(e)),function(e){if(ee){var t,n=e.key,i=yt.includes(n);t=ne?i?yt.filter((function(e){return e!==n})):[].concat((0,a.Z)(yt),[n]):[n],vt(t);var r=(0,o.Z)((0,o.Z)({},e),{},{selectedKeys:t});i?null==ae||ae(r):null==oe||oe(r)}!ne&&$e.length&&"inline"!==Fe&&qe(I)}(e)})),St=(0,y.Z)((function(e,t){var n=$e.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Fe){var i=ct(e);n=n.filter((function(e){return!i.has(e)}))}h()($e,n)||qe(n)})),wt=(0,y.Z)(ye),Et=(0,S.Z)(Fe,ht,Oe,Pe,Me,st,at,mt,(function(e,t){var n=null!=t?t:!$e.includes(e);St(e,n)}),Se);l.useEffect((function(){Ie(!0)}),[]);var kt=l.useMemo((function(){return{_internalRenderMenuItem:we,_internalRenderSubMenuItem:Ee}}),[we,Ee]),xt="horizontal"!==Fe||V?xe:xe.map((function(e,t){return l.createElement(b.Z,{key:e.key,overflowDisabled:t>Ue},e)})),Tt=l.createElement(g.Z,(0,i.Z)({id:B,ref:Re,prefixCls:"".concat(M,"-overflow"),component:"ul",itemComponent:f.Z,className:u()(M,"".concat(M,"-root"),"".concat(M,"-").concat(Fe),P,(d={},(0,r.Z)(d,"".concat(M,"-inline-collapsed"),Be),(0,r.Z)(d,"".concat(M,"-rtl"),Oe),d)),dir:F,style:R,role:"menu",tabIndex:N,data:xt,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?xe.slice(-t):null;return l.createElement(C.Z,{eventKey:k.X,title:_e,disabled:Ve,internalPopupClose:0===t,popupClassName:be},n)},maxCount:"horizontal"!==Fe||V?g.Z.INVALIDATE:g.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){We(e)},onKeyDown:Et},ke));return l.createElement(T.Z.Provider,{value:kt},l.createElement(x.B5.Provider,{value:Pe},l.createElement(b.Z,{prefixCls:M,mode:Fe,openKeys:$e,rtl:Oe,disabled:W,motion:Ae?le:null,defaultMotions:Ae?de:null,activeKey:ht,onActive:gt,onInactive:ft,selectedKeys:yt,inlineIndent:ce,subMenuOpenDelay:K,subMenuCloseDelay:G,forceSubMenuRender:q,builtinPlacements:he,triggerSubMenuAction:pe,getPopupContainer:wt,itemIcon:me,expandIcon:ge,onItemClick:Ct,onOpenChange:St},l.createElement(E.Zi.Provider,{value:dt},Tt),l.createElement("div",{style:{display:"none"},"aria-hidden":!0},l.createElement(E.CI.Provider,{value:lt},xe)))))}))},45530:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var i=n(32365),r=n(13708),o=n(74218),a=n(77550),s=n(61666),c=n(7785),l=n(14403),d=n(57556),u=n(34774),p=n(616),h=n(94184),m=n.n(h),g=n(8791),f=n(84071),_=n(25690),b=n(5287),y=n(91764),v=n(40517),C=n(95189),S=n(36976),w=n(53396),E=n(22487),k=n(66791),x=n(27236),T=["title","attribute","elementRef"],D=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],A=["active"],I=function(e){(0,d.Z)(n,e);var t=(0,u.Z)(n);function n(){return(0,c.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.attribute,i=e.elementRef,r=(0,s.Z)(e,T),o=(0,b.Z)(r,["eventKey"]);return(0,f.ZP)(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),p.createElement(g.Z.Item,(0,a.Z)({},n,{title:"string"==typeof t?t:void 0},o,{ref:i}))}}]),n}(p.Component),M=function(e){var t,n=e.style,c=e.className,l=e.eventKey,d=(e.warnKey,e.disabled),u=e.itemIcon,h=e.children,g=e.role,f=e.onMouseEnter,b=e.onMouseLeave,T=e.onClick,M=e.onKeyDown,R=e.onFocus,P=(0,s.Z)(e,D),O=(0,k.z7)(l),N=p.useContext(y.p),L=N.prefixCls,F=N.onItemClick,B=N.disabled,j=N.overflowDisabled,z=N.itemIcon,U=N.selectedKeys,W=N.onActive,V=p.useContext(x.Z)._internalRenderMenuItem,H="".concat(L,"-item"),K=p.useRef(),$=p.useRef(),G=B||d,q=(0,E.Xl)(l);var Z=function(e){return{key:l,keyPath:(0,o.Z)(q).reverse(),item:K.current,domEvent:e}},Y=u||z,X=(0,v.Z)(l,G,f,b),Q=X.active,J=(0,s.Z)(X,A),ee=U.includes(l),te=(0,w.Z)(q.length),ne={};"option"===e.role&&(ne["aria-selected"]=ee);var ie=p.createElement(I,(0,a.Z)({ref:K,elementRef:$,role:null===g?"none":g||"menuitem",tabIndex:d?null:-1,"data-menu-id":j&&O?null:O},P,J,ne,{component:"li","aria-disabled":d,style:(0,r.Z)((0,r.Z)({},te),n),className:m()(H,(t={},(0,i.Z)(t,"".concat(H,"-active"),Q),(0,i.Z)(t,"".concat(H,"-selected"),ee),(0,i.Z)(t,"".concat(H,"-disabled"),G),t),c),onClick:function(e){if(!G){var t=Z(e);null==T||T((0,C.W)(t)),F(t)}},onKeyDown:function(e){if(null==M||M(e),e.which===_.Z.ENTER){var t=Z(e);null==T||T((0,C.W)(t)),F(t)}},onFocus:function(e){W(l),null==R||R(e)}}),h,p.createElement(S.Z,{props:(0,r.Z)((0,r.Z)({},e),{},{isSelected:ee}),icon:Y}));return V&&(ie=V(ie,e,{selected:ee})),ie};const R=function(e){var t=e.eventKey,n=(0,E.xE)(),i=(0,E.Xl)(t);return p.useEffect((function(){if(n)return n.registerPath(t,i),function(){n.unregisterPath(t,i)}}),[i]),n?null:p.createElement(M,e)}},64716:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var i=n(77550),r=n(61666),o=n(616),a=n(94184),s=n.n(a),c=n(5287),l=n(75749),d=n(91764),u=n(22487),p=["className","title","eventKey","children"],h=["children"],m=function(e){var t=e.className,n=e.title,a=(e.eventKey,e.children),c=(0,r.Z)(e,p),l=o.useContext(d.p).prefixCls,u="".concat(l,"-item-group");return o.createElement("li",(0,i.Z)({},c,{onClick:function(e){return e.stopPropagation()},className:s()(u,t)}),o.createElement("div",{className:"".concat(u,"-title"),title:"string"==typeof n?n:void 0},n),o.createElement("ul",{className:"".concat(u,"-list")},a))};function g(e){var t=e.children,n=(0,r.Z)(e,h),i=(0,u.Xl)(n.eventKey),a=(0,l.A)(t,i);return(0,u.xE)()?a:o.createElement(m,(0,c.Z)(n,["warnKey"]),a)}},13933:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(77550),r=n(13708),o=n(50926),a=n(616),s=n(93587),c=n(40441),l=n(91764),d=n(15331);function u(e){var t=e.id,n=e.open,u=e.keyPath,p=e.children,h="inline",m=a.useContext(l.p),g=m.prefixCls,f=m.forceSubMenuRender,_=m.motion,b=m.defaultMotions,y=m.mode,v=a.useRef(!1);v.current=y===h;var C=a.useState(!v.current),S=(0,o.Z)(C,2),w=S[0],E=S[1],k=!!v.current&&n;a.useEffect((function(){v.current&&E(!1)}),[y]);var x=(0,r.Z)({},(0,c.g)(h,_,b));u.length>1&&(x.motionAppear=!1);var T=x.onVisibleChanged;return x.onVisibleChanged=function(e){return v.current||e||E(!0),null==T?void 0:T(e)},w?null:a.createElement(l.Z,{mode:h,locked:!v.current},a.createElement(s.Z,(0,i.Z)({visible:k},x,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(g,"-hidden")}),(function(e){var n=e.className,i=e.style;return a.createElement(d.Z,{id:t,className:n,style:i},p)})))}},15621:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var i=n(32365),r=n(13708),o=n(50926),a=n(616),s=n(84157),c=n(94184),l=n.n(c),d=n(64780),u=n(91764),p=n(52930),h=n(40441),m={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function g(e){var t=e.prefixCls,n=e.visible,c=e.children,g=e.popup,f=e.popupClassName,_=e.popupOffset,b=e.disabled,y=e.mode,v=e.onVisibleChange,C=a.useContext(u.p),S=C.getPopupContainer,w=C.rtl,E=C.subMenuOpenDelay,k=C.subMenuCloseDelay,x=C.builtinPlacements,T=C.triggerSubMenuAction,D=C.forceSubMenuRender,A=C.motion,I=C.defaultMotions,M=a.useState(!1),R=(0,o.Z)(M,2),P=R[0],O=R[1],N=w?(0,r.Z)((0,r.Z)({},p.lU),x):(0,r.Z)((0,r.Z)({},p.Ct),x),L=m[y],F=(0,h.g)(y,A,I),B=(0,r.Z)((0,r.Z)({},F),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),j=a.useRef();return a.useEffect((function(){return j.current=(0,d.Z)((function(){O(n)})),function(){d.Z.cancel(j.current)}}),[n]),a.createElement(s.Z,{prefixCls:t,popupClassName:l()("".concat(t,"-popup"),(0,i.Z)({},"".concat(t,"-rtl"),w),f),stretch:"horizontal"===y?"minWidth":null,getPopupContainer:S,builtinPlacements:N,popupPlacement:L,popupVisible:P,popup:g,popupAlign:_&&{offset:_},action:b?[]:[T],mouseEnterDelay:E,mouseLeaveDelay:k,onPopupVisibleChange:v,forceRender:D,popupMotion:B},c)}},15331:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var i=n(77550),r=n(61666),o=n(616),a=n(94184),s=n.n(a),c=n(91764),l=["className","children"],d=function(e,t){var n=e.className,a=e.children,d=(0,r.Z)(e,l),u=o.useContext(c.p),p=u.prefixCls,h=u.mode,m=u.rtl;return o.createElement("ul",(0,i.Z)({className:s()(p,m&&"".concat(p,"-rtl"),"".concat(p,"-sub"),"".concat(p,"-").concat("inline"===h?"inline":"vertical"),n)},d,{"data-menu-list":!0,ref:t}),a)},u=o.forwardRef(d);u.displayName="SubMenuList";const p=u},48433:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});var i=n(32365),r=n(77550),o=n(13708),a=n(50926),s=n(61666),c=n(616),l=n(94184),d=n.n(l),u=n(8791),p=(n(84071),n(15331)),h=n(75749),m=n(91764),g=n(62120),f=n(15621),_=n(36976),b=n(40517),y=n(95189),v=n(53396),C=n(13933),S=n(22487),w=n(66791),E=n(27236),k=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],x=["active"],T=function(e){var t,n=e.style,l=e.className,h=e.title,T=e.eventKey,D=(e.warnKey,e.disabled),A=e.internalPopupClose,I=e.children,M=e.itemIcon,R=e.expandIcon,P=e.popupClassName,O=e.popupOffset,N=e.onClick,L=e.onMouseEnter,F=e.onMouseLeave,B=e.onTitleClick,j=e.onTitleMouseEnter,z=e.onTitleMouseLeave,U=(0,s.Z)(e,k),W=(0,w.z7)(T),V=c.useContext(m.p),H=V.prefixCls,K=V.mode,$=V.openKeys,G=V.disabled,q=V.overflowDisabled,Z=V.activeKey,Y=V.selectedKeys,X=V.itemIcon,Q=V.expandIcon,J=V.onItemClick,ee=V.onOpenChange,te=V.onActive,ne=c.useContext(E.Z)._internalRenderSubMenuItem,ie=c.useContext(S.Zi).isSubPathKey,re=(0,S.Xl)(),oe="".concat(H,"-submenu"),ae=G||D,se=c.useRef(),ce=c.useRef();var le=M||X,de=R||Q,ue=$.includes(T),pe=!q&&ue,he=ie(Y,T),me=(0,b.Z)(T,ae,j,z),ge=me.active,fe=(0,s.Z)(me,x),_e=c.useState(!1),be=(0,a.Z)(_e,2),ye=be[0],ve=be[1],Ce=function(e){ae||ve(e)},Se=c.useMemo((function(){return ge||"inline"!==K&&(ye||ie([Z],T))}),[K,ge,Z,ye,T,ie]),we=(0,v.Z)(re.length),Ee=(0,g.Z)((function(e){null==N||N((0,y.W)(e)),J(e)})),ke=W&&"".concat(W,"-popup"),xe=c.createElement("div",(0,r.Z)({role:"menuitem",style:we,className:"".concat(oe,"-title"),tabIndex:ae?null:-1,ref:se,title:"string"==typeof h?h:null,"data-menu-id":q&&W?null:W,"aria-expanded":pe,"aria-haspopup":!0,"aria-controls":ke,"aria-disabled":ae,onClick:function(e){ae||(null==B||B({key:T,domEvent:e}),"inline"===K&&ee(T,!ue))},onFocus:function(){te(T)}},fe),h,c.createElement(_.Z,{icon:"horizontal"!==K?de:null,props:(0,o.Z)((0,o.Z)({},e),{},{isOpen:pe,isSubMenu:!0})},c.createElement("i",{className:"".concat(oe,"-arrow")}))),Te=c.useRef(K);if("inline"!==K&&(Te.current=re.length>1?"vertical":K),!q){var De=Te.current;xe=c.createElement(f.Z,{mode:De,prefixCls:oe,visible:!A&&pe&&"inline"!==K,popupClassName:P,popupOffset:O,popup:c.createElement(m.Z,{mode:"horizontal"===De?"vertical":De},c.createElement(p.Z,{id:ke,ref:ce},I)),disabled:ae,onVisibleChange:function(e){"inline"!==K&&ee(T,e)}},xe)}var Ae=c.createElement(u.Z.Item,(0,r.Z)({role:"none"},U,{component:"li",style:n,className:d()(oe,"".concat(oe,"-").concat(K),l,(t={},(0,i.Z)(t,"".concat(oe,"-open"),pe),(0,i.Z)(t,"".concat(oe,"-active"),Se),(0,i.Z)(t,"".concat(oe,"-selected"),he),(0,i.Z)(t,"".concat(oe,"-disabled"),ae),t)),onMouseEnter:function(e){Ce(!0),null==L||L({key:T,domEvent:e})},onMouseLeave:function(e){Ce(!1),null==F||F({key:T,domEvent:e})}}),xe,!q&&c.createElement(C.Z,{id:ke,open:pe,keyPath:re},I));return ne&&(Ae=ne(Ae,e,{selected:he,active:Se,open:pe,disabled:ae})),c.createElement(m.Z,{onItemClick:Ee,mode:"horizontal"===K?"vertical":K,itemIcon:le,expandIcon:de},Ae)};function D(e){var t,n=e.eventKey,i=e.children,r=(0,S.Xl)(n),o=(0,h.A)(i,r),a=(0,S.xE)();return c.useEffect((function(){if(a)return a.registerPath(n,r),function(){a.unregisterPath(n,r)}}),[r]),t=a?o:c.createElement(T,e,o),c.createElement(S.Y8.Provider,{value:r},t)}},66791:(e,t,n)=>{"use strict";n.d(t,{B5:()=>r,E4:()=>o,z7:()=>a});var i=n(616),r=i.createContext(null);function o(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function a(e){return o(i.useContext(r),e)}},91764:(e,t,n)=>{"use strict";n.d(t,{p:()=>d,Z:()=>u});var i=n(61666),r=n(13708),o=n(616),a=n(64202),s=n(96774),c=n.n(s),l=["children","locked"],d=o.createContext(null);function u(e){var t=e.children,n=e.locked,s=(0,i.Z)(e,l),u=o.useContext(d),p=(0,a.Z)((function(){return e=u,t=s,n=(0,r.Z)({},e),Object.keys(t).forEach((function(e){var i=t[e];void 0!==i&&(n[e]=i)})),n;var e,t,n}),[u,s],(function(e,t){return!(n||e[0]===t[0]&&c()(e[1],t[1]))}));return o.createElement(d.Provider,{value:p},t)}},22487:(e,t,n)=>{"use strict";n.d(t,{CI:()=>a,xE:()=>s,Y8:()=>c,Xl:()=>l,Zi:()=>d});var i=n(74218),r=n(616),o=[],a=r.createContext(null);function s(){return r.useContext(a)}var c=r.createContext(o);function l(e){var t=r.useContext(c);return r.useMemo((function(){return void 0!==e?[].concat((0,i.Z)(t),[e]):t}),[t,e])}var d=r.createContext(null)},27236:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(616);const r=i.createContext({})},92288:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var i=n(32365),r=n(616),o=n(25690),a=n(64780),s=n(62607),c=n(66791),l=o.Z.LEFT,d=o.Z.RIGHT,u=o.Z.UP,p=o.Z.DOWN,h=o.Z.ENTER,m=o.Z.ESC,g=o.Z.HOME,f=o.Z.END,_=[u,p,l,d];function b(e,t){return(0,s.tS)(e,!0).filter((function(e){return t.has(e)}))}function y(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var r=b(e,t),o=r.length,a=r.findIndex((function(e){return n===e}));return i<0?-1===a?a=o-1:a-=1:i>0&&(a+=1),r[a=(a+o)%o]}function v(e,t,n,o,s,v,C,S,w,E){var k=r.useRef(),x=r.useRef();x.current=t;var T=function(){a.Z.cancel(k.current)};return r.useEffect((function(){return function(){T()}}),[]),function(r){var D=r.which;if([].concat(_,[h,m,g,f]).includes(D)){var A,I,M,R=function(){return A=new Set,I=new Map,M=new Map,v().forEach((function(e){var t=document.querySelector("[data-menu-id='".concat((0,c.E4)(o,e),"']"));t&&(A.add(t),M.set(t,e),I.set(e,t))})),A};R();var P=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(I.get(t),A),O=M.get(P),N=function(e,t,n,r){var o,a,s,c,g="prev",f="next",_="children",b="parent";if("inline"===e&&r===h)return{inlineTrigger:!0};var y=(o={},(0,i.Z)(o,u,g),(0,i.Z)(o,p,f),o),v=(a={},(0,i.Z)(a,l,n?f:g),(0,i.Z)(a,d,n?g:f),(0,i.Z)(a,p,_),(0,i.Z)(a,h,_),a),C=(s={},(0,i.Z)(s,u,g),(0,i.Z)(s,p,f),(0,i.Z)(s,h,_),(0,i.Z)(s,m,b),(0,i.Z)(s,l,n?_:b),(0,i.Z)(s,d,n?b:_),s);switch(null===(c={inline:y,horizontal:v,vertical:C,inlineSub:y,horizontalSub:C,verticalSub:C}["".concat(e).concat(t?"":"Sub")])||void 0===c?void 0:c[r]){case g:return{offset:-1,sibling:!0};case f:return{offset:1,sibling:!0};case b:return{offset:-1,sibling:!1};case _:return{offset:1,sibling:!1};default:return null}}(e,1===C(O,!0).length,n,D);if(!N&&D!==g&&D!==f)return;(_.includes(D)||[g,f].includes(D))&&r.preventDefault();var L=function(e){if(e){var t=e,n=e.querySelector("a");(null==n?void 0:n.getAttribute("href"))&&(t=n);var i=M.get(e);S(i),T(),k.current=(0,a.Z)((function(){x.current===i&&t.focus()}))}};if([g,f].includes(D)||N.sibling||!P){var F,B,j=b(F=P&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(P):s.current,A);B=D===g?j[0]:D===f?j[j.length-1]:y(F,A,P,N.offset),L(B)}else if(N.inlineTrigger)w(O);else if(N.offset>0)w(O,!0),T(),k.current=(0,a.Z)((function(){R();var e=P.getAttribute("aria-controls"),t=y(document.getElementById(e),A);L(t)}),5);else if(N.offset<0){var z=C(O,!0),U=z[z.length-2],W=I.get(U);w(U,!1),L(W)}}null==E||E(r)}}},40517:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(616),r=n(91764);function o(e,t,n,o){var a=i.useContext(r.p),s=a.activeKey,c=a.onActive,l=a.onInactive,d={active:s===e};return t||(d.onMouseEnter=function(t){null==n||n({key:e,domEvent:t}),c(e)},d.onMouseLeave=function(t){null==o||o({key:e,domEvent:t}),l(e)}),d}},53396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(616),r=n(91764);function o(e){var t=i.useContext(r.p),n=t.mode,o=t.rtl,a=t.inlineIndent;if("inline"!==n)return null;return o?{paddingRight:e*a}:{paddingLeft:e*a}}},75628:(e,t,n)=>{"use strict";n.d(t,{X:()=>l,Z:()=>d});var i=n(74218),r=n(50926),o=n(616),a=(n(84071),n(59432)),s="__RC_UTIL_PATH_SPLIT__",c=function(e){return e.join(s)},l="rc-menu-more";function d(){var e=o.useState({}),t=(0,r.Z)(e,2)[1],n=(0,o.useRef)(new Map),d=(0,o.useRef)(new Map),u=o.useState([]),p=(0,r.Z)(u,2),h=p[0],m=p[1],g=(0,o.useRef)(0),f=(0,o.useRef)(!1),_=(0,o.useCallback)((function(e,i){var r=c(i);d.current.set(r,e),n.current.set(e,r),g.current+=1;var o=g.current;(0,a.T)((function(){o===g.current&&(f.current||t({}))}))}),[]),b=(0,o.useCallback)((function(e,t){var i=c(t);d.current.delete(i),n.current.delete(e)}),[]),y=(0,o.useCallback)((function(e){m(e)}),[]),v=(0,o.useCallback)((function(e,t){var i=n.current.get(e)||"",r=i.split(s);return t&&h.includes(r[0])&&r.unshift(l),r}),[h]),C=(0,o.useCallback)((function(e,t){return e.some((function(e){return v(e,!0).includes(t)}))}),[v]),S=(0,o.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(s),r=new Set;return(0,i.Z)(d.current.keys()).forEach((function(e){e.startsWith(t)&&r.add(d.current.get(e))})),r}),[]);return o.useEffect((function(){return function(){f.current=!0}}),[]),{registerPath:_,unregisterPath:b,refreshOverflowKeys:y,isSubPathKey:C,getKeyPath:v,getKeys:function(){var e=(0,i.Z)(n.current.keys());return h.length&&e.push(l),e},getSubPathKeys:S}}},62120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(616);function r(e){var t=i.useRef(e);t.current=e;var n=i.useCallback((function(){for(var e,n=arguments.length,i=new Array(n),r=0;r{"use strict";n.d(t,{Z:()=>c});var i=n(50926),r=n(616),o=n(28082),a=Math.random().toFixed(5).toString().slice(2),s=0;function c(e){var t=(0,o.Z)(e,{value:e}),n=(0,i.Z)(t,2),c=n[0],l=n[1];return r.useEffect((function(){s+=1;var e="".concat(a,"-").concat(s);l("rc-menu-uuid-".concat(e))}),[]),c}},50844:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SubMenu:()=>o.Z,Item:()=>r.Z,MenuItem:()=>r.Z,MenuItemGroup:()=>a.Z,ItemGroup:()=>a.Z,Divider:()=>c.Z,useFullPath:()=>l,default:()=>u});var i=n(17040),r=n(45530),o=n(48433),a=n(64716),s=n(22487),c=n(11162),l=s.Xl,d=i.Z;d.Item=r.Z,d.SubMenu=o.Z,d.ItemGroup=a.Z,d.Divider=c.Z;const u=d},52930:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>r,lU:()=>o});var i={adjustX:1,adjustY:1},r={topLeft:{points:["bl","tl"],overflow:i,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:i,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:i,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:i,offset:[4,0]}},o={topLeft:{points:["bl","tl"],overflow:i,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:i,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:i,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:i,offset:[4,0]}}},40441:(e,t,n)=>{"use strict";function i(e,t,n){return t||(n?n[e]||n.other:void 0)}n.d(t,{g:()=>i})},75749:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(74218),r=n(616),o=n(44250);function a(e,t){return(0,o.Z)(e).map((function(e,n){if(r.isValidElement(e)){var o,a,s=e.key,c=null!==(o=null===(a=e.props)||void 0===a?void 0:a.eventKey)&&void 0!==o?o:s;null==c&&(c="tmp_key-".concat([].concat((0,i.Z)(t),[n]).join("-")));var l={key:c,eventKey:c};return r.cloneElement(e,l)}return e}))}},59432:(e,t,n)=>{"use strict";function i(e){Promise.resolve().then(e)}n.d(t,{T:()=>i})},95189:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(61666),r=n(84071),o=["item"];function a(e){var t=e.item,n=(0,i.Z)(e,o);return Object.defineProperty(n,"item",{get:function(){return(0,r.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}},44250:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(616),r=n.n(i),o=n(59864);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r().Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(a(e)):(0,o.isFragment)(e)&&e.props?n=n.concat(a(e.props.children,t)):n.push(e))})),n}},62607:(e,t,n)=>{"use strict";n.d(t,{tS:()=>a});var i=n(90769),r=n(53840);function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,r.Z)(e)){var n=e.nodeName.toLowerCase(),i=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),s=null;return o&&!Number.isNaN(a)?s=a:i&&null===s&&(s=0),i&&e.disabled&&(s=null),null!==s&&(s>=0||t&&s<0)}return!1}function a(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,i.Z)(e.querySelectorAll("*")).filter((function(e){return o(e,t)}));return o(e,t)&&n.unshift(e),n}},53840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}},25690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=i.F1&&t<=i.F12)return!1;switch(t){case i.ALT:case i.CAPS_LOCK:case i.CONTEXT_MENU:case i.CTRL:case i.DOWN:case i.END:case i.ESC:case i.HOME:case i.INSERT:case i.LEFT:case i.MAC_FF_META:case i.META:case i.NUMLOCK:case i.NUM_CENTER:case i.PAGE_DOWN:case i.PAGE_UP:case i.PAUSE:case i.PRINT_SCREEN:case i.RIGHT:case i.SHIFT:case i.UP:case i.WIN_KEY:case i.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=i.ZERO&&e<=i.NINE)return!0;if(e>=i.NUM_ZERO&&e<=i.NUM_MULTIPLY)return!0;if(e>=i.A&&e<=i.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case i.SPACE:case i.QUESTION_MARK:case i.NUM_PLUS:case i.NUM_MINUS:case i.NUM_PERIOD:case i.NUM_DIVISION:case i.SEMICOLON:case i.DASH:case i.EQUALS:case i.COMMA:case i.PERIOD:case i.SLASH:case i.APOSTROPHE:case i.SINGLE_QUOTE:case i.OPEN_SQUARE_BRACKET:case i.BACKSLASH:case i.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const r=i},64202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(616);function r(e,t,n){var r=i.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value}},28082:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(88950),r=n(616),o=n(51537);function a(e,t){var n=t||{},a=n.defaultValue,s=n.value,c=n.onChange,l=n.postState,d=(0,o.Z)((function(){return void 0!==s?s:void 0!==a?"function"==typeof a?a():a:"function"==typeof e?e():e})),u=(0,i.Z)(d,2),p=u[0],h=u[1],m=void 0!==s?s:p;l&&(m=l(m));var g=r.useRef(c);g.current=c;var f=r.useCallback((function(e,t){h(e,t),m!==e&&g.current&&g.current(e,m)}),[m,g]),_=r.useRef(s);return r.useEffect((function(){void 0===s&&s!==_.current&&h(s),_.current=s}),[s]),[m,f]}},51537:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(88950),r=n(616);function o(e){var t=r.useRef(!1),n=r.useState(e),o=(0,i.Z)(n,2),a=o[0],s=o[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||s(e)}]}},5287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(98497);function r(e,t){var n=(0,i.Z)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},64780:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(i=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var o=0,a=new Map;function s(e){a.delete(e)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=o+=1;function r(t){if(0===t)s(n),e();else{var o=i((function(){r(t-1)}));a.set(n,o)}}return r(t),n}c.cancel=function(e){var t=a.get(e);return s(t),r(t)}},58301:(e,t,n)=>{"use strict";n.d(t,{sQ:()=>o});var i=n(82820);n(59864),n(64202);function r(e,t){"function"==typeof e?e(t):"object"===(0,i.Z)(e)&&e&&"current"in e&&(e.current=t)}function o(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{ZP:()=>a});var i={};function r(e,t){0}function o(e,t,n){t||i[n]||(e(!1,n),i[n]=!0)}const a=function(e,t){o(r,e,t)}},95053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(24879),r=n(3393),o=n(616),a=n(94184),s=n.n(a),c=n(93587),l=n(75667);function d(e){var t=e.prefixCls,n=e.visible,a=e.zIndex,d=e.mask,u=e.maskMotion,p=e.maskAnimation,h=e.maskTransitionName;if(!d)return null;var m={};return(u||h||p)&&(m=(0,r.Z)({motionAppear:!0},(0,l.g)({motion:u,prefixCls:t,transitionName:h,animation:p}))),o.createElement(c.Z,(0,i.Z)({},m,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return o.createElement("div",{style:{zIndex:a},className:s()("".concat(t,"-mask"),n)})}))}},44095:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(24879),r=n(3393),o=n(616),a=n(93587),s=n(94184),c=n.n(s),l=o.forwardRef((function(e,t){var n=e.prefixCls,s=e.visible,l=e.zIndex,d=e.children,u=e.mobile,p=(u=void 0===u?{}:u).popupClassName,h=u.popupStyle,m=u.popupMotion,g=void 0===m?{}:m,f=u.popupRender,_=o.useRef();o.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return _.current}}}));var b=(0,r.Z)({zIndex:l},h),y=d;return o.Children.count(d)>1&&(y=o.createElement("div",{className:"".concat(n,"-content")},d)),f&&(y=f(y)),o.createElement(a.Z,(0,i.Z)({visible:s,ref:_,removeOnLeave:!0},g),(function(e,t){var i=e.className,a=e.style,s=c()(n,p,i);return o.createElement("div",{ref:t,className:s,style:(0,r.Z)((0,r.Z)({},a),b)},y)}))}));l.displayName="MobilePopupInner";const d=l},70513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var i=n(24879),r=n(3393),o=n(75537),a=n(616),s=n(81605),c=n(77750),l=n(93587),d=n(94184),u=n.n(d),p=n(34674),h=n(75667),m=n(71911),g=a.forwardRef((function(e,t){var n=e.visible,d=e.prefixCls,g=e.className,f=e.style,_=e.children,b=e.zIndex,y=e.stretch,v=e.destroyPopupOnHide,C=e.forceRender,S=e.align,w=e.point,E=e.getRootDomNode,k=e.getClassNameFromAlign,x=e.onAlign,T=e.onMouseEnter,D=e.onMouseLeave,A=e.onMouseDown,I=e.onTouchStart,M=(0,a.useRef)(),R=(0,a.useRef)(),P=(0,a.useState)(),O=(0,o.Z)(P,2),N=O[0],L=O[1],F=(0,m.Z)(y),B=(0,o.Z)(F,2),j=B[0],z=B[1];var U=(0,p.Z)(n,(function(){y&&z(E())})),W=(0,o.Z)(U,2),V=W[0],H=W[1],K=(0,a.useState)(null),$=(0,o.Z)(K,2),G=$[0],q=$[1],Z=(0,a.useRef)();function Y(){var e;null===(e=M.current)||void 0===e||e.forceAlign()}function X(e,t){var n=k(t);N!==n&&L(n),q(t),"align"===V&&(null==x||x(e,t))}(0,c.Z)((function(){if(G&&"align"===V){var e=k(G);N!==e?Y():H((function(){var e;null===(e=Z.current)||void 0===e||e.call(Z)}))}}),[G]);var Q=(0,r.Z)({},(0,h.g)(e));function J(){return new Promise((function(e){Z.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=Q[e];Q[e]=function(e,n){return H(),null==t?void 0:t(e,n)}})),a.useEffect((function(){Q.motionName||"motion"!==V||H()}),[Q.motionName,V]),a.useImperativeHandle(t,(function(){return{forceAlign:Y,getElement:function(){return R.current}}}));var ee=(0,r.Z)((0,r.Z)({},j),{},{zIndex:b,opacity:"motion"!==V&&"stable"!==V&&n?0:void 0,pointerEvents:n||"stable"===V?void 0:"none"},f),te=!0;!(null==S?void 0:S.points)||"align"!==V&&"stable"!==V||(te=!1);var ne=_;return a.Children.count(_)>1&&(ne=a.createElement("div",{className:"".concat(d,"-content")},_)),a.createElement(l.Z,(0,i.Z)({visible:n,ref:R,leavedClassName:"".concat(d,"-hidden")},Q,{onAppearPrepare:J,onEnterPrepare:J,removeOnLeave:v,forceRender:C}),(function(e,t){var n=e.className,i=e.style,o=u()(d,g,N,n);return a.createElement(s.Z,{target:w||E,key:"popup",ref:M,monitorWindowResize:!0,disabled:te,align:S,onAlign:X},a.createElement("div",{ref:t,className:o,onMouseEnter:T,onMouseLeave:D,onMouseDownCapture:A,onTouchStartCapture:I,style:(0,r.Z)((0,r.Z)({},i),ee)},ne))}))}));g.displayName="PopupInner";const f=g},37808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var i=n(24879),r=n(3393),o=n(75537),a=n(31657),s=n(616),c=n(84101),l=n(95053),d=n(70513),u=n(44095),p=["visible","mobile"],h=s.forwardRef((function(e,t){var n=e.visible,h=e.mobile,m=(0,a.Z)(e,p),g=(0,s.useState)(n),f=(0,o.Z)(g,2),_=f[0],b=f[1],y=(0,s.useState)(!1),v=(0,o.Z)(y,2),C=v[0],S=v[1],w=(0,r.Z)((0,r.Z)({},m),{},{visible:_});(0,s.useEffect)((function(){b(n),n&&h&&S((0,c.Z)())}),[n,h]);var E=C?s.createElement(u.Z,(0,i.Z)({},w,{mobile:h,ref:t})):s.createElement(d.Z,(0,i.Z)({},w,{ref:t}));return s.createElement("div",null,s.createElement(l.Z,w),E)}));h.displayName="Popup";const m=h},71911:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(75537),r=n(616);const o=function(e){var t=r.useState({width:0,height:0}),n=(0,i.Z)(t,2),o=n[0],a=n[1];return[r.useMemo((function(){var t={};if(e){var n=o.width,i=o.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,o]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}},34674:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(11397),r=n.n(i),o=n(96933),a=n(75537),s=n(616),c=n(76859),l=n(28640),d=["measure","align",null,"motion"];const u=function(e,t){var n=(0,l.Z)(null),i=(0,a.Z)(n,2),u=i[0],p=i[1],h=(0,s.useRef)();function m(e){p(e,!0)}function g(){c.Z.cancel(h.current)}return(0,s.useEffect)((function(){m("measure")}),[e]),(0,s.useEffect)((function(){if("measure"===u)t();u&&(h.current=(0,c.Z)((0,o.Z)(r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=d.indexOf(u),(n=d[t+1])&&-1!==t&&m(n);case 3:case"end":return e.stop()}}),e)})))))}),[u]),(0,s.useEffect)((function(){return function(){g()}}),[]),[u,function(e){g(),h.current=(0,c.Z)((function(){m((function(e){switch(u){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}},61819:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(616);const r=i.createContext(null)},84157:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});var i=n(3393),r=n(24879),o=n(83762),a=n(50642),s=n(34779),c=n(87956),l=n(746),d=n(616),u=n(5868),p=n.n(u),h=n(76859),m=n(53709),g=n(96472),f=n(51895),_=n(65635),b=n(25952),y=n(94184),v=n.n(y),C=n(49209),S=n(37808),w=n(61819);function E(){}function k(){return""}function x(e){return e?e.ownerDocument:window.document}var T=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const D=(A=b.Z,I=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e){var i,a;return(0,o.Z)(this,n),(i=t.call(this,e)).popupRef=d.createRef(),i.triggerRef=d.createRef(),i.portalContainer=void 0,i.attachId=void 0,i.clickOutsideHandler=void 0,i.touchOutsideHandler=void 0,i.contextMenuOutsideHandler1=void 0,i.contextMenuOutsideHandler2=void 0,i.mouseDownTimeout=void 0,i.focusTime=void 0,i.preClickTime=void 0,i.preTouchTime=void 0,i.delayTimer=void 0,i.hasPopupMouseDown=void 0,i.onMouseEnter=function(e){var t=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",e),i.delaySetPopupVisible(!0,t,t?null:e)},i.onMouseMove=function(e){i.fireEvents("onMouseMove",e),i.setPoint(e)},i.onMouseLeave=function(e){i.fireEvents("onMouseLeave",e),i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onPopupMouseEnter=function(){i.clearDelayTimer()},i.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&(0,m.Z)(null===(t=i.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(e){i.fireEvents("onFocus",e),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(e){i.fireEvents("onMouseDown",e),i.preClickTime=Date.now()},i.onTouchStart=function(e){i.fireEvents("onTouchStart",e),i.preTouchTime=Date.now()},i.onBlur=function(e){i.fireEvents("onBlur",e),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(e){e.preventDefault(),i.fireEvents("onContextMenu",e),i.setPopupVisible(!0,e)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(e){if(i.fireEvents("onClick",e),i.focusTime){var t;if(i.preClickTime&&i.preTouchTime?t=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?t=i.preClickTime:i.preTouchTime&&(t=i.preTouchTime),Math.abs(t-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!i.state.popupVisible;(i.isClickToHide()&&!n||n&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,e)},i.onPopupMouseDown=function(){var e;i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout((function(){i.hasPopupMouseDown=!1}),0),i.context&&(e=i.context).onPopupMouseDown.apply(e,arguments)},i.onDocumentClick=function(e){if(!i.props.mask||i.props.maskClosable){var t=e.target,n=i.getRootDomNode(),r=i.getPopupDomNode();(0,m.Z)(n,t)&&!i.isContextMenuOnly()||(0,m.Z)(r,t)||i.hasPopupMouseDown||i.close()}},i.getRootDomNode=function(){var e=i.props.getTriggerDOMNode;if(e)return e(i.triggerRef.current);try{var t=(0,g.Z)(i.triggerRef.current);if(t)return t}catch(e){}return p().findDOMNode((0,s.Z)(i))},i.getPopupClassNameFromAlign=function(e){var t=[],n=i.props,r=n.popupPlacement,o=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,c=n.getPopupClassNameFromAlign;return r&&o&&t.push((0,C.b)(o,a,e,s)),c&&t.push(c(e)),t.join(" ")},i.getComponent=function(){var e=i.props,t=e.prefixCls,n=e.destroyPopupOnHide,o=e.popupClassName,a=e.onPopupAlign,s=e.popupMotion,c=e.popupAnimation,l=e.popupTransitionName,u=e.popupStyle,p=e.mask,h=e.maskAnimation,m=e.maskTransitionName,g=e.maskMotion,f=e.zIndex,_=e.popup,b=e.stretch,y=e.alignPoint,v=e.mobile,C=e.forceRender,w=i.state,E=w.popupVisible,k=w.point,x=i.getPopupAlign(),T={};return i.isMouseEnterToShow()&&(T.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(T.onMouseLeave=i.onPopupMouseLeave),T.onMouseDown=i.onPopupMouseDown,T.onTouchStart=i.onPopupMouseDown,d.createElement(S.Z,(0,r.Z)({prefixCls:t,destroyPopupOnHide:n,visible:E,point:y&&k,className:o,align:x,onAlign:a,animation:c,getClassNameFromAlign:i.getPopupClassNameFromAlign},T,{stretch:b,getRootDomNode:i.getRootDomNode,style:u,mask:p,zIndex:f,transitionName:l,maskAnimation:h,maskTransitionName:m,maskMotion:g,ref:i.popupRef,motion:s,mobile:v,forceRender:C}),"function"==typeof _?_():_)},i.attachParent=function(e){h.Z.cancel(i.attachId);var t,n=i.props,r=n.getPopupContainer,o=n.getDocument,a=i.getRootDomNode();r?(a||0===r.length)&&(t=r(a)):t=o(i.getRootDomNode()).body,t?t.appendChild(e):i.attachId=(0,h.Z)((function(){i.attachParent(e)}))},i.getContainer=function(){if(!i.portalContainer){var e=(0,i.props.getDocument)(i.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",i.portalContainer=e}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(e){i.props.alignPoint&&e&&i.setState({point:{pageX:e.pageX,pageY:e.pageY}})},i.handlePortalUpdate=function(){i.state.prevPopupVisible!==i.state.popupVisible&&i.props.afterPopupVisibleChange(i.state.popupVisible)},i.triggerContextValue={onPopupMouseDown:i.onPopupMouseDown},a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,i.state={prevPopupVisible:a,popupVisible:a},T.forEach((function(e){i["fire".concat(e)]=function(t){i.fireEvents(e,t)}})),i}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=(0,_.Z)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=(0,_.Z)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=(0,_.Z)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=(0,_.Z)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),h.Z.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,i=e.builtinPlacements;return t&&i?(0,C.V)(i,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,i=this.state.popupVisible;this.clearDelayTimer(),i!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:i}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var i=this,r=1e3*t;if(this.clearDelayTimer(),r){var o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){i.setPopupVisible(e,o),i.clearDelayTimer()}),r)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var i=this.props[e];i&&i(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,o=t.alignPoint,a=t.className,s=t.autoDestroy,c=d.Children.only(n),l={key:"trigger"};this.isContextMenuToShow()?l.onContextMenu=this.onContextMenu:l.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(l.onClick=this.onClick,l.onMouseDown=this.onMouseDown,l.onTouchStart=this.onTouchStart):(l.onClick=this.createTwoChains("onClick"),l.onMouseDown=this.createTwoChains("onMouseDown"),l.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(l.onMouseEnter=this.onMouseEnter,o&&(l.onMouseMove=this.onMouseMove)):l.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?l.onMouseLeave=this.onMouseLeave:l.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(l.onFocus=this.onFocus,l.onBlur=this.onBlur):(l.onFocus=this.createTwoChains("onFocus"),l.onBlur=this.createTwoChains("onBlur"));var u=v()(c&&c.props&&c.props.className,a);u&&(l.className=u);var p=(0,i.Z)({},l);(0,f.Yr)(c)&&(p.ref=(0,f.sQ)(this.triggerRef,c.ref));var h,m=d.cloneElement(c,p);return(e||this.popupRef.current||r)&&(h=d.createElement(A,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&s&&(h=null),d.createElement(w.Z.Provider,{value:this.triggerContextValue},m,h)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,i={};return void 0!==n&&t.popupVisible!==n&&(i.popupVisible=n,i.prevPopupVisible=t.popupVisible),i}}]),n}(d.Component),I.contextType=w.Z,I.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:k,getDocument:x,onPopupVisibleChange:E,afterPopupVisibleChange:E,onPopupAlign:E,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},I);var A,I},49209:(e,t,n)=>{"use strict";n.d(t,{V:()=>o,b:()=>a});var i=n(3393);function r(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function o(e,t,n){var r=e[t]||{};return(0,i.Z)((0,i.Z)({},r),n)}function a(e,t,n,i){for(var o=n.points,a=Object.keys(e),s=0;s{"use strict";function i(e){var t=e.prefixCls,n=e.motion,i=e.animation,r=e.transitionName;return n||(i?{motionName:"".concat(t,"-").concat(i)}:r?{motionName:r}:null)}n.d(t,{g:()=>i})},11397:(e,t,n)=>{e.exports=n(35666)},65635:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(5868),r=n.n(i);function o(e,t,n,i){var o=r().unstable_batchedUpdates?function(e){r().unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,o,i),{remove:function(){e.removeEventListener&&e.removeEventListener(t,o)}}}},11286:(e,t,n)=>{"use strict";function i(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{Z:()=>i})},53709:(e,t,n)=>{"use strict";function i(e,t){return!!e&&e.contains(t)}n.d(t,{Z:()=>i})},96472:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(5868),r=n.n(i);function o(e){return e instanceof HTMLElement?e:r().findDOMNode(e)}},25952:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(616),r=n(5868),o=n.n(r),a=n(11286);const s=(0,i.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,s=e.children,c=(0,i.useRef)(),l=(0,i.useRef)();(0,i.useImperativeHandle)(t,(function(){return{}}));var d=(0,i.useRef)(!1);return!d.current&&(0,a.Z)()&&(l.current=r(),c.current=l.current.parentNode,d.current=!0),(0,i.useEffect)((function(){null==n||n(e)})),(0,i.useEffect)((function(){return null===l.current.parentNode&&null!==c.current&&c.current.appendChild(l.current),function(){var e,t;null===(e=l.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(l.current)}}),[]),l.current?o().createPortal(s,l.current):null}))},77750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(616);const r=(0,n(11286).Z)()?i.useLayoutEffect:i.useEffect},43810:(e,t,n)=>{"use strict";n(616)},28640:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(75537),r=n(616);function o(e){var t=r.useRef(!1),n=r.useState(e),o=(0,i.Z)(n,2),a=o[0],s=o[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||s(e)}]}},84101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}},76859:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(i=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var o=0,a=new Map;function s(e){a.delete(e)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=o+=1;function r(t){if(0===t)s(n),e();else{var o=i((function(){r(t-1)}));a.set(n,o)}}return r(t),n}c.cancel=function(e){var t=a.get(e);return s(t),r(t)}},51895:(e,t,n)=>{"use strict";n.d(t,{sQ:()=>a,Yr:()=>s});var i=n(15589),r=n(59864);n(43810);function o(e,t){"function"==typeof e?e(t):"object"===(0,i.Z)(e)&&e&&"current"in e&&(e.current=t)}function a(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(77919),t)},77919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const i=n(70655).__importDefault(n(22003)),r=n(90642),o=n(90642),a=n(45057),s=n(53501);t.WSChannelHandler=class{constructor(e,t,n,o){this.wsPath=e,this.protocols=n,this.channelMap=new Map,this.logger=console,this.getChannelSend=e=>t=>{e.send(t,(e=>{e&&this.logger.warn(e)}))},this.logger=t||this.logger,this.clientId=o||`CLIENT_ID_${(0,r.uuid)()}`,this.connection=new i.default(e,n,{})}replaceLogger(e){e&&(this.logger=e)}setReporter(e){this.reporterService=e}clientMessage(){const e=(0,a.stringify)({kind:"client",clientId:this.clientId});this.connection.send(e)}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=n.g.setTimeout((()=>{const e=(0,a.stringify)({kind:"heartbeat",clientId:this.clientId});this.connection.send(e),this.heartbeatMessage()}),5e3)}async initHandler(){this.connection.onmessage=e=>{this.heartbeatMessage();const t=(0,a.parse)(e.data);if(t.id){const e=this.channelMap.get(t.id);e?("data"!==t.kind||e.fireMessage||this.logger.error("channel not ready!",t),e.handleMessage(t)):this.logger.warn(`channel ${t.id} not found`)}},await new Promise((e=>{this.connection.addEventListener("open",(()=>{this.clientMessage(),this.heartbeatMessage(),e(void 0),this.channelMap.size&&this.channelMap.forEach((e=>{e.onOpen((()=>{this.reporterService&&this.reporterService.point(o.REPORT_NAME.CHANNEL_RECONNECT),this.logger&&this.logger.log(`channel reconnect ${this.clientId}:${e.channelPath}`)})),e.open(e.channelPath),e.fireReOpen&&e.fireReOpen()}))}))}))}async openChannel(e){const t=this.getChannelSend(this.connection),n=`${this.clientId}:${e}`,i=new s.WSChannel(t,n);return this.channelMap.set(i.id,i),await new Promise((t=>{i.onOpen((()=>{t(void 0)})),i.open(e)})),i}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer)}}},62231:(e,t,n)=>{"use strict";var i=n(63634);Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=t.getRPCService=t.createRPCService=t.initRPCService=t.RPCServiceStub=t.ServiceType=void 0;const r=n(67159);var o;!function(e){e[e.Service=0]="Service",e[e.Stub=1]="Stub"}(o=t.ServiceType||(t.ServiceType={}));class a{constructor(e,t,n){this.serviceName=e,this.center=t,this.type=n,this.getProxy=()=>new Proxy(this,{get:(e,t)=>e[t]?e[t]:"symbol"==typeof t?Promise.resolve():(...e)=>this.ready().then((()=>{const n=this.getMethodName(t);return Promise.all(this.center.serviceProxy.map((t=>t[n](...e)))).then((e=>e.filter((e=>e!==r.NOTREGISTERMETHOD)))).then((e=>1===e.length?e[0]:e))}))}),this.type===o.Service&&this.center.registerService(e,this.type)}async ready(){return this.center.when()}getNotificationName(e){return`on:${this.serviceName}:${e}`}getRequestName(e){return`${this.serviceName}:${e}`}on(e,t){this.onRequest(e,t)}getServiceMethod(e){let t=[];if(/^\s*class/.test(e.constructor.toString())){let n=e;do{t=t.concat(Object.getOwnPropertyNames(n))}while(n=Object.getPrototypeOf(n));t=t.sort().filter(((t,n,i)=>t!==i[n+1]&&"function"==typeof e[t]))}else for(const n in e)e[n]&&"function"==typeof e[n]&&t.push(n);return t}onRequestService(e){const t=this.getServiceMethod(e);for(const n of t)this.onRequest(n,e[n].bind(e))}onRequest(e,t){this.center.onRequest(this.getMethodName(e),t)}broadcast(e,...t){return this.center.broadcast(this.getMethodName(e),...t)}getMethodName(e){return e.startsWith("on")?this.getNotificationName(e):this.getRequestName(e)}}t.RPCServiceStub=a,t.initRPCService=function(e){return{createRPCService:(t,n)=>{const i=new a(t,e,o.Service).getProxy();return n&&i.onRequestService(n),i},getRPCService:t=>new a(t,e,o.Stub).getProxy()}},t.createRPCService=function(e,t){return new a(e,t,o.Service).getProxy()},t.getRPCService=function(e,t){return new a(e,t,o.Stub).getProxy()};t.RPCServiceCenter=class{constructor(e,t){this.bench=e,this.rpcProxy=[],this.serviceProxy=[],this.connection=[],this.serviceMethodMap={client:void 0},this.createService=[],this.getService=[],this.uid="RPCServiceCenter:"+i.pid,this.connectionPromise=new Promise((e=>{this.connectionPromiseResolve=e})),this.logger=t||console}registerService(e,t){t===o.Service?(this.createService.push(e),this.bench&&this.bench.registerService(e)):t===o.Stub&&this.getService.push(e)}when(){return this.connectionPromise}setConnection(e){this.connection.length||this.connectionPromiseResolve(),this.connection.push(e);const t=new r.RPCProxy(this.serviceMethodMap,this.logger);t.listen(e),this.rpcProxy.push(t);const n=t.createProxy();this.serviceProxy.push(n)}removeConnection(e){const t=this.connection.indexOf(e);return-1!==t&&(this.connection.splice(t,1),this.rpcProxy.splice(t,1),this.serviceProxy.splice(t,1)),-1!==t}onRequest(e,t){this.connection.length?this.rpcProxy.forEach((n=>{n.listenService({[e]:t})})):this.serviceMethodMap[e]=t}broadcast(e,...t){return Promise.all(this.serviceProxy.map((n=>n[e](...t)))).then((e=>e.filter((e=>e!==r.NOTREGISTERMETHOD)))).then((e=>1===e.length?e[0]:e))}}},83141:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(86590),t),i.__exportStar(n(67159),t),i.__exportStar(n(5763),t),i.__exportStar(n(45057),t),i.__exportStar(n(53501),t),i.__exportStar(n(62231),t)},86590:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWebSocketConnection=t.WebSocketMessageWriter=t.WebSocketMessageReader=void 0;const i=n(46167),r=n(14740);n(39578);class o extends i.AbstractMessageReader{constructor(e){super(),this.socket=e,this.state="initial",this.events=[],this.socket.onMessage?this.socket.onMessage((e=>{this.readMessage(e)})):this.socket.onmessage?this.socket.onmessage=e=>{this.readMessage(e)}:this.socket.on&&this.socket.on("message",(e=>{this.readMessage(e)}))}listen(e){for("initial"===this.state&&(this.state="listening",this.callback=e);0!==this.events.length;){const e=this.events.pop();e.message&&this.readMessage(e.message)}return r.Disposable.create((()=>{this.state="closed",this.callback=void 0,this.events=[]}))}readMessage(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){const t=JSON.parse(e);this.callback(t)}}}t.WebSocketMessageReader=o;class a extends i.AbstractMessageWriter{constructor(e){super(),this.socket=e}write(e){try{const t=JSON.stringify(e);return this.socket.send(t),Promise.resolve()}catch(e){return Promise.reject(e)}}end(){}}t.WebSocketMessageWriter=a,t.createWebSocketConnection=function(e){return(0,i.createMessageConnection)(new o(e),new a(e))}},67159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCProxy=t.ProxyClient=t.NOTREGISTERMETHOD=t.RPCService=void 0;const i=n(90642);t.RPCService=class{get client(){return this.rpcClient?this.rpcClient[0]:void 0}},t.NOTREGISTERMETHOD="$$NOTREGISTERMETHOD";class r{constructor(e,t=["then"]){this.proxy=e,this.reservedWords=t}getClient(){return new Proxy({},{get:(e,t)=>this.reservedWords.includes(t)||"symbol"==typeof t?Promise.resolve():this.proxy[t]})}}t.ProxyClient=r;t.RPCProxy=class{constructor(e,t){this.target=e,this.proxyService={},this.waitForConnection(),this.logger=t||console}listenService(e){if(this.connection){const t=this.proxyService;this.bindOnRequest(e,((e,n)=>{t[n]=e[n].bind(e)}))}else{const t=this.target||{};this.getServiceMethod(e).forEach((n=>{t[n]=e[n].bind(e)}))}}listen(e){this.connection=e,this.target&&this.listenService(this.target),this.connectionPromiseResolve(e),e.listen()}createProxy(){const e=new Proxy(this,this);return new r(e).getClient()}get(e,t){const n=t.toString();return(...e)=>this.connectionPromise.then((t=>(t=this.connection||t,new Promise(((r,o)=>{try{let a=!1;if(1===e.length&&Array.isArray(e[0])&&(a=!0),n.startsWith("on"))a?t.sendNotification(n,[...e]):t.sendNotification(n,...e),r(null);else{let s;s=a?t.sendRequest(n,[...e]):t.sendRequest(n,...e),s.catch((e=>{o(e)})).then((e=>{if(e.error){const t=new Error(e.data.message);if(e.data.stack&&(t.stack=e.data.stack),e.error.code&&e.error.data){const n=i.ApplicationError.fromJson(e.error.code,e.error.data);t.cause=n}o(t)}else r(e.data)}))}}catch(e){}})))))}getServiceMethod(e){let t=[];if(/^\s*class/.test(e.constructor.toString())){let n=e;do{t=t.concat(Object.getOwnPropertyNames(n))}while(n=Object.getPrototypeOf(n));t=t.sort().filter(((t,n,i)=>t!==i[n+1]&&"function"==typeof e[t]))}else for(const n in e)e[n]&&"function"==typeof e[n]&&t.push(n);return t}bindOnRequest(e,n){if(this.connection){const i=this.connection;this.getServiceMethod(e).forEach((t=>{t.startsWith("on")?i.onNotification(t,((...e)=>this.onNotification(t,...e))):i.onRequest(t,((...e)=>this.onRequest(t,...e))),n&&n(e,t)})),i.onRequest((e=>{if(!this.proxyService[e])return{data:t.NOTREGISTERMETHOD}}))}}waitForConnection(){this.connectionPromise=new Promise((e=>{this.connectionPromiseResolve=e}))}serializeArguments(e){const t=e[e.length-1];return 2===e.length&&Array.isArray(e[0])&&t.hasOwnProperty("_isCancelled")?[...e[0],t]:e}async onRequest(e,...t){try{return{data:await this.proxyService[e](...this.serializeArguments(t))}}catch(e){return{error:e,data:{message:e.message,stack:e.stack}}}}onNotification(e,...t){try{this.proxyService[e](...this.serializeArguments(t))}catch(e){this.logger.warn("notification",e)}}}},5763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCProtocol=t.IRPCProtocol=t.MessageIO=t.ObjectTransfer=t.createMainContextProxyIdentifier=t.createExtHostContextProxyIdentifier=t.ProxyIdentifier=t.transformErrorForSerialization=t.RPCProtocolEnv=void 0;const i=n(90642);var r;function o(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e}!function(e){e[e.MAIN=0]="MAIN",e[e.EXT=1]="EXT"}(t.RPCProtocolEnv||(t.RPCProtocolEnv={})),t.transformErrorForSerialization=o;class a{constructor(e){this.serviceId=e,this.countId=++a.count}}t.ProxyIdentifier=a,a.count=0,t.createExtHostContextProxyIdentifier=function(e){return new a(e)},t.createMainContextProxyIdentifier=function(e){return new a(e)},function(e){e.replacer=function(e,t){if(t){if(1===t.$mid){return{$type:"VSCODE_URI",data:i.Uri.revive(t).toString()}}if(t instanceof Uint8Array||t instanceof Uint32Array||t instanceof Uint16Array)return{$type:"Buffer",data:Array.from(t)};if(t instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(t))}}return t},e.reviver=function(e,t){if(t&&void 0!==t.$type&&void 0!==t.data){if("VSCODE_URI"===t.$type)return i.Uri.parse(t.data);if("Buffer"===t.$type)return Uint8Array.from(t.data)}return t}}(r=t.ObjectTransfer||(t.ObjectTransfer={}));class s{static cancel(e,t){return`{"type":4,"id":"${e}"}`}static serializeRequest(e,t,n,i){return i=i.map((e=>{if(e instanceof Error){const t=Array.prototype.slice.call(arguments);return t[0]=e.stack,t.join("\n")}return e})),`{"type": 1, "id": "${e}", "proxyId": "${t}", "method": "${n}", "args": ${JSON.stringify(i,r.replacer)}}`}static serializeReplyOK(e,t,n){if(void 0===t)return`{"type": 2, "id": "${e}"}`;try{return`{"type": 2, "id": "${e}", "res": ${JSON.stringify(t,r.replacer)}}`}catch(i){return n&&n.warn("res",t),`{"type": 2, "id": "${e}", "res": {}}`}}static serializeReplyError(e,t,n){try{return`{"type": 3, "id": "${e}", "res": ${JSON.stringify(o(t),r.replacer)}}`}catch(i){return n&&n.error("error",t),`{"type": 3, "id": "${e}", "res": {}}`}}}t.MessageIO=s,t.IRPCProtocol=Symbol("IRPCProtocol");t.RPCProtocol=class{constructor(e,t){this._protocol=e,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._lastMessageId=0,this.logger=t||console,this._protocol.onMessage((e=>this._receiveOneMessage(e)))}set(e,t){return this._locals.set(e.serviceId,t),t}get(e){return this._locals.get(e.serviceId)}getProxy(e){return this._proxies.has(e.serviceId)||this._proxies.set(e.serviceId,this._createProxy(e.serviceId)),this._proxies.get(e.serviceId)}_createProxy(e){const t={get:(t,n)=>"symbol"==typeof n?null:(t[n]||36!==n.charCodeAt(0)||(t[n]=(...t)=>this._remoteCall(e,n,t)),t[n])};return new Proxy(Object.create(null),t)}_remoteCall(e,t,n){const r=n.length&&i.CancellationToken.isCancellationToken(n[n.length-1])?n.pop():void 0;if(r&&r.isCancellationRequested)return Promise.reject(function(){const e=new Error("Canceled");return e.name=e.message,e}());const o=String(++this._lastMessageId),a=new i.Deferred;r&&(n.push("add.cancellation.token"),r.onCancellationRequested((()=>this._protocol.send(s.cancel(o))))),this._pendingRPCReplies.set(o,a);const c=s.serializeRequest(o,e,t,n);return this._protocol.send(c),a.promise}_receiveOneMessage(e){const t=JSON.parse(e,r.reviver);switch(t.type){case 1:this._receiveRequest(t);break;case 2:this._receiveReply(t);break;case 4:this._receiveCancel(t);break;case 3:this._receiveError(t)}}_receiveCancel(e){const t=this._cancellationTokenSources.get(e.id);t&&t.cancel()}_receiveError(e){const t=e.id;if(!this._pendingRPCReplies.has(t))return;const n=this._pendingRPCReplies.get(t);let i;this._pendingRPCReplies.delete(t),e.res&&(e.res.$isError?(i=new Error,i.name=e.res.name,i.message=e.res.message,i.stack=e.res.stack):i=e.res),n.reject(i)}_receiveRequest(e){const t=e.id,n=e.proxyId,r=e.method,o=e.args.map((e=>null===e?void 0:e));if(!(!o.length||"add.cancellation.token"!==o[o.length-1])&&o.pop()){const e=new i.CancellationTokenSource;this._cancellationTokenSources.set(t,e),o.push(e.token)}this._invokeHandler(n,r,o).then((e=>{this._protocol.send(s.serializeReplyOK(t,e)),this._cancellationTokenSources.delete(t)})).catch((e=>{this._protocol.send(s.serializeReplyError(t,e)),this._cancellationTokenSources.delete(t)}))}_invokeHandler(e,t,n){try{return this._doInvokeHandler(e,t,n)}catch(e){return Promise.reject(e)}}async _doInvokeHandler(e,t,n){const i=this._locals.get(e);if(!i)throw new Error("Unknown actor "+e);const r=await i[t];if("function"!=typeof r)throw new Error("Unknown method "+t+" on actor "+e);return r.apply(i,n)}_receiveReply(e){const t=e.id;if(!this._pendingRPCReplies.has(t))return;const n=this._pendingRPCReplies.get(t);this._pendingRPCReplies.delete(t),n.resolve(e.res)}}},45057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.stringify=void 0,t.stringify=function(e){return JSON.stringify(e)},t.parse=function(e,t){return JSON.parse(e,t)}},53501:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChildConnectPath=t.WSChannel=void 0;const i=n(45057);t.WSChannel=class{constructor(e,t){this.connectionSend=e,t&&(this.id=t)}setConnectionSend(e){this.connectionSend=e}onMessage(e){this.fireMessage=e}onOpen(e){this.fireOpen=e}onReOpen(e){this.fireReOpen=e}ready(){this.connectionSend((0,i.stringify)({kind:"ready",id:this.id}))}handleMessage(e){"ready"===e.kind&&this.fireOpen?this.fireOpen(e.id):"data"===e.kind&&this.fireMessage&&this.fireMessage(e.content)}open(e){this.channelPath=e,this.connectionSend((0,i.stringify)({kind:"open",id:this.id,path:e}))}send(e){this.connectionSend((0,i.stringify)({kind:"data",id:this.id,content:e}))}onError(){}close(e,t){this.fireClose&&this.fireClose(e,t)}onClose(e){this.fireClose=e}};t.ChildConnectPath=class{constructor(){this.pathPre="child_connect-"}getConnectPath(e,t){return`${this.pathPre}${e+1}`}parseInfo(e){const t=e.split("-");return{pre:t[0],index:t[1],clientId:t[2]}}}},41037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(83141),t)},34344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSocketConnection=void 0;const i=n(39578);t.createSocketConnection=function(e){return(0,i.createMessageConnection)(new i.SocketMessageReader(e),new i.SocketMessageWriter(e))}},85025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const i=n(70655),r=n(39993),o=n(90642);class a extends o.BasicEvent{}t.ClientAppStateEvent=a;let s=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(e){e!==this._state&&(this.deferred[this._state]=new o.Deferred,this._state=e,void 0===this.deferred[e]&&(this.deferred[e]=new o.Deferred),this.deferred[e].resolve(),this.eventBus.fire(new a(e)))}reachedState(e){return void 0===this.deferred[e]&&(this.deferred[e]=new o.Deferred),this.deferred[e].promise}reachedAnyState(...e){return Promise.race(e.map((e=>this.reachedState(e))))}};i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],s.prototype,"eventBus",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.ClientAppStateService=s},49079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(71898);let s=class{constructor(){this._initialized=new o.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return o.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}};i.__decorate([(0,r.Autowired)(o.CommonServerPath),i.__metadata("design:type",Object)],s.prototype,"commonServer",void 0),i.__decorate([(0,r.Autowired)(a.AppConfig),i.__metadata("design:type",Object)],s.prototype,"appConfig",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.ApplicationService=s},25398:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(85025),t),i.__exportStar(n(49079),t)},70076:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(54846);let s=class{onStart(){this.authenticationService.initialize()}registerCommands(e){e.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};i.__decorate([(0,r.Autowired)(o.IAuthenticationService),i.__metadata("design:type",Object)],s.prototype,"authenticationService",void 0),s=i.__decorate([(0,o.Domain)(a.ClientAppContribution,o.CommandContribution)],s),t.AuthenticationContribution=s},63448:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57061);let s=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const e=new Map;this.onDidChangeSessions((async t=>{if(t.event.added.length>0){const n=await this.getSessions(t.providerId);n.forEach((i=>{if(n.find((t=>e.get(t.id))))return;const r=new o.DisposableCollection,s=`account-sign-out-${t.providerId}-${i.id}`,c=this.commands.registerCommand({id:s,label:(0,o.formatLocalize)("authentication.signOut",t.label)},{execute:async()=>{await this.signOutOfAccount(t.providerId,i.account.label)}}),l=`manage-trusted-${t.providerId}-${i.id}`,d=this.commands.registerCommand({id:l,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(t.providerId,i.account.label)}}),u=`${t.providerId}${i.account.label}`,p=this.menus.registerMenuItem(a.MenuId.AccountsContext,{submenu:u,label:`${i.account.label} (${t.label})`}),h=this.menus.registerMenuItems(u,[{command:l},{command:s}]);r.push(p),r.push(h),r.push(c),r.push(d),e.set(i.id,r)}))}t.event.removed.length>0&&t.event.removed.forEach((t=>{const n=e.get(t.id);n&&(n.dispose(),e.delete(t.id))}))}))}get storage(){return this._storage}registerAuthenticationProvider(e,t){this._authenticationProviders.set(e,t),this._onDidRegisterAuthenticationProvider.fire({id:e,label:t.label}),this.updateAccountsMenuItem()}async sessionsUpdate(e,t){const n=this._authenticationProviders.get(e);n&&(this._onDidChangeSessions.fire({providerId:e,label:n.label,event:t}),await n.updateSessionItems(t),this.updateAccountsMenuItem(),t.added&&await this.updateNewSessionRequests(n))}async updateNewSessionRequests(e){const t=this._signInRequestItems.get(e.id);if(!t)return;const n=await e.getSessions();Object.keys(t).forEach((i=>{if(n.some((e=>e.scopes.slice().sort().join("")===i))){const n=t[i];n&&n.disposables.forEach((e=>e.dispose())),delete t[i],0===Object.keys(t).length?this._signInRequestItems.delete(e.id):this._signInRequestItems.set(e.id,t)}}))}getTrustedKey(e,t){return`trusted-${e}-${t}`}async getAllowedExtensions(e,t){const n=this.getTrustedKey(e,t);let i=[];try{const e=await this.storage.get(n);e&&(i=JSON.parse(e))}catch(e){this.logger.warn("read allow extensions error: "+e)}return i}async setAllowedExtensions(e,t,n){const i=this.getTrustedKey(e,t);await this.storage.set(i,JSON.stringify(n))}async removeAllowedExtensions(e,t){const n=this.getTrustedKey(e,t);await this.storage.delete(n)}async updatedAllowedExtension(e,t,n,i,r){const o=await this.getAllowedExtensions(e,t),a=o.findIndex((e=>e.id===n));-1===a?o.push({id:n,name:i,allowed:r}):o[a].allowed=r,await this.setAllowedExtensions(e,t,o)}async isAccessAllowed(e,t,n){const i=(await this.getAllowedExtensions(e,t)).find((e=>e.id===n));return!!i&&(void 0===i.allowed||i.allowed)}async tryActivateProvider(e){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:e}));let t=this._authenticationProviders.get(e);if(t)return t;const n=new Promise(((n,i)=>{this.onDidRegisterAuthenticationProvider((i=>{if(i.id===e){if(t=this._authenticationProviders.get(e),!t)throw new Error(`No authentication provider '${e}' is currently registered.`);n(t)}}))})),i=new Promise(((t,n)=>{setTimeout((()=>{n(new Error(`didRegister ${e} timeout`))}),5e3)}));return Promise.race([n,i])}async getSessions(e){try{const t=this._authenticationProviders.get(e)||await this.tryActivateProvider(e);return await t.getSessions()}catch(t){throw new Error(`No authentication provider '${e}' is currently registered.`)}}isAuthenticationProviderRegistered(e){return this._authenticationProviders.has(e)}getProviderIds(){const e=[];return this._authenticationProviders.forEach((t=>{e.push(t.id)})),e}unregisterAuthenticationProvider(e){const t=this._authenticationProviders.get(e);t&&(t.dispose(),this._authenticationProviders.delete(e),this._onDidUnregisterAuthenticationProvider.fire({id:e,label:t.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let e=!1;this._authenticationProviders.forEach((t=>{e=e||t.hasSessions()})),e&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),e||this._noAccountsMenuItem||(this._noAccountsMenuItem=this.menus.registerMenuItem(a.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(e,t,n,i){let r=this._authenticationProviders.get(e);if(r||await new Promise(((t,n)=>{this.onDidRegisterAuthenticationProvider((n=>{n.id===e&&(r=this._authenticationProviders.get(e),t())}))})),r){const r=this._signInRequestItems.get(e),s=t.sort().join("");if(r&&r[s]&&r[s].requestingExtensionIds.includes(n))return;const c=this.commands.registerCommand({id:`${n}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",i)},{execute:async()=>{const r=await this.login(e,t),o=r.account.label,a=await this.getAllowedExtensions(e,o);a.find((e=>e.id===n))||(a.push({id:n,name:i}),await this.setAllowedExtensions(e,o,a)),await this.setExtensionSessionId(i,e,r.id)}}),l=this.menus.registerMenuItem(a.MenuId.AccountsContext,{group:"2_signInRequests",command:`${n}signIn`});if(r){const t=r[s]||{disposables:[],requestingExtensionIds:[]};r[s]={disposables:[...t.disposables,l,c],requestingExtensionIds:[...t.requestingExtensionIds,n]},this._signInRequestItems.set(e,r)}else this._signInRequestItems.set(e,{[s]:{disposables:[l,c],requestingExtensionIds:[n]}})}}getLabel(e){const t=this._authenticationProviders.get(e);if(t)return t.label;throw new Error(`No authentication provider '${e}' has been declared.`)}supportsMultipleAccounts(e){const t=this._authenticationProviders.get(e);if(t)return t.supportsMultipleAccounts;throw new Error(`No authentication provider '${e}' is currently registered.`)}async login(e,t){try{const n=this._authenticationProviders.get(e)||await this.tryActivateProvider(e);return await n.login(t)}catch(t){throw new Error(`No authentication provider '${e}' is currently registered, error messge: ${t.message}`)}}logout(e,t){const n=this._authenticationProviders.get(e);if(n)return n.logout(t);throw new Error(`No authentication provider '${e}' is currently registered.`)}manageTrustedExtensionsForAccount(e,t){const n=this._authenticationProviders.get(e);if(n)return n.manageTrustedExtensions(t);throw new Error(`No authentication provider '${e}' is currently registered.`)}signOutOfAccount(e,t){const n=this._authenticationProviders.get(e);if(n)return n.signOut(t);throw new Error(`No authentication provider '${e}' is currently registered.`)}getUsagesKey(e,t){return`usages-${e}-${t}`}async getAccountUsages(e,t){const n=this.getUsagesKey(e,t),i=await this.storage.get(n);let r=[];if(i)try{r=JSON.parse(i)}catch(e){this.logger.warn("parse account usages error: "+e)}return r}async addAccountUsage(e,t,n,i){const r=this.getUsagesKey(e,t),o=await this.getAccountUsages(e,t),a=o.findIndex((e=>e.extensionId===n));a>-1?o.splice(a,1,{extensionId:n,extensionName:i,lastUsed:Date.now()}):o.push({extensionId:n,extensionName:i,lastUsed:Date.now()}),await this.storage.set(r,JSON.stringify(o))}async removeAccountUsage(e,t){const n=this.getUsagesKey(e,t);await this.storage.delete(n)}getExtensionSessionIdKey(e,t){return`session-${e}-${t}`}async getExtensionSessionId(e,t){const n=this.getExtensionSessionIdKey(e,t);return await this.storage.get(n)}async setExtensionSessionId(e,t,n){const i=this.getExtensionSessionIdKey(e,t);await this.storage.set(i,n)}async removeExtensionSessionId(e,t){const n=this.getExtensionSessionIdKey(e,t);await this.storage.delete(n)}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],s.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(o.StorageProvider),i.__metadata("design:type",Function)],s.prototype,"getStorage",void 0),i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],s.prototype,"eventBus",void 0),i.__decorate([(0,r.Autowired)(a.IMenuRegistry),i.__metadata("design:type",a.IMenuRegistry)],s.prototype,"menus",void 0),i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],s.prototype,"commands",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.AuthenticationService=s},76221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientApp=void 0;const i=n(70655);n(50221);const r=i.__importDefault(n(91033)),o=n(39993),a=n(49943),s=n(90642),c=n(16296),l=n(29277),d=n(894),u=n(25398),p=n(41815),h=n(85981),m=n(87433),g=n(87433),f=n(82562),_=n(26149),b=n(57061),y=n(83538),v=n(71898),C=n(7610),S=n(30930),w=n(54395),E=n(72956),k=n(60491);void 0===window.ResizeObserver&&(window.ResizeObserver=r.default);t.ClientApp=class{constructor(e){var t,n,r;this.appInitialized=new s.Deferred,this.browserModules=[],this._inComposition=!1,this._handleBeforeUpload=e=>{if(this.config.isElectronRenderer){if("electron_confirmed_close"===this.stateService.state)return;e.returnValue="",e.preventDefault(),"electron_asking_close"!==this.stateService.state&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then((e=>{if(!e)return this.stopContributionsElectron().then((()=>{this.stateService.state="electron_confirmed_close";const e=this.injector.get(l.IElectronMainLifeCycleService);setTimeout((()=>{e.closeWindow(S.electronEnv.currentWindowId)}),0)}));this.stateService.state="ready"})))}else if(this.preventStop())return(e||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=e=>{e&&e.target.name!==f.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(e)},this._handleKeyup=e=>{this.keybindingService.resolveModifierKey(e)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:a,contributions:d,modulesInstances:u,connectionPath:p,connectionProtocols:h,iconStyleSheets:m,useCdnIcon:g,editorBackgroundImage:_,defaultPreferences:b,allowSetDocumentTitleFollowWorkspaceDir:v=!0}=e,C=i.__rest(e,["modules","contributions","modulesInstances","connectionPath","connectionProtocols","iconStyleSheets","useCdnIcon","editorBackgroundImage","defaultPreferences","allowSetDocumentTitleFollowWorkspaceDir"]);this.initEarlyPreference(e.workspaceDir||""),(0,s.setLanguageId)((0,y.getPreferenceLanguageId)(b)),this.injector=e.injector||new o.Injector,this.modules=a,this.modules.forEach((e=>this.resolveModuleDeps(e))),this.browserModules=e.modulesInstances||[];const w=e.isElectronRenderer||(0,s.isElectronRenderer)();this.config=Object.assign(Object.assign({appName:c.DEFAULT_APPLICATION_NAME,appHost:w?c.DEFAULT_APPLICATION_DESKTOP_HOST:c.DEFAULT_APPLICATION_WEB_HOST,appRoot:(0,s.isUndefined)(e.appRoot)?w?S.electronEnv.appPath:"":e.appRoot,uriScheme:c.DEFAULT_URI_SCHEME},C),{isElectronRenderer:w,workspaceDir:e.workspaceDir||"",extensionDir:e.extensionDir||(e.isElectronRenderer||w?null===(t=S.electronEnv.metadata)||void 0===t?void 0:t.extensionDir:""),injector:this.injector,wsPath:e.wsPath||"ws://0.0.0.0:8000",layoutConfig:e.layoutConfig,editorBackgroundImage:e.editorBackgroundImage||_,allowSetDocumentTitleFollowWorkspaceDir:v}),this.config.isElectronRenderer&&(null===(n=S.electronEnv.metadata)||void 0===n?void 0:n.extensionDevelopmentHost)&&(this.config.extensionDevelopmentHost=S.electronEnv.metadata.extensionDevelopmentHost),e.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(e.extensionDevelopmentPath)?e.extensionDevelopmentPath.map((e=>(0,s.asExtensionCandidate)(e,!0))):[(0,s.asExtensionCandidate)(e.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!!e.extensionDevelopmentPath),this.config.isElectronRenderer&&(null===(r=S.electronEnv.metadata)||void 0===r?void 0:r.extensionCandidate)&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(S.electronEnv.metadata.extensionCandidate||[])),this.connectionPath=p||`${this.config.wsPath}/service`,this.connectionProtocols=h,this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(m,g),this.createBrowserModules(b)}resolveModuleDeps(e){const t=Reflect.getMetadata("dependencies",e);t&&t.forEach((e=>{-1===this.modules.indexOf(e)&&this.modules.push(e)}))}async start(e,t,n){const i=this.injector.get(s.IReporterService).time(s.REPORT_NAME.MEASURE);n?await(0,E.bindConnectionService)(this.injector,this.modules,n):"electron"===t?await(0,E.bindConnectionService)(this.injector,this.modules,(0,d.createElectronClientConnection)()):"web"===t&&(await(0,E.createClientConnection2)(this.injector,this.modules,this.connectionPath,(()=>{this.onReconnectContributions()}),this.connectionProtocols,this.config.clientId),this.logger=this.getLogger(),this.injector.get(a.WSChannelHandler).replaceLogger(this.logger)),i.timeEnd("ClientApp.createConnection"),this.logger=this.getLogger(),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(s.IApplicationService).initializeData(),await this.measure("Contributions.start",(()=>this.startContributions(e))),this.stateService.state="started_contributions",this.stateService.state="ready",i.timeEnd("Framework.ready")}getLogger(){return this.logger||(this.logger=this.injector.get(s.ILoggerManagerClient).getLogger(s.SupportLogNamespace.Browser)),this.logger}onReconnectContributions(){const e=this.contributions;for(const t of e)t.onReconnect&&t.onReconnect(this)}initBaseProvider(){this.injector.addProviders({token:p.IClientApp,useValue:this}),this.injector.addProviders({token:v.AppConfig,useValue:this.config}),(0,k.injectInnerProviders)(this.injector)}initFields(){this.contributionsProvider=this.injector.get(h.ClientAppContribution),this.commandRegistry=this.injector.get(s.CommandRegistry),this.keybindingRegistry=this.injector.get(f.KeybindingRegistry),this.keybindingService=this.injector.get(f.KeybindingService),this.stateService=this.injector.get(u.ClientAppStateService),this.nextMenuRegistry=this.injector.get(b.IMenuRegistry)}createBrowserModules(e){const t=this.injector;for(const e of this.modules){const n=t.get(e);this.browserModules.push(n),n.providers&&this.injector.addProviders(...n.providers),n.preferences&&n.preferences(this.injector)}(0,g.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,e),this.injectStorageProvider(this.injector);for(const e of this.browserModules)if(e.contributionProvider)if(Array.isArray(e.contributionProvider))for(const t of e.contributionProvider)(0,s.createContributionProvider)(this.injector,t);else(0,s.createContributionProvider)(this.injector,e.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(e){await this.measure("RenderApp.render",(()=>this.renderApp(e))),await this.measure("Contributions.initialize",(()=>this.initializeContributions())),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",await this.measure("Contributions.onStart",(()=>this.onStartContributions())),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){this.logger.verbose("startContributions clientAppContributions",this.contributions),await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(e,t){return await Promise.all(e.map((e=>this.contributionPhaseRunner(e,t))))}async contributionPhaseRunner(e,t){const n=e[t];if("function"==typeof n)try{const i=e.constructor.name+"."+t;return await this.measure(i,(()=>n.call(e,this)))}catch(e){this.logger.error(`Could not run contribution#${t}`,e)}}async renderApp(e){await(0,w.renderClientApp)(this,e);this.injector.get(s.IEventBus).fire(new _.RenderedEvent)}async measure(e,t){const n=this.injector.get(s.IReporterService).time(s.REPORT_NAME.MEASURE),i=await t();return n.timeEnd(e),i}preventStop(){const e=this.injector.get(m.CorePreferences)["application.confirmExit"];if("never"===e)return!1;for(const e of this.contributions)if(e.onWillStop)try{if(e.onWillStop(this))return!0}catch(e){(0,s.getDebugLogger)().error(e)}return"always"===e}async preventStopElectron(){if("never"===this.injector.get(m.CorePreferences)["application.confirmExit"])return!1;for(const e of this.contributions)if(e.onWillStop)try{if(await e.onWillStop(this))return!0}catch(e){(0,s.getDebugLogger)().error(e)}return!1}stopContributions(){for(const e of this.contributions)if(e.onStop)try{e.onStop(this)}catch(e){this.logger.error("Could not stop contribution",e)}}async stopContributionsElectron(){const e=[];for(const t of this.contributions)t.onStop&&e.push((async()=>{try{await t.onStop(this)}catch(e){this.logger.error("Could not stop contribution",e)}})());await Promise.all(e)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._handleCompositionend),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),s.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(e,t){if((0,y.injectPreferenceConfigurations)(e),(0,y.injectPreferenceSchemaProvider)(e),e.addProviders({token:y.PreferenceProviderProvider,useFactory:()=>t=>{const n=e.get(y.PreferenceProvider,{tag:t});return n.asScope(t),n}},{token:y.PreferenceService,useClass:y.PreferenceServiceImpl}),t){const n=e.get(y.PreferenceProviderProvider)(y.PreferenceScope.Default);for(const e of Object.keys(t))n.setPreference(e,t[e])}}injectStorageProvider(e){e.addProviders({token:s.DefaultStorageProvider,useClass:s.DefaultStorageProvider}),e.addProviders({token:s.StorageProvider,useFactory:()=>t=>e.get(s.DefaultStorageProvider).get(t)}),(0,s.createContributionProvider)(e,s.StorageResolverContribution)}fireOnReload(e=!1){window.location.reload(e)}appendIconStyleSheets(e,t){const n=t?[C.DEFAULT_CDN_ICON,C.IDE_OCTICONS_CN_CSS,C.IDE_CODICONS_CN_CSS]:[];e&&e.length&&e.forEach((e=>{this.updateIconMap(e.prefix,e.iconMap),n.push(e.cssPath)}));for(const e of n){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(t)}}updateIconMap(e,t){"kaitian-icon kticon-"===e&&this.logger.error("icon prefix涓庡唴缃浘鏍囧啿绐侊紝璇锋鏌ュ浘鏍囬厤缃紒"),(0,C.updateIconMap)(e,t)}initEarlyPreference(e){(0,y.registerLocalStorageProvider)("general.theme",e),(0,y.registerLocalStorageProvider)("general.icon",e),(0,y.registerLocalStorageProvider)("general.language",e)}async dispose(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._handleCompositionend),window.removeEventListener("keydown",this._handleKeydown,!0),s.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this.disposeSideEffect()}disposeSideEffect(){for(const e of this.contributions)if(e.onDisposeSideEffects)try{e.onDisposeSideEffects(this)}catch(e){this.logger.error("Could not dispose contribution",e)}}}},54395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderClientApp=t.App=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=i.__importDefault(n(5868)),a=n(25880),s=n(90642),c=n(90642),l=n(17335),d=n(26149),u=n(71898),p=n(73085),h=n(11792),m=n(7610);function g(e){const t=e.app.injector,n=t.get(s.IEventBus),i=t.get(h.LabelService),o=r.default.useCallback(((e,t)=>i.getIcon(s.URI.parse(e),t)),[]);return r.default.useEffect((()=>{let e;const t=()=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame((()=>{e=null,p.allSlot.forEach((e=>{n.fire(new d.ResizeEvent({slotLocation:e.slot}))}))}))};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[]),r.default.createElement(a.ComponentContextProvider,{value:{getIcon:m.getIcon,localize:c.localize,getResourceIcon:o}},r.default.createElement(u.ConfigProvider,{value:e.app.config},r.default.createElement(e.main,null),e.overlays&&e.overlays.map(((e,t)=>r.default.createElement(e,{key:t})))))}t.App=g;t.renderClientApp=function(e,t){const n=e.config.layoutComponent||l.DefaultLayout,i=e.browserModules.filter((e=>e.isOverlay)).map((e=>e.component?e.component:((0,s.getDebugLogger)().warn("妫€娴嬪埌绌虹殑overlay妯″潡",e),()=>r.default.createElement(r.default.Fragment,null)))),a=r.default.createElement(g,{app:e,main:n,overlays:i}),c="function"==typeof t?t:(d=t,u=e.config.didRendered,e=>new Promise((t=>{o.default.render(e,d,(()=>{u&&"function"==typeof u&&u(),t()}))})));var d,u;return c(a)}},72956:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindConnectionService=t.createClientConnection2=void 0;const i=n(41037),r=n(49943),o=n(86590),a=n(90642),s=n(25398),c=(0,a.getDebugLogger)();async function l(e,t,n){const r=new i.RPCServiceCenter;r.setConnection(n),n.onClose((()=>{r.removeConnection(n)}));const{getRPCService:o}=(0,i.initRPCService)(r),a=[],s=[];for(const n of t){const t=e.get(n);if(t.backServices)for(const e of t.backServices)a.push(e)}for(const t of a){const{servicePath:n}=t,i={token:n,useValue:o(n)};e.addProviders(i),t.clientToken&&s.push(t)}for(const t of s){const{servicePath:n}=t,i=o(n),r=e.get(t.clientToken);i.onRequestService(r)}}t.createClientConnection2=async function(e,t,n,i,d,u){const p=e.get(a.IReporterService),h=e.get(a.IEventBus),m=e.get(s.ClientAppStateService),g=new r.WSChannelHandler(n,c,d,u);g.setReporter(p),g.connection.addEventListener("open",(async()=>{await m.reachedState("core_module_initialized"),h.fire(new a.BrowserConnectionOpenEvent)})),g.connection.addEventListener("close",(async()=>{await m.reachedState("core_module_initialized"),h.fire(new a.BrowserConnectionCloseEvent)})),g.connection.addEventListener("error",(async e=>{await m.reachedState("core_module_initialized"),h.fire(new a.BrowserConnectionErrorEvent(e))})),await g.initHandler(),e.addProviders({token:r.WSChannelHandler,useValue:g});const f=await g.openChannel("RPCService");f.onReOpen((()=>i())),l(e,t,(0,o.createWebSocketConnection)(f))},t.bindConnectionService=l},27819:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(76221),t),i.__exportStar(n(54395),t),i.__exportStar(n(72956),t)},60491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=void 0;const i=n(90642),r=n(29277),o=n(55229),a=n(60706),s=n(85025),c=n(49079),l=n(63448),d=n(85981),u=n(1594),p=n(33335),h=n(82562),m=n(33905),g=n(26149),f=n(45060),_=n(57061),b=n(11866),y=n(83951),v=n(32001),C=n(75267),S=n(31855),w=n(7596),E=n(83538),k=n(45467),x=n(33),T=n(71898),D=n(73085),A=n(11792),I=n(24700),M=n(76506),R=n(49110),P=n(94922),O=n(55447),N=n(30930),L=n(93305),F=n(56336),B=n(68037),j=n(25943);t.injectInnerProviders=function(e){(0,i.createContributionProvider)(e,d.ClientAppContribution),(0,i.createContributionProvider)(e,i.CommandContribution),(0,i.createContributionProvider)(e,p.FsProviderContribution),(0,i.createContributionProvider)(e,h.KeybindingContribution),(0,i.createContributionProvider)(e,_.MenuContribution),(0,i.createContributionProvider)(e,g.ComponentContribution),(0,i.createContributionProvider)(e,D.SlotRendererContribution),(0,i.createContributionProvider)(e,E.PreferenceContribution),(0,i.createContributionProvider)(e,F.VariableContribution),(0,i.createContributionProvider)(e,g.TabBarToolbarContribution),(0,i.createContributionProvider)(e,R.ToolBarActionContribution);const t=[{token:i.IEventBus,useClass:i.EventBusImpl},{token:i.CommandService,useClass:i.CommandServiceImpl},{token:i.CommandRegistry,useClass:i.CommandRegistryImpl},{token:h.KeybindingRegistry,useClass:h.KeybindingRegistryImpl},{token:h.KeybindingService,useFactory:e=>e.get(h.KeybindingRegistry)},{token:a.KeyboardNativeLayoutService,useClass:m.BrowserKeyboardLayoutImpl},{token:a.KeyboardLayoutChangeNotifierService,useFactory:e=>e.get(a.KeyboardNativeLayoutService)},{token:m.KeyValidator,useFactory:e=>e.get(a.KeyboardNativeLayoutService)},s.ClientAppStateService,{token:f.ILogger,useClass:f.Logger},{token:g.ComponentRegistry,useClass:g.ComponentRegistryImpl},{token:F.VariableRegistry,useClass:F.VariableRegistryImpl},{token:_.AbstractMenuService,useClass:_.MenuServiceImpl},{token:_.AbstractContextMenuService,useClass:_.ContextMenuServiceImpl},{token:_.IMenuRegistry,useClass:_.MenuRegistryImpl},{token:C.IToolbarActionService,useClass:C.ToolbarActionService},{token:b.ICtxMenuRenderer,useClass:(0,N.useNativeContextMenu)()?v.ElectronCtxMenuRenderer:y.BrowserCtxMenuRenderer},{token:_.AbstractMenubarService,useClass:_.MenubarServiceImpl},{token:i.IReporter,useClass:i.DefaultReporter},{token:i.IReporterService,useClass:i.ReporterService},{token:i.ReporterMetadata,useValue:{host:i.REPORT_HOST.BROWSER}},{token:k.IProgressService,useClass:x.ProgressService},{token:R.IToolbarRegistry,useClass:O.NextToolbarRegistryImpl},{token:R.IToolbarPopoverRegistry,useClass:P.ToolbarPopoverRegistry},O.ToolbarClientAppContribution,{token:i.IProblemPatternRegistry,useClass:i.ProblemPatternRegistryImpl},{token:i.IProblemMatcherRegistry,useClass:i.ProblemMatchersRegistryImpl},{token:i.ITaskDefinitionRegistry,useClass:i.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:w.OpenerService},{token:B.IWindowService,useClass:j.WindowService},{token:i.IApplicationService,useClass:c.ApplicationService},{token:I.IClipboardService,useClass:I.BrowserClipboardService},{token:M.IExternalUriService,useClass:M.ExternalUriService},{token:i.IAuthenticationService,useClass:l.AuthenticationService},{token:A.ICryptoService,useClass:A.CryptoService},{token:A.ICredentialsService,useClass:A.CredentialsService},{token:o.IHashCalculateService,useClass:o.HashCalculateServiceImpl},{token:u.IExtensionsPointService,useClass:u.ExtensionsPointServiceImpl}];e.addProviders(...t),e.get(T.AppConfig).isElectronRenderer&&e.addProviders({token:i.IElectronMainMenuService,useValue:(0,L.createElectronMainApi)(i.IElectronMainMenuService)},{token:r.IElectronMainUIService,useValue:(0,L.createElectronMainApi)(r.IElectronMainUIService)},{token:r.IElectronMainLifeCycleService,useValue:(0,L.createElectronMainApi)(r.IElectronMainLifeCycleService)},{token:r.IElectronURLService,useValue:(0,L.createElectronMainApi)(r.IElectronURLService)},{token:v.IElectronMenuFactory,useClass:v.ElectronMenuFactory},{token:v.IElectronMenuBarService,useClass:v.ElectronMenuBarService})}},41815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const i=n(70655),r=n(39993),o=n(90642);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class a extends o.BasicModule{}i.__decorate([(0,r.Autowired)(t.IClientApp),i.__metadata("design:type",Object)],a.prototype,"app",void 0),t.BrowserModule=a},81164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const i=n(7610);!function(e){const t="file";e.NEW_FILE={id:"file.new",category:t,iconClass:(0,i.getIcon)("new-file")},e.RENAME_FILE={id:"file.rename",category:t},e.DELETE_FILE={id:"file.delete",category:t},e.NEW_FOLDER={id:"file.folder.new",category:t,iconClass:(0,i.getIcon)("new-folder")},e.COMPARE_SELECTED={id:"file.compare",category:t},e.OPEN_FILE={id:"file.open",category:t},e.SAVE_FILE={id:"file.save",category:t},e.COLLAPSE_ALL={id:"filetree.collapse.all",category:t,iconClass:(0,i.getIcon)("collapse-all")},e.REFRESH_ALL={id:"filetree.refresh.all",category:t,iconClass:(0,i.getIcon)("refresh")},e.OPEN_RESOURCES={id:"filetree.open.file",category:t},e.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:t},e.OPEN_TYPE_WITH={id:"filetree.open.with",category:t},e.COPY_PATH={id:"filetree.copy.path",category:t,label:"%file.copy.path%"},e.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:t},e.COPY_FILE={id:"filetree.copy.file",category:t},e.CUT_FILE={id:"filetree.cut.file",category:t},e.PASTE_FILE={id:"filetree.paste.file",category:t},e.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:t},e.LOCATION={id:"filetree.location",category:t},e.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:t,iconClass:(0,i.getIcon)("focus")},e.OPEN_FOLDER={id:"filetree.open.folder",category:t,label:"%file.open.folder%"},e.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:t},e.OPEN_WORKSPACE={id:"filetree.open.workspace",category:t,label:"%file.open.workspace%"},e.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:t},e.FOCUS_FILES={id:"filetree.focus.files",category:t,label:"%file.focus.files%"},e.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:t,iconClass:(0,i.getIcon)("retrieval")},e.FILTER_OPEN={id:"filetree.files.filter_open",category:t},e.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:t},e.FILTER_CLOSE={id:"filetree.quitFilterMode",category:t},e.NEXT={id:"filetree.next",category:t},e.PREV={id:"filetree.prev",category:t},e.COLLAPSE={id:"filetree.collapse",category:t},e.EXPAND={id:"filetree.expand",category:t},e.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:t}}(t.FILE_COMMANDS||(t.FILE_COMMANDS={})),function(e){const t="openeditors";e.SAVE_ALL={id:"opened.editors.save.all",category:t,iconClass:(0,i.getIcon)("save-all")},e.CLOSE_ALL={id:"opened.editors.close.all",category:t,iconClass:(0,i.getIcon)("close-all")},e.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},e.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},e.OPEN={id:"opened.editors.open",category:t},e.CLOSE={id:"opened.editors.close",category:t},e.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:t},e.COMPARE_SELECTED={id:"opened.editors.compare",category:t},e.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:t},e.COPY_PATH={id:"opened.editors.copyPath",category:t}}(t.OPEN_EDITORS_COMMANDS||(t.OPEN_EDITORS_COMMANDS={})),function(e){e.FIND={id:"core.find",label:"%common.find%"},e.REPLACE={id:"core.replace",label:"%common.replace%"},e.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},e.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},e.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},e.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},e.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open"},e.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}}(t.COMMON_COMMANDS||(t.COMMON_COMMANDS={})),function(e){const t="editor";e.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",e.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",e.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",e.NEW_UNTITLED_FILE={id:"file.new.untitled",category:t,label:"%file.new%",iconClass:(0,i.getIcon)("new-file")},e.UNDO={id:"editor.undo",category:t,label:"%editor.undo%"},e.REDO={id:"editor.redo",category:t,label:"%editor.redo%"},e.SELECT_ALL={id:"editor.selectAll",category:t,label:"%selection.all%"},e.OPEN_RESOURCE={id:"editor.openUri",category:t},e.OPEN_RESOURCES={id:"editor.openUris",category:t},e.SAVE_URI={id:"editor.saveUri",category:t,label:"%editor.saveUri%"},e.SAVE_CURRENT={id:"editor.saveCurrent",category:t,label:"%editor.saveCurrent%"},e.COMPARE={id:"editor.compare",category:t},e.CLOSE={id:"editor.close",category:t,label:"%editor.closeCurrent%"},e.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:t,label:"%editor.closeAllInGroup%"},e.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:t,label:"%editor.closeOtherEditors%"},e.CLOSE_ALL={id:"editor.closeAll",category:t,label:"%editor.close.all%"},e.CLOSE_SAVED={id:"editor.closeSaved",category:t,label:"%editor.closeSaved%"},e.SAVE_ALL={id:"editor.saveAll",category:t,label:"%editor.saveAll%",alias:"Save All"},e.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:t,label:"%editor.closeToRight%"},e.GET_CURRENT={id:"editor.getCurrent",category:t},e.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:t},e.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:t,label:"%editor.splitToLeft%"},e.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:t,label:"%editor.splitToRight%",iconClass:(0,i.getIcon)("embed")},e.SPLIT_TO_TOP={id:"editor.splitToTop",category:t,label:"%editor.splitToTop%"},e.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:t,label:"%editor.splitToBottom%"},e.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:t},e.CHANGE_ENCODING={id:"editor.changeEncoding",category:t},e.CHANGE_EOL={id:"editor.changeEol",category:t},e.NAVIGATE_LEFT={id:"editor.navigateLeft",category:t},e.NAVIGATE_RIGHT={id:"editor.navigateRight",category:t},e.NAVIGATE_UP={id:"editor.navigateUp",category:t},e.NAVIGATE_DOWN={id:"editor.navigateDown",category:t},e.NAVIGATE_NEXT={id:"editor.navigateNext",category:t},e.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:t},e.PREVIOUS={id:"editor.previous",category:t},e.NEXT={id:"editor.next",category:t},e.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:t},e.NEXT_IN_GROUP={id:"editor.nextInGroup",category:t},e.LAST_IN_GROUP={id:"editor.lastInGroup",category:t},e.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:t,label:"%editor.closeEditorsInOtherGroups%",alias:"Close Other Groups"},e.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:t},e.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:t,label:"%editor.resetEditorGroups%",alias:"Reset Editor Group"},e.REVERT_DOCUMENT={id:"editor.document.revert",category:t,label:"%editor.revert%",alias:"Revert Document"},e.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:t},e.GO_FORWARD={id:"editor.goForward",category:t},e.GO_BACK={id:"editor.goBack",category:t},e.PIN_CURRENT={id:"editor.pinCurrent",category:t},e.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:t},e.GO_TO_GROUP={id:"editor.goToGroup",category:t},e.MOVE_GROUP={id:"editor.moveGroup",category:t},e.REOPEN_CLOSED={id:"editor.reopenClosed",category:t},e.FOCUS={id:"editor.focus",category:t},e.TEST_TOKENIZE={id:"editor.tokenize.test",category:t,label:"%editor.tokenize.test%"},e.AUTO_SAVE={id:"editor.autoSave",category:t},e.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:t},e.COMPONENT_UNDO={id:"editor.componentUndo",category:t},e.COMPONENT_REDO={id:"editor.componentRedo"},e.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",alias:"Search Workspace Symbol",category:t},e.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",alias:"Search Workspace Class Symbol",category:t},e.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",alias:"Go to Line...",category:t},e.QUICK_OPEN={id:"workbench.action.quickOpen",category:t,label:"%editor.quickOpen%",alias:"Go to File..."},e.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",category:t},e.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:t,label:"%editor.formatDocument.label.multiple%",alias:"Format Document With..."},e.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:t,label:"%editor.formatSelection.label.multiple%",alias:"Format Selection With..."}}(t.EDITOR_COMMANDS||(t.EDITOR_COMMANDS={})),function(e){const t="search";e.OPEN_SEARCH={id:"content-search.openSearch",category:t,label:"Open search sidebar"},e.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,i.getIcon)("refresh"),category:t},e.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,i.getIcon)("clear"),category:t},e.FOLD={id:"file-search.fold",label:"fold search",iconClass:(0,i.getIcon)("collapse-all"),category:t},e.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:t},e.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:t},e.MENU_REPLACE={id:"search.menu.replace",category:t,label:"%search.replace.title%"},e.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:t,label:"%search.replaceAll.label%"},e.MENU_HIDE={id:"search.menu.hide",category:t,label:"%search.result.hide%"},e.MENU_COPY={id:"search.menu.copy",category:t,label:"%file.copy.file%"},e.MENU_COPY_ALL={id:"search.menu.copyAll",category:t,label:"%search.menu.copyAll%"},e.MENU_COPY_PATH={id:"search.menu.copyPath",category:t,label:"%file.copy.path%"}}(t.SEARCH_COMMANDS||(t.SEARCH_COMMANDS={})),function(e){const t="outline";e.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:t},e.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:t},e.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:t},e.OUTLINE_SORT_NAME={id:"outline.sort.name",category:t},e.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:t}}(t.OUTLINE_COMMANDS||(t.OUTLINE_COMMANDS={})),function(e){const t="workspace";e.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:t},e.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",category:t},e.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:t}}(t.WORKSPACE_COMMANDS||(t.WORKSPACE_COMMANDS={})),function(e){e.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:"keyboard"}}(t.KEYBOARD_COMMANDS||(t.KEYBOARD_COMMANDS={})),function(e){e.ENSURE={id:"dialog.ensure",category:"dialog"}}(t.DIALOG_COMMANDS||(t.DIALOG_COMMANDS={}));var r=n(73699);Object.defineProperty(t,"TERMINAL_COMMANDS",{enumerable:!0,get:function(){return r.TERMINAL_COMMANDS}})},72579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(99174),s=n(87433),c=n(3992),l=n(82562),d=n(67109),u=n(57061),p=n(83538),h=n(71898),m=n(81164),g=n(54846);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let f=class{constructor(){this.schema=s.corePreferenceSchema;const e={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:d.LAYOUT_VIEW_SIZE.MENUBAR_HEIGHT},t=Object.keys(this.schema.properties);for(const n of t)this.schema.properties[n].default=e[n]||this.schema.properties[n].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&("INPUT"===document.activeElement.tagName||"TEXTAREA"===document.activeElement.tagName)}updateInputContextKeys(){const e=this.activeElementIsInput();if(this.inputFocusedContext.set(e),e){const e=(0,c.trackFocus)(document.activeElement);o.Event.once(e.onDidBlur)((()=>{this.inputFocusedContext.set(this.activeElementIsInput()),e.dispose()}))}}registerCommands(e){e.registerCommand(m.EDITOR_COMMANDS.UNDO),e.registerCommand(m.EDITOR_COMMANDS.REDO),e.registerCommand(m.EDITOR_COMMANDS.SELECT_ALL),e.registerCommand(m.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,o.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(e){this.appConfig.isElectronRenderer&&e.registerMenubarItem(u.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),e.registerMenubarItem(u.MenuId.MenubarFileMenu,{label:(0,o.localize)("menu-bar.title.file"),order:1}),e.registerMenubarItem(u.MenuId.MenubarEditMenu,{label:(0,o.localize)("menu-bar.title.edit"),order:2}),e.registerMenubarItem(u.MenuId.MenubarSelectionMenu,{label:(0,o.localize)("menu-bar.title.selection"),order:3}),e.registerMenubarItem(u.MenuId.MenubarViewMenu,{label:(0,o.localize)("menu-bar.title.view"),order:4}),e.registerMenubarItem(u.MenuId.MenubarGoMenu,{label:(0,o.localize)("menu-bar.title.go"),order:5}),e.registerMenubarItem(u.MenuId.MenubarTerminalMenu,{label:(0,o.localize)("menu-bar.title.terminal"),order:5}),e.registerMenubarItem(u.MenuId.MenubarHelpMenu,{label:(0,o.localize)("menu-bar.title.help"),order:999}),e.registerMenuItems(u.MenuId.MenubarFileMenu,[{command:m.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:m.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:m.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:m.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,o.localize)("file.save")},group:"3_save"},{command:{id:m.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,o.localize)("file.saveAll")},group:"3_save"},{command:{id:m.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,o.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),e.registerMenuItems(u.MenuId.MenubarGoMenu,[{command:{id:m.EDITOR_COMMANDS.GO_BACK.id,label:(0,o.localize)("editor.goBack")},group:"1_go"},{command:{id:m.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,o.localize)("editor.goForward")},group:"1_go"},{command:{id:m.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,o.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:m.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,o.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:m.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,o.localize)("editor.goToLine")},group:"3_go_line"}]),e.registerMenuItems(u.MenuId.MenubarTerminalMenu,[{command:{id:m.TERMINAL_COMMANDS.ADD.id,label:m.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:m.TERMINAL_COMMANDS.SPLIT.id,label:m.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}]),this.appConfig.isElectronRenderer?(e.registerMenuItems(u.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),e.registerMenuItems(u.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])):(e.registerMenuItems(u.MenuId.MenubarEditMenu,[{command:m.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:m.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),e.registerMenuItem(u.MenuId.MenubarHelpMenu,{command:{id:m.COMMON_COMMANDS.ABOUT_COMMAND.id,label:m.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"}))}registerKeybindings(e){e.registerKeybinding({command:m.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),e.registerKeybinding({command:m.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),e.registerKeybinding({command:m.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],f.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(h.AppConfig),i.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),f=i.__decorate([(0,o.Domain)(o.CommandContribution,g.ClientAppContribution,p.PreferenceContribution,u.MenuContribution,l.KeybindingContribution),i.__metadata("design:paramtypes",[])],f),t.ClientCommonContribution=f},54846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},70074:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(70076),s=n(41815),c=n(92513),l=n(31855),d=n(89878),u=n(72579);let p=class extends s.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[l.OpenerContribution],this.providers=[u.ClientCommonContribution,d.DefaultOpenerContribution,d.OpenerContributionClient,a.AuthenticationContribution,c.HashCalculateContribution],this.backServices=[{servicePath:o.CommonServerPath},{servicePath:o.KeytarServicePath},{servicePath:o.CryptoServicePath}]}};p=i.__decorate([(0,r.Injectable)()],p),t.ClientCommonModule=p},36813:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const i=n(70655),r=n(39993),o=n(90642);let a=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};i.__decorate([(0,r.Autowired)(o.StorageProvider),i.__metadata("design:type",Function)],a.prototype,"getStorage",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.RecentStorage=a},85981:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(81164),t),i.__exportStar(n(70074),t),i.__exportStar(n(54846),t),i.__exportStar(n(36813),t)},32278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineMenuBar=t.InlineActionBar=t.TitleActionList=t.MenuActionList=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(25880),s=n(29382),c=n(90642),l=n(57061),d=n(12059),u=n(30930),p=i.__importDefault(n(7249)),h=i.__importDefault(n(6253)),m=({data:e,hasSubmenu:t,disabled:n})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:n,[h.default.checked]:e.checked})},o.default.createElement("div",{className:h.default.icon},e.checked?o.default.createElement(a.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},e.label?c.strings.mnemonicButtonLabel(e.label,!0):""),o.default.createElement("div",{className:h.default.tip},e.keybinding?o.default.createElement("div",{className:h.default.shortcut},e.keybinding):null,t?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(a.Icon,{icon:"right"})):null,!e.keybinding&&!t&&e.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},e.extraDesc)));t.MenuActionList=({data:e=[],context:t=[],afterClick:n})=>{if(!e.length)return null;const i=o.default.useCallback((e=>{const{key:i,item:r}=e;if([l.SeparatorMenuItemNode.ID,l.SubmenuItemNode.ID].includes(i))return;const o=(Array.isArray(r.props.children)?r.props.children[0]:r.props.children).props.data;o&&("function"==typeof o.execute&&o.execute(t),"function"==typeof n&&n(o))}),[e,t]),r=o.default.useCallback((e=>e.map(((e,t)=>e.id===l.SeparatorMenuItemNode.ID?o.default.createElement(s.Menu.Divider,{key:`divider-${t}`,className:h.default.menuItemDivider}):e.id===l.SubmenuItemNode.ID?Array.isArray(e.children)&&e.children.length?o.default.createElement(s.Menu.SubMenu,{key:`${e.id}-${t}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:o.default.createElement(m,{hasSubmenu:!0,data:e})},r(e.children)):null:o.default.createElement(s.Menu.Item,{id:`${e.id}-${t}`,key:`${e.id}-${t}`,className:h.default.menuItem,disabled:e.disabled},o.default.createElement(m,{data:e,disabled:e.disabled}))))),[]);return o.default.createElement(s.Menu,Object.assign({className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1}},{builtinPlacements:p.default},{onClick:i}),r(e))};const g=({type:e,onClick:t})=>"icon"===e?o.default.createElement(a.Icon,{icon:"ellipsis",className:h.default.iconAction,onClick:t}):o.default.createElement(a.Button,{size:"small",type:"secondary",className:h.default.btnAction,onClick:t},o.default.createElement(a.Icon,{icon:"ellipsis"}));g.displayName="EllipsisWidget";const f=o.default.memo((e=>{var{type:t="icon",data:n,context:s=[],className:c,afterClick:d}=e,u=i.__rest(e,["type","data","context","className","afterClick"]);const p=o.default.useCallback(((e,...t)=>{if(e&&(e.preventDefault(),e.stopPropagation()),n.id===l.SubmenuItemNode.ID&&e){const t={x:e.clientX,y:e.clientY};n.execute([t,...s])}else"function"==typeof n.execute&&n.execute([...s,...t]);"function"==typeof d&&d()}),[n,s]),m=o.default.useMemo((()=>{const e=n.tooltip||n.label;return n.keybinding?`${e} (${n.keybinding})`:e}),[n]),g=n.id===l.SubmenuItemNode.ID;return"icon"!==t||n.type?"checkbox"===n.type?o.default.createElement(a.CheckBox,Object.assign({className:(0,r.default)(c,h.default.btnAction),disabled:n.disabled,label:n.label,title:m,checked:n.checked,onChange:e=>p(void 0,e.target.checked)},u)):o.default.createElement(a.Button,Object.assign({className:(0,r.default)(c,h.default.btnAction),disabled:n.disabled,onClick:p,size:"small",type:n.type,title:m},u),n.label,g&&o.default.createElement(a.Icon,{icon:"down",className:"kt-button-secondary-more"})):o.default.createElement(a.Button,Object.assign({type:n.icon?"icon":"link",className:(0,r.default)(h.default.iconAction,c,{[h.default.disabled]:n.disabled,[h.default.submenuIconAction]:g}),title:m,iconClass:n.icon,onClick:p},u),!n.icon&&n.label)}));f.displayName="InlineAction";const _=({data:e,context:t})=>{const n=o.default.useCallback((()=>e.getExecuteArgs(t)),[e,t]);return o.default.createElement(e.component,{getExecuteArgs:n})};function b(e){const{menus:n,context:r,separator:a="navigation"}=e,s=i.__rest(e,["menus","context","separator"]),[c,l]=(0,u.useContextMenus)(n);return o.default.createElement(t.TitleActionList,Object.assign({menuId:n.menuId,nav:c,more:"inline"===a?[]:l,context:r},s))}_.displayName="CustomAction",t.TitleActionList=o.default.memo((({type:e="icon",nav:t=[],more:n=[],context:i=[],extraNavActions:a=[],moreAtFirst:s=!1,className:c,afterClick:u,menuId:p,regroup:m=((...e)=>e)})=>{const b=(0,d.useInjectable)(l.ICtxMenuRenderer),[y,v]=m(t,n),C=o.default.useCallback((e=>{e.preventDefault(),e.stopPropagation(),v&&b.show({anchor:{x:e.clientX,y:e.clientY},menuNodes:v,args:i,onHide:u})}),[v,i]);if(0===y.length&&0===v.length&&0===a.length)return null;const S=v.length>0?o.default.createElement(g,{type:e,onClick:C}):null;return o.default.createElement("div",{className:(0,r.default)([h.default.titleActions,c]),"data-menu-id":p},s&&S,y.map((t=>{if(t.id===l.ComponentMenuItemNode.ID)return o.default.createElement(_,{context:i,data:t,key:t.nodeId});const n=t.id===l.SubmenuItemNode.ID?t.submenuId:t.id;return o.default.createElement(f,{id:n,key:n,className:(0,r.default)({[h.default.selected]:t.checked}),type:e,data:t,afterClick:u,context:i})})),Array.isArray(a)&&a.length?o.default.createElement(o.default.Fragment,null,y.length&&o.default.createElement("span",{className:h.default.divider}),a):null,!s&&S)})),t.TitleActionList.displayName="TitleActionList",t.InlineActionBar=function(e){const{menus:n,context:r,separator:a="navigation",debounce:s}=e,c=i.__rest(e,["menus","context","separator","debounce"]),[l,d]=(0,u.useMenus)(n,a,r,s);return o.default.createElement(t.TitleActionList,Object.assign({menuId:n.menuId,nav:l,more:"inline"===a?[]:d},c))},t.InlineMenuBar=b,b.displayName="InlineMenuBar"},7249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const n={adjustX:1,adjustY:1},i=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:i},topCenter:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:i},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:i},bottomCenter:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:i},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:i}},t.default=t.placements},52e3:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSelect=void 0;const i=n(70655);i.__exportStar(n(37387),t),i.__exportStar(n(54253),t),i.__exportStar(n(69083),t),i.__exportStar(n(31644),t),i.__exportStar(n(45991),t),i.__exportStar(n(62263),t),i.__exportStar(n(16871),t);var r=n(86915);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),i.__exportStar(n(71214),t),i.__exportStar(n(27767),t),i.__exportStar(n(34492),t),i.__exportStar(n(54811),t),i.__exportStar(n(64531),t),i.__exportStar(n(70054),t),i.__exportStar(n(77306),t),i.__exportStar(n(12148),t),i.__exportStar(n(23237),t),i.__exportStar(n(41782),t),i.__exportStar(n(79237),t),i.__exportStar(n(47047),t),i.__exportStar(n(77093),t),i.__exportStar(n(90580),t)},55501:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(96800),s=i.__importDefault(n(48097));t.BoxPanel=e=>{var{className:t,children:n=[],direction:c="left-to-right"}=e,l=i.__rest(e,["className","children","direction"]);const d=o.default.Children.toArray(n);return o.default.createElement("div",Object.assign({},l,{className:(0,r.default)(s.default["box-panel"],t),style:{flexDirection:a.Layout.getFlexDirection(c),zIndex:l["z-index"]}}),d.map(((e,t)=>o.default.createElement("div",{key:t,className:(0,r.default)(s.default.wrapper),style:e.props?{flex:e.props.flex,overflow:e.props.overflow,zIndex:e.props.zIndex||e.props["z-index"],[a.Layout.getMinSizeProperty(c)]:e.props.defaultSize,backgroundColor:e.props.backgroundColor}:{}},e))))}},17335:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarActionBasedLayout=t.DefaultLayout=t.getStorageValue=void 0;const i=n(70655).__importDefault(n(616)),r=n(73085),o=n(55501),a=n(55563);function s(){var e,n,s,c,l;const{colors:d,layout:u}=(0,t.getStorageValue)();return i.default.createElement(o.BoxPanel,{direction:"top-to-bottom"},i.default.createElement(r.SlotRenderer,{backgroundColor:d.menuBarBackground,defaultSize:0,slot:"top","z-index":2}),i.default.createElement(a.SplitPanel,{id:"main-horizontal",flex:1},i.default.createElement(r.SlotRenderer,{backgroundColor:d.sideBarBackground,slot:"left",isTabbar:!0,defaultSize:(null===(e=u.left)||void 0===e?void 0:e.currentId)?(null===(n=u.left)||void 0===n?void 0:n.size)||310:49,minResize:204,minSize:49}),i.default.createElement(a.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},i.default.createElement(r.SlotRenderer,{backgroundColor:d.editorBackground,flex:2,flexGrow:1,minResize:200,slot:"main"}),i.default.createElement(r.SlotRenderer,{backgroundColor:d.panelBackground,flex:1,defaultSize:null===(s=u.bottom)||void 0===s?void 0:s.size,minResize:160,slot:"bottom",isTabbar:!0})),i.default.createElement(r.SlotRenderer,{backgroundColor:d.sideBarBackground,slot:"right",isTabbar:!0,defaultSize:(null===(c=u.right)||void 0===c?void 0:c.currentId)?(null===(l=u.right)||void 0===l?void 0:l.size)||310:0,minResize:200,minSize:0})),i.default.createElement(r.SlotRenderer,{backgroundColor:d.statusBarBackground,defaultSize:24,slot:"statusBar"}))}t.getStorageValue=()=>{let e={},t={};try{e=JSON.parse(localStorage.getItem("layout")||"{}"),t=JSON.parse(localStorage.getItem("theme")||"{}")}catch(e){}return{layout:e,colors:t}},t.DefaultLayout=s,t.ToolbarActionBasedLayout=s},62263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(96800),t),i.__exportStar(n(55563),t),i.__exportStar(n(55501),t),i.__exportStar(n(17335),t)},96800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const i=n(45991),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};!function(e){e.getFlexDirection=function(e){return r[e].direction},e.getSizeProperty=function(e){return r[e].size},e.getDomSizeProperty=function(e){return r[e].domSize},e.getMinSizeProperty=function(e){return r[e].minSize},e.getMaxSizeProperty=function(e){return r[e].maxSize},e.getResizeHandle=function(e){return"bottom-to-top"===e||"top-to-bottom"===e?i.ResizeHandleVertical:i.ResizeHandleHorizontal},e.getTabbarDirection=function(e){return"bottom-to-top"===e||"top-to-bottom"===e?"row":"column"}}(t.Layout||(t.Layout={}))},55563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(90642),s=n(26149),c=n(12059),l=n(45991),d=n(96800),u=n(67301),p=i.__importDefault(n(48097));t.PanelContext=o.default.createContext({setSize:(e,t)=>{},setRelativeSize:(e,t,n)=>{},getSize:e=>0,getRelativeSize:e=>[0,0],lockSize:(e,t)=>{},setMaxSize:(e,t)=>{},hidePanel:e=>{}});const h=(e,t)=>e&&e.props&&e.props[t];t.SplitPanel=e=>{var{id:n,className:m,style:g,children:f=[],direction:_="left-to-right",resizeKeep:b=!0,flexGrow:y,dynamicTarget:v,minResize:C,useDomSize:S}=e,w=i.__rest(e,["id","className","style","children","direction","resizeKeep","flexGrow","dynamicTarget","minResize","useDomSize"]);const E=d.Layout.getResizeHandle(_),k=o.default.Children.toArray(f),x=k.reduce(((e,t)=>e+(void 0!==h(t,"flex")?t.props.flex:1)),0),T=[],D=o.default.useRef([]),A=(0,c.useInjectable)(a.IEventBus),I=o.default.useRef(),M=(0,c.useInjectable)(u.SplitPanelManager).getService(n),R=o.default.useRef(k.map((()=>!1))),P=o.default.useRef(k.map((()=>!1))),O=o.default.useRef(R.current.slice(0,k.length-1)),[N,L]=o.default.useState(O.current),[F,B]=o.default.useState(P.current),[j,z]=o.default.useState(R.current);M.panels=[];const U=e=>(t,n)=>{const i=n?e-1:e,r=D.current[i];r&&r.setAbsoluteSize(void 0!==t?t:h(k[e],"defaultSize"),n,b)},W=e=>(t,n,i)=>{const r=i?e-1:e,o=D.current[r];o&&o.setRelativeSize(t,n)},V=e=>t=>{const n=t?e-1:e,i=D.current[n];return i?i.getAbsoluteSize(t):0},H=e=>t=>{const n=t?e-1:e,i=D.current[n];return i?i.getRelativeSize():[0,0]},K=e=>(t,n)=>{const i=n?e-1:e,r=O.current.map(((e,n)=>n===i?void 0!==t?t:!e:e));O.current=r,L(r)},$=e=>(t,n)=>{const i=R.current.map(((n,i)=>i===e?void 0!==t?t:!n:n));R.current=i,z(i)},G=e=>t=>{const n=P.current.map(((n,i)=>i===e?void 0!==t?!t:!n:n));P.current=n;const i=h(k[e],"slot")||h(k[e],"id");i&&q(i),B(n)},q=e=>{e&&A.fire(new s.ResizeEvent({slotLocation:e}))};function Z(e){return e.props.savedSize?e.props.savedSize+"px":void 0!==e.props.defaultSize?e.props.defaultSize+"px":e.props.flex?e.props.flex/x*100+"%":1/x*100+"%"}return k.forEach(((e,n)=>{if(0!==n){const t=1===n?k[n-1]:k[n];let i;h(e,"flexGrow")?i=l.ResizeFlexMode.Prev:h(k[n-1],"flexGrow")&&(i=l.ResizeFlexMode.Next);h(t,"noResize")||N[n-1]||T.push(o.default.createElement(E,{onResize:(e,t)=>{const i=h(k[n-1],"slot")||h(k[n-1],"id"),r=h(k[n],"slot")||h(k[n],"id");q(i),q(r)},noColor:!0,findNextElement:v?e=>M.getFirstResizablePanel(n-1,e):void 0,findPrevElement:v?e=>M.getFirstResizablePanel(n-1,e,!0):void 0,key:`split-handle-${n}`,delegate:e=>{D.current.push(e)},flexMode:i}))}T.push(o.default.createElement(t.PanelContext.Provider,{key:n,value:{setSize:U(n),getSize:V(n),setRelativeSize:W(n),getRelativeSize:H(n),lockSize:K(n),setMaxSize:$(n),hidePanel:G(n)}},o.default.createElement("div",{"data-min-resize":h(e,"minResize"),ref:e=>{e&&-1===M.panels.indexOf(e)&&M.panels.push(e)},id:h(e,"id"),style:Object.assign(Object.assign(Object.assign(Object.assign({},!e.props.flex||e.props.savedSize||k.find((e=>e.props.flexGrow))?{[d.Layout.getSizeProperty(_)]:Z(e)}:{flex:e.props.flex}),{[d.Layout.getMinSizeProperty(_)]:h(e,"minSize")?e.props.minSize+"px":"-1px",[d.Layout.getMaxSizeProperty(_)]:j[n]&&h(e,"maxSize")?e.props.maxSize+"px":"unset"}),void 0!==h(e,"flexGrow")?{flexGrow:e.props.flexGrow}:{}),{display:F[n]?"none":"block",backgroundColor:e.props.backgroundColor})},e)))})),o.default.useEffect((()=>{I.current&&(M.rootNode=I.current);const e=A.on(s.ResizeEvent,(e=>{e.payload.slotLocation===n&&k.forEach((e=>{q(h(e,"slot")||h(e,"id"))}))}));return()=>{e.dispose()}}),[]),o.default.createElement("div",Object.assign({ref:e=>I.current=e},w,{className:(0,r.default)(p.default["split-panel"],m),style:Object.assign({flexDirection:d.Layout.getFlexDirection(_)},g)}),T)}},67301:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=void 0;const r=n(70655),o=n(39993);let a=i=class{constructor(e){this.panelId=e,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}getFirstResizablePanel(e,t,n){if(n){if(t)return this.panels[e];for(let t=e;t>=0;t--)if(this.panels[t].clientHeight>i.MIN_SIZE)return this.panels[t]}else{if(!t)return this.panels[e+1];for(let t=e+1;ti.MIN_SIZE)return this.panels[t]}}};a.MIN_SIZE=120,a=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[String])],a),t.SplitPanelService=a;let s=class{constructor(){this.services=new Map}getService(e){let t=this.services.get(e);return t||(t=this.injector.get(a,[e]),this.services.set(e,t)),t}};r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],s.prototype,"injector",void 0),s=r.__decorate([(0,o.Injectable)()],s),t.SplitPanelManager=s},69935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(30581),t)},30581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const i=n(70655).__importDefault(n(616));n(55154);t.Loading=()=>i.default.createElement("div",{className:"loading_indicator "}),t.Loading.displayName="Loading"},31644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655).__importDefault(n(5868)),r=n(12059);t.default=({id:e,children:t})=>{const n=(0,r.usePortal)(e);return i.default.createPortal(t,n)}},83663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressBar=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=i.__importDefault(n(31051));t.ProgressBar=r.default.memo((({loading:e})=>e?r.default.createElement("div",{className:o.default.progressbar},r.default.createElement("div",{className:o.default.barblock})):null))},54253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(4579),t)},4579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.DeprecatedRecycleTree=void 0;const i=n(70655),r=i.__importDefault(n(43261)),o=i.__importDefault(n(616)),a=n(69198),s=n(37387),c=n(69083);t.DeprecatedRecycleTree=({nodes:e,leftPadding:t,defaultLeftPadding:n,multiSelectable:i,scrollContainerStyle:a,scrollContentStyle:l,onContextMenu:d,onDrag:u,onDragStart:p,onDragEnter:h,onDragOver:m,onDragLeave:g,onDragEnd:f,onDrop:_,onChange:b,draggable:y,foldable:v,editable:C,searchable:S,search:w,replace:E,onSelect:k,onBlur:x,onFocus:T,onReveal:D,filter:A,onTwistieClick:I,scrollTop:M,prerenderNumber:R=10,containerHeight:P,itemLineHeight:O=22,actions:N,commandActuator:L,fileDecorationProvider:F,themeProvider:B,notifyFileDecorationsChange:j,notifyThemeChange:z,validate:U,alwaysShowActions:W})=>{const V=()=>{},H=Math.ceil(P/O),[K,$]=o.default.useState(),[G,q]=o.default.useState(0),[Z,Y]=o.default.useState([]),X=G+H+R,Q=Math.floor(R*(3/4)),J={pre:"",post:"",extract:e=>"string"==typeof e.name?e.name:""},ee=(e,t)=>{if(e.id===t.id)return!0;let n=t.parent;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1};o.default.useEffect((()=>{"number"==typeof M&&K&&(K.scrollTop=M),q(M?Math.floor(M/O):0)}),[M]),o.default.useEffect((()=>{let t;if(A){const n=r.default.filter(A,e,J),i=e.find((e=>e.name===c.TEMP_FILE_NAME));t=e.map((e=>{for(const a of n){if(t=e,r=a.original,t.id===r.id)return Object.assign(Object.assign({},e),{name:()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:a.string||""}})});if(ee(e,a.original)||i&&ee(e,i))return e;if(e.name===c.TEMP_FILE_NAME)return e}var t,r})).filter((e=>!!e))}else t=e;t=t.filter(((e,t)=>G<=t&&t<=X)),t=t.map(((e,t)=>{let n=e.highLightRanges;if(!n&&S&&w){let t,i;if(n={name:[],description:[]},"string"==typeof e.name){let r=0;for(t=e.name.indexOf(w);t>=0;)i=t+w.length,n.name.push({start:t+r,end:i+r}),r+=i,t=e.name.indexOf(w.slice(i))}if("string"==typeof e.description){let r=0;for(t=e.description.indexOf(w);t>=0;)i=t+w.length,n.description.push({start:t+r,end:i+r}),r+=i,t=e.description.indexOf(w.slice(i))}}return Object.assign(Object.assign({},e),{order:G+t,highLightRanges:n,replace:E})})),Y(t)}),[e,G,a]),o.default.useEffect((()=>{K&&(K.scrollTop=0),q(0)}),[A]);const te=l||{width:"100%",height:e.length*O<=P?P:e.length*O,userSelect:"none"},ne=!!e.find(((e,t)=>c.ExpandableTreeNode.is(e)));return o.default.createElement(o.default.Fragment,null,o.default.createElement(s.PerfectScrollbar,{style:a,onScrollUp:t=>{requestAnimationFrame((()=>{(t=>{const n=Math.floor(t.scrollTop/O);if(n>Q){const t=n-Q;q(t>e.length?0:t)}else q(0)})(t)}))},onScrollDown:t=>{requestAnimationFrame((()=>{(t=>{const n=Math.floor(t.scrollTop/O);if(n>R-Q){const t=n-(R-Q);q(t>e.length?0:t)}else q(0)})(t)}))},containerRef:e=>{$(e)},options:{minScrollbarLength:20}},o.default.createElement(c.TreeContainer,{style:te,multiSelectable:i,itemLineHeight:O,nodes:Z,actions:N,commandActuator:L,leftPadding:t,defaultLeftPadding:n,onContextMenu:d||V,onDrag:u||V,onBlur:x||V,onFocus:T||V,onDragStart:p||V,onDragEnter:h||V,onDragEnd:f||V,onDragOver:m||V,onDragLeave:g||V,onChange:b||V,onDrop:_||V,onSelect:k||V,onReveal:D||V,onTwistieClick:I,draggable:y,foldable:v,replace:E,editable:C,fileDecorationProvider:F,themeProvider:B,notifyFileDecorationsChange:j,notifyThemeChange:z,validate:U,isComplex:ne,alwaysShowActions:W})))},t.DeprecatedRecycleTree.displayName="DeprecatedRecycleTree",t.RecycleTree=(0,a.Deprecated)(t.DeprecatedRecycleTree,"[Deprecated warning]: The `RecycleTree` component in `@opensumi/ide-core-browser` will be removed in v2.19.0 version. Please use the new `RecycleTree` in `@opensumi/ide-component` instead")},45991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=i.__importDefault(n(5068));var s;function c(){const e=document.getElementsByTagName("iframe"),t=document.getElementsByTagName("webview");for(const e of t)e.classList.add("none-pointer-event");for(const t of e)t.classList.add("none-pointer-event");const n=document.getElementsByClassName("shadow-root-host");for(const e of n)null==e||e.classList.add("none-pointer-event")}function l(){const e=document.getElementsByTagName("iframe"),t=document.getElementsByTagName("webview");for(const e of t)e.classList.remove("none-pointer-event");for(const t of e)t.classList.remove("none-pointer-event");const n=document.getElementsByClassName("shadow-root-host");for(const e of n)null==e||e.classList.remove("none-pointer-event")}t.RESIZE_LOCK="resize-lock",function(e){e.Prev="prev",e.Next="next",e.Percentage="Percentage"}(s=t.ResizeFlexMode||(t.ResizeFlexMode={}));t.ResizeHandleHorizontal=e=>{const n=o.default.useRef(),i=o.default.useRef(!1),d=o.default.useRef(0),u=o.default.useRef(0),p=o.default.useRef(0),h=o.default.useRef(),m=o.default.useRef(),g=o.default.useRef(),f=(i,r)=>{const o=n.current.parentElement.offsetWidth,a=e.findPrevElement?e.findPrevElement():h.current,s=e.findNextElement?e.findNextElement():m.current;if(a&&a.classList.contains(t.RESIZE_LOCK)||s&&s.classList.contains(t.RESIZE_LOCK))return;const c=a.dataset.minResize||0,l=s.dataset.minResize||0;(c||l)&&(i*o<=c||r*o<=l)||(s&&(s.style.width=100*r+"%"),a&&(a.style.width=100*i+"%"),e.onResize&&s&&a&&e.onResize(a,s))},_=(t,n,i,r)=>{const o=e.findPrevElement?e.findPrevElement(r):h.current,a=e.findNextElement?e.findNextElement(r):m.current;let c,l,d=0;const u=parseInt(o.dataset.minResize||"0",10),p=parseInt(a.dataset.minResize||"0",10);e.flexMode===s.Prev?(c=o,l=a,d=t,i||(u>t?d=u:p>n&&(d=t+n-p))):(c=a,l=o,d=n,i||(p>n?d=p:u>t&&(d=t+n-u))),c.style.width=d+"px",c.style.flexGrow="0",c.style.flexShrink="1",l.style.width="0",l.style.flexGrow="1",l.style.flexShrink="0",e.onResize&&a&&o&&e.onResize(o,a)},b=(t,n)=>{const i=h.current,r=m.current;let o;o=e.flexMode?(i.offsetWidth+r.offsetWidth)/i.parentElement.offsetWidth*100:+m.current.style.width.replace("%","")+ +h.current.style.width.replace("%",""),r&&(r.style.width=n/(t+n)*o+"%"),i&&(i.style.width=t/(t+n)*o+"%"),y(t,n),e.onResize&&r&&i&&e.onResize(i,r)},y=(e,t)=>{const i=h.current,r=m.current;let o=!1;i&&(0===e?(i.classList.add("kt_display_none"),o=!0):i.classList.remove("kt_display_none")),r&&(0===t?(r.classList.add("kt_display_none"),o=!0):r.classList.remove("kt_display_none")),n.current&&(o?n.current.classList.add("none-pointer-event"):n.current.classList.remove("none-pointer-event"))},v=()=>{const e=h.current.clientWidth,t=m.current.clientWidth,n=e+t,i=[];return i.push(e/n),i.push(t/n),i},C=(t,n)=>{const i=h.current.clientWidth+m.current.clientWidth;if(e.flexMode){const n=e.flexMode===s.Prev?t:i-t,r=e.flexMode===s.Next?t:i-t;_(n,r,!0)}else{const e=+m.current.style.width.replace("%","")+ +h.current.style.width.replace("%","");n?(m.current.style.width=e*(t/i)+"%",h.current.style.width=e*(1-t/i)+"%"):(h.current.style.width=e*(t/i)+"%",m.current.style.width=e*(1-t/i)+"%")}n?y(i-t,t):y(t,i-t),e.onResize&&e.onResize(h.current,m.current)},S=e=>e?m.current.clientWidth:h.current.clientWidth,w=e=>{const t=e.classList,n=a.default["resize-overflow-hidden"];(null==t?void 0:t.contains(n))||t.add(n)},E=e=>{const t=e.classList,n=a.default["resize-overflow-hidden"];(null==t?void 0:t.contains(n))&&t.remove(n)},k=t=>{if(t.preventDefault(),n.current&&n.current.classList.contains("no-resize"))return;const i=u.current+t.pageX-d.current,r=p.current-(t.pageX-d.current);g.current&&window.cancelAnimationFrame(g.current);const o=n.current.parentElement.offsetWidth;g.current=window.requestAnimationFrame((()=>{e.flexMode?_(i,r):f(i/o,r/o)}))},x=t=>{var r;i.current=!1,null===(r=n.current)||void 0===r||r.classList.remove(a.default.active),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",x),E(h.current),E(m.current),e.onFinished&&e.onFinished(),l()},T=e=>{var t;i.current=!0,null===(t=n.current)||void 0===t||t.classList.add(a.default.active),document.addEventListener("mousemove",k),document.addEventListener("mouseup",x),d.current=e.pageX,u.current=h.current.offsetWidth,p.current=m.current.offsetWidth,w(h.current),w(m.current),c()};return o.default.useEffect((()=>(n.current&&(n.current.addEventListener("mousedown",T),h.current=n.current.previousSibling,m.current=n.current.nextSibling),()=>{n.current&&(n.current.removeEventListener("mousedown",T),n.current.removeEventListener("mousemove",k),n.current.removeEventListener("mouseup",x))})),[]),e.delegate&&e.delegate({setSize:f,setAbsoluteSize:C,getAbsoluteSize:S,setRelativeSize:b,getRelativeSize:v}),o.default.createElement("div",{ref:e=>{n.current=e},className:(0,r.default)({[a.default["resize-handle-horizontal"]]:!0,[a.default["with-color"]]:!e.noColor,[e.className||""]:!0})})};t.ResizeHandleVertical=e=>{const n=o.default.useRef(),i=o.default.useRef(!1),d=o.default.useRef(0),u=o.default.useRef(0),p=o.default.useRef(0),h=o.default.useRef(),m=o.default.useRef(),g=o.default.useRef(),f=o.default.useRef(),_=o.default.useRef(),b=(n,i,r)=>{const o=e.findPrevElement?e.findPrevElement(r):h.current,a=e.findNextElement?e.findNextElement(r):m.current;a&&o&&(o.classList.contains(t.RESIZE_LOCK)||a.classList.contains(t.RESIZE_LOCK)||(a.style.height=100*i+"%",o.style.height=100*n+"%",e.onResize&&e.onResize(o,a)))},y=(t,n,i,r)=>{const o=e.findPrevElement?e.findPrevElement(r):h.current,a=e.findNextElement?e.findNextElement(r):m.current;let c,l,d=0;const u=parseInt(o.dataset.minResize||"0",10),p=parseInt(a.dataset.minResize||"0",10);e.flexMode===s.Prev?(c=o,l=a,d=t,i||(u>t?d=u:p>n&&(d=t+n-p))):(c=a,l=o,d=n,i||(p>n?d=p:u>t&&(d=t+n-u))),c.style.height=d+"px",c.style.flexGrow="0",c.style.flexShrink="1",l.style.height="0",l.style.flexGrow="1",l.style.flexShrink="0",e.onResize&&a&&o&&e.onResize(o,a)},v=(t,n)=>{const i=h.current,r=m.current;let o;o=e.flexMode?(i.offsetHeight+r.offsetHeight)/i.parentElement.offsetHeight*100:+r.style.height.replace("%","")+ +i.style.height.replace("%",""),r&&(r.style.height=n/(t+n)*o+"%"),i&&(i.style.height=t/(t+n)*o+"%"),C(t,n),e.onResize&&r&&i&&e.onResize(i,r)},C=(e,t)=>{const i=h.current,r=m.current;let o=!1;i&&(0===e?(i.classList.add("kt_display_none"),o=!0):i.classList.remove("kt_display_none")),r&&(0===t?(r.classList.add("kt_display_none"),o=!0):r.classList.remove("kt_display_none")),n.current&&(o?n.current.classList.add("none-pointer-event"):n.current.classList.remove("none-pointer-event"))},S=()=>{const e=h.current.clientHeight,t=m.current.clientHeight,n=e+t,i=[];return i.push(e/n),i.push(t/n),i},w=(t,n,i)=>{const r=h.current.clientHeight+m.current.clientHeight;if(e.flexMode){const n=e.flexMode===s.Prev?t:r-t,i=e.flexMode===s.Next?t:r-t;y(n,i,!0)}else{const e=+m.current.style.height.replace(/\%|px/,"")+ +h.current.style.height.replace(/\%|px/,"");if(n){i&&(h.current.style.height=e*(1-t/r)+"%");const n=e*(t/r);m.current.style.height=0===n?n+"px":n+"%"}else h.current.style.height=e*(t/r)+"%",i&&(m.current.style.height=e*(1-t/r)+"%")}n?C(r-t,t):C(t,r-t),e.onResize&&e.onResize(h.current,m.current)},E=e=>e?m.current.clientHeight:h.current.clientHeight,k=e=>{var t;i.current=!0,null===(t=n.current)||void 0===t||t.classList.add(a.default.active),document.addEventListener("mousemove",x),document.addEventListener("mouseup",T),d.current=e.pageY,f.current=m.current,g.current=h.current,u.current=h.current.offsetHeight,p.current=m.current.offsetHeight,c()},x=i=>{if(i.preventDefault(),n.current&&n.current.classList.contains("no-resize"))return;const r=i.pageY>d.current,o=e.findNextElement?e.findNextElement(r):null,a=e.findPrevElement?e.findPrevElement(r):null;if(null!==o&&f.current!==o||null!==a&&g.current!==a){if(!o||!a)return;f.current=o,g.current=a,d.current=i.pageY,u.current=g.current.offsetHeight,p.current=f.current.offsetHeight}const c=u.current+i.pageY-d.current,l=p.current-(i.pageY-d.current);_.current&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame((()=>{const i=g.current.dataset.minResize||0,r=f.current.dataset.minResize||0;var o,a,d,u;if(!i&&!r||!(c<=i||l<=r))if(e.flexMode===s.Prev||e.flexMode===s.Next)y(c,l);else if(e.flexMode===s.Percentage){const e=n.current.parentElement.offsetHeight;b(c/e,l/e)}else o=c,a=l,d=g.current,u=f.current,d.classList.contains(t.RESIZE_LOCK)||u.classList.contains(t.RESIZE_LOCK)||(u.style.height=a+"px",d.style.height=o+"px",u.style.flex="unset",d.style.flex="unset",e.onResize&&u&&d&&e.onResize(d,u))}))},T=t=>{var r;i.current=!1,null===(r=n.current)||void 0===r||r.classList.remove(a.default.active),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T),e.onFinished&&e.onFinished(),l()};return o.default.useEffect((()=>(n.current.addEventListener("mousedown",k),h.current=n.current.previousSibling,m.current=n.current.nextSibling,()=>{n.current.removeEventListener("mousedown",k),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T)})),[]),e.delegate&&e.delegate({setSize:b,setAbsoluteSize:w,getAbsoluteSize:E,setRelativeSize:v,getRelativeSize:S}),o.default.createElement("div",{ref:e=>e&&(n.current=e),className:(0,r.default)({[a.default["resize-handle-vertical"]]:!0,[e.className||""]:!0,[a.default["with-color"]]:!e.noColor})})}},16871:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=i.__importDefault(n(28256));class s extends o.default.Component{constructor(){super(...arguments),this.position={top:0,left:0},this.dragging=!1,this.draggingStart=0,this.draggingStartPos=0,this.shouldHideThumb=!0,this.isAtTop=!0,this.onMouseMoveHorizontal=e=>{if(!this.dragging)return;const t=e.pageX-this.draggingStart;this.ref.scrollLeft=this.draggingStartPos+this.calculateXToLeft(t)},this.onMouseUpHorizontal=e=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHorizontal),document.removeEventListener("mouseup",this.onMouseUpHorizontal),this.shouldHideThumb&&this.hideThumb()},this.onMouseMoveVertical=e=>{if(!this.dragging)return;const t=e.pageY-this.draggingStart;this.ref.scrollTop=this.draggingStartPos+this.calculateYToTop(t)},this.onMouseUpVertical=e=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveVertical),document.removeEventListener("mouseup",this.onMouseUpVertical),this.shouldHideThumb&&this.hideThumb()},this.onMousewheel=e=>{this.ref.clientHeight>=this.ref.scrollHeight&&0!==e.deltaY&&(this.ref.scrollLeft+=e.deltaY)},this.onMouseEnter=()=>{this.update()},this.handleWindowResize=()=>{this.update()},this.update=e=>{this.requestFrame&&window.cancelAnimationFrame(this.requestFrame),this.requestFrame=window.requestAnimationFrame((()=>{this._update(),e&&e()}))}}onScroll(e){this.position={top:this.ref.scrollTop,left:this.ref.scrollLeft},this.props.onScroll&&this.props.onScroll(this.position),this.update((()=>{const e=this.ref.scrollWidth,t=this.ref.offsetWidth,n=this.ref.scrollHeight,i=this.ref.offsetHeight;this.thumbH.style.left=this.position.left*t/e+"px",this.thumbV.style.top=this.position.top*i/n+"px"})),this.isAtTop||0!==this.ref.scrollTop?this.isAtTop&&0!==this.ref.scrollTop&&(this.isAtTop=!1,this.setCss()):(this.isAtTop=!0,this.setCss()),this.ref.scrollLeft>0?(this.decorationL.style.opacity=String(1),this.decorationR.style.opacity=String(1)):this.decorationL.style.opacity=String(0),this.ref.scrollWidth!==this.ref.offsetWidth&&this.ref.scrollLeft!==this.ref.scrollWidth-this.ref.offsetWidth||(this.decorationR.style.opacity=String(0))}scrollTo(e){this.ref.scrollLeft=e.left,this.ref.scrollTop=e.top}onMouseDownHorizontal(e){this.dragging=!0,e.target===this.trackH&&this.onMouseDownOnTrack(e),this.draggingStart=e.pageX,this.draggingStartPos=this.ref.scrollLeft,document.addEventListener("mousemove",this.onMouseMoveHorizontal),document.addEventListener("mouseup",this.onMouseUpHorizontal)}onMouseDownOnTrack(e){const t=e.target,n=e.clientX-t.getBoundingClientRect().left,i=this.ref.scrollWidth,r=this.ref.offsetWidth,o=n*i/r-.5*r;this.scrollTo({left:o,top:this.position.top})}calculateXToLeft(e){return e*this.ref.scrollWidth/this.ref.offsetWidth}onMouseDownVertical(e){this.dragging=!0,e.target===this.trackV&&this.onMouseDownOnTrackVertical(e),this.draggingStart=e.pageY,this.draggingStartPos=this.ref.scrollTop,document.addEventListener("mousemove",this.onMouseMoveVertical),document.addEventListener("mouseup",this.onMouseUpVertical)}onMouseDownOnTrackVertical(e){const t=e.target,n=e.clientY-t.getBoundingClientRect().top,i=this.ref.scrollHeight,r=this.ref.offsetHeight,o=n*i/r-.5*r;this.scrollTo({left:this.position.left,top:o})}calculateYToTop(e){return e*this.ref.scrollHeight/this.ref.offsetHeight}componentDidUpdate(){this.update(),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)})}componentDidMount(){this.update(),window.addEventListener("resize",this.handleWindowResize),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)}),this.ref&&(this.ref.addEventListener("mouseenter",this.onMouseEnter),this.ref.addEventListener("wheel",this.onMousewheel))}componentWillUnmount(){this.ref&&(this.ref.removeEventListener("mouseenter",this.onMouseEnter),this.ref.addEventListener("wheel",this.onMousewheel)),window.removeEventListener("resize",this.handleWindowResize),this.requestFrame&&window.cancelAnimationFrame(this.requestFrame)}sizeEqual(e,t){return e&&t&&e.offsetHeight===t.offsetHeight&&e.scrollHeight===t.scrollHeight&&e.offsetWidth===t.offsetWidth&&e.scrollWidth===t.scrollWidth}_update(){this.ref&&(this.sizeEqual(this.size,this.ref)||(this.size={offsetHeight:this.ref.offsetHeight,offsetWidth:this.ref.offsetWidth,scrollWidth:this.ref.scrollWidth,scrollHeight:this.ref.scrollHeight},this.updateScrollBar()))}updateScrollBar(){const e=this.ref.scrollWidth,t=this.ref.offsetWidth;if(te&&(this.container=e),onMouseMove:()=>this.showThumb(),onMouseLeave:()=>this.hideThumb(),style:this.props.containerStyle},o.default.createElement("div",{style:this.props.style,className:(0,r.default)(this.props.className),onScroll:this.onScroll.bind(this),ref:e=>e&&(this.ref=e),onMouseDown:()=>this.update(),onMouseUp:()=>this.update()},this.props.children),o.default.createElement("div",{className:a.default["scrollbar-decoration-vertical-l"],ref:e=>e&&(this.decorationL=e)}),o.default.createElement("div",{className:a.default["scrollbar-decoration-vertical-r"],ref:e=>e&&(this.decorationR=e)}),o.default.createElement("div",{className:a.default["scroll-horizontal"]},o.default.createElement("div",{className:a.default["track-horizontal"],ref:e=>e&&(this.trackH=e),onMouseDown:this.onMouseDownHorizontal.bind(this)}),o.default.createElement("div",{className:"thumb-horizontal",onMouseDown:this.onMouseDownHorizontal.bind(this),ref:e=>e&&(this.thumbH=e)})),o.default.createElement("div",{className:a.default["scroll-vertical"]},o.default.createElement("div",{className:a.default["track-vertical"],ref:e=>e&&(this.trackV=e),onMouseDown:this.onMouseDownVertical.bind(this)}),o.default.createElement("div",{className:"thumb-vertical",onMouseDown:this.onMouseDownVertical.bind(this),ref:e=>e&&(this.thumbV=e)})))}}t.Scroll=s},37387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(99524),t)},99524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PerfectScrollbar=void 0;const i=n(51964);n(96862),t.PerfectScrollbar=i},86915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616));i.__exportStar(n(85809),t);t.Select=e=>(e=Object.assign(Object.assign({},e),{className:(0,r.default)("kt_select",e.className)}),o.default.createElement("select",Object.assign({},e)))},69083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(12499),t),i.__exportStar(n(56074),t),i.__exportStar(n(42257),t)},42257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeContainerNode=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(25880),s=n(25880),c=n(90642),l=n(33905),d=n(7610),u=n(12499),p=i.__importDefault(n(92121)),h=n(56074),m=n(69083),g=(e,t,n)=>{if((0,c.isUndefined)(e))return"";if((0,c.isString)(e)){if(t){const i=t.length;if(i>0){const a=[];for(let s=0;s{if("number"==typeof e.badge){const t=e.badgeLimit||99;return o.default.createElement(a.Badge,{style:e.badgeStyle},e.badge>t?`${t}+`:e.badge)}if("string"==typeof e.badge){const t=e.badgeLimit||e.badge.length;return o.default.createElement("div",{className:p.default.treenode_status,style:e.badgeStyle},e.badge.slice(0,t))}};t.TreeContainerNode=({node:e,leftPadding:t,defaultLeftPadding:n,onSelect:i,onTwistieClick:_,onContextMenu:b,onDragStart:y,onDragEnter:v,onDragOver:C,onDragLeave:S,onDragEnd:w,onDrag:E,onDrop:k,onChange:x,draggable:T,foldable:D,isEdited:A,isComplex:I,actions:M=[],alwaysShowActions:R,commandActuator:P,replace:O="",itemLineHeight:N,validate:L})=>{n="number"==typeof n?n:10;const F={position:"absolute",width:"100%",height:N,backgroundColor:e.background||"inherit",left:"0",opacity:A&&!e.isTemporary?.3:1,top:(e.order||0)*N+"px"},B=Object.assign(Object.assign({paddingLeft:m.ExpandableTreeNode.is(e)?`${n+(e.depth||0)*(t||0)}px`:`${n+(e.depth||0)*(t||0)+(I?5:0)}px`},e.style),{color:e.color,height:e.title?2*N:N}),j=(e,t,n)=>t.map(((t,i)=>{if((0,u.isTreeViewActionComponent)(t))return o.default.createElement("span",{key:`${e.id}-${t.location}-${i}`},t.component);const a="string"==typeof t.icon?t.icon:t.icon.dark;return o.default.createElement(s.Icon,{key:`${e.id}-${"string"==typeof t.paramsKey?e[t.paramsKey]:e.id}-${t.command}`,iconClass:(0,r.default)(p.default.action_icon,a),tooltip:t.title,onClick:i=>{i.stopPropagation(),i.preventDefault();const r=t.paramsKey?"string"==typeof t.paramsKey?e[t.paramsKey]:t.paramsKey(e):e.id;n(t.command,r)}})})),z={height:N,lineHeight:`${N}px`,paddingLeft:m.ExpandableTreeNode.is(e)?0:D&&I?"15px":0},U={height:N,lineHeight:`${N}px`,paddingLeft:m.ExpandableTreeNode.is(e)?`${n+8+(t||0)}px`:0};return o.default.createElement("div",{key:e.id,style:F,title:e.tooltip,draggable:T,onDragStart:t=>{t.stopPropagation(),A?t.preventDefault():y(e,t)},onDragEnter:t=>{if(A)return t.stopPropagation(),void t.preventDefault();v(e,t)},onDragOver:t=>{if(A)return t.stopPropagation(),void t.preventDefault();C(e,t)},onDragLeave:t=>{if(A)return t.stopPropagation(),void t.preventDefault();S(e,t)},onDragEnd:t=>{if(A)return t.stopPropagation(),void t.preventDefault();w(e,t)},onDrag:t=>{if(A)return t.stopPropagation(),void t.preventDefault();E(e,t)},onDrop:t=>{if(A)return t.stopPropagation(),void t.preventDefault();k(e,t)},onContextMenu:t=>{t.stopPropagation(),t.preventDefault(),A||b(e,t)},onClick:t=>{t.stopPropagation(),t.preventDefault(),m.ExpandableTreeNode.is(e)&&!D||A||i(e,t)}},o.default.createElement("div",{className:(0,r.default)(p.default.treenode,{[p.default.alwaysShowActions]:R||e.alwaysShowActions,[p.default.mod_focused]:m.SelectableTreeNode.hasFocus(e),[p.default.mod_selected]:!m.SelectableTreeNode.hasFocus(e)&&!!m.SelectableTreeNode.isSelected(e)}),style:B},(e=>{if(e.title)return o.default.createElement("div",{className:p.default.treenode_title,style:U},e.title)})(e),o.default.createElement("div",{className:(0,r.default)(p.default.treenode_content,e.badge?p.default.treenode_has_badge:""),style:z},m.ExpandableTreeNode.is(e)&&D&&((e,t)=>e.isLoading?o.default.createElement(a.Loading,null):o.default.createElement("div",{onClick:t,className:(0,r.default)(p.default.treenode_segment,p.default.expansion_toggle,(0,d.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!e.expanded})}))(e,(t=>{t.stopPropagation(),t.preventDefault(),A||_(e,t)}))||(e=>{const t=[];if(!m.ExpandableTreeNode.is(e))for(const e of M)if(e.location===m.TreeViewActionTypes.TreeNode_Left)t.push(e);return o.default.createElement("div",{className:(0,r.default)(p.default.treenode_head)},e.headIconClass&&o.default.createElement("div",{className:(0,r.default)(p.default.treenode_head_icon,e.headIconClass)}),0!==t.length&&((e,t,n)=>{if(0!==t.length)return o.default.createElement("div",{className:p.default.left_actions},j(e,t,n))})(e,t,P))})(e),(e=>o.default.createElement("div",{className:(0,r.default)(e.icon,p.default.file_icon,{expanded:e.expanded}),style:Object.assign(Object.assign({},e.iconStyle),{height:N,lineHeight:`${N}px`})}))(e),o.default.createElement("div",{className:A?p.default.treenode_edit_wrap:(0,c.isString)(e.name)?p.default.treenode_overflow_wrap:p.default.treenode_flex_wrap},((e,t,n,i=(()=>{}))=>{const a=!(0,c.isString)(e.name),[d,u]=o.default.useState(a||e.name!==h.TEMP_FILE_NAME?a?"":e.name:""),m=e=>{const t=e.target.value;u(t)},f=t=>{b(d)?i(e,""):i(e,d)},_=t=>{const{key:n}=l.KeyCode.createKeyCode(t.nativeEvent);n&&l.Key.ENTER.keyCode===n.keyCode?(t.stopPropagation(),t.preventDefault(),b(d)?i(e,""):i(e,d)):n&&l.Key.ESCAPE.keyCode===n.keyCode&&(t.stopPropagation(),t.preventDefault(),i(e,""))},b=t=>{if(L)return L(e,t)};if(e.isTemporary){let t={start:0,end:0};return e.name!==h.TEMP_FILE_NAME&&(0,c.isString)(e.name)&&(t={start:0,end:e.name.replace(/\..+/,"").length}),o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_inputbox,b(d)&&p.default.overflow_visible)},o.default.createElement("div",{className:p.default.input_wrapper},o.default.createElement(s.ValidateInput,{type:"text",className:(0,r.default)(p.default.input_box),autoFocus:!0,popup:!0,onBlur:f,value:d,onChange:m,onKeyDown:_,validate:b,selection:t})))}if(a){const t=e.name;return o.default.createElement(t,null)}return o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_displayname,e.labelClass)},e.beforeLabel,g(e.name,e.highLightRanges&&e.highLightRanges.name,O),e.afterLabel)})(e,e.actions,0,x),((e,t)=>{if(!(0,c.isString)(e.description)&&!(0,c.isUndefined)(e.description)){const t=e.description;return o.default.createElement(t,null)}if(!(0,c.isUndefined)(e.description))return o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment_grow,p.default.treenode_description,e.descriptionClass)},g(e.description,e.highLightRanges&&e.highLightRanges.description,t))})(e,O)),((e,t,n)=>{const i=[],a=[];for(const e of t)switch(e.location){case m.TreeViewActionTypes.TreeNode_Right:i.push(e);break;case m.TreeViewActionTypes.TreeContainer:a.push(e)}return m.ExpandableTreeNode.is(e)?a.length>0?o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_tail)},((e,t,n)=>o.default.createElement("div",{className:p.default.container_actions},j(e,t,n)))(e,a,n),f(e)):o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_tail)},f(e)):0!==i.length?o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_tail)},((e,t,n)=>{if(0!==t.length)return o.default.createElement("div",{className:p.default.right_actions},j(e,t,n))})(e,i,n),f(e)):o.default.createElement("div",{className:(0,r.default)(p.default.treenode_segment,p.default.treenode_tail)},f(e))})(e,e.actions||M,P))))}},56074:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeContainer=t.defaultTreeProps=t.TEMP_FILE_NAME=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(90642),s=n(12499),c=n(42257),l=i.__importDefault(n(92121)),d=n(69083);t.TEMP_FILE_NAME="kt_template_file",t.defaultTreeProps={nodes:[],leftPadding:8,defaultLeftPadding:8};t.TreeContainer=({nodes:e=t.defaultTreeProps.nodes,leftPadding:n=t.defaultTreeProps.leftPadding,defaultLeftPadding:i=t.defaultTreeProps.defaultLeftPadding,multiSelectable:u,onSelect:p,onTwistieClick:h,onContextMenu:m,onDragStart:g,onDragEnter:f,onDragOver:_,onDragLeave:b,onDragEnd:y,onDrag:v,onDrop:C,onChange:S,onBlur:w,onFocus:E,onReveal:k,draggable:x,foldable:T=!0,editable:D,replace:A,actions:I,alwaysShowActions:M,commandActuator:R,themeProvider:P,fileDecorationProvider:O,notifyFileDecorationsChange:N,notifyThemeChange:L,itemLineHeight:F=22,style:B,outline:j,validate:z,isComplex:U})=>{const[W,V]=o.default.useState(!1),[H,K]=o.default.useState(!1),[,$]=o.default.useState(),G=D&&!!e.find(((e,t)=>!!e.isTemporary)),q=(t,n)=>{n.stopPropagation(),n.preventDefault();const i=[];let r=[t],o=!1;if(e){if(G)return n.stopPropagation(),void n.preventDefault();for(const n of e)n.selected&&(t.id===n.id&&(o=!0),i.push(n));o&&(r=i),V(!1),m&&m(r,n)}},Z=e=>[e],Y=(t,n)=>{let i;if(t&&!G){if(u&&!G){const r=Q(n),o=J(n);d.SelectableTreeNode.is(t)&&(i=r?((e=[],t)=>{const n=[];let i,r;for(let n=0;nr)for(let t=r;t<=i;t++)n.push(e[t]);else for(let t=i;t<=r;t++)n.push(e[t]);return n})(e,t):o?((e=[],t)=>{const n=[];for(const i of e)t.id===i.id?i.selected||n.push(i):i.selected&&n.push(i);return n})(e,t):Z(t))}else i=Z(t);p&&p(i,n),V(!1)}},X=(e,t)=>{h?h(e,t):p&&p([e],t)},Q=e=>!J(e)&&e.shiftKey,J=e=>{const{metaKey:t,ctrlKey:n}=e;return a.isOSX&&t||n},ee=e=>{if(e.tooltip)return e.tooltip;if(e.uri){const t=e.uri.toString();return t||void 0}return"string"==typeof e.name?e.name:void 0};return o.default.useEffect((()=>{if(N){const e=N((()=>{$({})}));return()=>e.dispose()}}),[N]),o.default.useEffect((()=>{if(L){const e=L((()=>{$({})}));return()=>e.dispose()}}),[L]),o.default.createElement("div",{className:(0,r.default)(l.default.treenode_container,W&&l.default.treenode_container_focused,H&&l.default.treenode_all_focused),style:B,onBlur:e=>{w&&w(e),V(!1),K(!1)},onFocus:e=>{E&&E(e)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),G||(V(!0),m&&m([],e))},onDrop:e=>{C&&C("",e),K(!1)},onDragStart:e=>{e.preventDefault(),e.stopPropagation()},onDragOver:e=>{e.preventDefault(),K(!0)},onDragLeave:e=>{K(!1)},draggable:x,onClick:e=>{V(!0),p&&p([],e)},tabIndex:j?0:-1},e.map(((e,t)=>{if(O&&P){const t=O.getDecoration(e.uri||"string"==typeof e.name&&e.name||e.id,s.ExpandableTreeNode.is(e));t&&(e=Object.assign(Object.assign({},e),{badge:t.badge,color:P.getColor({id:t.color}),tooltip:`${ee(e)}鈥�${t.tooltip}`}))}return o.default.createElement(c.TreeContainerNode,{node:e,leftPadding:n,defaultLeftPadding:i,key:`${e.id}-${t}`,onSelect:Y,onTwistieClick:X,onContextMenu:q,onDragStart:g,onDragEnter:f,onDragEnd:y,onDragOver:_,onDragLeave:b,onDrag:v,onDrop:C,onChange:S,draggable:x,foldable:T,isEdited:G,isComplex:U,actions:e.actions||I,replace:e.replace||A,alwaysShowActions:M,commandActuator:R,itemLineHeight:F,validate:z})})))}},99174:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const i=n(90642);t.IContextKeyService=Symbol("IContextKeyService");class r extends i.BasicEvent{}t.ContextKeyChangeEvent=r},67992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogViewVisibleContext=void 0;const i=n(48794);t.DialogViewVisibleContext=new i.RawContextKey("dialogViewVisible",!1)},78138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const i=n(48794);t.ExplorerResourceIsFolderContext=new i.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new i.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new i.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new i.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new i.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new i.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new i.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new i.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new i.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new i.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new i.RawContextKey("explorerViewletCompressedLastFocus",!1)},44749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(78138),t),i.__exportStar(n(26044),t),i.__exportStar(n(46060),t),i.__exportStar(n(44173),t),i.__exportStar(n(93484),t),i.__exportStar(n(67992),t)},44173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const i=n(48794);t.OutlineSortTypeContext=new i.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new i.RawContextKey("outlineFollowCursor",!1)},26044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const i=n(90642),r=n(30192);t.ResourceContextKey=class{constructor(e,t=r.getLanguageIdFromMonaco,n="resource"){if(this.contextKeyService=e,this.languageResolver=t,!n)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(n+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(n+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(n+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(n+"LangId",""),this.resourceKey=this.contextKeyService.createKey(n,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+n.substr(0,1).toUpperCase()+n.substr(1),!1)}set(e){if(!e)return void this.reset();const t=this.resourceKey.get();e.isEqual(new i.URI(t))||(this.resourceScheme.set(e.scheme),this.resourceFilename.set(e.path.name+e.path.ext),this.resourceExtname.set(e.path.ext),this.resourceLangId.set(this.languageResolver(e)),this.resourceKey.set(e.toString()),this.isFileSystemResource.set(e.scheme===i.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}},46060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const i=n(48794);t.IsTerminalViewInitialized=new i.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new i.RawContextKey("isTerminalFocused",!1)},93484:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFolderCount=t.WorkbenchState=void 0;const i=n(48794);t.WorkbenchState=new i.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new i.RawContextKey("workspaceFolderCount",0)},87433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectCorePreferences=t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0;const i=n(90642),r=n(83538),o=!0,a=!0;t.FILES_DEFAULTS={filesWatcherExclude:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/**/*":!0},filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{"general.language":{type:"string",enum:(0,i.getAvailableLanguages)().map((e=>e.languageId)),default:"zh-CN"},"general.theme":{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},"general.icon":{type:"string",default:"vs-minimal",enum:[]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)("preference.workbench.list.openMode")},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:o,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:a,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,i.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",description:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(i.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:["\n","\r\n","auto"],default:"auto"},"files.trimFinalNewlines":{type:"boolean",default:!1},"files.trimTrailingWhitespace":{type:"boolean",default:!1},"files.insertFinalNewline":{type:"boolean",default:!1},"files.autoGuessEncoding":{type:"boolean",default:!1,description:"%preference.files.autoGuessEncoding%",included:Object.keys(i.SUPPORTED_ENCODINGS).length>1},"settings.userBeforeWorkspace":{type:"boolean",default:!1,description:"%settings.configuration.userBeforeWorkspace%"},"output.maxChannelLine":{type:"number",default:5e4,description:"%output.maxChannelLineDesc%"},"output.enableLogHighlight":{type:"boolean",default:!0,description:"%output.enableLogHighlightDesc%"},"output.enableSmartScroll":{type:"boolean",default:!0,description:"%output.enableSmartScrollDesc%"},"debug.inline.values":{type:"boolean",default:!1},"debug.console.wordWrap":{type:"boolean",default:!0},"toolbar.ignoreActions":{type:"object",patternProperties:{".*":{type:"array",items:[{type:"string"}]}},description:"%preference.toolbar.ignoreActions%"},"toolbar.buttonDisplay":{type:"string",enum:["icon","iconAndText"],default:"iconAndText",description:"%preference.toolbar.buttonDisplay%"},"toolbar.buttonTitleStyle":{type:"string",enum:["vertical","horizontal"],default:"horizontal"},"view.saveLayoutWithWorkspace":{type:"boolean",default:!1}}},t.CorePreferences=Symbol("CorePreferences"),t.injectCorePreferences=function(e){e.addProviders({token:t.CorePreferences,useFactory:e=>{const n=e.get(r.PreferenceService);return(0,r.createPreferenceProxy)(n,t.corePreferenceSchema)}})}},3992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackFocus=t.FocusTracker=t.DomListener=t.isAncestor=t.EventType=void 0;const i=n(90642),r=n(90642);function o(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:r.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:r.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:r.isWebKit?"webkitAnimationIteration":"animationiteration"},t.isAncestor=o;class a{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._useCapture=i||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)}}t.DomListener=a;class s extends i.Disposable{constructor(e){super(),this.didFocus=new i.Emitter,this.onDidFocus=this.didFocus.event,this.didBlur=new i.Emitter,this.onDidBlur=this.didBlur.event;let n=o(document.activeElement,e),r=!1;this.addDispose(this.didBlur),this.addDispose(this.didFocus),this.addDispose(new a(e,t.EventType.FOCUS,(()=>{r=!1,n||(n=!0,this.didFocus.fire())}),!0)),this.addDispose(new a(e,t.EventType.BLUR,(()=>{n&&(r=!0,window.setTimeout((()=>{r&&(r=!1,n=!1,this.didBlur.fire())}),0))}),!0))}}t.FocusTracker=s,t.trackFocus=function(e){return new s(e)}},22406:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncodingRegistry=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(83538),s=n(30192);let c=class{constructor(){this.encodingOverrides=[]}registerOverride(e){return this.encodingOverrides.push(e),o.Disposable.create((()=>{const t=this.encodingOverrides.indexOf(e);-1!==t&&this.encodingOverrides.splice(t,1)}))}getEncodingForResource(e,t){let n;const i=this.getEncodingOverride(e);return n=i||(t||(this.preferenceService.get("files.encoding",void 0,e.toString(),(0,s.getLanguageIdFromMonaco)(e)||void 0)||"")),n&&(0,o.encodingExists)(n)?n:o.UTF8}getEncodingOverride(e){if(this.encodingOverrides&&this.encodingOverrides.length)for(const t of this.encodingOverrides){if(t.parent&&e.isEqualOrParent(t.parent))return t.encoding;if(t.extension&&e.path.ext===`.${t.extension}`)return t.encoding;if(t.scheme&&t.scheme===e.scheme)return t.encoding}}};i.__decorate([(0,r.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.EncodingRegistry=c},4943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsPointServiceImpl=t.IExtensionsPointService=t.OPENSUMI_EXTENSION_JSON_URI=t.EXTENSION_JSON_URI=void 0;const i=n(70655),r=i.__importDefault(n(28583)),o=i.__importDefault(n(27361)),a=i.__importDefault(n(18721)),s=i.__importDefault(n(36968)),c=n(39993),l=n(88437),d=n(85460),u=n(40374);t.EXTENSION_JSON_URI="vscode://schemas/vscode-extensions",t.OPENSUMI_EXTENSION_JSON_URI="vscode://schemas/opensumi-extensions",t.IExtensionsPointService=Symbol("IExtensionsPointService");let p=class{registerSchema(){this.schemaRegistry.registerSchema(t.OPENSUMI_EXTENSION_JSON_URI,d.OpensumiExtensionPackageSchema,["package.json"]),this.schemaRegistry.registerSchema(t.EXTENSION_JSON_URI,u.VSCodeExtensionPackageSchema,["package.json"])}appendPropertiesFactory(e){const t="opensumi"===e?d.OpensumiExtensionPackageSchema.properties.kaitianContributes.properties:u.VSCodeExtensionPackageSchema.properties.contributes.properties;return(e,n)=>{const{extensionPoint:i,jsonSchema:c}=n,l=e.concat(i).filter(Boolean);if((0,a.default)(t,l)){const e=(0,o.default)(t,l.concat("properties"));(0,r.default)(c.properties,e)}(0,s.default)(t,l,c)}}appendOpensumiProperties(e,t){this.appendPropertiesFactory("opensumi")(e,t)}appendVScodeProperties(e,t){this.appendPropertiesFactory("vscode")(e,t)}appendExtensionPoint(e,t){if(!t)return;const{frameworkKind:n=["vscode"]}=t;n.includes("opensumi")&&this.appendOpensumiProperties(e,t),n.includes("vscode")&&this.appendVScodeProperties(e,t),this.registerSchema()}registerExtensionPoint(e){e&&this.appendExtensionPoint([],e)}};i.__decorate([(0,c.Autowired)(l.IJSONSchemaRegistry),i.__metadata("design:type",Object)],p.prototype,"schemaRegistry",void 0),p=i.__decorate([(0,c.Injectable)()],p),t.ExtensionsPointServiceImpl=p},1594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(4943),t),i.__exportStar(n(40374),t),i.__exportStar(n(85460),t)},52148:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserViews=void 0;const i=n(90642);!function(e){e.properties={type:"object",required:["type","view"],defaultSnippets:[{label:"type",bodyText:JSON.stringify({type:"${1:add}",view:[{id:"${2}"}]},null,"\t")}],properties:{type:{type:"string",enum:["add","replace"]},view:{type:"array",items:{type:"object",required:["id"],defaultSnippets:[{label:'{"id":""}',description:"",bodyText:JSON.stringify({id:"${3}"},null,"\t")}],properties:{id:{type:"string",description:(0,i.localize)("sumiContributes.browserViews.view.id")},icon:{type:"string",markdownDescription:(0,i.localize)("sumiContributes.browserViews.view.icon")},iconPath:{type:"string",description:(0,i.localize)("sumiContributes.browserViews.view.iconPath")},title:{type:"string",description:(0,i.localize)("sumiContributes.browserViews.view.title")},titleComponentId:{type:"string",description:(0,i.localize)("sumiContributes.browserViews.view.titleComponentId")},expanded:{type:"boolean",description:(0,i.localize)("sumiContributes.browserViews.view.expanded")}}}}}},e.schema={description:(0,i.localize)("sumiContributes.browserViews"),type:"object",properties:{left:Object.assign(Object.assign({},e.properties),{description:(0,i.localize)("sumiContributes.browserViews.left")}),right:Object.assign(Object.assign({},e.properties),{description:(0,i.localize)("sumiContributes.browserViews.right")}),bottom:Object.assign(Object.assign({},e.properties),{description:(0,i.localize)("sumiContributes.browserViews.bottom")})}}}(t.browserViews||(t.browserViews={}))},75059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.menus=void 0;const i=n(90642),r=n(57061),o={type:"object",required:["command"],defaultSnippets:[{body:{command:"${1}"}}],properties:{command:{description:(0,i.localize)("sumiContributes.common.command"),type:"string"},when:{description:(0,i.localize)("sumiContributes.common.when"),type:"string"},group:{description:(0,i.localize)("sumiContributes.common.group"),type:"string"}}},a={type:"object",required:["id","title"],properties:{id:{description:(0,i.localize)("sumiContributes.submenus.id"),type:"string"},title:{description:(0,i.localize)("sumiContributes.submenus.title"),type:"string"},group:{description:(0,i.localize)("sumiContributes.common.group"),type:"string"},when:{type:"string",description:(0,i.localize)("sumiContributes.common.when")},icon:{description:(0,i.localize)("sumiContributes.submenus.icon"),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,i.localize)("sumiContributes.submenus.icon.light"),type:"string"},dark:{description:(0,i.localize)("sumiContributes.submenus.dark"),type:"string"}}}]}}},s=[{id:r.MenuId.CommandPalette,description:(0,i.localize)("sumiContributes.menu.api.CommandPalette")},{id:r.MenuId.ActivityBarExtra,description:(0,i.localize)("sumiContributes.menu.api.ActivityBarExtra")},{id:r.MenuId.DebugBreakpointsContext,description:(0,i.localize)("sumiContributes.menu.api.DebugBreakpointsContext")},{id:r.MenuId.DebugCallStackContext,description:(0,i.localize)("sumiContributes.menu.api.DebugCallStackContext")},{id:r.MenuId.DebugConsoleContext,description:(0,i.localize)("sumiContributes.menu.api.DebugConsoleContext")},{id:r.MenuId.DebugVariablesContext,description:(0,i.localize)("sumiContributes.menu.api.DebugVariablesContext")},{id:r.MenuId.DebugWatchContext,description:(0,i.localize)("sumiContributes.menu.api.DebugWatchContext")},{id:r.MenuId.DebugToolBar,description:(0,i.localize)("sumiContributes.menu.api.DebugToolBar")},{id:r.MenuId.EditorContext,description:(0,i.localize)("sumiContributes.menu.api.EditorContext")},{id:r.MenuId.EditorTitle,description:(0,i.localize)("sumiContributes.menu.api.EditorTitle")},{id:r.MenuId.EditorTitleContext,description:(0,i.localize)("sumiContributes.menu.api.EditorTitleContext")},{id:r.MenuId.ExplorerContext,description:(0,i.localize)("sumiContributes.menu.api.ExplorerContext")},{id:r.MenuId.MenubarAppMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarAppMenu")},{id:r.MenuId.MenubarEditMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarEditMenu")},{id:r.MenuId.MenubarFileMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarFileMenu")},{id:r.MenuId.MenubarGoMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarGoMenu")},{id:r.MenuId.MenubarHelpMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarHelpMenu")},{id:r.MenuId.MenubarViewMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarViewMenu")},{id:r.MenuId.MenubarSelectionMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarSelectionMenu")},{id:r.MenuId.MenubarTerminalMenu,description:(0,i.localize)("sumiContributes.menu.api.MenubarTerminalMenu")},{id:r.MenuId.TerminalInstanceContext,description:(0,i.localize)("sumiContributes.menu.api.TerminalInstanceContext")},{id:r.MenuId.TerminalNewDropdownContext,description:(0,i.localize)("sumiContributes.menu.api.TerminalNewDropdownContext")},{id:r.MenuId.TerminalTabContext,description:(0,i.localize)("sumiContributes.menu.api.TerminalTabContext")},{id:r.MenuId.OpenEditorsContext,description:(0,i.localize)("sumiContributes.menu.api.OpenEditorsContext")},{id:r.MenuId.SCMResourceContext,description:(0,i.localize)("sumiContributes.menu.api.SCMResourceContext")},{id:r.MenuId.SCMResourceGroupContext,description:(0,i.localize)("sumiContributes.menu.api.SCMResourceGroupContext")},{id:r.MenuId.SCMResourceFolderContext,description:(0,i.localize)("sumiContributes.menu.api.SCMResourceFolderContext")},{id:r.MenuId.SCMTitle,description:(0,i.localize)("sumiContributes.menu.api.SCMTitle")},{id:r.MenuId.SCMInput,description:(0,i.localize)("sumiContributes.menu.api.SCMInput")},{id:r.MenuId.SearchContext,description:(0,i.localize)("sumiContributes.menu.api.SearchContext")},{id:r.MenuId.StatusBarContext,description:(0,i.localize)("sumiContributes.menu.api.StatusBarContext")},{id:r.MenuId.ViewItemContext,description:(0,i.localize)("sumiContributes.menu.api.ViewItemContext")},{id:r.MenuId.ViewTitle,description:(0,i.localize)("sumiContributes.menu.api.ViewTitle")},{id:r.MenuId.SettingsIconMenu,description:(0,i.localize)("sumiContributes.menu.api.SettingsIconMenu")}];!function(e){var t,n,r;e.schema={description:(0,i.localize)("sumiContributes.menu"),type:"object",properties:(t=s,n=e=>e.id,r=e=>({type:"array",description:e.description,items:o}),t.reduce(((e,t)=>(e[n(t)]=r?r(t):t,e)),Object.create(null)))},e.subMenusSchema={description:(0,i.localize)("sumiContributes.submenus"),type:"object",additionalProperties:a}}(t.menus||(t.menus={}))},85460:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpensumiExtensionPackageSchema=void 0;const i=n(90642);t.OpensumiExtensionPackageSchema={properties:{kaitianContributes:{description:(0,i.localize)("sumiContributes.opensumiContributes"),type:"object",properties:{},default:{}}}}},5536:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toolbar=void 0;const i=n(90642),r=(e,t)=>`${JSON.stringify(e)}: ${t}`,o={type:"object",properties:{title:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.iconMaskMode")},width:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.width")},height:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.height")},showTitle:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.showTitle")},iconForeground:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.iconForeground")},iconBackground:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.iconBackground")},titleForeground:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.titleForeground")},titleBackground:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.titleBackground")},titleSize:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.titleSize")},iconSize:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.iconSize")},background:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.background")},btnStyle:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.btnStyle"),enum:["inline","button"]},btnTitleStyle:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle"),enum:["vertical","horizontal"],enumDescriptions:[(0,i.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical"),(0,i.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal")]}}},a={type:"object",properties:{backgroundColor:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states.backgroundColor")},labelForegroundColor:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states.labelForegroundColor")},iconForegroundColor:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states.iconForegroundColor")},width:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states.width")},minWidth:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states.minWidth")}}};!function(e){e.schema={type:"object",description:(0,i.localize)("sumiContributes.toolbar"),properties:{actions:{type:"array",markdownDescription:(0,i.localize)("sumiContributes.toolbar.actions"),items:{type:"object",required:["id","description"],defaultSnippets:[{label:r({type:"button"},(0,i.localize)("sumiContributes.toolbar.actions.type.button")),body:{id:"${2}",type:"button",description:"${3}",title:"${4}",iconPath:"${5}"}},{label:r({type:"select"},(0,i.localize)("sumiContributes.toolbar.actions.type.select")),body:{id:"${2}",type:"select",description:"${3}",options:["${4}"],defaultValue:"${5}"}}],properties:{id:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.id")},weight:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.weight")},preferredPosition:{type:"object",description:(0,i.localize)("sumiContributes.toolbar.actions.preferredPosition"),properties:{location:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},strictPosition:{type:"object",description:(0,i.localize)("sumiContributes.toolbar.actions.strictPosition"),required:["location","group"],defaultSnippets:[{body:{location:"${1}",group:"${2}"}}],properties:{location:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},description:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.description")},command:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.command")},defaultState:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.defaultState")}},oneOf:[{required:["type","title","iconPath"],properties:{type:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.type"),enum:["button"],enumDescriptions:[(0,i.localize)("sumiContributes.toolbar.actions.type.button")],default:"button"},title:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.iconMaskMode")},states:{type:"object",description:(0,i.localize)("sumiContributes.toolbar.actions.button.states"),additionalProperties:o,properties:{default:o}},popoverComponent:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverComponent")},popoverStyle:{type:"object",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle"),properties:{position:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.position"),enum:["top","bottom"],enumDescriptions:[(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.position.top"),(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.position.bottom")]},horizontalOffset:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.horizontalOffset")},hideOnClickOutside:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside")},noContainerStyle:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.noContainerStyle")},minWidth:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.minWidth")},minHeight:{type:"number",description:(0,i.localize)("sumiContributes.toolbar.actions.popoverStyle.minHeight")}}},when:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.when")}}},{required:["type","options","defaultValue"],properties:{type:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.type"),enum:["select"],enumDescriptions:[(0,i.localize)("sumiContributes.toolbar.actions.type.select")],default:"select"},options:{type:"array",description:(0,i.localize)("sumiContributes.toolbar.actions.select.options"),required:["value"],items:{type:"object",defaultSnippets:[{label:r({value:""},(0,i.localize)("sumiContributes.toolbar.actions.select.options.value")),body:{value:"${1}"}}],properties:{iconPath:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.options.iconPath")},iconMaskMode:{type:"boolean",description:(0,i.localize)("sumiContributes.toolbar.actions.select.options.iconMaskMode")},label:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.options.label")},value:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.options.value")}}}},defaultValue:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.defaultValue")},optionEqualityKey:{type:"string",description:(0,i.localize)("sumiContributes.toolbar.actions.select.optionEqualityKey")},states:{type:"object",description:(0,i.localize)("sumiContributes.toolbar.actions.select.states"),additionalProperties:a}}}]}}}}}(t.toolbar||(t.toolbar={}))},40374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeExtensionPackageSchema=t.EXTENSION_IDENTIFIER_PATTERN=void 0;const i=n(90642);t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.VSCodeExtensionPackageSchema={properties:{engines:{type:"object",description:(0,i.localize)("vscode.extension.engines","Engine compatibility."),properties:{vscode:{type:"string",description:(0,i.localize)("vscode.extension.engines.vscode","For VS Code extensions, specifies the VS Code version that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum VS Code version of 0.10.5."),default:"^1.22.0"}}},publisher:{description:(0,i.localize)("vscode.extension.publisher","The publisher of the VS Code extension."),type:"string"},displayName:{description:(0,i.localize)("vscode.extension.displayName","The display name for the extension used in the VS Code gallery."),type:"string"},categories:{description:(0,i.localize)("vscode.extension.categories","The categories used by the VS Code gallery to categorize the extension."),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:["Programming Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs","SCM Providers","Azure","Language Packs"]},{type:"string",const:"Languages",deprecationMessage:(0,i.localize)("vscode.extension.category.languages.deprecated","Use 'Programming Languages' instead")}]}},galleryBanner:{type:"object",description:(0,i.localize)("vscode.extension.galleryBanner","Banner used in the VS Code marketplace."),properties:{color:{description:(0,i.localize)("vscode.extension.galleryBanner.color","The banner color on the VS Code marketplace page header."),type:"string"},theme:{description:(0,i.localize)("vscode.extension.galleryBanner.theme","The color theme for the font used in the banner."),type:"string",enum:["dark","light"]}}},contributes:{description:(0,i.localize)("vscode.extension.contributes","All contributions of the VS Code extension represented by this package."),type:"object",properties:{},default:{}},preview:{type:"boolean",description:(0,i.localize)("vscode.extension.preview","Sets the extension to be flagged as a Preview in the Marketplace.")},activationEvents:{description:(0,i.localize)("vscode.extension.activationEvents","Activation events for the VS Code extension."),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",description:(0,i.localize)("vscode.extension.activationEvents.onLanguage","An activation event emitted whenever a file that resolves to the specified language gets opened."),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:(0,i.localize)("vscode.extension.activationEvents.onCommand","An activation event emitted whenever the specified command gets invoked."),body:"onCommand:${2:commandId}"},{label:"onDebug",description:(0,i.localize)("vscode.extension.activationEvents.onDebug","An activation event emitted whenever a user is about to start debugging or about to setup debug configurations."),body:"onDebug"},{label:"onDebugInitialConfigurations",description:(0,i.localize)("vscode.extension.activationEvents.onDebugInitialConfigurations",'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'),body:"onDebugInitialConfigurations"},{label:"onDebugResolve",description:(0,i.localize)("vscode.extension.activationEvents.onDebugResolve","An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called)."),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:(0,i.localize)("vscode.extension.activationEvents.onDebugAdapterProtocolTracker","An activation event emitted whenever a debug session with the specific type is about to be launched and a debug protocol tracker might be needed."),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:(0,i.localize)("vscode.extension.activationEvents.workspaceContains","An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern."),body:"workspaceContains:${4:filePattern}"},{label:"onFileSystem",description:(0,i.localize)("vscode.extension.activationEvents.onFileSystem","An activation event emitted whenever a file or folder is accessed with the given scheme."),body:"onFileSystem:${1:scheme}"},{label:"onSearch",description:(0,i.localize)("vscode.extension.activationEvents.onSearch","An activation event emitted whenever a search is started in the folder with the given scheme."),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:(0,i.localize)("vscode.extension.activationEvents.onView","An activation event emitted whenever the specified view is expanded.")},{label:"onUri",body:"onUri",description:(0,i.localize)("vscode.extension.activationEvents.onUri","An activation event emitted whenever a system-wide Uri directed towards this extension is open.")},{label:"*",description:(0,i.localize)("vscode.extension.activationEvents.star","An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case."),body:"*"}]}},badges:{type:"array",description:(0,i.localize)("vscode.extension.badges","Array of badges to display in the sidebar of the Marketplace's extension page."),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:(0,i.localize)("vscode.extension.badges.url","Badge image URL.")},href:{type:"string",description:(0,i.localize)("vscode.extension.badges.href","Badge link.")},description:{type:"string",description:(0,i.localize)("vscode.extension.badges.description","Badge description.")}}}},markdown:{type:"string",description:(0,i.localize)("vscode.extension.markdown","Controls the Markdown rendering engine used in the Marketplace. Either github (default) or standard."),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:(0,i.localize)("vscode.extension.qna","Controls the Q&A link in the Marketplace. Set to marketplace to enable the default Marketplace Q & A site. Set to a string to provide the URL of a custom Q & A site. Set to false to disable Q & A altogether."),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:(0,i.localize)("vscode.extension.extensionDependencies","Dependencies to other extensions. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:(0,i.localize)("vscode.extension.contributes.extensionPack","A set of extensions that can be installed together. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:(0,i.localize)("extensionKind","Define the kind of an extension. `ui` extensions are installed and run on the local machine while `workspace` extensions are run on the remote."),type:"string",enum:["ui","workspace"],enumDescriptions:[(0,i.localize)("ui","UI extension kind. In a remote window, such extensions are enabled only when available on the local machine."),(0,i.localize)("workspace","Workspace extension kind. In a remote window, such extensions are enabled only when available on the remote.")],default:"workspace"},scripts:{type:"object",properties:{"vscode:prepublish":{description:(0,i.localize)("vscode.extension.scripts.prepublish","Script executed before the package is published as a VS Code extension."),type:"string"},"vscode:uninstall":{description:(0,i.localize)("vscode.extension.scripts.uninstall","Uninstall hook for VS Code extension. Script that gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled. Only Node scripts are supported."),type:"string"}}},icon:{type:"string",description:(0,i.localize)("vscode.extension.icon","The path to a 128x128 pixel icon.")}}}},33335:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FsProviderContribution=t.FilesChangeEvent=void 0;const i=n(90642);class r extends i.BasicEvent{}t.FilesChangeEvent=r,t.FsProviderContribution=Symbol("FsProviderContribution")},92513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashCalculateContribution=void 0;const i=n(70655),r=n(39993),o=n(18570),a=n(55229),s=n(54846);let c=class{async initialize(){try{await this.hashCalculateService.initialize()}catch(e){throw new Error(`hashCalculateService init fail: \n ${e.message}`)}}};i.__decorate([(0,r.Autowired)(a.IHashCalculateService),i.__metadata("design:type",Object)],c.prototype,"hashCalculateService",void 0),c=i.__decorate([(0,o.Domain)(s.ClientAppContribution)],c),t.HashCalculateContribution=c},894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(90642),t),i.__exportStar(n(12059),t),i.__exportStar(n(66899),t),i.__exportStar(n(41815),t),i.__exportStar(n(27819),t),i.__exportStar(n(83538),t),i.__exportStar(n(82562),t),i.__exportStar(n(33905),t),i.__exportStar(n(25398),t),i.__exportStar(n(26149),t),i.__exportStar(n(33335),t),i.__exportStar(n(12499),t),i.__exportStar(n(49110),t),i.__exportStar(n(17282),t),i.__exportStar(n(45060),t),i.__exportStar(n(30930),t),i.__exportStar(n(99174),t),i.__exportStar(n(85981),t),i.__exportStar(n(88437),t),i.__exportStar(n(43780),t),i.__exportStar(n(56336),t),i.__exportStar(n(3992),t),i.__exportStar(n(87433),t),i.__exportStar(n(7610),t),i.__exportStar(n(68037),t),i.__exportStar(n(31855),t),i.__exportStar(n(11792),t),i.__exportStar(n(22406),t),i.__exportStar(n(82277),t),i.__exportStar(n(1594),t)},82562:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(73706),t)},73706:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.NO_KEYBINDING_NAME=t.KeybindingRegistryImpl=t.KeybindingService=t.keybindingServicePath=t.KeybindingRegistry=t.KeybindingContribution=t.KeybindingsResultCollection=t.Keybinding=t.KeybindingWeight=t.KeybindingScope=void 0;const r=n(70655),o=n(39993),a=n(90642),s=n(99174),c=n(21803),l=n(21214),d=n(11792);var u,p,h,m;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.USER=1]="USER",e[e.WORKSPACE=2]="WORKSPACE",e[e.END=3]="END"}(t.KeybindingScope||(t.KeybindingScope={})),function(e){e[e.Default=0]="Default",e[e.EditorCore=1]="EditorCore",e[e.EditorContrib=100]="EditorContrib",e[e.WorkbenchContrib=200]="WorkbenchContrib",e[e.BuiltinExtension=300]="BuiltinExtension",e[e.ExternalExtension=400]="ExternalExtension"}(p=t.KeybindingWeight||(t.KeybindingWeight={})),function(e){e.length=e.END-e.DEFAULT}(u=t.KeybindingScope||(t.KeybindingScope={})),function(e){e.stringify=function(e){const t={command:e.command,keybinding:e.keybinding};return JSON.stringify(t)},e.is=function(e){return!!e&&e===Object(e)&&"command"in e&&"keybinding"in e}}(h=t.Keybinding||(t.Keybinding={})),function(e){class t{constructor(){this.full=[],this.partial=[],this.shadow=[]}merge(e){return this.full.push(...e.full),this.partial.push(...e.partial),this.shadow.push(...e.shadow),this}filter(e){const n=new t;return n.full=this.full.filter(e),n.partial=this.partial.filter(e),n.shadow=this.shadow.filter(e),n}}e.KeybindingsResult=t}(m=t.KeybindingsResultCollection||(t.KeybindingsResultCollection={})),t.KeybindingContribution=Symbol("KeybindingContribution"),t.KeybindingRegistry=Symbol("KeybindingRegistry"),t.keybindingServicePath="/services/keybindings",t.KeybindingService=Symbol("KeybindingService");let g=i=class{constructor(){this.keymaps=[...Array(u.length)].map((()=>[])),this.keySequence=[],this.convertKeySequence=[],this.modifierKeySequence=[],this.keybindingsChanged=new a.Emitter}async initialize(){await this.keyboardLayoutService.initialize(),this.keyboardLayoutService.onKeyboardLayoutChanged((()=>{this.clearResolvedKeybindings()}));for(const e of this.keybindingContributionProvider.getContributions())e.registerKeybindings(this)}get onKeybindingsChanged(){return this.keybindingsChanged.event}registerKeybinding(e,t=u.DEFAULT){return this.doRegisterKeybinding(e,t)}registerKeybindings(e,t=u.DEFAULT){return this.doRegisterKeybindings(e,t)}convertMonacoWhen(e){return e?"string"==typeof e?e:e.serialize():""}unregisterKeybinding(e,t=u.DEFAULT){const n=h.is(e)?e.keybinding:e,i=this.keymaps[t];let r;r=h.is(e)&&e.when?i.filter((t=>this.isKeybindingEqual(t.keybinding,e.keybinding)&&this.isKeybindingWhenEqual(t.when,e.when))):i.filter((e=>this.isKeybindingEqual(e.keybinding,n))),r.forEach((e=>{const t=i.indexOf(e);t>=0&&i.splice(t,1)}))}isKeybindingWhenEqual(e,t){return this.convertMonacoWhen(e)===this.convertMonacoWhen(t)}isKeybindingEqual(e,t){return this.acceleratorForSequenceKeyString(e)===this.acceleratorForSequenceKeyString(t)}acceleratorForSequenceKeyString(e){const t=e.split(" ").map((e=>l.KeyCode.parse(e)));return this.acceleratorForSequence(t,"+").join(" ")}doRegisterKeybindings(e,t=u.DEFAULT){const n=new a.Disposable;for(const i of e)n.addDispose(this.doRegisterKeybinding(i,t));return n}doRegisterKeybinding(e,t=u.DEFAULT){try{this.resolveKeybinding(e,!0),this.keymaps[t].unshift(e)}catch(t){this.logger.warn(`Could not register keybinding:\n ${h.stringify(e)}\n${t}`)}return this.keybindingsChanged.fire({affectsCommands:[e.command]}),{dispose:()=>{this.unregisterKeybinding(e,t)}}}resolveKeybinding(e,t){if(!e.resolved||t){const t=l.KeySequence.parse(e.keybinding);e.resolved=t.map((e=>this.keyboardLayoutService.resolveKeyCode(e)))}return e.resolved}clearResolvedKeybindings(){for(let e=u.DEFAULT;ee.when===t.when));return i.full.length>0?(this.logger.warn("Collided keybinding is ignored; ",h.stringify(t)," collided with ",i.full.map((e=>h.stringify(e))).join(", ")),!0):i.partial.length>0?(this.logger.warn("Shadowing keybinding is ignored; ",h.stringify(t)," shadows ",i.partial.map((e=>h.stringify(e))).join(", ")),!0):i.shadow.length>0&&(this.logger.warn("Shadowed keybinding is ignored; ",h.stringify(t)," would be shadowed by ",i.shadow.map((e=>h.stringify(e))).join(", ")),!0)}validateKeybinding(e,t){const n=this.resolveKeybinding(t),i=this.getKeySequenceCollisions(e,n).filter((e=>e.when===t.when));if(i.full.length>0){const e=i.full[0],t=this.commandRegistry.getCommand(e.command);return(0,a.formatLocalize)("keymaps.keybinding.full.collide",`${t?(null==t?void 0:t.label)||t.id:e.command}${e.when?`{${e.when}}`:e.when}`)}if(i.partial.length>0){const e=i.partial[0],t=this.commandRegistry.getCommand(e.command);return(0,a.formatLocalize)("keymaps.keybinding.partial.collide",`${t?(null==t?void 0:t.label)||t.id:e.command}${e.when?`{${e.when}}`:e.when}`)}if(i.shadow.length>0){const e=i.shadow[0],t=this.commandRegistry.getCommand(e.command);return(0,a.formatLocalize)("keymaps.keybinding.shadow.collide",`${t?(null==t?void 0:t.label)||t.id:e.command}${e.when?`{${e.when}}`:e.when}`)}return""}containsKeybindingInScope(e,t=u.USER){return this.containsKeybinding(this.keymaps[t],e)}validateKeybindingInScope(e,t=u.USER){return this.validateKeybinding(this.keymaps[t],e)}acceleratorFor(e,t=" "){const n=this.resolveKeybinding(e);return this.acceleratorForSequence(n,t)}acceleratorForSequence(e,t=" "){return e.map((e=>this.acceleratorForKeyCode(e,t)))}acceleratorForKeyString(e,t=" "){const n=l.KeyCode.parse(e);return this.acceleratorForKeyCode(n,t)}capitalizeFirstLetter(e){return e.replace(/^\S/,(function(e){return e.toUpperCase()}))}acceleratorForKeyCode(e,t=" "){const n=[];return e.ctrl&&n.push(this.capitalizeFirstLetter(l.SpecialCases.CTRL)),e.alt&&n.push(this.capitalizeFirstLetter(l.SpecialCases.ALT)),e.shift&&n.push(this.capitalizeFirstLetter(l.SpecialCases.SHIFT)),e.meta&&(a.isOSX?n.push(l.SpecialCases.MACMETA):n.push(this.capitalizeFirstLetter(l.SpecialCases.META))),e.key&&n.push(this.acceleratorForKey(e.key)),n.join(t)}acceleratorForKey(e){if(a.isOSX){if(e===l.Key.ARROW_LEFT)return l.SpecialCases.ARROW_LEFT;if(e===l.Key.ARROW_RIGHT)return l.SpecialCases.ARROW_RIGHT;if(e===l.Key.ARROW_UP)return l.SpecialCases.ARROW_UP;if(e===l.Key.ARROW_DOWN)return l.SpecialCases.ARROW_DOWN;if(e===l.Key.BACKSPACE)return l.SpecialCases.BACKSPACE;if(e===l.Key.ENTER)return l.SpecialCases.ENTER}const t=this.keyboardLayoutService.getKeyboardCharacter(e);return e.keyCode>=l.Key.KEY_A.keyCode&&e.keyCode<=l.Key.KEY_Z.keyCode||e.keyCode>=l.Key.F1.keyCode&&e.keyCode<=l.Key.F24.keyCode?t.toUpperCase():t.length>1?t.charAt(0).toUpperCase()+t.slice(1):" "===t?l.SpecialCases.SPACE.charAt(0).toUpperCase()+l.SpecialCases.SPACE.slice(1):t}getKeySequenceCollisions(e,t){const n=new m.KeybindingsResult;for(const i of e)try{const e=this.resolveKeybinding(i);switch(l.KeySequence.compare(t,e)){case l.KeySequence.CompareResult.FULL:n.full.push(i);break;case l.KeySequence.CompareResult.PARTIAL:n.partial.push(i);break;case l.KeySequence.CompareResult.SHADOW:n.shadow.push(i)}}catch(e){this.logger.warn(e)}return n}getKeybindingsForKeySequence(e,t){const n=new m.KeybindingsResult;for(let t=u.END;--t>=u.DEFAULT;){const i=this.getKeySequenceCollisions(this.keymaps[t],e);i.full=i.full.sort(this.sortKeybindingsByPriority),i.partial=i.partial.sort(this.sortKeybindingsByPriority),n.merge(i)}const i=n.partial.filter((e=>this.isEnabled(e,t)));return n.partial=i,n}getKeybindingsForCommand(e){const t=[];for(let n=u.END-1;n>=u.DEFAULT;n--)if(this.keymaps[n].forEach((i=>{const r=this.commandRegistry.getCommand(i.command);r&&r.id===e&&t.push(Object.assign(Object.assign({},i),{scope:n}))})),t.length>0)return t;return t}getScopedKeybindingsForCommand(e,t){const n=[];return e>=u.END?[]:(this.keymaps[e].forEach((e=>{const i=this.commandRegistry.getCommand(e.command);i&&i.id===t&&n.push(e)})),n)}sortKeybindingsByPriority(e,t){if(e.when&&!t.when)return-1;if(!e.when&&t.when)return 1;const n=(0,a.isUndefined)(e.priority)?p.Default:e.priority;return((0,a.isUndefined)(t.priority)?p.Default:t.priority)-n}isActive(e){if(this.isPseudoCommand(e.command))return!0;const t=this.commandRegistry.getCommand(e.command);return!!t&&!!this.commandRegistry.getActiveHandler(t.id)}isEnabled(e,t){return!(e.when&&!this.whenContextService.match(e.when,t&&t.target))}isPseudoCommand(e){return e===i.PASSTHROUGH_PSEUDO_COMMAND}resetKeybindings(){for(let e=u.DEFAULT+1;e0?(e.preventDefault(),e.stopPropagation(),this.modifierKeySequenceTimer=setTimeout((()=>{this.modifierKeySequence=[]}),i.MODIFIER_KEYSEQUENCE_TIMEOUT)):this.modifierKeySequence=[]}run(e){if(e.defaultPrevented)return;this.keySequenceTimer&&clearTimeout(this.keySequenceTimer);const t=l.KeyCode.createKeyCode(e);if(t.isModifierOnly())return;this.keyboardLayoutService.validateKeyCode(t),this.keySequence.push(t);const n=this.getKeybindingsForKeySequence(this.keySequence,e);this.tryKeybindingExecution(n.full,e)?(this.keySequence=[],this.statusBar.removeElement("keybinding-status")):n.partial.length>0?(e.preventDefault(),e.stopPropagation(),this.statusBar.addElement("keybinding-status",{text:(0,a.formatLocalize)("keybinding.combination.tip",this.acceleratorForSequence(this.keySequence,"+")),alignment:d.StatusBarAlignment.LEFT,priority:2}),this.keySequenceTimer=setTimeout((()=>{this.keySequence=[],this.statusBar.removeElement("keybinding-status")}),i.KEYSEQUENCE_TIMEOUT)):(this.keySequence=[],this.statusBar.removeElement("keybinding-status"))}convert(e,t=" "){const n=l.KeyCode.createKeyCode(e);return n.isModifierOnly()||(this.keyboardLayoutService.validateKeyCode(n),this.convertKeySequence.length<=1?this.convertKeySequence.push(n):this.convertKeySequence=[n]),this.acceleratorForSequence(this.convertKeySequence,"+").join(t)}clearConvert(){this.convertKeySequence=[]}tryKeybindingExecution(e,t){if(0===e.length)return!1;for(const n of e)if(this.isEnabled(n,t)){if(this.isPseudoCommand(n.command))return!0;{const e=this.commandRegistry.getCommand(n.command);if(e)return this.commandService.executeCommand(e.id,n.args).catch((e=>this.logger.error("Failed to execute command:",e,n.command))),t.preventDefault(),t.stopPropagation(),!0}return!1}return!1}};g.PASSTHROUGH_PSEUDO_COMMAND="passthrough",g.KEYSEQUENCE_TIMEOUT=5e3,g.MODIFIER_KEYSEQUENCE_TIMEOUT=300,r.__decorate([(0,o.Autowired)(c.KeyboardLayoutService),r.__metadata("design:type",c.KeyboardLayoutService)],g.prototype,"keyboardLayoutService",void 0),r.__decorate([(0,o.Autowired)(t.KeybindingContribution),r.__metadata("design:type",Object)],g.prototype,"keybindingContributionProvider",void 0),r.__decorate([(0,o.Autowired)(a.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(a.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],g.prototype,"whenContextService",void 0),r.__decorate([(0,o.Autowired)(d.IStatusBarService),r.__metadata("design:type",Object)],g.prototype,"statusBar",void 0),g=i=r.__decorate([(0,o.Injectable)()],g),t.KeybindingRegistryImpl=g,t.NO_KEYBINDING_NAME="no_keybinding"},33905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(21214),t),i.__exportStar(n(21803),t),i.__exportStar(n(53029),t)},53029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardTester=t.BrowserKeyboardLayoutImpl=t.KeyValidator=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(29534),s=n(11792),c=n(36319);t.KeyValidator=Symbol("KeyValidator");let l=class{constructor(){this.initialized=new o.Deferred,this.nativeLayoutChanged=new o.Emitter,this.tester=new d,this.source="pressed-keys",this.initialize()}get onDidChangeNativeLayout(){return this.nativeLayoutChanged.event}get allLayoutData(){return this.tester.keymapInfos.slice()}get currentLayoutData(){return this.currentLayout}get currentLayoutSource(){return this.source}get whenReady(){return this.initialized.promise}async initialize(){this.loadState();const e=navigator.keyboard;e&&e.addEventListener&&e.addEventListener("layoutchange",(async()=>{const e=await this.getNativeLayout();e&&this.nativeLayoutChanged.fire(e)})),this.initialized.resolve()}async getNativeLayout(){if(await this.whenReady,"user-choice"===this.source&&this.currentLayout)return this.currentLayout;const[e,t]=await this.autodetect();return e?(this.setCurrent(e,t),e):void 0}async setLayoutData(e){if("autodetect"===e){if("user-choice"===this.source){const[e,t]=await this.autodetect();if(e)return this.setCurrent(e,t),this.nativeLayoutChanged.fire(e),e}return this.currentLayout}return"user-choice"===this.source&&e===this.currentLayout||(this.setCurrent(e,"user-choice"),this.nativeLayoutChanged.fire(e)),e}validateKeyCode(e){e.key&&e.character&&this.validateKey({code:e.key.code,character:e.character,shiftKey:e.shift,ctrlKey:e.ctrl,altKey:e.alt})}validateKey(e){if("pressed-keys"!==this.source)return;if(!this.tester.updateScores(e))return;const t=this.selectLayout();t&&t!==this.currentLayout&&(this.setCurrent(t,"pressed-keys"),this.nativeLayoutChanged.fire(t))}setCurrent(e,t){if(this.currentLayout=e,this.source=t,this.saveState(),this.tester.inputCount&&("pressed-keys"===t||"navigator.keyboard"===t)){const n="pressed-keys"===t?"pressed keys":"browser API";this.logger.debug(`Detected keyboard layout from ${n}: ${JSON.stringify(e.layout)}`)}}async autodetect(){const e=navigator.keyboard;if(e&&e.getLayoutMap)try{const t=await e.getLayoutMap();return this.testLayoutMap(t),[this.selectLayout(),"navigator.keyboard"]}catch(e){this.logger.warn("Failed to obtain keyboard layout map.",e)}return[this.selectLayout(),"pressed-keys"]}testLayoutMap(e){this.tester.reset();for(const[t,n]of e.entries())this.tester.updateScores({code:t,character:n})}selectLayout(){const e=this.tester.keymapInfos,t=this.tester.scores,n=this.tester.topScore,i=navigator.language;let r=0;for(let a=0;a=1?e.find(((e,i)=>t[i]===n)):this.tester.getUSStandardLayout()}saveState(){var e;const t={tester:this.tester.getState(),source:this.source,currentLayoutId:this.currentLayout?(0,a.getKeyboardLayoutId)(null===(e=this.currentLayout)||void 0===e?void 0:e.layout):void 0};return this.browserStorageService.setData("keyboard",t)}loadState(){const e=this.browserStorageService.getData("keyboard");if(e)if(this.tester.setState(e.tester||{}),this.source=e.source||"pressed-keys",e.currentLayoutId){const t=this.tester.keymapInfos.find((t=>(0,a.getKeyboardLayoutId)(t.layout)===e.currentLayoutId));t&&(this.currentLayout=t)}else this.currentLayout=this.tester.getUSStandardLayout()}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],l.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(s.GlobalBrowserStorageService),i.__metadata("design:type",s.GlobalBrowserStorageService)],l.prototype,"browserStorageService",void 0),l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.BrowserKeyboardLayoutImpl=l;class d{constructor(){this.topScore=0,this.testedInputs=new Map,this._keymapInfos=[],this.initialized=new o.Deferred,(0,c.requireRegister)();const e=c.KeyboardLayoutContribution.INSTANCE.layoutInfos;this._keymapInfos.push(...e.map((e=>new a.KeymapInfo(e.layout,e.secondaryLayouts,e.mapping,e.isUserKeyboardLayout)))),this.initialized.resolve(!0),this.scores=this.keymapInfos.map((()=>0))}get inputCount(){return this.testedInputs.size}get keymapInfos(){return this._keymapInfos}reset(){for(let e=0;ethis.topScore&&(this.topScore=i[n]);return this.testedInputs.set(n,e.character),!0}testCandidate(e,t,n){const i=e.mapping[t.code];return i&&i[n]&&i[n]===t.character?1:0}getState(){const e={};for(let t=0;t(0,a.getKeyboardLayoutId)(e.layout)));for(const n in e.scores)if(e.scores.hasOwnProperty(n)){const i=t.indexOf(n);i>0&&(this.scores[i]=e.scores[n])}}if(e.topScore&&(this.topScore=e.topScore),e.testedInputs)for(const t in e.testedInputs)e.testedInputs.hasOwnProperty(t)&&this.testedInputs.set(t,e.testedInputs[t])}getUSStandardLayout(){const e=this.keymapInfos.filter((e=>e.layout.isUSStandard));return e.length?e[0]:null}}t.KeyboardTester=d},21803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardLayoutService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(29534),s=n(53029),c=n(21214);let l=class{constructor(){this.keyboardLayoutChanged=new o.Emitter}updateLayout(e){const t=this.transformNativeLayout(e);return this.currentLayout=t,this.keyboardLayoutChanged.fire(t),t}get onKeyboardLayoutChanged(){return this.keyboardLayoutChanged.event}async initialize(){this.layoutChangeNotifier.onDidChangeNativeLayout((e=>this.updateLayout(e)));const e=await this.layoutProvider.getNativeLayout();e&&this.updateLayout(e)}resolveKeyCode(e){const t=this.currentLayout;if(t&&e.key)for(let n=0;n<=1;n++){const i=this.getCharacterIndex(e.key,!!n),r=t.key2KeyCode[i];if(r){const t=this.transformKeyCode(e,r,!!n);if(t)return t}}return e}getKeyboardCharacter(e){const t=this.currentLayout;if(t){const n=t.code2Character[e.code];if(n)return n}return e.easyString}validateKeyCode(e){this.keyValidator.validateKeyCode(e)}transformKeyCode(e,t,n){if((e.shift||!n)&&(!t.alt||!(e.alt||e.ctrl||e.shift&&!n)))return new c.KeyCode({key:t.key,meta:e.meta,ctrl:e.ctrl||t.alt,shift:e.shift&&!n||t.shift,alt:e.alt||t.alt})}transformNativeLayout(e){const t=new Array(2*(c.Key.MAX_KEY_CODE+1)),n={},i=e.mapping;for(const e in i)if(i.hasOwnProperty(e)){const r=i[e],a=c.Key.getKey(e);a&&this.shouldIncludeKey(e)&&(o.isWindows?this.addWindowsKeyMapping(t,a,r.vkey,r.value):(r.value&&this.addKeyMapping(t,a,r.value,!1,!1),r.withShift&&this.addKeyMapping(t,a,r.withShift,!0,!1),r.withAltGr&&this.addKeyMapping(t,a,r.withAltGr,!1,!0),r.withShiftAltGr&&this.addKeyMapping(t,a,r.withShiftAltGr,!0,!0))),r.value&&(n[e]=r.value)}return{key2KeyCode:t,code2Character:n}}shouldIncludeKey(e){return!e.startsWith("Numpad")}addKeyMapping(e,t,n,i,r){const o=d[n];if(o){const a=this.getCharacterIndex(o.key,o.shift);void 0===e[a]&&(e[a]=new c.KeyCode({key:t,shift:i,alt:r,character:n}))}}addWindowsKeyMapping(e,t,n,i){const r=u[n];if(r){const n=this.getCharacterIndex(r);void 0===e[n]&&(e[n]=new c.KeyCode({key:t,character:i}))}}getCharacterIndex(e,t){return t?c.Key.MAX_KEY_CODE+e.keyCode+1:e.keyCode}};i.__decorate([(0,r.Autowired)(a.KeyboardNativeLayoutService),i.__metadata("design:type",Object)],l.prototype,"layoutProvider",void 0),i.__decorate([(0,r.Autowired)(a.KeyboardLayoutChangeNotifierService),i.__metadata("design:type",Object)],l.prototype,"layoutChangeNotifier",void 0),i.__decorate([(0,r.Autowired)(s.KeyValidator),i.__metadata("design:type",Object)],l.prototype,"keyValidator",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.KeyboardLayoutService=l;const d={"`":{key:c.Key.BACKQUOTE},"~":{key:c.Key.BACKQUOTE,shift:!0},1:{key:c.Key.DIGIT1},"!":{key:c.Key.DIGIT1,shift:!0},2:{key:c.Key.DIGIT2},"@":{key:c.Key.DIGIT2,shift:!0},3:{key:c.Key.DIGIT3},"#":{key:c.Key.DIGIT3,shift:!0},4:{key:c.Key.DIGIT4},$:{key:c.Key.DIGIT4,shift:!0},5:{key:c.Key.DIGIT5},"%":{key:c.Key.DIGIT5,shift:!0},6:{key:c.Key.DIGIT6},"^":{key:c.Key.DIGIT6,shift:!0},7:{key:c.Key.DIGIT7},"&":{key:c.Key.DIGIT7,shift:!0},8:{key:c.Key.DIGIT8},"*":{key:c.Key.DIGIT8,shift:!0},9:{key:c.Key.DIGIT9},"(":{key:c.Key.DIGIT9,shift:!0},0:{key:c.Key.DIGIT0},")":{key:c.Key.DIGIT0,shift:!0},"-":{key:c.Key.MINUS},_:{key:c.Key.MINUS,shift:!0},"=":{key:c.Key.EQUAL},"+":{key:c.Key.EQUAL,shift:!0},a:{key:c.Key.KEY_A},A:{key:c.Key.KEY_A,shift:!0},b:{key:c.Key.KEY_B},B:{key:c.Key.KEY_B,shift:!0},c:{key:c.Key.KEY_C},C:{key:c.Key.KEY_C,shift:!0},d:{key:c.Key.KEY_D},D:{key:c.Key.KEY_D,shift:!0},e:{key:c.Key.KEY_E},E:{key:c.Key.KEY_E,shift:!0},f:{key:c.Key.KEY_F},F:{key:c.Key.KEY_F,shift:!0},g:{key:c.Key.KEY_G},G:{key:c.Key.KEY_G,shift:!0},h:{key:c.Key.KEY_H},H:{key:c.Key.KEY_H,shift:!0},i:{key:c.Key.KEY_I},I:{key:c.Key.KEY_I,shift:!0},j:{key:c.Key.KEY_J},J:{key:c.Key.KEY_J,shift:!0},k:{key:c.Key.KEY_K},K:{key:c.Key.KEY_K,shift:!0},l:{key:c.Key.KEY_L},L:{key:c.Key.KEY_L,shift:!0},m:{key:c.Key.KEY_M},M:{key:c.Key.KEY_M,shift:!0},n:{key:c.Key.KEY_N},N:{key:c.Key.KEY_N,shift:!0},o:{key:c.Key.KEY_O},O:{key:c.Key.KEY_O,shift:!0},p:{key:c.Key.KEY_P},P:{key:c.Key.KEY_P,shift:!0},q:{key:c.Key.KEY_Q},Q:{key:c.Key.KEY_Q,shift:!0},r:{key:c.Key.KEY_R},R:{key:c.Key.KEY_R,shift:!0},s:{key:c.Key.KEY_S},S:{key:c.Key.KEY_S,shift:!0},t:{key:c.Key.KEY_T},T:{key:c.Key.KEY_T,shift:!0},u:{key:c.Key.KEY_U},U:{key:c.Key.KEY_U,shift:!0},v:{key:c.Key.KEY_V},V:{key:c.Key.KEY_V,shift:!0},w:{key:c.Key.KEY_W},W:{key:c.Key.KEY_W,shift:!0},x:{key:c.Key.KEY_X},X:{key:c.Key.KEY_X,shift:!0},y:{key:c.Key.KEY_Y},Y:{key:c.Key.KEY_Y,shift:!0},z:{key:c.Key.KEY_Z},Z:{key:c.Key.KEY_Z,shift:!0},"[":{key:c.Key.BRACKET_LEFT},"{":{key:c.Key.BRACKET_LEFT,shift:!0},"]":{key:c.Key.BRACKET_RIGHT},"}":{key:c.Key.BRACKET_RIGHT,shift:!0},";":{key:c.Key.SEMICOLON},":":{key:c.Key.SEMICOLON,shift:!0},"'":{key:c.Key.QUOTE},'"':{key:c.Key.QUOTE,shift:!0},",":{key:c.Key.COMMA},"<":{key:c.Key.COMMA,shift:!0},".":{key:c.Key.PERIOD},">":{key:c.Key.PERIOD,shift:!0},"/":{key:c.Key.SLASH},"?":{key:c.Key.SLASH,shift:!0},"\\":{key:c.Key.BACKSLASH},"|":{key:c.Key.BACKSLASH,shift:!0},"\t":{key:c.Key.TAB},"\r":{key:c.Key.ENTER},"\n":{key:c.Key.ENTER}," ":{key:c.Key.SPACE}},u={VK_SHIFT:c.Key.SHIFT_LEFT,VK_LSHIFT:c.Key.SHIFT_LEFT,VK_RSHIFT:c.Key.SHIFT_RIGHT,VK_CONTROL:c.Key.CONTROL_LEFT,VK_LCONTROL:c.Key.CONTROL_LEFT,VK_RCONTROL:c.Key.CONTROL_RIGHT,VK_MENU:c.Key.ALT_LEFT,VK_COMMAND:c.Key.OS_LEFT,VK_LWIN:c.Key.OS_LEFT,VK_RWIN:c.Key.OS_RIGHT,VK_0:c.Key.DIGIT0,VK_1:c.Key.DIGIT1,VK_2:c.Key.DIGIT2,VK_3:c.Key.DIGIT3,VK_4:c.Key.DIGIT4,VK_5:c.Key.DIGIT5,VK_6:c.Key.DIGIT6,VK_7:c.Key.DIGIT7,VK_8:c.Key.DIGIT8,VK_9:c.Key.DIGIT9,VK_A:c.Key.KEY_A,VK_B:c.Key.KEY_B,VK_C:c.Key.KEY_C,VK_D:c.Key.KEY_D,VK_E:c.Key.KEY_E,VK_F:c.Key.KEY_F,VK_G:c.Key.KEY_G,VK_H:c.Key.KEY_H,VK_I:c.Key.KEY_I,VK_J:c.Key.KEY_J,VK_K:c.Key.KEY_K,VK_L:c.Key.KEY_L,VK_M:c.Key.KEY_M,VK_N:c.Key.KEY_N,VK_O:c.Key.KEY_O,VK_P:c.Key.KEY_P,VK_Q:c.Key.KEY_Q,VK_R:c.Key.KEY_R,VK_S:c.Key.KEY_S,VK_T:c.Key.KEY_T,VK_U:c.Key.KEY_U,VK_V:c.Key.KEY_V,VK_W:c.Key.KEY_W,VK_X:c.Key.KEY_X,VK_Y:c.Key.KEY_Y,VK_Z:c.Key.KEY_Z,VK_OEM_1:c.Key.SEMICOLON,VK_OEM_2:c.Key.SLASH,VK_OEM_3:c.Key.BACKQUOTE,VK_OEM_4:c.Key.BRACKET_LEFT,VK_OEM_5:c.Key.BACKSLASH,VK_OEM_6:c.Key.BRACKET_RIGHT,VK_OEM_7:c.Key.QUOTE,VK_OEM_PLUS:c.Key.EQUAL,VK_OEM_COMMA:c.Key.COMMA,VK_OEM_MINUS:c.Key.MINUS,VK_OEM_PERIOD:c.Key.PERIOD,VK_F1:c.Key.F1,VK_F2:c.Key.F2,VK_F3:c.Key.F3,VK_F4:c.Key.F4,VK_F5:c.Key.F5,VK_F6:c.Key.F6,VK_F7:c.Key.F7,VK_F8:c.Key.F8,VK_F9:c.Key.F9,VK_F10:c.Key.F10,VK_F11:c.Key.F11,VK_F12:c.Key.F12,VK_F13:c.Key.F13,VK_F14:c.Key.F14,VK_F15:c.Key.F15,VK_F16:c.Key.F16,VK_F17:c.Key.F17,VK_F18:c.Key.F18,VK_F19:c.Key.F19,VK_BACK:c.Key.BACKSPACE,VK_TAB:c.Key.TAB,VK_RETURN:c.Key.ENTER,VK_CAPITAL:c.Key.CAPS_LOCK,VK_ESCAPE:c.Key.ESCAPE,VK_SPACE:c.Key.SPACE,VK_PRIOR:c.Key.PAGE_UP,VK_NEXT:c.Key.PAGE_DOWN,VK_END:c.Key.END,VK_HOME:c.Key.HOME,VK_INSERT:c.Key.INSERT,VK_DELETE:c.Key.DELETE,VK_LEFT:c.Key.ARROW_LEFT,VK_UP:c.Key.ARROW_UP,VK_RIGHT:c.Key.ARROW_RIGHT,VK_DOWN:c.Key.ARROW_DOWN,VK_NUMLOCK:c.Key.NUM_LOCK,VK_NUMPAD0:c.Key.DIGIT0,VK_NUMPAD1:c.Key.DIGIT1,VK_NUMPAD2:c.Key.DIGIT2,VK_NUMPAD3:c.Key.DIGIT3,VK_NUMPAD4:c.Key.DIGIT4,VK_NUMPAD5:c.Key.DIGIT5,VK_NUMPAD6:c.Key.DIGIT6,VK_NUMPAD7:c.Key.DIGIT7,VK_NUMPAD8:c.Key.DIGIT8,VK_NUMPAD9:c.Key.DIGIT9,VK_MULTIPLY:c.Key.NUMPAD_MULTIPLY,VK_ADD:c.Key.NUMPAD_ADD,VK_SUBTRACT:c.Key.NUMPAD_SUBTRACT,VK_DECIMAL:c.Key.NUMPAD_DECIMAL,VK_DIVIDE:c.Key.NUMPAD_DIVIDE}},21214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysOrKeyCodes=t.Key=t.SpecialCases=t.KeyModifier=t.KeyCode=t.KeySequence=void 0;const i=n(90642),r=n(90642);var o;function a(e){return e.substr(0,1).toUpperCase()+e.substr(1)}!function(e){let t;e.equals=function(e,t){if(e.length!==t.length)return!1;for(let n=0;ne===o.CtrlCmd)),n.ctrl=t.modifiers.some((e=>e===o.MacCtrl))):(n.meta=!1,n.ctrl=t.modifiers.some((e=>e===o.CtrlCmd))),n.shift=t.modifiers.some((e=>e===o.Shift)),n.alt=t.modifiers.some((e=>e===o.Alt))),new s(n)}return new s(e)}static parse(e,t="+"){if(s.keybindings[e])return s.keybindings[e];const n={},r=e.trim().toLowerCase().split(t);for(let t of r){void 0!==p[t]&&(t=p[t]);const r=d[t];if(t===h.META){if(!i.isOSX)throw new Error(`Can't parse keybinding ${e} meta is for OSX only`);n.meta=!0}else if(t===h.MACMETA){if(!i.isOSX)throw new Error(`Can't parse keybinding ${e} meta is for OSX only`);n.meta=!0}else if(t===h.CTRLCMD)i.isOSX?n.meta=!0:n.ctrl=!0;else if(t===h.CTRL)n.ctrl=!0;else if(t===h.SHIFT)n.shift=!0;else if(t===h.ALT)n.alt=!0;else if(t===h.ARROW_DOWN)n.key=m.ARROW_DOWN;else if(t===h.ARROW_UP)n.key=m.ARROW_UP;else if(t===h.ARROW_LEFT)n.key=m.ARROW_LEFT;else if(t===h.ARROW_RIGHT)n.key=m.ARROW_RIGHT;else if(t===h.BACKSPACE)n.key=m.BACKSPACE;else if(t===h.ENTER)n.key=m.ENTER;else{if(!m.isKey(r))throw new Error(`Unrecognized key '${t}' in '${e}'`);m.isModifier(r.code)?r.code===m.CONTROL_LEFT.code||r.code===m.CONTROL_RIGHT.code?n.ctrl=!0:r.code===m.SHIFT_LEFT.code||r.code===m.SHIFT_RIGHT.code?n.shift=!0:r.code!==m.ALT_LEFT.code&&r.code!==m.ALT_RIGHT.code||(n.alt=!0):n.key=r}}return s.keybindings[e]=new s(n),s.keybindings[e]}}t.KeyCode=s,s.keybindings={},function(e){e.isModifierString=function(e){return e===o.CtrlCmd||e===o.Shift||e===o.Alt||e===o.MacCtrl},e.isKeyboardEvent=function(e){if("undefined"==typeof KeyboardEvent)return!1;if(e instanceof KeyboardEvent)return!0;const{type:t}=e;return!!t&&("keypress"===t||"keydown"===t||"keyup"===t)},e.toKey=function(e){const t=e.code;if(t){if(i.isOSX){const n=e.key;if(t===m.INTL_BACKSLASH.code&&("`"===n||"~"===n))return m.BACKQUOTE;if(t===m.BACKQUOTE.code&&("搂"===n||"卤"===n))return m.INTL_BACKSLASH}if(!(t!==m.SHIFT_LEFT.code||e.ctrlKey||e.altKey||e.metaKey))return m.SHIFT_LEFT;if(!(t!==m.SHIFT_RIGHT.code||e.ctrlKey||e.altKey||e.metaKey))return m.SHIFT_RIGHT;if(!(t!==m.CONTROL_LEFT.code||e.shiftKey||e.altKey||e.metaKey))return m.CONTROL_LEFT;if(!(t!==m.CONTROL_RIGHT.code||e.shiftKey||e.altKey||e.metaKey))return m.CONTROL_RIGHT;if(!(t!==m.ALT_LEFT.code||e.shiftKey||e.ctrlKey||e.metaKey))return m.ALT_LEFT;if(!(t!==m.ALT_RIGHT.code||e.shiftKey||e.ctrlKey||e.metaKey))return m.ALT_RIGHT;if(!(c[t]!==m.OS_LEFT||e.shiftKey||e.ctrlKey||e.altKey))return m.OS_LEFT;if(c[t]===m.OS_RIGHT&&!e.shiftKey&&!e.ctrlKey&&!e.altKey)return m.OS_RIGHT;if(t.startsWith("Numpad")&&e.key&&e.key.length>1){const t=m.getKey(e.key);if(t)return t}const n=m.getKey(t);if(n)return n}const n=e.keyCode;if(n){const e=m.getKey(n);if(e)return e}const r=e.keyIdentifier;if(r){const e=m.getKey(r);if(e)return e}throw new Error(`Cannot get key code from the keyboard event with code: ${t}, keyCode: ${n}, keyIdentifier: ${r}`)},e.toCharacter=function(e){const t=e.key;if(t&&1===Array.from(t).length)return t;const n=e.charCode;return n&&n>31&&!(n>=128&&n<=159)?String.fromCharCode(n):void 0}}(s=t.KeyCode||(t.KeyCode={})),function(e){e.CtrlCmd="M1",e.Shift="M2",e.Alt="M3",e.MacCtrl="M4"}(o=t.KeyModifier||(t.KeyModifier={})),function(e){e.CTRL=i.isOSX?e.MacCtrl:e.CtrlCmd,e.SHIFT=e.Shift,e.isModifier=function(e){if(e)switch(e){case"M1":case"M2":case"M3":case"M4":return!0;default:return!1}return!1}}(o=t.KeyModifier||(t.KeyModifier={}));const c={},l={},d={},u=[],p={option:"alt",command:"meta",cmd:"meta",return:"enter",esc:"escape",mod:"ctrl",ins:"insert",del:"delete",control:"ctrl"};var h,m;!function(e){e.META=i.isOSX?"meta":r.isWindows?"win":"meta",e.MACMETA="鈱�",e.CTRL=i.isOSX?"鈱�":"ctrl",e.ALT=i.isOSX?"鈱�":"alt",e.SHIFT=i.isOSX?"鈬�":"shift",e.CTRLCMD="ctrlcmd",e.ARROW_LEFT="鈫�",e.ARROW_RIGHT="鈫�",e.ARROW_UP="鈫�",e.ARROW_DOWN="鈫�",e.BACKSPACE="鈱�",e.ENTER="鈴�",e.SPACE="space",e.NUMPAD="numpad"}(h=t.SpecialCases||(t.SpecialCases={})),function(e){e.isKey=function(e){return"object"==typeof e&&"code"in e&&"keyCode"in e},e.getKey=function(e){return"number"==typeof e?l[e]:c[e]},e.isModifier=function(e){return"number"==typeof e?void 0!==u.find((t=>t.keyCode===e)):void 0!==u.find((t=>t.code===e))},e.equals=function(e,t){return!!t.key&&e.keyCode===t.key.keyCode},e.BACKSPACE={code:"Backspace",keyCode:8,easyString:"backspace"},e.TAB={code:"Tab",keyCode:9,easyString:"tab"},e.ENTER={code:"Enter",keyCode:13,easyString:"enter"},e.ESCAPE={code:"Escape",keyCode:27,easyString:"escape"},e.SPACE={code:"Space",keyCode:32,easyString:"space"},e.PAGE_UP={code:"PageUp",keyCode:33,easyString:"pageup"},e.PAGE_DOWN={code:"PageDown",keyCode:34,easyString:"pagedown"},e.END={code:"End",keyCode:35,easyString:"end"},e.HOME={code:"Home",keyCode:36,easyString:"home"},e.ARROW_LEFT={code:"ArrowLeft",keyCode:37,easyString:"left"},e.ARROW_UP={code:"ArrowUp",keyCode:38,easyString:"up"},e.ARROW_RIGHT={code:"ArrowRight",keyCode:39,easyString:"right"},e.ARROW_DOWN={code:"ArrowDown",keyCode:40,easyString:"down"},e.INSERT={code:"Insert",keyCode:45,easyString:"insert"},e.DELETE={code:"Delete",keyCode:46,easyString:"delete"},e.SHIFT_LEFT={code:"ShiftLeft",keyCode:16,easyString:"shift"},e.SHIFT_RIGHT={code:"ShiftRight",keyCode:16,easyString:"shift"},e.CONTROL_LEFT={code:"ControlLeft",keyCode:17,easyString:"ctrl"},e.CONTROL_RIGHT={code:"ControlRight",keyCode:17,easyString:"ctrl"},e.ALT_LEFT={code:"AltLeft",keyCode:18,easyString:"alt"},e.ALT_RIGHT={code:"AltRight",keyCode:18,easyString:"alt"},e.CAPS_LOCK={code:"CapsLock",keyCode:20,easyString:"capslock"},e.OS_LEFT={code:"OSLeft",keyCode:91,easyString:"super"},e.OS_RIGHT={code:"OSRight",keyCode:92,easyString:"super"},e.DIGIT0={code:"Digit0",keyCode:48,easyString:"0"},e.DIGIT1={code:"Digit1",keyCode:49,easyString:"1"},e.DIGIT2={code:"Digit2",keyCode:50,easyString:"2"},e.DIGIT3={code:"Digit3",keyCode:51,easyString:"3"},e.DIGIT4={code:"Digit4",keyCode:52,easyString:"4"},e.DIGIT5={code:"Digit5",keyCode:53,easyString:"5"},e.DIGIT6={code:"Digit6",keyCode:54,easyString:"6"},e.DIGIT7={code:"Digit7",keyCode:55,easyString:"7"},e.DIGIT8={code:"Digit8",keyCode:56,easyString:"8"},e.DIGIT9={code:"Digit9",keyCode:57,easyString:"9"},e.NUMPAD0={code:"Numpad0",keyCode:48,easyString:"numpad0"},e.NUMPAD1={code:"Numpad1",keyCode:49,easyString:"numpad1"},e.NUMPAD2={code:"Numpad2",keyCode:50,easyString:"numpad2"},e.NUMPAD3={code:"Numpad3",keyCode:51,easyString:"numpad3"},e.NUMPAD4={code:"Numpad4",keyCode:52,easyString:"numpad4"},e.NUMPAD5={code:"Numpad5",keyCode:53,easyString:"numpad5"},e.NUMPAD6={code:"Numpad6",keyCode:54,easyString:"numpad6"},e.NUMPAD7={code:"Numpad7",keyCode:55,easyString:"numpad7"},e.NUMPAD8={code:"Numpad8",keyCode:56,easyString:"numpad8"},e.NUMPAD9={code:"Numpad9",keyCode:57,easyString:"numpad9"},e.KEY_A={code:"KeyA",keyCode:65,easyString:"a"},e.KEY_B={code:"KeyB",keyCode:66,easyString:"b"},e.KEY_C={code:"KeyC",keyCode:67,easyString:"c"},e.KEY_D={code:"KeyD",keyCode:68,easyString:"d"},e.KEY_E={code:"KeyE",keyCode:69,easyString:"e"},e.KEY_F={code:"KeyF",keyCode:70,easyString:"f"},e.KEY_G={code:"KeyG",keyCode:71,easyString:"g"},e.KEY_H={code:"KeyH",keyCode:72,easyString:"h"},e.KEY_I={code:"KeyI",keyCode:73,easyString:"i"},e.KEY_J={code:"KeyJ",keyCode:74,easyString:"j"},e.KEY_K={code:"KeyK",keyCode:75,easyString:"k"},e.KEY_L={code:"KeyL",keyCode:76,easyString:"l"},e.KEY_M={code:"KeyM",keyCode:77,easyString:"m"},e.KEY_N={code:"KeyN",keyCode:78,easyString:"n"},e.KEY_O={code:"KeyO",keyCode:79,easyString:"o"},e.KEY_P={code:"KeyP",keyCode:80,easyString:"p"},e.KEY_Q={code:"KeyQ",keyCode:81,easyString:"q"},e.KEY_R={code:"KeyR",keyCode:82,easyString:"r"},e.KEY_S={code:"KeyS",keyCode:83,easyString:"s"},e.KEY_T={code:"KeyT",keyCode:84,easyString:"t"},e.KEY_U={code:"KeyU",keyCode:85,easyString:"u"},e.KEY_V={code:"KeyV",keyCode:86,easyString:"v"},e.KEY_W={code:"KeyW",keyCode:87,easyString:"w"},e.KEY_X={code:"KeyX",keyCode:88,easyString:"x"},e.KEY_Y={code:"KeyY",keyCode:89,easyString:"y"},e.KEY_Z={code:"KeyZ",keyCode:90,easyString:"z"},e.NUMPAD_MULTIPLY={code:"NumpadMultiply",keyCode:106,easyString:"numpad_multiply"},e.NUMPAD_ADD={code:"NumpadAdd",keyCode:107,easyString:"numpad_add"},e.NUMPAD_DECIMAL={code:"NumpadDecimal",keyCode:108,easyString:"numpad_decimal"},e.NUMPAD_SUBTRACT={code:"NumpadSubtract",keyCode:109,easyString:"numpad_subtract"},e.NUMPAD_DIVIDE={code:"NumpadDivide",keyCode:111,easyString:"numpad_divide"},e.F1={code:"F1",keyCode:112,easyString:"f1"},e.F2={code:"F2",keyCode:113,easyString:"f2"},e.F3={code:"F3",keyCode:114,easyString:"f3"},e.F4={code:"F4",keyCode:115,easyString:"f4"},e.F5={code:"F5",keyCode:116,easyString:"f5"},e.F6={code:"F6",keyCode:117,easyString:"f6"},e.F7={code:"F7",keyCode:118,easyString:"f7"},e.F8={code:"F8",keyCode:119,easyString:"f8"},e.F9={code:"F9",keyCode:120,easyString:"f9"},e.F10={code:"F10",keyCode:121,easyString:"f10"},e.F11={code:"F11",keyCode:122,easyString:"f11"},e.F12={code:"F12",keyCode:123,easyString:"f12"},e.F13={code:"F13",keyCode:124,easyString:"f13"},e.F14={code:"F14",keyCode:125,easyString:"f14"},e.F15={code:"F15",keyCode:126,easyString:"f15"},e.F16={code:"F16",keyCode:127,easyString:"f16"},e.F17={code:"F17",keyCode:128,easyString:"f17"},e.F18={code:"F18",keyCode:129,easyString:"f18"},e.F19={code:"F19",keyCode:130,easyString:"f19"},e.F20={code:"F20",keyCode:131,easyString:"f20"},e.F21={code:"F21",keyCode:132,easyString:"f21"},e.F22={code:"F22",keyCode:133,easyString:"f22"},e.F23={code:"F23",keyCode:134,easyString:"f23"},e.F24={code:"F24",keyCode:135,easyString:"f24"},e.NUM_LOCK={code:"NumLock",keyCode:144,easyString:"numlock"},e.SEMICOLON={code:"Semicolon",keyCode:186,easyString:";"},e.EQUAL={code:"Equal",keyCode:187,easyString:"="},e.COMMA={code:"Comma",keyCode:188,easyString:","},e.MINUS={code:"Minus",keyCode:189,easyString:"-"},e.PERIOD={code:"Period",keyCode:190,easyString:"."},e.SLASH={code:"Slash",keyCode:191,easyString:"/"},e.BACKQUOTE={code:"Backquote",keyCode:192,easyString:"`"},e.INTL_RO={code:"IntlRo",keyCode:193,easyString:"intlro"},e.BRACKET_LEFT={code:"BracketLeft",keyCode:219,easyString:"["},e.BACKSLASH={code:"Backslash",keyCode:220,easyString:"\\"},e.BRACKET_RIGHT={code:"BracketRight",keyCode:221,easyString:"]"},e.QUOTE={code:"Quote",keyCode:222,easyString:"'"},e.INTL_BACKSLASH={code:"IntlBackslash",keyCode:229,easyString:"intlbackslash"},e.INTL_YEN={code:"IntlYen",keyCode:255,easyString:"intlyen"},e.MAX_KEY_CODE=e.INTL_YEN.keyCode}(m=t.Key||(t.Key={})),Object.keys(m).map((e=>Reflect.get(m,e))).filter((e=>m.isKey(e))).forEach((e=>{c[e.code]=e,l[e.keyCode]=e,d[e.easyString]=e})),c.Numpad0=m.DIGIT0,l[96]=m.DIGIT0,c.Numpad1=m.DIGIT1,l[97]=m.DIGIT1,c.Numpad2=m.DIGIT2,l[98]=m.DIGIT2,c.Numpad3=m.DIGIT3,l[99]=m.DIGIT3,c.Numpad4=m.DIGIT4,l[100]=m.DIGIT4,c.Numpad5=m.DIGIT5,l[101]=m.DIGIT5,c.Numpad6=m.DIGIT6,l[102]=m.DIGIT6,c.Numpad7=m.DIGIT7,l[103]=m.DIGIT7,c.Numpad8=m.DIGIT8,l[104]=m.DIGIT8,c.Numpad9=m.DIGIT9,l[105]=m.DIGIT9,c.NumpadEnter=m.ENTER,c.NumpadEqual=m.EQUAL,c.MetaLeft=m.OS_LEFT,l[224]=m.OS_LEFT,c.MetaRight=m.OS_RIGHT,l[93]=m.OS_RIGHT,l[225]=m.ALT_RIGHT,l[110]=m.NUMPAD_DECIMAL,l[59]=m.SEMICOLON,l[61]=m.EQUAL,l[173]=m.MINUS,l[226]=m.BACKSLASH,l[60]=m.BACKSLASH,u.push(m.ALT_LEFT,m.ALT_RIGHT,m.CONTROL_LEFT,m.CONTROL_RIGHT,m.OS_LEFT,m.OS_RIGHT,m.SHIFT_LEFT,m.SHIFT_RIGHT),function(e){e.toKeyCode=e=>e instanceof s?e:s.createKeyCode({first:e}),e.toKeyCodes=t=>t instanceof s?[t]:Array.isArray(t)?t.slice().map(e.toKeyCode):[e.toKeyCode(t)]}(t.KeysOrKeyCodes||(t.KeysOrKeyCodes={}))},41470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardLayoutContribution=void 0;class n{constructor(){this._layoutInfos=[]}get layoutInfos(){return this._layoutInfos}registerKeyboardLayout(e){this._layoutInfos.push(e)}}t.KeyboardLayoutContribution=n,n.INSTANCE=new n},84883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000405",id:"",text:"Czech"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","{","",0,"VK_B"],KeyC:["c","C","&","",0,"VK_C"],KeyD:["d","D","膼","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","[","",0,"VK_F"],KeyG:["g","G","]","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","艂","",0,"VK_K"],KeyL:["l","L","艁","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","}","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","\\","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","膽","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","@","",0,"VK_V"],KeyW:["w","W","|","",0,"VK_W"],KeyX:["x","X","#","",0,"VK_X"],KeyY:["z","Z","","",0,"VK_Z"],KeyZ:["y","Y","","",0,"VK_Y"],Digit1:["+","1","~","",0,"VK_1"],Digit2:["臎","2","藝","",0,"VK_2"],Digit3:["拧","3","^","",0,"VK_3"],Digit4:["膷","4","藰","",0,"VK_4"],Digit5:["艡","5","掳","",0,"VK_5"],Digit6:["啪","6","藳","",0,"VK_6"],Digit7:["媒","7","`","",0,"VK_7"],Digit8:["谩","8","藱","",0,"VK_8"],Digit9:["铆","9","麓","",0,"VK_9"],Digit0:["茅","0","藵","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["=","%","篓","",0,"VK_OEM_PLUS"],Equal:["麓","藝","赂","",0,"VK_OEM_2"],BracketLeft:["煤","/","梅","",0,"VK_OEM_4"],BracketRight:[")","(","脳","",0,"VK_OEM_6"],Backslash:["篓","'","陇","",0,"VK_OEM_5"],Semicolon:["暖",'"',"$","",0,"VK_OEM_1"],Quote:["搂","!","脽","",0,"VK_OEM_7"],Backquote:[";","掳","","",0,"VK_OEM_3"],Comma:[",","?","<","",0,"VK_OEM_COMMA"],Period:[".",":",">","",0,"VK_OEM_PERIOD"],Slash:["-","_","*","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},90288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000807",id:"",text:"Swiss German"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["z","Z","","",0,"VK_Z"],KeyZ:["y","Y","","",0,"VK_Y"],Digit1:["1","+","娄","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","*","#","",0,"VK_3"],Digit4:["4","莽","掳","",0,"VK_4"],Digit5:["5","%","搂","",0,"VK_5"],Digit6:["6","&","卢","",0,"VK_6"],Digit7:["7","/","|","",0,"VK_7"],Digit8:["8","(","垄","",0,"VK_8"],Digit9:["9",")","","",0,"VK_9"],Digit0:["0","=","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["'","?","麓","",0,"VK_OEM_4"],Equal:["^","`","~","",0,"VK_OEM_6"],BracketLeft:["眉","猫","[","",0,"VK_OEM_1"],BracketRight:["篓","!","]","",0,"VK_OEM_3"],Backslash:["$","拢","}","",0,"VK_OEM_8"],Semicolon:["枚","茅","","",0,"VK_OEM_7"],Quote:["盲","脿","{","",0,"VK_OEM_5"],Backquote:["搂","掳","","",0,"VK_OEM_2"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","\\","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},75422:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.German",lang:"de",localizedName:"German"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","鈥�",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","鈩�",0],KeyE:["e","E","鈧�","鈥�",0],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","脤",0],KeyH:["h","H","陋","脫",0],KeyI:["i","I","鈦�","脹",0],KeyJ:["j","J","潞","谋",0],KeyK:["k","K","鈭�","藛",0],KeyL:["l","L","@","铿�",0],KeyM:["m","M","碌","藰",0],KeyN:["n","N","~","鈥�",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","芦","禄",0],KeyR:["r","R","庐","赂",0],KeyS:["s","S","鈥�","脥",0],KeyT:["t","T","鈥�","藵",0],KeyU:["u","U","篓","脕",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","脵",0],KeyY:["z","Z","惟","藝",0],KeyZ:["y","Y","楼","鈥�",0],Digit1:["1","!","隆","卢",0],Digit2:["2",'"',"鈥�","鈥�",0],Digit3:["3","搂","露","#",0],Digit4:["4","$","垄","拢",0],Digit5:["5","%","[","铿�",0],Digit6:["6","&","]","^",8],Digit7:["7","/","|","\\",0],Digit8:["8","(","{","藴",0],Digit9:["9",")","}","路",0],Digit0:["0","=","鈮�","炉",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["脽","?","驴","藱",0],Equal:["麓","`","'","藲",3],BracketLeft:["眉","脺","鈥�","掳",0],BracketRight:["+","*","卤","铮�",0],Backslash:["#","'","鈥�","鈥�",0],Semicolon:["枚","脰","艙","艗",0],Quote:["盲","脛","忙","脝",0],Backquote:["<",">","鈮�","鈮�",0],Comma:[",",";","鈭�","藳",0],Period:[".",":","鈥�","梅",0],Slash:["-","_","鈥�","鈥�",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[",",",",".",".",0],IntlBackslash:["^","掳","鈥�","鈥�",1],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},11981:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{model:"pc104",layout:"de",variant:"",options:"",rules:"base"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","忙","脝",0],KeyB:["b","B","鈥�","鈥�",0],KeyC:["c","C","垄","漏",0],KeyD:["d","D","冒","脨",0],KeyE:["e","E","鈧�","鈧�",0],KeyF:["f","F","膽","陋",0],KeyG:["g","G","艐","艎",0],KeyH:["h","H","魔","摩",0],KeyI:["i","I","鈫�","谋",0],KeyJ:["j","J","蹋","虈",0],KeyK:["k","K","母","&",0],KeyL:["l","L","艂","艁",0],KeyM:["m","M","碌","潞",0],KeyN:["n","N","鈥�","鈥�",0],KeyO:["o","O","酶","脴",0],KeyP:["p","P","镁","脼",0],KeyQ:["q","Q","@","惟",0],KeyR:["r","R","露","庐",0],KeyS:["s","S","趴","岷�",0],KeyT:["t","T","脓","纽",0],KeyU:["u","U","鈫�","鈫�",0],KeyV:["v","V","鈥�","鈥�",0],KeyW:["w","W","艂","艁",0],KeyX:["x","X","芦","鈥�",0],KeyY:["z","Z","鈫�","楼",0],KeyZ:["y","Y","禄","鈥�",0],Digit1:["1","!","鹿","隆",0],Digit2:["2",'"',"虏","鈪�",0],Digit3:["3","搂","鲁","拢",0],Digit4:["4","$","录","陇",0],Digit5:["5","%","陆","鈪�",0],Digit6:["6","&","卢","鈪�",0],Digit7:["7","/","{","鈪�",0],Digit8:["8","(","[","鈩�",0],Digit9:["9",")","]","卤",0],Digit0:["0","=","}","掳",0],Enter:["\r","\r","\r","\r",0],Escape:["","","","",0],Backspace:["\b","\b","\b","\b",0],Tab:["\t","","\t","",0],Space:[" "," "," "," ",0],Minus:["脽","?","\\","驴",0],Equal:["虂","虁","抬","台",0],BracketLeft:["眉","脺","虉","虋",0],BracketRight:["+","*","~","炉",0],Backslash:["#","'","鈥�","虇",0],Semicolon:["枚","脰","虌","蹋",0],Quote:["盲","脛","虃","虒",0],Backquote:["虃","掳","鈥�","鈥�",0],Comma:[",",";","路","脳",0],Period:[".",":","鈥�","梅",0],Slash:["-","_","鈥�","鈥�",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:["","","","",0],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:["/","/","/","/",0],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:[],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["","1","","1",0],Numpad2:["","2","","2",0],Numpad3:["","3","","3",0],Numpad4:["","4","","4",0],Numpad5:["","5","","5",0],Numpad6:["","6","","6",0],Numpad7:["","7","","7",0],Numpad8:["","8","","8",0],Numpad9:["","9","","9",0],Numpad0:["","0","","0",0],NumpadDecimal:["",",","",",",0],IntlBackslash:["<",">","|","瘫",0],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Open:[],Help:[],Select:[],Again:[],Undo:[],Cut:[],Copy:[],Paste:[],Find:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],Lang5:[],NumpadParenLeft:[],NumpadParenRight:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:["\r","\r","\r","\r",0],MetaRight:[".",".",".",".",0],BrightnessUp:[],BrightnessDown:[],MediaPlay:[],MediaRecord:[],MediaFastForward:[],MediaRewind:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],SelectTask:[],LaunchScreenSaver:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[],MailReply:[],MailForward:[],MailSend:[]}})},51462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000407",id:"",text:"German"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","碌","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","@","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["z","Z","","",0,"VK_Z"],KeyZ:["y","Y","","",0,"VK_Y"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"虏","",0,"VK_2"],Digit3:["3","搂","鲁","",0,"VK_3"],Digit4:["4","$","","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["脽","?","\\","岷�",0,"VK_OEM_4"],Equal:["麓","`","","",0,"VK_OEM_6"],BracketLeft:["眉","脺","","",0,"VK_OEM_1"],BracketRight:["+","*","~","",0,"VK_OEM_PLUS"],Backslash:["#","'","","",0,"VK_OEM_2"],Semicolon:["枚","脰","","",0,"VK_OEM_3"],Quote:["盲","脛","","",0,"VK_OEM_7"],Backquote:["^","掳","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","|","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},49665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000406",id:"",text:"Danish"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","碌","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","#","拢","",0,"VK_3"],Digit4:["4","陇","$","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["+","?","","",0,"VK_OEM_PLUS"],Equal:["麓","`","|","",0,"VK_OEM_4"],BracketLeft:["氓","脜","","",0,"VK_OEM_6"],BracketRight:["篓","^","~","",0,"VK_OEM_1"],Backslash:["'","*","","",0,"VK_OEM_2"],Semicolon:["忙","脝","","",0,"VK_OEM_3"],Quote:["酶","脴","","",0,"VK_OEM_7"],Backquote:["陆","搂","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","\\","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},66997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.Dvorak",localizedName:"Dvorak",lang:"en"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["x","X","鈮�","藳",0],KeyC:["j","J","鈭�","脭",0],KeyD:["e","E","麓","麓",4],KeyE:[".",">","鈮�","藰",0],KeyF:["u","U","篓","篓",4],KeyG:["i","I","藛","藛",4],KeyH:["d","D","鈭�","脦",0],KeyI:["c","C","莽","脟",0],KeyJ:["h","H","藱","脫",0],KeyK:["t","T","鈥�","藝",0],KeyL:["n","N","藴","藴",4],KeyM:["m","M","碌","脗",0],KeyN:["b","B","鈭�","谋",0],KeyO:["r","R","庐","鈥�",0],KeyP:["l","L","卢","脪",0],KeyQ:["'",'"',"忙","脝",0],KeyR:["p","P","蟺","鈭�",0],KeyS:["o","O","酶","脴",0],KeyT:["y","Y","楼","脕",0],KeyU:["g","G","漏","藵",0],KeyV:["k","K","藲","铮�",0],KeyW:[",","<","鈮�","炉",0],KeyX:["q","Q","艙","艗",0],KeyY:["f","F","茠","脧",0],KeyZ:[";",":","鈥�","脷",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","^","搂","铿�",0],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["[","{","鈥�","鈥�",0],Equal:["]","}","鈥�","鈥�",0],BracketLeft:["/","?","梅","驴",0],BracketRight:["=","+","鈮�","卤",0],Backslash:["\\","|","芦","禄",0],Semicolon:["s","S","脽","脥",0],Quote:["-","_","鈥�","鈥�",0],Backquote:["`","~","`","`",4],Comma:["w","W","鈭�","鈥�",0],Period:["v","V","鈭�","鈼�",0],Slash:["z","Z","惟","赂",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},33523:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000813",id:"",text:"Belgian (Period)"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["q","Q","","",0,"VK_Q"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:[",","?","","",0,"VK_OEM_COMMA"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["a","A","","",0,"VK_A"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["z","Z","","",0,"VK_Z"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["w","W","","",0,"VK_W"],Digit1:["&","1","|","",0,"VK_1"],Digit2:["茅","2","@","",0,"VK_2"],Digit3:['"',"3","#","",0,"VK_3"],Digit4:["'","4","{","",0,"VK_4"],Digit5:["(","5","[","",0,"VK_5"],Digit6:["搂","6","^","",0,"VK_6"],Digit7:["猫","7","","",0,"VK_7"],Digit8:["!","8","","",0,"VK_8"],Digit9:["莽","9","{","",0,"VK_9"],Digit0:["脿","0","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:[")","掳","","",0,"VK_OEM_4"],Equal:["-","_","","",0,"VK_OEM_MINUS"],BracketLeft:["^","篓","[","",0,"VK_OEM_6"],BracketRight:["$","*","]","",0,"VK_OEM_1"],Backslash:["碌","拢","`","`",0,"VK_OEM_5"],Semicolon:["m","M","","",0,"VK_M"],Quote:["霉","%","麓","麓",0,"VK_OEM_3"],Backquote:["虏","鲁","","",0,"VK_OEM_7"],Comma:[";",".","","",0,"VK_OEM_PERIOD"],Period:[":","/","","",0,"VK_OEM_2"],Slash:["=","+","~","~",0,"VK_OEM_PLUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","\\","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},26200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.USExtended",lang:"en",localizedName:"ABC - Extended"},secondaryLayouts:[],mapping:{KeyA:["a","A","炉","虅",4],KeyB:["b","B","藰","虇",4],KeyC:["c","C","赂","抬",4],KeyD:["d","D","冒","脨",0],KeyE:["e","E","麓","虂",4],KeyF:["f","F","茠","",0],KeyG:["g","G","漏","鈥�",8],KeyH:["h","H","藣","瘫",4],KeyI:["i","I","始","虥",4],KeyJ:["j","J","藵","虌",4],KeyK:["k","K","藲","虋",4],KeyL:["l","L","-","痰",4],KeyM:["m","M","藳","台",4],KeyN:["n","N","藴","虄",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P",",","苔",4],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","",0],KeyT:["t","T","镁","脼",0],KeyU:["u","U","篓","虉",4],KeyV:["v","V","藝","虒",4],KeyW:["w","W","藱","虈",4],KeyX:["x","X",".","蹋",4],KeyY:["y","Y","楼","",0],KeyZ:["z","Z","藔","虊",4],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","搂","鈥�",0],Digit6:["6","^","藛","虃",4],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","鈩�",8],Quote:["'",'"',"忙","脝",0],Backquote:["`","~","`","虁",4],Comma:[",","<","鈮�","鈥�",0],Period:[".",">","鈮�","蕯",8],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},46797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00004009",id:"",text:"India"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","膩","膧",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","岣�","岣�",0,"VK_D"],KeyE:["e","E","膿","膾",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","峁�","峁�",0,"VK_G"],KeyH:["h","H","岣�","岣�",0,"VK_H"],KeyI:["i","I","墨","莫",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","l胎","L胎",0,"VK_L"],KeyM:["m","M","峁�","峁€",0,"VK_M"],KeyN:["n","N","峁�","峁�",0,"VK_N"],KeyO:["o","O","艒","艑",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","忙","脝",0,"VK_Q"],KeyR:["r","R","r胎","R胎",0,"VK_R"],KeyS:["s","S","艣","艢",0,"VK_S"],KeyT:["t","T","峁�","峁�",0,"VK_T"],KeyU:["u","U","奴","弄",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","峁�","峁�",0,"VK_X"],KeyY:["y","Y","帽","脩",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2","@","","",0,"VK_2"],Digit3:["3","#","","",0,"VK_3"],Digit4:["4","$","鈧�","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","^","","藛",0,"VK_6"],Digit7:["7","&","","",0,"VK_7"],Digit8:["8","*","","",0,"VK_8"],Digit9:["9","(","","藰",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","-","藣",0,"VK_OEM_MINUS"],Equal:["=","+","","",0,"VK_OEM_PLUS"],BracketLeft:["[","{","","",0,"VK_OEM_4"],BracketRight:["]","}","","",0,"VK_OEM_6"],Backslash:["\\","|","","",0,"VK_OEM_5"],Semicolon:[";",":","","",0,"VK_OEM_1"],Quote:["'",'"',"","",0,"VK_OEM_7"],Backquote:["`","~","","~",0,"VK_OEM_3"],Comma:[",","<",",","<",0,"VK_OEM_COMMA"],Period:[".",">",".","",0,"VK_OEM_PERIOD"],Slash:["/","?","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.USInternational-PC",lang:"en",localizedName:"U.S. International - PC"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","麓",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","藵",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","藛","藛",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","脗",0],KeyN:["n","N","藴","藴",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","藝",0],KeyU:["u","U","篓","篓",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","藳",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","赂",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","藛","搂","铿�",2],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"忙","脝",3],Backquote:["`","藴","`","`",7],Comma:[",","<","鈮�","炉",0],Period:[".",">","鈮�","藰",0],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},96073:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00020409",id:"0001",text:"United States-International"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","谩","脕",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","漏","垄",0,"VK_C"],KeyD:["d","D","冒","脨",0,"VK_D"],KeyE:["e","E","茅","脡",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","铆","脥",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","酶","脴",0,"VK_L"],KeyM:["m","M","碌","",0,"VK_M"],KeyN:["n","N","帽","脩",0,"VK_N"],KeyO:["o","O","贸","脫",0,"VK_O"],KeyP:["p","P","枚","脰",0,"VK_P"],KeyQ:["q","Q","盲","脛",0,"VK_Q"],KeyR:["r","R","庐","",0,"VK_R"],KeyS:["s","S","脽","搂",0,"VK_S"],KeyT:["t","T","镁","脼",0,"VK_T"],KeyU:["u","U","煤","脷",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","氓","脜",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","眉","脺",0,"VK_Y"],KeyZ:["z","Z","忙","脝",0,"VK_Z"],Digit1:["1","!","隆","鹿",0,"VK_1"],Digit2:["2","@","虏","",0,"VK_2"],Digit3:["3","#","鲁","",0,"VK_3"],Digit4:["4","$","陇","拢",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","^","录","",0,"VK_6"],Digit7:["7","&","陆","",0,"VK_7"],Digit8:["8","*","戮","",0,"VK_8"],Digit9:["9","(","鈥�","",0,"VK_9"],Digit0:["0",")","鈥�","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","楼","",0,"VK_OEM_MINUS"],Equal:["=","+","脳","梅",0,"VK_OEM_PLUS"],BracketLeft:["[","{","芦","",0,"VK_OEM_4"],BracketRight:["]","}","禄","",0,"VK_OEM_6"],Backslash:["\\","|","卢","娄",0,"VK_OEM_5"],Semicolon:[";",":","露","掳",0,"VK_OEM_1"],Quote:["'",'"',"麓","篓",0,"VK_OEM_7"],Backquote:["`","~","","",0,"VK_OEM_3"],Comma:[",","<","莽","脟",0,"VK_OEM_COMMA"],Period:[".",">","","",0,"VK_OEM_PERIOD"],Slash:["/","?","驴","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},49745:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.British",lang:"en",localizedName:"British"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","鈥�",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","脤",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","^","脠",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","藴",0],KeyN:["n","N","~","藛",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","脗",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","脢",0],KeyU:["u","U","篓","脣",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","脵",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","脹",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈧�","鈩�",0],Digit3:["3","拢","#","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","^","搂","铿�",0],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"忙","脝",0],Backquote:["`","~","`","鸥",4],Comma:[",","<","鈮�","炉",0],Period:[".",">","鈮�","藰",0],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","","",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},32926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000809",id:"",text:"United Kingdom"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","谩","脕",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","茅","脡",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","铆","脥",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","贸","脫",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","煤","脷",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"","",0,"VK_2"],Digit3:["3","拢","","",0,"VK_3"],Digit4:["4","$","鈧�","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","^","","",0,"VK_6"],Digit7:["7","&","","",0,"VK_7"],Digit8:["8","*","","",0,"VK_8"],Digit9:["9","(","","",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","","",0,"VK_OEM_MINUS"],Equal:["=","+","","",0,"VK_OEM_PLUS"],BracketLeft:["[","{","","",0,"VK_OEM_4"],BracketRight:["]","}","","",0,"VK_OEM_6"],Backslash:["#","~","\\","|",0,"VK_OEM_7"],Semicolon:[";",":","","",0,"VK_OEM_1"],Quote:["'","@","","",0,"VK_OEM_3"],Backquote:["`","卢","娄","",0,"VK_OEM_8"],Comma:[",","<","","",0,"VK_OEM_COMMA"],Period:[".",">","","",0,"VK_OEM_PERIOD"],Slash:["/","?","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_5"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},45938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.US",lang:"en",localizedName:"U.S.",isUSStandard:!0},secondaryLayouts:[{id:"com.apple.keylayout.ABC",lang:"en",localizedName:"ABC"},{id:"com.sogou.inputmethod.sogou.pinyin",lang:"zh-Hans",localizedName:"Pinyin - Simplified"},{id:"com.apple.inputmethod.Kotoeri.Roman",lang:"en",localizedName:"Romaji"},{id:"com.apple.inputmethod.Kotoeri.Japanese",lang:"ja",localizedName:"Hiragana"},{id:"com.apple.keylayout.Australian",lang:"en",localizedName:"Australian"},{id:"com.apple.keylayout.Canadian",lang:"en",localizedName:"Canadian English"},{id:"com.apple.keylayout.Brazilian",lang:"pt",localizedName:"Brazilian"}],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","麓",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","藵",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","藛","藛",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","脗",0],KeyN:["n","N","藴","藴",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","藝",0],KeyU:["u","U","篓","篓",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","藳",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","赂",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","^","搂","铿�",0],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"忙","脝",0],Backquote:["`","~","`","`",4],Comma:[",","<","鈮�","炉",0],Period:[".",">","鈮�","藰",0],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},40984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{model:"pc105",layout:"us",variant:"",options:"",rules:"evdev",isUSStandard:!0},secondaryLayouts:[{model:"pc105",layout:"cn",variant:"",options:"",rules:"evdev"}],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","a","A",0],KeyB:["b","B","b","B",0],KeyC:["c","C","c","C",0],KeyD:["d","D","d","D",0],KeyE:["e","E","e","E",0],KeyF:["f","F","f","F",0],KeyG:["g","G","g","G",0],KeyH:["h","H","h","H",0],KeyI:["i","I","i","I",0],KeyJ:["j","J","j","J",0],KeyK:["k","K","k","K",0],KeyL:["l","L","l","L",0],KeyM:["m","M","m","M",0],KeyN:["n","N","n","N",0],KeyO:["o","O","o","O",0],KeyP:["p","P","p","P",0],KeyQ:["q","Q","q","Q",0],KeyR:["r","R","r","R",0],KeyS:["s","S","s","S",0],KeyT:["t","T","t","T",0],KeyU:["u","U","u","U",0],KeyV:["v","V","v","V",0],KeyW:["w","W","w","W",0],KeyX:["x","X","x","X",0],KeyY:["y","Y","y","Y",0],KeyZ:["z","Z","z","Z",0],Digit1:["1","!","1","!",0],Digit2:["2","@","2","@",0],Digit3:["3","#","3","#",0],Digit4:["4","$","4","$",0],Digit5:["5","%","5","%",0],Digit6:["6","^","6","^",0],Digit7:["7","&","7","&",0],Digit8:["8","*","8","*",0],Digit9:["9","(","9","(",0],Digit0:["0",")","0",")",0],Enter:["\r","\r","\r","\r",0],Escape:["","","","",0],Backspace:["\b","\b","\b","\b",0],Tab:["\t","","\t","",0],Space:[" "," "," "," ",0],Minus:["-","_","-","_",0],Equal:["=","+","=","+",0],BracketLeft:["[","{","[","{",0],BracketRight:["]","}","]","}",0],Backslash:["\\","|","\\","|",0],Semicolon:[";",":",";",":",0],Quote:["'",'"',"'",'"',0],Backquote:["`","~","`","~",0],Comma:[",","<",",","<",0],Period:[".",">",".",">",0],Slash:["/","?","/","?",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:["","","","",0],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:["\r","\r","\r","\r",0],Numpad1:["","1","","1",0],Numpad2:["","2","","2",0],Numpad3:["","3","","3",0],Numpad4:["","4","","4",0],Numpad5:["","5","","5",0],Numpad6:["","6","","6",0],Numpad7:["","7","","7",0],Numpad8:["","8","","8",0],Numpad9:["","9","","9",0],Numpad0:["","0","","0",0],NumpadDecimal:["",".","",".",0],IntlBackslash:["<",">","|","娄",0],ContextMenu:[],Power:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Open:[],Help:[],Select:[],Again:[],Undo:[],Cut:[],Copy:[],Paste:[],Find:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[".",".",".",".",0],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],Lang5:[],NumpadParenLeft:["(","(","(","(",0],NumpadParenRight:[")",")",")",")",0],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],BrightnessUp:[],BrightnessDown:[],MediaPlay:[],MediaRecord:[],MediaFastForward:[],MediaRewind:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],SelectTask:[],LaunchScreenSaver:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[],MailReply:[],MailForward:[],MailSend:[]}})},41320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000409",id:"",text:"US",isUSStandard:!0},secondaryLayouts:[{name:"00000804",id:"",text:"Chinese (Simplified) - US Keyboard"},{name:"00000411",id:"",text:"Japanese"},{name:"00000412",id:"",text:"Korean"},{name:"00000404",id:"",text:"Chinese (Traditional) - US Keyboard"}],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2","@","","",0,"VK_2"],Digit3:["3","#","","",0,"VK_3"],Digit4:["4","$","","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","^","","",0,"VK_6"],Digit7:["7","&","","",0,"VK_7"],Digit8:["8","*","","",0,"VK_8"],Digit9:["9","(","","",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","","",0,"VK_OEM_MINUS"],Equal:["=","+","","",0,"VK_OEM_PLUS"],BracketLeft:["[","{","","",0,"VK_OEM_4"],BracketRight:["]","}","","",0,"VK_OEM_6"],Backslash:["\\","|","","",0,"VK_OEM_5"],Semicolon:[";",":","","",0,"VK_OEM_1"],Quote:["'",'"',"","",0,"VK_OEM_7"],Backquote:["`","~","","",0,"VK_OEM_3"],Comma:[",","<","","",0,"VK_OEM_COMMA"],Period:[".",">","","",0,"VK_OEM_PERIOD"],Slash:["/","?","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},40109:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000080A",id:"",text:"Latin American"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","@","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"","",0,"VK_2"],Digit3:["3","#","","",0,"VK_3"],Digit4:["4","$","","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","","",0,"VK_7"],Digit8:["8","(","","",0,"VK_8"],Digit9:["9",")","","",0,"VK_9"],Digit0:["0","=","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["'","?","\\","",0,"VK_OEM_4"],Equal:["驴","隆","","",0,"VK_OEM_6"],BracketLeft:["麓","篓","","",0,"VK_OEM_1"],BracketRight:["+","*","~","",0,"VK_OEM_PLUS"],Backslash:["}","]","`","",0,"VK_OEM_2"],Semicolon:["帽","脩","","",0,"VK_OEM_3"],Quote:["{","[","^","",0,"VK_OEM_7"],Backquote:["|","掳","卢","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},39883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.Spanish-ISO",lang:"es",localizedName:"Spanish - ISO"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","脽","",0],KeyC:["c","C","漏"," ",0],KeyD:["d","D","鈭�","鈭�",0],KeyE:["e","E","鈧�","鈧�",0],KeyF:["f","F","茠","铿�",0],KeyG:["g","G","铮�","铿�",0],KeyH:["h","H","鈩�"," ",0],KeyI:["i","I"," "," ",0],KeyJ:["j","J","露","炉",0],KeyK:["k","K","搂","藝",0],KeyL:["l","L"," ","藰",0],KeyM:["m","M","碌","藲",0],KeyN:["n","N"," ","藱",0],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐"," ",0],KeyS:["s","S","鈭�"," ",0],KeyT:["t","T","鈥�","鈥�",0],KeyU:["u","U"," "," ",0],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","忙","脝",0],KeyX:["x","X","鈭�","鈥�",0],KeyY:["y","Y","楼"," ",0],KeyZ:["z","Z","惟","鈥�",0],Digit1:["1","!","|","谋",0],Digit2:["2",'"',"@","藵",0],Digit3:["3","路","#","鈥�",0],Digit4:["4","$","垄","拢",0],Digit5:["5","%","鈭�","鈥�",0],Digit6:["6","&","卢"," ",0],Digit7:["7","/","梅","鈦�",0],Digit8:["8","(","鈥�","鈥�",0],Digit9:["9",")","鈥�","鈥�",0],Digit0:["0","=","鈮�","鈮�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["'","?","麓","赂",0],Equal:["隆","驴","鈥�","藳",0],BracketLeft:["`","^","[","藛",3],BracketRight:["+","*","]","卤",0],Backslash:["莽","脟","}","禄",0],Semicolon:["帽","脩","~","藴",4],Quote:["麓","篓","{","芦",3],Backquote:["<",">","鈮�","鈮�",0],Comma:[",",";","鈥�","",0],Period:[".",":","鈥�","鈥�",0],Slash:["-","_","鈥�","鈥�",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[",",",",",",",",0],IntlBackslash:["潞","陋","\\","掳",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},72226:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{model:"pc105",layout:"es",variant:"",options:"",rules:"evdev"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","忙","脝",0],KeyB:["b","B","鈥�","鈥�",0],KeyC:["c","C","垄","漏",0],KeyD:["d","D","冒","脨",0],KeyE:["e","E","鈧�","垄",0],KeyF:["f","F","膽","陋",0],KeyG:["g","G","艐","艎",0],KeyH:["h","H","魔","摩",0],KeyI:["i","I","鈫�","谋",0],KeyJ:["j","J","虊","虥",0],KeyK:["k","K","母","&",0],KeyL:["l","L","艂","艁",0],KeyM:["m","M","碌","潞",0],KeyN:["n","N","n","N",0],KeyO:["o","O","酶","脴",0],KeyP:["p","P","镁","脼",0],KeyQ:["q","Q","@","惟",0],KeyR:["r","R","露","庐",0],KeyS:["s","S","脽","搂",0],KeyT:["t","T","脓","纽",0],KeyU:["u","U","鈫�","鈫�",0],KeyV:["v","V","鈥�","鈥�",0],KeyW:["w","W","艂","艁",0],KeyX:["x","X","禄",">",0],KeyY:["y","Y","鈫�","楼",0],KeyZ:["z","Z","芦","<",0],Digit1:["1","!","|","隆",0],Digit2:["2",'"',"@","鈪�",0],Digit3:["3","路","#","拢",0],Digit4:["4","$","~","$",0],Digit5:["5","%","陆","鈪�",0],Digit6:["6","&","卢","鈪�",0],Digit7:["7","/","{","鈪�",0],Digit8:["8","(","[","鈩�",0],Digit9:["9",")","]","卤",0],Digit0:["0","=","}","掳",0],Enter:["\r","\r","\r","\r",0],Escape:["","","","",0],Backspace:["\b","\b","\b","\b",0],Tab:["\t","","\t","",0],Space:[" "," "," "," ",0],Minus:["'","?","\\","驴",0],Equal:["隆","驴","虄","~",0],BracketLeft:["虁","虃","[","虋",0],BracketRight:["+","*","]","虅",0],Backslash:["莽","脟","}","虇",0],Semicolon:["帽","脩","~","虌",0],Quote:["虂","虉","{","{",0],Backquote:["潞","陋","\\","\\",0],Comma:[",",";","鈹€","脳",0],Period:[".",":","路","梅",0],Slash:["-","_","蹋","虈",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:["","","","",0],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:["\r","\r","\r","\r",0],Numpad1:["","1","","1",0],Numpad2:["","2","","2",0],Numpad3:["","3","","3",0],Numpad4:["","4","","4",0],Numpad5:["","5","","5",0],Numpad6:["","6","","6",0],Numpad7:["","7","","7",0],Numpad8:["","8","","8",0],Numpad9:["","9","","9",0],Numpad0:["","0","","0",0],NumpadDecimal:["",".","",".",0],IntlBackslash:["<",">","|","娄",0],ContextMenu:[],Power:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Open:[],Help:[],Select:[],Again:[],Undo:[],Cut:[],Copy:[],Paste:[],Find:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[".",".",".",".",0],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],Lang5:[],NumpadParenLeft:["(","(","(","(",0],NumpadParenRight:[")",")",")",")",0],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],BrightnessUp:[],BrightnessDown:[],MediaPlay:[],MediaRecord:[],MediaFastForward:[],MediaRewind:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],SelectTask:[],LaunchScreenSaver:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[],MailReply:[],MailForward:[],MailSend:[]}})},52877:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000040A",id:"",text:"Spanish"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","|","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","路","#","",0,"VK_3"],Digit4:["4","$","~","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","卢","",0,"VK_6"],Digit7:["7","/","","",0,"VK_7"],Digit8:["8","(","","",0,"VK_8"],Digit9:["9",")","","",0,"VK_9"],Digit0:["0","=","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["'","?","","",0,"VK_OEM_4"],Equal:["隆","驴","","",0,"VK_OEM_6"],BracketLeft:["`","^","[","",0,"VK_OEM_1"],BracketRight:["+","*","]","",0,"VK_OEM_PLUS"],Backslash:["莽","脟","}","",0,"VK_OEM_2"],Semicolon:["帽","脩","","",0,"VK_OEM_3"],Quote:["麓","篓","{","",0,"VK_OEM_7"],Backquote:["潞","陋","\\","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},82687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.French",lang:"fr",localizedName:"French"},secondaryLayouts:[],mapping:{KeyA:["q","Q","鈥�","惟",0],KeyB:["b","B","脽","鈭�",0],KeyC:["c","C","漏","垄",0],KeyD:["d","D","鈭�","鈭�",0],KeyE:["e","E","锚","脢",0],KeyF:["f","F","茠","路",0],KeyG:["g","G","铿�","铿�",0],KeyH:["h","H","脤","脦",0],KeyI:["i","I","卯","茂",0],KeyJ:["j","J","脧","脥",0],KeyK:["k","K","脠","脣",0],KeyL:["l","L","卢","|",0],KeyM:[",","?","鈭�","驴",0],KeyN:["n","N","~","谋",4],KeyO:["o","O","艙","艗",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["a","A","忙","脝",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脪","鈭�",0],KeyT:["t","T","鈥�","鈩�",0],KeyU:["u","U","潞","陋",0],KeyV:["v","V","鈼�","鈭�",0],KeyW:["z","Z","脗","脜",0],KeyX:["x","X","鈮�","鈦�",0],KeyY:["y","Y","脷","鸥",0],KeyZ:["w","W","鈥�","鈥�",0],Digit1:["&","1","铮�","麓",8],Digit2:["茅","2","毛","鈥�",0],Digit3:['"',"3","鈥�","鈥�",0],Digit4:["'","4","鈥�","鈥�",0],Digit5:["(","5","{","[",0],Digit6:["搂","6","露","氓",0],Digit7:["猫","7","芦","禄",0],Digit8:["!","8","隆","脹",0],Digit9:["莽","9","脟","脕",0],Digit0:["脿","0","酶","脴",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:[")","掳","}","]",0],Equal:["-","_","鈥�","鈥�",0],BracketLeft:["^","篓","么","脭",3],BracketRight:["$","*","鈧�","楼",0],Backslash:["`","拢","@","#",1],Semicolon:["m","M","碌","脫",0],Quote:["霉","%","脵","鈥�",0],Backquote:["<",">","鈮�","鈮�",0],Comma:[";",".","鈥�","鈥�",0],Period:[":","/","梅","\\",0],Slash:["=","+","鈮�","卤",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[",",".",",",".",0],IntlBackslash:["@","#","鈥�","鸥",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},21023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{model:"pc104",layout:"fr",variant:"",options:"",rules:"base"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["q","Q","@","惟",0],KeyB:["b","B","鈥�","鈥�",0],KeyC:["c","C","垄","漏",0],KeyD:["d","D","冒","脨",0],KeyE:["e","E","鈧�","垄",0],KeyF:["f","F","膽","陋",0],KeyG:["g","G","艐","艎",0],KeyH:["h","H","魔","摩",0],KeyI:["i","I","鈫�","谋",0],KeyJ:["j","J","虊","虥",0],KeyK:["k","K","母","&",0],KeyL:["l","L","艂","艁",0],KeyM:[",","?","虂","虌",0],KeyN:["n","N","n","N",0],KeyO:["o","O","酶","脴",0],KeyP:["p","P","镁","脼",0],KeyQ:["a","A","忙","脝",0],KeyR:["r","R","露","庐",0],KeyS:["s","S","脽","搂",0],KeyT:["t","T","脓","纽",0],KeyU:["u","U","鈫�","鈫�",0],KeyV:["v","V","鈥�","鈥�",0],KeyW:["z","Z","芦","<",0],KeyX:["x","X","禄",">",0],KeyY:["y","Y","鈫�","楼",0],KeyZ:["w","W","艂","艁",0],Digit1:["&","1","鹿","隆",0],Digit2:["茅","2","~","鈪�",0],Digit3:['"',"3","#","拢",0],Digit4:["'","4","{","$",0],Digit5:["(","5","[","鈪�",0],Digit6:["-","6","|","鈪�",0],Digit7:["猫","7","`","鈪�",0],Digit8:["_","8","\\","鈩�",0],Digit9:["莽","9","^","卤",0],Digit0:["脿","0","@","掳",0],Enter:["\r","\r","\r","\r",0],Escape:["","","","",0],Backspace:["\b","\b","\b","\b",0],Tab:["\t","","\t","",0],Space:[" "," "," "," ",0],Minus:[")","掳","]","驴",0],Equal:["=","+","}","台",0],BracketLeft:["虃","虉","虉","虋",0],BracketRight:["$","拢","陇","虅",0],Backslash:["*","碌","虁","虇",0],Semicolon:["m","M","碌","潞",0],Quote:["霉","%","虃","虒",0],Backquote:["虏","~","卢","卢",0],Comma:[";",".","鈹€","脳",0],Period:[":","/","路","梅",0],Slash:["!","搂","蹋","虈",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:["","","","",0],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:["/","/","/","/",0],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:[],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["","1","","1",0],Numpad2:["","2","","2",0],Numpad3:["","3","","3",0],Numpad4:["","4","","4",0],Numpad5:["","5","","5",0],Numpad6:["","6","","6",0],Numpad7:["","7","","7",0],Numpad8:["","8","","8",0],Numpad9:["","9","","9",0],Numpad0:["","0","","0",0],NumpadDecimal:["",".","",".",0],IntlBackslash:["<",">","|","娄",0],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Open:[],Help:[],Select:[],Again:[],Undo:[],Cut:[],Copy:[],Paste:[],Find:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],Lang5:[],NumpadParenLeft:[],NumpadParenRight:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:["\r","\r","\r","\r",0],MetaRight:[".",".",".",".",0],BrightnessUp:[],BrightnessDown:[],MediaPlay:[],MediaRecord:[],MediaFastForward:[],MediaRewind:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],SelectTask:[],LaunchScreenSaver:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[],MailReply:[],MailForward:[],MailSend:[]}})},95499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000040C",id:"",text:"French"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["q","Q","","",0,"VK_Q"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:[",","?","","",0,"VK_OEM_COMMA"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["a","A","","",0,"VK_A"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["z","Z","","",0,"VK_Z"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["w","W","","",0,"VK_W"],Digit1:["&","1","","",0,"VK_1"],Digit2:["茅","2","~","",0,"VK_2"],Digit3:['"',"3","#","",0,"VK_3"],Digit4:["'","4","{","",0,"VK_4"],Digit5:["(","5","[","",0,"VK_5"],Digit6:["-","6","|","",0,"VK_6"],Digit7:["猫","7","`","",0,"VK_7"],Digit8:["_","8","\\","",0,"VK_8"],Digit9:["莽","9","^","",0,"VK_9"],Digit0:["脿","0","@","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:[")","掳","]","",0,"VK_OEM_4"],Equal:["=","+","}","",0,"VK_OEM_PLUS"],BracketLeft:["^","篓","","",0,"VK_OEM_6"],BracketRight:["$","拢","陇","",0,"VK_OEM_1"],Backslash:["*","碌","","",0,"VK_OEM_5"],Semicolon:["m","M","","",0,"VK_M"],Quote:["霉","%","","",0,"VK_OEM_3"],Backquote:["虏","","","",0,"VK_OEM_7"],Comma:[";",".","","",0,"VK_OEM_PERIOD"],Period:[":","/","","",0,"VK_OEM_2"],Slash:["!","搂","","",0,"VK_OEM_8"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},63918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000040E",id:"",text:"Hungarian"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","盲","",0,"VK_A"],KeyB:["b","B","{","",0,"VK_B"],KeyC:["c","C","&","",0,"VK_C"],KeyD:["d","D","膼","",0,"VK_D"],KeyE:["e","E","脛","",0,"VK_E"],KeyF:["f","F","[","",0,"VK_F"],KeyG:["g","G","]","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","脥","",0,"VK_I"],KeyJ:["j","J","铆","",0,"VK_J"],KeyK:["k","K","艂","",0,"VK_K"],KeyL:["l","L","艁","",0,"VK_L"],KeyM:["m","M","<","",0,"VK_M"],KeyN:["n","N","}","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","\\","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","膽","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","鈧�","",0,"VK_U"],KeyV:["v","V","@","",0,"VK_V"],KeyW:["w","W","|","",0,"VK_W"],KeyX:["x","X","#","",0,"VK_X"],KeyY:["z","Z","","",0,"VK_Z"],KeyZ:["y","Y",">","",0,"VK_Y"],Digit1:["1","'","~","",0,"VK_1"],Digit2:["2",'"',"藝","",0,"VK_2"],Digit3:["3","+","^","",0,"VK_3"],Digit4:["4","!","藰","",0,"VK_4"],Digit5:["5","%","掳","",0,"VK_5"],Digit6:["6","/","藳","",0,"VK_6"],Digit7:["7","=","`","",0,"VK_7"],Digit8:["8","(","藱","",0,"VK_8"],Digit9:["9",")","麓","",0,"VK_9"],Digit0:["枚","脰","藵","",0,"VK_OEM_3"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["眉","脺","篓","",0,"VK_OEM_2"],Equal:["贸","脫","赂","",0,"VK_OEM_PLUS"],BracketLeft:["艖","艕","梅","",0,"VK_OEM_4"],BracketRight:["煤","脷","脳","",0,"VK_OEM_6"],Backslash:["疟","虐","陇","",0,"VK_OEM_5"],Semicolon:["茅","脡","$","",0,"VK_OEM_1"],Quote:["谩","脕","脽","",0,"VK_OEM_7"],Backquote:["0","搂","","",0,"VK_0"],Comma:[",","?",";","",0,"VK_OEM_COMMA"],Period:[".",":",">","",0,"VK_OEM_PERIOD"],Slash:["-","_","*","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["铆","脥","<","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},91036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.Italian-Pro",lang:"it",localizedName:"Italian"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","脥",0],KeyC:["c","C","漏","脕",0],KeyD:["d","D","鈭�","藰",0],KeyE:["e","E","鈧�","脠",0],KeyF:["f","F","茠","藱",0],KeyG:["g","G","鈭�","藲",0],KeyH:["h","H","鈭�","赂",0],KeyI:["i","I","艙","艗",0],KeyJ:["j","J","陋","藵",0],KeyK:["k","K","潞","藳",0],KeyL:["l","L","卢","藝",0],KeyM:["m","M","碌","脷",0],KeyN:["n","N","藴","脫",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","鈥�","鈥�",0],KeyR:["r","R","庐","脤",0],KeyS:["s","S","脽","炉",0],KeyT:["t","T","鈩�","脪",0],KeyU:["u","U","篓","脵",4],KeyV:["v","V","鈭�","脡",0],KeyW:["w","W","惟","脌",0],KeyX:["x","X","鈥�","鈥�",0],KeyY:["y","Y","忙","脝",0],KeyZ:["z","Z","鈭�"," ",0],Digit1:["1","!","芦","禄",0],Digit2:["2",'"',"鈥�","鈥�",0],Digit3:["3","拢","鈥�","鈥�",0],Digit4:["4","$","楼","垄",0],Digit5:["5","%","~","鈥�",0],Digit6:["6","&","鈥�","鈥�",0],Digit7:["7","/","梅","鈦�",0],Digit8:["8","(","麓","铮�",4],Digit9:["9",")","`"," ",4],Digit0:["0","=","鈮�","鈮�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["'","?","隆","驴",0],Equal:["矛","^","藛","卤",4],BracketLeft:["猫","茅","[","{",0],BracketRight:["+","*","]","}",0],Backslash:["霉","搂","露","鈼�",0],Semicolon:["貌","莽","@","脟",0],Quote:["脿","掳","#","鈭�",0],Backquote:["<",">","鈮�","鈮�",0],Comma:[",",";","鈥�"," ",0],Period:[".",":","鈥�","路",0],Slash:["-","_","鈥�","鈥�",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[",",".",",",".",0],IntlBackslash:["\\","|","`","谋",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},40568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000410",id:"",text:"Italian"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"","",0,"VK_2"],Digit3:["3","拢","","",0,"VK_3"],Digit4:["4","$","","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","","",0,"VK_7"],Digit8:["8","(","","",0,"VK_8"],Digit9:["9",")","","",0,"VK_9"],Digit0:["0","=","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["'","?","","",0,"VK_OEM_4"],Equal:["矛","^","","",0,"VK_OEM_6"],BracketLeft:["猫","茅","[","{",0,"VK_OEM_1"],BracketRight:["+","*","]","}",0,"VK_OEM_PLUS"],Backslash:["霉","搂","","",0,"VK_OEM_2"],Semicolon:["貌","莽","@","",0,"VK_OEM_3"],Quote:["脿","掳","#","",0,"VK_OEM_7"],Backquote:["\\","|","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},69991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.google.inputmethod.Japanese.Roman",lang:"en",localizedName:"Alphanumeric (Google)"},secondaryLayouts:[],mapping:{KeyA:["a","A","炉","虅",4],KeyB:["b","B","藰","虇",4],KeyC:["c","C","赂","抬",4],KeyD:["d","D","冒","脨",0],KeyE:["e","E","麓","虂",4],KeyF:["f","F","茠","",0],KeyG:["g","G","漏","鈥�",8],KeyH:["h","H","藣","瘫",4],KeyI:["i","I","始","虥",4],KeyJ:["j","J","藵","虌",4],KeyK:["k","K","藲","虋",4],KeyL:["l","L","-","痰",4],KeyM:["m","M","藳","台",4],KeyN:["n","N","藴","虄",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P",",","苔",4],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","",0],KeyT:["t","T","镁","脼",0],KeyU:["u","U","篓","虉",4],KeyV:["v","V","藝","虒",4],KeyW:["w","W","藱","虈",4],KeyX:["x","X",".","蹋",4],KeyY:["y","Y","楼","",0],KeyZ:["z","Z","藔","虊",4],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","搂","鈥�",0],Digit6:["6","^","藛","虃",4],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","鈩�",8],Quote:["'",'"',"忙","脝",0],Backquote:["`","~","`","虁",4],Comma:[",","<","鈮�","鈥�",0],Period:[".",">","鈮�","蕯",8],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},85134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.inputmethod.Kotoeri.Japanese",lang:"ja",localizedName:"Hiragana"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","麓",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","藵",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","藛","藛",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","脗",0],KeyN:["n","N","藴","藴",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","藝",0],KeyU:["u","U","篓","篓",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","藳",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","赂",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","^","搂","铿�",0],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"忙","脝",0],Backquote:["`","~","`","`",4],Comma:[",","<","鈮�","炉",0],Period:[".",">","鈮�","藰",0],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},90313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.inputmethod.Korean.2SetKorean",lang:"ko",localizedName:"2-Set Korean"},secondaryLayouts:[],mapping:{KeyA:["銋�","銋�","a","A",0],KeyB:["銋�","銋�","b","B",0],KeyC:["銋�","銋�","c","C",0],KeyD:["銋�","銋�","d","D",0],KeyE:["銊�","銊�","e","E",0],KeyF:["銊�","銊�","f","F",0],KeyG:["銋�","銋�","g","G",0],KeyH:["銋�","銋�","h","H",0],KeyI:["銋�","銋�","i","I",0],KeyJ:["銋�","銋�","j","J",0],KeyK:["銋�","銋�","k","K",0],KeyL:["銋�","銋�","l","L",0],KeyM:["銋�","銋�","m","M",0],KeyN:["銋�","銋�","n","N",0],KeyO:["銋�","銋�","o","O",0],KeyP:["銋�","銋�","p","P",0],KeyQ:["銋�","銋�","q","Q",0],KeyR:["銊�","銊�","r","R",0],KeyS:["銊�","銊�","s","S",0],KeyT:["銋�","銋�","t","T",0],KeyU:["銋�","銋�","u","U",0],KeyV:["銋�","銋�","v","V",0],KeyW:["銋�","銋�","w","W",0],KeyX:["銋�","銋�","x","X",0],KeyY:["銋�","銋�","y","Y",0],KeyZ:["銋�","銋�","z","Z",0],Digit1:["1","!","1","!",0],Digit2:["2","@","2","@",0],Digit3:["3","#","3","#",0],Digit4:["4","$","4","$",0],Digit5:["5","%","5","%",0],Digit6:["6","^","6","^",0],Digit7:["7","&","7","&",0],Digit8:["8","*","8","*",0],Digit9:["9","(","9","(",0],Digit0:["0",")","0",")",0],Enter:[],Escape:["","","","鈥�",0],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","-","_",0],Equal:["=","+","=","+",0],BracketLeft:["[","{","[","{",0],BracketRight:["]","}","]","}",0],Backslash:["\\","|","\\","|",0],Semicolon:[";",":",";",":",0],Quote:["'",'"',"'",'"',0],Backquote:["鈧�","~","`","~",0],Comma:[",","<",",","<",0],Period:[".",">",".",">",0],Slash:["/","?","/","?",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},52766:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requireRegister=void 0;t.requireRegister=()=>{n(45938),n(89247),n(49745),n(39883),n(69991),n(75422),n(939),n(26200),n(82687),n(85134),n(85910),n(91036),n(55185),n(53940),n(90313),n(66997)}},36319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardLayoutContribution=t.requireRegister=void 0;const i=n(90642),r=n(52766),o=n(40071),a=n(6496);t.requireRegister=i.isWindows?a.requireRegister:i.isOSX?r.requireRegister:o.requireRegister;var s=n(41470);Object.defineProperty(t,"KeyboardLayoutContribution",{enumerable:!0,get:function(){return s.KeyboardLayoutContribution}})},40071:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requireRegister=void 0;t.requireRegister=()=>{n(40984),n(72226),n(11981),n(21023),n(11237)}},6496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requireRegister=void 0;t.requireRegister=()=>{n(41320),n(40109),n(46797),n(51462),n(32926),n(95499),n(5824),n(52877),n(96073),n(31885),n(42254),n(40568),n(70910),n(96592),n(27787),n(49665),n(92638),n(69290),n(63918),n(90288),n(33523),n(84883)}},92638:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000414",id:"",text:"Norwegian"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","碌","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","#","拢","",0,"VK_3"],Digit4:["4","陇","$","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["+","?","","",0,"VK_OEM_PLUS"],Equal:["\\","`","麓","",0,"VK_OEM_4"],BracketLeft:["氓","脜","","",0,"VK_OEM_6"],BracketRight:["篓","^","~","",0,"VK_OEM_1"],Backslash:["'","*","","",0,"VK_OEM_2"],Semicolon:["酶","脴","","",0,"VK_OEM_3"],Quote:["忙","脝","","",0,"VK_OEM_7"],Backquote:["|","搂","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},85910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.PolishPro",lang:"pl",localizedName:"Polish - Pro"},secondaryLayouts:[],mapping:{KeyA:["a","A","膮","膭",0],KeyB:["b","B","募","疟",0],KeyC:["c","C","膰","膯",0],KeyD:["d","D","鈭�","沤",0],KeyE:["e","E","臋","臉",0],KeyF:["f","F","艅","啪",0],KeyG:["g","G","漏","弄",0],KeyH:["h","H","姆","脫",0],KeyI:["i","I","^","钮",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","呕","奴",0],KeyL:["l","L","艂","艁",0],KeyM:["m","M","亩","懦",0],KeyN:["n","N","艅","艃",0],KeyO:["o","O","贸","脫",0],KeyP:["p","P","幕","艂",0],KeyQ:["q","Q","艑","艖",0],KeyR:["r","R","庐","拢",0],KeyS:["s","S","艣","艢",0],KeyT:["t","T","鈥�","艣",0],KeyU:["u","U","篓","扭",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","藕","殴",0],KeyY:["y","Y","墨","脕",0],KeyZ:["z","Z","偶","呕",0],Digit1:["1","!","艃","艜",0],Digit2:["2","@","鈩�","艠",0],Digit3:["3","#","鈧�","鈥�",0],Digit4:["4","$","脽","鈥�",0],Digit5:["5","%","寞","艡",0],Digit6:["6","^","搂","艝",0],Digit7:["7","&","露","艞",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","慕","艩",0],Digit0:["0",")","木","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","莫",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"暮","模",0],Backquote:["`","~","`","艛",4],Comma:[",","<","鈮�","脻",0],Period:[".",">","鈮�","媒",0],Slash:["/","?","梅","艈",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","拢","卢","卢",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},42254:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000415",id:"",text:"Polish (Programmers)"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","膮","膭",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","膰","膯",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","臋","臉",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","艂","艁",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","艅","艃",0,"VK_N"],KeyO:["o","O","贸","脫",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","艣","艢",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","鈧�","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","藕","殴",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","偶","呕",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2","@","","",0,"VK_2"],Digit3:["3","#","","",0,"VK_3"],Digit4:["4","$","","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6","^","","",0,"VK_6"],Digit7:["7","&","","",0,"VK_7"],Digit8:["8","*","","",0,"VK_8"],Digit9:["9","(","","",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","","",0,"VK_OEM_MINUS"],Equal:["=","+","","",0,"VK_OEM_PLUS"],BracketLeft:["[","{","","",0,"VK_OEM_4"],BracketRight:["]","}","","",0,"VK_OEM_6"],Backslash:["\\","|","","",0,"VK_OEM_5"],Semicolon:[";",":","","",0,"VK_OEM_1"],Quote:["'",'"',"","",0,"VK_OEM_7"],Backquote:["`","~","","",0,"VK_OEM_3"],Comma:[",","<","","",0,"VK_OEM_COMMA"],Period:[".",">","","",0,"VK_OEM_PERIOD"],Slash:["/","?","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},5824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000416",id:"",text:"Portuguese (Brazilian ABNT)"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","鈧�","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","掳","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","/","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","?","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","鹿","",0,"VK_1"],Digit2:["2","@","虏","",0,"VK_2"],Digit3:["3","#","鲁","",0,"VK_3"],Digit4:["4","$","拢","",0,"VK_4"],Digit5:["5","%","垄","",0,"VK_5"],Digit6:["6","篓","卢","",0,"VK_6"],Digit7:["7","&","","",0,"VK_7"],Digit8:["8","*","","",0,"VK_8"],Digit9:["9","(","","",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","","",0,"VK_OEM_MINUS"],Equal:["=","+","搂","",0,"VK_OEM_PLUS"],BracketLeft:["麓","`","","",0,"VK_OEM_4"],BracketRight:["[","{","陋","",0,"VK_OEM_6"],Backslash:["]","}","潞","",0,"VK_OEM_5"],Semicolon:["莽","脟","","",0,"VK_OEM_1"],Quote:["~","^","","",0,"VK_OEM_7"],Backquote:["'",'"',"","",0,"VK_OEM_3"],Comma:[",","<","","",0,"VK_OEM_COMMA"],Period:[".",">","","",0,"VK_OEM_PERIOD"],Slash:[";",":","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","|","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[".",".","","",0,"VK_ABNT_C2"],IntlRo:["/","?","掳","",0,"VK_ABNT_C1"],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},53940:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.Brazilian-Pro",lang:"pt"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","麓",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","藵",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","藛","藛",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","脗",0],KeyN:["n","N","藴","藴",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","藝",0],KeyU:["u","U","篓","篓",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","藳",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","赂",0],Digit1:["1","!","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","$","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","藛","搂","铿�",2],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","(","陋","路",0],Digit0:["0",")","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["[","{","鈥�","鈥�",0],BracketRight:["]","}","鈥�","鈥�",0],Backslash:["\\","|","芦","禄",0],Semicolon:[";",":","鈥�","脷",0],Quote:["'",'"',"忙","脝",3],Backquote:["`","藴","`","`",7],Comma:[",","<","鈮�","炉",0],Period:[".",">","鈮�","藰",0],Slash:["/","?","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},27787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000816",id:"",text:"Portuguese"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","#","拢","",0,"VK_3"],Digit4:["4","$","搂","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["'","?","","",0,"VK_OEM_4"],Equal:["芦","禄","","",0,"VK_OEM_6"],BracketLeft:["+","*","篓","",0,"VK_OEM_PLUS"],BracketRight:["麓","`","]","",0,"VK_OEM_1"],Backslash:["~","^","","",0,"VK_OEM_2"],Semicolon:["莽","脟","","",0,"VK_OEM_3"],Quote:["潞","陋","","",0,"VK_OEM_7"],Backquote:["\\","|","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},55185:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.keylayout.Russian",lang:"ru",localizedName:"Russian"},secondaryLayouts:[],mapping:{KeyA:["褎","肖","茠","茠",0],KeyB:["懈","袠","懈","袠",0],KeyC:["褋","小","鈮�","鈮�",0],KeyD:["胁","袙","褯","袐",0],KeyE:["褍","校","褱","袑",0],KeyF:["邪","袗","梅","梅",0],KeyG:["锌","袩","漏","漏",0],KeyH:["褉","袪","鈧�","鈧�",0],KeyI:["褕","楔","褧","袇",0],KeyJ:["芯","袨","掳","鈥�",0],KeyK:["谢","袥","褭","袎",0],KeyL:["写","袛","鈭�","鈭�",0],KeyM:["褜","鞋","~","~",0],KeyN:["褌","孝","鈩�","鈩�",0],KeyO:["褖","些","褳","袔",0],KeyP:["蟹","袟","鈥�","鈥�",0],KeyQ:["泄","袡","褬","袌",0],KeyR:["泻","袣","庐","庐",0],KeyS:["褘","蝎","褘","蝎",0],KeyT:["械","袝","鈥�","鈥�",0],KeyU:["谐","袚","褤","袃",0],KeyV:["屑","袦","碌","碌",0],KeyW:["褑","笑","褵","袕",0],KeyX:["褔","效","鈮�","鈮�",0],KeyY:["薪","袧","褮","袏",0],KeyZ:["褟","携","褣","袀",0],Digit1:["1","!","!","|",0],Digit2:["2",'"',"@",'"',0],Digit3:["3","鈩�","#","拢",0],Digit4:["4","%","$","鈧�",0],Digit5:["5",":","%","鈭�",0],Digit6:["6",",","^","卢",0],Digit7:["7",".","&","露",0],Digit8:["8",";","*","鈭�",0],Digit9:["9","(","{","'",0],Digit0:["0",")","}","`",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","_","鈥�","鈥�",0],Equal:["=","+","禄","芦",0],BracketLeft:["褏","啸","鈥�","鈥�",0],BracketRight:["褗","歇","褗","歇",0],Backslash:["褢","衼","褢","衼",0],Semicolon:["卸","袞","鈥�","鈥�",0],Quote:["褝","协","褝","协",0],Backquote:["]","[","]","[",0],Comma:["斜","袘","鈮�","<",0],Period:["褞","挟","鈮�",">",0],Slash:["/","?","鈥�","鈥�",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[",",".",",",",",0],IntlBackslash:[">","<","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},11237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{model:"pc104",layout:"ru",variant:",",options:"",rules:"base"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["褎","肖","褎","肖",0],KeyB:["懈","袠","懈","袠",0],KeyC:["褋","小","褋","小",0],KeyD:["胁","袙","胁","袙",0],KeyE:["褍","校","褍","校",0],KeyF:["邪","袗","邪","袗",0],KeyG:["锌","袩","锌","袩",0],KeyH:["褉","袪","褉","袪",0],KeyI:["褕","楔","褕","楔",0],KeyJ:["芯","袨","芯","袨",0],KeyK:["谢","袥","谢","袥",0],KeyL:["写","袛","写","袛",0],KeyM:["褜","鞋","褜","鞋",0],KeyN:["褌","孝","褌","孝",0],KeyO:["褖","些","褖","些",0],KeyP:["蟹","袟","蟹","袟",0],KeyQ:["泄","袡","泄","袡",0],KeyR:["泻","袣","泻","袣",0],KeyS:["褘","蝎","褘","蝎",0],KeyT:["械","袝","械","袝",0],KeyU:["谐","袚","谐","袚",0],KeyV:["屑","袦","屑","袦",0],KeyW:["褑","笑","褑","笑",0],KeyX:["褔","效","褔","效",0],KeyY:["薪","袧","薪","袧",0],KeyZ:["褟","携","褟","携",0],Digit1:["1","!","1","!",0],Digit2:["2",'"',"2",'"',0],Digit3:["3","鈩�","3","鈩�",0],Digit4:["4",";","4",";",0],Digit5:["5","%","5","%",0],Digit6:["6",":","6",":",0],Digit7:["7","?","7","?",0],Digit8:["8","*","鈧�","",0],Digit9:["9","(","9","(",0],Digit0:["0",")","0",")",0],Enter:["\r","\r","\r","\r",0],Escape:["","","","",0],Backspace:["\b","\b","\b","\b",0],Tab:["\t","","\t","",0],Space:[" "," "," "," ",0],Minus:["-","_","-","_",0],Equal:["=","+","=","+",0],BracketLeft:["褏","啸","褏","啸",0],BracketRight:["褗","歇","褗","歇",0],Backslash:["\\","/","\\","/",0],Semicolon:["卸","袞","卸","袞",0],Quote:["褝","协","褝","协",0],Backquote:["褢","衼","褢","衼",0],Comma:["斜","袘","斜","袘",0],Period:["褞","挟","褞","挟",0],Slash:[".",",",".",",",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:["","","","",0],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:["/","/","/","/",0],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:[],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["","1","","1",0],Numpad2:["","2","","2",0],Numpad3:["","3","","3",0],Numpad4:["","4","","4",0],Numpad5:["","5","","5",0],Numpad6:["","6","","6",0],Numpad7:["","7","","7",0],Numpad8:["","8","","8",0],Numpad9:["","9","","9",0],Numpad0:["","0","","0",0],NumpadDecimal:["",",","",",",0],IntlBackslash:["/","|","|","娄",0],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Open:[],Help:[],Select:[],Again:[],Undo:[],Cut:[],Copy:[],Paste:[],Find:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],Lang5:[],NumpadParenLeft:[],NumpadParenRight:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:["\r","\r","\r","\r",0],MetaRight:[".",".",".",".",0],BrightnessUp:[],BrightnessDown:[],MediaPlay:[],MediaRecord:[],MediaFastForward:[],MediaRewind:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],SelectTask:[],LaunchScreenSaver:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[],MailReply:[],MailForward:[],MailSend:[]}})},31885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"00000419",id:"",text:"Russian"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["褎","肖","","",0,"VK_A"],KeyB:["懈","袠","","",0,"VK_B"],KeyC:["褋","小","","",0,"VK_C"],KeyD:["胁","袙","","",0,"VK_D"],KeyE:["褍","校","","",0,"VK_E"],KeyF:["邪","袗","","",0,"VK_F"],KeyG:["锌","袩","","",0,"VK_G"],KeyH:["褉","袪","","",0,"VK_H"],KeyI:["褕","楔","","",0,"VK_I"],KeyJ:["芯","袨","","",0,"VK_J"],KeyK:["谢","袥","","",0,"VK_K"],KeyL:["写","袛","","",0,"VK_L"],KeyM:["褜","鞋","","",0,"VK_M"],KeyN:["褌","孝","","",0,"VK_N"],KeyO:["褖","些","","",0,"VK_O"],KeyP:["蟹","袟","","",0,"VK_P"],KeyQ:["泄","袡","","",0,"VK_Q"],KeyR:["泻","袣","","",0,"VK_R"],KeyS:["褘","蝎","","",0,"VK_S"],KeyT:["械","袝","","",0,"VK_T"],KeyU:["谐","袚","","",0,"VK_U"],KeyV:["屑","袦","","",0,"VK_V"],KeyW:["褑","笑","","",0,"VK_W"],KeyX:["褔","效","","",0,"VK_X"],KeyY:["薪","袧","","",0,"VK_Y"],KeyZ:["褟","携","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"","",0,"VK_2"],Digit3:["3","鈩�","","",0,"VK_3"],Digit4:["4",";","","",0,"VK_4"],Digit5:["5","%","","",0,"VK_5"],Digit6:["6",":","","",0,"VK_6"],Digit7:["7","?","","",0,"VK_7"],Digit8:["8","*","鈧�","",0,"VK_8"],Digit9:["9","(","","",0,"VK_9"],Digit0:["0",")","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["-","_","","",0,"VK_OEM_MINUS"],Equal:["=","+","","",0,"VK_OEM_PLUS"],BracketLeft:["褏","啸","","",0,"VK_OEM_4"],BracketRight:["褗","歇","","",0,"VK_OEM_6"],Backslash:["\\","/","","",0,"VK_OEM_5"],Semicolon:["卸","袞","","",0,"VK_OEM_1"],Quote:["褝","协","","",0,"VK_OEM_7"],Backquote:["褢","衼","","",0,"VK_OEM_3"],Comma:["斜","袘","","",0,"VK_OEM_COMMA"],Period:["褞","挟","","",0,"VK_OEM_PERIOD"],Slash:[".",",","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["\\","/","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},70910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000041D",id:"",text:"Swedish"},secondaryLayouts:[{name:"0000040B",id:"",text:"Finnish"}],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","","",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["i","I","","",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","碌","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","","",0,"VK_S"],KeyT:["t","T","","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!","","",0,"VK_1"],Digit2:["2",'"',"@","",0,"VK_2"],Digit3:["3","#","拢","",0,"VK_3"],Digit4:["4","陇","$","",0,"VK_4"],Digit5:["5","%","鈧�","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["+","?","\\","",0,"VK_OEM_PLUS"],Equal:["麓","`","","",0,"VK_OEM_4"],BracketLeft:["氓","脜","","",0,"VK_OEM_6"],BracketRight:["篓","^","~","",0,"VK_OEM_1"],Backslash:["'","*","","",0,"VK_OEM_2"],Semicolon:["枚","脰","","",0,"VK_OEM_3"],Quote:["盲","脛","","",0,"VK_OEM_7"],Backquote:["搂","陆","","",0,"VK_OEM_5"],Comma:[",",";","","",0,"VK_OEM_COMMA"],Period:[".",":","","",0,"VK_OEM_PERIOD"],Slash:["-","_","","",0,"VK_OEM_MINUS"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","|","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},69290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000041E",id:"",text:"Thai Kedmanee"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["喔�","喔�","","",0,"VK_A"],KeyB:["喔�","喔�","","",0,"VK_B"],KeyC:["喙�","喔�","","",0,"VK_C"],KeyD:["喔�","喔�","","",0,"VK_D"],KeyE:["喔�","喔�","","",0,"VK_E"],KeyF:["喔�","喙�","","",0,"VK_F"],KeyG:["喙€","喔�","","",0,"VK_G"],KeyH:["喙�","喙�","","",0,"VK_H"],KeyI:["喔�","喔�","","",0,"VK_I"],KeyJ:["喙�","喙�","","",0,"VK_J"],KeyK:["喔�","喔�","","",0,"VK_K"],KeyL:["喔�","喔�","","",0,"VK_L"],KeyM:["喔�","?","","",0,"VK_M"],KeyN:["喔�","喙�","","",0,"VK_N"],KeyO:["喔�","喔�","","",0,"VK_O"],KeyP:["喔�","喔�","","",0,"VK_P"],KeyQ:["喙�","喙�","","",0,"VK_Q"],KeyR:["喔�","喔�","","",0,"VK_R"],KeyS:["喔�","喔�","","",0,"VK_S"],KeyT:["喔�","喔�","","",0,"VK_T"],KeyU:["喔�","喙�","","",0,"VK_U"],KeyV:["喔�","喔�","","",0,"VK_V"],KeyW:["喙�",'"',"","",0,"VK_W"],KeyX:["喔�",")","","",0,"VK_X"],KeyY:["喔�","喙�","","",0,"VK_Y"],KeyZ:["喔�","(","","",0,"VK_Z"],Digit1:["喙�","+","","",0,"VK_1"],Digit2:["/","喙�","","",0,"VK_2"],Digit3:["-","喙�","","",0,"VK_3"],Digit4:["喔�","喙�","","",0,"VK_4"],Digit5:["喔�","喙�","","",0,"VK_5"],Digit6:["喔�","喔�","","",0,"VK_6"],Digit7:["喔�","喔�","","",0,"VK_7"],Digit8:["喔�","喙�","","",0,"VK_8"],Digit9:["喔�","喙�","","",0,"VK_9"],Digit0:["喔�","喙�","","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["喔�","喙�","","",0,"VK_OEM_MINUS"],Equal:["喔�","喙�","","",0,"VK_OEM_PLUS"],BracketLeft:["喔�","喔�","","",0,"VK_OEM_4"],BracketRight:["喔�",",","","",0,"VK_OEM_6"],Backslash:["喔�","喔�","","",0,"VK_OEM_5"],Semicolon:["喔�","喔�","","",0,"VK_OEM_1"],Quote:["喔�",".","","",0,"VK_OEM_7"],Backquote:["_","%","","",0,"VK_OEM_3"],Comma:["喔�","喔�","","",0,"VK_OEM_COMMA"],Period:["喙�","喔�","","",0,"VK_OEM_PERIOD"],Slash:["喔�","喔�","","",0,"VK_OEM_2"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["喔�","喔�","","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},96592:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{name:"0000041F",id:"",text:"Turkish Q"},secondaryLayouts:[],mapping:{Sleep:[],WakeUp:[],KeyA:["a","A","忙","脝",0,"VK_A"],KeyB:["b","B","","",0,"VK_B"],KeyC:["c","C","","",0,"VK_C"],KeyD:["d","D","","",0,"VK_D"],KeyE:["e","E","鈧�","",0,"VK_E"],KeyF:["f","F","","",0,"VK_F"],KeyG:["g","G","","",0,"VK_G"],KeyH:["h","H","","",0,"VK_H"],KeyI:["谋","I","i","陌",0,"VK_I"],KeyJ:["j","J","","",0,"VK_J"],KeyK:["k","K","","",0,"VK_K"],KeyL:["l","L","","",0,"VK_L"],KeyM:["m","M","","",0,"VK_M"],KeyN:["n","N","","",0,"VK_N"],KeyO:["o","O","","",0,"VK_O"],KeyP:["p","P","","",0,"VK_P"],KeyQ:["q","Q","@","",0,"VK_Q"],KeyR:["r","R","","",0,"VK_R"],KeyS:["s","S","脽","",0,"VK_S"],KeyT:["t","T","鈧�","",0,"VK_T"],KeyU:["u","U","","",0,"VK_U"],KeyV:["v","V","","",0,"VK_V"],KeyW:["w","W","","",0,"VK_W"],KeyX:["x","X","","",0,"VK_X"],KeyY:["y","Y","","",0,"VK_Y"],KeyZ:["z","Z","","",0,"VK_Z"],Digit1:["1","!",">","",0,"VK_1"],Digit2:["2","'","拢","",0,"VK_2"],Digit3:["3","^","#","",0,"VK_3"],Digit4:["4","+","$","",0,"VK_4"],Digit5:["5","%","陆","",0,"VK_5"],Digit6:["6","&","","",0,"VK_6"],Digit7:["7","/","{","",0,"VK_7"],Digit8:["8","(","[","",0,"VK_8"],Digit9:["9",")","]","",0,"VK_9"],Digit0:["0","=","}","",0,"VK_0"],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," ","","",0,"VK_SPACE"],Minus:["*","?","\\","",0,"VK_OEM_8"],Equal:["-","_","|","",0,"VK_OEM_MINUS"],BracketLeft:["臒","臑","篓","",0,"VK_OEM_4"],BracketRight:["眉","脺","~","",0,"VK_OEM_6"],Backslash:[",",";","`","",0,"VK_OEM_COMMA"],Semicolon:["艧","艦","麓","",0,"VK_OEM_1"],Quote:["i","陌","","",0,"VK_OEM_7"],Backquote:['"',"茅","<","",0,"VK_OEM_3"],Comma:["枚","脰","","",0,"VK_OEM_2"],Period:["莽","脟","","",0,"VK_OEM_5"],Slash:[".",":","","",0,"VK_OEM_PERIOD"],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],PrintScreen:[],ScrollLock:[],Pause:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","","",0,"VK_DIVIDE"],NumpadMultiply:["*","*","","",0,"VK_MULTIPLY"],NumpadSubtract:["-","-","","",0,"VK_SUBTRACT"],NumpadAdd:["+","+","","",0,"VK_ADD"],NumpadEnter:[],Numpad1:[],Numpad2:[],Numpad3:[],Numpad4:[],Numpad5:[],Numpad6:[],Numpad7:[],Numpad8:[],Numpad9:[],Numpad0:[],NumpadDecimal:[],IntlBackslash:["<",">","|","",0,"VK_OEM_102"],ContextMenu:[],Power:[],NumpadEqual:[],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],F21:[],F22:[],F23:[],F24:[],Help:[],Undo:[],Cut:[],Copy:[],Paste:[],AudioVolumeMute:[],AudioVolumeUp:[],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],Convert:[],NonConvert:[],Lang1:[],Lang2:[],Lang3:[],Lang4:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[],MediaTrackNext:[],MediaTrackPrevious:[],MediaStop:[],Eject:[],MediaPlayPause:[],MediaSelect:[],LaunchMail:[],LaunchApp2:[],LaunchApp1:[],BrowserSearch:[],BrowserHome:[],BrowserBack:[],BrowserForward:[],BrowserStop:[],BrowserRefresh:[],BrowserFavorites:[]}})},89247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(41470).KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({layout:{id:"com.apple.inputmethod.SCIM.ITABC",lang:"zh-Hans",localizedName:"鎼滅嫍鎷奸煶"},secondaryLayouts:[],mapping:{KeyA:["a","A","氓","脜",0],KeyB:["b","B","鈭�","谋",0],KeyC:["c","C","莽","脟",0],KeyD:["d","D","鈭�","脦",0],KeyE:["e","E","麓","麓",4],KeyF:["f","F","茠","脧",0],KeyG:["g","G","漏","藵",0],KeyH:["h","H","藱","脫",0],KeyI:["i","I","藛","藛",4],KeyJ:["j","J","鈭�","脭",0],KeyK:["k","K","藲","铮�",0],KeyL:["l","L","卢","脪",0],KeyM:["m","M","碌","脗",0],KeyN:["n","N","藴","藴",4],KeyO:["o","O","酶","脴",0],KeyP:["p","P","蟺","鈭�",0],KeyQ:["q","Q","艙","艗",0],KeyR:["r","R","庐","鈥�",0],KeyS:["s","S","脽","脥",0],KeyT:["t","T","鈥�","藝",0],KeyU:["u","U","篓","篓",4],KeyV:["v","V","鈭�","鈼�",0],KeyW:["w","W","鈭�","鈥�",0],KeyX:["x","X","鈮�","藳",0],KeyY:["y","Y","楼","脕",0],KeyZ:["z","Z","惟","赂",0],Digit1:["1","锛�","隆","鈦�",0],Digit2:["2","@","鈩�","鈧�",0],Digit3:["3","#","拢","鈥�",0],Digit4:["4","楼","垄","鈥�",0],Digit5:["5","%","鈭�","铿�",0],Digit6:["6","","搂","铿�",0],Digit7:["7","&","露","鈥�",0],Digit8:["8","*","鈥�","掳",0],Digit9:["9","锛�","陋","路",0],Digit0:["0","锛�","潞","鈥�",0],Enter:[],Escape:[],Backspace:[],Tab:[],Space:[" "," "," "," ",0],Minus:["-","","鈥�","鈥�",0],Equal:["=","+","鈮�","卤",0],BracketLeft:["銆�","銆�","鈥�","鈥�",0],BracketRight:["銆�","銆�","鈥�","鈥�",0],Backslash:["銆�","|","芦","禄",0],Semicolon:["锛�","锛�","鈥�","脷",0],Quote:["'",'"',"忙","脝",0],Backquote:["路","锝�","`","`",4],Comma:["锛�","銆�","鈮�","炉",0],Period:["銆�","銆�","鈮�","藰",0],Slash:["/","锛�","梅","驴",0],CapsLock:[],F1:[],F2:[],F3:[],F4:[],F5:[],F6:[],F7:[],F8:[],F9:[],F10:[],F11:[],F12:[],Insert:[],Home:[],PageUp:[],Delete:[],End:[],PageDown:[],ArrowRight:[],ArrowLeft:[],ArrowDown:[],ArrowUp:[],NumLock:[],NumpadDivide:["/","/","/","/",0],NumpadMultiply:["*","*","*","*",0],NumpadSubtract:["-","-","-","-",0],NumpadAdd:["+","+","+","+",0],NumpadEnter:[],Numpad1:["1","1","1","1",0],Numpad2:["2","2","2","2",0],Numpad3:["3","3","3","3",0],Numpad4:["4","4","4","4",0],Numpad5:["5","5","5","5",0],Numpad6:["6","6","6","6",0],Numpad7:["7","7","7","7",0],Numpad8:["8","8","8","8",0],Numpad9:["9","9","9","9",0],Numpad0:["0","0","0","0",0],NumpadDecimal:[".",".",".",".",0],IntlBackslash:["搂","卤","搂","卤",0],ContextMenu:[],NumpadEqual:["=","=","=","=",0],F13:[],F14:[],F15:[],F16:[],F17:[],F18:[],F19:[],F20:[],AudioVolumeMute:[],AudioVolumeUp:["","=","","=",0],AudioVolumeDown:[],NumpadComma:[],IntlRo:[],KanaMode:[],IntlYen:[],ControlLeft:[],ShiftLeft:[],AltLeft:[],MetaLeft:[],ControlRight:[],ShiftRight:[],AltRight:[],MetaRight:[]}})},85294:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarRegistry=t.TabBarToolbarContribution=void 0;const i=n(70655),r=n(39993),o=n(57061);t.TabBarToolbarContribution=Symbol("TabBarToolbarContribution");let a=class{registerItem(e){if("string"==typeof e.command){const t=e.tooltip||e.label;t&&(e.command={id:e.command,label:t})}return this.menuRegistry.registerMenuItem(o.MenuId.ViewTitle,Object.assign(Object.assign({},e),{when:`${e.when?e.when+" && ":""}view == ${e.viewId}`,group:e.group||"navigation"}))}unregisterItem(e){this.menuRegistry.unregisterMenuItem(o.MenuId.ViewTitle,e)}};i.__decorate([(0,r.Autowired)(o.IMenuRegistry),i.__metadata("design:type",o.IMenuRegistry)],a.prototype,"menuRegistry",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.ToolbarRegistry=a},49242:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewContextKeyRegistry=void 0;const i=n(70655),r=n(39993),o=n(90642);let a=class{constructor(){this.contextKeyMap=new Map,this._onViewContextKeyServiceRegistered=new o.Emitter}getContextKeyService(e){return this.contextKeyMap.get(e)}registerContextKeyService(e,t){return this.contextKeyMap.set(e,t),this._onViewContextKeyServiceRegistered.fire(e),t}afterContextKeyServiceRegistered(e,t){if(this.contextKeyMap.has(e))t(this.getContextKeyService(e));else{const n=this._onViewContextKeyServiceRegistered.event((i=>{i===e&&(n.dispose(),t(this.getContextKeyService(e)))}))}}};a=i.__decorate([(0,r.Injectable)()],a),t.ViewContextKeyRegistry=a},67109:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LAYOUT_VIEW_SIZE=void 0,function(e){e.MENUBAR_HEIGHT=35,e.EDITOR_TABS_HEIGHT=35,e.BIG_SUR_TITLEBAR_HEIGHT=28,e.TITLEBAR_HEIGHT=35,e.PANEL_TITLEBAR_HEIGHT=35}(t.LAYOUT_VIEW_SIZE||(t.LAYOUT_VIEW_SIZE={}))},26149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useViewState=t.RenderedEvent=t.ResizeEvent=t.ResizePayload=t.ComponentContribution=t.ComponentRegistryImpl=t.ComponentRegistry=t.measurePriority=t.VisibleChangedEvent=t.VisibleChangedPayload=void 0;const i=n(70655),r=n(616),o=n(39993),a=n(90642),s=n(12059),c=n(71898);t.VisibleChangedPayload=class{constructor(e,t){this.isVisible=e,this.slotLocation=t}};class l extends a.BasicEvent{}t.VisibleChangedEvent=l,t.measurePriority=function(e,t){if(!e.length)return e.splice(0,0,t||0),0;let n=e.length-1;if(!t)return e.splice(n+1,0,0),n+1;for(;n>=0&&!(t-1)return void(0,a.getDebugLogger)().warn(`${i}浣嶇疆宸插瓨鍦�${e}妯″潡`);t.modules.push(e)}}getComponentRegistryInfo(e){return this.componentsMap.get(e)}};i.__decorate([(0,o.Autowired)(c.AppConfig),i.__metadata("design:type",Object)],d.prototype,"config",void 0),d=i.__decorate([(0,o.Injectable)()],d),t.ComponentRegistryImpl=d,t.ComponentContribution=Symbol("ComponentContribution");t.ResizePayload=class{constructor(e){this.slotLocation=e}};class u extends a.BasicEvent{}t.ResizeEvent=u;class p extends a.BasicEvent{}t.RenderedEvent=p;t.useViewState=(e,t,n)=>{const i=(0,s.useInjectable)(a.IEventBus),[o,c]=r.useState({width:0,height:0}),l=r.useRef(o);return r.useEffect((()=>{let r;const o=i.on(u,(i=>{n||i.payload.slotLocation!==e||(r&&window.cancelAnimationFrame(r),r=window.requestAnimationFrame((()=>{t.current&&t.current.clientHeight&&t.current.clientWidth&&c({height:t.current.clientHeight,width:t.current.clientWidth})})))}));return()=>{o.dispose()}}),[t.current]),r.useEffect((()=>{if(n&&t.current){const e=new(0,window.ResizeObserver)((e=>{const t=e[0].contentRect.width,n=e[0].contentRect.height;t===l.current.width&&n===l.current.height||0===t&&0===n||(c({width:t,height:n}),l.current={width:t,height:n})}));return e.observe(t.current),()=>{e.unobserve(t.current)}}}),[]),o},i.__exportStar(n(49242),t),i.__exportStar(n(85294),t)},69513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LAYOUT_STATE=t.LayoutState=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(39993),a=n(90642),s=n(83538);let c=class{constructor(){this.disposableCollection=new a.DisposableCollection,this.debounceSave=(0,r.default)(((e,t)=>{this.setStorageValue(e,t,l.isScoped(e)||this.saveLayoutWithWorkspace&&(l.isLayout(e)||l.isStatusBar(e)))}),60)}async initStorage(){this.layoutStorage=await this.getStorage(a.STORAGE_NAMESPACE.LAYOUT),this.globalLayoutStorage=await this.getStorage(a.STORAGE_NAMESPACE.GLOBAL_LAYOUT),await this.preferenceService.ready,this.saveLayoutWithWorkspace=this.preferenceService.get("view.saveLayoutWithWorkspace")||!1,this.disposableCollection.push(this.preferenceService.onPreferenceChanged((e=>{"view.saveLayoutWithWorkspace"===e.preferenceName&&(this.saveLayoutWithWorkspace=e.newValue)})))}getState(e,t){let n;try{n=this.saveLayoutWithWorkspace?l.isScoped(e)||l.isLayout(e)||l.isStatusBar(e)?this.layoutStorage.get(e,t):this.globalLayoutStorage.get(e,t):l.isScoped(e)?this.layoutStorage.get(e,t):this.globalLayoutStorage.get(e,t)}catch(e){this.logger.warn("Layout state parse error, use default state"),n=t}return n}setState(e,t){this.debounceSave(e,t)}setStorageValue(e,t,n){n?this.layoutStorage.set(e,t):this.globalLayoutStorage.set(e,t),l.isLayout(e)&&localStorage.setItem(e,JSON.stringify(t))}};var l;i.__decorate([(0,o.Autowired)(a.StorageProvider),i.__metadata("design:type",Function)],c.prototype,"getStorage",void 0),i.__decorate([(0,o.Autowired)(s.PreferenceService),i.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),i.__decorate([(0,o.Autowired)(a.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),c=i.__decorate([(0,o.Injectable)()],c),t.LayoutState=c,function(e){e.MAIN="layout",e.STATUSBAR="statusbar",e.getContainerSpace=function(e){return`view/${e}`},e.isScoped=function(e){return e.startsWith("view/")},e.isLayout=function(t){return t.startsWith(e.MAIN)},e.isStatusBar=function(t){return t.startsWith(e.STATUSBAR)},e.getTabbarSpace=function(e){return`tabbar/${e}`}}(l=t.LAYOUT_STATE||(t.LAYOUT_STATE={}))},19762:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.ILogger=void 0;const i=n(70655),r=n(39993),o=n(90642);var a=n(90642);Object.defineProperty(t,"ILogger",{enumerable:!0,get:function(){return a.ILogger}});let s=class{constructor(){this.logger=this.LoggerManager.getLogger(o.SupportLogNamespace.Browser)}getLevel(){return this.getLevel()}setLevel(e){return this.logger.setLevel(e)}error(...e){return this.logger.error(...e)}warn(...e){return this.logger.warn(...e)}log(...e){return this.logger.log(...e)}debug(...e){return this.logger.debug(...e)}verbose(...e){return this.logger.verbose(...e)}critical(...e){return this.logger.critical(...e)}dispose(){return this.logger.dispose()}};i.__decorate([(0,r.Autowired)(o.ILoggerManagerClient),i.__metadata("design:type",Object)],s.prototype,"LoggerManager",void 0),s=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],s),t.Logger=s},45060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(19762),t)},82277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toMarkdown=void 0;const i=n(70655),r=n(30970),o=i.__importStar(n(616)),a="data-command",s=e=>{const t=(0,o.useRef)(),{html:n,opener:i}=e;(0,o.useEffect)((()=>(t&&t.current&&t.current.addEventListener("click",r),()=>{t&&t.current&&t.current.removeEventListener("click",r)})),[]);const r=e=>{const t=e.target;if("a"===t.tagName.toLowerCase()&&t.hasAttribute(a)){const e=t.getAttribute(a);e&&i&&i.open(e)}};return o.default.createElement("div",{dangerouslySetInnerHTML:{__html:n},ref:t})};t.toMarkdown=(e,t)=>{const n=new r.marked.Renderer;return n.link=(e,t,n)=>`${n}`,"string"==typeof e?o.default.createElement(s,{opener:t,html:(0,r.marked)(e,{gfm:!0,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1,renderer:n})}):e}},12237:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MenuNode=t.isIComponentMenuItem=t.isISubmenuItem=t.isIMenuItem=t.MenuRegistryImpl=t.CoreMenuRegistryImpl=t.IMenuRegistry=t.NextMenuContribution=t.MenuContribution=void 0;const r=n(70655),o=r.__importDefault(n(59864)),a=n(39993),s=n(69198),c=n(90642),l=n(23266);t.MenuContribution=Symbol("MenuContribution"),t.NextMenuContribution=t.MenuContribution;t.IMenuRegistry=class{};let d=i=class{constructor(){this._menubarItems=new Map,this._onDidChangeMenubar=new c.Emitter,this.onDidChangeMenubar=this._onDidChangeMenubar.event,this._menuItems=new Map,this._menuExtendInfo=new Map,this._onDidChangeMenu=new c.Emitter,this.onDidChangeMenu=this._onDidChangeMenu.event,this._disabledMenuIds=new Set}registerMenubarItem(e,t){const n=Object.assign(Object.assign({},t),{id:e});return this._menubarItems.get(e)?(this.logger.warn(`this menuId ${e} already existed`),c.Disposable.NULL):(this._menubarItems.set(e,n),this._onDidChangeMenubar.fire(e),c.Disposable.create((()=>this.removeMenubarItem(e))))}removeMenubarItem(e){this._menubarItems.get(e)&&(this._menubarItems.delete(e),this._onDidChangeMenubar.fire(e))}getMenubarItem(e){return this._menubarItems.get(e)}getMenubarItems(){return Array.from(this._menubarItems.keys()).reduce(((e,t)=>{const n=this._menubarItems.get(t);return n&&e.push(n),e}),[])}registerMenuExtendInfo(e,t){return this._menuExtendInfo.set(e,t),c.Disposable.create((()=>this._menuExtendInfo.delete(e)))}registerMenuItem(e,t){let n=this._menuItems.get(e);return n?n.push(t):(n=[t],this._menuItems.set(e,n)),this._onDidChangeMenu.fire(e),c.Disposable.create((()=>{const i=n.indexOf(t);i>=0&&(n.splice(i,1),this._onDidChangeMenu.fire(e))}))}unregisterMenuItem(e,t){const n=this._menuItems.get(e);if(n){const i=n.findIndex((e=>{const n=e.command;return n?"string"==typeof n?n===t:n.id===t:e.submenu===t}));i>=0&&(n.splice(i,1),this._onDidChangeMenu.fire(e))}}registerMenuItems(e,t){const n=[];return t.forEach((t=>{n.push(this.registerMenuItem(e,t))})),(0,c.combinedDisposable)(n)}unregisterMenuId(e){return this._disabledMenuIds.add(e),this._onDidChangeMenu.fire(e),c.Disposable.create((()=>{this._disabledMenuIds.delete(e)&&this._onDidChangeMenu.fire(e)}))}getMenuItems(e){if(this._disabledMenuIds.has(e))return[];const t=(this._menuItems.get(e)||[]).slice(0).reduce(((t,n)=>(h(n)?i.EnableComponentMenuIds.includes(e)&&t.push(Object.assign(Object.assign({},n),{group:"navigation"})):t.push(n),t)),[]);return e===l.MenuId.CommandPalette&&this.appendImplicitMenuItems(t),this._menuExtendInfo.has(e)?this.convertToMenuExtendInfo(this._menuExtendInfo.get(e),t):t}getMenuCommand(e){return"string"==typeof e?{id:e}:e}appendImplicitMenuItems(e){const t=e.filter((e=>p(e))),n=new Set(t.map((e=>this.getMenuCommand(e.command).id)));this.commandRegistry.getCommands().forEach((t=>{n.has(t.id)||e.push({command:t.id})}))}convertToMenuExtendInfo(e,t){return t.map((t=>{if(!p(t))return t;const{command:n}=t,i=e.find((e=>e.command===n));return i?Object.assign(Object.assign({},t),i):t}))}};d.EnableComponentMenuIds=[l.MenuId.EditorTitle],r.__decorate([(0,a.Autowired)(t.MenuContribution),r.__metadata("design:type",Object)],d.prototype,"contributions",void 0),r.__decorate([(0,a.Autowired)(c.CommandRegistry),r.__metadata("design:type",Object)],d.prototype,"commandRegistry",void 0),r.__decorate([(0,a.Autowired)(c.ILogger),r.__metadata("design:type",Object)],d.prototype,"logger",void 0),d=i=r.__decorate([(0,a.Injectable)()],d),t.CoreMenuRegistryImpl=d;let u=class extends d{initialize(){for(const e of this.contributions.getContributions())e.registerNextMenus&&(e.registerNextMenus(this),(0,s.warning)(!1,"`registerNextMenus` was deprecated in favor of `registerMenus`")),e.registerMenus&&e.registerMenus(this)}};function p(e){return void 0!==e.command}function h(e){return o.default.isValidElementType(e.component)}r.__decorate([(0,a.Autowired)(t.MenuContribution),r.__metadata("design:type",Object)],u.prototype,"contributions",void 0),u=r.__decorate([(0,a.Injectable)()],u),t.MenuRegistryImpl=u,t.isIMenuItem=p,t.isISubmenuItem=function(e){return void 0!==e.submenu},t.isIComponentMenuItem=h;t.MenuNode=class{constructor(e){this.id=e.id,this.label=(0,c.replaceLocalizePlaceholder)(e.label),this.className=e.className||"",this.icon=e.icon||"",this.keybinding=e.keybinding||"",this.rawKeybinding=e.rawKeybinding||"",this.isKeyCombination=Boolean(e.isKeyCombination),this.disabled=Boolean(e.disabled),this.checked=Boolean(e.checked),this.nativeRole=e.nativeRole||"",this.type=e.type,this.extraDesc=e.extraDesc||"",this._actionCallback=e.execute}getExecuteArgs(...e){return e}execute(...e){const t=this.getExecuteArgs(e);return this._actionCallback?this._actionCallback(...t):Promise.resolve(!0)}}},87337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=t.ContextMenuServiceImpl=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(77887),s=n(68122);let c=class{createMenu(e){return this.injector.get(l,[e])}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],c.prototype,"injector",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.ContextMenuServiceImpl=c;let l=class extends o.Disposable{constructor(e){super(),this._onDidMenuChange=new o.Emitter,this._onMenuChange=new o.Emitter,this._menus=new Map,this._menuItems=[[],[]],this._menusListener=new Map,this._menuId=e.id,e.config&&(this.config=e.config),e.contextKeyService&&(this.contextKeyService=e.contextKeyService),this._build(),this.addDispose(o.Event.debounce(o.Event.filter(this.onMenuChange,(e=>e===this._menuId)),(()=>{}),50)(this._rebuildMenus,this)),this.addDispose(this._onDidMenuChange)}get onDidChange(){return this._onDidMenuChange.event}get onMenuChange(){return this._onMenuChange.event}get menuId(){return this._menuId}_build(){this._menuItems=[[],[]],this._buildMenus(this._menuId)}_rebuildMenus(){this._buildMenus(this._menuId),this._onDidMenuChange.fire(this._menuId)}_buildMenus(e){const t=this.menuService.createMenu(e,this.contextKeyService),n=this._menus.get(e);n&&(n.dispose(),this._menus.delete(e));const i=this._menusListener.get(e);i&&(i.dispose(),this._menusListener.delete(e)),this._menus.set(e,t),this._menusListener.set(e,t.onDidChange((()=>this._onMenuChange.fire(e)),this,this.disposables));const r=[[],[]];(0,a.generateCtxMenu)(Object.assign({menus:t},this.config)).forEach(((t,n)=>{this._traverseMenuItems(t,r[n],e)})),this._menuItems=r}_traverseMenuItems(e,t,n){e.forEach((e=>{if(e instanceof s.SubmenuItemNode){const i=[],r=e.item.submenu;if(!this._menus.has(r)){const e=this.registerDispose(this.menuService.createMenu(r,this.contextKeyService));this._menus.set(r,e),this.registerDispose(e.onDidChange((()=>{this._onMenuChange.fire(n)})))}const o=this.menuService.createMenu(r,this.contextKeyService),s=(0,a.generateMergedCtxMenu)(Object.assign({menus:o},this.config));this._traverseMenuItems(s,i,n),e.children=i,t.push(e),o.dispose()}else t.push(e)}))}dispose(){this._menusListener.forEach((e=>e.dispose())),this._menusListener.clear(),this._menus.forEach((e=>e.dispose())),this._menus.clear(),super.dispose()}getMergedMenuNodes(){return(0,a.mergeTupleMenuNodeResult)(this._menuItems)}getGroupedMenuNodes(){return this._menuItems}};i.__decorate([(0,r.Autowired)(s.AbstractMenuService),i.__metadata("design:type",s.AbstractMenuService)],l.prototype,"menuService",void 0),l=i.__decorate([(0,r.Injectable)(),i.__param(0,(0,r.Optional)()),i.__metadata("design:paramtypes",[Object])],l),t.ContextMenu=l},57061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(12237),t),i.__exportStar(n(56188),t),i.__exportStar(n(77887),t),i.__exportStar(n(23266),t),i.__exportStar(n(68122),t),i.__exportStar(n(87252),t),i.__exportStar(n(11866),t),i.__exportStar(n(50124),t),i.__exportStar(n(87337),t),i.__exportStar(n(75267),t)},23266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTabbarCommonMenuId=t.MenuId=void 0,function(e){e.AccountsContext="accounts/context",e.ActivityBarContext="activityBar/context",e.ActivityBarExtra="activityBar/extra",e.CommandPalette="commandPalette",e.DebugBreakpointsContext="debug/breakpoints/context",e.DebugCallStackContext="debug/callstack/context",e.DebugConsoleContext="debug/console/context",e.DebugVariablesContext="debug/variables/context",e.DebugWatchContext="debug/watch/context",e.DebugToolBar="debug/toolbar",e.EditorContext="editor/context",e.EditorTitle="editor/title",e.EditorTitleContext="editor/title/context",e.EmptyEditorGroupContext="empty/editor/group/context",e.ExplorerContext="explorer/context",e.MenubarAppearanceMenu="menubar/appearance",e.MenubarAppMenu="menubar/app",e.MenubarDebugMenu="menubar/debug",e.MenubarEditMenu="menubar/edit",e.MenubarFileMenu="menubar/file/menu",e.MenubarGoMenu="menubar/go",e.MenubarHelpMenu="menubar/help",e.MenubarLayoutMenu="menubar/layout",e.MenubarNewBreakpointMenu="menubar/new/breakpoint",e.MenubarPreferencesMenu="menubar/preferences",e.MenubarRecentMenu="menubar/recent",e.MenubarSelectionMenu="menubar/selection",e.MenubarSwitchEditorMenu="menubar/switch/editor",e.MenubarSwitchGroupMenu="menubar/switch/group",e.MenubarTerminalMenu="menubar/terminal",e.MenubarViewMenu="menubar/view",e.TerminalInstanceContext="terminal/instance/context",e.TerminalNewDropdownContext="terminal/newDropdown/context",e.TerminalTabContext="terminal/tab/context",e.TerminalPanelContext="terminal/panel/context",e.TerminalDefaultTypeMenu="terminal/menu/context",e.OpenEditorsContext="open/editors/context",e.ProblemsPanelContext="problems/panel/context",e.SCMChangeTitle="scm/change/title",e.SCMResourceContext="scm/resourceState/context",e.SCMResourceGroupContext="scm/resourceGroup/context",e.SCMResourceFolderContext="scm/resourceFolder/context",e.SCMSourceControl="scm/sourceControl",e.SCMTitle="scm/title",e.SCMInput="scm/input",e.SearchContext="search/context",e.StatusBarContext="statusbar/context",e.StatusBarWindowIndicatorMenu="statusbar/windowIndicator",e.TouchBarContext="touchBar/context",e.ViewItemContext="view/item/context",e.ViewTitle="view/title",e.GlobalActivity="global/activity",e.ExtensionContext="extension/context",e.SettingsIconMenu="settings/icon/menu",e.CommentsCommentThreadContext="comments/commentThread/context",e.CommentsCommentThreadTitle="comments/commentThread/title",e.CommentsCommentTitle="comments/comment/title",e.CommentsCommentContext="comments/comment/context",e.CommentReactionSwitcherMenu="comment/reaction/switcher/menu",e.CommentReactionSwitcherSubmenu="comment/reaction/switcher/submenu",e.KTToolbarLocationContext="kt/toolbar/context",e.MarketplaceNoResultsContext="marketplace/noResults/context",e.TestingGlyphMarginContext="testing/glyphMargin/context",e.TestPeekTitleContext="testing/outputPeek/title/context",e.OpenTypeSubmenuContext="editor/openType/submenu",e.AccordionContext="accordion"}(t.MenuId||(t.MenuId={})),t.getTabbarCommonMenuId=function(e){return`tabbar/${e}/common`}},56188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuServiceImpl=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(99174),s=n(12237),c=n(68122);let l=class{createMenu(e,t){return this.injector.get(d,[e,t||this.globalCtxKeyService])}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],l.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],l.prototype,"globalCtxKeyService",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.MenuServiceImpl=l;let d=class extends o.Disposable{constructor(e,t){super(),this.id=e,this.contextKeyService=t,this._onDidChange=new o.Emitter,this._build(),this.addDispose(o.Event.debounce(o.Event.filter(this.menuRegistry.onDidChangeMenu,(e=>e===this.id)),(()=>{}),50)(this._build,this)),this.addDispose(o.Event.debounce(this.contextKeyService.onDidChangeContext,((e,t)=>e||t.payload.affectsSome(this._contextKeys)),50)((e=>e&&this._onDidChange.fire(void 0)),this)),this.addDispose(this._onDidChange)}get onDidChange(){return this._onDidChange.event}get menuId(){return this.id}_build(){this._menuGroups=[],this._contextKeys=new Set;let e,t=this.menuRegistry.getMenuItems(this.id);t=t.sort(u);for(const n of t){const t=n.group||"";e&&e[0]===t||(e=[t,[]],this._menuGroups.push(e)),e[1].push(n),this.fillKeysInWhenExpr(this._contextKeys,n.when),(0,s.isIMenuItem)(n)&&this.fillKeysInWhenExpr(this._contextKeys,n.toggledWhen),(0,s.isIMenuItem)(n)&&n.enabledWhen&&this.fillKeysInWhenExpr(this._contextKeys,n.enabledWhen)}this._onDidChange.fire(this)}getMenuNodes(e={}){const t=[];for(const n of this._menuGroups){const[i,r]=n,o=[];for(const t of r){const n=this._getActiveAction(t,e);n&&o.push(n)}o.length>0&&t.push([i,o])}return t}_getActiveAction(e,t){if(this.contextKeyService.match(e.when,t.contextDom)){if((0,s.isIMenuItem)(e)){const{args:n=[]}=t,i=this.menuRegistry.getMenuCommand(e.command),r=this.commandRegistry.getCommand(i.id),o=Object.assign(Object.assign({},r||{}),i);if(!o.label)return;if(r&&!this.commandRegistry.isVisible(o.id,...n))return;const a=!r||this.commandRegistry.isEnabled(o.id,...n),s=void 0!==e.enabledWhen?!this.contextKeyService.match(e.enabledWhen,t.contextDom):!a,l=Boolean(r&&this.commandRegistry.isToggled(o.id,...n)),d=void 0!==e.toggledWhen?this.contextKeyService.match(e.toggledWhen,t.contextDom):l;return this.injector.get(c.MenuItemNode,[o,e.iconClass||(null==r?void 0:r.iconClass),t,s,d,e.type,e.nativeRole,e.extraDesc,e.extraTailArgs,e.argsTransformer])}if((0,s.isIComponentMenuItem)(e)){return this.injector.get(c.ComponentMenuItemNode,[e,t,e.extraTailArgs,e.argsTransformer])}if(e.label){return this.injector.get(c.SubmenuItemNode,[e])}}}fillKeysInWhenExpr(e,t){this.contextKeyService.getKeysInWhen(t).forEach((t=>{e.add(t)}))}};function u(e,t){const n=e.group,i=t.group;if(n!==i){if(!n)return 1;if(!i)return-1;if("navigation"===n)return-1;if("navigation"===i)return 1;const e=n.localeCompare(i);if(0!==e)return e}const r=e.order||0,o=t.order||0;return ro?1:0}i.__decorate([(0,r.Autowired)(s.IMenuRegistry),i.__metadata("design:type",s.IMenuRegistry)],d.prototype,"menuRegistry",void 0),i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],d.prototype,"commandRegistry",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),d=i.__decorate([(0,r.Injectable)(),i.__param(0,(0,r.Optional)()),i.__param(1,(0,r.Optional)()),i.__metadata("design:paramtypes",[String,Object])],d)},77887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateInlineActions=t.generateMergedInlineActions=t.generateCtxMenu=t.generateMergedCtxMenu=t.mergeTupleMenuNodeResult=t.splitMenuItems=t.isInlineGroup=t.isPrimaryGroup=void 0;const i=n(70655),r=n(68122);t.isPrimaryGroup=e=>"navigation"===e;function o(e,n="navigation"){const i=[[],[]];for(const o of e){const[e,a]=o;("inline"===n?t.isInlineGroup:t.isPrimaryGroup)(e)?i[0].push(...a):(i[1].length>0&&i[1].push(new r.SeparatorMenuItemNode),i[1].push(...a))}return i}function a(e){const[t,n]=e,i=[...t];return i.length>0&&n.length>0&&i.push(new r.SeparatorMenuItemNode),i.concat(n)}function s(e){const{menus:t,separator:n="navigation"}=e,r=i.__rest(e,["menus","separator"]);return o(t.getMenuNodes(r),n)}function c(e){const{menus:t,separator:n}=e,r=i.__rest(e,["menus","separator"]);return o(t.getMenuNodes(r),n)}t.isInlineGroup=e=>/^inline/.test(e),t.splitMenuItems=o,t.mergeTupleMenuNodeResult=a,t.generateMergedCtxMenu=function(e){return a(s(e))},t.generateCtxMenu=s,t.generateMergedInlineActions=function(e){const t=c(e);return[...t[0],...t[1]]},t.generateInlineActions=c},87252:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},68122:(e,t,n)=>{"use strict";var i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractContextMenuService=t.AbstractMenuService=t.isIMenu=t.SeparatorMenuItemNode=t.ComponentMenuItemNode=t.SubmenuItemNode=t.MenuItemNode=void 0;const o=n(70655),a=n(39993),s=n(90642),c=n(82562),l=n(12237),d=n(11866);let u=class extends l.MenuNode{constructor(e,t,n={},i,r,o,a,s,c,l){super({id:e.id,icon:t,label:e.label,type:o,checked:r,disabled:i,nativeRole:a,extraDesc:s}),this.extraTailArgs=c,this.argsTransformer=l,this.className=void 0;const d=this.getShortcut(e.id);this.keybinding=d&&d.keybinding||"",this.rawKeybinding=d&&d.rawKeybinding||"",this.isKeyCombination=!(!d||!d.isKeyCombination),this._options=n,this.item=e}getExecuteArgs(e=[]){let t=[...this._options.args||[],...e||[],...this.extraTailArgs||[]];return this.argsTransformer&&(t=this.argsTransformer(...t)),t}execute(e=[]){return this.commandService.executeCommand(this.item.id,...this.getExecuteArgs(e))}getShortcut(e){if(e){const t=this.keybindings.getKeybindingsForCommand(e);if(t.length>0){const e=t.reduce(((e,t)=>(e.priority||0)>(t.priority||0)?e:t)),n=Array.isArray(e.resolved)&&e.resolved.length>1;let i=this.keybindings.acceleratorFor(e,s.isMacintosh?"":"+").join(" ");return n&&(i=`[${i}]`),{keybinding:i,rawKeybinding:e.keybinding,isKeyCombination:n}}}return null}};o.__decorate([(0,a.Autowired)(s.CommandService),o.__metadata("design:type",Object)],u.prototype,"commandService",void 0),o.__decorate([(0,a.Autowired)(c.KeybindingRegistry),o.__metadata("design:type",Object)],u.prototype,"keybindings",void 0),o.__decorate([(0,a.Autowired)(s.CommandRegistry),o.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),u=o.__decorate([(0,a.Injectable)(),o.__param(0,(0,a.Optional)()),o.__param(1,(0,a.Optional)()),o.__param(2,(0,a.Optional)()),o.__param(3,(0,a.Optional)()),o.__param(4,(0,a.Optional)()),o.__param(5,(0,a.Optional)()),o.__param(6,(0,a.Optional)()),o.__param(7,(0,a.Optional)()),o.__param(8,(0,a.Optional)()),o.__param(9,(0,a.Optional)()),o.__metadata("design:paramtypes",[Object,Object,Object,Boolean,Boolean,String,String,String,Array,Function])],u),t.MenuItemNode=u;let p=i=class extends l.MenuNode{constructor(e){super({id:i.ID,label:e.label,type:e.type}),this.submenuId=e.submenu,this.icon=e.iconClass,this.item=e}execute(e){const[t,...n]=e;t&&this.ctxMenuRenderer.show({anchor:t,menuNodes:this.children||this.submenuId,args:n})}};p.ID="menu.item.node.submenu",o.__decorate([(0,a.Autowired)(d.ICtxMenuRenderer),o.__metadata("design:type",d.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),p=i=o.__decorate([(0,a.Injectable)({multiple:!0}),o.__param(0,(0,a.Optional)()),o.__metadata("design:paramtypes",[Object])],p),t.SubmenuItemNode=p;let h=r=class extends l.MenuNode{constructor(e,t={},n,i){super({id:r.ID,label:""}),this.extraTailArgs=n,this.argsTransformer=i,r.nodeIndex++,this.nodeId=String(r.nodeIndex),this.item=e,this.component=e.component,this._options=t}getExecuteArgs(e=[]){let t=[...this._options.args||[],...e||[],...this.extraTailArgs||[]];return this.argsTransformer&&(t=this.argsTransformer(...t)),t}};h.ID="menu.item.node.component",h.nodeIndex=-1,h=r=o.__decorate([(0,a.Injectable)({multiple:!0}),o.__param(0,(0,a.Optional)()),o.__param(1,(0,a.Optional)()),o.__param(2,(0,a.Optional)()),o.__param(3,(0,a.Optional)()),o.__metadata("design:paramtypes",[Object,Object,Array,Function])],h),t.ComponentMenuItemNode=h;class m extends l.MenuNode{constructor(e,t){super({id:e||m.ID,label:t||"separator"})}}t.SeparatorMenuItemNode=m,m.ID="menu.item.node.separator",t.isIMenu=function(e){return"getMenuNodes"in e&&"function"==typeof e.getMenuNodes};t.AbstractMenuService=class{};t.AbstractContextMenuService=class{}},50124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenubarServiceImpl=t.AbstractMenubarService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(12237),s=n(77887),c=n(68122);class l extends o.Disposable{}t.AbstractMenubarService=l;let d=class extends o.Disposable{constructor(){super(),this._onDidMenuBarChange=new o.Emitter,this._onDidMenuChange=new o.Emitter,this._onMenuChange=new o.Emitter,this._menubarIds=new Set,this._menus=new Map,this._menubarItems=[],this._menuItems=new Map,this._menusListener=new Map,this._build(),this.addDispose(o.Event.debounce(this.menuRegistry.onDidChangeMenubar,(()=>{}),50)(this._build,this)),this.addDispose(o.Event.debounce(this.onMenuChange,((e,t)=>t),50)(this._rebuildSingleRootMenus,this)),this.addDispose(this._onDidMenuBarChange),this.addDispose(this._onDidMenuChange)}get onDidMenubarChange(){return this._onDidMenuBarChange.event}get onDidMenuChange(){return this._onDidMenuChange.event}get onMenuChange(){return this._onMenuChange.event}_build(){this._menubarItems=[],this._menubarIds=new Set,this._menuItems.clear();let e=this.menuRegistry.getMenubarItems();e=e.sort(u),e.forEach((e=>{const t=e.id;this._menubarItems.push(e),this._menubarIds.add(t),this._buildMenus(t)})),this._onDidMenuBarChange.fire()}_rebuildSingleRootMenus(e){this._buildMenus(e),this._onDidMenuChange.fire(e)}_buildMenus(e){const t=this.menuService.createMenu(e),n=this._menus.get(e);n&&(n.dispose(),this._menus.delete(e));const i=this._menusListener.get(e);i&&(i.dispose(),this._menusListener.delete(e)),this._menus.set(e,t),this._menusListener.set(e,t.onDidChange((()=>this._onMenuChange.fire(e)),this,this.disposables));const r=[];this._traverseMenuItems(t,r,e),this._menuItems.set(e,r)}_traverseMenuItems(e,t,n){(0,s.generateMergedCtxMenu)({menus:e}).forEach((e=>{if(e instanceof c.SubmenuItemNode){const i=[],r=e.item.submenu;if(!this._menus.has(r)){const e=this.registerDispose(this.menuService.createMenu(r));this._menus.set(r,e),this.registerDispose(e.onDidChange((()=>{this._onMenuChange.fire(n)})))}const o=this.menuService.createMenu(r);this._traverseMenuItems(o,i,n),e.children=i,t.push(e),o.dispose()}else t.push(e)}))}dispose(){this._menusListener.forEach((e=>e.dispose())),this._menusListener.clear(),this._menus.forEach((e=>e.dispose())),this._menus.clear(),super.dispose()}getMenubarItems(){return this._menubarItems}getMenubarItem(e){if(this._menubarIds.has(e))return this.menuRegistry.getMenubarItem(e)}getMenuNodes(e){return this._menuItems.get(e)||[]}rebuildMenuNodes(e){this._buildMenus(e)}};function u(e,t){const n=e.order||0,i=t.order||0;return ni?1:0}i.__decorate([(0,r.Autowired)(c.AbstractMenuService),i.__metadata("design:type",c.AbstractMenuService)],d.prototype,"menuService",void 0),i.__decorate([(0,r.Autowired)(a.IMenuRegistry),i.__metadata("design:type",a.IMenuRegistry)],d.prototype,"menuRegistry",void 0),d=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.MenubarServiceImpl=d},11866:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICtxMenuRenderer=void 0;t.ICtxMenuRenderer=class{}},83951:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserCtxMenuRenderer=t.IBrowserCtxMenu=void 0;const i=n(70655),r=i.__importDefault(n(57557)),o=n(39993),a=n(68122),s=n(11866);class c extends s.ICtxMenuRenderer{}t.IBrowserCtxMenu=c;let l=class{show(e){if("string"==typeof e.menuNodes){const t=this.menuService.createMenu({id:e.menuNodes,config:{args:e.args},contextKeyService:e.contextKeyService});e.menuNodes=t.getMergedMenuNodes(),t.dispose()}this.browserCtxMenu.show((0,r.default)(e,["contextKeyService"]))}};i.__decorate([(0,o.Autowired)(c),i.__metadata("design:type",c)],l.prototype,"browserCtxMenu",void 0),i.__decorate([(0,o.Autowired)(a.AbstractContextMenuService),i.__metadata("design:type",a.AbstractContextMenuService)],l.prototype,"menuService",void 0),l=i.__decorate([(0,o.Injectable)()],l),t.BrowserCtxMenuRenderer=l},32001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronMenuBarService=t.ElectronCtxMenuRenderer=t.ElectronMenuFactory=t.IElectronMenuBarService=t.IElectronMenuFactory=t.IElectronCtxMenuRenderer=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(90642),s=n(30930),c=n(68122),l=n(50124),d=n(11866);class u extends d.ICtxMenuRenderer{}t.IElectronCtxMenuRenderer=u,t.IElectronMenuFactory=Symbol("IElectronMenuFactory"),t.IElectronMenuBarService=Symbol("IElectronMenuBarService");let p=class extends a.Disposable{getTemplate(e,t,n){return e.map(((e,i)=>{if(e.id===c.SeparatorMenuItemNode.ID)return{type:"separator"};if(e.id===c.SubmenuItemNode.ID){const i=this.getTemplate(e.children,t,n);return{label:`${a.strings.mnemonicButtonLabel(e.label,!0)}`,submenu:Array.isArray(i)&&i.length?i:void 0}}return this.bindAction(e,t,i,n),{type:e.checked?"checkbox":void 0,checked:!!e.checked&&e.checked,label:`${a.strings.mnemonicButtonLabel(e.label,!0)} ${e.isKeyCombination?e.keybinding:""}`,id:`${e.id}-${i}`,action:!0,role:e.nativeRole,disabled:e.disabled,accelerator:e.rawKeybinding&&!e.isKeyCombination?(r=e.rawKeybinding,r.replace("ctrlcmd","CmdOrCtrl")):void 0};var r}))}bindAction(e,t,n,i){"function"==typeof e.execute&&t.set(`${e.id}-${n}`,(()=>{e.execute(i)}))}};p=i.__decorate([(0,r.Injectable)()],p),t.ElectronMenuFactory=p;let h=class{constructor(){this.contextMenuActions=new Map}show(e){const{onHide:t,args:n}=e;let i;if("string"==typeof e.menuNodes){const t=this.menuService.createMenu({id:e.menuNodes,config:{args:e.args},contextKeyService:e.contextKeyService});i=t.getMergedMenuNodes(),t.dispose()}else i=e.menuNodes;this.contextMenuActions.clear();const r=this.factory.getTemplate(i,this.contextMenuActions,n);this.createNativeContextMenu({submenu:r},t)}createNativeContextMenu(e,t){this.electronMainMenuService.showContextMenu(e,s.electronEnv.currentWebContentsId);const n=new a.Disposable;n.addDispose(this.electronMainMenuService.on("menuClose",((e,i)=>{e===s.electronEnv.currentWebContentsId+"-context"&&(n.dispose(),t&&t(!0))}))),n.addDispose(this.electronMainMenuService.on("menuClick",((e,i)=>{if(e!==s.electronEnv.currentWebContentsId+"-context")return;const r=this.contextMenuActions.get(i);r&&r(),t&&t(!1),n.dispose()})))}};i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],h.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(o.IElectronMainMenuService),i.__metadata("design:type",Object)],h.prototype,"electronMainMenuService",void 0),i.__decorate([(0,r.Autowired)(t.IElectronMenuFactory),i.__metadata("design:type",p)],h.prototype,"factory",void 0),i.__decorate([(0,r.Autowired)(c.AbstractContextMenuService),i.__metadata("design:type",c.AbstractContextMenuService)],h.prototype,"menuService",void 0),h=i.__decorate([(0,r.Injectable)()],h),t.ElectronCtxMenuRenderer=h;let m=class{constructor(){this.menuBarActions=new Map}start(){this.electronMainMenuService.on("menuClick",((e,t)=>{if(e!==s.electronEnv.currentWindowId+"-app")return;const n=this.menuBarActions.get(t);n&&n()})),this.updateMenuBar(),this.menubarService.onDidMenubarChange((()=>{this.updateMenuBar()})),this.menubarService.onDidMenuChange((()=>{this.updateMenuBar()}))}updateMenuBar(){this.menuBarActions.clear();const e=this.menubarService.getMenubarItems(),t=[];e.forEach((e=>{const n=e.id,i=this.menubarService.getMenuNodes(n),r=this.factory.getTemplate(i,this.menuBarActions);if(r&&r.length>0){const n={label:a.strings.mnemonicButtonLabel(e.label,!0),submenu:r};e.nativeRole&&(n.role=e.nativeRole),t.push(n)}})),this.electronMainMenuService.setApplicationMenu({submenu:t},s.electronEnv.currentWindowId)}};i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],m.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(l.AbstractMenubarService),i.__metadata("design:type",l.AbstractMenubarService)],m.prototype,"menubarService",void 0),i.__decorate([(0,r.Autowired)(o.IElectronMainMenuService),i.__metadata("design:type",Object)],m.prototype,"electronMainMenuService",void 0),i.__decorate([(0,r.Autowired)(t.IElectronMenuFactory),i.__metadata("design:type",p)],m.prototype,"factory",void 0),m=i.__decorate([(0,r.Injectable)()],m),t.ElectronMenuBarService=m},75267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarActionService=t.IToolbarActionService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(49110),s=n(36439);t.IToolbarActionService=Symbol("IToolBarActionsService");let c=class extends o.Disposable{constructor(){super(),this.groups=new Map}registryActionGroup(e,t){const n=new o.Disposable;return n.addDispose(this.registry.registerToolbarActionGroup({id:e,preferredLocation:"menu-right"})),n.addDispose({dispose:()=>{this.groups.delete(e)}}),t.forEach(((t,i)=>{const r=e+"-action-"+i;"action"===t.type?n.addDispose(this.registry.registerToolbarAction({id:r,description:t.description||r,component:(0,a.createToolbarActionBtn)({iconClass:t.iconClass,title:t.title,id:r,delegate:e=>{e&&e.onClick(t.click)}}),preferredPosition:{group:e}})):"enum"===t.type&&n.addDispose(this.registry.registerToolbarAction({id:r,description:t.description||r,component:(0,s.createToolbarActionSelect)({defaultValue:t.defaultValue||t.title,options:t.enum.map((e=>({label:e,value:e}))),onSelect:e=>t.select(e)}),preferredPosition:{group:e}}))})),this.groups.set(e,n),n}unRegistryActionGroup(e){this.groups.has(e)&&this.groups.get(e).dispose}};i.__decorate([(0,r.Autowired)(a.IToolbarRegistry),i.__metadata("design:type",Object)],c.prototype,"registry",void 0),c=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],c),t.ToolbarActionService=c},88437:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestEvent=t.IMimeService=t.ISchemaStore=t.JsonSchemaContribution=t.IJSONSchemaRegistry=t.Extensions=t.MonacoContribution=t.MonacoOverrideServiceRegistry=t.MonacoService=t.ServiceNames=void 0;const i=n(90642);!function(e){e.CODE_EDITOR_SERVICE="codeEditorService",e.TEXT_MODEL_SERVICE="textModelService",e.CONTEXT_VIEW_SERVICE="contextViewService",e.COMMAND_SERVICE="commandService",e.CONTEXT_KEY_SERVICE="contextKeyService",e.BULK_EDIT_SERVICE="IWorkspaceEditService",e.OPENER_SERVICE="openerService"}(t.ServiceNames||(t.ServiceNames={}));t.MonacoService=class{};t.MonacoOverrideServiceRegistry=class{},t.MonacoContribution=Symbol("MonacoContribution"),t.Extensions={JSONContribution:"base.contributions.json"},t.IJSONSchemaRegistry=Symbol("IJSONSchemaRegistry"),t.JsonSchemaContribution=Symbol("JsonSchemaContribution"),t.ISchemaStore=Symbol("ISchemaStore"),t.IMimeService=Symbol("IMimeService");class r extends i.BasicEvent{}t.SuggestEvent=r},9015:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CommandOpener=void 0;const r=n(70655),o=n(39993),a=n(90642);let s=i=class{handleScheme(e){return e===a.Schemes.command}static parseURI(e){let t=[];try{t=JSON.parse(decodeURIComponent(e.query))}catch(n){try{t=JSON.parse(e.query)}catch(e){}}return Array.isArray(t)||(t=[t]),{id:e.path.toString(),args:t}}async open(e){const{id:t,args:n}=i.parseURI(e);return await this.commandService.executeCommand(t,...n),!0}};r.__decorate([(0,o.Autowired)(a.CommandService),r.__metadata("design:type",Object)],s.prototype,"commandService",void 0),s=i=r.__decorate([(0,o.Injectable)()],s),t.CommandOpener=s},43412:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultOpener=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(71898),s=n(68037);let c=class{handleScheme(e){return!0}async open(e){return this.appConfig.isElectronRenderer||[o.Schemes.http,o.Schemes.https].includes(e.scheme)?this.windowService.openNewWindow(e.toString(!0),{external:!0}):window.location.href=e.toString(!0),!0}};i.__decorate([(0,r.Autowired)(a.AppConfig),i.__metadata("design:type",Object)],c.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(s.IWindowService),i.__metadata("design:type",Object)],c.prototype,"windowService",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.DefaultOpener=c},79653:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpOpener=void 0;const r=n(70655),o=n(39993),a=n(90642),s=n(68037);let c=i=class{handleScheme(e){return i.standardSupportedLinkSchemes.has(e)}async open(e){return this.windowService.openNewWindow(e.toString(!0),{external:!0}),!0}};c.standardSupportedLinkSchemes=new Set([a.Schemes.http,a.Schemes.https,a.Schemes.mailto]),r.__decorate([(0,o.Autowired)(s.IWindowService),r.__metadata("design:type",Object)],c.prototype,"windowService",void 0),c=i=r.__decorate([(0,o.Injectable)()],c),t.HttpOpener=c},31855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOpenerService=t.OpenerContribution=void 0,t.OpenerContribution=Symbol("OpenerContribution"),t.IOpenerService=Symbol("IOpenerService")},89878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenerContributionClient=t.DefaultOpenerContribution=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(29277),s=n(54846),c=n(71898),l=n(93305),d=n(9015),u=n(79653),p=n(31855);let h=class{registerOpener(e){e.registerOpener(this.commandOpener),e.registerOpener(this.httpOpener)}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",d.CommandOpener)],h.prototype,"commandOpener",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",u.HttpOpener)],h.prototype,"httpOpener",void 0),h=i.__decorate([(0,o.Domain)(p.OpenerContribution)],h),t.DefaultOpenerContribution=h;let m=class{onStart(){const e=this.contributionProvider.getContributions();for(const t of e)t.registerOpener(this.openerService);if(this.appConfig.isElectronRenderer){this.injector.get(a.IElectronURLService).on("open-url",(e=>{l.electronEnv.currentWindowId===e.windowId&&this.openerService.open(e.url)}))}}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(p.OpenerContribution),i.__metadata("design:type",Object)],m.prototype,"contributionProvider",void 0),i.__decorate([(0,r.Autowired)(p.IOpenerService),i.__metadata("design:type",Object)],m.prototype,"openerService",void 0),i.__decorate([(0,r.Autowired)(c.AppConfig),i.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),m=i.__decorate([(0,o.Domain)(s.ClientAppContribution)],m),t.OpenerContributionClient=m},7596:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenerService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(43412);let s=class{constructor(){this.openers=[]}async getOpeners(e){const t=await Promise.all(this.openers.map((async t=>{try{return t.handleURI?await t.handleURI(e):await t.handleScheme(e.scheme)}catch(e){return this.logger.error(e),!1}})));return this.openers.filter(((e,n)=>t[n]))}registerOpener(e){return this.openers.push(e),{dispose:()=>{const t=this.openers.indexOf(e);-1!==t&&this.openers.splice(t,1)}}}async open(e){"string"==typeof e&&(e=o.URI.parse(e));const t=await this.getOpeners(e);for(const n of t){if(await n.open(e))return!0}return this.defaultOpener.open(e)}dispose(){this.openers=[]}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],s.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.DefaultOpener),i.__metadata("design:type",Object)],s.prototype,"defaultOpener",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.OpenerService=s},47755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllExternalProviders=t.getExternalPreference=t.registerLocalStorageProvider=t.getPreferenceLanguageId=t.getPreferenceIconThemeId=t.getPreferenceThemeId=t.getExternalPreferenceProvider=t.registerExternalPreferenceProvider=void 0;const i=n(90642),r=n(870),o=n(20316),a=new Map;function s(e,t){a.get(e)||a.set(e,t)}function c(e,t,n){var i;const r=n?o.PreferenceScope.getReversedScopes().filter((e=>e<=n)):o.PreferenceScope.getReversedScopes();for(const t of r){const n=null===(i=a.get(e))||void 0===i?void 0:i.get(t);if(void 0!==n)return{value:n,scope:t}}return{value:t&&t.default,scope:o.PreferenceScope.Default}}t.registerExternalPreferenceProvider=s,t.getExternalPreferenceProvider=function(e){let t=a.get(e);if(!t){const n=r.PreferenceProvider.PreferenceDelegates[e];n&&(t=a.get(n.delegateTo))}return t},t.getPreferenceThemeId=function(){return c("general.theme").value},t.getPreferenceIconThemeId=function(){return c("general.icon").value},t.getPreferenceLanguageId=function(e){return e&&e["general.language"]||c("general.language").value||(0,i.getLanguageId)()},t.registerLocalStorageProvider=function(e,t){function i(e){return e===o.PreferenceScope.Workspace?t:e}s(e,{set:(r,a)=>{a>=o.PreferenceScope.Folder||!t&&a>o.PreferenceScope.Default||n.g.localStorage&&(void 0!==r?localStorage.setItem(i(a)+`:${e}`,r):localStorage.removeItem(i(a)+`:${e}`))},get:t=>{if(n.g.localStorage)return localStorage.getItem(i(t)+`:${e}`)||void 0}})},t.getExternalPreference=c,t.getAllExternalProviders=function(){return Array.from(a.entries())}},83538:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(1527),t),i.__exportStar(n(89429),t),i.__exportStar(n(870),t),i.__exportStar(n(20316),t),i.__exportStar(n(10086),t),i.__exportStar(n(52001),t),i.__exportStar(n(47755),t),i.__exportStar(n(98978),t),i.__exportStar(n(56854),t)},1527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceConfigurations=t.injectPreferenceConfigurations=t.PreferenceConfiguration=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(90642),s=n(71898);t.PreferenceConfiguration=Symbol("PreferenceConfiguration"),t.injectPreferenceConfigurations=function(e){(0,o.createContributionProvider)(e,t.PreferenceConfiguration),e.addProviders({token:c,useClass:c})};let c=class{getPaths(){return this.appConfig.workspacePreferenceDirName?[this.appConfig.workspacePreferenceDirName]:this.appConfig.preferenceDirName?[this.appConfig.preferenceDirName]:[a.DEFAULT_WORKSPACE_STORAGE_DIR_NAME]}getConfigName(){return"settings"}getSectionNames(){return this.sectionNames||(this.sectionNames=this.preferenceConfigurationProvider.getContributions().map((e=>e.name))),this.sectionNames}isSectionName(e){return-1!==this.getSectionNames().indexOf(e)}isSectionUri(e){return!!e&&this.isSectionName(this.getName(e))}isConfigUri(e){return!!e&&this.getName(e)===this.getConfigName()}getName(e){return e.path.name}getPath(e){return e.parent.path.base}createUri(e,t=this.getPaths()[0],n=this.getConfigName()){return e.resolve(t).resolve(n+".json")}};i.__decorate([(0,r.Autowired)(s.AppConfig),i.__metadata("design:type",Object)],c.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(t.PreferenceConfiguration),i.__metadata("design:type",Object)],c.prototype,"preferenceConfigurationProvider",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.PreferenceConfigurations=c},89429:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPreferenceProvider=t.PreferenceSchemaProvider=t.OVERRIDE_PROPERTY_PATTERN=t.OverridePreferenceName=t.injectPreferenceSchemaProvider=t.PreferenceContribution=t.PreferenceDataProperty=t.PreferenceSchemaProperties=t.PreferenceSchema=void 0;const i=n(70655),r=i.__importDefault(n(65096)),o=n(39993),a=n(90642),s=n(11495);Object.defineProperty(t,"PreferenceSchema",{enumerable:!0,get:function(){return s.PreferenceSchema}}),Object.defineProperty(t,"PreferenceSchemaProperties",{enumerable:!0,get:function(){return s.PreferenceSchemaProperties}}),Object.defineProperty(t,"PreferenceDataProperty",{enumerable:!0,get:function(){return s.PreferenceDataProperty}});const c=n(71898),l=n(1527),d=n(870),u=n(20316);t.PreferenceContribution=Symbol("PreferenceContribution"),t.injectPreferenceSchemaProvider=function(e){(0,l.injectPreferenceConfigurations)(e),e.addProviders({token:p,useClass:p}),e.addProviders({token:d.PreferenceProvider,tag:u.PreferenceScope.Default,useClass:h})},function(e){e.is=function(e){return!!e&&"object"==typeof e&&"preferenceName"in e&&"overrideIdentifier"in e}}(t.OverridePreferenceName||(t.OverridePreferenceName={}));t.OVERRIDE_PROPERTY_PATTERN=new RegExp("\\[(.*)\\]$");let p=class extends d.PreferenceProvider{constructor(){super(),this.preferences={},this.combinedSchema={properties:{},patternProperties:{}},this.onDidPreferenceSchemaChangedEmitter=new a.Emitter,this.onDidPreferenceSchemaChanged=this.onDidPreferenceSchemaChangedEmitter.event,this.validationFunctions=new Map,this.unsupportedPreferences=new Set,this.init(),this.toDispose.push(a.Disposable.create((()=>{this.preferences={},this.validationFunctions.clear(),this.combinedSchema={properties:{},patternProperties:{}}}))),this.toDispose.push(this.onDidPreferenceSchemaChangedEmitter)}fireDidPreferenceSchemaChanged(){this.onDidPreferenceSchemaChangedEmitter.fire(void 0)}get validateFunction(){return this._validateFunction||this.doUpdateValidate(),this._validateFunction}init(){var e;null===(e=this.preferenceContributions)||void 0===e||e.getContributions().forEach((e=>{this.doSetSchema(e.schema)})),this.combinedSchema.additionalProperties=!1,this.updateValidate(),this.onDidPreferencesChanged((()=>this.updateValidate())),this._ready.resolve()}doUnsetSchema(e){const t=[];for(const n of e){const e=n.preferenceName,i=n.oldValue,r=n.newValue,{scope:o,domain:a}=n,s={preferenceName:e,oldValue:r,scope:o,domain:a};delete this.combinedSchema.properties[e],void 0===typeof i?delete this.preferences[e]:(s.newValue=i,this.preferences[e]=i),t.push(s)}return t}doSetSchema(e,t){const n=u.PreferenceScope.Default,i=this.getDomain(),r=[],o=s.PreferenceSchema.getDefaultScope(e),a=e.overridable||!1;for(const c of Object.keys(e.properties))if(!this.combinedSchema.properties[c]||t){const t=s.PreferenceDataProperty.fromPreferenceSchemaProperty(e.properties[c],o);"boolean"!=typeof t.overridable&&a&&(t.overridable=!0),this.combinedSchema.properties[c]=t,this.unsupportedPreferences.delete(c);const l=t.defaultValue=this.getDefaultValue(t,c);r.push(this.doSetPreferenceValue(c,l,{scope:n,domain:i}))}else this.logger.error("Preference name collision detected in the schema for property: "+c);return r}doSetPreferenceValue(e,t,{scope:n,domain:i}){const r=this.preferences[e];return this.preferences[e]=t,{preferenceName:e,oldValue:r,newValue:t,scope:n,domain:i}}getDefaultValue(e,t){if(t&&this.appConfig.defaultPreferences&&t in this.appConfig.defaultPreferences)return this.appConfig.defaultPreferences[t];if(void 0!==e.defaultValue)return e.defaultValue;if(void 0!==e.default)return e.default;switch(Array.isArray(e.type)?e.type[0]:e.type){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{}}return null}updateValidate(){this._validateFunction=void 0}doUpdateValidate(){const e=Object.assign(Object.assign({},this.combinedSchema),{properties:Object.assign({},this.combinedSchema.properties)});for(const t of this.configurations.getSectionNames())delete e.properties[t];this._validateFunction=(new r.default).compile(e)}validate(e,t){if(this.configurations.isSectionName(e))return{valid:!0};if(!this.getPreferenceProperty(e))return{valid:!0};this.validationFunctions.has(e)||this.validationFunctions.set(e,(new r.default).compile(this.getPreferenceProperty(e)));const n=this.validationFunctions.get(e),i=n(t);i||e in this.combinedSchema.properties||this.unsupportedPreferences.has(e)||(this.unsupportedPreferences.add(e),this.logger.warn(`"${e}" preference is not supported`));return{valid:i,reason:n.errors&&n.errors[0]?n.errors[0].message:void 0}}getCombinedSchema(){return this.combinedSchema}setSchema(e,t){const n=this.doSetSchema(e,t);return n.length?(this.fireDidPreferenceSchemaChanged(),this.emitPreferencesChangedEvent(n),a.Disposable.create((()=>{const e=this.doUnsetSchema(n);e.length&&(this.fireDidPreferenceSchemaChanged(),this.emitPreferencesChangedEvent(e))}))):a.Disposable.NULL}getPreferences(){return this.preferences}getLanguagePreferences(e){return{}}async doSetPreference(){return!1}isValidInScope(e,t){const n=this.getPreferenceProperty(e);return!!n&&n.scope>=t}*getPreferenceNames(){for(const e in this.combinedSchema.properties)yield e}getPreferenceProperty(e){return this.combinedSchema.properties[e]}};i.__decorate([(0,o.Autowired)(t.PreferenceContribution),i.__metadata("design:type",Object)],p.prototype,"preferenceContributions",void 0),i.__decorate([(0,o.Autowired)(l.PreferenceConfigurations),i.__metadata("design:type",l.PreferenceConfigurations)],p.prototype,"configurations",void 0),i.__decorate([(0,o.Autowired)(a.ILogger),i.__metadata("design:type",Object)],p.prototype,"logger",void 0),i.__decorate([(0,o.Autowired)(c.AppConfig),i.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),p=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],p),t.PreferenceSchemaProvider=p;let h=class extends d.PreferenceProvider{constructor(){super(),this.preferences={default:{},languageSpecific:{}},this.init()}async init(){this._ready.resolve()}getPreferences(e,t){return t?this.preferences.languageSpecific[t]||{}:Object.assign(Object.assign({},this.preferenceSchemaProvider.getPreferences()),this.preferences.default)}getLanguagePreferences(e){return this.preferences.languageSpecific}async doSetPreference(e,t,n,i){if(i){this.preferences.languageSpecific[i]||(this.preferences.languageSpecific[i]={});const n=this.preferences.languageSpecific[i][e];this.preferences.languageSpecific[i][e]=t,this.handlePreferenceChanges(e,t,n,i)}else{const n=this.preferences.default[e];this.preferences.default[e]=t,this.handlePreferenceChanges(e,t,n)}return!0}handlePreferenceChanges(e,t,n,i){const r={preferenceName:e,newValue:t,oldValue:n,scope:u.PreferenceScope.Default,domain:void 0};i?this.emitPreferencesChangedEvent({default:{},languageSpecific:{[i]:{[e]:r}}}):this.emitPreferencesChangedEvent([r])}};i.__decorate([(0,o.Autowired)(p),i.__metadata("design:type",p)],h.prototype,"preferenceSchemaProvider",void 0),h=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],h),t.DefaultPreferenceProvider=h},870:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceProvider=void 0;const r=n(70655),o=n(39993),a=n(90642),s=n(30930),c=n(47755);let l=i=class{constructor(){this.onDidPreferencesChangedEmitter=new a.Emitter,this.onDidPreferencesChanged=this.onDidPreferencesChangedEmitter.event,this.toDispose=new a.DisposableCollection,this._ready=new a.Deferred,this.toDispose.push(this.onDidPreferencesChangedEmitter)}asScope(e){void 0===this._scope&&(this._scope=e,(0,c.getAllExternalProviders)().forEach((([e,t])=>{t.onDidChange&&t.onDidChange((t=>{t.scope===this._scope&&this.emitPreferencesChangedEvent([{preferenceName:e,scope:t.scope,newValue:t.newValue,oldValue:t.oldValue}],!0)}))})))}dispose(){this.toDispose.dispose()}emitPreferencesChangedEvent(e,t){let n;if(Array.isArray(e)){n={default:{},languageSpecific:{}};for(const t of e)n.default[t.preferenceName]=t}else n=e;if(void 0!==this._scope){const e=Object.keys(n.default);for(const r of e){const e=n.default[r];if(i.PreferenceDelegates[e.preferenceName]){const t=i.PreferenceDelegates[e.preferenceName];void 0!==this.get(t.delegateTo)&&void 0===this.get(e.preferenceName)||(n.default[t.delegateTo]=Object.assign(Object.assign({},e),{oldValue:void 0,newValue:void 0!==e.newValue?t.transform?t.transform(e.newValue):e.newValue:void 0,preferenceName:t.delegateTo}))}!t&&(0,c.getExternalPreferenceProvider)(r)&&delete n.default[r],e.oldValue===e.newValue&&delete n.default[r]}}return!(!n||(0,a.isEmptyObject)(n))&&(this.onDidPreferencesChangedEmitter.fire(n),!0)}get(e,t,n){if(i.PreferenceDelegatesReverse[e]){const t=this.getDelegateToValueFromDelegated(e);if(void 0!==t)return t}const r=this.getWithoutDelegate(e,t,n);return void 0===r&&i.PreferenceDelegates[e]?this.getDelegatedValueFromDelegateTo(e):r}getWithoutDelegate(e,t,n){if(void 0!==this._scope){const t=(0,c.getExternalPreferenceProvider)(e);if(t)return t.get(this._scope)}return this.doGet(e,t,n)}getDelegatedValueFromDelegateTo(e){const t=i.PreferenceDelegates[e],n=this.getWithoutDelegate(t.delegateTo);return t.transformFrom?t.transformFrom(n):n}getDelegateToValueFromDelegated(e){const t=i.PreferenceDelegatesReverse[e],n=this.getWithoutDelegate(t.delegated);return t.transform?t.transform(n):n}doGet(e,t,n){return this.doResolve(e,t,n).value}resolve(e,t,n){if(i.PreferenceDelegatesReverse[e]){const t=this.getDelegateToValueFromDelegated(e);if(void 0!==t)return{value:t,scope:this._scope}}if(void 0!==this._scope){const t=(0,c.getExternalPreferenceProvider)(e);if(t)return{value:t.get(this._scope),scope:this._scope}}const r=this.doResolve(e,t,n);return void 0===r.value&&i.PreferenceDelegates[e]?{value:this.getDelegatedValueFromDelegateTo(e),scope:this._scope}:r}doResolve(e,t,n){const i=this.getPreferences(t,n);if(!i)return{};const r=i[e];return void 0!==r?{value:r,configUri:this.getConfigUri(t)}:{}}async setPreference(e,t,n,r){if(i.PreferenceDelegatesReverse[e]){const t=i.PreferenceDelegatesReverse[e];await this.setPreference(t.delegated,void 0)}if(void 0!==this._scope){const n=(0,c.getExternalPreferenceProvider)(e);if(n)try{const i=n.get(this._scope);return await n.set(t,this._scope),n.onDidChange||this.emitPreferencesChangedEvent([{preferenceName:e,scope:this._scope,oldValue:i,newValue:n.get(this._scope)}],!0),!0}catch(e){return!1}}return await this.doSetPreference(e,t,n,r)}get ready(){return this._ready.promise}getDomain(){}getConfigUri(e){}static merge(e,t){if(void 0===e||!s.JSONUtils.isObject(e))return s.JSONUtils.deepCopy(t);if(s.JSONUtils.isPrimitive(t))return{};for(const n of Object.keys(t)){const i=t[n];n in e&&s.JSONUtils.isObject(e[n])&&s.JSONUtils.isObject(i)?this.merge(e[n],i):e[n]=s.JSONUtils.deepCopy(i)}return e}};l.PreferenceDelegates={"workbench.colorTheme":{delegateTo:"general.theme"}},l.PreferenceDelegatesReverse=function(e){const t={};for(const n of Object.keys(e))t[e[n].delegateTo]=Object.assign({delegated:n},e[n]);return t}(i.PreferenceDelegates),l=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],l),t.PreferenceProvider=l},52001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPreferenceProxy=void 0;const i=n(90642);t.createPreferenceProxy=function e(t,n,r){const o=r||{},a=o.prefix||"",s=o.style||"flat",c="deep"===s||"both"===s,l="both"===s||"flat"===s,d=(e,r,s)=>{const c=new i.Disposable;return c.addDispose(t.onPreferencesChanged((i=>{for(const r of Object.keys(i)){const s=i[r],c=s.preferenceName;if(c.startsWith(a)&&n.properties[c])if(o.resourceUri){if(s.affects(o.resourceUri)){if(o.overrideIdentifier&&!t.hasLanguageSpecific(c,o.overrideIdentifier,o.resourceUri))continue;e(s)}}else e(s)}}),r,s)),o.overrideIdentifier&&c.addDispose(t.onLanguagePreferencesChanged((t=>{if(t.overrideIdentifier===o.overrideIdentifier)for(const i of Object.keys(t.changes)){const r=t.changes[i],s=r.preferenceName;s.startsWith(a)&&n.properties[s]&&(o.resourceUri?r.affects(o.resourceUri)&&e(r):e(r))}}),r,s)),c},u=(e,t)=>{throw new Error("Unsupported operation")},p=(e,n,i,r)=>t.get(e,n,i||o.resourceUri,r||o.overrideIdentifier),h=()=>{const e=[];for(const t of Object.keys(n.properties))if(t.startsWith(a)){const n=t.indexOf(".",a.length);if(-1!==n&&c){const i=t.substr(a.length,n-a.length);-1===e.indexOf(i)&&e.push(i)}const i=t.substr(a.length);(l||-1===i.indexOf("."))&&e.push(i)}return e},m=(r,u)=>{if("string"!=typeof u)throw new Error(`unexpected property: ${String(u)}`);const h=a?a+u:u;if((l||-1===u.indexOf("."))&&n.properties[h])return t.get(h,void 0,o.resourceUri,o.overrideIdentifier);if("onPreferenceChanged"===u)return d;if("dispose"===u)return()=>{};if("ready"===u)return t.ready;if("get"===u)return p;if("toJSON"===u)return g();if(c){const a=h+".";for(const i of Object.keys(n.properties))if(i.startsWith(a))return e(t,n,{prefix:a,resourceUri:o.resourceUri,overrideIdentifier:o.overrideIdentifier,style:s});let c,l=h;const d=[];for(let e;l&&(0,i.isUndefined)(c);)e=l.lastIndexOf("."),d.push(l.substring(e+1)),l=l.substring(0,e),l in n.properties&&(c=m(r,l));let u;for(;(0,i.isObject)(c)&&(u=d.pop());)c=c[u];return d.length?void 0:c}},g=()=>{const e={};for(const t of h())e[t]=m(void 0,t);return e};return new Proxy({},{get:m,ownKeys:h,getOwnPropertyDescriptor:(e,t)=>-1!==h().indexOf(t)?{enumerable:!0,configurable:!0}:{},set:(r,c,l)=>{if("string"!=typeof c)throw new Error(`unexpected property: ${String(c)}`);if("deep"===s&&-1!==c.indexOf("."))return!1;const d=a?a+c:c;if(n.properties[d])return t.set(d,l,i.PreferenceScope.Default),!0;const u=d+".";for(const i of Object.keys(n.properties))if(i.startsWith(u)){const i=e(t,n,{prefix:u,resourceUri:o.resourceUri,overrideIdentifier:o.overrideIdentifier,style:s});for(const e of Object.keys(l))i[e]=l[e]}return!1},deleteProperty:u,defineProperty:u})}},20316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceScope=void 0;const i=n(80143);Object.defineProperty(t,"PreferenceScope",{enumerable:!0,get:function(){return i.PreferenceScope}})},10086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceServiceImpl=t.PreferenceChangeImpl=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(1527),s=n(89429),c=n(870),l=n(20316),d=n(98978),{deepClone:u}=o.objects;class p{constructor(e){this.change=e}get preferenceName(){return this.change.preferenceName}get newValue(){return this.change.newValue}get oldValue(){return this.change.oldValue}get scope(){return this.change.scope}affects(e){const t=e&&new o.URI(e).path,n=this.change.domain;return!t||!n||n.some((e=>new o.URI(e).path.relativity(t)>=0))}}t.PreferenceChangeImpl=p;let h=class{constructor(){this.onPreferenceChangedEmitter=new o.Emitter,this.onPreferenceChanged=this.onPreferenceChangedEmitter.event,this.onPreferencesChangedEmitter=new o.Emitter,this.onPreferencesChanged=this.onPreferencesChangedEmitter.event,this.onLanguagePreferencesChangedEmitter=new o.Emitter,this.onLanguagePreferencesChanged=this.onLanguagePreferencesChangedEmitter.event,this.toDispose=new o.DisposableCollection(this.onPreferenceChangedEmitter,this.onPreferencesChangedEmitter),this.preferenceProviders=new Map,this.specificEmitters=new Map,this.preferences={},this.cachedPreference=new o.LRUMap(1e3,500),this._ready=new o.Deferred,this.init()}async init(){this.initializeProviders()}dispose(){this.toDispose.dispose()}onSpecificPreferenceChange(e,t){return this.specificEmitters.has(e)||this.specificEmitters.set(e,new o.Emitter),this.specificEmitters.get(e).event(t)}get ready(){return this._ready.promise}async initializeProviders(){const e=l.PreferenceScope.getScopes(),t=[];for(const n of e){const e=this.providerProvider(n);this.preferenceProviders.set(n,e),this.toDispose.push(e.onDidPreferencesChanged((e=>{const t=Object.keys(e.default),i={};for(const r of t)e.default[r].scope===n&&(i[r]=e.default[r]);(0,o.isEmptyObject)(i)||this.reconcilePreferences({default:i,languageSpecific:e.languageSpecific})}))),t.push(e.ready)}return Promise.all(t).then((()=>{this._ready.resolve()})).catch((e=>{this._ready.reject(e)}))}reconcilePreferences(e){const t={},n={},i=(e,i)=>{this.cachedPreference.delete(e.preferenceName),i?(n[i]||(n[i]={}),n[i][e.preferenceName]=new p(e)):t[e.preferenceName]=new p(e)};this.tryAcceptChanges(e.default,i),Object.keys(e.languageSpecific).forEach((t=>{this.tryAcceptChanges(e.languageSpecific[t],i,t)}));const r=Object.keys(t);r.length>0&&this.onPreferencesChangedEmitter.fire(t),r.forEach((e=>{this.onPreferenceChangedEmitter.fire(t[e]),this.specificEmitters.has(e)&&this.specificEmitters.get(e).fire(t[e])})),Object.keys(n).forEach((e=>{this.onLanguagePreferencesChangedEmitter.fire({overrideIdentifier:e,changes:n[e]})}))}tryAcceptChanges(e,t,n){for(const i of Object.keys(e)){let r=e[i];if(this.schema.isValidInScope(i,l.PreferenceScope.Folder))t(r,n);else for(const e of l.PreferenceScope.getReversedScopes())if(this.schema.isValidInScope(i,e)){const o=this.getProvider(e);if(o){const a=o.get(i,r.domain?r.domain[0]:void 0,n);if(e>r.scope&&void 0!==a)break;if(e===r.scope&&void 0!==r.newValue){t(r,n);break}if(e0;e--)if(t=this.doResolve(i.slice(0,e).join(".")).value,t){n=i.slice(e);break}for(;n&&n.length>0;)t=t[n.shift()];return{value:t}}resolve(e,t,n,i,r){const o=this.doResolve(e,t,n,r,i);return void 0===o.value?this.lookUp(e):o}async set(e,t,n,i){await this.ready;const r=(0,o.isUndefined)(n)?i?l.PreferenceScope.Folder:l.PreferenceScope.Workspace:n;if(r===l.PreferenceScope.User&&this.configurations.isSectionName(e.split(".",1)[0]))throw new Error(`Unable to write to User Settings because ${e} does not support for global scope.`);if(r===l.PreferenceScope.Folder&&!i)throw new Error("Unable to write to Folder Settings because no resource is provided.");const a=this.getProvider(r);if(!a||!await a.setPreference(e,t,i))throw new Error(`Unable to write to ${l.PreferenceScope.getScopeNames(r)[0]} Settings.`)}async update(e,t,n=l.PreferenceScope.User){const i=this.resolve(e);(null==i?void 0:i.scope)?this.set(e,t,i.scope):this.set(e,t,n)}hasLanguageSpecific(e,t,n){return!!this.doResolve(e,void 0,n,void 0,t).languageSpecific}getBoolean(e,t,n){const i=n?this.get(e,t,n):this.get(e,t);return null!=i?!!i:t}getString(e,t,n){const i=n?this.get(e,t,n):this.get(e,t);return null==i?t:i.toString()}getNumber(e,t,n){const i=n?this.get(e,t,n):this.get(e,t);return null==i?t:"number"==typeof i?i:Number(i)}inspect(e,t,n){return{preferenceName:e,defaultValue:this.inspectInScope(e,l.PreferenceScope.Default,t,n),globalValue:this.inspectInScope(e,l.PreferenceScope.User,t,n),workspaceValue:this.inspectInScope(e,l.PreferenceScope.Workspace,t,n),workspaceFolderValue:this.inspectInScope(e,l.PreferenceScope.Folder,t,n)}}inspectInScope(e,t,n,i){return this.doInspectInScope(e,t,n,i)}doHas(e,t){return void 0!==this.doGet(e,void 0,t)}doInspectInScope(e,t,n,i){const r=this.getProvider(t);return r&&r.get(e,n,i)}doGet(e,t,n){return this.doResolve(e,t,n).value}doResolve(e,t,n,i,r){this.cachedPreference.has(e)||this.cachedPreference.set(e,new o.LRUMap(500,200));const a=this.cachedPreference.get(e),s=function(e,t,n){return`${e?`${e}:::`:""}${(0,o.isUndefined)(t)?"":`${t}:::`}${n||""}`||"default"}(r,i,n);a.has(s)||a.set(s,this.doResolveWithOutCache(e,n,i,r));const c=a.get(s);return void 0===c.value&&(c.value=t),c}doResolveWithOutCache(e,t,n,i){const r={scope:l.PreferenceScope.Default},a=(0,o.isUndefined)(n)?l.PreferenceScope.getScopes():l.PreferenceScope.getScopes().filter((e=>e<=n));for(const n of a)if(this.schema.isValidInScope(e,n)){const i=this.getProvider(n);if(i){const{configUri:a,value:s}=i.resolve(e,t);(0,o.isUndefined)(s)||(0,o.isEmptyObject)(s)||(r.configUri=a,r.value=c.PreferenceProvider.merge(r.value,s),r.scope=n)}}if(i)for(const n of a)if(this.schema.isValidInScope(e,n)){const o=this.getProvider(n);if(o){const{configUri:a,value:s,languageSpecific:l}=o.resolve(e,t,i);void 0!==s&&(r.configUri=a,r.value=c.PreferenceProvider.merge(r.value,s),r.scope=n,r.languageSpecific=r.languageSpecific||l)}}return{configUri:r.configUri,value:(0,o.isUndefined)(r.value)?void 0:u(r.value),scope:r.scope||l.PreferenceScope.Default,languageSpecific:r.languageSpecific}}};i.__decorate([(0,r.Autowired)(s.PreferenceSchemaProvider),i.__metadata("design:type",s.PreferenceSchemaProvider)],h.prototype,"schema",void 0),i.__decorate([(0,r.Autowired)(c.PreferenceProvider,{tag:l.PreferenceScope.Default}),i.__metadata("design:type",c.PreferenceProvider)],h.prototype,"defaultPreferenceProvider",void 0),i.__decorate([(0,r.Autowired)(d.PreferenceProviderProvider),i.__metadata("design:type",Function)],h.prototype,"providerProvider",void 0),i.__decorate([(0,r.Autowired)(a.PreferenceConfigurations),i.__metadata("design:type",a.PreferenceConfigurations)],h.prototype,"configurations",void 0),h=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],h),t.PreferenceServiceImpl=h},56854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPreferenceSettingsService=void 0,t.IPreferenceSettingsService=Symbol("IPreferenceSettingsService")},98978:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceProviderProvider=t.PreferenceService=void 0,t.PreferenceService=Symbol("PreferenceService"),t.PreferenceProviderProvider=Symbol("PreferenceProviderProvider")},45467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyProgressRunner=t.IProgressService=void 0,t.IProgressService=Symbol("IProgressService"),t.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}})},36395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressBar=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=n(32834),a=n(616),s=i.__importDefault(n(65314));t.ProgressBar=(0,o.observer)((({progressModel:e,className:t})=>{const{worked:n,total:i,show:o,fade:c}=e;return a.createElement("div",{className:(0,r.default)(t,s.default.progressBar,{[s.default.hide]:!o},{[s.default.fade]:c})},a.createElement("div",{className:(0,r.default)(s.default.progress,{[s.default.infinite]:!i}),style:i?{width:100*(n/i||.02)+"%"}:{width:"2%"}}))}))},10395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressIndicator=void 0;const i=n(70655),r=n(22188),o=n(39993);let a=class{constructor(){this.progressModel={show:!1,fade:!1,worked:0,total:void 0}}show(e,t){return!0!==e&&(this.progressModel.total=e),this.showOnceScheduler(t),{total:e=>{this.progressModel.worked=0,this.progressModel.total=e},worked:e=>{if(this.progressModel.total){const t=Math.max(1,Number(e)),n=Math.min(t+this.progressModel.worked,this.progressModel.total);this.progressModel.worked=n}this.progressModel.show=!0},done:()=>{this.doDone(!0)}}}async showWhile(e,t){this.progressModel.total=void 0,this.showOnceScheduler(t),await e,this.doDone(!1)}showOnceScheduler(e){"number"==typeof e?(clearTimeout(this.scheduled),this.scheduled=n.g.setTimeout(this.on,e)):this.on()}doDone(e){this.progressModel.fade=!0,this.progressModel.total?(this.progressModel.worked=this.progressModel.total,e?n.g.setTimeout(this.off,800):this.off()):e?n.g.setTimeout(this.off,800):this.off()}off(){this.progressModel.total=void 0,this.progressModel.worked=0,this.progressModel.show=!1,this.progressModel.fade=!1}on(){this.progressModel.show=!0}};i.__decorate([r.observable,i.__metadata("design:type",Object)],a.prototype,"progressModel",void 0),i.__decorate([r.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],a.prototype,"off",null),i.__decorate([r.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],a.prototype,"on",null),a=i.__decorate([(0,o.Injectable)({multiple:!0})],a),t.ProgressIndicator=a},33:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressService=void 0;const i=n(70655),r=n(616),o=n(39993),a=n(25880),s=n(90642),c=n(894),l=n(52e3),d=n(11792),u=n(36395),p=n(10395),{format:h}=s.strings;let m=class{constructor(){this.progressIndicatorRegistry=new Map,this.windowProgressStack=[],this.windowProgressStatusEntry=void 0}registerProgressIndicator(e,t){const n=t||this.injector.get(p.ProgressIndicator);return this.progressIndicatorRegistry.set(e,n),{dispose:()=>this.progressIndicatorRegistry.delete(e)}}getIndicator(e){return this.progressIndicatorRegistry.get(e)}withProgress(e,t,n){const i=e.location;if("string"==typeof i){if(this.progressIndicatorRegistry.get(i))return this.withCompositeProgress(i,t,Object.assign(Object.assign({},e),{location:i}));throw new Error(`Bad progress location: ${i}`)}switch(i){case s.ProgressLocation.Notification:return this.withNotificationProgress(Object.assign(Object.assign({},e),{location:i}),t,n);case s.ProgressLocation.Window:return this.withWindowProgress(Object.assign(Object.assign({},e),{location:i}),t);case s.ProgressLocation.Explorer:return this.withCompositeProgress("explorer",t,Object.assign(Object.assign({},e),{location:i}));case s.ProgressLocation.Scm:return this.withCompositeProgress("scm",t,Object.assign(Object.assign({},e),{location:i}));case s.ProgressLocation.Extensions:return this.withCompositeProgress("extensions",t,Object.assign(Object.assign({},e),{location:i}));default:throw new Error(`Bad progress location: ${i}`)}}withWindowProgress(e,t){const n=[e,new s.Progress((()=>this.updateWindowProgress()))],i=t(n[1]);let r=setTimeout((()=>{r=void 0,this.windowProgressStack.unshift(n),this.updateWindowProgress(),Promise.all([(0,c.timeout)(150),i]).finally((()=>{const e=this.windowProgressStack.indexOf(n);this.windowProgressStack.splice(e,1),this.updateWindowProgress()}))}),150);return i.finally((()=>clearTimeout(r)))}updateWindowProgress(e=0){var t;if(e{this.windowProgressStatusEntry=e}))}else null===(t=this.windowProgressStatusEntry)||void 0===t||t.dispose(),this.windowProgressStatusEntry=void 0}withCompositeProgress(e,t,n){const i=this.progressIndicatorRegistry.get(e);let r;const o=t({report:e=>{r&&("number"==typeof e.increment&&r.worked(e.increment),"number"==typeof e.total&&r.total(e.total))}});return i&&("number"==typeof n.total?(r=i.show(n.total,n.delay),o.catch((()=>{})).finally((()=>r?r.done():void 0))):i.showWhile(o,n.delay)),o}withNotificationProgress(e,t,n){const i=new class extends s.Disposable{constructor(){super(),this._onDidReport=this.registerDispose(new s.Emitter),this.onDidReport=this._onDidReport.event,this._step=void 0,this._done=!1,this.promise=t(this),this.promise.finally((()=>{this.dispose()}))}get step(){return this._step}get done(){return this._done}report(e){this._step=e,this._onDidReport.fire(e)}cancel(e){null==n||n(e),this.dispose()}dispose(){this._done=!0,super.dispose()}},o=()=>{let t;const n=new Promise((e=>t=e));return this.withWindowProgress({location:s.ProgressLocation.Window,title:e.title?(0,s.parseLinkedText)(e.title).toString():void 0},(e=>{function r(t){t.message&&e.report({message:(0,s.parseLinkedText)(t.message).toString()})}i.step&&r(i.step);const o=i.onDidReport((e=>r(e)));return n.finally((()=>o.dispose())),s.Event.once(i.onDispose)((()=>t())),n})),(0,s.toDisposable)((()=>t()))};let d,h,m=!1;const g=(t,n,c)=>{var g;const f=[];e.buttons,e.cancellable&&f.push((0,s.localize)("ButtonCancel"));const _=Math.random().toString(18).slice(2,5),b=this.injector.get(p.ProgressIndicator);let y;this.registerProgressIndicator(_,b);return d=r.createElement(u.ProgressBar,{progressModel:b.progressModel}),null===(g=(0,l.open)(t,a.MessageType.Info,!0,_,f,d,0,(()=>{return e=!1,(0,s.dispose)(y),void(e||i.done||(y=o()));var e})))||void 0===g||g.then((()=>{i.cancel()})),"number"==typeof c&&c>=0?(h=b.show(100),h.worked(c)):(m=!0,h=b.show(!0)),_};let f,_,b;const y=t=>{if(b=(null==t?void 0:t.message)&&e.title?`${e.title}: ${t.message}`:e.title||(null==t?void 0:t.message),!f&&b&&("number"==typeof e.delay&&e.delay>0?"number"!=typeof _&&(_=setTimeout((()=>f=g(b,e.silent,null==t?void 0:t.increment)),e.delay)):f=g(b,e.silent,null==t?void 0:t.increment)),f&&("number"==typeof(null==t?void 0:t.increment)&&("number"==typeof(n=t.increment)&&n>=0?(m&&(m=!1,h.total(100)),h.worked(n)):h.total(0)),b)){const e=this.injector.get(c.IOpenerService);(0,a.update)(f,(0,c.toMarkdown)(b,e))}var n};y(i.step);const v=i.onDidReport((e=>y(e)));return s.Event.once(i.onDispose)((()=>v.dispose())),(async()=>{try{"number"==typeof e.delay&&e.delay>0?await i.promise:await Promise.all([(0,c.timeout)(800),i.promise])}finally{clearTimeout(_),f&&((0,a.close)(f),this.progressIndicatorRegistry.delete(f))}})(),i.promise}};i.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),i.__metadata("design:type",o.Injector)],m.prototype,"injector",void 0),i.__decorate([(0,o.Autowired)(s.CommandService),i.__metadata("design:type",Object)],m.prototype,"commandService",void 0),m=i.__decorate([(0,o.Injectable)()],m),t.ProgressService=m},43780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickOpenContribution=t.ThemeIcon=t.QuickTitleButtonSide=t.IQuickInputService=t.PrefixQuickOpenService=t.QuickPickService=t.QuickOpenOptions=t.QuickOpenService=t.HideReason=t.QuickOpenItem=t.QuickOpenMode=t.Mode=void 0;const i=n(70655),r=n(22188);var o;!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(o=t.Mode||(t.Mode={})),t.QuickOpenMode=o;class a{constructor(e){this.options=e,this.checked=!1,this.checked=e.checked||!1}getTooltip(){return this.options.tooltip||this.getLabel()}getLabel(){return this.options.label}getLabelHighlights(){return this.options.labelHighlights||[]}getDescription(){return this.options.description}getDescriptionHighlights(){return this.options.descriptionHighlights}getDetail(){return this.options.detail}getDetailHighlights(){return this.options.detailHighlights}isHidden(){return this.options.hidden||!1}getUri(){return this.options.uri}getIconClass(){return this.options.iconClass}getKeybinding(){return this.options.keybinding}setHighlights(e,t,n){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=n}getHighlights(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]}run(e){return!!this.options.run&&this.options.run(e)}getGroupLabel(){return this.options.groupLabel}showBorder(){return this.options.showBorder||!1}getValue(){return this.options.value}getButtons(){return this.options.buttons||[]}}i.__decorate([r.observable,i.__metadata("design:type",Object)],a.prototype,"checked",void 0),t.QuickOpenItem=a,function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(t.HideReason||(t.HideReason={})),t.QuickOpenService=Symbol("QuickOpenService"),function(e){e.defaultOptions=Object.freeze({enabled:!0,prefix:"",placeholder:"",onClose:()=>{},onSelect:()=>{},onChangeValue:()=>{},onConfirm:()=>{},valueSelection:[-1,-1],fuzzyMatchLabel:!1,fuzzyMatchDetail:!1,fuzzyMatchDescription:!1,fuzzySort:!1,skipPrefix:0,ignoreFocusOut:!1,password:!1,showItemsWithoutHighlight:!1,selectIndex:()=>-1,title:""}),e.resolve=function(t={},n=e.defaultOptions){return Object.assign({},n,t)}}(t.QuickOpenOptions||(t.QuickOpenOptions={})),t.QuickPickService=Symbol("QuickPickService"),t.PrefixQuickOpenService=Symbol("PrefixQuickOpenService"),t.IQuickInputService=Symbol("IQuickInputService"),function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.QuickTitleButtonSide||(t.QuickTitleButtonSide={}));class s{constructor(e){this.id=e}}t.ThemeIcon=s,s.File=new s("file"),s.Folder=new s("folder"),t.QuickOpenContribution=Symbol("QuickOpenContribution"),i.__exportStar(n(52383),t)},52383:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentFilesManager=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92455),s=n(36813),c=n(33335),l="OPENED_FILE",d="OPENED_FILES_POSITION";let u=class extends a.WithEventBus{async updateMostRecentlyOpenedFile(e,t){const n=await this.recentStorage.getScopeStorage(),i=n.get(d)||{};i[e]=`#${t.lineNumber},${t.column}`,n.set(d,i)}async setMostRecentlyOpenedFile(e,t){const n=await this.recentStorage.getScopeStorage();let i=await this.getMostRecentlyOpenedFiles();const r=i.findIndex((t=>t===e));r>-1&&i.splice(r,1),t||i.unshift(e),i.length>50&&(i=i.slice(0,50)),n.set(l,i)}async getMostRecentlyOpenedFiles(e){const t=await this.recentStorage.getScopeStorage(),n=t.get(l)||[],i=t.get(d)||{};return e?n.map((e=>i[e]?e+i[e]:e)):n}handleFilesDelete(e){e.payload.forEach((e=>{e.type===o.FileChangeType.DELETED&&e.uri&&this.setMostRecentlyOpenedFile(e.uri,!0)}))}};i.__decorate([(0,r.Autowired)(s.RecentStorage),i.__metadata("design:type",s.RecentStorage)],u.prototype,"recentStorage",void 0),i.__decorate([(0,o.OnEvent)(c.FilesChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[c.FilesChangeEvent]),i.__metadata("design:returntype",void 0)],u.prototype,"handleFilesDelete",null),u=i.__decorate([(0,r.Injectable)()],u),t.RecentFilesManager=u},48794:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawContextKey=t.IRawContextKey=void 0;function n(e,t){const n=[];if(Array.isArray(e)&&e.length)for(const t of e)t instanceof i?n.push(t.raw):n.push(t);return n.join(" "+t+" ")}t.IRawContextKey=class{};class i{constructor(e,t){this.key=e,this.defaultValue=t}static and(...e){return e.length?n(e,"&&"):""}static or(...e){return e.length?n(e,"||"):""}bind(e){return e.createKey(this.key,this.defaultValue)}getValue(e){return e.getContextValue(this.key)}get raw(){return this.key}get not(){return"!"+this.raw}equalsTo(e){return this.raw+" == "+e}notEqualTo(e){return this.raw+" != "+e}regexMatches(e){const t=e?`/${e.source}/${e.ignoreCase?"i":""}`:"/invalid/";return this.raw+" =~ "+t}evaluate(e){return!!e.getValue(this.key)}}t.RawContextKey=i},67007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateOnEventBusEvent=t.useUpdateOnEvent=void 0;const i=n(70655).__importDefault(n(616)),r=n(90642),o=n(15259);t.useUpdateOnEvent=function(e,t=[],n){const[,o]=i.default.useState(),a=i.default.useCallback((()=>o({})),[]);i.default.useEffect((()=>{const t=new r.Disposable;return t.addDispose(e((e=>{t.disposed||(n?n(e)&&a():a())}))),()=>{t.dispose()}}),t)},t.useUpdateOnEventBusEvent=function(e,t=[],n){const[,a]=i.default.useState(),s=i.default.useCallback((()=>a({})),[]),c=(0,o.useInjectable)(r.IEventBus);i.default.useEffect((()=>{const t=new r.Disposable;return t.addDispose(c.on(e,(e=>{t.disposed||(n?n(e.payload)&&s():s())}))),()=>{t.dispose()}}),t)}},62172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useHotKey=void 0;const i=n(70655).__importDefault(n(27537)),r=n(616);t.useHotKey=(e,t)=>{const n=(0,r.useCallback)((()=>e.reduce(((e,t)=>{const n=(0,i.default)(t);return"number"==typeof n&&(e[n]=!1),e}),{})),[e]),[o,a]=(0,r.useState)(n);return{onKeyDown:function(e){a((t=>e in t?Object.assign(Object.assign({},t),{[e]:!0}):t))},onKeyUp:function(){Object.values(o).every((e=>!0===e))&&t(),a((e=>Object.keys(o).reduce(((e,t)=>(e[t]=!1,e)),{})))}}}},12059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(15259),t),i.__exportStar(n(58702),t),i.__exportStar(n(67007),t)},15259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useInjectable=void 0;const i=n(70655).__importDefault(n(616)),r=n(71898);t.useInjectable=function(e,t){const{injector:n}=i.default.useContext(r.ConfigContext),o=i.default.useMemo((()=>n.get(e,t)),[n,e]);return i.default.useEffect((()=>()=>{let e=n;for(;e&&!e.hasInstance(o);)e=e.parent;var t;e||(t=o)&&t.dispose&&o.dispose()}),[o]),o}},58702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePortal=void 0;const i=n(616);t.usePortal=function(e){const t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const n=document.querySelector(`#${e}`),i=n||function(e){const t=document.createElement("div");return t.setAttribute("id",e),t}(e);return n||document.body.appendChild(i),t.current&&i.appendChild(t.current),()=>{t.current&&t.current.remove(),-1===i.childNodes.length&&i.remove()}}),[]),t.current||(t.current=document.createElement("div")),t.current}},71898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigProvider=t.ConfigContext=t.AppConfig=void 0;const i=n(70655),r=i.__importDefault(n(616));t.AppConfig=Symbol("AppConfig"),t.ConfigContext=r.default.createContext({workspaceDir:"",injector:null,wsPath:"",layoutConfig:{},extWorkerHost:"",isElectronRenderer:!1}),t.ConfigProvider=function(e){const n=e.value,{extraContextProvider:o}=n,a=i.__rest(n,["extraContextProvider"]),s=r.default.createElement(t.ConfigContext.Provider,{value:a},r.default.createElement(t.ConfigContext.Consumer,null,(t=>a===t?e.children:null)));return o?r.default.createElement(o,{children:s}):s}},66899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(71898),t),i.__exportStar(n(73085),t)},73085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentRenderer=t.SlotRendererContribution=t.SlotRenderer=t.slotRendererRegistry=t.SlotRendererRegistry=t.SlotDecorator=t.allSlot=t.ErrorBoundary=t.getTabbarCtxKey=t.TabbarContextKeys=t.getSlotLocation=t.SlotLocation=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(25880),a=n(90642),s=n(41815),c=n(26149),l=n(12059),d=n(71898),u=i.__importDefault(n(91580)),p=(0,a.getDebugLogger)();var h;t.SlotLocation={top:"top",left:"left",right:"right",main:"main",statusBar:"statusBar",bottom:"bottom",extra:"extra",float:"float",action:"action",bottomBar:"bottomBar",bottomPanel:"bottomPanel",leftBar:"leftBar",leftPanel:"leftPanel",rightBar:"rightBar",rightPanel:"rightPanel"},t.getSlotLocation=function(e,t){for(const n of Object.keys(t))if(t[n].modules&&t[n].modules.indexOf(e)>-1)return n;return(0,a.getDebugLogger)().warn(`娌℃湁鎵惧埌${e}鎵€瀵瑰簲鐨勪綅缃紒`),""},function(e){e.activeViewlet="activeViewlet",e.activePanel="activePanel",e.activeExtendViewlet="activeExtendViewlet"}(h=t.TabbarContextKeys||(t.TabbarContextKeys={})),t.getTabbarCtxKey=function(e){return{[t.SlotLocation.left]:h.activeViewlet,[t.SlotLocation.right]:h.activeExtendViewlet,[t.SlotLocation.bottom]:h.activePanel}[e]||"activeExtendViewlet"};class m extends r.default.Component{constructor(){super(...arguments),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t}),setTimeout((()=>{throw e})),p.error(t)}update(){this.setState({error:null,errorInfo:null})}render(){return this.state.errorInfo?r.default.createElement("div",{className:u.default.error_message},r.default.createElement("h2",{className:u.default.title},(0,a.localize)("view.component.renderedError")),r.default.createElement("details",{className:u.default.detial},r.default.createElement("div",{className:u.default.label},this.state.error&&this.state.error.toString()),r.default.createElement("div",{className:u.default.message},this.state.errorInfo.componentStack)),r.default.createElement(o.Button,{onClick:()=>this.update()},(0,a.localize)("view.component.tryAgain"))):this.props.children}}t.ErrorBoundary=m,t.allSlot=[];t.SlotDecorator=e=>{var{slot:n}=e,o=i.__rest(e,["slot"]);const a=r.default.useRef();return r.default.useEffect((()=>{a.current&&t.allSlot.push({slot:n,dom:a.current})}),[a]),r.default.createElement("div",{ref:e=>a.current=e,className:"resize-wrapper"},o.children)};class g{constructor(){this.tabbarLocation=new Set,this.rendererRegistry=new Map}static DefaultRenderer({components:e}){return e&&r.default.createElement(m,null,e.map(((e,t)=>{const n=e.views[0].component;return r.default.createElement(n,Object.assign({},e.options&&e.options.initialProps,{key:`${n.name}-${t}`}))})))}registerSlotRenderer(e,t){this.rendererRegistry.set(e,t)}getSlotRenderer(e){return this.rendererRegistry.get(e)||g.DefaultRenderer}addTabbar(e){this.tabbarLocation.has(e)||this.tabbarLocation.add(e)}isTabbar(e){return this.tabbarLocation.has(e)}}t.SlotRendererRegistry=g,t.slotRendererRegistry=new g,t.SlotRenderer=function(e){var n,o,{slot:u,isTabbar:p}=e,h=i.__rest(e,["slot","isTabbar"]);const g=(0,l.useInjectable)(c.ComponentRegistry),f=r.default.useContext(d.ConfigContext),_=(0,l.useInjectable)(s.IClientApp),b=null!==(o=null===(n=f.layoutConfig[u])||void 0===n?void 0:n.modules)&&void 0!==o?o:[];p&&t.slotRendererRegistry.addTabbar(u),b&&b.length||(0,a.getDebugLogger)().warn(`No ${u} view declared by location.`);const[y,v]=r.default.useState([]),C=r.default.useCallback((()=>{const e=[];b.forEach((t=>{const n=g.getComponentRegistryInfo(t);n?e.push(n):(0,a.getDebugLogger)().warn(`${t} view isn't registered, please check.`)})),v(e)}),[]);r.default.useEffect((()=>{_.appInitialized.promise.then(C)}),[]);const S=t.slotRendererRegistry.getSlotRenderer(u);return r.default.createElement(m,null,r.default.createElement(t.SlotDecorator,{slot:u,backgroundColor:h.backgroundColor},r.default.createElement(S,Object.assign({components:y},h))))},t.SlotRendererContribution=Symbol("SlotRendererContribution"),t.ComponentRenderer=function({Component:e,initialProps:t}){return Array.isArray(e)?e&&r.default.createElement(m,null,e.map(((e,n)=>r.default.createElement(e,Object.assign({},t||{},{key:`${e.name}-${n}`}))))):e&&r.default.createElement(m,null,r.default.createElement(e,Object.assign({},t||{})))}},24700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserClipboardService=t.IClipboardService=void 0;const i=n(70655),r=n(39993),o=n(45060);t.IClipboardService=Symbol("IClipboardService");let a=class{async writeText(e){try{return await navigator.clipboard.writeText(e)}catch(e){this.logger.error(e)}const t=document.activeElement,n=document.createElement("textarea");n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),t instanceof HTMLElement&&t.focus(),document.body.removeChild(n)}async readText(){try{if(!navigator.clipboard)throw new Error("褰撳墠鐜涓嶆敮鎸佸壀璐存澘API");return await navigator.clipboard.readText()}catch(e){return this.logger.error(e),""}}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],a.prototype,"logger",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.BrowserClipboardService=a},68899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CredentialsService=t.ICredentialsService=void 0;const i=n(70655),r=n(39993),o=n(90642);t.ICredentialsService=Symbol("ICredentialsService");let a=class{constructor(){this.onDidChangePasswordEmitter=new o.Emitter,this.onDidChangePassword=this.onDidChangePasswordEmitter.event,this.credentialsProvider=new s(this.keytarService)}async getPassword(e,t){return this.credentialsProvider.getPassword(e,t)}async setPassword(e,t,n){await this.credentialsProvider.setPassword(e,t,n),this.onDidChangePasswordEmitter.fire({service:e,account:t})}async deletePassword(e,t){const n=await this.credentialsProvider.deletePassword(e,t);return this.onDidChangePasswordEmitter.fire({service:e,account:t}),n}async findPassword(e){return await this.credentialsProvider.findPassword(e)}async findCredentials(e){return await this.credentialsProvider.findCredentials(e)}};i.__decorate([(0,r.Autowired)(o.KeytarServicePath),i.__metadata("design:type",Object)],a.prototype,"keytarService",void 0),a=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],a),t.CredentialsService=a;class s{constructor(e){this.keytarService=e}deletePassword(e,t){return this.keytarService.deletePassword(e,t)}findCredentials(e){return this.keytarService.findCredentials(e)}async findPassword(e){return await this.keytarService.findPassword(e)}async getPassword(e,t){return await this.keytarService.getPassword(e,t)}async setPassword(e,t,n){return await this.keytarService.setPassword(e,t,n)}}},41588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoService=t.ICryptoService=void 0;const i=n(70655),r=n(39993),o=n(90642);t.ICryptoService=Symbol("ICryptoService");let a=class{async encrypt(e){return await this.cryptoService.encrypt(e)}async decrypt(e){return await this.cryptoService.decrypt(e)}};i.__decorate([(0,r.Autowired)(o.CryptoServicePath),i.__metadata("design:type",Object)],a.prototype,"cryptoService",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.CryptoService=a},76506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalUriService=t.IExternalUriService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(71898);t.IExternalUriService=Symbol("IExternalUriService");let s=class{resolveExternalUri(e){const t=this.extractLocalHost(e);return t?this.toRemoteUrl(e,t):e}toRemoteUrl(e,t){const n=this.toRemoteHost(t);return o.URI.from({scheme:o.URI.parse(window.location.href).scheme,authority:n,path:e.path.toString(),fragment:e.fragment,query:e.query})}toRemoteHost(e){return`${this.appConfig.remoteHostname||window.location.hostname}:${e.port}`}extractLocalHost(e){if("http"!==e.scheme&&"https"!==e.scheme)return;const t=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(e.authority);return t?{address:t[1],port:+t[2]}:void 0}};i.__decorate([(0,r.Autowired)(a.AppConfig),i.__metadata("design:type",Object)],s.prototype,"appConfig",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.ExternalUriService=s},11792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(30192),t),i.__exportStar(n(98089),t),i.__exportStar(n(39205),t),i.__exportStar(n(24700),t),i.__exportStar(n(76506),t),i.__exportStar(n(68899),t),i.__exportStar(n(41588),t)},30192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceLabelOrIconChangedEvent=t.getLanguageIdFromMonaco=t.detectModeId=t.basenameOrAuthority=t.cssEscape=t.LabelService=t.DefaultUriLabelProvider=t.deserializeLabelOptions=t.serializeLabelOptions=t.DataUri=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=n(39993),a=n(90642),s=i.__importStar(n(63138)),c=n(60213),l=n(7610),{addElement:d}=a.arrays;var u;function p(e){return e?[e.isDirectory?"0":"1",e.isOpenedDirectory?"0":"1",e.isSymbolicLink?"0":"1"].join(""):"default"}function h(e){return"default"===e?void 0:{isDirectory:"0"===e[0],isOpenedDirectory:"0"===e[1],isSymbolicLink:"0"===e[2]}}!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map,i=t.path;i.substring(i.indexOf(";")+1,i.lastIndexOf(";")).split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const r=i.substring(0,i.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}}(u=t.DataUri||(t.DataUri={})),t.serializeLabelOptions=p,t.deserializeLabelOptions=h;let m=class extends a.Disposable{constructor(){super(...arguments),this._onDidChange=this.registerDispose(new a.Emitter),this.onDidChange=this._onDidChange.event}canHandle(e,t){return e instanceof a.URI?1:0}getIcon(e,t){const{iconClass:n,onDidChange:i}=b(e,t);if(i){const t=i((()=>{this._onDidChange.fire(e),t.dispose()}));this.addDispose(t)}return n||(0,l.getIcon)("ellipsis")}getName(e){return e.displayName}getLongName(e){return e.path.toString()}};m=i.__decorate([(0,o.Injectable)()],m),t.DefaultUriLabelProvider=m;let g,f,_=class extends a.WithEventBus{constructor(){super(),this.providers=[],this.cachedProviderMap=new a.LRUMap(1e3,500),this.onDidChangeEmitter=new a.Emitter,this.registerLabelProvider(this.defaultLabelProvider)}get onDidChange(){return this.onDidChangeEmitter.event}getProviderForUri(e,t){const n=e.toString();this.cachedProviderMap.has(n)||this.cachedProviderMap.set(n,{});const i=this.cachedProviderMap.get(n),r=p(t);if(i[r])return i[r];{let n,o=-1;for(const i of this.providers){const r=i.canHandle(e,t);r>o&&(n=i,o=r)}return i[r]=n,n}}registerLabelProvider(e){const t=Array.from(this.cachedProviderMap.entries());this.cachedProviderMap.clear();const n=new a.Disposable;return e.onDidChange&&n.addDispose(e.onDidChange((e=>{this.onDidChangeEmitter.fire(e),this.cachedProviderMap.delete(e.toString())}))),n.addDispose(d(this.providers,e,!0)),n.addDispose({dispose:()=>{this.cachedProviderMap.clear()}}),t.forEach((([e,t])=>{const n=new a.URI(e);for(const e of Object.keys(t)){const i=h(e);if(this.getProviderForUri(n,i)!==t[e])return void this.onDidChangeEmitter.fire(n)}})),n}getIcon(e,t){const n=this.getProviderForUri(e,t);return n?n.getIcon(e,t):""}getName(e){const t=this.getProviderForUri(e);return t?t.getName(e):""}getLongName(e){const t=this.getProviderForUri(e);return t?t.getLongName(e):""}};i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",m)],_.prototype,"defaultLabelProvider",void 0),_=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],_),t.LabelService=_;const b=(e,t)=>{const n=t&&t.isDirectory?["folder-icon"]:["file-icon"];let i,o;if("data"===e.scheme){i=u.parseMetaData(s.Uri.file(e.toString())).get(u.META_DATA_LABEL)}else i=y(v(e).toLowerCase());if(t&&t.isDirectory)n.push(`${i}-name-folder-icon`);else{if(i){n.push(`${i}-name-file-icon`);const e=i.split(".");for(let t=1;t{C(f,g,s.Uri.file(e.withoutQuery().toString()))&&(null==o||o.fire(),null==o||o.dispose())})))}return n.push("icon-label"),{iconClass:(0,r.default)(n),onDidChange:null==o?void 0:o.event}};function y(e){return e.replace(/[\11\12\14\15\40]/g,"/")}function v(e){return e.path.base||e.authority}function C(e,t,n){if(!n)return null;let i=null;if("data"===n.scheme){const e=u.parseMetaData(n).get(u.META_DATA_MIME);e&&(i=t.getModeId(e))}else{const t=e.getModel(n);t&&(i=t.getModeId())}return i&&"plaintext"!==i?i:t.getModeIdByFilepathOrFirstLine(n)}t.cssEscape=y,t.basenameOrAuthority=v,t.detectModeId=C,t.getLanguageIdFromMonaco=function(e){return g=c.StaticServices.modeService.get(),f=c.StaticServices.modelService.get(),C(f,g,s.Uri.parse(e.toString()))};class S extends a.BasicEvent{}t.ResourceLabelOrIconChangedEvent=S},39205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusBarCommand=t.StatusBarAlignment=t.IStatusBarService=void 0,t.IStatusBarService=Symbol("IStatusBarService"),function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.StatusBarAlignment||(t.StatusBarAlignment={})),function(e){e.changeColor={id:"statusbar.changeColor"},e.changeBackgroundColor={id:"statusbar.changeBackgroundColor"},e.addElement={id:"statusbar.addElement"},e.toggleElement={id:"statusbar.toggleElement"}}(t.StatusBarCommand||(t.StatusBarCommand={}))},98089:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedBrowserStorageService=t.GlobalBrowserStorageService=t.StorageService=t.SCOPED_BROWSER_STORAGE_PREFIX=t.GLOBAL_BROWSER_STORAGE_PREFIX=void 0;const r=n(70655),o=n(39993),a=n(90642),s=n(45060);t.GLOBAL_BROWSER_STORAGE_PREFIX="global",t.SCOPED_BROWSER_STORAGE_PREFIX="scoped",t.StorageService=Symbol("IStorageService");let c=i=class{constructor(){this._enableExpired=!1,this.init()}setExpires(e){this._enableExpired=e}get storage(){return window.localStorage}init(){"undefined"!=typeof window&&window.localStorage?(this.clearLocalStorage(),this.testLocalStorage()):this.logger.warn("The browser doesn't support localStorage. state will not be persisted across sessions.")}setData(e,t){if(void 0!==t)try{(0,a.isObject)(t)&&this._enableExpired&&(t.expires=Date.now()+24*i.EXPIRES_DAY*60*60*1e3),this.storage.setItem(this.prefix(e),JSON.stringify(t))}catch(e){this.removeExpiringStorage()}else this.removeData(e)}getData(e,t){const n=this.storage.getItem(this.prefix(e));return(0,a.isUndefinedOrNull)(n)?t:JSON.parse(n)}removeData(e){this.storage.removeItem(this.prefix(e))}testLocalStorage(){const e=this.prefix("Test");try{this.storage.setItem(e,JSON.stringify(new Array(6e4)))}catch(e){this.removeExpiringStorage()}finally{this.storage.removeItem(e)}}clearLocalStorage(){const e=Object.keys(this.storage);for(const t of e)try{const e=JSON.parse(this.storage[t]);(0,a.isObject)(e)&&e.expires&&e.expires{var t;return(null===(t=this.storage[e])||void 0===t?void 0:t.indexOf("expires"))>0})).sort(((e,t)=>{var n,i;try{const r=null===(n=JSON.parse(this.storage[e]))||void 0===n?void 0:n.expires;return r-(null===(i=JSON.parse(this.storage[t]))||void 0===i?void 0:i.expires)}catch(e){return 0}}));for(const t of e.slice(0,i.EXPIRES_LIMITE_NUMBER))this.storage.removeItem(t)}};c.EXPIRES_DAY=14,c.EXPIRES_LIMITE_NUMBER=20,r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",s.Logger)],c.prototype,"logger",void 0),c=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],c);let l=class extends c{prefix(e){return`${t.GLOBAL_BROWSER_STORAGE_PREFIX}:${e}`}};l=r.__decorate([(0,o.Injectable)()],l),t.GlobalBrowserStorageService=l;let d=class extends c{constructor(e){super(),this.pathname="unknown",this.pathname=e,this.setExpires(!0)}prefix(e){return`${t.SCOPED_BROWSER_STORAGE_PREFIX}:${this.pathname}:${e}`}};d=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[String])],d),t.ScopedBrowserStorageService=d},7610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIcon=t.getExternalIcon=t.CODICON_OWNER=t.getOctIcon=t.IDE_CODICONS_CN_CSS=t.IDE_OCTICONS_CN_CSS=t.DEFAULT_CDN_ICON=t.getIcon=t.updateIconMap=void 0;const i=n(67266),r=n(11694);Object.defineProperty(t,"IDE_OCTICONS_CN_CSS",{enumerable:!0,get:function(){return r.IDE_OCTICONS_CN_CSS}}),Object.defineProperty(t,"IDE_CODICONS_CN_CSS",{enumerable:!0,get:function(){return r.IDE_CODICONS_CN_CSS}});var o=n(19619);function a(e){return`octicon octicon-${e}`}Object.defineProperty(t,"updateIconMap",{enumerable:!0,get:function(){return o.updateIconMap}}),Object.defineProperty(t,"getIcon",{enumerable:!0,get:function(){return o.getIcon}}),t.DEFAULT_CDN_ICON=r.IDE_ICONFONT_CN_CSS,t.getOctIcon=a,t.CODICON_OWNER="codicon";const s=["add","plus","gist-new","repo-create","lightbulb","light-bulb","repo","repo-delete","gist-fork","repo-forked","git-pull-request","git-pull-request-abandoned","record-keys","keyboard","tag","tag-add","tag-remove","person","person-follow","person-outline","person-filled","git-branch","git-branch-create","git-branch-delete","source-control","mirror","mirror-public","star","star-add","star-delete","star-empty","comment","comment-add","alert","warning","search","search-save","log-out","sign-out","log-in","sign-in","eye","eye-unwatch","eye-watch","circle-filled","primitive-dot","close-dirty","debug-breakpoint","debug-breakpoint-disabled","debug-hint","primitive-square","edit","pencil","info","issue-opened","gist-private","git-fork-private","lock","mirror-private","close","remove-close","x","repo-sync","sync","clone","desktop-download","beaker","microscope","vm","device-desktop","file","file-text","more","ellipsis","kebab-horizontal","mail-reply","reply","organization","organization-filled","organization-outline","new-file","file-add","new-folder","file-directory-create","trash","trashcan","history","clock","folder","file-directory","symbol-folder","logo-github","mark-github","github","terminal","console","repl","zap","symbol-event","error","stop","variable","symbol-variable","array","symbol-array","symbol-module","symbol-package","symbol-namespace","symbol-object","symbol-method","symbol-function","symbol-constructor","symbol-boolean","symbol-null","symbol-numeric","symbol-number","symbol-structure","symbol-struct","symbol-parameter","symbol-type-parameter","symbol-key","symbol-text","symbol-reference","go-to-file","symbol-enum","symbol-value","symbol-ruler","symbol-unit","activate-breakpoints","archive","arrow-both","arrow-down","arrow-left","arrow-right","arrow-small-down","arrow-small-left","arrow-small-right","arrow-small-up","arrow-up","bell","bold","book","bookmark","debug-breakpoint-conditional-unverified","debug-breakpoint-conditional","debug-breakpoint-conditional-disabled","debug-breakpoint-data-unverified","debug-breakpoint-data","debug-breakpoint-data-disabled","debug-breakpoint-log-unverified","debug-breakpoint-log","debug-breakpoint-log-disabled","briefcase","broadcast","browser","bug","calendar","case-sensitive","check","checklist","chevron-down","chevron-left","chevron-right","chevron-up","chrome-close","chrome-maximize","chrome-minimize","chrome-restore","circle-outline","debug-breakpoint-unverified","circle-slash","circuit-board","clear-all","clippy","close-all","cloud-download","cloud-upload","code","collapse-all","color-mode","comment-discussion","credit-card","dash","dashboard","database","debug-continue","debug-disconnect","debug-pause","debug-restart","debug-start","debug-step-into","debug-step-out","debug-step-over","debug-stop","debug","device-camera-video","device-camera","device-mobile","diff-added","diff-ignored","diff-modified","diff-removed","diff-renamed","diff","discard","editor-layout","empty-window","exclude","extensions","eye-closed","file-binary","file-code","file-media","file-pdf","file-submodule","file-symlink-directory","file-symlink-file","file-zip","files","filter","flame","fold-down","fold-up","fold","folder-active","folder-opened","gear","gift","gist-secret","gist","git-commit","git-compare","compare-changes","git-merge","github-action","github-alt","globe","grabber","graph","gripper","heart","home","horizontal-rule","hubot","inbox","issue-reopened","issues","italic","jersey","json","kebab-vertical","key","law","lightbulb-autofix","link-external","link","list-ordered","list-unordered","live-share","loading","location","mail-read","mail","markdown","megaphone","mention","milestone","mortar-board","move","multiple-windows","mute","no-newline","note","octoface","open-preview","package","paintcan","pin","play","run","plug","preserve-case","preview","project","pulse","question","quote","radio-tower","reactions","references","refresh","regex","remote-explorer","remote","remove","replace-all","replace","repo-clone","repo-force-push","repo-pull","repo-push","report","request-changes","rocket","root-folder-opened","root-folder","rss","ruby","save-all","save-as","save","screen-full","screen-normal","search-stop","server","settings-gear","settings","shield","smiley","sort-precedence","split-horizontal","split-vertical","squirrel","star-full","star-half","symbol-class","symbol-color","symbol-constant","symbol-enum-member","symbol-field","symbol-file","symbol-interface","symbol-keyword","symbol-misc","symbol-operator","symbol-property","wrench","wrench-subaction","symbol-snippet","tasklist","telescope","text-size","three-bars","thumbsdown","thumbsup","tools","triangle-down","triangle-left","triangle-right","triangle-up","twitter","unfold","unlock","unmute","unverified","verified","versions","vm-active","vm-outline","vm-running","watch","whitespace","whole-word","window","word-wrap","zoom-in","zoom-out","list-filter","list-flat","list-selection","selection","list-tree","debug-breakpoint-function-unverified","debug-breakpoint-function","debug-breakpoint-function-disabled","debug-stackframe-active","debug-stackframe-dot","debug-stackframe","debug-stackframe-focused","debug-breakpoint-unsupported","symbol-string","debug-reverse-continue","debug-step-back","debug-restart-frame","debug-alt","call-incoming","call-outgoing","menu","expand-all","feedback","group-by-ref-type","ungroup-by-ref-type","account","bell-dot","debug-console","library","output","run-all","sync-ignored","pinned","github-inverted","server-process","server-environment","pass","issue-closed","stop-circle","play-circle","record","debug-alt-small","vm-connect","cloud","merge","export","graph-left","magnet","notebook","redo","check-all","pinned-dirty","pass-filled","circle-large-filled","circle-large-outline","combine","gather","table","variable-group","type-hierarchy","type-hierarchy-sub","type-hierarchy-super","git-pull-request-create","run-above","run-below","notebook-template","debug-rerun","workspace-trusted","workspace-untrusted","workspace-unknown","terminal-cmd","terminal-debian","terminal-linux","terminal-powershell","terminal-tmux","terminal-ubuntu","terminal-bash","arrow-swap","copy","person-add","filter-filled","wand","debug-line-by-line","inspect","layers","layers-dot","layers-active","compass","compass-dot","compass-active","azure","issue-draft","git-pull-request-closed","git-pull-request-draft","debug-all","debug-coverage","run-errors","folder-library","debug-continue-small","beaker-stop","graph-line","graph-scatter","pie-chart","bracket","bracket-dot","bracket-error","lock-small","azure-devops","verified-filled","newline","layout"];function c(e,n=t.CODICON_OWNER,i=n===t.CODICON_OWNER){return i&&n===t.CODICON_OWNER&&!s.includes(e)?a(e):`${n} ${n}-${e}`}t.getExternalIcon=c,t.getSymbolIcon=(()=>{const e=Object.create(null);return e[i.SymbolKind.File]="file",e[i.SymbolKind.Module]="module",e[i.SymbolKind.Namespace]="namespace",e[i.SymbolKind.Package]="package",e[i.SymbolKind.Class]="class",e[i.SymbolKind.Method]="method",e[i.SymbolKind.Property]="property",e[i.SymbolKind.Field]="field",e[i.SymbolKind.Constructor]="constructor",e[i.SymbolKind.Enum]="enum",e[i.SymbolKind.Interface]="interface",e[i.SymbolKind.Function]="function",e[i.SymbolKind.Variable]="variable",e[i.SymbolKind.Constant]="constant",e[i.SymbolKind.String]="string",e[i.SymbolKind.Number]="number",e[i.SymbolKind.Boolean]="boolean",e[i.SymbolKind.Array]="array",e[i.SymbolKind.Object]="object",e[i.SymbolKind.Key]="key",e[i.SymbolKind.Null]="null",e[i.SymbolKind.EnumMember]="enum-member",e[i.SymbolKind.Struct]="struct",e[i.SymbolKind.Event]="event",e[i.SymbolKind.Operator]="operator",e[i.SymbolKind.TypeParameter]="type-parameter",function(t,n){return c(`symbol-${e[t]||"property"}`)}})()},11694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDE_CODICONS_CN_CSS=t.IDE_OCTICONS_CN_CSS=t.IDE_ICONFONT_CN_JS=t.IDE_ICONFONT_CN_CSS=void 0,t.IDE_ICONFONT_CN_CSS="//at.alicdn.com/t/font_1432262_xxi09gc9ml.css",t.IDE_ICONFONT_CN_JS=t.IDE_ICONFONT_CN_CSS.replace(/\.css$/,".js"),t.IDE_OCTICONS_CN_CSS="//gw.alipayobjects.com/os/Kaitian/c7ae5acb-da70-4f05-b83d-93b345dc5c53/octicons-cdn.css";const i=n(41443).HO["@vscode/codicons"];t.IDE_CODICONS_CN_CSS=`//gw.alipayobjects.com/os/lib/vscode/codicons/${i}/dist/codicon.css`},17282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalClientAttachEvent=void 0;const i=n(90642);class r extends i.BasicEvent{}t.TerminalClientAttachEvent=r},48991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarActionBtnClickEvent=t.createToolbarActionBtn=t.ToolbarActionBtn=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=i.__importDefault(n(5868)),s=n(39993),c=n(25880),l=n(90642),d=n(3992),u=n(83538),p=n(12059),h=n(71898),m=n(66573);var g;!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(g||(g={}));t.ToolbarActionBtn=e=>{const t=(0,p.useInjectable)(h.AppConfig),n=o.default.useRef(),[i,a]=o.default.useState(e.defaultState||"default"),[s,d]=o.default.useState(void 0),m=(0,p.useInjectable)(u.PreferenceService),[,f]=o.default.useState(),_=o.default.useCallback((()=>f({})),[]),{defaultButtonStyle:b={}}=e.preferences||{},v=Object.assign(Object.assign(Object.assign({title:e.title,iconClass:e.iconClass,showTitle:"icon"!==m.get("toolbar.buttonDisplay"),btnStyle:"button"},b),e.defaultStyle),(e.styles||{})[i]||{});s&&(v.title=s),"button"!==v.btnStyle&&(v.showTitle=!1);const C=o.default.useRef(),S=o.default.useRef(e.inDropDown);o.default.useEffect((()=>{S.current=e.inDropDown}),[e.inDropDown]),o.default.useEffect((()=>{const r=new l.Disposable;if(r.addDispose(m.onSpecificPreferenceChange("toolbar.buttonDisplay",(()=>{_()}))),n.current&&e.delegate){const o=()=>S.current?document.querySelector(`#toolbar-location-${e.location} .kt-toolbar-more`):n.current;C.current=t.injector.get(y,[n.current,e.id,(e,t)=>{a(e),d(t)},()=>i,t,o,e.popoverComponent,e.popoverStyle,e.popoverId]),e.delegate(C.current),r.addDispose(C.current),r.addDispose({dispose:()=>{e.delegate&&e.delegate(void 0)}})}return()=>r.dispose()}),[]);const w=e.inDropDown?null:o.default.createElement("div",{className:v.iconClass+" kt-toolbar-action-btn-icon",title:v.title,style:Object.assign(Object.assign(Object.assign({color:v.iconForeground,backgroundColor:v.iconBackground},v.width?{width:v.width}:null),v.height?{height:v.height}:null),v.iconSize?{fontSize:v.iconSize,WebkitMaskSize:v.iconSize}:null)}),E=v.showTitle||e.inDropDown?o.default.createElement("div",{className:"kt-toolbar-action-btn-title",style:{color:v.titleForeground,backgroundColor:v.titleBackground,fontSize:v.titleSize}},v.title):null,k={onClick:t=>{C.current&&C.current._onClick.fire(t),e.inDropDown&&e.closeDropDown()},onMouseLeave:e=>{C.current&&C.current._onMouseLeave.fire(e)},onMouseEnter:e=>{C.current&&C.current._onMouseEnter.fire(e)}},x={style:Object.assign({backgroundColor:v.background},v.width?{padding:0}:null)};let T;if(e.inDropDown)T=o.default.createElement("div",Object.assign({className:(0,r.default)({"kt-toolbar-action-btn":!0,"action-btn-in-dropdown":!0})},k,x,{ref:n}),w,E);else{const e=v.btnTitleStyle||m.get("toolbar.buttonTitleStyle");"button"===v.btnStyle&&e!==g.VERTICAL?T=o.default.createElement(c.Button,Object.assign({type:"default",size:"small"},k,x),w,E):(e===g.VERTICAL&&(x.style.minWidth="42px"),T=o.default.createElement("div",Object.assign({className:(0,r.default)({"kt-toolbar-action-btn":!0,"kt-toolbar-action-btn-button":"button"===v.btnStyle,"kt-toolbar-action-btn-inline":"button"!==v.btnStyle,"kt-toolbar-action-btn-vertical":e===g.VERTICAL,"kt-toolbar-action-btn-horizontal":e!==g.VERTICAL})},k),o.default.createElement(c.Button,Object.assign({type:"default",size:"small"},x),w),E))}return o.default.createElement("div",{className:"kt-toolbar-action-btn-wrapper",ref:n},T,e.popoverComponent&&o.default.createElement("div",{className:"kt-toolbar-popover","data-toolbar-no-context":!0}))},t.createToolbarActionBtn=function(e){return n=>o.default.createElement(t.ToolbarActionBtn,Object.assign({},n,e))};class f extends l.BasicEvent{}t.ToolbarActionBtnClickEvent=f;const _=new Map,b=e=>{const[t,n]=o.default.useState();o.default.useEffect((()=>{const t=e.delegate.onChangeContext((e=>{n(e)}));return()=>{t.dispose()}}),[]);const i=o.default.Children.map(e.children,(e=>o.default.isValidElement(e)?o.default.cloneElement(e,{context:t}):null));return o.default.createElement(o.default.Fragment,null,i)};let y=class{constructor(e,t,n,i,r,o,a,s,c){this.element=e,this.actionId=t,this._setState=n,this._getState=i,this.context=r,this.getPopoverParent=o,this.popoverComponent=a,this.popoverStyle=s,this.popoverId=c,this._onClick=new l.Emitter,this.onClick=this._onClick.event,this._onMouseLeave=new l.Emitter,this.onMouseLeave=this._onClick.event,this._onMouseEnter=new l.Emitter,this.onMouseEnter=this._onClick.event,this._onChangeState=new l.Emitter,this.onChangeState=this._onChangeState.event,this.onChangeContextEvent=new l.Emitter,this.onChangeContext=this.onChangeContextEvent.event,this._onDidChangePopoverVisibility=new l.Emitter,this.onDidChangePopoverVisibility=this._onDidChangePopoverVisibility.event,this.popoverComponent&&(this._popOverElement=_.get(t),this.popOverContainer=e.querySelector(".kt-toolbar-popover")),this.toolbarPopover.onDidRegisterPopoverEvent((e=>{e===this.popoverId&&(this.popoverComponent=this.toolbarPopover.getComponent(this.popoverId),this._popOverElement&&this.hidePopOver().then((()=>this.showPopOver())))}))}dispose(){this._onClick.dispose(),this._onMouseEnter.dispose(),this._onMouseLeave.dispose(),this.popOverContainer&&(this.popOverContainer.remove(),this.popOverContainer=void 0),this._popOverClickOutsideDisposer&&this._popOverClickOutsideDisposer.dispose()}setState(e,t){const n=this._getState();this._setState(e,t),this._onChangeState.fire({from:n,to:e})}setContext(e){this.onChangeContextEvent.fire(e)}getRect(){return this.element.getBoundingClientRect()}getPopOverContainer(){return this.popOverContainer}async showPopOver(e){if(!this.popOverContainer)return;this._popOverElement||(this._popOverElement=new Promise((e=>{const t=document.createElement("div"),n=this.popoverComponent;a.default.render(o.default.createElement(h.ConfigProvider,{value:this.context},o.default.createElement(b,{delegate:this},o.default.createElement(n,null))),t,(()=>{e(t)}))})),_.set(this.actionId,this._popOverElement));const t=Object.assign(Object.assign({},this.popoverStyle),e);"top"===t.position?(this.popOverContainer.classList.add("kt-toolbar-popover-top"),this.popOverContainer.classList.remove("kt-toolbar-popover-bottom")):(this.popOverContainer.classList.remove("kt-toolbar-popover-top"),this.popOverContainer.classList.add("kt-toolbar-popover-bottom")),this.popOverContainer.remove();const n=this.getPopoverParent()||this.element;n.append(this.popOverContainer);const i=n.getBoundingClientRect();this.popOverContainer.style.setProperty("--button-width",i.width+"px");let r="number"==typeof t.horizontalOffset?t.horizontalOffset:30;r=Math.min(r,window.innerWidth-i.left-i.width-2),this.popOverContainer.style.setProperty("--offset-size",r+"px"),this.popOverContainer.classList.add("kt-toolbar-popover-visible"),t.noContainerStyle?this.popOverContainer.classList.remove("kt-toolbar-popover-default"):this.popOverContainer.classList.add("kt-toolbar-popover-default");const s=new d.DomListener(this.popOverContainer,"animationend",(()=>{var e;s.dispose(),null===(e=this.popOverContainer)||void 0===e||e.classList.add("kt-toolbar-popover-animationend")}));return this._popOverElement.then((e=>{this._popOverClickOutsideDisposer&&(this._popOverClickOutsideDisposer.dispose(),this._popOverClickOutsideDisposer=void 0),this.popOverContainer&&e.parentElement!==this.popOverContainer&&this.popOverContainer.append(e),this._onDidChangePopoverVisibility.fire(!0),!1!==t.hideOnClickOutside&&setTimeout((()=>{this._popOverClickOutsideDisposer&&(this._popOverClickOutsideDisposer.dispose(),this._popOverClickOutsideDisposer=void 0);const t=new l.Disposable;t.addDispose(new d.DomListener(window,"click",(t=>{if(t.target&&e.contains(t.target))return;const n=e.getBoundingClientRect();n.x<=t.clientX&&n.x+n.width>=t.clientX&&n.y<=t.clientY&&n.y+n.height>=t.clientY||this.hidePopOver()}),!0)),this._popOverClickOutsideDisposer=t}))}))}async hidePopOver(){var e;if(this._popOverElement){const e=await this._popOverElement;a.default.unmountComponentAtNode(e),e.remove(),this._popOverElement=void 0}this._popOverClickOutsideDisposer&&(this._popOverClickOutsideDisposer.dispose(),this._popOverClickOutsideDisposer=void 0),this.popOverContainer&&this.popOverContainer.classList.remove("kt-toolbar-popover-visible"),null===(e=this.popOverContainer)||void 0===e||e.classList.remove("kt-toolbar-popover-animationend"),this._onDidChangePopoverVisibility.fire(!1)}};i.__decorate([(0,s.Autowired)(m.IToolbarPopoverRegistry),i.__metadata("design:type",Object)],y.prototype,"toolbarPopover",void 0),y=i.__decorate([(0,s.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[HTMLElement,String,Object,Object,Object,Function,Function,Object,String])],y)},12510:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(48991),t),i.__exportStar(n(36439),t)},36439:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createToolbarActionSelect=t.ToolbarActionSelect=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(616)),a=n(25880),s=n(90642),c=n(7610);function l(e){const[t,n]=o.default.useState(e.defaultState||"default"),i=(e.styles||{})[t]||{},l={color:i.labelForegroundColor,backgroundColor:i.backgroundColor,minWidth:void 0===i.minWidth?150:i.minWidth},d={color:i.labelForegroundColor,backgroundColor:i.backgroundColor},[u,p]=o.default.useState(e.defaultValue),[h,m]=o.default.useState(void 0),[g,f]=o.default.useState(!1),_=o.default.useRef(null),b=o.default.useRef(null),y=o.default.useRef(new s.Emitter);if(o.default.useEffect((()=>{const i=new s.Emitter;let r=u;const o={setState:e=>{const r=t;n(e),i.fire({from:r,to:e})},setSelect:p,setOptions:e=>{m(e)},getValue:()=>r,onChangeState:i.event,onSelect:y.current.event};e.delegate&&e.delegate(o);const a=y.current.event((e=>{r=e}));return()=>{e.delegate&&e.delegate(void 0),i.dispose(),a.dispose()}}),[]),o.default.useEffect((()=>{if(_.current&&b.current){const e=b.current.getBoundingClientRect();window.innerWidth-e.x-e.width<_.current.offsetWidth?(_.current.style.right="calc(100% + 5px)",_.current.style.left="",_.current.style.top="0",_.current.style.visibility="visible"):(_.current.style.left="calc(100% + 5px)",_.current.style.right="",_.current.style.top="0",_.current.style.visibility="visible")}if(g){const e=()=>{f(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[g]),e.inDropDown){const t={options:e.options,optionRenderer:e.customOptionRenderer,currentValue:u,className:"kt-toolbar-action-select-dropdown",onSelect:t=>{p(t),e.closeDropDown(),e.onSelect&&e.onSelect(t),y.current.fire(t)},equals:e.equals,size:"small",renderCheck:!0},n=o.default.createElement(a.SelectOptionsList,Object.assign({},t,{ref:_}));return o.default.createElement("div",{className:(0,r.default)({"kt-toolbar-action-btn":!0,"action-btn-in-dropdown":!0,"kt-toolbar-action-select":!0}),ref:b,onClick:()=>{f(!0)}},e.name||function(t){const n=h||e.options||[];if((0,a.isDataOptionGroups)(n)){for(const i of n)for(const n of i.options)if(e.equals){if(e.equals(n.value,t))return n.label}else if(n.value===t)return n.label}else for(const i of n)if(e.equals){if(e.equals(i.value,t))return i.label}else if(i.value===t)return i.label}(u),o.default.createElement("div",{className:(0,r.default)("kt-toolbar-action-btn-icon",(0,c.getIcon)("right"),"kt-toolbar-action-select-right")}),g?n:null)}return o.default.createElement(a.Select,{value:u,options:h||e.options,size:"small",optionRenderer:e.customOptionRenderer,onChange:t=>{e.onSelect&&e.onSelect(t),y.current.fire(t),p(t)},optionStyle:d,style:l})}t.ToolbarActionSelect=l,t.createToolbarActionSelect=function(e){return t=>o.default.createElement(l,Object.assign({},e,t))}},49110:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarLocation=void 0;const i=n(70655);i.__exportStar(n(66573),t);var r=n(24112);Object.defineProperty(t,"ToolbarLocation",{enumerable:!0,get:function(){return r.ToolbarLocation}}),i.__exportStar(n(12510),t)},24112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarActionRenderWrapper=t.ToolbarLocation=t.DEFAULT_TOOLBAR_MORE_WIDTH=t.DEFAULT_TOOLBAR_ACTION_MARGIN=void 0;const i=n(70655),r=i.__importDefault(n(21525)),o=i.__importDefault(n(23493)),a=i.__importDefault(n(616)),s=i.__importDefault(n(5868)),c=n(90642),l=n(3992),d=n(57061),u=n(83538),p=n(12059),h=n(71898),m=n(7610),g=n(66573);t.DEFAULT_TOOLBAR_ACTION_MARGIN=5,t.DEFAULT_TOOLBAR_MORE_WIDTH=14;const f=new Map,_=new c.Emitter,b=new c.Emitter;function y(e){return"split"===e.type}function v(e,n,i,r,o,a){const s=void 0===i.actionMargin?t.DEFAULT_TOOLBAR_ACTION_MARGIN:i.actionMargin,d=void 0===i.moreActionWidth?t.DEFAULT_TOOLBAR_MORE_WIDTH:i.moreActionWidth;for(let t=0;te.id)),"_tail"],v=[],w=[],E=[];for(const e of _){const t=r.getToolbarActions({location:n,group:e}),i=null==t?void 0:t.actions.filter((e=>-1===a.indexOf(e.id)));if(i&&i.length>0){v.length>0&&!v[v.length-1].noGroupSplit&&v.push({action:{type:"split"},marginLeft:s});const e=i.map(((e,n)=>{var r,o,a;const c=(null===(r=t.group)||void 0===r?void 0:r.compact)?0:s,l=[];return(null===(o=null==t?void 0:t.group)||void 0===o?void 0:o.compact)&&(l.push("kt-toolbar-action-wrapper-compact"),n===i.length-1&&l.push("kt-toolbar-action-wrapper-compact-tail"),0===n&&l.push("kt-toolbar-action-wrapper-compact-head"),0!==n&&n!==i.length-1&&l.push("kt-toolbar-action-wrapper-compact-middle")),{action:e,marginLeft:0===n?s:c,extraClassNames:l,noGroupSplit:!!(null===(a=t.group)||void 0===a?void 0:a.compact)}}));v.push(...e),w.push(e)}}0===v.length?u.classList.add("kt-toolbar-location-no-actions"):u.classList.remove("kt-toolbar-location-no-actions");let k=!1;if(!i.noDropDown)for(let e=0;eg){let n=0;for(let i=e;i{n.forEach(((t,n)=>{t.action.neverCollapse||e.push([i,n])})),t.push([])}));f+s+d>g&&0!==e.length;){const n=e.pop(),[i]=w[n[0]].splice(n[1],1);t[n[0]].push(i.action),f-=s+C(i.action,!1),w.length>1&&0===w[n[0]].length&&(f-=s+1)}v.splice(0);const n=w.filter((e=>e.length>0));n.map(((e,t)=>{0===t||n[t-1][0].noGroupSplit||v.push({action:{type:"split"},marginLeft:s}),v.push(...e)})),E.splice(0),t.reverse().filter((e=>e.length>0)).map(((e,t)=>{0!==t&&E.push({type:"split"}),E.push(...e)})),E.reverse()}if(v.forEach((e=>{if(y(e.action)){const e=document.createElement("div");e.classList.add("kt-toolbar-action-split"),u.append(e)}else S(u,e,o,!1,n,i)})),E.length>0){const e=document.createElement("div");e.classList.add("kt-toolbar-more");const t=document.createElement("div");t.classList.add(...(0,m.getIcon)("more").split(" ")),e.append(t),u.append(e),t.addEventListener("mousedown",(()=>{!function(e,t){const n="toolbar-location-visible-"+t,i="toolbar-location-dropdown-"+t,r=document.getElementById(n),o=document.getElementById(i);if(r&&o){if("block"===o.style.display)return;const n=r.getBoundingClientRect();o.style.top=n.y+n.height+"px",o.style.right=window.innerWidth-n.x-n.width+"px",o.style.display="block",setTimeout((()=>{const n=new c.Disposable;n.addDispose(new l.DomListener(e,"mousedown",(e=>{b.fire(t),n.dispose(),e.stopPropagation()}))),n.addDispose(new l.DomListener(o,"mousedown",(e=>{e.stopPropagation()}))),n.addDispose(new l.DomListener(document.body,"mousedown",(e=>{n.dispose(),o.style.display="none"}))),n.addDispose(b.event((e=>{e===t&&(n.dispose(),o.style.display="none")})))}))}}(e,n)}))}E.forEach(((e,t)=>{if(y(e)){if(0===t)return;const e=document.createElement("div");e.classList.add("kt-toolbar-action-split"),h.appendChild(e)}else S(h,{action:e,marginLeft:0},o,!0,n,i)}))}function C(e,t){var n,i;if(y(e))return 1;{const r=t?null===(n=f.get(e.id))||void 0===n?void 0:n.size.inDropDown:null===(i=f.get(e.id))||void 0===i?void 0:i.size.visible;return r?r.width:e.suggestSize?e.suggestSize.width:20}}async function S(e,t,n,i,r,o){const a=document.createElement("div");return e.appendChild(a),async function(e,t,n,i,r,o){f.has(e.action.id)||f.set(e.action.id,new w(e,n));return f.get(e.action.id).attachTo(t,i,r,o)}(t,a,n,i,r,o)}t.ToolbarLocation=e=>{const t=(0,p.useInjectable)(g.IToolbarRegistry),n=(0,p.useInjectable)(d.AbstractMenuService),i=(0,p.useInjectable)(d.ICtxMenuRenderer);t.hasLocation(e.location)||t.addLocation(e.location);const s=a.default.useContext(h.ConfigContext),l=(0,p.useInjectable)(c.IEventBus),m=a.default.useRef(),f=(0,p.useInjectable)(u.PreferenceService),{location:b,preferences:y={}}=e;let C;const S=e=>{C=e.slice()};S((f.get("toolbar.ignoreActions",{})||{})[b]||[]);const w=!t.isReady();return a.default.useEffect((()=>{if(m.current){const e=new c.Disposable,n=(0,o.default)((()=>{i()}),200),i=()=>{m.current&&(S((f.get("toolbar.ignoreActions",{})||{})[b]||[]),v(m.current,b,y,t,s,C))};if(w&&e.addDispose(l.once(g.ToolbarRegistryReadyEvent,(e=>{i()}))),e.addDispose(l.on(g.ToolbarActionsWhenChangeEvent,(()=>{i()}))),e.addDispose(l.on(g.ToolbarActionGroupsChangedEvent,(e=>{e.payload.location===b&&n()}))),e.addDispose(l.on(g.ToolbarActionsChangedEvent,(e=>{e.payload.position.location===b&&n()}))),e.addDispose(_.event((e=>{const i=t.getActionPosition(e);i&&i.location===b&&n()}))),e.addDispose(f.onPreferenceChanged((e=>{if("toolbar.ignoreActions"===e.preferenceName){const e=(f.get("toolbar.ignoreActions",{})||{})[b]||[];for(const t of e)if(-1===C.indexOf(t))return void i();for(const t of C)if(-1===e.indexOf(t))return void i()}}))),y.noDropDown)v(m.current,b,y,t,s,C);else{let i=m.current.offsetWidth;v(m.current,b,y,t,s,C);const r=new ResizeObserver((e=>{const t=e[0].contentRect;t.width!==i&&n(),i=t.width}));r.observe(m.current),e.addDispose({dispose:()=>r.disconnect()})}return()=>e.dispose()}}),[]),a.default.createElement("div",Object.assign({},e,{className:(0,r.default)("kt-toolbar-location",e.className),id:"toolbar-location-"+b,ref:m,onContextMenu:e=>{if(e.nativeEvent.composedPath().find((e=>e.getAttribute&&e.getAttribute("data-toolbar-no-context"))))return;e.preventDefault();const t=n.createMenu(d.MenuId.KTToolbarLocationContext),r=(0,d.generateCtxMenu)({menus:t});i.show({menuNodes:r[1],anchor:{x:e.clientX,y:e.clientY}})}}))};class w{constructor(e,t){this.resolvedToolbarAction=e,this.context=t,this.targetInDropDown=!1,this.size={},this.toolbarAction=e.action}render(e,t,n){return this.renderPromise&&this.renderPromise.inDropDown===e?this.renderPromise.promise:(this.renderPromise&&this.renderPromise.cancel(),this.doRender(e,t,n))}get element(){return this.renderPromise&&this.renderPromise.resolved}attachTo(e,t,n,i){return this.targetContainer=e,this.targetInDropDown=t,this.render(t,n,i).then((n=>{this.targetContainer===e&&t===this.targetInDropDown&&(n.parentElement&&n.remove(),e.replaceWith(n),setTimeout((()=>{if(!n||0===n.offsetWidth)return;let e;t?(e=this.size.inDropDown||this.toolbarAction.suggestSize||{width:20,height:30},this.size.inDropDown={width:n.offsetWidth,height:n.offsetHeight}):(e=this.size.visible||this.toolbarAction.suggestSize||{width:20,height:30},this.size.visible={width:n.offsetWidth,height:n.offsetHeight}),n.offsetWidth!==e.width&&_.fire(this.toolbarAction.id)})))}))}doRender(e,n,i){let r=!1;return this.renderPromise={cancel:()=>{r=!0},promise:new Promise(((o,c)=>{if(this.reactElement)this.reactElement.setInDropDown(e),o(this.reactElement.element);else{const l=document.createElement("div");let d;l.classList.add("kt-toolbar-action-wrapper"),l.setAttribute("data-toolbar-action-id",this.toolbarAction.id),this.resolvedToolbarAction.extraClassNames&&l.classList.add(...this.resolvedToolbarAction.extraClassNames),s.default.render(a.default.createElement(t.ToolbarActionRenderWrapper,{initialInDropDown:e,action:this.toolbarAction,preferences:i,setInDropDownHandle:e=>d=e,context:this.context,component:this.toolbarAction.component,closeDropdown:()=>{b.fire(n)},location:n}),l,(()=>{r?c("canceled render toolbar"):(this.reactElement={element:l,setInDropDown:e=>{d&&d(e)}},o(l))}))}})).then((e=>(this.renderPromise.resolved=e,this.renderPromise.resolved))),inDropDown:e},this.renderPromise.promise}}t.ToolbarActionRenderWrapper=e=>{const[t,n]=a.default.useState(e.initialInDropDown),i=e.component;return a.default.useEffect((()=>{e.setInDropDownHandle((e=>{n(e)}))}),[]),a.default.createElement(h.ConfigProvider,{value:e.context},a.default.createElement(i,{inDropDown:t,action:e.action,preferences:e.preferences,closeDropDown:e.closeDropdown,location:e.location}))}},94922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarPopoverRegistry=void 0;const i=n(70655),r=n(39993),o=n(90642);let a=class{constructor(){this.registerPopoverEvent=new o.Emitter,this.onDidRegisterPopoverEvent=this.registerPopoverEvent.event,this.popOverComponents=new Map,this.getComponent=e=>this.popOverComponents.get(e)}registerComponent(e,t){return this.popOverComponents.has(e)?(console.error(`Component ${e} is already registered!`),o.Disposable.NULL):(this.popOverComponents.set(e,t),this.registerPopoverEvent.fire(e),{dispose:()=>{this.popOverComponents.delete(e)}})}};a=i.__decorate([(0,r.Injectable)()],a),t.ToolbarPopoverRegistry=a},55447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarClientAppContribution=t.NextToolbarRegistryImpl=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(85981),s=n(99174),c=n(66573);let l=class extends o.WithEventBus{constructor(){super(...arguments),this.locations=[],this._preferredDefaultLocation=void 0,this.groups=new Map,this.actions=new Map,this.computed=new Map,this.computedReverse=new Map,this.computedGroups=new Map,this._onGroupDisposed=new o.Emitter,this._onGroupAdded=new o.Emitter,this._onLocationAdded=new o.Emitter,this._onActionDisposed=new o.Emitter,this._onActionAdded=new o.Emitter,this._contextKeys=new Set,this._inited=!1}isReady(){return this._inited}get defaultLocation(){return this._preferredDefaultLocation&&this.locations.indexOf(this._preferredDefaultLocation)>-1?this._preferredDefaultLocation:this.locations[0]||"default"}getAllLocations(){return this.locations}init(){this.contributions.getContributions().forEach((e=>{e.registerToolbarActions&&e.registerToolbarActions(this)})),this.actions.forEach((e=>{this.calculateActionPosition(e)})),this._inited=!0,this._onActionDisposed.event((e=>{this.applyPosition(e,null)})),this._onGroupDisposed.event((e=>{let t;for(const n of this.computed.values())if(n.has(e)){t=n.get(e);break}t&&t.forEach((e=>{this.calculateActionPosition(e)}))})),this._onGroupAdded.event((e=>{this.actions.forEach((t=>{(t.strictPosition&&t.strictPosition.group===e||t.preferredPosition&&t.preferredPosition.group===e)&&this.calculateActionPosition(t)}))})),this._onActionAdded.event((e=>{this.calculateActionPosition(e)})),this.addDispose(o.Event.debounce(this.globalContextKeyService.onDidChangeContext,((e,t)=>e||t.payload.affectsSome(this._contextKeys)),50)((e=>e&&this.eventBus.fire(new c.ToolbarActionsWhenChangeEvent)),this)),this.eventBus.fire(new c.ToolbarRegistryReadyEvent)}hasLocation(e){return"default"===e||-1!==this.locations.indexOf(e)}addLocation(e){-1===this.locations.indexOf(e)&&(this.locations.push(e),this._onLocationAdded.fire(e))}setDefaultLocation(e){this._preferredDefaultLocation=e}fillKeysInWhenExpr(e){this.globalContextKeyService.getKeysInWhen(e).forEach((e=>{this._contextKeys.add(e)}))}registerToolbarActionGroup(e){return this.groups.set(e.id,e),this._onGroupAdded.fire(e.id),{dispose:()=>{this.groups.delete(e.id),this._onGroupDisposed.fire(e.id)}}}calculateActionPosition(e){if(e.strictPosition){if("_head"!==e.strictPosition.group&&"_tail"!==e.strictPosition.group){const t=this.groups.get(e.strictPosition.group);if(!t)return;const n=this.getGroupLocation(t);if(e.strictPosition.location&&e.strictPosition.location!==n)return}else if(-1===this.locations.indexOf(e.strictPosition.location))return;this.applyPosition(e,e.strictPosition)}else{const t=this.getPositionFromPreferred(e.preferredPosition||{});this.applyPosition(e,t)}}getPositionFromPreferred(e){const t={location:this.defaultLocation,group:"_tail"};if(e.location&&this.locations.indexOf(e.location)>-1&&(t.location=e.location),e.group)if("_tail"===e.group||"_head"===e.group)t.group=e.group;else{const n=this.groups.get(e.group);if(n){const e=this.getGroupLocation(n);t.location=e,t.group=n.id}}return t}applyPosition(e,t){const n=[];if(this.computedReverse.has(e.id)){const i=this.computedReverse.get(e.id);if(t&&i.location===t.location&&i.group===t.group)return;const r=this.computed.get(i.location).get(i.group),o=r.indexOf(e);o>-1&&r.splice(o,1),n.push(i),this.computedReverse.delete(e.id)}if(t){this.computed.has(t.location)||this.initLocation(t.location);const i=this.computed.get(t.location).get(t.group);let r=0;for(;r{this.eventBus.fire(new c.ToolbarActionsChangedEvent({position:e}))}))}getGroupLocation(e){for(const t of this.computed.keys())if(this.computed.has(t)&&this.computed.get(t).has(e.id))return t;let t=this.defaultLocation;e.preferredLocation&&this.locations.indexOf(e.preferredLocation)>-1&&(t=e.preferredLocation),this.computed.has(t)||this.initLocation(t),this.computed.get(t).set(e.id,[]);const n=this.computedGroups.get(t);let i=0;for(;i{this.actions.delete(e.id),this._onActionDisposed.fire(e)}}}getToolbarActions(e){var t;const n=this.computed.get(e.location);if(!n||!this.isValidGroup(e.group))return;const i=null===(t=n.get(e.group))||void 0===t?void 0:t.filter((e=>!e.when||this.globalContextKeyService.match(e.when)));return i?{group:this.groups.get(e.group),position:e,actions:i}:void 0}getActionGroups(e){return this.computedGroups.get(e)}isValidGroup(e){return"_head"===e||"_tail"===e||this.groups.has(e)}getActionPosition(e){return this.computedReverse.get(e)}};i.__decorate([(0,r.Autowired)(s.IContextKeyService),i.__metadata("design:type",Object)],l.prototype,"globalContextKeyService",void 0),i.__decorate([(0,r.Autowired)(c.ToolBarActionContribution),i.__metadata("design:type",Object)],l.prototype,"contributions",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.NextToolbarRegistryImpl=l;let d=class{onStart(){this.toolbarRegistry.init()}};i.__decorate([(0,r.Autowired)(c.IToolbarRegistry),i.__metadata("design:type",Object)],d.prototype,"toolbarRegistry",void 0),d=i.__decorate([(0,o.Domain)(a.ClientAppContribution)],d),t.ToolbarClientAppContribution=d},66573:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IToolbarPopoverRegistry=t.ToolBarActionContribution=t.ToolbarActionGroupsChangedEvent=t.ToolbarActionsChangedEvent=t.ToolbarActionsWhenChangeEvent=t.ToolbarRegistryReadyEvent=t.IToolbarRegistry=void 0;const i=n(90642);t.IToolbarRegistry=Symbol("IToolbarRegistry");class r extends i.BasicEvent{}t.ToolbarRegistryReadyEvent=r;class o extends i.BasicEvent{}t.ToolbarActionsWhenChangeEvent=o;class a extends i.BasicEvent{}t.ToolbarActionsChangedEvent=a;class s extends i.BasicEvent{}t.ToolbarActionGroupsChangedEvent=s,t.ToolBarActionContribution=Symbol("ToolBarActionContribution"),t.IToolbarPopoverRegistry=Symbol("IToolbarPopoverRegistry")},12499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(87881),t),i.__exportStar(n(60945),t),i.__exportStar(n(95657),t)},60945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandableTreeNode=void 0;const i=n(12499);!function(e){e.is=function(e){return!!e&&i.CompositeTreeNode.is(e)&&"expanded"in e},e.isExpanded=function(t){return e.is(t)&&t.expanded},e.isCollapsed=function(t){return e.is(t)&&!t.expanded}}(t.ExpandableTreeNode||(t.ExpandableTreeNode={}))},87881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectableTreeNode=t.TreeSelection=void 0;const i=n(95657);!function(e){let t;function n(e,t){if(void 0===e)return!1;return("number"==typeof e?e:e.type)===t}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.TOGGLE=1]="TOGGLE",e[e.RANGE=2]="RANGE"}(t=e.SelectionType||(e.SelectionType={})),e.is=function(e){return!!e&&"node"in e},e.isRange=function(e){return n(e,t.RANGE)},e.isToggle=function(e){return n(e,t.TOGGLE)}}(t.TreeSelection||(t.TreeSelection={})),function(e){function t(e){return!!e&&"selected"in e}function n(e){return t(e)&&i.TreeNode.isVisible(e)}e.is=t,e.isSelected=function(e){return t(e)&&e.selected},e.hasFocus=function(e){return t(e)&&!0===e.focused},e.isVisible=n,e.getVisibleParent=function e(t){if(t)return n(t.parent)?t.parent:e(t.parent)}}(t.SelectableTreeNode||(t.SelectableTreeNode={}))},95657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeViewActionTypes=t.isTreeViewActionComponent=t.CompositeTreeNode=t.TreeNode=void 0;const i=n(70655).__importDefault(n(616));var r;!function(e){e.equals=function(e,t){return e===t||!!e&&!!t&&e.id===t.id},e.isVisible=function(e){return!!e&&(void 0===e.visible||e.visible)}}(r=t.TreeNode||(t.TreeNode={})),function(e){function t(e,t){const i=e.children,r=i.findIndex((e=>e.id===t.id));return-1!==r?(i.splice(r,1,t),n(t,r,e)):(i.push(t),n(t,e.children.length-1,e)),e}function n(e,t,n){const i=n.children[t-1],r=n.children[t+1];Object.assign(e,{parent:n,previousSibling:i,nextSibling:r}),i&&Object.assign(i,{nextSibling:e}),r&&Object.assign(r,{previousSibling:e})}e.is=function(e){return!!e&&"children"in e},e.getFirstChild=function(e){return e.children[0]},e.getLastChild=function(e){return e.children[e.children.length-1]},e.isAncestor=function e(t,n){return!!n&&(!!r.equals(t,n.parent)||e(t,n.parent))},e.indexOf=function(e,t){return t?e.children.findIndex((e=>r.equals(t,e))):-1},e.addChildren=function(e,n){for(const i of n)t(e,i);return e},e.addChild=t,e.removeChild=function(e,t){const n=e.children,i=n.findIndex((e=>e.id===t.id));if(-1===i)return;n.splice(i,1);const{previousSibling:r,nextSibling:o}=t;r&&Object.assign(r,{nextSibling:o}),o&&Object.assign(o,{previousSibling:r})},e.setParent=n}(t.CompositeTreeNode||(t.CompositeTreeNode={})),t.isTreeViewActionComponent=function(e){return"component"in e&&i.default.isValidElement(e.component)},function(e){e[e.TreeNode_Left=0]="TreeNode_Left",e[e.TreeNode_Right=1]="TreeNode_Right",e[e.TreeContainer=2]="TreeContainer"}(t.TreeViewActionTypes||(t.TreeViewActionTypes={}))},93305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createElectronClientConnection=t.IElectronNativeDialogService=t.electronEnv=t.createElectronMainApi=void 0,t.createElectronMainApi=function(e){let t=0;return new Proxy({on:(t,n)=>{const i=(e,i,...r)=>{if(i===t)return n(...r)};return ElectronIpcRenderer.on("event:"+e,i),{dispose:()=>{ElectronIpcRenderer.removeListener("event:"+e,i)}}}},{get:(n,i)=>"on"===i?n[i]:async(...n)=>new Promise(((r,o)=>{const a=t++;ElectronIpcRenderer.send("request:"+e,i,a,...n);const s=(t,n,i,c)=>{if(n===a)if(ElectronIpcRenderer.removeListener("response:"+e,s),i){const e=new Error(i.message);e.stack=i.stack,o(e)}else r(c)};ElectronIpcRenderer.on("response:"+e,s)}))})},t.electronEnv=n.g||{},"undefined"!=typeof ElectronIpcRenderer&&(t.electronEnv.ipcRenderer=ElectronIpcRenderer),t.IElectronNativeDialogService=Symbol("IElectronNativeDialogService"),t.createElectronClientConnection=function(e){let i;i=e?t.electronEnv.createNetConnection(e):t.electronEnv.createRPCNetConnection();const{createSocketConnection:r}=n(34344);return r(i)}},14785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useNativeContextMenu=t.useNativeTopMenu=t.getElectronEnv=void 0;const i=n(90642);function r(){return n.g.env||{}}t.getElectronEnv=r,t.useNativeTopMenu=function(){return!!(0,i.isElectronRenderer)()&&(void 0!==r().USE_NATIVE_TOP_MENU?"1"===r().USE_NATIVE_TOP_MENU:!i.isWindows)},t.useNativeContextMenu=function(){return!!(0,i.isElectronRenderer)()&&(void 0===r().USE_NATIVE_CONTEXT_MENU||"1"===r().USE_NATIVE_CONTEXT_MENU)}},93191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconClass=void 0,t.getIconClass=function(e){const t=e.match(/\$\(([^\)]*)\)(.*)/);return t?[t[1],t[2].trim()]:[null,e]}},30930:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(14785),t),i.__exportStar(n(93305),t),i.__exportStar(n(75539),t),i.__exportStar(n(93191),t),i.__exportStar(n(72051),t),i.__exportStar(n(74784),t)},74784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stripTrailingComma=t.parseWithComments=t.JSONUtils=void 0;const i=n(70655).__importDefault(n(81409));function r(e){const t=[];let n=0,i=!1,r=0;for(;r0?(t.push(e.substr(n)),t.join("")):e}!function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function n(e){return Array.isArray(e)}function i(e,r){if(e===r)return!0;if(t(e)||t(r))return!1;const o=n(e),a=n(r);return o===a&&(o&&a?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseLabel=t.LabelIcon=void 0,function(e){e.is=function(e){return"name"in e}}(t.LabelIcon||(t.LabelIcon={})),t.parseLabel=function(e){const t=[];let n=0,i="";for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePreference=t.useContextMenus=t.useMenus=t.useDisposable=t.useDebounce=void 0;const i=n(70655).__importDefault(n(23279)),r=n(616),o=n(90642),a=n(77887),s=n(98978),c=n(15259);function l(e,t=[]){(0,r.useEffect)((()=>{const t=new o.DisposableStore,n=e();return Array.isArray(n)?n.forEach((e=>{t.add(e)})):t.add(n),()=>{t.dispose()}}),t)}t.useDebounce=function(e,t){const[n,i]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},t.useDisposable=l,t.useMenus=function(e,t,n,o){const[s,c]=(0,r.useState)([[],[]]);return l((()=>{let r=()=>{const i=(0,a.generateInlineActions)({menus:e,separator:t,args:n});c(i)};return o&&(r=(0,i.default)(r,o.delay,{maxWait:o.maxWait})),r(),[e.onDidChange((()=>{r()}))]}),[e,n]),s},t.useContextMenus=function(e){const[t,n]=(0,r.useState)([[],[]]);return l((()=>{function t(e){const t=e.getGroupedMenuNodes();n(t)}return t(e),[e.onDidChange((()=>{t(e)}))]}),[e]),t},t.usePreference=function(e,t){var n;const i=(0,c.useInjectable)(s.PreferenceService),[a,l]=(0,r.useState)(null!==(n=i.get(e,t))&&void 0!==n?n:t);return(0,r.useEffect)((()=>{const t=new o.Disposable(i.onSpecificPreferenceChange(e,(e=>{l(e.newValue)})));return()=>{t.dispose()}}),[]),a}},56336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(58222),t)},58222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariableRegistryImpl=t.VariableRegistry=t.VariableContribution=void 0;const i=n(70655),r=n(39993),o=n(90642);t.VariableContribution=Symbol("VariableContribution"),t.VariableRegistry=Symbol("VariableRegistry");let a=class{constructor(){this.variables=new Map,this.toDispose=new o.DisposableCollection}dispose(){this.toDispose.dispose()}registerVariable(e){if(this.variables.has(e.name))return console.warn(`A variables with name ${e.name} is already registered.`),o.Disposable.NULL;this.variables.set(e.name,e);const t={dispose:()=>this.variables.delete(e.name)};return this.toDispose.push(t),t}getVariables(){return[...this.variables.values()]}getVariable(e){return this.variables.get(e)}registerVariables(e){return e.map((e=>this.registerVariable(e)))}};a=i.__decorate([(0,r.Injectable)()],a),t.VariableRegistryImpl=a},68037:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowService=void 0,t.IWindowService=Symbol("WindowService")},25943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(29277),s=n(71898),c=n(11792),l=n(93305);let d=class{openNewWindow(e,t){if(!this.appConfig.isElectronRenderer){if(null==t?void 0:t.external){e=this.injector.get(c.IExternalUriService).resolveExternalUri(new o.URI(e)).toString(!0)}const n=window.open(e);if(null===n)throw new Error("Cannot open a new window for URL: "+e);return n}this.injector.get(a.IElectronMainUIService).openExternal(e)}openWorkspace(e,t={}){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");{const n=this.injector.get(a.IElectronMainLifeCycleService);t.newWindow?n.openWorkspace(e.toString()):n.openWorkspace(e.toString(),{windowId:l.electronEnv.currentWindowId,replace:!0})}}close(){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");window.close()}maximize(){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");this.injector.get(a.IElectronMainLifeCycleService).maximizeWindow(l.electronEnv.currentWindowId)}unmaximize(){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");this.injector.get(a.IElectronMainLifeCycleService).unmaximizeWindow(l.electronEnv.currentWindowId)}fullscreen(){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");this.injector.get(a.IElectronMainLifeCycleService).fullscreenWindow(l.electronEnv.currentWindowId)}minimize(){if(!this.appConfig.isElectronRenderer)throw new Error("Method not implemented.");this.injector.get(a.IElectronMainLifeCycleService).minimizeWindow(l.electronEnv.currentWindowId)}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(s.AppConfig),i.__metadata("design:type",Object)],d.prototype,"appConfig",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.WindowService=d},21525:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0,function(e){const t=[];e.declare=function(e,i){if(-1!==t.indexOf(e))throw new Error(`An application error for '${e}' code is already declared`);const r=Object.assign(((...t)=>new n(e,i(...t),r)),{code:e,is(t){if(t instanceof Error&&t.cause){const i=t.cause;return i instanceof n&&i.code===e}return t instanceof n&&t.code===e}});return r},e.is=function(e){return e instanceof n},e.fromJson=function(e,t){return new n(e,t)};class n extends Error{constructor(e,t,i){super(t.message),this.code=e,this.data=t.data,Object.setPrototypeOf(this,n.prototype),t.stack?this.stack=t.stack:Error.captureStackTrace&&i&&Error.captureStackTrace(this,i)}toJson(){const{message:e,data:t,stack:n}=this;return{message:e,data:t,stack:n}}}}(t.ApplicationError||(t.ApplicationError={}))},97677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureDir=void 0;const i=n(70655).__importDefault(n(549)),r=n(41456),o="/";const a=new class{access(e){return new Promise((t=>{i.default.exists(e,(e=>{t(e)}))}))}mkdir(e){return(0,r.promisify)(i.default.mkdir)(e)}};t.ensureDir=async function(e,t=a){const n=(e.startsWith(o)?e.slice(0):e).split(o);let i=0;for(;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=void 0,t.promisify=function(e){return function(...t){const n=this;return new Promise(((i,r)=>{const o=t.concat(((e,t)=>{e&&r(e),i(t)}));e.apply(n,o)}))}}},29217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandServiceImpl=t.CommandRegistryImpl=t.CoreCommandRegistryImpl=t.HANDLER_NOT_FOUND=t.CommandRegistry=t.CommandService=t.CommandContribution=t.Command=void 0;const i=n(70655),r=n(39993),o=n(89065),a=(n(7336),n(15516)),s=n(83972);var c;!function(e){e.is=function(e){return!!e&&e===Object(e)&&"id"in e},e.compareCommands=function(e,t){if(e.label&&t.label){const n=e.category?e.category+e.label:e.label,i=t.category?t.category+t.label:t.label;return n.localeCompare(i)}return 0}}(c=t.Command||(t.Command={})),t.CommandContribution=Symbol("CommandContribution"),t.CommandService=Symbol("CommandService"),t.CommandRegistry=Symbol("CommandRegistry"),t.HANDLER_NOT_FOUND="HANDLER_NOT_FOUND";let l=class{constructor(){this._commands={},this._handlers={},this.unregisterCommands=new Map,this._recent=[],this.preCommandInterceptors=[],this.postCommandInterceptors=[],this.preCommandInterceptorMap=new Map,this.postCommandInterceptor=new Map,this.logger=(0,s.getDebugLogger)()}async executeCommand(e,...n){const i=this.getCommand(e);if(i&&i.delegate)return this.executeCommand(i.delegate,...n);const r=this.preCommandInterceptorMap.get(e),o=(null!=r?r:[]).map((e=>(t,n)=>e(n))),a=[...o,...this.preCommandInterceptors];for(const t of a){const i=await t(e,n);if(!1===i)return void this.logger.log(`command ${e} is prevented by pre interceptor`,t.name);Array.isArray(i)&&(n=i)}const s=this.getActiveHandler(e,...n);if(s){let t=await s.execute(...n);const i=this.postCommandInterceptor.get(e);if(i)for(const e of i)t=await e(t);for(const n of this.postCommandInterceptors)t=await n(e,t);return t}let c="";try{c=n&&n.length>0?` (args: ${JSON.stringify(n)})`:""}catch(e){c="args cannot be convert to JSON"}const l=new Error(`The command '${e}' cannot be executed. There are no active handlers available for the command.${c}`);throw l.name=t.HANDLER_NOT_FOUND,l}getCommands(){return Object.keys(this._commands).map((e=>this.getCommand(e)))}registerCommand(e,t){if(this._commands[e.id])return this.logger.warn(`A command ${e.id} is already registered.`),o.Disposable.NULL;const n=new o.Disposable;return n.addDispose(this.doRegisterCommand(e)),t&&n.addDispose(this.registerHandler(e.id,t)),this.unregisterCommands.set(e.id,n),n.addDispose(o.Disposable.create((()=>this.unregisterCommands.delete(e.id)))),n}unregisterCommand(e){const t=c.is(e)?e.id:e,n=this.unregisterCommands.get(t);n&&n.dispose()}registerHandler(e,t){let n=this._handlers[e];return n||(this._handlers[e]=n=[]),n.unshift(t),{dispose:()=>{const e=n.indexOf(t);e>=0&&n.splice(e,1)}}}isEnabled(e,...t){return!this._handlers[e]||void 0!==this.getActiveHandler(e,...t)}isVisible(e,...t){return!this._handlers[e]||void 0!==this.getVisibleHandler(e,...t)}isToggled(e,...t){const n=this.getToggledHandler(e);return!(!n||!n.isToggled)&&n.isToggled(...t)}getVisibleHandler(e,...t){const n=this._handlers[e];if(n)for(const e of n)if(!e.isVisible||e.isVisible(...t))return e}getActiveHandler(e,...t){const n=this.getCommand(e);if(n&&n.delegate)return this.getActiveHandler(n.delegate,...t);const i=this._handlers[e];if(i)for(const e of i)if(!e.isEnabled||e.isEnabled(...t))return e}isPermittedCommand(e,t,...n){const i=this.getCommand(e);if(i&&i.delegate)return this.isPermittedCommand(i.delegate,t,...n);const r=this._handlers[e];return!Array.isArray(r)||r.every((e=>!e.isPermitted||e.isPermitted(t,...n)))}getToggledHandler(e){const t=this._handlers[e];if(t)for(const e of t)if(e.isToggled)return e}getRawCommand(e){return this._commands[e]}getCommand(e){const t=this._commands[e];return t?Object.assign(Object.assign({},t),{label:(0,a.replaceLocalizePlaceholder)(t.label),category:(0,a.replaceLocalizePlaceholder)(t.category)}):void 0}doRegisterCommand(e){return this._commands[e.id]=e,{dispose:()=>{delete this._commands[e.id]}}}beforeExecuteCommand(e,t){if("string"==typeof e){const n=this.preCommandInterceptorMap.get(e);return n?t&&n.push(t):t&&this.preCommandInterceptorMap.set(e,[t]),{dispose:()=>{const n=this.preCommandInterceptorMap.get(e);if(n&&t){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}}return this.preCommandInterceptors.push(e),{dispose:()=>{const t=this.preCommandInterceptors.indexOf(e);-1!==t&&this.preCommandInterceptors.splice(t,1)}}}afterExecuteCommand(e,t){if("string"==typeof e){const n=this.postCommandInterceptor.get(e);return n?t&&n.push(t):t&&this.postCommandInterceptor.set(e,[t]),{dispose:()=>{const n=this.postCommandInterceptor.get(e);if(n&&t){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}}return this.postCommandInterceptors.push(e),{dispose:()=>{const t=this.postCommandInterceptors.indexOf(e);-1!==t&&this.postCommandInterceptors.splice(t,1)}}}getRecentCommands(){return this._recent}setRecentCommands(e){return e.forEach((e=>{this.addRecentCommand(e)})),this._recent}addRecentCommand(e){if(!e||!e.label)return;const t=this._recent.findIndex((t=>t.id===e.id));t>=0&&this._recent.splice(t,1),this._recent.unshift(e)}};l=i.__decorate([(0,r.Injectable)()],l),t.CoreCommandRegistryImpl=l;let d=class extends l{initialize(){const e=this.contributionProvider.getContributions();for(const t of e)t.registerCommands(this)}};i.__decorate([(0,r.Autowired)(t.CommandContribution),i.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.CommandRegistryImpl=d;let u=class{executeCommand(e,...t){return this.commandRegistry.executeCommand(e,...t)}async tryExecuteCommand(e,...t){try{return await this.executeCommand(e,...t)}catch(e){(0,s.getDebugLogger)().warn(e)}}};i.__decorate([(0,r.Autowired)(t.CommandRegistry),i.__metadata("design:type",d)],u.prototype,"commandRegistry",void 0),u=i.__decorate([(0,r.Injectable)()],u),t.CommandServiceImpl=u},73699:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TERMINAL_COMMANDS=void 0,function(e){const t="%terminal.name%";e.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:t},e.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:t},e.SPLIT={id:"terminal.split",label:"%terminal.split%",category:t},e.ADD={id:"terminal.add",label:"%terminal.new%",category:t},e.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:t},e.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:t},e.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:t},e.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:t},e.OPEN_WITH_PATH={id:"terminal.openWithPath",category:t},e.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:t},e.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%"},e.TAB_RENAME={id:"terminal.tabRename"},e.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%"},e.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%"},e.SELECT_TYPE={id:"terminal.selectType"},e.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh"},e.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash"},e.SELECT_SH={id:"terminal.selectTypeSh",label:"sh"},e.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd"},e.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell"},e.COPY={id:"terminal.copy",label:"%edit.copy%"},e.PASTE={id:"terminal.paste",label:"%edit.paste%"},e.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:t},e.RE_LAUNCH={id:"terminal.relaunch"}}(t.TERMINAL_COMMANDS||(t.TERMINAL_COMMANDS={}))},23065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareRangesUsingStarts=t.compareByPrefix=t.compareAnything=t.comparePaths=t.compareFileNames=void 0;const i=n(89065),{sep:r}=i.path,o=new i.IdleValue((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));function a(e,t,n=!1){const i=e||"",r=t||"",a=o.getValue().collator.compare(i,r);return o.getValue().collatorIsNumeric&&0===a&&i!==r?ir.length)return 1}return 0}t.compareFileNames=a,t.comparePaths=function(e,t,n=!1){const i=e.split(r),o=t.split(r),c=i.length-1,l=o.length-1;let d,u;for(let e=0;;e++){if(d=c===e,u=l===e,d&&u)return a(i[e],o[e],n);if(d)return-1;if(u)return 1;const t=s(i[e],o[e],n);if(0!==t)return t}},t.compareAnything=function(e,t,n){const i=e.toLowerCase(),r=t.toLowerCase(),o=c(e,t,n);if(o)return o;const s=i.endsWith(n);if(s!==r.endsWith(n))return s?-1:1;const l=a(i,r);return 0!==l?l:i.localeCompare(r)},t.compareByPrefix=c,t.compareRangesUsingStarts=function(e,t){if(e&&t){const n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){const n=0|e.startColumn,i=0|t.startColumn;if(n===i){const n=0|e.endLineNumber,i=0|t.endLineNumber;if(n===i){return(0|e.endColumn)-(0|t.endColumn)}return n-i}return n-i}return n-i}return(e?1:0)-(t?1:0)}},91416:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserConnectionErrorEvent=t.BrowserConnectionOpenEvent=t.BrowserConnectionCloseEvent=void 0;const i=n(92455);class r extends i.BasicEvent{}t.BrowserConnectionCloseEvent=r;class o extends i.BasicEvent{}t.BrowserConnectionOpenEvent=o;class a extends i.BasicEvent{}t.BrowserConnectionErrorEvent=a},16296:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_OPENVSX_REGISTRY=t.DEFAULT_URI_SCHEME=t.DEFAULT_APPLICATION_WEB_HOST=t.DEFAULT_APPLICATION_DESKTOP_HOST=t.DEFAULT_APPLICATION_NAME=void 0,t.DEFAULT_APPLICATION_NAME="OpenSumi",t.DEFAULT_APPLICATION_DESKTOP_HOST="desktop",t.DEFAULT_APPLICATION_WEB_HOST="web",t.DEFAULT_URI_SCHEME="sumi",t.DEFAULT_OPENVSX_REGISTRY="https://marketplace.smartide.cn"},30834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(16296),t)},7336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createContributionProvider=t.BaseContributionProvider=t.ContributionProvider=void 0,t.ContributionProvider=Symbol("ContributionProvider");class n{constructor(e,t){this.domain=e,this.injector=t}addContribution(...e){for(const t of e)this.injector.addProviders(t),this.services&&this.services.push(this.injector.get(t))}getContributions(){return this.injector.getFromDomain(this.domain)}reload(){return this.services=this.injector.getFromDomain(this.domain),this.services}}t.BaseContributionProvider=n,t.createContributionProvider=function(e,t){const i=new n(t,e);e.addProviders({token:t,useValue:i})}},49518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INativeCredentialService=t.KeytarServicePath=void 0,t.KeytarServicePath="/services/keytar",t.INativeCredentialService=Symbol("INativeCredentialService")},57507:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INativeCryptoService=t.CryptoServicePath=void 0,t.CryptoServicePath="/services/crypto",t.INativeCryptoService=Symbol("INativeCryptoService")},83913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},48034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainConstructors=t.EffectDomain=t.Domain=void 0;const i=n(39993);t.Domain=function(...e){return t=>{const n=(0,i.getInjectableOpts)(t)||{};n.domain=e,(0,i.markInjectable)(t,n)}};const r=new Map;t.EffectDomain=function(e){return t=>{const n=(0,i.getInjectableOpts)(t)||{};n.domain=e,(0,i.markInjectable)(t,n);r.get(e)||r.set(e,t)}},t.getDomainConstructors=function(...e){const t=new Set;for(const n of e){const e=r.get(n);e?t.add(e):console.error(`娌℃湁鑾峰彇鍒� ${String(n)} 瀵瑰簲鐨凜onstructor锛乣)}return Array.from(t)}},18570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(48034),t)},46813:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CUSTOM_EDITOR_SCHEME=void 0,t.CUSTOM_EDITOR_SCHEME="vscode_customEditor"},29277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IElectronURLService=t.IElectronMainLifeCycleService=t.IElectronMainUIService=void 0,t.IElectronMainUIService="IElectronMainUIService",t.IElectronMainLifeCycleService="IElectronMainLifeCycleService",t.IElectronURLService="IElectronURLService"},36436:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstSessionDateStorageKey=void 0,t.firstSessionDateStorageKey="sumi.env.firstSessionDate"},8028:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicEvent=void 0;t.BasicEvent=class{constructor(e){this.payload=e}}},64768:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEventBus=void 0,t.IEventBus=Symbol("IEventBus")},88435:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBusImpl=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(8028);let s=class{constructor(){this.emitterMap=new Map}fire(e,t={}){const n=e&&e.constructor;if("function"==typeof n&&a.BasicEvent.isPrototypeOf(n)){const t=this.emitterMap.get(n);t&&t.fire(e)}}async fireAndAwait(e,t={timeout:2e3}){const n=e&&e.constructor;if("function"==typeof n&&a.BasicEvent.isPrototypeOf(n)){const i=this.emitterMap.get(n);if(i)return i.fireAndAwait(e,t.timeout)}return[]}on(e,t){return this.getOrCreateEmitter(e).event(t)}once(e,t){const n=this.getOrCreateEmitter(e);return o.Event.once(n.event)(t)}getOrCreateEmitter(e){const t=this.emitterMap.get(e);if(t)return t;const n=new o.Emitter;return this.emitterMap.set(e,n),n}};s=i.__decorate([(0,r.Injectable)()],s),t.EventBusImpl=s},7726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnEvent=t.WithEventBus=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(64768),s=Symbol("EVENT_TOKEN");class c extends o.Disposable{constructor(...e){super(...e);const t=Reflect.getMetadata(s,this)||new Map;for(const[e,n]of t.entries()){const t=this.eventBus.on(n,(t=>this[e](t)));this.addDispose(t)}}}i.__decorate([(0,r.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],c.prototype,"eventBus",void 0),t.WithEventBus=c,t.OnEvent=function(e){return(t,n,i)=>{const r=Reflect.getMetadata(s,t)||new Map;r.set(n,e),Reflect.defineMetadata(s,r,t)}}},92455:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(8028),t),i.__exportStar(n(64768),t),i.__exportStar(n(88435),t),i.__exportStar(n(7726),t)},47059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WASMInterface=t.MAX_HEAP=void 0;const i=n(95005),r=n(33408);t.MAX_HEAP=16384;const o=new i.Mutex,a=new Map;t.WASMInterface=async function(e,n){let i=null,s=null,c=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const l=()=>new DataView((null==i?void 0:i.exports).memory.buffer).getUint32((null==i?void 0:i.exports).STATE_SIZE,!0),d=o.dispatch((async()=>{if(!a.has(e.name)){const t=(0,r.decodeBase64)(e.data),n=WebAssembly.compile(t);a.set(e.name,n)}const t=await a.get(e.name);i=await WebAssembly.instantiate(t)})),u=(e=null)=>{c=!0,(null==i?void 0:i.exports).Hash_Init(e)},p=e=>{if(!c)throw new Error("update() called before init()");(e=>{let n=0;for(;n{if(!c)throw new Error("digest() called before init()");return c=!1,(null==i?void 0:i.exports).Hash_Final(t),"binary"===e?s.slice(0,n):(0,r.getDigestHex)(h,s,n)},g=e=>"string"==typeof e?e.length!0;break;case"blake2b":case"blake2s":f=(e,t)=>t<=512&&g(e);break;case"blake3":f=(e,t)=>0===t&&g(e);break;case"xxhash64":case"xxhash3":case"xxhash128":f=()=>!1}return await(async()=>{i||await d;const e=(null==i?void 0:i.exports).Hash_GetBuffer(),n=(null==i?void 0:i.exports).memory.buffer;s=new Uint8Array(n,e,t.MAX_HEAP)})(),{getMemory:()=>s,writeMemory:(e,t=0)=>{null==s||s.set(e,t)},getExports:()=>null==i?void 0:i.exports,setMemorySize:e=>{(null==i?void 0:i.exports).Hash_SetMemorySize(e);const t=(null==i?void 0:i.exports).Hash_GetBuffer(),n=(null==i?void 0:i.exports).memory.buffer;s=new Uint8Array(n,t,e)},init:u,update:p,digest:m,save:()=>{if(!c)throw new Error("save() can only be called after init() and before digest()");const t=(null==i?void 0:i.exports).Hash_GetState(),n=l(),o=(null==i?void 0:i.exports).memory.buffer,a=new Uint8Array(o,t,n),s=new Uint8Array(4+n);return(0,r.writeHexToUInt8)(s,e.hash),s.set(a,4),s},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const n=(null==i?void 0:i.exports).Hash_GetState(),o=l(),a=4+o,s=(null==i?void 0:i.exports).memory.buffer;if(t.length!==a)throw new Error(`Bad state length (expected ${a} bytes, got ${t.length})`);if(!(0,r.hexStringEqualsUInt8)(e.hash,t.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const d=t.subarray(4);new Uint8Array(s,n,o).set(d),c=!0},calculate:(e,t=null,o=null)=>{if(!f(e,t))return u(t),p(e),m("hex",o);const a=(0,r.getUInt8Buffer)(e);return null==s||s.set(a),(null==i?void 0:i.exports).Hash_Calculate(a.length,t,o),(0,r.getDigestHex)(h,s,n)},hashLength:n}}},55229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashCalculateServiceImpl=t.IHashCalculateService=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(60052),s=i.__importDefault(n(23888)),c=n(95005);t.IHashCalculateService=Symbol("IHashCalculateService");let l=class{constructor(){this._initialized=!1}get initialized(){return this._initialized}async initialize(){this.cachedCalculator||(this.cachedCalculator=await function(){const e=new c.Mutex;return(0,a.lockedCreate)(e,s.default,16)}()),this._initialized=!0}calculate(e){if(!this.initialized)throw new Error("Please call #initialize first!");return this.cachedCalculator.calculate(e)}};i.__decorate([o.memoize,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],l.prototype,"initialize",null),l=i.__decorate([(0,r.Injectable)()],l),t.HashCalculateServiceImpl=l},60052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lockedCreate=void 0;const i=n(47059);t.lockedCreate=async function(e,t,n){const r=await e.lock(),o=await(0,i.WASMInterface)(t,n);return r(),o}},95005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mutex=void 0;t.Mutex=class{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then((()=>new Promise(e))),new Promise((t=>{e=t}))}async dispatch(e){const t=await this.lock();try{return await Promise.resolve(e())}finally{t()}}}},33408:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase64=t.getDecodeBase64Length=t.encodeBase64=t.getUInt8Buffer=t.getDigestHex=t.hexStringEqualsUInt8=t.writeHexToUInt8=t.intArrayToString=void 0;const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,o=null!==(i=r.Buffer)&&void 0!==i?i:null,a=r.TextEncoder?new r.TextEncoder:null;function s(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}t.intArrayToString=function(e,t){return String.fromCharCode(...e.subarray(0,t))},t.writeHexToUInt8=function(e,t){const n=t.length>>1;for(let i=0;i>>4;e[i++]=n>9?n+c:n+l,n=15&t[r],e[i++]=n>9?n+c:n+l}return String.fromCharCode.apply(null,e)},t.getUInt8Buffer=null!==o?e=>{if("string"==typeof e){const t=o.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(o.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return a.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")};const d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=new Uint8Array(256);for(let e=0;e>18&63)+d.charAt(n>>12&63)+d.charAt(n>>6&63)+d.charAt(63&n);r.push(i)}if(1===i){const i=e[n-1],o=d.charAt(i>>2),a=d.charAt(i<<4&63);r.push(`${o}${a}`),t&&r.push("==")}else if(2===i){const i=(e[n-2]<<8)+e[n-1],o=d.charAt(i>>10),a=d.charAt(i>>4&63),s=d.charAt(i<<2&63);r.push(`${o}${a}${s}`),t&&r.push("=")}return r.join("")},t.getDecodeBase64Length=p,t.decodeBase64=function(e){const t=p(e),n=e.length,i=new Uint8Array(t);let r=0;for(let t=0;t>4,r+=1,i[r]=(15&o)<<4|a>>2,r+=1,i[r]=(3&a)<<6|63&s,r+=1}return i}},90642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(18570),t),i.__exportStar(n(92455),t),i.__exportStar(n(7336),t),i.__exportStar(n(83913),t),i.__exportStar(n(46813),t),i.__exportStar(n(19257),t),i.__exportStar(n(82180),t),i.__exportStar(n(29217),t),i.__exportStar(n(80761),t),i.__exportStar(n(15516),t),i.__exportStar(n(65941),t),i.__exportStar(n(97677),t),i.__exportStar(n(15253),t),i.__exportStar(n(51085),t),i.__exportStar(n(71798),t),i.__exportStar(n(3039),t),i.__exportStar(n(83972),t),i.__exportStar(n(17189),t),i.__exportStar(n(82093),t),i.__exportStar(n(91416),t),i.__exportStar(n(23065),t),i.__exportStar(n(71913),t),i.__exportStar(n(2745),t),i.__exportStar(n(46764),t),i.__exportStar(n(29705),t),i.__exportStar(n(72679),t),i.__exportStar(n(77482),t),i.__exportStar(n(29534),t),i.__exportStar(n(28564),t),i.__exportStar(n(36436),t),i.__exportStar(n(49518),t),i.__exportStar(n(57507),t),i.__exportStar(n(12642),t),i.__exportStar(n(85767),t),i.__exportStar(n(1755),t)},17189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29534:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(88330),t),i.__exportStar(n(60706),t)},60706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardLayoutChangeNotifierService=t.KeyboardNativeLayoutService=t.keyboardPath=void 0,t.keyboardPath="/services/keyboard",t.KeyboardNativeLayoutService=Symbol("KeyboardNativeLayoutService"),t.KeyboardLayoutChangeNotifierService=Symbol("KeyboardLayoutChangeNotifierService")},88330:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapInfo=t.getKeyboardLayoutId=void 0;const i=n(89065);function r(e){return e.name?e.name:e.id?e.id:e.layout}t.getKeyboardLayoutId=r;class o{constructor(e,t,n,i){this.layout=e,this.secondaryLayouts=t,this.mapping=function(e){const t=e,n={};for(const e in t){const i=t[e];if(i.length){const t=i[0],r=i[1],o=i[2],a=i[3],s=Number(i[4]),c=6===i.length?i[5]:void 0;n[e]={value:t,vkey:c,withShift:r,withAltGr:o,withShiftAltGr:a,valueIsDeadKey:(1&s)>0,withShiftIsDeadKey:(2&s)>0,withAltGrIsDeadKey:(4&s)>0,withShiftAltGrIsDeadKey:(8&s)>0}}else n[e]={value:"",valueIsDeadKey:!1,withShift:"",withShiftIsDeadKey:!1,withAltGr:"",withAltGrIsDeadKey:!1,withShiftAltGr:"",withShiftAltGrIsDeadKey:!1}}return n}(n),this.isUserKeyboardLayout=!!i,this.layout.isUserKeyboardLayout=!!i}static createKeyboardLayoutFromDebugInfo(e,t,n){const i=new o(e,[],{},!0);return i.mapping=t,i}update(e){this.layout=e.layout,this.secondaryLayouts=e.secondaryLayouts,this.mapping=e.mapping,this.isUserKeyboardLayout=e.isUserKeyboardLayout,this.layout.isUserKeyboardLayout=e.isUserKeyboardLayout}getScore(e){let t=0;for(const n in e){if(i.isWindows&&("Backslash"===n||"KeyQ"===n))continue;if(i.isLinux&&("Backspace"===n||"Escape"===n))continue;const r=this.mapping[n];void 0===r&&(t-=1);const o=e[n];r&&o&&r.value!==o.value&&(t-=1)}return t}equal(e){return this.isUserKeyboardLayout===e.isUserKeyboardLayout&&(r(this.layout)===r(e.layout)&&this.fuzzyEqual(e.mapping))}fuzzyEqual(e){for(const t in e){if(i.isWindows&&("Backslash"===t||"KeyQ"===t))continue;if(void 0===this.mapping[t])return!1;const n=this.mapping[t],r=e[t];if(n.value!==r.value)return!1}return!0}}t.KeymapInfo=o},77482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTextLines=void 0;t.BasicTextLines=class{constructor(e,t){this._lines=e,this._eol=t}getContent(){return this._lines.join(this._eol)}_setLineText(e,t){this._lines[e]=t}acceptEol(e){this._eol=e}acceptChange(e){this._acceptDeleteRange(e.range),this._acceptInsertText({lineNumber:e.range.startLineNumber,column:e.range.startColumn},e.text||"")}_getLineContent(e){return this._lines[e]||""}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._getLineContent(e.startLineNumber-1).substring(0,e.startColumn-1)+this._getLineContent(e.endLineNumber-1).substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._getLineContent(e.startLineNumber-1).substring(0,e.startColumn-1)+this._getLineContent(e.startLineNumber-1).substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;const n=t.split(/\r\n|\r|\n/);if(1===n.length)return void this._setLineText(e.lineNumber-1,this._getLineContent(e.lineNumber-1).substring(0,e.column-1)+n[0]+this._getLineContent(e.lineNumber-1).substring(e.column-1));n[n.length-1]+=this._getLineContent(e.lineNumber-1).substring(e.column-1),this._setLineText(e.lineNumber-1,this._getLineContent(e.lineNumber-1).substring(0,e.column-1)+n[0]);const i=new Uint32Array(n.length-1);for(let t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceNlsField=t.replaceLocalizePlaceholder=t.getAvailableLanguages=t.setLanguageId=t.getCurrentLanguageInfo=t.getCodeLanguage=t.getLanguageId=t.registerLocalizationBundle=t.formatLocalize=t.localize=void 0;const i=n(89065),{format:r,mnemonicButtonLabel:o}=i.strings;let a="zh-CN";const s=new i.CaseInsensitiveMap;function c(e,t,n="host",i=a){return d(n).getLocalizeString(e,t,i)}t.localize=c,t.formatLocalize=function(e,...t){return r(c(e),...t)},t.registerLocalizationBundle=function(e,t="host"){return d(t).registerLocalizationBundle(e)};class l{constructor(){this.localizationMap=new i.CaseInsensitiveMap,this.localizationInfo=new i.CaseInsensitiveMap}registerLocalizationBundle(e){const t=e.languageId;if(!t)return;const n=this.getContents(t);Object.keys(e.contents).forEach((t=>{const i=e.contents[t];let r;var a;r="object"==typeof(a=i)&&a.message?i.message:i,n[t]=o(r,!0)})),this.localizationInfo.has(t)||this.localizationInfo.set(t,Object.assign({},e,{contents:void 0}))}getLocalizeString(e,t,n=a){return this.getContents(n)[e]||this.getContents("default")[e]||t||""}getContents(e="zh-CN"){return e?(this.localizationMap.has(e)||this.localizationMap.set(e,{}),this.localizationMap.get(e)):{}}getAllLanguages(){return Array.from(this.localizationInfo.values())}}function d(e){return s.has(e)||s.set(e,new l),s.get(e)}t.getLanguageId=function(e="host"){return a},t.getCodeLanguage=function(){var e;const t=a.toLowerCase();return null!==(e={"en-us":"en"}[t])&&void 0!==e?e:t},t.getCurrentLanguageInfo=function(e="host"){return d(e).localizationInfo.get(a)},t.setLanguageId=function(e){a=e},t.getAvailableLanguages=function(e="host"){return d(e).getAllLanguages()},t.replaceLocalizePlaceholder=function(e,t){return e?e.replace(/%(.*?)%/g,((e,n)=>c(n,e,t).replace(/\"/g,'\\"'))):e},t.replaceNlsField=function(e,t,n,i=a){if(e){const r=/^%([\w\d.-]+)%$/i.exec(e);if(r)return c(r[1],n,t,i)}return e}},83972:(e,t,n)=>{"use strict";var i=n(63634);Object.defineProperty(t,"__esModule",{value:!0}),t.getDebugLogger=t.ILogger=t.DebugLog=t.ILoggerManagerClient=t.LogServiceForClientPath=t.ILogServiceManager=t.SupportLogNamespace=t.LogLevel=void 0,function(e){e[e.Verbose=0]="Verbose",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(t.LogLevel||(t.LogLevel={})),function(e){e.Main="main",e.Render="render",e.Node="node",e.Browser="browser",e.ExtensionHost="extHost",e.App="app",e.OTHER="other"}(t.SupportLogNamespace||(t.SupportLogNamespace={})),t.ILogServiceManager=Symbol("ILogServiceManager"),t.LogServiceForClientPath="LogServiceForClientPath",t.ILoggerManagerClient=Symbol("ILoggerManagerClient");const r=void 0!==i&&i.release,o=!r&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);class a{constructor(e){this.isEnable=!1,this.verbose=(...e)=>{if(this.isEnable)return console.debug(this.getPre("verbose","green"),...e)},this.debug=(...e)=>{if(this.isEnable)return console.debug(this.getPre("debug","blue"),...e)},this.log=(...e)=>{if(this.isEnable)return console.log(this.getPre("log","green"),...e)},this.error=(...e)=>console.error(this.getPre("error","red"),...e),this.warn=(...e)=>{if(this.isEnable)return console.warn(this.getPre("warn","yellow"),...e)},this.info=(...e)=>{if(this.isEnable)return console.info(this.getPre("log","green"),...e)},void 0!==i&&{IS_DEV:!1}.KTLOG_SHOW_DEBUG&&(this.isEnable=!0),this.namespace=e||""}getPre(e,t){const n=this.namespace?`[${this.namespace}:${e}]`:`[${e}]`;return this.getColor(t,n)}getColor(e,t){if(!r&&!o)return t;const n={reset:"",black:"",red:"",green:"",yellow:"3[33m",blue:"",magenta:"",cyan:"",white:"",blackBg:"",redBg:"",greenBg:"",yellowBg:"",blueBg:"",magentaBg:"",cyanBg:"",whiteBg:""};return(n[e]||"")+t+n.reset}destroy(){}}t.DebugLog=a,t.ILogger=Symbol("ILogger"),t.getDebugLogger=function(e){const t=new a(e);return{get verbose(){return t.verbose},get log(){return t.log},get debug(){return t.debug},get error(){return t.error},get info(){return t.info},get warn(){return t.warn},destroy(){}}}},12642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toMarkdownString=void 0,t.toMarkdownString=function(e,t){return Object.assign({value:e},t)}},80761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IElectronMainMenuService=void 0,t.IElectronMainMenuService="IElectronMainMenuService"},82180:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleDependencies=t.BasicModule=void 0;const i=n(70655),r=n(39993);class o{}i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],o.prototype,"injector",void 0),t.BasicModule=o,t.ModuleDependencies=function(e){return t=>{Reflect.defineMetadata("dependencies",e,t)}}},3039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schemes=void 0,function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.userData="vscode-userdata",e.userStorage="user_storage"}(t.Schemes||(t.Schemes={}))},72679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findFreePortFaster=t.findFreePort=t.randomPort=void 0;const i=n(70655).__importDefault(n(17274));function r(e,t,n){if(0===t)return n(0);const a=new i.default.Socket;a.once("connect",(()=>(o(a),r(e+1,t-1,n)))),a.once("data",(()=>{})),a.once("error",(i=>(o(a),"ECONNREFUSED"!==i.code?r(e+1,t-1,n):n(e)))),a.connect(e,"0.0.0.0")}function o(e){try{e.removeAllListeners("connect"),e.removeAllListeners("error"),e.end(),e.destroy(),e.unref()}catch(e){console.error(e)}}t.randomPort=function(){return 1025+Math.floor(64510*Math.random())},t.findFreePort=function(e,t,n){let i=!1;return new Promise((o=>{const a=setTimeout((()=>{if(!i)return i=!0,o(0)}),n);r(e,t,(e=>{if(!i)return i=!0,clearTimeout(a),o(e)}))}))},t.findFreePortFaster=function(e,t,r){let o,a=!1,s=1;const c=i.default.createServer({pauseOnConnect:!0});function l(e,t){a||(a=!0,c.removeAllListeners(),c.close(),o&&clearTimeout(o),t(e))}return new Promise((i=>{o=n.g.setTimeout((()=>{l(0,i)}),r),c.on("listening",(()=>{l(e,i)})),c.on("error",(n=>{n&&("EADDRINUSE"===n.code||"EACCES"===n.code)&&s{l(0,i)})),c.listen(e,"0.0.0.0")}))}},51085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(11495),t),i.__exportStar(n(80143),t)},11495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreferenceDataProperty=t.PreferenceSchemaProperties=t.PreferenceSchema=void 0;const i=n(80143);var r;!function(e){e.is=function(e){return!!e&&"properties"in e&&r.is(e.properties)},e.getDefaultScope=function(e){let t=i.PreferenceScope.Workspace;return t=i.PreferenceScope.is(e.scope)?e.scope:i.PreferenceScope.fromString(e.scope)||i.PreferenceScope.Workspace,t}}(t.PreferenceSchema||(t.PreferenceSchema={})),function(e){e.is=function(e){return!!e&&"object"==typeof e}}(r=t.PreferenceSchemaProperties||(t.PreferenceSchemaProperties={})),function(e){e.fromPreferenceSchemaProperty=function(e,t=i.PreferenceScope.Workspace){if(e.scope){if("string"==typeof e.scope)return Object.assign(e,{scope:i.PreferenceScope.fromString(e.scope)||t})}else e.scope=t;return e}}(t.PreferenceDataProperty||(t.PreferenceDataProperty={}))},80143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_WORKSPACE_STORAGE_DIR_NAME=t.PreferenceScope=void 0,function(e){e[e.Default=0]="Default",e[e.User=1]="User",e[e.Workspace=2]="Workspace",e[e.Folder=3]="Folder"}(t.PreferenceScope||(t.PreferenceScope={})),function(e){function t(){return Object.keys(e).filter((t=>"string"==typeof e[t])).map((e=>Number(e)))}e.is=function(e){return"number"==typeof e&&t().findIndex((t=>t===e))>=0},e.getScopes=t,e.getReversedScopes=function(){return t().reverse()},e.getScopeNames=function(t){const n=[],i=Object.keys(e).filter((t=>"number"==typeof e[t]));if(t)for(const r of i)e[r]<=t&&n.push(r);return n},e.fromString=function(t){switch(t){case"application":return e.User;case"window":case"resource":return e.Folder}}}(t.PreferenceScope||(t.PreferenceScope={})),t.DEFAULT_WORKSPACE_STORAGE_DIR_NAME=".sumi"},46764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemMatchersRegistryImpl=t.IProblemMatcherRegistry=t.WatchingMatcher=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(2745);var s;!function(e){e.fromWatchingMatcherContribution=function(e){if(e)return{activeOnStart:!!e.activeOnStart,beginsPattern:"string"==typeof e.beginsPattern?{regexp:e.beginsPattern}:e.beginsPattern,endsPattern:"string"==typeof e.endsPattern?{regexp:e.endsPattern}:e.endsPattern}}}(s=t.WatchingMatcher||(t.WatchingMatcher={})),t.IProblemMatcherRegistry=Symbol("IProblemMatcherRegistry");let c=class{constructor(){this.onDidChangeProblemMatcherEmitter=new o.Emitter,this.matchers=new Map,this.get=e=>e.startsWith("$")?this.matchers.get(e.slice(1)):this.matchers.get(e),this.init()}init(){this.fillDefaults()}getAll(){const e=[];for(const t of this.matchers.keys())e.push(this.get(t));return e.sort(((e,t)=>e.name.localeCompare(t.name))),e}register(e){if(!e.name)return console.error("Only named Problem Matchers can be registered."),o.Disposable.NULL;const t=new o.DisposableCollection(o.Disposable.create((()=>{this.onDidChangeProblemMatcherEmitter.fire(void 0)})));return this.doRegister(e,t).then((()=>this.onDidChangeProblemMatcherEmitter.fire(void 0))),t}async doRegister(e,t){const n=await this.getProblemMatcherFromContribution(e);t.disposed||t.push(this.add(n))}add(e){return this.matchers.set(e.name,e),o.Disposable.create((()=>this.matchers.delete(e.name)))}async getProblemMatcherFromContribution(e){let t,n,i;if(e.base&&(t=this.get(e.base)),void 0===e.fileLocation)n=t?t.fileLocation:a.FileLocationKind.Relative,i=t?t.filePrefix:"${workspaceFolder}";else{const t=this.getFileLocationKindAndPrefix(e);n=t.fileLocation,i=t.filePrefix}const r=[];if(e.pattern)if("string"==typeof e.pattern){await this.problemPattern.onReady();const t=this.problemPattern.get(e.pattern);Array.isArray(t)?r.push(...t):t&&r.push(t)}else Array.isArray(e.pattern)?r.push(...e.pattern.map((e=>a.ProblemPattern.fromProblemPatternContribution(e)))):r.push(a.ProblemPattern.fromProblemPatternContribution(e.pattern));else t&&r.push(...t.pattern);let o,c=e.deprecated;void 0===c&&t&&(c=t.deprecated),o=void 0===e.applyTo?t?t.applyTo:a.ApplyToKind.allDocuments:a.ApplyToKind.fromString(e.applyTo)||a.ApplyToKind.allDocuments;let l=a.Severity.fromValue(e.severity);void 0===e.severity&&t&&void 0!==t.severity&&(l=t.severity);let d=s.fromWatchingMatcherContribution(e.background||e.watching);void 0===d&&t&&(d=t.watching);return{name:e.name||(t?t.name:void 0),label:e.label||(t?t.label:void 0),deprecated:c,owner:e.owner||(t?t.owner:""),source:e.source||(t?t.source:void 0),applyTo:o,fileLocation:n,filePrefix:i,pattern:r,severity:l,watching:d}}getFileLocationKindAndPrefix(e){let t=a.FileLocationKind.Relative,n="${workspaceFolder}";if(void 0!==e.fileLocation)if(Array.isArray(e.fileLocation)){if(e.fileLocation.length>0){const i=a.FileLocationKind.fromString(e.fileLocation[0]);1===e.fileLocation.length&&i===a.FileLocationKind.Absolute?t=i:2===e.fileLocation.length&&i===a.FileLocationKind.Relative&&e.fileLocation[1]&&(t=i,n=e.fileLocation[1])}}else{const i=a.FileLocationKind.fromString(e.fileLocation);i&&(t=i,i===a.FileLocationKind.Relative&&(n="${workspaceFolder}"))}return{fileLocation:t,filePrefix:n}}fillDefaults(){this.add({name:"msCompile",label:"Microsoft compiler problems",owner:"msCompile",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,pattern:this.problemPattern.get("msCompile")}),this.add({name:"lessCompile",label:"Less problems",deprecated:!0,owner:"lessCompile",source:"less",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,pattern:this.problemPattern.get("lessCompile"),severity:a.Severity.Error}),this.add({name:"gulp-tsc",label:"Gulp TSC Problems",owner:"typescript",source:"ts",applyTo:a.ApplyToKind.closedDocuments,fileLocation:a.FileLocationKind.Relative,filePrefix:"${workspaceFolder}",pattern:this.problemPattern.get("gulp-tsc")}),this.add({name:"jshint",label:"JSHint problems",owner:"jshint",source:"jshint",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,pattern:this.problemPattern.get("jshint")}),this.add({name:"jshint-stylish",label:"JSHint stylish problems",owner:"jshint",source:"jshint",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,pattern:this.problemPattern.get("jshint-stylish")}),this.add({name:"eslint-compact",label:"ESLint compact problems",owner:"eslint",source:"eslint",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,filePrefix:"${workspaceFolder}",pattern:this.problemPattern.get("eslint-compact")}),this.add({name:"eslint-stylish",label:"ESLint stylish problems",owner:"eslint",source:"eslint",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Absolute,pattern:this.problemPattern.get("eslint-stylish")}),this.add({name:"go",label:"Go problems",owner:"go",source:"go",applyTo:a.ApplyToKind.allDocuments,fileLocation:a.FileLocationKind.Relative,filePrefix:"${workspaceFolder}",pattern:this.problemPattern.get("go")})}};i.__decorate([(0,r.Autowired)(a.IProblemPatternRegistry),i.__metadata("design:type",Object)],c.prototype,"problemPattern",void 0),c=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],c),t.ProblemMatchersRegistryImpl=c},2745:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemPatternRegistryImpl=t.IProblemPatternRegistry=t.Severity=t.ProblemMatchData=t.ProblemPattern=t.NamedMultiLineCheckedProblemPattern=t.NamedProblemPattern=t.MultiLineCheckedProblemPattern=t.MultiLineProblemPattern=t.CheckedProblemPattern=t.FileLocationKind=t.ProblemLocationKind=t.ApplyToKind=void 0;const i=n(70655),r=n(39993),o=n(89065);var a,s,c,l,d,u;!function(e){e[e.allDocuments=0]="allDocuments",e[e.openDocuments=1]="openDocuments",e[e.closedDocuments=2]="closedDocuments"}(t.ApplyToKind||(t.ApplyToKind={})),function(e){e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint"}(a||(a={})),function(e){e.fromString=function(t){if(t){if("alldocuments"===(t=t.toLowerCase()))return e.allDocuments;if("opendocuments"===t)return e.openDocuments;if("closeddocuments"===t)return e.closedDocuments}}}(t.ApplyToKind||(t.ApplyToKind={})),function(e){e[e.File=0]="File",e[e.Location=1]="Location"}(s=t.ProblemLocationKind||(t.ProblemLocationKind={})),function(e){e.fromString=function(t){return"file"===(t=t.toLowerCase())?e.File:"location"===t?e.Location:void 0}}(s=t.ProblemLocationKind||(t.ProblemLocationKind={})),function(e){e.fromString=function(t){return"absolute"===(t=t.toLowerCase())?e.Absolute:"relative"===t?e.Relative:void 0}}(t.FileLocationKind||(t.FileLocationKind={})),function(e){e[e.Default=0]="Default",e[e.Relative=1]="Relative",e[e.Absolute=2]="Absolute",e[e.AutoDetect=3]="AutoDetect"}(t.FileLocationKind||(t.FileLocationKind={})),function(e){e.is=function(e){const t=e;return t&&(0,o.isString)(t.regexp)}}(c=t.CheckedProblemPattern||(t.CheckedProblemPattern={})),function(e){e.is=function(e){return e&&(0,o.isArray)(e)}}(l=t.MultiLineProblemPattern||(t.MultiLineProblemPattern={})),function(e){e.is=function(e){if(!l.is(e))return!1;for(const t of e)if(!c.is(t))return!1;return!0}}(d=t.MultiLineCheckedProblemPattern||(t.MultiLineCheckedProblemPattern={})),function(e){e.is=function(e){const t=e;return t&&(0,o.isString)(t.name)}}(t.NamedProblemPattern||(t.NamedProblemPattern={})),function(e){e.is=function(e){const t=e;return t&&(0,o.isString)(t.name)&&(0,o.isArray)(t.patterns)&&d.is(t.patterns)}}(t.NamedMultiLineCheckedProblemPattern||(t.NamedMultiLineCheckedProblemPattern={})),function(e){e.fromProblemPatternContribution=function(e){return{name:e.name,regexp:e.regexp,kind:e.kind?s.fromString(e.kind):void 0,file:e.file,message:e.message,location:e.location,line:e.line,character:e.column||e.character,endLine:e.endLine,endCharacter:e.endColumn||e.endCharacter,code:e.code,severity:e.severity,loop:e.loop}}}(u=t.ProblemPattern||(t.ProblemPattern={})),function(e){e.is=function(e){return"marker"in e}}(t.ProblemMatchData||(t.ProblemMatchData={})),function(e){e[e.Ignore=0]="Ignore",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Log=4]="Log"}(t.Severity||(t.Severity={})),function(e){const t="Errors",n="Warnings",i="Info";e.fromValue=function(t){return(t=t&&t.toLowerCase())?-1!==["error","errors"].indexOf(t)?e.Error:-1!==["warn","warning","warnings"].indexOf(t)?e.Warning:"info"===t?e.Info:"log"===t?e.Log:e.Ignore:e.Ignore},e.toDiagnosticSeverity=function(t){switch(t){case e.Ignore:return a.Hint;case e.Info:case e.Log:return a.Information;case e.Warning:return a.Warning;case e.Error:default:return a.Error}},e.toString=function(r){switch(r){case e.Error:return t;case e.Warning:return n;case e.Info:return i;case e.Log:return"Log";default:return"All"}},e.toArray=function(){return["All",t,n,i,"Log"]}}(t.Severity||(t.Severity={})),t.IProblemPatternRegistry=Symbol("ProblemPatternRegistry");let p=class{constructor(){this.patterns=new Map,this.init()}init(){this.fillDefaults(),this.readyPromise=new Promise(((e,t)=>e(void 0)))}onReady(){return this.readyPromise}register(e){if(Array.isArray(e)){const t=new o.DisposableCollection;return e.forEach((e=>t.push(this.register(e)))),t}if(!e.name)return console.error("Only named Problem Patterns can be registered."),o.Disposable.NULL;const t=u.fromProblemPatternContribution(e);return this.add(t.name,t)}get(e){return e.startsWith("$")?this.patterns.get(e.slice(1)):this.patterns.get(e)}add(e,t){let n;return n=Array.isArray(t)?t.map((t=>Object.assign(t,{name:e}))):Object.assign(t,{name:e}),this.patterns.set(e,n),o.Disposable.create((()=>this.patterns.delete(e)))}fillDefaults(){this.add("msCompile",{regexp:/^(?:\s+\d+\>)?([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+(error|warning|info)\s+(\w{1,2}\d+)\s*:\s*(.*)$/.source,kind:s.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("gulp-tsc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(\d+)\s+(.*)$/.source,kind:s.Location,file:1,location:2,code:3,message:4}),this.add("cpp",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(C\d+)\s*:\s*(.*)$/.source,kind:s.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("csc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(CS\d+)\s*:\s*(.*)$/.source,kind:s.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("vb",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(BC\d+)\s*:\s*(.*)$/.source,kind:s.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("lessCompile",{regexp:/^\s*(.*) in file (.*) line no. (\d+)$/.source,kind:s.Location,message:1,file:2,line:3}),this.add("jshint",{regexp:/^(.*):\s+line\s+(\d+),\s+col\s+(\d+),\s(.+?)(?:\s+\((\w)(\d+)\))?$/.source,kind:s.Location,file:1,line:2,character:3,message:4,severity:5,code:6}),this.add("jshint-stylish",[{regexp:/^(.+)$/.source,kind:s.Location,file:1},{regexp:/^\s+line\s+(\d+)\s+col\s+(\d+)\s+(.+?)(?:\s+\((\w)(\d+)\))?$/.source,line:1,character:2,message:3,severity:4,code:5,loop:!0}]),this.add("eslint-compact",{regexp:/^(.+):\sline\s(\d+),\scol\s(\d+),\s(Error|Warning|Info)\s-\s(.+)\s\((.+)\)$/.source,file:1,kind:s.Location,line:2,character:3,severity:4,message:5,code:6}),this.add("eslint-stylish",[{regexp:/^([^\s].*)$/.source,kind:s.Location,file:1},{regexp:/^\s+(\d+):(\d+)\s+(error|warning|info)\s+(.+?)(?:\s\s+(.*))?$/.source,line:1,character:2,severity:3,message:4,code:5,loop:!0}]),this.add("go",{regexp:/^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?: (.*)$/.source,kind:s.Location,file:2,line:4,character:6,message:7})}};p=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],p),t.ProblemPatternRegistryImpl=p},71913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.positionToRange=void 0,t.positionToRange=function(e){if("number"==typeof e)return{startLineNumber:e,endLineNumber:e,startColumn:1,endColumn:1};{const{lineNumber:t}=e;return{startLineNumber:t,endLineNumber:t,startColumn:1,endColumn:1}}}},19257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ref=t.ReferenceManager=void 0;const i=n(89065);t.ReferenceManager=class{constructor(e){this.factory=e,this.instances=new Map,this.refs=new Map,this._onReferenceAllDisposed=new i.Emitter,this._onInstanceCreated=new i.Emitter,this.onReferenceAllDisposed=this._onReferenceAllDisposed.event,this.onInstanceCreated=this._onInstanceCreated.event,this._creating=new Map}async getReference(e,t){if(!this.instances.has(e)){if(!this._creating.has(e)){const t=(async t=>{const n=await this.factory(e);this.instances.set(e,n),this._onInstanceCreated.fire(n)})();this._creating.set(e,t)}try{await this._creating.get(e)}catch(t){throw this._creating.delete(e),t}}const n=this.createRef(e,t);if(this._creating.get(e)){const t=this._creating.get(e);this._creating.delete(e),t.then((()=>{this.removeRef(e,void 0)}))}return n}getReferenceIfHasInstance(e,t){return this.instances.has(e)?this.createRef(e,t):null}createRef(e,t){const n=this.instances.get(e),i=new r(n,t,(t=>this.createRef(e,t)));return i.addDispose({dispose:()=>{this.removeRef(e,i)}}),this.addRef(e,i),i}addRef(e,t){this.refs.get(e)||this.refs.set(e,[]),this.refs.get(e).push(t)}removeRef(e,t){if(this.refs.get(e)){if(t){const n=this.refs.get(e).indexOf(t);-1!==n&&this.refs.get(e).splice(n,1)}if(0===this.refs.get(e).length){if(this._creating.has(e))return;this.refs.delete(e),this.instances.delete(e),this._onReferenceAllDisposed.fire(e)}}}};class r extends i.Disposable{constructor(e,t,n){super(),this._instance=e,this.reason=t,this._clone=n,this.addDispose({dispose:()=>{this._instance=null,this._clone=null}})}get instance(){if(this.disposed)throw new Error("Ref has been disposed!");return this._instance}hold(e){if(this.disposed)throw new Error("Ref has been disposed!");return this._clone(e)}}t.Ref=r},82093:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReporterService=t.DefaultReporter=void 0;const i=n(70655),r=n(39993),o=n(83972),a=n(72973);class s{constructor(e,t,n){this.name=e,this.reporter=t,this.metadata=n,this.now=Date.now()}timeEnd(e,t){const n=Date.now()-this.now;return this.reporter.performance(this.name,{duration:n,metadata:this.metadata,msg:e,extra:t}),n}}let c=class{constructor(){this.logger=(0,o.getDebugLogger)()}performance(e,t){this.logger.log(e,t)}point(e,t){this.logger.log(e,t)}};c=i.__decorate([(0,r.Injectable)()],c),t.DefaultReporter=c;let l=class{constructor(e,t){this.reporter=e,this.metadata=t}time(e){return new s(e,this.reporter,this.metadata)}point(e,t,n){this.reporter.point(e,{metadata:this.metadata,msg:t,extra:n})}dispose(){}};l=i.__decorate([(0,r.Injectable)(),i.__param(0,(0,r.Inject)(a.IReporter)),i.__param(1,(0,r.Inject)(a.ReporterMetadata)),i.__metadata("design:paramtypes",[Object,Object])],l),t.ReporterService=l},74269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(74269),t),i.__exportStar(n(56855),t),i.__exportStar(n(95945),t)},56855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoragePaths=t.DefaultStorageProvider=t.STORAGE_NAMESPACE=t.STORAGE_SCHEMA=t.StorageResolverContribution=t.StorageProvider=void 0;const i=n(70655),r=n(39993),o=n(89065);n(7336);t.StorageProvider=Symbol("StorageProvider"),t.StorageResolverContribution=Symbol("StorageResolverContribution"),t.STORAGE_SCHEMA={SCOPE:"wsdb",GLOBAL:"gldb"},t.STORAGE_NAMESPACE={WORKBENCH:new o.URI("workbench").withScheme(t.STORAGE_SCHEMA.SCOPE),EXTENSIONS:new o.URI("extensions").withScheme(t.STORAGE_SCHEMA.SCOPE),EXPLORER:new o.URI("explorer").withScheme(t.STORAGE_SCHEMA.SCOPE),LAYOUT:new o.URI("layout").withScheme(t.STORAGE_SCHEMA.SCOPE),RECENT_DATA:new o.URI("recent").withScheme(t.STORAGE_SCHEMA.SCOPE),DEBUG:new o.URI("debug").withScheme(t.STORAGE_SCHEMA.SCOPE),OUTLINE:new o.URI("outline").withScheme(t.STORAGE_SCHEMA.SCOPE),GLOBAL_LAYOUT:new o.URI("layout-global").withScheme(t.STORAGE_SCHEMA.GLOBAL),GLOBAL_EXTENSIONS:new o.URI("extensions").withScheme(t.STORAGE_SCHEMA.GLOBAL),GLOBAL_RECENT_DATA:new o.URI("recent").withScheme(t.STORAGE_SCHEMA.GLOBAL)};let a=class{constructor(){this.storageCacheMap=new Map}async get(e){if(this.storageCacheMap.has(e.toString()))return this.storageCacheMap.get(e.toString());const t=this.resolversProvider.getContributions();for(const n of t){const t=await n.resolve(e);if(t)return this.storageCacheMap.set(e.toString(),t),t}}};i.__decorate([(0,r.Autowired)(t.StorageResolverContribution),i.__metadata("design:type",Object)],a.prototype,"resolversProvider",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.DefaultStorageProvider=a,function(e){e.WINDOWS_APP_DATA_DIR="AppData",e.WINDOWS_ROAMING_DIR="Roaming",e.DEFAULT_STORAGE_DIR_NAME=".sumi",e.DEFAULT_DATA_DIR_NAME="datas",e.MARKETPLACE_DIR="extensions",e.EXTENSIONS_LOGS_DIR="extensions",e.EXTENSIONS_GLOBAL_STORAGE_DIR="extension-storage",e.EXTENSIONS_WORKSPACE_STORAGE_DIR="workspace-storage"}(t.StoragePaths||(t.StoragePaths={}))},29705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDefinitionRegistryImpl=t.ITaskDefinitionRegistry=t.KeyedTaskIdentifier=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(15516),{deepClone:s}=o.objects;var c;!function(e){function t(e){const n=Object.keys(e).sort();let i="";for(const r of n){let n=e[r];n instanceof Object?n=t(n):"string"==typeof n&&(n=n.replace(/,/g,",,")),i+=r+","+n+","}return i}e.create=function(e){const n={_key:t(e),type:e.taskType};return Object.assign(n,e),n}}(c=t.KeyedTaskIdentifier||(t.KeyedTaskIdentifier={})),t.ITaskDefinitionRegistry=Symbol("ITaskDefinitionRegistry");let l=class{constructor(){this.createTaskIdentifier=(e,t)=>{const n=this.get(e.type);if(void 0===n){const t=s(e);return delete t._key,c.create(t)}const i=Object.create(null);i.type=n.taskType;const r=new Set;n.required.forEach((e=>r.add(e)));const o=n.properties;for(const n of Object.keys(o)){const c=e[n];if(null!=c)i[n]=c;else if(r.has(n)){const r=o[n];if(void 0!==r.default)i[n]=s(r.default);else switch(r.type){case"boolean":i[n]=!1;break;case"number":case"integer":i[n]=0;break;case"string":i[n]="";break;default:return void t.error((0,a.formatLocalize)("TaskDefinition.missingRequiredProperty","Error: the task identifier '{0}' is missing the required property '{1}'. The task identifier will be ignored.",JSON.stringify(e,void 0,0),n))}}}return c.create(i)},this.taskTypes=Object.create(null),this.readyPromise=new Promise(((e,t)=>e(void 0)))}onReady(){return this.readyPromise}register(e,t){return this.taskTypes[e]=t,o.Disposable.create((()=>delete this.taskTypes[e]))}get(e){return this.taskTypes[e]}all(){return Object.keys(this.taskTypes).map((e=>this.taskTypes[e]))}getJsonSchema(){if(void 0===this._schema){const e=[];for(const t of this.all()){const n={type:"object",additionalProperties:!1};t.required.length>0&&(n.required=t.required.slice(0)),void 0!==t.properties?n.properties=s(t.properties):n.properties=Object.create(null),n.properties.type={type:"string",enum:[t.taskType]},e.push(n)}this._schema={oneOf:e}}return this._schema}};l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.TaskDefinitionRegistryImpl=l},28564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isThemeColor=void 0,t.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}},67484:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91173:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IApplicationService=void 0,t.IApplicationService=Symbol("IApplicationService")},63924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAuthenticationService=t.ACCOUNTS_SUBMENU=t.ACCOUNTS_MENU=t.noAccountsId=void 0,t.noAccountsId="authentication.noAccounts",t.ACCOUNTS_MENU=["accounts_menu"],t.ACCOUNTS_SUBMENU=[...t.ACCOUNTS_MENU,"1_accounts_submenu"],t.IAuthenticationService=Symbol("IAuthenticationService")},91247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICommonServer=t.CommonServerPath=void 0,t.CommonServerPath="CommonServerPath",t.ICommonServer=Symbol("ICommonServer")},57973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDropEvent=void 0;const i=n(92455);class r extends i.BasicEvent{}t.FileTreeDropEvent=r},14764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.isEditChange=t.Position=void 0;class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDidContributes=t.ExtensionActivateEvent=t.ExtensionEnabledEvent=t.asExtensionCandidate=t.ExtensionConnectModeOption=t.ExtensionCandidate=void 0;const i=n(92455);t.ExtensionCandidate=class{},function(e){e[e.TCP=0]="TCP",e[e.IPC=1]="IPC"}(t.ExtensionConnectModeOption||(t.ExtensionConnectModeOption={})),t.asExtensionCandidate=function(e,t=!1){return{path:e,isBuiltin:!0,isDevelopment:t}};class r extends i.BasicEvent{}t.ExtensionEnabledEvent=r;class o extends i.BasicEvent{}t.ExtensionActivateEvent=o;class a extends i.BasicEvent{}t.ExtensionDidContributes=a},85597:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCFileChangeType=t.FileChangeType=t.FileChangeEvent=t.FileChange=void 0;const i=n(89065);var r,o;!function(e){function t(e,t){return e.type===o.DELETED&&i.URI.file(e.uri).isEqualOrParent(t)}e.isUpdated=function(e,t){return e.type===o.UPDATED&&t.toString()===e.uri},e.isAdded=function(e,t){return e.type===o.ADDED&&t.toString()===e.uri},e.isDeleted=t,e.isAffected=function(e,n){return t(e,n)||n.toString()===e.uri},e.isChanged=function(e,n){return!t(e,n)&&n.toString()===e.uri}}(r=t.FileChange||(t.FileChange={})),function(e){function t(e,t){return e.some((e=>r.isDeleted(e,t)))}e.isUpdated=function(e,t){return e.some((e=>r.isUpdated(e,t)))},e.isAdded=function(e,t){return e.some((e=>r.isAdded(e,t)))},e.isDeleted=t,e.isAffected=function(e,t){return e.some((e=>r.isAffected(e,t)))},e.isChanged=function(e,n){return!t(e,n)&&e.some((e=>r.isChanged(e,n)))}}(t.FileChangeEvent||(t.FileChangeEvent={})),function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(o=t.FileChangeType||(t.FileChangeType={})),function(e){e[e.Changed=1]="Changed",e[e.Created=2]="Created",e[e.Deleted=3]="Deleted"}(t.VSCFileChangeType||(t.VSCFileChangeType={}))},57361:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.FileStat=t.IFileServiceClient=void 0;n(70655).__exportStar(n(85597),t),t.IFileServiceClient=Symbol("IFileServiceClient"),function(e){function t(e){return"object"==typeof e&&"uri"in e&&"lastModification"in e&&"isDirectory"in e}e.is=t,e.equals=function(e,n){return!!(e&&n&&t(e)&&t(n))&&(e.uri===n.uri&&e.lastModification===n.lastModification&&e.isDirectory===n.isDirectory)}}(t.FileStat||(t.FileStat={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}))},65941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(14764),t),i.__exportStar(n(415),t),i.__exportStar(n(57361),t),i.__exportStar(n(50864),t),i.__exportStar(n(92519),t),i.__exportStar(n(72973),t),i.__exportStar(n(59860),t),i.__exportStar(n(57973),t),i.__exportStar(n(91247),t),i.__exportStar(n(91173),t),i.__exportStar(n(63924),t),i.__exportStar(n(67484),t),i.__exportStar(n(3937),t),i.__exportStar(n(3950),t),i.__exportStar(n(14764),t)},3950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50864:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(94079),t),i.__exportStar(n(94660),t)},94660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerManager=t.MarkerStats=void 0;const i=n(70655),r=n(39993),o=n(89065),a=n(92455),s=n(94079),c=n(94079),{isFalsyOrEmpty:l}=o.arrays;class d{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=Object.create(null),this._manager=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose(),this._data=void 0}_update(e){if(this._data)for(const t of e){const e=t.toString(),n=this._data[e];n&&this._substract(n);const i=this._resourceStats(t);this._add(i),this._data[e]=i}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0},n=this._manager.getMarkers({resource:e,opened:!0});for(const{severity:e}of n)e===c.MarkerSeverity.Error?t.errors+=1:e===c.MarkerSeverity.Warning?t.warnings+=1:e===c.MarkerSeverity.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}t.MarkerStats=d;let u=class extends a.WithEventBus{constructor(){super(),this._byResource=Object.create(null),this._byType=Object.create(null),this._byResourceCloseCache=Object.create(null),this._openedResource=new Set,this.onMarkerChangedEmitter=new o.Emitter,this.onMarkerChanged=this.onMarkerChangedEmitter.event,this.addDispose([this._stats=new d(this),this.onMarkerChangedEmitter])}updateMarkers(e,t,n){if(l(n)){const n=s.MapMap.remove(this._byResource,t,e),i=s.MapMap.remove(this._byType,e,t);if(n!==i)throw new Error("invalid marker service state");n&&i&&this.onMarkerChangedEmitter.fire([t])}else{const i=[];for(const r of n){const n=this.convertToMarker(e,t,r);n&&i.push(n)}s.MapMap.set(this._byResource,t,e,i),s.MapMap.set(this._byType,e,t,i),this.onMarkerChangedEmitter.fire([t])}}convertToMarker(e,t,n){const{code:i,severity:r,message:o,source:a,relatedInformation:s,tags:c}=n;if(!o)return;let{startLineNumber:l,startColumn:d,endLineNumber:u,endColumn:p}=n;return l=l>0?l:1,d=d>0?d:1,u=u>=l?u:l,p=p>0?p:d,{resource:t,type:e,code:i,severity:r,message:o,source:a,startLineNumber:l,startColumn:d,endLineNumber:u,endColumn:p,relatedInformation:s,tags:c}}clearMarkers(e){const t=[],n=this._byType[e];if(n){delete this._byType[e];for(const i in n){const n=s.MapMap.get(this._byResource,i,e);if(n){const[r]=n;r&&t.push(r.resource),s.MapMap.remove(this._byResource,i,e)}}}this.onMarkerChangedEmitter.fire(t)}clearMarkersOfUri(e){const t=this._byResource[e];if(t){delete this._byResource[e];for(const n in t){s.MapMap.get(this._byType,n,e)&&s.MapMap.remove(this._byType,n,e)}}this.onMarkerChangedEmitter.fire([e])}getMarkers(e=Object.create(null)){const{type:t,resource:n,severities:i,opened:r}=e;let{take:o}=e;if((!o||o<0)&&(o=-1),t&&n){const e=s.MapMap.get(this._byResource,n.toString(),t);if(e){const t=[];for(const n of e)if(this.isTargetMarker(n,i,r)){const e=t.push(n);if(o>0&&e===o)break}return t}return[]}if(t||n){const e=t?this._byType[t]:n?this._byResource[n.toString()]:void 0;if(!e)return[];const a=[];for(const t in e)for(const n of e[t])if(this.isTargetMarker(n,i,r)){const e=a.push(n);if(o>0&&e===o)return a}return a}{const e=[];for(const t in this._byResource)for(const n in this._byResource[t])for(const a of this._byResource[t][n])if(this.isTargetMarker(a,i,r)){const t=e.push(a);if(o>0&&t===o)return e}return e}}isTargetMarker(e,t,n){const i=void 0===t||(t&e.severity)===e.severity,r=!n||this._openedResource.has(e.resource);return i&&r}getResources(){return s.MapMap.keys(this._byResource)}getStats(){return this._stats}onEditorGroupOpen(e){this._openedResource.add(e);const t=s.MapMap.removeMap(this._byResourceCloseCache,e);t&&(s.MapMap.setMap(this._byResource,e,t),Object.keys(t).forEach((n=>{s.MapMap.set(this._byType,n,e,t[n])}))),this.onMarkerChangedEmitter.fire([e])}onEditorGroupClose(e){this._openedResource.delete(e);const t=s.MapMap.getMap(this._byResource,e);t&&s.MapMap.setMap(this._byResourceCloseCache,e,t),this.clearMarkersOfUri(e)}};u=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.MarkerManager=u},94079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerSeverity=t.MapMap=void 0;const i=n(89065);!function(e){e.get=function(e,t,n){if(e[t])return e[t][n]},e.getMap=function(e,t){return e[t]},e.set=function(e,t,n,i){e[t]||(e[t]=Object.create(null)),e[t][n]=i},e.setMap=function(e,t,n){e[t]=n},e.remove=function(e,t,n){return!(!e[t]||!e[t][n])&&(delete e[t][n],(0,i.isEmptyObject)(e[t])&&delete e[t],!0)},e.removeMap=function(e,t){if(e[t]){const n=e[t];return delete e[t],n}},e.keys=function(e){const t=[];if(e)for(const n in e)t.push(n);return t}}(t.MapMap||(t.MapMap={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(t.MarkerSeverity||(t.MarkerSeverity={})),function(e){e.compare=function(e,t){return t-e}}(t.MarkerSeverity||(t.MarkerSeverity={}))},415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0,function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Empty=3]="Empty"}(t.MessageType||(t.MessageType={}))},72973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IReporter=t.IReporterService=t.ReporterMetadata=t.REPORT_TYPE=t.REPORT_HOST=t.REPORT_NAME=void 0,function(e){e.ACTIVE_EXTENSION="activateExtension",e.RUNTIME_ERROR_EXTENSION="runtimeErrorExtension",e.LOAD_EXTENSION_MAIN="loadExtensionMain",e.PROVIDE_COMPLETION_ITEMS="provideCompletionItems",e.RESOLVE_COMPLETION_ITEM="resolveCompletionItem",e.PROVIDE_DOCUMENT_FORMATTING_EDITS="provideDocumentFormattingEdits",e.PROVIDE_DOCUMENT_RANGE_FORMATTING_EDITS="provideDocumentRangeFormattingEdits",e.EDITOR_REACTIVE="editorReactive",e.CHANNEL_RECONNECT="channelReconnect",e.MEASURE="measure",e.FORMAT_ON_SAVE_TIMEOUT_ERROR="formatOnSaveTimeoutError",e.FORMAT_ON_SAVE="formatOnSave",e.NOT_FOUND_COMMAND="notFoundCommand",e.INSTALL_EXTENSION_ERROR="installExtensionError",e.EXTENSION_CRASH="extensionCrash",e.EXTENSION_NOT_EXIST="extensionNotExist",e.THEME_LOAD="themeLoad",e.PROVIDE_HOVER="provideHover",e.PROVIDE_DEFINITION="provideDefinition",e.PROVIDE_TYPE_DEFINITION="provideTypeDefinition",e.PROVIDE_FOLDING_RANGES="provideFoldingRanges",e.PROVIDE_DOCUMENT_COLORS="provideDocumentColors",e.PROVIDE_COLOR_PRESENTATIONS="provideColorPresentations",e.PROVIDE_DOCUMENT_HIGHLIGHTS="provideDocumentHighlights",e.PROVIDE_LINKS="provideLinks",e.PROVIDE_REFERENCES="provideReferences",e.PROVIDE_DOCUMENT_SYMBOLS="provideDocumentSymbols",e.PROVIDE_IMPLEMENTATION="provideImplementation",e.PROVIDE_CODE_ACTIONS="provideCodeActions",e.PROVIDE_RENAME_EDITS="provideRenameEdits",e.PROVIDE_SIGNATURE_HELP="provideSignatureHelp",e.PROVIDE_CODE_LENSES="provideCodeLenses",e.RESOLVE_CODE_LENS="resolveCodeLens",e.PROVIDE_ON_TYPE_FORMATTING_EDITS="provideOnTypeFormattingEdits",e.PROVIDE_SELECTION_RANGES="provideSelectionRanges",e.TERMINAL_MEASURE="terminalMeasure",e.SEARCH_MEASURE="searchMeasure",e.QUICK_OPEN_MEASURE="quickOpenMeasure"}(t.REPORT_NAME||(t.REPORT_NAME={})),function(e){e.BROWSER="browser",e.NODE="node",e.WORKER="worker",e.EXTENSION="extension"}(t.REPORT_HOST||(t.REPORT_HOST={})),function(e){e.PERFORMANCE="performance",e.POINT="point"}(t.REPORT_TYPE||(t.REPORT_TYPE={})),t.ReporterMetadata=Symbol("ReporterMetadata"),t.IReporterService=Symbol("IReporterService"),t.IReporter=Symbol("IReporter")},3937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59860:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(89065),t)},87968:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugDecorator=void 0;const i=n(894),r=n(5887);t.DebugDecorator=class{getDisabledBreakpointDecoration(e){const t=this.getBreakpointDecoration(e);return{className:t.className+"-disabled",message:[(0,i.localize)("debug.breakpoint.disabled")+t.message[0]]}}getBreakpointDecoration(e,t){return e.raw.logMessage?{className:"sumi-debug-logpoint",message:t||[(0,i.localize)("debug.breakpoint.logpointMessage")]}:e.raw.condition||e.raw.hitCondition?{className:"sumi-debug-conditional-breakpoint",message:t||[(0,i.localize)("debug.breakpoint.conditionalMessage")]}:{className:"sumi-debug-breakpoint",message:t||[(0,i.localize)("debug.breakpoint.breakpointMessage")]}}getUnverifiedBreakpointDecoration(e){const t=this.getBreakpointDecoration(e);return{className:t.className+"-unverified",message:[e.message||(0,i.localize)("debug.breakpoint.unverified")+t.message[0]]}}getDecoration(e,t=!1,n=!0){return e.enabled&&n?t&&!(0,r.isRuntimeBreakpoint)(e)?this.getUnverifiedBreakpointDecoration(e):this.getBreakpointDecoration(e):this.getDisabledBreakpointDecoration(e)}}},25471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointManager=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(89329),c=n(80526),l=n(5887);let d=class extends c.MarkerManager{constructor(){super(...arguments),this.owner="breakpoint",this.defaultExceptionFilter=[],this._affected=new Set,this.breakpointsDeffered=null,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.onDidChangeExceptionsBreakpointsEmitter=new o.Emitter,this.onDidChangeExceptionsBreakpoints=this.onDidChangeExceptionsBreakpointsEmitter.event,this._breakpointsEnabled=!0}getKind(){return l.BREAKPOINT_KIND}get selectedBreakpoint(){return this._selectedBreakpoint}set selectedBreakpoint(e){this._selectedBreakpoint=e}get affected(){return Array.from(this._affected.values())}setBpDeffered(){return this.breakpointsDeffered=new a.Deferred,this}resolveBpDeffered(){this.breakpointsDeffered&&this.breakpointsDeffered.resolve()}promiseBpDeffered(){return this.breakpointsDeffered?this.breakpointsDeffered.promise:Promise.resolve()}setMarkers(e,t,n){const i=super.setMarkers(e,t,n),r=[],o=[],a=[],s=new Map(i.map((({data:e})=>[e.id,e]))),c=new Set;for(const e of n)c.add(e.id),s.has(e.id)?a.push(e):r.push(e);for(const[e,t]of s.entries())c.has(e)||o.push(t);return this.onDidChangeBreakpointsEmitter.fire({affected:[e],added:r,removed:o,changed:a}),i}getBreakpoint(e,t){return"number"==typeof t&&(t={lineNumber:t}),this.getBreakpoints(e,t)[0]}getBreakpoints(e,t){let n;return t&&(n=e=>!(t.lineNumber&&e.raw.line!==t.lineNumber||t.column&&e.raw.column!==t.column)),this.findMarkers({uri:e,dataFilter:n}).map((e=>e.data))}setBreakpoints(e,t){t.length>0?this._affected.add(e.toString()):this._affected.delete(e.toString()),this.setMarkers(e,this.owner,t.sort(((e,t)=>e.raw.line-t.raw.line)))}addBreakpoint(e){const t=new o.URI(e.uri),n=this.getBreakpoints(t),i=n.find((({raw:t})=>t.line===e.raw.line&&t.column===e.raw.column));return this.reporterService.point(null===s.DEBUG_REPORT_NAME||void 0===s.DEBUG_REPORT_NAME?void 0:s.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"add"),!i&&(this.setBreakpoints(t,[...n,e]),!0)}delBreakpoint(e){const t=o.URI.parse(e.uri),n=this.getBreakpoints(t),i=n.findIndex((t=>t.id===e.id));return i>-1&&(n.splice(i,1),this.setBreakpoints(t,[].concat(n)),!0)}clearBreakpoints(){const e=new Set,t=this.getBreakpoints();t.map((t=>e.add(t.uri))),this.cleanAllMarkers(),this._affected.clear(),this.onDidChangeBreakpointsEmitter.fire({affected:Array.from(e.values()).map((e=>o.URI.parse(e))),added:[],removed:t,changed:[]})}updateBreakpoint(e,t=!1){const n=o.URI.parse(e.uri);this.onDidChangeBreakpointsEmitter.fire({affected:[n],added:[],removed:[],changed:[e],statusUpdated:t})}updateBreakpoints(e,t=!1){const n=new Set;e.forEach((e=>{n.add(e.uri)})),this.onDidChangeBreakpointsEmitter.fire({affected:Array.from(n.values()).map((e=>o.URI.parse(e))),added:[],removed:[],changed:e,statusUpdated:t})}enableAllBreakpoints(e){for(const t of this.getUris()){let n=!1;const i=new o.URI(t),r=this.findMarkers({uri:i});for(const t of r)t.data.enabled!==e&&(t.data.enabled=e,n=!0);n&&this.fireOnDidChangeMarkers(i)}}get breakpointsEnabled(){return this._breakpointsEnabled}set breakpointsEnabled(e){if(this._breakpointsEnabled!==e){this._breakpointsEnabled=e;for(const e of this.getUris())this.fireOnDidChangeMarkers(new o.URI(e));this.updateBreakpoints(this.getBreakpoints())}}async load(){const e=(await this.storageProvider(o.STORAGE_NAMESPACE.DEBUG)).get("breakpoints",{breakpointsEnabled:!0,breakpoints:{},defaultExceptionFilter:[]});this._breakpointsEnabled=e.breakpointsEnabled;for(const t in e.breakpoints)this.setBreakpoints(new o.URI(t),e.breakpoints[t].map((e=>Object.assign(e,{status:new Map}))));this.defaultExceptionFilter=e.defaultExceptionFilter||[],this.exceptionFilterValue={},this.defaultExceptionFilter.forEach((e=>{this.exceptionFilterValue[e.filter]=!!e.default}))}async save(){const e={breakpointsEnabled:this.breakpointsEnabled,breakpoints:{},defaultExceptionFilter:this.defaultExceptionFilter},t=this.getUris();for(const n of t)e.breakpoints[n]=this.findMarkers({uri:new o.URI(n)}).map((e=>e.data));const n=await this.storageProvider(o.STORAGE_NAMESPACE.DEBUG);await n.set("breakpoints",e)}clearAllStatus(e){const t=this.getBreakpoints();t.forEach((t=>{t.status.delete(e)})),this.updateBreakpoints(t)}setExceptionBreakpoints(e){this.defaultExceptionFilter=e;for(const t of e)(0,o.isUndefined)(this.exceptionFilterValue)?this.updateExceptionBreakpoints(t.filter,!!t.default):this.updateExceptionBreakpoints(t.filter,(0,o.isUndefined)(this.exceptionFilterValue[t.filter])?!!t.default:this.exceptionFilterValue[t.filter])}getExceptionBreakpoints(){return this.defaultExceptionFilter.map((e=>Object.assign(Object.assign({},e),{default:(this.exceptionFilterValue||{})[e.filter]||!1})))}updateExceptionBreakpoints(e,t){(0,o.isUndefined)(this.exceptionFilterValue)&&(this.exceptionFilterValue={}),this.exceptionFilterValue[e]=t;const n=this.defaultExceptionFilter.filter((e=>(this.exceptionFilterValue||{})[e.filter])).map((e=>e.filter));this.onDidChangeExceptionsBreakpointsEmitter.fire({filters:n})}};i.__decorate([(0,r.Autowired)(o.StorageProvider),i.__metadata("design:type",Function)],d.prototype,"storageProvider",void 0),i.__decorate([(0,r.Autowired)(o.IReporterService),i.__metadata("design:type",Object)],d.prototype,"reporterService",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.BreakpointManager=d},5887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointMarker=t.isDebugExceptionBreakpoint=t.isRuntimeBreakpoint=t.getStatus=t.isDebugBreakpoint=t.DebugBreakpoint=t.BREAKPOINT_KIND=void 0;const i=n(50706);function r(e,t,n=1){return i(`${e}:${t}:${n}`)}function o(e){return Array.from(e.status.values()).filter((e=>e.verified))[0]}t.BREAKPOINT_KIND="breakpoint",function(e){e.create=function(e,t,n=!0){return{id:r(e.toString(),t.line,t.column),uri:e.toString(),enabled:n,status:new Map,raw:Object.assign({column:void 0,condition:void 0,hitCondition:void 0,logMessage:void 0},t)}}}(t.DebugBreakpoint||(t.DebugBreakpoint={})),t.isDebugBreakpoint=function(e){return!!e&&!!e.raw},t.getStatus=o,t.isRuntimeBreakpoint=function(e){const t=o(e);return!(!t||!t.verified)},t.isDebugExceptionBreakpoint=function(e){return e&&!!e.filter},function(e){e.is=function(e){return"kind"in e&&e.kind===t.BREAKPOINT_KIND}}(t.BreakpointMarker||(t.BreakpointMarker={}))},23375:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(25471),t),i.__exportStar(n(5887),t),i.__exportStar(n(87968),t)},32029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugAction=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(894),s=i.__importDefault(n(61501));t.DebugAction=e=>{var{icon:t,label:n,run:c,enabled:l,className:d}=e,u=i.__rest(e,["icon","label","run","enabled","className"]);return o.default.createElement("div",Object.assign({},u,{className:(0,r.default)(s.default.debug_action,s.default[t],(0,a.getIcon)(t)||t,"boolean"==typeof l&&!l&&s.default.mod_disabled,d),title:n,onClick:c||(()=>{})}))}},4576:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingClickWidget=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(25880),a=n(894),s=n(894),c=n(44686),l=i.__importDefault(n(21578));t.FloatingClickWidget=e=>{const{addConfiguration:t}=(0,s.useInjectable)(c.DebugConfigurationService);return r.default.createElement("div",{className:l.default.floating_click_widget},r.default.createElement(o.Button,{onClick:t,size:"large"},(0,a.localize)("debug.action.add.configuration")))}},30853:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(32029),t)},7669:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackItemTypeKey=void 0,t.DebugCallStackItemTypeKey=Symbol("DebugCallStackItemTypeKey")},92842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugContextKey=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(80098);let s=class{constructor(e){this._contextKeyService=this.globalContextKeyService.createScoped(e),this.contextInDebugRepl=a.CONTEXT_IN_DEBUG_REPL.bind(this.contextKeyScoped),this.contextInDebugConsole=a.CONTEXT_IN_DEBUG_CONSOLE.bind(this.contextKeyScoped),this.contextInDdebugMode=a.CONTEXT_IN_DEBUG_MODE.bind(this.contextKeyScoped),this.contextDebugState=a.CONTEXT_DEBUG_STATE.bind(this.contextKeyScoped),this.contextVariableEvaluateNamePresent=a.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.bind(this.contextKeyScoped),this.contextSetVariableSupported=a.CONTEXT_SET_VARIABLE_SUPPORTED.bind(this.contextKeyScoped),this.contextRestartFrameSupported=a.CONTEXT_RESTART_FRAME_SUPPORTED.bind(this.contextKeyScoped),this.contextDebugProtocolVariableMenu=a.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT.bind(this.contextKeyScoped),this.contextCanViewMemory=a.CONTEXT_CAN_VIEW_MEMORY.bind(this.contextKeyScoped)}get contextKeyScoped(){return this._contextKeyService}};i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],s.prototype,"globalContextKeyService",void 0),s=i.__decorate([(0,r.Injectable)(),i.__param(0,(0,r.Optional)()),i.__metadata("design:paramtypes",[HTMLElement])],s),t.DebugContextKey=s},99622:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(7669),t)},1795:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcANSI8bitColor=t.appendStylizedStringToContainer=t.handleANSIOutput=void 0;const i=n(70655),r=n(80229),o=n(52292),a=i.__importDefault(n(25341));function s(e,t,n,i,r,a,s,c){if(!e||!t)return;const l=i.linkify(t,!0,r);l.className=n.join(" "),a&&(l.style.color=o.Color.Format.CSS.formatRGB(new o.Color(a))),s&&(l.style.backgroundColor=o.Color.Format.CSS.formatRGB(new o.Color(s))),c&&(l.style.textDecorationColor=o.Color.Format.CSS.formatRGB(new o.Color(c))),e.appendChild(l)}function c(e){if(e%1==0){if(e>=16&&e<=231){let t=(e-=16)%6,n=(e=(e-t)/6)%6,i=e=(e-n)/6;const r=51;return t=Math.round(t*r),n=Math.round(n*r),i=Math.round(i*r),new o.RGBA(i,n,t)}if(e>=232&&e<=255){e-=232;const t=Math.round(e/23*255);return new o.RGBA(t,t,t)}}}t.handleANSIOutput=async function(e,t,n,i){const l=document.createElement("span"),d=e.length;let u,p,h,m=[],g=!1,f=0,_="";for(;f""!==e)).map((e=>parseInt(e,10)));if(38===e[0]||48===e[0]||58===e[0]){const t=38===e[0]?"foreground":48===e[0]?"background":"underline";5===e[1]?await S(e,t):2===e[1]&&C(e,t)}else await v(e)}}else f=r}!1===n&&(_+=e.charAt(f),f++)}return _&&s(l,_,m,t,i,u,p,h),l;function b(e,t){switch(e){case"foreground":u=t;break;case"background":p=t;break;case"underline":h=t}m=m.filter((t=>t!==`code-${e}-colored`)),void 0!==t&&m.push(`code-${e}-colored`)}function y(){let e;e=u,b("foreground",p),b("background",e)}async function v(e){for(const t of e)switch(t){case 0:m=[],u=void 0,p=void 0;break;case 1:m=m.filter((e=>e!==a.default["code-bold"])),m.push(a.default["code-bold"]);break;case 2:m=m.filter((e=>e!==a.default["code-dim"])),m.push(a.default["code-dim"]);break;case 3:m=m.filter((e=>e!==a.default["code-italic"])),m.push(a.default["code-italic"]);break;case 4:m=m.filter((e=>e!==a.default["code-underline"]&&e!==a.default["code-double-underline"])),m.push(a.default["code-underline"]);break;case 5:m=m.filter((e=>e!==a.default["code-blink"])),m.push(a.default["code-blink"]);break;case 6:m=m.filter((e=>e!==a.default["code-rapid-blink"])),m.push(a.default["code-rapid-blink"]);break;case 7:g||(g=!0,y());break;case 8:m=m.filter((e=>e!==a.default["code-hidden"])),m.push(a.default["code-hidden"]);break;case 9:m=m.filter((e=>e!==a.default["code-strike-through"])),m.push(a.default["code-strike-through"]);break;case 10:m=m.filter((e=>!e.startsWith(a.default["code-font"])));break;case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:m=m.filter((e=>!e.startsWith(a.default["code-font"]))),m.push(a.default["code-font-"+(t-10)]);break;case 21:m=m.filter((e=>e!==a.default["code-underline"]&&e!==a.default["code-double-underline"])),m.push(a.default["code-double-underline"]);break;case 22:m=m.filter((e=>e!==a.default["code-bold"]&&e!==a.default["code-dim"]));break;case 23:m=m.filter((e=>e!==a.default["code-italic"]&&e!==a.default["code-font-10"]));break;case 24:m=m.filter((e=>e!==a.default["code-underline"]&&e!==a.default["code-double-underline"]));break;case 25:m=m.filter((e=>e!==a.default["code-blink"]&&e!==a.default["code-rapid-blink"]));break;case 27:g&&(g=!1,y());break;case 28:m=m.filter((e=>e!==a.default["code-hidden"]));break;case 29:m=m.filter((e=>e!==a.default["code-strike-through"]));break;case 53:m=m.filter((e=>e!==a.default["code-overline"])),m.push(a.default["code-overline"]);break;case 55:m=m.filter((e=>e!==a.default["code-overline"]));break;case 39:b("foreground",void 0);break;case 49:b("background",void 0);break;case 59:b("underline",void 0);break;case 73:m=m.filter((e=>e!==a.default["code-superscript"]&&e!==a.default["code-subscript"])),m.push(a.default["code-superscript"]);break;case 74:m=m.filter((e=>e!==a.default["code-superscript"]&&e!==a.default["code-subscript"])),m.push(a.default["code-subscript"]);break;case 75:m=m.filter((e=>e!==a.default["code-superscript"]&&e!==a.default["code-subscript"]));break;default:await w(t)}}function C(e,t){if(e.length>=5&&e[2]>=0&&e[2]<=255&&e[3]>=0&&e[3]<=255&&e[4]>=0&&e[4]<=255){b(t,new o.RGBA(e[2],e[3],e[4]))}}async function S(e,t){let i=e[2];const o=c(i);if(o)b(t,o);else if(i>=0&&i<=15){if("underline"===t){const e=await n.getCurrentTheme(),o=r.ansiColorIdentifiers[i],a=e.getColor(o);return void(a&&b(t,a.rgba))}i+=30,i>=38&&(i+=52),"background"===t&&(i+=10),await w(i)}}async function w(e){const t=await n.getCurrentTheme();let i,o;if(e>=30&&e<=37?(o=e-30,i="foreground"):e>=90&&e<=97?(o=e-90+8,i="foreground"):e>=40&&e<=47?(o=e-40,i="background"):e>=100&&e<=107&&(o=e-100+8,i="background"),void 0!==o&&i){const e=r.ansiColorIdentifiers[o],n=t.getColor(e);n&&b(i,n.rgba)}}},t.appendStylizedStringToContainer=s,t.calcANSI8bitColor=c},86161:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationManager=void 0;const r=n(70655),o=n(20566),a=n(39993),s=n(894),c=n(92345),l=n(33361),d=n(33361),u=n(48770),p=n(14238),h=n(19668),m=n(89329),g=n(80098),f=n(86929),_=n(86450);let b=i=class{constructor(){this.breakpointModeIdsSet=new Set,this.debuggers=[],this.onDidChangeEmitter=new s.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onWillProvideDebugConfigurationEmitter=new s.Emitter,this.onWillProvideDebugConfiguration=this.onWillProvideDebugConfigurationEmitter.event,this._whenReadyDeferred=new s.Deferred,this.updateModelDelayer=new s.ThrottledDelayer(i.DEFAULT_UPDATE_MODEL_TIMEOUT),this.models=new Map,this.updateModels=()=>this.updateModelDelayer.trigger((async()=>{const e=await this.workspaceService.roots,t=new Set(this.models.keys());for(const n of e){const e=n.uri;if(t.delete(e),!this.models.has(e)){const t=new f.DebugConfigurationModel(e,this.preferences);t.onDidChange((()=>this.updateCurrent())),t.onDispose((()=>this.models.delete(e))),this.models.set(e,t)}}for(const e of t){const t=this.models.get(e);t&&t.dispose()}this.updateCurrent();let n=!0;this.models.forEach((e=>{e.configurations.length&&(n=!1)})),this.contextDebuggersAvailable.set(!n),this._whenReadyDeferred&&this._whenReadyDeferred.resolve()})),this.init(),this.contextDebuggersAvailable=g.CONTEXT_DEBUGGERS_AVAILABLE.bind(this.contextKeyService)}async init(){this.preferences.onPreferenceChanged((e=>{"launch"===e.preferenceName&&this.updateModels()})),this.debugConfigurationStorage=await this.storageProvider(s.STORAGE_NAMESPACE.DEBUG),this.updateModels()}get whenReady(){return this._whenReadyDeferred.promise}get all(){return this.getAll()}getAll(){const e=[];for(const t of this.models.values())for(let n=0,i=t.configurations.length;n{c=e},onArrayBegin:e=>{"configurations"===c&&0===s&&(a=r.getModel().getPositionAt(e+1)),s++},onArrayEnd:()=>{s--}}),a&&(r.getModel().getLineLastNonWhitespaceColumn(a.lineNumber)>a.column&&(r.setPosition(a),r.trigger(m.launchSchemaUri,"lineBreakInsert",void 0)),0===r.getModel().getLineLastNonWhitespaceColumn(a.lineNumber+1)&&(r.setPosition({lineNumber:a.lineNumber+1,column:1<<30}),r.trigger(null,"editor.action.deleteLines",[])),r.setPosition(a),r.trigger(null,"editor.action.insertLineAfter",[]),r.trigger(null,"editor.action.triggerSuggest",[]))}get model(){const e=this.workspaceVariables.getWorkspaceRootUri();if(e){const t=e.toString();for(const e of this.models.values())if(e.workspaceFolderUri===t)return e}for(const e of this.models.values())if(e.uri)return e;return this.models.values().next().value}getModelByUri(e){if(e){const t=e;for(const e of this.models.values())if(e.workspaceFolderUri===t)return e}for(const e of this.models.values())if(e.uri)return e;return this.models.values().next().value}async doOpen(e){let t=e.uri;return t||(t=await this.doCreate(e)),this.workbenchEditorService.open(t,{disableNavigate:!0})}async doCreate(e){await this.preferences.set("launch",{});const{configUri:t}=this.preferences.resolve("launch");let n;n=t&&"launch.json"===t.path.base?t:new s.URI(e.workspaceFolderUri).resolve(`${this.preferenceConfigurations.getPaths()[0]}/launch.json`);const i=await this.selectDebugType(),r=i?await this.provideDebugConfigurations(i,e.workspaceFolderUri):[],o=this.getInitialConfigurationContent(r),a=await this.filesystem.getFileStat(n.toString());if(a)try{await this.filesystem.setContent(a,o)}catch(e){if(!d.FileSystemError.FileExists.is(e))throw e}else await this.filesystem.createFile(n.toString(),{content:o});return n}async provideDebugConfigurations(e,t){return await this.fireWillProvideDebugConfiguration(),this.debug.provideDebugConfigurations(e,t)}async fireWillProvideDebugConfiguration(){await s.WaitUntilEvent.fire(this.onWillProvideDebugConfigurationEmitter,{})}getInitialConfigurationContent(e){return`{\n // ${(0,s.localize)("debug.configuration.comment1")}\n // ${(0,s.localize)("debug.configuration.comment2")}\n // ${(0,s.localize)("debug.configuration.comment3")}\n "version": "0.2.0",\n "configurations": ${JSON.stringify(e,void 0," ").split("\n").map((e=>" "+e)).join("\n").trim()}\n}\n`}async selectDebugType(){const e=this.workbenchEditorService.currentEditor;if(!e)return;const t=e.currentDocumentModel;if(!t)return;const n=await this.debug.getDebuggersForLanguage(t.languageId);return this.quickPick.show(n.map((({label:e,type:t})=>({label:e,value:t})),{placeholder:"Select Environment"}))}async load(){await this.whenReady;const e=this.debugConfigurationStorage.get("configurations");e&&e.current&&(this.current=this.find(e.current.name,e.current.workspaceFolderUri,e.current.index))}async save(){const e={},{current:t}=this;t&&(e.current={name:t.configuration.name,workspaceFolderUri:t.workspaceFolderUri,index:t.index}),this.debugConfigurationStorage.set("configurations",e)}canSetBreakpointsIn(e){if(!e)return!1;const t=e.getLanguageIdentifier().language;return!(!t||"jsonc"===t||"log"===t)&&(!!this.debugPreferences["preference.debug.allowBreakpointsEverywhere"]||this.breakpointModeIdsSet.has(t))}addSupportBreakpoints(e){this.breakpointModeIdsSet.add(e)}removeSupportBreakpoints(e){this.breakpointModeIdsSet.delete(e)}registerDebugger(e){if("*"!==e.type){if(this.getDebugger(e.type))return;this.debuggers.push(e)}}getDebugger(e){return this.debuggers.filter((t=>t.type===e)).pop()}getDebuggers(){return this.debuggers.filter((e=>!!e))}};b.DEFAULT_UPDATE_MODEL_TIMEOUT=500,r.__decorate([(0,a.Autowired)(p.IWorkspaceService),r.__metadata("design:type",Object)],b.prototype,"workspaceService",void 0),r.__decorate([(0,a.Autowired)(c.WorkbenchEditorService),r.__metadata("design:type",c.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),r.__decorate([(0,a.Autowired)(m.IDebugServer),r.__metadata("design:type",Object)],b.prototype,"debug",void 0),r.__decorate([(0,a.Autowired)(u.QuickPickService),r.__metadata("design:type",Object)],b.prototype,"quickPick",void 0),r.__decorate([(0,a.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],b.prototype,"contextKeyService",void 0),r.__decorate([(0,a.Autowired)(l.IFileServiceClient),r.__metadata("design:type",Object)],b.prototype,"filesystem",void 0),r.__decorate([(0,a.Autowired)(s.PreferenceService),r.__metadata("design:type",Object)],b.prototype,"preferences",void 0),r.__decorate([(0,a.Autowired)(s.PreferenceConfigurations),r.__metadata("design:type",s.PreferenceConfigurations)],b.prototype,"preferenceConfigurations",void 0),r.__decorate([(0,a.Autowired)(h.WorkspaceVariableContribution),r.__metadata("design:type",h.WorkspaceVariableContribution)],b.prototype,"workspaceVariables",void 0),r.__decorate([(0,a.Autowired)(s.StorageProvider),r.__metadata("design:type",Function)],b.prototype,"storageProvider",void 0),r.__decorate([(0,a.Autowired)(s.CommandService),r.__metadata("design:type",Object)],b.prototype,"commandService",void 0),r.__decorate([(0,a.Autowired)(_.DebugPreferences),r.__metadata("design:type",Object)],b.prototype,"debugPreferences",void 0),b=i=r.__decorate([(0,a.Injectable)(),r.__metadata("design:paramtypes",[])],b),t.DebugConfigurationManager=b},86929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationModel=void 0;const i=n(894),r=n(89329);t.DebugConfigurationModel=class{constructor(e,t){this.workspaceFolderUri=e,this.preferences=t,this.onDidChangeEmitter=new i.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.toDispose=new i.DisposableCollection(this.onDidChangeEmitter),this.reconcile(),this.toDispose.push(this.preferences.onPreferenceChanged((t=>{"launch"===t.preferenceName&&t.affects(e)&&this.reconcile()})))}get uri(){return this.json.uri}dispose(){this.toDispose.dispose()}get onDispose(){return this.toDispose.onDispose}get configurations(){return this.json.configurations}async reconcile(){this.json=this.parseConfigurations(),this.onDidChangeEmitter.fire(void 0)}parseConfigurations(){const e=[],{configUri:t,value:n}=this.preferences.resolve("launch",void 0,this.workspaceFolderUri);if(n&&"object"==typeof n&&"configurations"in n&&Array.isArray(n.configurations))for(const t of n.configurations)r.DebugConfiguration.is(t)&&e.push(t);return{uri:t,configurations:e}}}},92871:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugContribution=t.DebugBreakpointWidgetCommands=t.DEBUG_COMMANDS=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(52148),s=n(26149),c=n(57061),l=n(70888),d=n(33361),u=n(64747),p=n(92674),h=n(76326),m=i.__importStar(n(63138)),g=n(89329),f=n(80098),_=n(23375),b=n(4576),y=n(92842),v=n(86161),C=n(86450),S=n(43688),w=n(29602),E=n(10111),k=n(47173),x=n(34245),T=n(60791),D=n(89021),A=n(25161),I=n(44686),M=n(95947),R=n(21680),P=n(12614),O=n(43380),N=n(9670),L=n(20287),F=n(35176),B=/launch\.json$/;var j,z;!function(e){e.ADD_WATCHER={id:"debug.watch.add",iconClass:(0,o.getIcon)("plus")},e.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll",iconClass:(0,o.getIcon)("collapse-all")},e.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll",iconClass:(0,o.getIcon)("close-all")},e.REMOVE_WATCHER={id:"debug.watch.remove"},e.EDIT_WATCHER={id:"debug.watch.edit"},e.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},e.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all",iconClass:(0,o.getIcon)("close-all")},e.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle",iconClass:(0,o.getIcon)("deactivate-breakpoints")},e.START={id:"debug.start"},e.NEXT={id:"debug.next"},e.PREV={id:"debug.prev"},e.OVER={id:"debug.over"},e.STOP={id:"debug.stop"},e.CONTINUE={id:"debug.continue"},e.RESTART={id:"debug.restart"},e.PAUSE={id:"debug.pause"},e.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:(0,o.localize)("debug.menu.delete.breakpoint")},e.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:(0,o.localize)("debug.menu.edit.breakpoint")},e.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:(0,o.localize)("debug.menu.disable.breakpoint")},e.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:(0,o.localize)("debug.menu.enable.breakpoint")},e.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:(0,o.localize)("debug.menu.enable.logpoint")},e.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:(0,o.localize)("debug.menu.add.breakpoint")},e.ADD_LOGPOINT={id:"debug.add.logpoint",label:(0,o.localize)("debug.menu.add.logpoint")},e.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:(0,o.localize)("debug.menu.add.conditional")},e.RESTART_FRAME={id:"debug.callstack.restart.frame"},e.COPY_STACK_TRACE={id:"debug.callstack.copy"},e.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},e.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},e.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},e.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},e.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},e.CLEAR_CONSOLE={id:"debug.console.clear",label:(0,o.localize)("debug.console.clear")},e.COPY_CONSOLE_ITEM={id:"debug.console.copy"},e.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},e.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:(0,o.localize)("debug.console.collapseAll")},e.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},e.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},e.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},e.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},e.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:(0,o.localize)("debug.action.runToCursor")},e.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:(0,o.localize)("debug.action.forceRunToCursor")}}(j=t.DEBUG_COMMANDS||(t.DEBUG_COMMANDS={})),function(e){e.ACCEPT={id:"debug.breakpointWidget.accept"},e.CLOSE={id:"debug.breakpointWidget.close"}}(z=t.DebugBreakpointWidgetCommands||(t.DebugBreakpointWidgetCommands={}));let U=class{constructor(){this.schema=C.debugPreferencesSchema,this.firstSessionStart=!0}get selectedBreakpoint(){const{selectedBreakpoint:e}=this.breakpointManager;return e}registerEditorComponent(e){e.registerEditorSideWidget({id:g.DEBUG_FLOATING_CLICK_WIDGET,component:b.FloatingClickWidget,displaysOnResource:e=>{const{configUri:t}=this.preferences.resolve("launch");return!!t&&(t.isEqual(e.uri)&&B.test(e.uri.toString()))}})}registerComponent(e){e.register("@opensumi/ide-debug",[{component:F.DebugWatchView,id:g.DEBUG_WATCH_ID,name:(0,o.localize)("debug.watch.title"),when:`${f.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${f.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:N.DebugCallStackView,id:g.DEBUG_STACK_ID,name:(0,o.localize)("debug.callStack.title"),when:`${f.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${f.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:L.DebugVariableView,id:g.DEBUG_VARIABLES_ID,name:(0,o.localize)("debug.variables.title"),when:`${f.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${f.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:A.DebugBreakpointView,id:g.DEBUG_BREAKPOINTS_ID,name:(0,o.localize)("debug.breakpoints.title"),when:`${f.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${f.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:h.WelcomeView,id:g.DEBUG_WELCOME_ID,name:"Debug Welcome",when:`${f.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!1)} && ${f.CONTEXT_IN_DEBUG_MODE.equalsTo(!1)}`,initialProps:{viewId:g.DEBUG_WELCOME_ID}}],{iconClass:(0,o.getIcon)("debug"),priority:7,title:(0,o.localize)("debug.container.title"),containerId:g.DEBUG_CONTAINER_ID,titleComponent:M.DebugConfigurationView,activateKeyBinding:"ctrlcmd+shift+d"})}async initialize(){this.fileSystem.registerProvider(g.DEBUG_SCHEME,this.shadowFileServiceProvider),this.debugEditorController.init(),this.debugProgressService.run(this.sessionManager)}onStart(){this.viewsRegistry.registerViewWelcomeContent(g.DEBUG_WELCOME_ID,{content:(0,o.formatLocalize)("welcome-view.noLaunchJson",j.START.id),when:"default"}),this.sessionManager.onDidCreateDebugSession((e=>{this.debugModel.init(e)})),this.sessionManager.onDidStartDebugSession((e=>{const{internalConsoleOptions:t}=e.configuration,n=e.configuration.openDebug||this.debugPreferences["debug.openDebug"];"openOnSessionStart"===n||"openOnFirstSessionStart"===n?this.firstSessionStart&&this.openDebugView():"neverOpen"!==n&&this.openDebugView(),("openOnSessionStart"===t||"openOnFirstSessionStart"===t&&this.firstSessionStart)&&this.openDebugConsoleView(),this.firstSessionStart=!1,this.commandService.tryExecuteCommand("statusbar.changeBackgroundColor","var(--statusBar-debuggingBackground)"),this.commandService.tryExecuteCommand("statusbar.changeColor","var(--statusBar-debuggingForeground)")})),this.sessionManager.onDidStopDebugSession((e=>{const{openDebug:t}=e.configuration;"openOnDebugBreak"===t&&this.openDebugView()})),this.sessionManager.onDidDestroyDebugSession((e=>{0===this.sessionManager.sessions.length&&(this.commandService.tryExecuteCommand("statusbar.changeBackgroundColor","var(--statusBar-background)"),this.commandService.tryExecuteCommand("statusbar.changeColor","var(--statusBar-foreground)"))})),this.configurations.load(),this.breakpointManager.load(),this.configurations.onDidChange((()=>this.configurations.save())),this.breakpointManager.onDidChangeBreakpoints((()=>this.breakpointManager.save())),this.breakpointManager.onDidChangeExceptionsBreakpoints((()=>this.breakpointManager.save())),this.breakpointManager.onDidChangeMarkers((()=>this.breakpointManager.save())),this.extensionsPointService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:g.DEBUG_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:Object.assign(Object.assign({},a.browserViews.properties),{description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("menu-bar.title.debug"))})})}openDebugView(){const e=this.mainlayoutService.getTabbarHandler(g.DEBUG_CONTAINER_ID);e&&!e.isVisible&&e.activate()}openDebugConsoleView(){this.debugConsole.isVisible||this.debugConsole.activate()}onDidRender(){const e=this.mainlayoutService.getTabbarHandler(g.DEBUG_CONTAINER_ID);e&&e.setTitleComponent(M.DebugConfigurationView)}registerCommands(e){e.registerCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION,{execute:()=>{this.debugConfigurationService.openConfiguration()}}),e.registerCommand(j.REMOVE_ALL_BREAKPOINTS,{execute:()=>{this.debugBreakpointsService.removeAllBreakpoints()}}),e.registerCommand(j.START,{execute:()=>{this.debugConfigurationService.start()}}),e.registerCommand(j.STOP,{execute:()=>{this.debugToolbarService.doStop()}}),e.registerCommand(j.NEXT,{execute:()=>{this.debugToolbarService.doStepIn()}}),e.registerCommand(j.PREV,{execute:()=>{this.debugToolbarService.doStepOut()}}),e.registerCommand(j.CONTINUE,{execute:()=>{this.debugToolbarService.doContinue()}}),e.registerCommand(j.PAUSE,{execute:()=>{this.debugToolbarService.doPause()}}),e.registerCommand(j.OVER,{execute:()=>{this.debugToolbarService.doStepOver()}}),e.registerCommand(j.RESTART,{execute:()=>{this.debugToolbarService.doRestart()}}),e.registerCommand(j.TOGGLE_BREAKPOINTS,{execute:()=>{this.debugBreakpointsService.toggleBreakpoints()}}),e.registerCommand(j.EDIT_BREAKPOINT,{execute:async e=>{this.reporterService.point(null===g.DEBUG_REPORT_NAME||void 0===g.DEBUG_REPORT_NAME?void 0:g.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"edit");const{selectedBreakpoint:t}=this;if(t){const{openBreakpointView:n}=t.model;let i="condition";if(t.breakpoint){const e=t.breakpoint.raw;e.condition?i="condition":e.hitCondition?i="hitCondition":e.logMessage&&(i="logMessage")}n(e,t.breakpoint&&t.breakpoint.raw,i)}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),e.registerCommand(j.DISABLE_BREAKPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{uri:n}=t.model,i=this.breakpointManager.getBreakpoint(n,e.lineNumber);i&&(i.enabled=!1,this.breakpointManager.updateBreakpoint(i))}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&this.selectedBreakpoint.breakpoint.enabled,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&this.selectedBreakpoint.breakpoint.enabled}),e.registerCommand(j.ENABLE_BREAKPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{uri:n}=t.model,i=this.breakpointManager.getBreakpoint(n,e.lineNumber);i&&(i.enabled=!0,this.breakpointManager.updateBreakpoint(i))}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&!this.selectedBreakpoint.breakpoint.enabled,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&!this.selectedBreakpoint.breakpoint.enabled}),e.registerCommand(j.DELETE_BREAKPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{uri:n}=t.model,i=this.breakpointManager.getBreakpoint(n,e.lineNumber);i&&this.breakpointManager.delBreakpoint(i)}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),e.registerCommand(j.ADD_CONDITIONAL_BREAKPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{uri:n,openBreakpointView:i,toggleBreakpoint:r}=t.model;r(e);const o=this.breakpointManager.getBreakpoint(n,e.lineNumber);o&&(this.breakpointManager.selectedBreakpoint={breakpoint:o,model:t.model}),i(e,t.breakpoint&&t.breakpoint.raw,"condition")}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),e.registerCommand(j.ADD_LOGPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{openBreakpointView:n,toggleBreakpoint:i,uri:r}=t.model;i(e);const o=this.breakpointManager.getBreakpoint(r,e.lineNumber);o&&(this.breakpointManager.selectedBreakpoint={breakpoint:o,model:t.model}),n(e,t.breakpoint&&t.breakpoint.raw,"logMessage")}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),e.registerCommand(j.ADD_BREAKPOINT,{execute:async e=>{const{selectedBreakpoint:t}=this;if(t){const{toggleBreakpoint:n}=t.model;n(e)}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),e.registerCommand(z.ACCEPT,{execute:()=>{const{selectedBreakpoint:e}=this;if(e){const{acceptBreakpoint:t}=e.model;t()}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),e.registerCommand(z.CLOSE,{execute:()=>{const{selectedBreakpoint:e}=this;if(e){const{closeBreakpointView:t}=e.model;t()}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),e.registerCommand(j.RUN_TO_CURSOR,{execute:e=>{this.debugRunToCursorService.run(e)},isEnabled:()=>"Stopped"===this.debugContextKey.contextDebugState.get()}),e.registerCommand(j.FORCE_RUN_TO_CURSOR,{execute:e=>{this.debugRunToCursorService.run(e,!0)},isEnabled:()=>"Stopped"===this.debugContextKey.contextDebugState.get()})}registerToolbarItems(e){e.registerItem({id:j.REMOVE_ALL_BREAKPOINTS.id,command:j.REMOVE_ALL_BREAKPOINTS.id,viewId:g.DEBUG_BREAKPOINTS_ID,tooltip:(0,o.localize)("debug.breakpoint.removeAll")}),e.registerItem({id:j.TOGGLE_BREAKPOINTS.id,command:j.TOGGLE_BREAKPOINTS.id,viewId:g.DEBUG_BREAKPOINTS_ID,tooltip:(0,o.localize)("debug.breakpoint.toggle")})}registerSchema(e){e.registerSchema(`${g.launchSchemaUri}/default`,w.launchSchema,["launch.json"])}registerKeybindings(e){e.registerKeybinding({command:j.START.id,keybinding:"f5",when:`!${f.CONTEXT_IN_DEBUG_MODE.raw}`}),e.registerKeybinding({command:j.CONTINUE.id,keybinding:"f5",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:j.STOP.id,keybinding:"shift+f5",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:j.NEXT.id,keybinding:"f11",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:j.PREV.id,keybinding:"shift+f11",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:j.OVER.id,keybinding:"f10",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:j.RESTART.id,keybinding:"shift+ctrlcmd+f5",when:f.CONTEXT_IN_DEBUG_MODE.raw}),e.registerKeybinding({command:z.ACCEPT.id,keybinding:"enter",when:f.CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw}),e.registerKeybinding({command:z.CLOSE.id,keybinding:"esc",when:f.CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw})}registerMenus(e){e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.DELETE_BREAKPOINT.id,group:"1_has_breakpoint",order:1}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.EDIT_BREAKPOINT.id,group:"1_has_breakpoint",order:2}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.DISABLE_BREAKPOINT.id,group:"1_has_breakpoint",order:3}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.ENABLE_BREAKPOINT.id,group:"1_has_breakpoint",order:4}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.ADD_BREAKPOINT.id,group:"2_has_not_breakpoint"}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.ADD_CONDITIONAL_BREAKPOINT.id,group:"2_has_not_breakpoint"}),e.registerMenuItem(c.MenuId.DebugBreakpointsContext,{command:j.ADD_LOGPOINT.id,group:"2_has_not_breakpoint"}),e.registerMenuItem(c.MenuId.EditorContext,{command:{id:j.RUN_TO_CURSOR.id,label:j.RUN_TO_CURSOR.label},when:`${f.CONTEXT_IN_DEBUG_MODE.raw}`,group:"debug",order:2}),e.registerMenuItem(c.MenuId.EditorContext,{command:{id:j.FORCE_RUN_TO_CURSOR.id,label:j.FORCE_RUN_TO_CURSOR.label},when:`${f.CONTEXT_IN_DEBUG_MODE.raw}`,group:"debug",order:2})}isPosition(e){return e instanceof m.Position}registerEditorFeature(e){e.registerEditorFeatureContribution({contribute:e=>this.debugEditorContribution.contribute(e)}),setTimeout((()=>{this.debugEditorContribution.registerDecorationType()}),0),this.preferenceSettings.setEnumLabels("debug.console.filter.mode",{filter:(0,o.localize)("preference.debug.console.filter.mode.filter"),matcher:(0,o.localize)("preference.debug.console.filter.mode.matcher")})}};i.__decorate([(0,r.Autowired)(p.IMainLayoutService),i.__metadata("design:type",Object)],U.prototype,"mainlayoutService",void 0),i.__decorate([(0,r.Autowired)(_.BreakpointManager),i.__metadata("design:type",_.BreakpointManager)],U.prototype,"breakpointManager",void 0),i.__decorate([(0,r.Autowired)(v.DebugConfigurationManager),i.__metadata("design:type",v.DebugConfigurationManager)],U.prototype,"configurations",void 0),i.__decorate([(0,r.Autowired)(x.DebugModelManager),i.__metadata("design:type",x.DebugModelManager)],U.prototype,"debugEditorController",void 0),i.__decorate([(0,r.Autowired)(D.DebugBreakpointsService),i.__metadata("design:type",D.DebugBreakpointsService)],U.prototype,"debugBreakpointsService",void 0),i.__decorate([(0,r.Autowired)(O.DebugViewModel),i.__metadata("design:type",O.DebugViewModel)],U.prototype,"debugModel",void 0),i.__decorate([(0,r.Autowired)(C.DebugPreferences),i.__metadata("design:type",Object)],U.prototype,"debugPreferences",void 0),i.__decorate([(0,r.Autowired)(P.DebugConsoleService),i.__metadata("design:type",P.DebugConsoleService)],U.prototype,"debugConsole",void 0),i.__decorate([(0,r.Autowired)(I.DebugConfigurationService),i.__metadata("design:type",I.DebugConfigurationService)],U.prototype,"debugConfigurationService",void 0),i.__decorate([(0,r.Autowired)(g.IDebugSessionManager),i.__metadata("design:type",E.DebugSessionManager)],U.prototype,"sessionManager",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],U.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(R.DebugToolbarService),i.__metadata("design:type",R.DebugToolbarService)],U.prototype,"debugToolbarService",void 0),i.__decorate([(0,r.Autowired)(k.DebugEditorContribution),i.__metadata("design:type",k.DebugEditorContribution)],U.prototype,"debugEditorContribution",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],U.prototype,"preferences",void 0),i.__decorate([(0,r.Autowired)(o.IReporterService),i.__metadata("design:type",Object)],U.prototype,"reporterService",void 0),i.__decorate([(0,r.Autowired)(p.IViewsRegistry),i.__metadata("design:type",Object)],U.prototype,"viewsRegistry",void 0),i.__decorate([(0,r.Autowired)(d.IShadowFileProvider),i.__metadata("design:type",Object)],U.prototype,"shadowFileServiceProvider",void 0),i.__decorate([(0,r.Autowired)(d.IFileServiceClient),i.__metadata("design:type",u.FileServiceClient)],U.prototype,"fileSystem",void 0),i.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),i.__metadata("design:type",Object)],U.prototype,"preferenceSettings",void 0),i.__decorate([(0,r.Autowired)(S.DebugProgressService),i.__metadata("design:type",S.DebugProgressService)],U.prototype,"debugProgressService",void 0),i.__decorate([(0,r.Autowired)(T.DebugRunToCursorService),i.__metadata("design:type",T.DebugRunToCursorService)],U.prototype,"debugRunToCursorService",void 0),i.__decorate([(0,r.Autowired)(y.DebugContextKey),i.__metadata("design:type",y.DebugContextKey)],U.prototype,"debugContextKey",void 0),i.__decorate([(0,r.Autowired)(o.IExtensionsPointService),i.__metadata("design:type",Object)],U.prototype,"extensionsPointService",void 0),U=i.__decorate([(0,o.Domain)(o.ClientAppContribution,o.ComponentContribution,s.TabBarToolbarContribution,o.CommandContribution,o.KeybindingContribution,o.JsonSchemaContribution,o.PreferenceContribution,c.MenuContribution,l.BrowserEditorContribution)],U),t.DebugContribution=U},73563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkDetector=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(92345),c=n(17735),l=i.__importDefault(n(25341)),d="\\u0000-\\u0020\\u007f-\\u009f",u=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+d+'"]{2,}[^\\s'+d+"\"')}\\],:;.!?]","ug"),p=new RegExp(`(${/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/.source}|${/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/.source})`),h=new RegExp(`${a.isWindows?p.source:/((?:\~|\.)?(?:\/[\w\.-]*)+)/.source}${/(?:\:([\d]+))?(?:\:([\d]+))?/.source}`,"g");let m=class{linkify(e,t,n){if(t){const t=e.split("\n");for(let e=0;ethis.linkify(e,!1,n)));if(1===i.length)return i[0];const r=document.createElement("span");return i.forEach((e=>r.appendChild(e))),r}const i=document.createElement("span");for(const t of this.detectLinks(e))try{switch(t.kind){case"text":i.appendChild(document.createTextNode(t.value));break;case"web":i.appendChild(this.createWebLink(t.value));break;case"path":{const e=t.captures[0],r=t.captures[1]?Number(t.captures[1]):0,o=t.captures[2]?Number(t.captures[2]):0;i.appendChild(this.createPathLink(t.value,e,r,o,n));break}}}catch(e){i.appendChild(document.createTextNode(t.value))}return i}createWebLink(e){const t=this.createLink(e),n=a.URI.parse(e);return this.decorateLink(t,(async()=>{if(n.scheme!==o.Schemes.file)this.openerService.open(e);else{const e=n.toString(),t=o.OS.type()===a.OperatingSystem.Windows?a.path.win32:a.path.posix,i=a.path.normalize(t.sep===a.path.posix.sep&&a.isWindows?e.replace(/\\/g,a.path.posix.sep):e);await this.workbenchEditorService.open(a.URI.parse(i))}})),t}createPathLink(e,t,n,i,r){if("/"===t[0]&&"/"===t[1])return document.createTextNode(e);if("."===t[0]){if(!r)return document.createTextNode(e);const n=r.toResource(t),i=this.createLink(e);return this.decorateLink(i,(()=>{this.workbenchEditorService.open(a.URI.parse(n.toString()))})),i}const o=this.createLink(e);o.tabIndex=0;const s=a.URI.file(a.path.normalize(t));return this.fileServiceClient.getFileStat(s.toString()).then((e=>{!e||e&&e.isDirectory||this.decorateLink(o,(()=>{this.workbenchEditorService.open(a.URI.parse(s.toString()),{range:{startColumn:i,startLineNumber:n,endLineNumber:n,endColumn:i}})}))})),o}createLink(e){const t=document.createElement("a");return t.textContent=e,t}decorateLink(e,t){e.classList.add(l.default.link),e.title=(0,o.formatLocalize)("debug.console.followLink",a.isMacintosh?"Cmd":"Ctrl"),e.onmousemove=t=>{e.classList.toggle(l.default.pointer,a.isMacintosh?t.metaKey:t.ctrlKey)},e.onmouseleave=()=>e.classList.remove(l.default.pointer),e.onclick=e=>{const n=window.getSelection();n&&"Range"!==n.type&&(a.isMacintosh?e.metaKey:e.ctrlKey)&&(e.preventDefault(),e.stopImmediatePropagation(),t(!1))}}detectLinks(e){if(!e)return[];if(e.length>2e3)return[{kind:"text",value:e,captures:[]}];const t=[u,h],n=["web","path"],i=[],r=(e,o)=>{if(o>=t.length)return void i.push({value:e,kind:"text",captures:[]});const a=t[o];let s,c=0;for(a.lastIndex=0;null!==(s=a.exec(e));){const t=e.substring(c,s.index);t&&r(t,o+1);const a=s[0];i.push({value:a,kind:n[o],captures:s.slice(1)}),c=s.index+a.length}const l=e.substring(c);l&&r(l,o+1)};return r(e,0),i}};i.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),i.__metadata("design:type",s.WorkbenchEditorService)],m.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(c.IFileServiceClient),i.__metadata("design:type",Object)],m.prototype,"fileServiceClient",void 0),i.__decorate([(0,r.Autowired)(o.IOpenerService),i.__metadata("design:type",Object)],m.prototype,"openerService",void 0),m=i.__decorate([(0,r.Injectable)({multiple:!0})],m),t.LinkDetector=m},60193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugMemoryFileSystemProvider=void 0;const i=n(70655),r=i.__importDefault(n(74691)),o=n(39993),a=n(90642),s=n(90642),c=n(89329),l=n(10111),{Path:d}=a.path;let u=class{constructor(){this.memoryFdCounter=0,this.changeEmitter=new s.Emitter,this.fdMemory=new Map,this.capabilities=1028,this.onDidChangeCapabilities=s.Event.None,this.onDidChangeFile=this.changeEmitter.event}stat(e){return Promise.resolve({type:s.FileType.File,uri:e.toString(),mtime:0,ctime:0,size:0,lastModification:0,isDirectory:!1})}async readFile(e){const t=this.parseUri(e);if(!t)return this.toBuffer("");if(!t.offset)return this.toBuffer("");const{session:n,memoryReference:i,offset:r}=t,o=new Uint8Array(r.toOffset-r.fromOffset),a=this.memoryFdCounter++;let s=n.getMemory(i);return r&&(s=new p(s,r)),this.fdMemory.set(a,{session:n,region:s}),await this.read(a,r.fromOffset,o,0,o.length),o}async read(e,t,n,i,r){const o=this.fdMemory.get(e);if(!o)return;const a=await o.region.read(t,r);let s=0;for(const e of a)switch(e.type){case 1:return s;case 2:return s>0?s:this.logger.error(e.error);case 0:{const o=Math.max(0,t-e.offset),a=e.data.slice(o,Math.min(e.data.byteLength,o+(r-s)));n.set(a.buffer,i+s),s+=a.byteLength;break}default:this.logger.log(e)}return s}toBuffer(e){return s.BinaryBuffer.fromString(e).buffer}parseUri(e){if(e.scheme!==c.DEBUG_MEMORY_SCHEME)return;const t=this.debugSessionManager.sessions.find((t=>t.id.toLowerCase()===e.authority.toLowerCase()));if(!t)return;let n;const i=/range=([0-9]+):([0-9]+)/.exec(e.query);i&&(n={fromOffset:Number(i[1]),toOffset:Number(i[2])});const[,r]=e.path.split(d.separator);return{session:t,offset:n,readOnly:!t.capabilities.supportsWriteMemoryRequest,sessionId:e.authority,memoryReference:decodeURIComponent(r)}}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Method not implemented.")}};i.__decorate([(0,o.Autowired)(c.IDebugSessionManager),i.__metadata("design:type",l.DebugSessionManager)],u.prototype,"debugSessionManager",void 0),i.__decorate([(0,o.Autowired)(s.ILogger),i.__metadata("design:type",Object)],u.prototype,"logger",void 0),u=i.__decorate([(0,o.Injectable)()],u),t.DebugMemoryFileSystemProvider=u;class p extends s.Disposable{constructor(e,t){super(),this.parent=e,this.range=t,this.invalidateEmitter=new s.Emitter,this.onDidInvalidate=this.invalidateEmitter.event,this.width=this.range.toOffset-this.range.fromOffset,this.writable=e.writable,this.registerDispose(e),this.registerDispose(e.onDidInvalidate((e=>{const n=(0,r.default)(e.fromOffset-t.fromOffset,0,this.width),i=(0,r.default)(e.toOffset-t.fromOffset,0,this.width);i>n&&this.invalidateEmitter.fire({fromOffset:n,toOffset:i})})))}read(e,t){if(e<0)throw new RangeError(`Invalid fromOffset: ${e}`);return this.parent.read(this.range.fromOffset+e,this.range.fromOffset+Math.min(t,this.width))}write(e,t){return this.parent.write(this.range.fromOffset+e,t)}}},86450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectDebugPreferences=t.createDebugPreferences=t.DebugPreferences=t.IDebugConfiguration=t.debugPreferencesSchema=void 0;const i=n(894);t.debugPreferencesSchema={type:"object",properties:{"debug.trace":{type:"boolean",default:!1,description:(0,i.localize)("preference.debug.trace")},"debug.debugViewLocation":{enum:["default","left","right","bottom"],default:"default",description:(0,i.localize)("preference.debug.debugViewLocation")},"debug.openDebug":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart","openOnDebugBreak"],default:"openOnDebugBreak",description:(0,i.localize)("preference.debug.openDebug")},"debug.internalConsoleOptions":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:(0,i.localize)("preference.debug.internalConsoleOptions")},"debug.allowBreakpointsEverywhere":{type:"boolean",description:(0,i.localize)("preference.debug.allowBreakpointsEverywhere"),default:!1}}};function r(e){return(0,i.createPreferenceProxy)(e,t.debugPreferencesSchema)}t.IDebugConfiguration=class{},t.DebugPreferences=Symbol("DebugPreferences"),t.createDebugPreferences=r,t.injectDebugPreferences=function(e){e.addProviders({token:t.DebugPreferences,useFactory:e=>r(e.get(i.PreferenceService))}),e.addProviders({token:i.PreferenceContribution,useValue:{schema:t.debugPreferencesSchema}})}},43688:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProgressService=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(45467),c=n(90642),l=n(90642),d=n(34886);let u=i=class{constructor(){this.toDispose=[]}async onDebugServiceStateChange(e){this.progressResolve&&(this.progressResolve(),this.progressResolve=void 0),e===d.DebugState.Initializing&&this.progressService.getIndicator(i.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:i.DEBUG_PANEL_PROGRESS_ID},(e=>new Promise((e=>this.progressResolve=e))))}run(e){let t;const n=e=>{t=new c.DisposableCollection,e&&(null==t||t.push(e.onDidChangeState((e=>this.onDebugServiceStateChange(e)))),null==t||t.push(e.onDidProgressStart((async t=>{const n=new Promise((n=>{const i=a.Event.any(a.Event.filter(e.onDidProgressEnd,(e=>e.body.progressId===t.body.progressId)),e.onDidExitAdapter)((()=>{i.dispose(),n()}))}));this.progressService.getIndicator(i.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:i.DEBUG_PANEL_PROGRESS_ID},(()=>n)),this.progressService.withProgress({location:l.ProgressLocation.Notification,title:t.body.title,cancellable:t.body.cancellable,silent:!0,delay:500},(i=>{let r=0;const o=e=>{let t;"number"==typeof e.percentage&&(t=e.percentage-r,r+=t),i.report({message:e.message,increment:t,total:"number"==typeof t?100:void 0})};t.body.message&&o(t.body);const a=e.onDidProgressUpdate((e=>{e.body.progressId===t.body.progressId&&o(e.body)}));return n.then((()=>a.dispose()))}),(()=>e.cancel(t.body.progressId)))}))))};this.toDispose.push(e.onDidChangeActiveDebugSession((({current:e})=>{t&&t.dispose(),n(e)}))),n(e.currentSession)}};u.DEBUG_PANEL_PROGRESS_ID="debug",r.__decorate([(0,o.Autowired)(s.IProgressService),r.__metadata("design:type",Object)],u.prototype,"progressService",void 0),u=i=r.__decorate([(0,o.Injectable)()],u),t.DebugProgressService=u},29602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSchema=t.DebugSchemaUpdater=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(89329),s=n(12490),c=n(86161),{deepClone:l}=o.objects;let d=class{async update(){const e=this.config.getDebuggers(),n=Object.assign({},l(t.launchSchema)),i=n.properties.configurations.items,r=e.map((e=>({attributes:Object.keys(e.configurationAttributes||{}).map((t=>e.configurationAttributes[t])),configurationSnippets:e.configurationSnippets})));for(const{attributes:e,configurationSnippets:t}of r)e&&i.oneOf&&i.oneOf.push(...e),t&&i.defaultSnippets&&i.defaultSnippets.push(...t);this.schemaRegistry.registerSchema(`${a.launchSchemaUri}/extension`,n,["launch.json"])}};i.__decorate([(0,r.Autowired)(s.IDebugServer),i.__metadata("design:type",Object)],d.prototype,"debug",void 0),i.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),i.__metadata("design:type",Object)],d.prototype,"schemaRegistry",void 0),i.__decorate([(0,r.Autowired)(c.DebugConfigurationManager),i.__metadata("design:type",c.DebugConfigurationManager)],d.prototype,"config",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.DebugSchemaUpdater=d,t.launchSchema={$id:a.launchSchemaUri,type:"object",title:"Launch",required:[],default:{version:"0.2.0",configurations:[]},properties:{version:{type:"string",description:"Version of this file format.",default:"0.2.0"},configurations:{type:"array",description:"List of configurations. Add new configurations or edit existing ones by using IntelliSense.",items:{defaultSnippets:[],type:"object",oneOf:[]}}}}},70573:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugService=void 0;const i=n(70655),r=n(39993),o=n(894);let a=class{constructor(){this.onDidDebugContributionPointChangeEmitter=new o.Emitter,this.debugContributionPointsMap=new Map}registerDebugContributionPoints(e,t){this.debugContributionPointsMap.has(e)||(this.debugContributionPointsMap.set(e,t),this.onDidDebugContributionPointChangeEmitter.fire({path:e,contributions:t}))}unregisterDebugContributionPoints(e){const t=this.debugContributionPointsMap.get(e);t&&(this.debugContributionPointsMap.delete(e),this.onDidDebugContributionPointChangeEmitter.fire({path:e,contributions:t,removed:!0}))}get debugContributionPoints(){return this.debugContributionPointsMap}get onDidDebugContributionPointChange(){return this.onDidDebugContributionPointChangeEmitter.event}};a=i.__decorate([(0,r.Injectable)()],a),t.DebugService=a},1572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionConnection=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(89329),s=n(10111),c=new Set(["breakpoint","capabilities","continued","exited","initialized","loadedSource","module","output","process","stopped","terminated","thread","progressStart","progressUpdate","progressEnd","invalidated"]);let l=class{constructor(e,t,n){this.sessionId=e,this.connectionFactory=t,this.traceOutputChannel=n,this.pendingRequests=new Map,this.requestHandlers=new Map,this.onDidCustomEventEmitter=new o.Emitter,this.onDidCustomEvent=this.onDidCustomEventEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidCustomEventEmitter,o.Disposable.create((()=>this.pendingRequests.clear())),o.Disposable.create((()=>this.emitters.clear()))),this.allThreadsContinued=!0,this.emitters=new Map,this.connection=this.createConnection()}get disposed(){return this.toDispose.disposed}dispose(){this.toDispose.dispose()}async createConnection(){if(this.disposed)throw new Error("Connection has been already disposed.");{const e=await this.connectionFactory(this.sessionId);return e.onClose(((e,t)=>{this.fire("exited",{code:e,reason:t})})),e.onMessage((e=>this.handleMessage(e))),this.toDispose.push(o.Disposable.create((()=>{e.close()}))),e}}async sendRequest(e,t,n,i){var r;"initialize"===e&&(this.sessionAdapterID=t.adapterID);const o=this.manager.reportTime(a.DEBUG_REPORT_NAME.DEBUG_ADAPTER_PROTOCOL_TIME,{sessionId:this.sessionId,threadId:t&&t.threadId||(null===(r=this.manager.currentThread)||void 0===r?void 0:r.raw.id)}),s=await this.doSendRequest(e,t,i),c={adapterID:this.sessionAdapterID,request:n.request};if("threads"===e&&(c.amount=s.body.threads.length),o(e,c),"next"!==e&&"stepIn"!==e&&"stepOut"!==e&&"stepBack"!==e&&"reverseContinue"!==e&&"restartFrame"!==e||this.fireContinuedEvent(t.threadId),"continue"===e){const e=s;return void 0!==(e&&e.body&&e.body.allThreadsContinued)&&(this.allThreadsContinued=s.body.allThreadsContinued),this.fireContinuedEvent(t.threadId,this.allThreadsContinued),s}return s}async sendCustomRequest(e,t){var n;return null===(n=await this.doSendRequest(e,t))||void 0===n?void 0:n.body}async doSendRequest(e,t=null,n){const i=new o.Deferred,r={seq:(0,a.getSequenceId)(),type:"request",command:e};let s;return t&&Object.keys(t).length>0&&(r.arguments=t),this.pendingRequests.set(r.seq,(e=>{s&&s.dispose(),e.success?i.resolve(e):i.reject(e)})),n&&(s=n.onCancellationRequested((async()=>{s.dispose();const e=this.manager.getSession(this.sessionId);e&&e.capabilities.supportsCancelRequest&&e.sendRequest("cancel",{requestId:r.seq})}))),await this.send(r),i.promise}async send(e){const t=await this.connection,n=JSON.stringify(e);this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [UI -> adapter]: ${n}`),t.send(n)}handleMessage(e){this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [adapter -> UI ]: ${e}`);const t=JSON.parse(e);"request"===t.type?this.handleRequest(t):"response"===t.type?this.handleResponse(t):"event"===t.type&&this.handleEvent(t)}handleResponse(e){const t=this.pendingRequests.get(e.request_seq);t&&(this.pendingRequests.delete(e.request_seq),t(e))}onRequest(e,t){this.requestHandlers.set(e,t)}async handleRequest(e){const t={type:"response",seq:(0,a.getSequenceId)(),command:e.command,request_seq:e.seq,success:!0},n=this.requestHandlers.get(e.command);if(n)try{t.body=n(e)}catch(e){t.success=!1,t.message=e.message}else(0,o.getDebugLogger)().error("Unhandled request",e);await this.send(t)}handleEvent(e){"event"in e?("continued"===e.event&&(this.allThreadsContinued=!1!==e.body.allThreadsContinued),c.has(e.event)?this.doFire(e.event,e):this.onDidCustomEventEmitter.fire(e)):this.fire("exited",e)}on(e,t){return this.disposed?o.Disposable.create((()=>{})):this.getEmitter(e).event(t)}fire(e,t){this.doFire(e,t)}doFire(e,t){this.disposed||this.getEmitter(e).fire(t)}getEmitter(e){const t=this.emitters.get(e)||this.newEmitter();return this.emitters.set(e,t),t}newEmitter(){const e=new o.Emitter;return this.toDispose.push(e),e}fireContinuedEvent(e,t=!1){this.fire("continued",{type:"event",event:"continued",body:{threadId:e,allThreadsContinued:t},seq:(0,a.getSequenceId)()})}};i.__decorate([(0,r.Autowired)(a.IDebugSessionManager),i.__metadata("design:type",s.DebugSessionManager)],l.prototype,"manager",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)()),i.__param(1,(0,r.Optional)()),i.__param(2,(0,r.Optional)()),i.__metadata("design:paramtypes",[String,Function,Object])],l),t.DebugSessionConnection=l},18561:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionFactory=t.DebugSessionContributionRegistryImpl=t.DebugSessionContributionRegistry=t.DebugSessionContribution=void 0;const i=n(70655),r=n(39993);n(894);t.DebugSessionContribution=Symbol("DebugSessionContribution"),t.DebugSessionContributionRegistry=Symbol("DebugSessionContributionRegistry");let o=class{constructor(){this.contribs=new Map,this.init()}init(){for(const e of this.contributions.getContributions())this.contribs.set(e.debugType,e)}get(e){return this.contribs.get(e)}};i.__decorate([(0,r.Autowired)(t.DebugSessionContribution),i.__metadata("design:type",Object)],o.prototype,"contributions",void 0),o=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],o),t.DebugSessionContributionRegistryImpl=o,t.DebugSessionFactory=Symbol("DebugSessionFactory")},10111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionManager=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(11792),s=n(92345),c=n(1500),l=n(60437),d=n(15901),u=n(89329),p=n(750),h=n(25471),m=n(92842),g=n(18561),f=n(30785),_=n(34245);let b=class{constructor(){this._uid=(0,o.uuid)(),this._sessions=new Map,this._extraMap=new Map,this._actionIndex=0,this.onWillStartDebugSessionEmitter=new o.Emitter,this.onWillStartDebugSession=this.onWillStartDebugSessionEmitter.event,this.onWillResolveDebugConfigurationEmitter=new o.Emitter,this.onWillResolveDebugConfiguration=this.onWillResolveDebugConfigurationEmitter.event,this.onDidCreateDebugSessionEmitter=new o.Emitter,this.onDidCreateDebugSession=this.onDidCreateDebugSessionEmitter.event,this.onDidStartDebugSessionEmitter=new o.Emitter,this.onDidStartDebugSession=this.onDidStartDebugSessionEmitter.event,this.onDidStopDebugSessionEmitter=new o.Emitter,this.onDidStopDebugSession=this.onDidStopDebugSessionEmitter.event,this.onDidChangeActiveDebugSessionEmitter=new o.Emitter,this.onDidChangeActiveDebugSession=this.onDidChangeActiveDebugSessionEmitter.event,this.onDidDestroyDebugSessionEmitter=new o.Emitter,this.onDidDestroyDebugSession=this.onDidDestroyDebugSessionEmitter.event,this.onDidReceiveDebugSessionCustomEventEmitter=new o.Emitter,this.onDidReceiveDebugSessionCustomEvent=this.onDidReceiveDebugSessionCustomEventEmitter.event,this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.configurationIds=new Map,this.toDisposeOnCurrentSession=new o.DisposableCollection,this.init()}fireDidChange(e){this.inDebugModeKey.set(this.inDebugMode),this.onDidChangeEmitter.fire(e)}init(){this.debugTypeKey=this.contextKeyService.createKey(u.CONTEXT_DEBUG_TYPE_KEY,void 0),this.inDebugModeKey=this.contextKeyService.createKey(u.CONTEXT_IN_DEBUG_MODE_KEY,this.inDebugMode),this.debugStopped=this.contextKeyService.createKey(u.CONTEXT_DEBUG_STOPPED_KEY,!1),this.modelManager.onModelChanged((e=>{const{newModelUrl:t}=e;if(t){const e=o.URI.parse(t.toString()),n=this.modelManager.model;if(this.currentSession&&this.currentThread&&n){const t=this.currentThread.frames.find((t=>{var n;return(null===(n=t.source)||void 0===n?void 0:n.uri.toString())===e.toString()}));t&&t!==this.currentFrame&&(this.currentThread.currentFrame=t,setTimeout((()=>{this.workbenchEditorService.currentEditor&&this.workbenchEditorService.currentEditor.monacoEditor.revealLineInCenter(t.raw.line)}),0))}}}))}_getExtra(e,t){if(null==e)return;const n=this._extraMap.get(e);return n?Object.assign({traceId:n.traceId,remote:n.remote,adapterID:n.adapterID,request:n.request},t&&n.threads.get(`${t}`)):void 0}getExtra(e,t){return this._getExtra(e,t)}_setExtra(e,t,n){const i=this._extraMap.get(e);i&&(n?i.threads.set(t,n):i.threads.delete(t))}setExtra(e,t,n){return this._setExtra(e,t,n)}report(e,t,n){return n=Object.assign(Object.assign({traceId:this._uid},this._getExtra(null==n?void 0:n.sessionId,null==n?void 0:n.threadId)),n),this.reporterService.point(e,t,n)}reportTime(e,t){const n=this.reporterService.time(e);return(e,i)=>(i=Object.assign(Object.assign({},t),i),i=Object.assign(Object.assign({traceId:this._uid},this._getExtra(null==i?void 0:i.sessionId,null==i?void 0:i.threadId)),i),n.timeEnd(e,i))}reportAction(e,t,n){var i,r,o;let a=this._getExtra(e,t);a&&(t&&!a.threadId&&(a=Object.assign({},a)),this._actionIndex+=1,a.action=`${n}-${this._actionIndex}`,a.filePath=null===(r=null===(i=this.currentFrame)||void 0===i?void 0:i.raw.source)||void 0===r?void 0:r.path,a.fileLineNumber=null===(o=this.currentFrame)||void 0===o?void 0:o.raw.line,this._setExtra(e,`${null!=t?t:""}`,a))}async start(e){const{configuration:t}=e,n={adapterID:t.type,request:"launch"===t.request?"launch":"attach",traceId:this._uid,remote:0,threads:new Map};if((0,f.isRemoteAttach)(t)&&(n.remote=1),this.report(u.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"number",Object.assign({count:this.breakpoints.getBreakpoints().length},n)),e.configuration.__restart||!this.isExistedDebugSession(e))try{const t=this.reportTime(u.DEBUG_REPORT_NAME.DEBUG_SESSION_START_TIME,n);await this.fireWillStartDebugSession();const i=await this.resolveConfiguration(e);if(!i)return void(e.configuration.type?this.messageService.error((0,o.formatLocalize)("debug.notSupported.type",e.configuration.type)):this.messageService.error((0,o.localize)("debug.notSupported.any")));if(i.configuration.preLaunchTask){this.debugProgressService.onDebugServiceStateChange(u.DebugState.Initializing);const e=o.Uri.parse(i.workspaceFolderUri),t=await this.taskService.getTask(e,i.configuration.preLaunchTask);if(t){const r=this.reportTime(u.DEBUG_REPORT_NAME.DEBUG_PRE_LAUNCH_TASK_TIME,n),o=await this.taskService.run(t);0!==o.exitCode&&this.messageService.error(`The preLaunchTask ${i.configuration.preLaunchTask} exitCode is ${o.exitCode}`),r(e.toString(),{exitCode:o.exitCode})}this.debugProgressService.onDebugServiceStateChange(u.DebugState.Running)}const r=await this.debug.createDebugSession(i);return t(i.configuration.type,{adapterID:i.configuration.type,request:i.configuration.request,sessionId:r}),r?this.doStart(r,i,n):void this.messageService.error((0,o.formatLocalize)("debug.launch.typeNotSupported",i.configuration.type))}catch(e){if(u.DebugError.NotFound.is(e))return void this.messageService.error((0,o.formatLocalize)("debug.launch.typeNotSupported",e.data.type));throw this.messageService.error((0,o.localize)("debug.launch.catchError")),e}else this.messageService.error((0,o.formatLocalize)("debug.launch.existed",e.configuration.name))}async fireWillStartDebugSession(){await o.WaitUntilEvent.fire(this.onWillStartDebugSessionEmitter,{})}async resolveConfiguration(e){if(u.IDebugSessionDTO.is(e))return e;const{workspaceFolderUri:t,index:n,noDebug:i,parentSession:r,repl:a,compact:s,lifecycleManagedByParent:c}=e,l=await this.resolveDebugConfiguration(e.configuration,t);l&&!("cwd"in l)&&(l.cwd="${workspaceFolder}");let d=await this.variableResolver.resolve(l,{});if(!d)return void(null===d&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id));if(d=await this.resolveDebugConfigurationWithSubstitutedVariables(d,t),!d)return void(null===d&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id));const p=d.name+t,h=this.configurationIds.has(p)?this.configurationIds.get(p)+1:0;return this.configurationIds.set(p,h),{id:h,configuration:d,workspaceFolderUri:t,index:n,noDebug:i,parentSession:r,repl:a,compact:s,lifecycleManagedByParent:c}}async resolveDebugConfiguration(e,t){return await this.fireWillResolveDebugConfiguration(e.type),this.debug.resolveDebugConfiguration(e,t)}async resolveDebugConfigurationWithSubstitutedVariables(e,t){return this.debug.resolveDebugConfigurationWithSubstitutedVariables(e,t)}async fireWillResolveDebugConfiguration(e){await o.WaitUntilEvent.fire(this.onWillResolveDebugConfigurationEmitter,{debugType:e})}async doStart(e,t,n){const i=this.sessionContributionRegistry.get(t.configuration.type);if(!i)return;const r=i.debugSessionFactory().get(e,t);this._sessions.set(e,r),this._extraMap.set(e,n),this.debugTypeKey.set(r.configuration.type),this.onDidCreateDebugSessionEmitter.fire(r);let o=u.DebugState.Inactive;return r.onDidChange((()=>{var e,t;o!==r.state&&(o=r.state,o===u.DebugState.Stopped?(this.onDidStopDebugSessionEmitter.fire(r),this.debugStopped.set(!0)):this.debugStopped.set(!1)),this.debugContextKey.contextSetVariableSupported.set(null!==(e=r.capabilities.supportsSetVariable)&&void 0!==e&&e),this.debugContextKey.contextRestartFrameSupported.set(null!==(t=r.capabilities.supportsRestartFrame)&&void 0!==t&&t),this.debugContextKey.contextDebugState.set(u.DebugState[r.state]),this.debugContextKey.contextInDdebugMode.set(o!==u.DebugState.Inactive)})),r.on("terminated",(e=>{const t=e.body&&e.body.restart;t?this.doRestart(r,t):this.destroy(r.id)})),r.on("exited",(()=>this.destroy(r.id))),r.start().then((()=>this.onDidStartDebugSessionEmitter.fire(r))),r.onDidCustomEvent((({event:e,body:t})=>this.onDidReceiveDebugSessionCustomEventEmitter.fire({event:e,body:t,session:r}))),this.updateCurrentSession(r),r}isExistedDebugSession(e){const{name:t}=e.configuration;for(const[,e]of this._sessions)if(e.configuration.name===t&&!e.terminated)return!0;return!1}async restart(e=this.currentSession){return e&&this.doRestart(e)}async doRestart(e,t){if(await e.restart())return e;await e.terminate(!0);const{options:n,configuration:i}=e;return i.__restart=t,this.start(n)}updateCurrentSession(e){this.currentSession=e||this.sessions[0]}get inDebugMode(){return this.state>u.DebugState.Inactive}get currentThread(){const e=this.currentSession;return e&&e.currentThread}get state(){const e=this.currentSession;return e?e.state:u.DebugState.Inactive}get currentFrame(){const{currentThread:e}=this;return e&&e.currentFrame}get topFrame(){const{currentThread:e}=this;return e&&e.topFrame}getSession(e){if(e)return this._sessions.get(e)}get sessions(){return Array.from(this._sessions.values()).filter((e=>e.state>u.DebugState.Inactive))}get currentSession(){return this._currentSession}set currentSession(e){if(this._currentSession===e)return;this.toDisposeOnCurrentSession.dispose();const t=this._currentSession;this._currentSession=e,this.onDidChangeActiveDebugSessionEmitter.fire({previous:t,current:e}),e&&(this.toDisposeOnCurrentSession.push(e.onDidChange((()=>{this.currentFrame===this.topFrame&&this.open(),this.fireDidChange(e)}))),this.toDisposeOnCurrentSession.push(e.onCurrentThreadChange((()=>{this.fireDidChange(e)})))),this.open(),this.fireDidChange(e)}open(){const{currentFrame:e}=this;e&&e.open()}async stopSession(e,t=!1){return e?t?e.disconnect():e.terminate():Promise.all(this.sessions.map((e=>t?e.disconnect():e.terminate())))}destroy(e){if(e){const t=this._sessions.get(e);t&&this.doDestroy(t)}else this._sessions.forEach((e=>this.doDestroy(e)))}doDestroy(e){this.debug.terminateDebugSession(e.id),this.remove(e.id),e.dispose(),this.onDidDestroyDebugSessionEmitter.fire(e)}remove(e){this._sessions.delete(e);const{currentSession:t}=this;t&&t.id===e&&this.updateCurrentSession(void 0),setTimeout((()=>{this._extraMap.delete(e)}))}};i.__decorate([(0,r.Autowired)(a.LabelService),i.__metadata("design:type",a.LabelService)],b.prototype,"labelProvider",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],b.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(g.DebugSessionContributionRegistry),i.__metadata("design:type",Object)],b.prototype,"sessionContributionRegistry",void 0),i.__decorate([(0,r.Autowired)(u.IDebugServer),i.__metadata("design:type",Object)],b.prototype,"debug",void 0),i.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),i.__metadata("design:type",s.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(c.IMessageService),i.__metadata("design:type",Object)],b.prototype,"messageService",void 0),i.__decorate([(0,r.Autowired)(d.IVariableResolverService),i.__metadata("design:type",Object)],b.prototype,"variableResolver",void 0),i.__decorate([(0,r.Autowired)(h.BreakpointManager),i.__metadata("design:type",h.BreakpointManager)],b.prototype,"breakpoints",void 0),i.__decorate([(0,r.Autowired)(_.DebugModelManager),i.__metadata("design:type",_.DebugModelManager)],b.prototype,"modelManager",void 0),i.__decorate([(0,r.Autowired)(l.ITaskService),i.__metadata("design:type",Object)],b.prototype,"taskService",void 0),i.__decorate([(0,r.Autowired)(o.IReporterService),i.__metadata("design:type",Object)],b.prototype,"reporterService",void 0),i.__decorate([(0,r.Autowired)(p.IDebugProgress),i.__metadata("design:type",Object)],b.prototype,"debugProgressService",void 0),i.__decorate([(0,r.Autowired)(m.DebugContextKey),i.__metadata("design:type",m.DebugContextKey)],b.prototype,"debugContextKey",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],b.prototype,"commandService",void 0),b=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],b),t.DebugSessionManager=b},37930:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSession=void 0;const i=n(70655).__importDefault(n(23279)),r=n(894),o=n(90642),a=n(89329),s=n(10825),c=n(23375),l=n(83211),d=n(33324);t.DebugSession=class{constructor(e,t,n,s,c,l,d,u,p,h,m){this.id=e,this.options=t,this.connection=n,this.terminalService=s,this.workbenchEditorService=c,this.breakpointManager=l,this.modelManager=d,this.labelProvider=u,this.messages=p,this.fileSystem=h,this.sessionManager=m,this.onDidChangeEmitter=new r.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._onDidChangeCallStack=new r.Emitter,this.onDidChangeCallStack=this._onDidChangeCallStack.event,this._onVariableChange=new r.Emitter,this.onVariableChange=this._onVariableChange.event,this._onCurrentThreadChange=new r.Emitter,this.onCurrentThreadChange=this._onCurrentThreadChange.event,this._onDidStop=new r.Emitter,this.onDidStop=this._onDidStop.event,this._onDidContinued=new r.Emitter,this.onDidContinued=this._onDidContinued.event,this._onDidThread=new r.Emitter,this.onDidThread=this._onDidThread.event,this._onRequest=new r.Emitter,this.onRequest=this._onRequest.event,this._onDidExitAdapter=new r.Emitter,this.onDidExitAdapter=this._onDidExitAdapter.event,this._onDidProgressStart=new r.Emitter,this.onDidProgressStart=this._onDidProgressStart.event,this._onDidProgressUpdate=new r.Emitter,this.onDidProgressUpdate=this._onDidProgressUpdate.event,this._onDidProgressEnd=new r.Emitter,this.onDidProgressEnd=this._onDidProgressEnd.event,this._onDidInvalidated=new r.Emitter,this.onDidInvalidated=this._onDidInvalidated.event,this._onDidChangeState=new r.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._onDidInvalidMemory=new r.Emitter,this.onDidInvalidateMemory=this._onDidInvalidMemory.event,this.toDispose=new r.DisposableCollection,this._capabilities={},this.updateDeffered=null,this.exitDeferred=new r.Deferred,this.cancellationMap=new Map,this.toDisposeOnCurrentThread=new r.DisposableCollection,this.initialized=!1,this.id2Breakpoint=new Map,this.settingBreakpoints=null,this._multipleThreadPaused=new Map,this.sources=new Map,this._threads=new Map,this.scheduleUpdateThreads=(0,i.default)((()=>this.updateThreads(void 0)),100),this.pendingThreads=Promise.resolve(),this.terminated=!1,this.connection.onRequest("runInTerminal",(async e=>await this.runInTerminal(e))),this.toDispose.pushAll([this.onDidChangeEmitter,this.connection,this.on("initialized",(()=>{this.configure()})),this.on("breakpoint",(({body:e})=>this.onUpdateBreakpoint(e))),this.on("continued",(async e=>{const{body:{allThreadsContinued:t,threadId:n}}=e;return this.handleCancellation(n),this.supportsThreadIdCorrespond?(n?this._multipleThreadPaused.delete(n):!1!==t&&this._multipleThreadPaused.clear(),await this.updateCurrentThread(),void this._onDidContinued.fire(e)):!1!==t?(this.clearThreads(),void this._onDidContinued.fire(e)):(n&&this.clearThread(n),this.onStateChange(),void this._onDidContinued.fire(e))})),this.on("stopped",(async e=>{const{body:t}=e;this.stoppedDetails=t;const{threadId:n}=t,i=this.sessionManager.reportTime(a.DEBUG_REPORT_NAME.DEBUG_STOPPED,{sessionId:this.id,threadId:n});if(!0===this.supportsThreadIdCorrespond){if(await this.collectPausedThread(t),t.threadId&&this._multipleThreadPaused.has(t.threadId)){const e=this._multipleThreadPaused.get(t.threadId);await this.updateCurrentThread(e),await this.updateCurrentThreadFramesOnFocus()}}else this.updateDeffered=new r.Deferred,await this.updateThreads(t),await this.updateCurrentThreadFramesOnFocus(),this.updateDeffered.resolve();i("stopped");const o=this.sessionManager.getExtra(this.id,n);n&&o&&o.action&&(o.action=void 0,this.sessionManager.setExtra(this.id,`${null!=n?n:""}`,o)),this.onStateChange(),this._onDidStop.fire(e)})),this.on("thread",(e=>{const{body:{reason:t,threadId:n}}=e;this.supportsThreadIdCorrespond?this.state===a.DebugState.Stopped&&this._onDidThread.fire(e):("started"===t?this.scheduleUpdateThreads():"exited"===t&&this.clearThread(n),this._onDidThread.fire(e))})),this.on("terminated",(()=>{this.terminated=!0})),this.on("exited",(e=>{this.exitDeferred.resolve(e)})),this.on("progressStart",(e=>{this._onDidProgressStart.fire(e)})),this.on("progressUpdate",(e=>{this._onDidProgressUpdate.fire(e)})),this.on("progressEnd",(e=>{this._onDidProgressEnd.fire(e)})),this.on("memory",(e=>{this._onDidInvalidMemory.fire(e)})),this.on("invalidated",(async e=>{this._onDidInvalidated.fire(e),(!e.body.areas||1!==e.body.areas.length||"variables"!==e.body.areas[0]&&"watch"!==e.body.areas[0])&&(this.cancelAllRequests(),this.clearThreads(),await this.updateThreads(this.stoppedDetails)),this.fireDidChange()})),this.on("capabilities",(e=>this.updateCapabilities(e.body.capabilities))),this.breakpointManager.onDidChangeBreakpoints((e=>this.runtimeUpdateBreakpoint(e))),this.breakpointManager.onDidChangeExceptionsBreakpoints((e=>{this.breakpointManager.breakpointsEnabled&&this.setExceptionBreakpoints(e)})),o.Disposable.create((()=>{this.breakpointManager.clearAllStatus(this.id)}))])}fireDidChange(){this.onDidChangeEmitter.fire(void 0),this.onStateChange()}get capabilities(){return this._capabilities}get supportsThreadIdCorrespond(){return!!this.capabilities.supportsThreadIdCorrespond}getMemory(e){return new s.MemoryRegion(e,this)}get configuration(){return this.options.configuration}get parentSession(){return this.options.parentSession}get lifecycleManagedByParent(){return this.options.lifecycleManagedByParent}get compact(){return!!this.options.compact}async start(){await this.workbenchEditorService.saveAll(),await this.initialize(),await this.launchOrAttach()}async runInTerminal({arguments:{title:e,cwd:t,args:n,env:i}}){return this.doRunInTerminal({name:e,cwd:t,env:i},n.join(" "))}async doRunInTerminal(e,t){const n=this.terminalService.terminals.find((t=>t.name===e.name&&t.isActive));let i;if(n)t&&this.terminalService.sendText(n.id,t),i=await this.terminalService.getProcessId(n.id);else{const n=await this.terminalService.createTerminal(e);n.show(),t&&(this.terminalService.sendText(n.id,t),i=await this.terminalService.getProcessId(n.id))}return{processId:i}}async initialize(){const e=await this.connection.sendRequest("initialize",{clientID:"OpenSumi",clientName:"OpenSumi IDE",adapterID:this.configuration.type,locale:(0,o.getLanguageId)(),linesStartAt1:!0,columnsStartAt1:!0,pathFormat:"path",supportsVariableType:!1,supportsVariablePaging:!1,supportsRunInTerminalRequest:!0,supportsProgressReporting:!0,supportsInvalidatedEvent:!0,supportsMemoryEvent:!0,supportsMemoryReferences:!0},this.configuration);this.updateCapabilities(e.body||{}),this.onStateChange()}async launchOrAttach(){var e;if(this.parentSession&&this.parentSession.state===a.DebugState.Inactive)throw(0,r.canceled)();try{"attach"===this.configuration.request?await this.sendRequest("attach",this.configuration):await this.sendRequest("launch",this.configuration)}catch(t){throw this.fireExited(t),this.messages.error(t.message||(null===(e=t.body)||void 0===e?void 0:e.error.format)||(0,r.localize)("debug.console.errorMessage")),t&&t.message}}async configure(){await this.initBreakpoints(),this.breakpointManager.setExceptionBreakpoints(this.capabilities.exceptionBreakpointFilters||[]),this.capabilities.supportsConfigurationDoneRequest&&await this.sendRequest("configurationDone",{}),this.initialized=!0,this.supportsThreadIdCorrespond||await this.updateThreads(void 0)}async setExceptionBreakpoints(e){return this.sendRequest("setExceptionBreakpoints",e)}onStateChange(){const e=this.state;this.previousState!==e&&(this.previousState=e,this._onDidChangeState.fire(e))}async onUpdateBreakpoint(e){let t;this.settingBreakpoints&&await this.settingBreakpoints.promise;try{const n=e.breakpoint;switch(e.reason){case"new":if(n.source&&"number"==typeof n.line&&n.id&&!this.id2Breakpoint.has(n.id)){const e=l.DebugSource.toUri(n.source),t=c.DebugBreakpoint.create(e,{line:n.line,column:n.column});t.status.set(this.id,n),this.addBreakpoint(t)}break;case"removed":n.id&&(t=this.id2Breakpoint.get(n.id),t&&this.delBreakpoint(t));break;case"changed":n.id&&(t=this.id2Breakpoint.get(n.id),t&&(t.status.set(this.id,n),this.breakpointManager.updateBreakpoint(t,!0)))}}finally{}}async setBreakpoints(e){const t=[];for(const n of e){const e=await this.toSource(n),i=this.breakpointManager.getBreakpoints(n).filter((e=>this.breakpointManager.breakpointsEnabled&&e.enabled));t.push(this.sendRequest("setBreakpoints",{source:e.raw,sourceModified:!1,lines:i.map((e=>e.raw.line)),breakpoints:i.map((e=>e.raw))}).then((e=>(e.body.breakpoints.forEach(((e,t)=>{var n,r;e.id&&this.id2Breakpoint.set(e.id,i[t]);const o=i[t];o.raw.line=null!==(n=e.line)&&void 0!==n?n:o.raw.line,o.raw.column=null!==(r=e.column)&&void 0!==r?r:o.raw.column,o.status.set(this.id,e)})),this.breakpointManager.updateBreakpoints(i,!0),this.breakpointManager.resolveBpDeffered(),Promise.resolve()))).catch((e=>{if(!(e instanceof Error)){const t="Breakpoint not valid for current debug session",n=e.message?`${e.message}`:t;i.forEach((e=>{e.status.set(this.id,{verified:!1,message:n}),this.breakpointManager.updateBreakpoint(e,!0)}))}})))}return await Promise.all(t)}delBreakpoint(e){return this.breakpointManager.delBreakpoint(e)}async addBreakpoint(e,t){return t&&this.breakpointManager.setBpDeffered(),this.breakpointManager.addBreakpoint(e),this.breakpointManager.promiseBpDeffered()}async runtimeUpdateBreakpoint(e){const{affected:t,statusUpdated:n}=e;if(!n)return await this.setBreakpoints(t)}async initBreakpoints(){this.settingBreakpoints=new r.Deferred,this.id2Breakpoint.clear(),this.configuration.noDebug||await this.setBreakpoints(this.breakpointManager.affected.map((e=>r.URI.parse(e)))),this.settingBreakpoints.resolve(),this.settingBreakpoints=null}get currentThread(){return this._currentThread}set currentThread(e){this.toDisposeOnCurrentThread.dispose(),this._currentThread=e,e&&this.toDisposeOnCurrentThread.push(e.onDidChanged((()=>this.fireDidChange())))}get multipleThreadPaused(){return this._multipleThreadPaused}hasInMultipleThreadPaused(e){return this._multipleThreadPaused.has(e)}clearThreads(){var e;const t=this.sessionManager.reportTime(a.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:null===(e=this.currentThread)||void 0===e?void 0:e.id,threadAmount:this.threadCount});this._threads.forEach((e=>{e.clear()})),this._onDidChangeCallStack.fire(),this.collocationThread(),t("clearThreads")}clearThread(e){const t=this.sessionManager.reportTime(a.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:e,threadAmount:this.threadCount}),n=this._threads.get(e);n&&(n.clear(),this._onDidChangeCallStack.fire()),this.collocationThread(),t("clearThread")}get state(){if(this.connection.disposed)return a.DebugState.Inactive;if(!this.initialized)return a.DebugState.Initializing;const e=this.currentThread;return e?e.stopped?a.DebugState.Stopped:a.DebugState.Running:this.supportsThreadIdCorrespond?a.DebugState.Running:this.stoppedThreads.next().value?a.DebugState.Stopped:a.DebugState.Running}get currentFrame(){return this.currentThread&&this.currentThread.currentFrame}async getScopes(e){const{currentFrame:t}=this;return t?t.getScopes(e):[]}get label(){return a.IDebugSessionDTO.is(this.options)&&this.options.id?this.configuration.name+" ("+(this.options.id+1)+")":this.configuration.name}get visible(){return this.state>a.DebugState.Inactive}getSource(e){const t=l.DebugSource.toUri(e).toString(),n=this.sources.get(t)||new l.DebugSource(this,this.labelProvider,this.modelManager,this.workbenchEditorService,this.fileSystem);return n.update({raw:e}),this.sources.set(t,n),n}getSourceForUri(e){return this.sources.get(e.toString())}async toSource(e){const t=this.getSourceForUri(e);return t||this.getSource(await this.toDebugSource(e))}async toDebugSource(e){if(e.scheme===l.DebugSource.SCHEME)return{name:e.path.toString(),sourceReference:Number(e.query)};const t=e.displayName;let n=e.toString();return e.scheme===o.Schemes.file&&(n=await this.fileSystem.getFsPath(n)),{name:t,path:n,adapterData:void 0,sourceReference:void 0}}get threads(){return Array.from(this._threads.values())}get threadCount(){return this._threads.size}*getThreads(e){for(const t of this.threads)e(t)&&(yield t)}get runningThreads(){return this.getThreads((e=>!e.stopped))}get stoppedThreads(){return this.getThreads((e=>e.stopped))}async rawFetchThreads(e){const t=void 0===e?null:{threadId:e},n=await this.sendRequest("threads",t);return n&&n.body&&n.body.threads&&Array.isArray(n.body.threads)?Promise.resolve(n.body.threads):Promise.resolve([])}async fetchThreads(){const e=await this.rawFetchThreads(),t=this._threads,n=[];for(const i of e){const e=i.id,r=t.get(e)||new d.DebugThread(this);n.push(r),r.update({raw:i})}return Promise.resolve(n)}updateThreads(e){return this.pendingThreads=this.pendingThreads.then((async()=>{try{const t=await this.rawFetchThreads();this.doUpdateThreads(t,e)}catch(e){}}))}doUpdateThreads(e,t){const n=this.sessionManager.reportTime(a.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:null==t?void 0:t.threadId,threadAmount:e.length}),i=[];e.forEach((e=>{if(i.push(e.id),this._threads.has(e.id)){if(e.name){const t=this._threads.get(e.id);t&&(t.raw.name=e.name)}}else{const t=new d.DebugThread(this),n={raw:e};t.update(n),this._threads.set(e.id,t)}})),this._threads.forEach((e=>{var n;const{raw:{id:r}}=e;-1===i.indexOf(r)&&this._threads.delete(r),t&&(t.allThreadsStopped||t.threadId===r)&&(null===(n=this._threads.get(r))||void 0===n||n.update({stoppedDetails:t}))})),this.collocationThread(t),n("doUpdateThreads")}collocationThread(e){var t;const{currentThread:n}=this;let i=n&&n.raw.id;e&&!e.preserveFocusHint&&e.threadId&&(i=e.threadId),this.currentThread="number"==typeof i&&this._threads.get(i)||this._threads.values().next().value,(null===(t=this.currentThread)||void 0===t?void 0:t.raw.id)!==i&&this.fireDidChange()}async updateCurrentThread(e){e?(this.currentThread=e,this._onCurrentThreadChange.fire(this.currentThread)):(this.currentThread=void 0,this._onCurrentThreadChange.fire(void 0))}async collectPausedThread(e){const t=await this.rawFetchThreads(null==e?void 0:e.threadId);if(0===t.length)return new Map;const n=e.threadId&&this._multipleThreadPaused.has(e.threadId)?this._multipleThreadPaused.get(e.threadId):new d.DebugThread(this),i={raw:t[0]};return e&&(e.allThreadsStopped||e.threadId===t[0].id)&&(i.stoppedDetails=e),n&&(n.update(i),await this.rawFetchFrames(n),this._multipleThreadPaused.set(n.raw.id,n)),this._multipleThreadPaused}async updateCurrentThreadFramesOnFocus(){await this.rawFetchFrames(this.currentThread),this._onDidChangeCallStack.fire();const e=this.workbenchEditorService.currentEditor,t=e=>{this.stoppedDetails&&!this.stoppedDetails.preserveFocusHint&&(this.currentThread.currentFrame=e)};if(this.currentThread&&!this.currentFrame){const n=this.currentThread.frames.filter((e=>e&&e.source&&"deemphasize"!==e.source.raw.presentationHint));if(0===n.length)return;if(e){const i=e.monacoEditor.getModel();if(i){const e=r.URI.parse(i.uri.toString()),o=n.filter((t=>t.source.uri.toString()===e.toString()));Array.isArray(o)&&t(o[0])}}else t(n[0])}}async rawFetchFrames(e){e&&!e.frameCount&&(this.capabilities.supportsDelayedStackTraceLoading?(await e.rawFetchFrames(1),await e.rawFetchFrames(19)):await e.rawFetchFrames())}async terminate(e){this.cancelAllRequests(),this.lifecycleManagedByParent&&this.parentSession?await this.parentSession.terminate(e):!this.terminated&&this.capabilities.supportsTerminateRequest&&"launch"===this.configuration.request?(this.terminated=!0,this.sendRequest("terminate",{restart:e}),await this.exited(1e3)||await this.disconnect(e)):await this.disconnect(e)}async disconnect(e){try{this.lifecycleManagedByParent&&this.parentSession?this.parentSession.disconnect(e):this.sendRequest("disconnect",{restart:e})}catch(e){return void this.fireExited(e)}finally{this._onDidExitAdapter.fire(),this.onStateChange()}await this.exited(500)||this.fireExited(new Error("timeout after 500 ms"))}updateCapabilities(e){Object.assign(this._capabilities,e)}fireExited(e){this.connection.fire("exited",{reason:e})}exited(e){return Promise.race([this.exitDeferred.promise.then((()=>!0),(()=>!1)),new Promise((t=>{setTimeout(t,e,!1)}))])}async restart(){return this.cancelAllRequests(),!!this.capabilities.supportsRestartRequest&&(this.terminated=!1,this.lifecycleManagedByParent&&this.parentSession?await this.parentSession.restart():await this.sendRequest("restart",{}),!0)}dispose(){this.toDispose.dispose()}async evaluate(e,t){var n;this.updateDeffered&&await(null===(n=this.updateDeffered)||void 0===n?void 0:n.promise);const i=this.currentFrame&&this.currentFrame.raw.id;return(await this.sendRequest("evaluate",{expression:e,frameId:i,context:t})).body}async goto(e){if(this.capabilities.supportsGotoTargetsRequest){return await this.sendRequest("goto",e)}}async cancel(e){return this.sendRequest("cancel",{progressId:e})}async setVariableValue(e){if(this.capabilities.supportsSetVariable){const t=await this.sendRequest("setVariable",e);return this._onVariableChange.fire(),t}}async breakpointLocations(e,t){var n;const i=await this.toSource(e),r=((null===(n=(await this.sendRequest("breakpointLocations",{source:i.raw,line:t})).body)||void 0===n?void 0:n.breakpoints)||[]).map((e=>({lineNumber:e.line,column:e.column||1})));return Object.values(r.reduce(((e,t)=>Object.assign(Object.assign({},e),{[`${t.lineNumber}:${t.column}`]:t})),{}))}async sendRequest(e,t,n){var i,r,o;if(!this._capabilities.supportsTerminateRequest&&"terminate"===e||!this._capabilities.supportsCompletionsRequest&&"completions"===e||!this._capabilities.supportsTerminateThreadsRequest&&"terminateThreads"===e)throw new Error(`debug: ${e} not supported`);let a;["continue","next","stepIn","stepOut","threads"].some((t=>e===t))&&this.handleCancellation(null===(i=this.currentThread)||void 0===i?void 0:i.raw.id),["stackTrace","scopes","variables","completions","threads"].some((t=>e===t))&&(a=(null===(r=this.currentThread)||void 0===r?void 0:r.raw.id)?this.getNewCancellationToken(null===(o=this.currentThread)||void 0===o?void 0:o.raw.id,n):void 0);try{return await this.connection.sendRequest(e,t,this.configuration,a)}finally{this._onRequest.fire(e)}}async takeCommand(e){return new Promise((t=>{const n=this.onRequest((i=>{i===e&&(n.dispose(),t())}))}))}sendCustomRequest(e,t){return this.connection.sendCustomRequest(e,t)}on(e,t){return this.connection.on(e,t)}get onDidCustomEvent(){return this.connection.onDidCustomEvent}hasSeparateRepl(){return!this.parentSession||"mergeWithParent"!==this.options.repl}reportTime(e,t){return this.sessionManager.reportTime(e,t)}getNewCancellationToken(e,t){const n=new o.CancellationTokenSource(t),i=this.cancellationMap.get(e)||[];return i.push(n),this.cancellationMap.set(e,i),n.token}cancelAllRequests(){this.cancellationMap.forEach((e=>e.forEach((e=>e.cancel())))),this.cancellationMap.clear()}handleCancellation(e){if(e){const t=this.cancellationMap.get(e);this.cancellationMap.delete(e),t&&t.forEach((e=>e.cancel()))}else this.cancelAllRequests()}getDebugProtocolBreakpoint(e){const t=this.breakpointManager.getBreakpoints().find((t=>t.id===e));if(t){const e=t.status.get(this.id);return{id:null==e?void 0:e.id,verified:!!(null==e?void 0:e.verified),message:null==e?void 0:e.message,source:null==e?void 0:e.source,line:null==e?void 0:e.line,column:null==e?void 0:e.column,endLine:null==e?void 0:e.endLine,endColumn:null==e?void 0:e.endColumn,instructionReference:null==e?void 0:e.instructionReference,offset:null==e?void 0:e.offset}}}currentEditor(){var e;return null===(e=this.getModel())||void 0===e?void 0:e.getEditor()}getModel(){return this.modelManager.model}async readMemory(e,t,n){return this.capabilities.supportsReadMemoryRequest?await this.sendRequest("readMemory",{count:n,memoryReference:e,offset:t}):Promise.resolve(void 0)}async writeMemory(e,t,n,i){return this.capabilities.supportsWriteMemoryRequest?await this.sendRequest("writeMemory",{memoryReference:e,offset:t,allowPartial:i,data:n}):Promise.resolve(void 0)}}},30785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CharWidthReader=t.DEFAULT_WORD_REGEXP=t.USUAL_WORD_SEPARATORS=t.isRemoteAttach=t.matchAll=t.isExtensionHostDebugging=void 0;const i=n(894),{equalsIgnoreCase:r}=i.strings;t.isExtensionHostDebugging=function(e){return e.type&&r("vslsShare"===e.type?e.adapterProxy.configuration.type:e.type,"extensionhost")},t.matchAll=function(e,t){let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},t.isRemoteAttach=function(e){if("attach"===e.request){const t={node:"address",java:"hostName",go:"host",cppdbg:"miDebuggerServerAddress",python:"host"},{type:n}=e,i=e[t[n]];return!i||!["localhost","0.0.0.0","::1"].includes(i)}return!1},t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e=""){let n="(-?\\d*\\.\\d\\w*)|([^";for(const i of t.USUAL_WORD_SEPARATORS)e.indexOf(i)>=0||(n+="\\"+i);return n+="\\s]+)",new RegExp(n,"g")}();class o{constructor(){this._cache=new Map,this._canvas=document.createElement("canvas")}static getInstance(){return o._INSTANCE||(o._INSTANCE=new o),o._INSTANCE}getCharWidth(e,t){const n=e+t;if(this._cache.has(n))return this._cache.get(n);const i=this._canvas.getContext("2d");i.font=t;const r=i.measureText(e).width;return this._cache.set(n,r),r}}t.CharWidthReader=o,o._INSTANCE=null},66285:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointWidget=t.TopStackType=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(90642),c=n(89329),l=n(89021),d=n(80098),u=n(52748);!function(e){e[e.exception=0]="exception",e[e.debugger=1]="debugger"}(t.TopStackType||(t.TopStackType={}));let p=i=class extends s.Disposable{constructor(){super(),this.breakpointWidgetInputFocus=d.CONTEXT_BREAKPOINT_INPUT_FOCUSED.bind(this.contextKeyService)}get position(){return this._position}get values(){var e;return null===(e=this.zone)||void 0===e?void 0:e.values}get breakpointType(){var e;return null===(e=this.zone)||void 0===e?void 0:e.breakpointType}show(e,t,n="condition"){this.dispose(),this._position=e,this.addDispose(this.zone=this.injector.get(u.DebugBreakpointZoneWidget,[this.editor,Object.assign({},t),n])),this.addDispose(this.zone.onDidChangeBreakpoint((({context:e,value:n})=>{t&&(t[e]=n)}))),this.addDispose(this.zone.onFocus((()=>{this.breakpointWidgetInputFocus.set(!0)}))),this.addDispose(this.zone.onBlur((()=>{this.breakpointWidgetInputFocus.set(!1)}))),this.addDispose(this.zone.onDispose((()=>{this._position=void 0,this.breakpointWidgetInputFocus.set(!1)}))),this.zone.show((0,s.positionToRange)(e),i.LINE_HEIGHT_NUMBER)}hide(){var e;null===(e=this.zone)||void 0===e||e.hide()}};p.LINE_HEIGHT_NUMBER=2,r.__decorate([(0,o.Autowired)(c.DebugEditor),r.__metadata("design:type",Object)],p.prototype,"editor",void 0),r.__decorate([(0,o.Autowired)(l.DebugBreakpointsService),r.__metadata("design:type",l.DebugBreakpointsService)],p.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,o.Autowired)(a.IContextKeyService),r.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),p=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],p),t.DebugBreakpointWidget=p},52748:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointZoneWidget=void 0;const r=n(70655),o=r.__importDefault(n(616)),a=r.__importDefault(n(5868)),s=n(39993),c=n(25880),l=n(90642),d=n(97069),u=n(52292),p=r.__importStar(n(67266)),h=(n(89329),n(89021)),m=r.__importDefault(n(12864));let g=i=class extends d.ZoneWidget{constructor(e,t={},n="condition"){super(e),this.editor=e,this.contexts=t,this.context=n,this._onDidChangeBreakpoint=new l.Emitter,this.onDidChangeBreakpoint=this._onDidChangeBreakpoint.event,this._onFocus=new l.Emitter,this.onFocus=this._onFocus.event,this._onBlur=new l.Emitter,this.onBlur=this._onBlur.event,this.inputFocusHandler=()=>{this._onFocus.fire()},this.inputBlurHandler=()=>{this._onBlur.fire()},this.selectContextHandler=e=>{this.input&&(this.contexts[this.context]=this.input.monacoEditor.getValue()||void 0),this.context=e,this.setInputMode(),this.render()},this._wrapper=document.createElement("div"),this._selection=document.createElement("div"),this._input=document.createElement("div"),this._container.appendChild(this._wrapper),this._wrapper.appendChild(this._selection),this._wrapper.appendChild(this._input),a.default.render(o.default.createElement(o.default.Fragment,null),this._input)}_fillContainer(e){}get values(){return Object.assign(Object.assign({},this.contexts),{[this.context]:this.input&&this.input.monacoEditor.getValue()||void 0})}get breakpointType(){return this.context}hide(){this.input&&(this.input.dispose(),this.input=void 0),super.dispose()}show(e,t){super.show(e,t),this.debugBreakpointsService.createBreakpointInput(this._input).then((e=>{this.input=e;const{monacoEditor:t}=this.input;this.setInputMode(),this.addDispose(t.onDidBlurEditorWidget((()=>{this.inputBlurHandler()}))),this.addDispose(t.onDidFocusEditorWidget((()=>{this.inputFocusHandler()}))),this.addDispose(t.onDidChangeModelContent((e=>{if(!this.input)return;0===t.getValue().length?this.ensureRenderPlaceholder():this.clearPlaceholder();const n=t.getModel().getLineCount();this._relayout(n+1)}))),this.syncPreContent()}))}createDecorations(){this.input&&0===this.input.monacoEditor.getValue().length&&this.input.monacoEditor.deltaDecorations([],[{range:{startLineNumber:1,endLineNumber:0,startColumn:0,endColumn:1},options:{description:"debug-breakpoint-zone-widget",afterContentClassName:m.default.input_placeholder}}])}renderOption(e,t){return o.default.createElement(c.Option,{value:e},t)}setInputMode(){var e;const t=null===(e=this.editor.getModel())||void 0===e?void 0:e.getLanguageIdentifier(),n=this.input.monacoEditor.getModel();n&&t&&n.setMode("logMessage"===this.context?new p.LanguageIdentifier("plaintext",1):t)}renderPlaceholder(){if(!this.input)return;this.clearPlaceholder();const e=`'${this.placeholder}' !important`;this.cssManager.addClass(i.INPUT_PLACEHOLDER_AFTER,{content:e})}ensureRenderPlaceholder(){this.input&&(this.createDecorations(),this.renderPlaceholder())}syncPreContent(){if(this.input){this.input.focus();const e=this.contexts[this.context]||"";this.input.monacoEditor.setValue(e)}}clearPlaceholder(){this.cssManager.removeClass(i.INPUT_PLACEHOLDER_AFTER)}applyClass(){this._wrapper.className=m.default.debug_breakpoint_wrapper,this._selection.className=m.default.debug_breakpoint_selected,this._input.className=m.default.debug_breakpoint_input}applyStyle(){this.syncPreContent(),a.default.render(o.default.createElement(c.Select,{value:this.context,selectedRenderer:()=>o.default.createElement("span",{className:"kt-select-option"},this.getContextToLocalize(this.context)),onChange:this.selectContextHandler},this.renderOption("condition",this.getContextToLocalize("condition")),this.renderOption("hitCondition",this.getContextToLocalize("hitCondition")),this.renderOption("logMessage",this.getContextToLocalize("logMessage"))),this._selection)}getContextToLocalize(e){switch(e){case"logMessage":return(0,l.localize)("debug.expression.logMessage");case"hitCondition":return(0,l.localize)("debug.expression.hitCondition");default:return(0,l.localize)("debug.expression.condition")}}get placeholder(){switch(this.context){case"logMessage":return(0,l.localize)("debug.expression.log.placeholder");case"hitCondition":return(0,l.localize)("debug.expression.hit.placeholder");default:return(0,l.localize)("debug.expression.condition.placeholder")}}};g.INPUT_PLACEHOLDER_AFTER=m.default.input_placeholder+"::after",r.__decorate([(0,s.Autowired)(h.DebugBreakpointsService),r.__metadata("design:type",h.DebugBreakpointsService)],g.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,s.Autowired)(u.ICSSStyleService),r.__metadata("design:type",Object)],g.prototype,"cssManager",void 0),g=i=r.__decorate([(0,s.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object,Object,String])],g),t.DebugBreakpointZoneWidget=g},47173:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditorContribution=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(894),c=n(92345),l=n(97276),d=n(15353),u=n(67266),p=r.__importStar(n(63138)),h=n(92842),m=n(10111),g=n(84324),f=n(89329),_=n(30785),b=n(34245),y=n(99897),v="inlinevaluedecoration",{flatten:C}=s.arrays;class S{constructor(e,t){this.column=e,this.text=t}}function w(e,t,n=1073741824){return t.length>150&&(t=t.substr(0,150)+"..."),{range:{startLineNumber:e,endLineNumber:e,startColumn:n,endColumn:n},renderOptions:{after:{contentText:t,backgroundColor:"rgba(255, 200, 0, 0.2)",margin:"10px"},dark:{after:{color:"rgba(255, 255, 255, 0.5)"}},light:{after:{color:"rgba(0, 0, 0, 0.5)"}}}}}let E=i=class{constructor(){this.disposer=new s.Disposable,this.editorDisposer=new s.Disposable}contribute(e){return this.disposer.addDispose(this.debugSessionManager.onDidChangeActiveDebugSession((()=>{const t=this.debugSessionManager.currentSession;t&&(this.editorDisposer.addDispose(t.onDidChange((()=>{this.setHoverEnabled(e)}))),this.editorDisposer.addDispose(t.onDidExitAdapter((()=>{this.setHoverEnabled(e,!0)}))),this.editorDisposer.addDispose(this.editorService.onActiveResourceChange((n=>{var i;(null==n?void 0:n.uri.toString())===(null===(i=t.getModel())||void 0===i?void 0:i.uri.toString())?this.setHoverEnabled(e):this.setHoverEnabled(e,!0)}))),this.disposer.addDispose([s.Event.any(t.onDidChangeCallStack,t.onDidStop)((async()=>{await this.directRunUpdateInlineValueDecorations(e)})),t.onDidExitAdapter((()=>{this.removeInlineValuesScheduler(e).schedule(),this.editorDisposer.dispose()}))]),this.disposer.addDispose(t),this.registerEditorListener(e))}))),this.disposer.addDispose(this.editorDisposer),this.disposer}registerEditorListener(e){this.editorDisposer.addDispose(e.monacoEditor.onKeyDown((async t=>{var n,i,r,o,a;if((null===(r=null===(i=null===(n=this.debugSessionManager.currentSession)||void 0===n?void 0:n.currentFrame)||void 0===i?void 0:i.source)||void 0===r?void 0:r.uri.toString())===(null===(o=e.currentUri)||void 0===o?void 0:o.toString())&&t.keyCode===p.KeyCode.Alt){this.setHoverEnabled(e,!0),null===(a=this.debugModelManager.model)||void 0===a||a.getDebugHoverWidget().hide();const t=e.monacoEditor.onKeyUp((async n=>{var i;n.keyCode===p.KeyCode.Alt&&(this.setHoverEnabled(e,!1),null===(i=this.debugModelManager.model)||void 0===i||i.getDebugHoverWidget().show(),t.dispose())}))}}))),this.editorDisposer.addDispose(e.monacoEditor.onDidChangeModelContent((async()=>{i.MEMOIZER.clear(),await this.directRunUpdateInlineValueDecorations(e)}))),this.editorDisposer.addDispose(e.monacoEditor.onDidChangeModel((async()=>{await this.directRunUpdateInlineValueDecorations(e)})))}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("inline-value-decoration",v,{})}setHoverEnabled(e,t=!this.debugContextKey.contextInDdebugMode.get()){e.monacoEditor.updateOptions({hover:{enabled:t}})}async directRunUpdateInlineValueDecorations(e){var t;const n=null===(t=this.debugSessionManager.currentSession)||void 0===t?void 0:t.currentFrame;n&&(i.MEMOIZER.clear(),await this.updateInlineValueDecorations(n,e))}removeInlineValuesScheduler(e){return new s.RunOnceScheduler((()=>e.monacoEditor.removeDecorations(v)),100)}async updateInlineValueDecorations(e,t){var n;if(!t)return;const i="{0} = {1}",r=t.monacoEditor.getModel();if(!this.preferenceService.get("debug.inline.values")||!r||!e||r.uri.toString()!==(null===(n=e.source)||void 0===n?void 0:n.uri.toString()))return void(this.removeInlineValuesScheduler(t).isScheduled()||this.removeInlineValuesScheduler(t).schedule());let o;if(this.removeInlineValuesScheduler(t).cancel(),y.InlineValuesProviderRegistry.has(r)){const n=async(t,n)=>{const i=await e.getMostSpecificScopes(e.range()),r=n?t:t.toLowerCase();for(const e of i){await e.ensureLoaded();const t=(e.children||[]).find((e=>n?e.name===r:e.name.toLowerCase()===r));if(t)return t.value}},a={frameId:e.raw.id,stoppedLocation:(()=>{const t=e.range();return new d.Range(t.startLineNumber,t.startColumn+1,t.endLineNumber,t.endColumn+1)})()},c=(new s.CancellationTokenSource).token,l=t.monacoEditor.getVisibleRanges(),u=y.InlineValuesProviderRegistry.ordered(r).reverse();o=[];const p=new Map,h=C(u.map((t=>l.map((o=>Promise.resolve(t.provideInlineValues(r,o,a,c)).then((async t=>{if(t)for(const o of t){let t;switch(o.type){case"text":t=o.text;break;case"variable":{let e=o.variableName;if(!e){e=r.getLineContent(o.range.startLineNumber).substring(o.range.startColumn-1,o.range.endColumn-1)}const a=await n(e,o.caseSensitiveLookup);a&&(t=s.strings.format(i,e,a));break}case"expression":{let n=o.expression;if(!n){n=r.getLineContent(o.range.startLineNumber).substring(o.range.startColumn-1,o.range.endColumn-1)}if(n){const r=new g.DebugWatchRoot(e.thread.session),o=new g.DebugWatchNode(e.thread.session,n,r);await o.evaluate(n),o.available&&(t=s.strings.format(i,n,o.description))}break}}if(t){const e=o.range.startLineNumber;let n=p.get(e);n||(n=[],p.set(e,n)),n.some((e=>e.text===t))||n.push(new S(o.range.startColumn,t))}}}),(e=>{(0,s.onUnexpectedExternalError)(e)})))))));await Promise.all(h),p.forEach(((e,t)=>{if(e.length>0){const n=(e=e.sort(((e,t)=>e.column-t.column))).map((e=>e.text)).join(", ");o.push(w(t,n))}}))}else{const n=await e.getMostSpecificScopes(e.range()),i=await Promise.all(n.map((async n=>{await n.ensureLoaded();const i=n.children||[],o=e.range(),s=n.range();let c=new d.Range(0,0,o.startLineNumber,o.startColumn);return s&&(c=c.setStartPosition(s.startLineNumber,s.startColumn)),function(e,t,n,i){const r=new Map;for(const t of e)if(r.set(t.name,t.value),r.size>=100)break;const o=new Map;r.forEach(((e,n)=>{const r=i.get(n);if(r)for(const e of r)t.containsPosition(new a.Position(e,0))&&(o.has(e)||o.set(e,[]),-1===o.get(e).indexOf(n)&&o.get(e).push(n))}));const s=[];return o.forEach(((e,t)=>{const i=e.sort(((e,i)=>{const r=n.getLineContent(t);return r.indexOf(e)-r.indexOf(i)})).map((e=>`${e} = ${r.get(e)}`)).join(", ");s.push(w(t,i))})),s}(i,c,r,function(e){const t=new Map;if(!e)return t;for(let n=1,i=e.getLineCount();n<=i;++n){const i=e.getLineContent(n);if(i.length>500)continue;e.forceTokenization(n);const r=e.getLineTokens(n);for(let e=0,o=r.getCount();ee.concat(t)),[])}t.monacoEditor.setDecorations("inline-value-decoration",v,o)}};E.MEMOIZER=(0,s.createMemoizer)(),r.__decorate([(0,o.Autowired)(a.IContextKeyService),r.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(b.DebugModelManager),r.__metadata("design:type",b.DebugModelManager)],E.prototype,"debugModelManager",void 0),r.__decorate([(0,o.Autowired)(f.IDebugSessionManager),r.__metadata("design:type",m.DebugSessionManager)],E.prototype,"debugSessionManager",void 0),r.__decorate([(0,o.Autowired)(a.PreferenceService),r.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],E.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(c.WorkbenchEditorService),r.__metadata("design:type",l.WorkbenchEditorServiceImpl)],E.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(h.DebugContextKey),r.__metadata("design:type",h.DebugContextKey)],E.prototype,"debugContextKey",void 0),E=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],E),t.DebugEditorContribution=E},3565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugExpressionProvider=void 0;const i=n(70655),r=n(39993),o=n(90642),a=i.__importStar(n(63138)),s=n(19503),{coalesce:c}=o.arrays;let l=class{async get(e,t){var n,i;let r,s;if(this.evaluatableExpressionService.hasEvaluatableExpressProvider(e)){const l=new o.CancellationTokenSource,d=this.evaluatableExpressionService.getSupportedEvaluatableExpressionProvider(e),u=new a.Position(t.startLineNumber,t.startColumn),p=d.map((t=>Promise.resolve(t.provideEvaluatableExpression(e,u,l.token)).then((e=>e),(()=>{})))),h=await Promise.all(p).then(c);if(h.length>0&&(r=null===(n=h[0])||void 0===n?void 0:n.expression,s=null===(i=h[0])||void 0===i?void 0:i.range,!r&&s)){r=e.getLineContent(u.lineNumber).substring(s.startColumn-1,s.endColumn-1)}}else{const n=e.getLineContent(t.startLineNumber),{start:i,end:o}=this.getExactExpressionStartAndEnd(n,t.startColumn,t.endColumn);r=n.substring(i-1,o)}return r}getExactExpressionStartAndEnd(e,t,n){let i,r=0;const o=/([^()[\]{}<>\s+\-/%~#^;=|,`!]|->)+/g;let a=null;for(;a=o.exec(e);){const e=a.index+1,o=e+a[0].length;if(e<=t&&o>=n){i=a[0],r=e;break}}if(i){const e=/\w+/g;let t=null;for(;t=e.exec(i);){if(t.index+1+r+t[0].length>=n)break}t&&(i=i.substring(0,e.lastIndex))}return i?{start:r,end:r+i.length-1}:{start:0,end:0}}};i.__decorate([(0,r.Autowired)(s.IEvaluatableExpressionService),i.__metadata("design:type",Object)],l.prototype,"evaluatableExpressionService",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.DebugExpressionProvider=l},17329:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(90624);let l=i=class extends a.TreeModel{constructor(e){super(),this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),this.onWillUpdateEmitter=new s.Emitter,this.init(e)}get onWillUpdate(){return this.onWillUpdateEmitter.event}init(e){this.root=e,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,(()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{await this.onWillUpdateEmitter.fireAndAwait(),this.dispatchChange()}))}))}};l.DEFAULT_FLUSH_DELAY=100,l=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[c.ExpressionContainer])],l),t.DebugHoverModel=l},32524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverSource=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(89329),s=n(10111),c=n(90624);let l=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event}dispose(){this._expression=void 0}get expression(){return this._expression}clearEvaluate(){this.onDidChangeEmitter.fire(void 0)}async evaluate(e){const t=await this.doEvaluate(e);return this._expression=t,this.onDidChangeEmitter.fire(t),t}async doEvaluate(e){const{currentSession:t}=this.sessions;if(t){if(t.capabilities.supportsEvaluateForHovers){const n=new c.DebugHoverVariableRoot(e,t);return await n.evaluate("hover"),n.available&&n||void 0}return this.findVariable(e.split(".").map((e=>e.trim())).filter((e=>!!e)))}}async findVariable(e){const{currentFrame:t}=this.sessions;if(!t)return;let n;const i=await t.getScopes();for(const t of i){const i=await this.doFindVariable(t,e);if(n){if(i&&i.value!==n.value)return}else n=i}return n}async doFindVariable(e,t){await e.ensureLoaded();const n=e.children,i=[];if(n){for(const e of n)(e instanceof c.DebugVariableContainer||e instanceof c.DebugVariable)&&e.name===t[0]&&i.push(e);if(1===i.length)return 1===t.length?i[0]:this.doFindVariable(i[0],t.slice(1))}}};i.__decorate([(0,r.Autowired)(a.IDebugSessionManager),i.__metadata("design:type",s.DebugSessionManager)],l.prototype,"sessions",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.DebugHoverSource=l},70288:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverTreeModelService=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(90624),l=r.__importDefault(n(78004)),d=n(17329),u=n(32524),{Path:p}=s.path;let h=i=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(l.default.mod_selected),this.focusedDecoration=new a.Decoration(l.default.mod_focused),this.loadingDecoration=new a.Decoration(l.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new s.Emitter,this.onDidUpdateTreeModelOrVariableEmitter=new s.Emitter,this.disposableCollection=new s.DisposableCollection,this.activeNodeDecoration=(e,t=!0)=>{if(this.preContextMenuFocusedNode&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode),this.preContextMenuFocusedNode=null),e){if(this.selectedNodes.length>0)for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],t&&this.treeModel.dispatchChange()}},this.activeNodeFocusedDecoration=(e,t=!1)=>{this.focusedNode!==e&&(t?(this.preContextMenuFocusedNode?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode)):this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.preContextMenuFocusedNode=e):this.focusedNode&&(this.preContextMenuFocusedNode=null,this.focusedDecoration.removeTarget(this.focusedNode)),e&&(this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes.push(e))),this.treeModel.dispatchChange()},this.enactiveNodeDecoration=()=>{this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this.treeModel.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleTwistierClick=e=>{c.ExpressionContainer.is(e)?(this.activeNodeDecoration(e,!1),this.toggleDirectory(e)):this.activeNodeDecoration(e)},this.toggleDirectory=async e=>{e.expanded?this.treeHandle.collapseNode(e):this.treeHandle.expandNode(e)},this.flushEventQueue=()=>{let e;if(!this._changeEventDispatchQueue||0===this._changeEventDispatchQueue.length)return;this._changeEventDispatchQueue.sort(((e,t)=>p.pathDepth(e)-p.pathDepth(t)));const t=[this._changeEventDispatchQueue[0]];for(const e of this._changeEventDispatchQueue)t.some((t=>0===e.indexOf(t)))||t.push(e);return e=(0,s.pSeries)(t.map((e=>async()=>{var t;const n=null===(t=this.treeModel.root)||void 0===t?void 0:t.watchEvents.get(e);return n&&"function"==typeof n.callback&&await n.callback({type:a.WatchEvent.Changed,path:e}),null}))),this._changeEventDispatchQueue=[],e},this.debugHoverSource.onDidChange((async e=>{e?e instanceof c.DebugVariable?(this.dispose(),this.onDidUpdateTreeModelOrVariableEmitter.fire({variable:e})):(await this.initTreeModel(e),this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:this.treeModel})):this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:void 0,variable:void 0})}))}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}get onDidUpdateTreeModelOrVariable(){return this.onDidUpdateTreeModelOrVariableEmitter.event}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugHoverTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenTreeViewChange(){var e,t;this.dispose(),this.disposableCollection.push(null===(e=this.treeModel)||void 0===e?void 0:e.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.disposableCollection.push(null===(t=this.treeModel)||void 0===t?void 0:t.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.disposableCollection.push(this.treeModel.onWillUpdate((()=>{var e;if(0!==this.selectedNodes.length){const t=null===(e=this.treeModel)||void 0===e?void 0:e.root.getTreeNodeByPath(this.selectedNodes[0].path);this.selectedDecoration.addTarget(t)}})))}async initTreeModel(e){if(e)return this._treeModel=this.injector.get(d.DebugHoverModel,[e]),this.initDecorations(e),this.listenTreeViewChange(),this._treeModel}initDecorations(e){this._decorations=new a.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration))}handleTreeHandler(e){this._debugHoverTreeHandle=e}async refresh(e=this.treeModel.root){!c.ExpressionContainer.is(e)&&e.parent&&(e=e.parent),this.queueChangeEvent(e.path,(()=>{this.onDidRefreshedEmitter.fire()}))}queueChangeEvent(e,t){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new s.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout((async()=>{var e;await this.flushEventQueue(),null===(e=this.flushEventQueueDeferred)||void 0===e||e.resolve(),this.flushEventQueueDeferred=null,t()}),i.DEFAULT_FLUSH_FILE_EVENT_DELAY)),-1===this._changeEventDispatchQueue.indexOf(e)&&this._changeEventDispatchQueue.push(e)}};h.DEFAULT_FLUSH_FILE_EVENT_DELAY=100,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(u.DebugHoverSource),r.__metadata("design:type",u.DebugHoverSource)],h.prototype,"debugHoverSource",void 0),h=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],h),t.DebugHoverTreeModelService=h},22009:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverWidget=void 0;const r=n(70655),o=r.__importDefault(n(23279)),a=r.__importDefault(n(616)),s=r.__importDefault(n(5868)),c=n(39993),l=n(894),d=r.__importStar(n(63138)),u=n(89329),p=n(10111),h=n(3565),m=n(32524),g=n(64775);let f=i=class{constructor(){this.toDispose=new l.DisposableCollection,this.allowEditorOverflow=!0,this.doSchedule=(0,o.default)((e=>e()),300),this.init()}init(){this.toDispose.pushAll([l.Disposable.create((()=>this.editor.removeContentWidget(this))),l.Disposable.create((()=>this.hide())),this.sessions.onDidChange((()=>{this.isEditorFrame()||this.hide()}))]),this.renderView()}handleWindowWheel(e){e.stopPropagation()}getId(){return i.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.classList.add(i.ID)),this.domNode}getPosition(){var e;const t=this.options&&this.options.selection.getStartPosition(),n=t&&(null===(e=this.editor.getModel())||void 0===e?void 0:e.getWordAtPosition(t));return t&&n?{position:new d.Position(t.lineNumber,n.startColumn),preference:[d.editor.ContentWidgetPositionPreference.BELOW,d.editor.ContentWidgetPositionPreference.ABOVE]}:null}dispose(){this.toDispose.dispose()}show(e){this.schedule((()=>this.doShow(e)),e&&e.immediate)}hide(e){this.schedule((()=>this.doHide()),e&&e.immediate)}schedule(e,t=!0){t?(this.doSchedule.cancel(),e()):this.doSchedule(e)}isEditorFrame(){const{currentFrame:e}=this.sessions;return!!e&&!!e.source&&!!this.editor.getModel()&&this.editor.getModel().uri.toString()===e.source.uri.toString()}doHide(){window.removeEventListener("mousewheel",this.handleWindowWheel,!0),this.getDomNode().contains(document.activeElement)&&this.editor.focus(),this.hoverSource.dispose(),this.hoverSource.clearEvaluate(),this.options=void 0,this.editor.removeContentWidget(this)}layoutContentWidget(){this.editor.layoutContentWidget(this)}renderView(){s.default.render(a.default.createElement(l.ConfigProvider,{value:this.configContext},a.default.createElement(g.DebugHoverView,null)),this.getDomNode(),(()=>{this.layoutContentWidget()}))}async doShow(e=this.options){if(!this.isEditorFrame())return;if(!e)return;if(this.options&&this.options.selection.equalsRange(e.selection))return;this.options=e;const t=await this.expressionProvider.get(this.editor.getModel(),e.selection);t&&(this.hoverSource.clearEvaluate(),await this.hoverSource.evaluate(t)&&(this.reporterService.point(null===u.DEBUG_REPORT_NAME||void 0===u.DEBUG_REPORT_NAME?void 0:u.DEBUG_REPORT_NAME.DEBUG_VARIABLES,"hover",t),this.editor.addContentWidget(this),window.addEventListener("mousewheel",this.handleWindowWheel,!0)))}};f.ID="debug-hover-widget",r.__decorate([(0,c.Autowired)(u.DebugEditor),r.__metadata("design:type",Object)],f.prototype,"editor",void 0),r.__decorate([(0,c.Autowired)(u.IDebugSessionManager),r.__metadata("design:type",p.DebugSessionManager)],f.prototype,"sessions",void 0),r.__decorate([(0,c.Autowired)(h.DebugExpressionProvider),r.__metadata("design:type",h.DebugExpressionProvider)],f.prototype,"expressionProvider",void 0),r.__decorate([(0,c.Autowired)(m.DebugHoverSource),r.__metadata("design:type",m.DebugHoverSource)],f.prototype,"hoverSource",void 0),r.__decorate([(0,c.Autowired)(l.AppConfig),r.__metadata("design:type",Object)],f.prototype,"configContext",void 0),r.__decorate([(0,c.Autowired)(l.IReporterService),r.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),f=i=r.__decorate([(0,c.Injectable)(),r.__metadata("design:paramtypes",[])],f),t.DebugHoverWidget=f},64775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(894),l=n(20287),d=n(70288),u=i.__importDefault(n(55002));t.DebugHoverView=(0,o.observer)((()=>{const e=(0,c.useInjectable)(d.DebugHoverTreeModelService),[t,n]=a.default.useState({}),[i,o]=a.default.useState(250),p=a.default.createRef();a.default.useEffect((()=>(e.onDidUpdateTreeModelOrVariable((async e=>{const{treeModel:t,variable:i}=e;t&&await t.root.ensureLoaded(),n({treeModel:t,variable:i})})),h(),()=>{e.removeNodeDecoration()})),[]),a.default.useEffect((()=>{let e;return o(250),t.treeModel&&(e=t.treeModel.root.watcher.on(s.TreeNodeEvent.DidChangeExpansionState,(e=>{var n;const i=Math.max(250,22*~~(null===(n=t.treeModel)||void 0===n?void 0:n.root.branchSize));o(Math.min(500,i))}))),()=>{null==e||e.dispose()}}),[t.treeModel]);const h=async()=>{e.treeModel&&(await e.treeModel.root.ensureLoaded(),n({treeModel:e.treeModel}))},m=n=>{e.handleTreeHandler(Object.assign(Object.assign({},n),{getModel:()=>null==t?void 0:t.treeModel,hasDirectFocus:()=>p.current===document.activeElement}))},g=(t,n)=>{t.stopPropagation();const{handleTwistierClick:i}=e;n&&i(n)},f=!!t.treeModel&&!!t.treeModel.root.variablesReference,_=a.default.useCallback((t=>{const n=e.decorations.getDecorations(t.item);return a.default.createElement(l.DebugVariableRenderedNode,{item:t.item,itemType:t.itemType,decorations:n,onClick:g,onTwistierClick:g,defaultLeftPadding:0,leftPadding:4})}),[t.treeModel]);return a.default.createElement("div",{className:u.default.debug_hover},t.treeModel?a.default.createElement("div",{className:(0,r.default)(u.default.debug_hover_title,f&&u.default.has_complex_value),title:t.treeModel.root.name},t.treeModel.root.name):t.variable&&a.default.createElement("div",{className:(0,r.default)(u.default.debug_hover_title,f&&u.default.has_complex_value),title:t.variable.name},t.variable.value),f?a.default.createElement("div",{className:u.default.debug_hover_content,tabIndex:-1,ref:p},a.default.createElement(s.RecycleTree,{height:i,itemHeight:l.DEBUG_VARIABLE_TREE_NODE_HEIGHT,onReady:m,model:t.treeModel,placeholder:()=>a.default.createElement("span",null),overflow:"auto"},_)):null)}))},34245:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModelManager=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92345),s=n(89329),c=n(23375),l=n(86161);var d;!function(e){e.down="Down",e.move="Move",e.leave="Leave",e.contextMenu="contextMenu"}(d||(d={}));let u=class extends o.Disposable{constructor(){super(),this.toDispose=new o.DisposableCollection,this._onMouseDown=new o.Emitter,this._onMouseMove=new o.Emitter,this._onMouseLeave=new o.Emitter,this._onMouseUp=new o.Emitter,this.onMouseDown=this._onMouseDown,this.onMouseMove=this._onMouseMove,this.onMouseLeave=this._onMouseLeave,this.onMouseUp=this._onMouseUp,this._onModelChanged=new o.Emitter,this.onModelChanged=this._onModelChanged.event,this.models=new Map}dispose(){for(const e of this.models.values())this.toDispose.pushAll(e);this.toDispose.dispose(),this.models.clear()}init(){this.editorCollection.onCodeEditorCreate((e=>this.push(e))),this.breakpointManager.onDidChangeBreakpoints((e=>{const{currentEditor:t}=this.editorService,n=t&&t.currentUri;n&&this.render(n),this.closeBreakpointIfAffected(e)}))}get model(){const{currentEditor:e}=this.editorService,t=e&&e.currentUri;if(t){const e=this.models.get(t.toString());return e&&e[0]}}closeBreakpointIfAffected({affected:e,removed:t}){e.forEach((e=>{const n=this.models.get(e.toString());if(n)for(const e of n){const n=e.getBreakpointWidget(),i=n.position;if(!i)return;for(const e of t)e.raw.line===i.lineNumber&&n.dispose()}}))}render(e){const t=this.models.get(e.toString());if(t)for(const e of t)e.render()}push(e){const t=e.monacoEditor;e.onRefOpen((e=>{const n=e.instance.uri.toString(),i=this.models.get(n)||[];let r=!1;if(i.length>0)for(const e of i)if(e.getEditor()._id===t._id){e.render(),r=!0;break}if(!r){const r=e.instance.getMonacoModel(),o=this.debugModelFactory(t);i.push(o),this.models.set(n,i),r.onWillDispose((()=>{o.dispose(),this.models.delete(n)}))}}));const n=(e,n)=>{const i=t.getModel();if(!i)throw new Error("Not find model");this.handleMouseEvent(new o.URI(i.uri.toString()),e,n,t)};this.toDispose.push(t.onMouseMove((e=>n(d.move,e)))),this.toDispose.push(t.onMouseDown((e=>n(d.down,e)))),this.toDispose.push(t.onMouseLeave((e=>n(d.leave,e)))),this.toDispose.push(t.onContextMenu((e=>n(d.contextMenu,e)))),this.toDispose.push(t.onDidChangeModel((e=>this._onModelChanged.fire(e))))}resolve(e){const t=this.models.get(e.toString());if(t)return t}handleMouseEvent(e,t,n,i){const r=this.models.get(e.toString());if(!r)return;if(this.debugConfigurationManager.canSetBreakpointsIn(r[0].getEditor().getModel()))for(const e of r)if(e.getEditor().getId()===i.getId()){switch(t){case d.contextMenu:e.onContextMenu(n);break;case d.down:e.onMouseDown(n);break;case d.leave:e.onMouseLeave(n);break;case d.move:e.onMouseMove(n)}break}}};i.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),i.__metadata("design:type",a.WorkbenchEditorService)],u.prototype,"editorService",void 0),i.__decorate([(0,r.Autowired)(a.EditorCollectionService),i.__metadata("design:type",a.EditorCollectionService)],u.prototype,"editorCollection",void 0),i.__decorate([(0,r.Autowired)(s.DebugModelFactory),i.__metadata("design:type",Function)],u.prototype,"debugModelFactory",void 0),i.__decorate([(0,r.Autowired)(c.BreakpointManager),i.__metadata("design:type",c.BreakpointManager)],u.prototype,"breakpointManager",void 0),i.__decorate([(0,r.Autowired)(l.DebugConfigurationManager),i.__metadata("design:type",l.DebugConfigurationManager)],u.prototype,"debugConfigurationManager",void 0),u=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.DebugModelManager=u},39671:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModel=void 0;const r=n(70655),o=r.__importDefault(n(23279)),a=n(39993),s=n(894),c=n(57061),l=n(90642),d=r.__importStar(n(63138)),u=n(89329),p=n(4491),h=n(34886),m=n(23375),g=n(23375),f=n(87968),_=n(10111),b=n(66285),y=n(22009),v=r.__importStar(n(86457));let C=i=class{constructor(){this.toDispose=new l.DisposableCollection,this.frameDecorations=[],this.updatingDecorations=!1,this.breakpointDecorations=[],this.breakpointRanges=new Map,this.currentBreakpointDecorations=[],this.candidateDecorations=[],this.renderFrames=(0,o.default)((()=>{var e;if(this.toDispose.disposed)return;if((null===(e=this.editor.getModel())||void 0===e?void 0:e.uri.toString())!==this._uri.toString())return;const t=this.createFrameDecorations();this.frameDecorations=this.deltaDecorations(this.frameDecorations,t)}),100),this.toggleBreakpoint=(e=this.position)=>{this.doToggleBreakpoint(e)},this.openBreakpointView=(e,t,n)=>{this.breakpointWidget.show(e,t,n)},this.closeBreakpointView=()=>{this.breakpointWidget.hide()},this.acceptBreakpoint=()=>{const{position:e,values:t}=this.breakpointWidget;if(this.reporterService.point(null===u.DEBUG_REPORT_NAME||void 0===u.DEBUG_REPORT_NAME?void 0:u.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,this.breakpointWidget.breakpointType),e&&t){const n=this.getBreakpoint(e);n?(n.raw.condition=t.condition,n.raw.hitCondition=t.hitCondition,n.raw.logMessage=t.logMessage,this.breakpointManager.updateBreakpoint(n)):this.breakpointManager.addBreakpoint(g.DebugBreakpoint.create(this._uri,Object.assign({line:e.lineNumber},t))),this.breakpointWidget.hide()}},this.hintDecorations=[],this.init()}static createContainer(e,t){return e.createChild([{token:p.DebugEditor,useValue:t},{token:y.DebugHoverWidget,useClass:y.DebugHoverWidget},{token:b.DebugBreakpointWidget,useClass:b.DebugBreakpointWidget},{token:u.IDebugModel,useClass:i}])}static createModel(e,t){return i.createContainer(e,t).get(u.IDebugModel)}get uri(){return this._uri}async init(){const e=this.editor.getModel();this._uri=new l.URI(e.uri.toString()),this.decorator=new f.DebugDecorator,this.toDispose.pushAll([this.breakpointWidget,this.editor.onKeyDown((()=>this.debugHoverWidget.hide({immediate:!1}))),this.editor.onDidChangeModelContent((()=>this.renderFrames())),this.debugSessionManager.onDidChange((()=>this.renderFrames())),this.editor.getModel().onDidChangeContent((()=>this.updateBreakpoints())),this.editor.onDidChangeModel((()=>{this.closeBreakpointView()}))]),this.renderFrames(),this.render()}dispose(){this.toDispose.dispose()}get position(){return this._position||this.editor.getPosition()}get breakpoint(){return this.getBreakpoint()}getBreakpoint(e){return this.breakpointManager.getBreakpoint(this._uri,e?e.lineNumber:void 0)}createFrameDecorations(){var e;const t=[],{currentFrame:n,topFrame:i}=this.debugSessionManager;if(!n||!n.source||n.source.uri.toString()!==(null===(e=this.editor.getModel())||void 0===e?void 0:e.uri.toString()))return t;const r=new d.Range(n.raw.line,n.raw.column,n.raw.line,1<<30),o=new d.Range(n.raw.line,n.raw.column,n.raw.line,n.raw.column+1);if(i===n)if(t.push({options:v.TOP_STACK_FRAME_MARGIN,range:o}),n.thread.stoppedDetails&&"exception"===n.thread.stoppedDetails.reason)t.push({options:v.TOP_STACK_FRAME_EXCEPTION_DECORATION,range:r});else{t.push({options:v.TOP_STACK_FRAME_DECORATION,range:r});const{topFrameRange:e}=this;e&&e.startLineNumber===n.raw.line&&e.startColumn!==n.raw.column&&t.push({options:v.TOP_STACK_FRAME_INLINE_DECORATION,range:r}),this.topFrameRange=r}else t.push({options:v.FOCUSED_STACK_FRAME_MARGIN,range:o}),t.push({options:v.FOCUSED_STACK_FRAME_DECORATION,range:r});return t}deltaDecorations(e,t){this.updatingDecorations=!0;try{return this.editor.deltaDecorations(e,t)}finally{this.updatingDecorations=!1}}focusStackFrame(){this.renderFrames()}render(){this.renderBreakpoints(),this.renderFrames()}renderBreakpoints(){this.renderNormalBreakpoints(),this.renderCurrentBreakpoints()}renderNormalBreakpoints(){const e=this.createBreakpointDecorations();this.breakpointDecorations=this.deltaDecorations(this.breakpointDecorations,e),this.updateBreakpointRanges()}updateBreakpoints(){if(this.areBreakpointsAffected()){const e=this.createBreakpoints();this.breakpointManager.setBreakpoints(this._uri,e)}}areBreakpointsAffected(){if(this.updatingDecorations||!this.editor.getModel())return!1;for(const e of this.breakpointDecorations){const t=this.editor.getModel().getDecorationRange(e),n=this.breakpointRanges.get(e);if(!t||!t.equalsRange(n))return!0}return!1}createBreakpoints(){const{_uri:e}=this,t=new Set,n=[];for(const i of this.breakpointDecorations){const r=this.editor.getModel().getDecorationRange(i);if(r&&!t.has(r.startLineNumber)){const o=r.startLineNumber,a=this.breakpointRanges.get(i),s=a&&this.breakpointManager.getBreakpoint(e,a.startLineNumber)||{},c=g.DebugBreakpoint.create(e,Object.assign(Object.assign({},s.raw||{}),{line:o}),s.enabled);n.push(c),t.add(o)}}return n}createBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).map((e=>this.createBreakpointDecoration(e)))}createBreakpointDecoration(e){const t=e.raw.line,n=e.raw.column||1;return{range:new d.Range(t,n,t,n+1),options:{description:"breakpoint-decoration",stickiness:v.STICKINESS}}}async renderCurrentBreakpoints(){const e=this.breakpointManager.getBreakpoints(this._uri),t=this.createCurrentBreakpointDecorations(),n=this.deltaDecorations(this.currentBreakpointDecorations.map((({decorationId:e})=>e)),t);this.currentBreakpointDecorations.forEach((e=>{e.inlineWidget&&e.inlineWidget.dispose()})),this.currentBreakpointDecorations=n.map(((n,i)=>{const r=t[i],o=e[i],a=(o.enabled?v.BREAKPOINT_DECORATION:v.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName;return{breakpoint:o,decorationId:n,inlineWidget:r.options.beforeContentClassName?new S(this.editor,n,a,o,this.breakpointManager):void 0}}));const i=await this.getCandidateBreakpoints(e),r=this.deltaDecorations(this.candidateDecorations.map((({decorationId:e})=>e)),i);this.candidateDecorations.forEach((e=>{e.inlineWidget.dispose()})),this.candidateDecorations=r.map(((e,t)=>{const{breakpoint:n}=i[t],r=(n?v.BREAKPOINT_DECORATION:v.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName;return{decorationId:e,inlineWidget:new S(this.editor,e,r,n,this.breakpointManager)}}))}async getCandidateBreakpoints(e){const t=this.editor.getModel(),n=this.debugSessionManager.currentSession;if(!t||!(null==n?void 0:n.capabilities.supportsBreakpointLocationsRequest))return[];const i=Array.from(new Set(e.map((e=>e.raw.line)))),r=[];return await Promise.all(i.map((async e=>{const i=await n.breakpointLocations(this._uri,e);if(i.length<=1)return;const o=t.getLineFirstNonWhitespaceColumn(e),a=t.getLineLastNonWhitespaceColumn(e);i.forEach((e=>{const t=new d.Range(e.lineNumber,e.column,e.lineNumber,e.column+1);if(e.column<=o||e.column>a)return;const n=this.currentBreakpointDecorations.find((({breakpoint:e})=>e.raw.line===t.startLineNumber&&e.raw.column===t.startColumn));(null==n?void 0:n.inlineWidget)||r.push({range:t,options:{description:"debug-breakpoint-placeholder",stickiness:d.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,beforeContentClassName:n?void 0:"debug-breakpoint-placeholder"},breakpoint:null==n?void 0:n.breakpoint})}))}))),r}createCurrentBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).filter((e=>(0,g.isDebugBreakpoint)(e))).map((e=>this.createCurrentBreakpointDecoration(e)))}createCurrentBreakpointDecoration(e){const t=this.debugSessionManager.currentSession,n=e.status.get(t&&t.id||""),i=n&&n.line?n.line:e.raw.line,r=e.raw.column||1,o=r>this.editor.getModel().getLineFirstNonWhitespaceColumn(i),a=new d.Range(i,r,i,r+1),{className:s,message:c}=this.decorator.getDecoration(e,!!t,this.breakpointManager.breakpointsEnabled);return{range:a,options:{description:"debug-breakpoint-placeholder",glyphMarginClassName:s,glyphMarginHoverMessage:c.map((e=>({value:e}))),stickiness:v.STICKINESS,beforeContentClassName:o?"debug-breakpoint-placeholder":void 0}}}updateBreakpointRanges(){this.breakpointRanges.clear();for(const e of this.breakpointDecorations){const t=this.editor.getModel().getDecorationRange(e);this.breakpointRanges.set(e,t)}}showHover(e){const t=e.target.type,n=l.isOSX?"metaKey":"ctrlKey";e.event.altKey||(t!==d.editor.MouseTargetType.CONTENT_WIDGET||e.target.detail!==this.debugHoverWidget.getId()||e.event[n])&&(t===d.editor.MouseTargetType.CONTENT_TEXT?this.debugHoverWidget.show({selection:e.target.range,immediate:!1}):this.debugHoverWidget.hide({immediate:!1}))}hideHover({event:e}){const t=this.debugHoverWidget.getDomNode().getBoundingClientRect();(e.posxt.right||e.posyt.bottom)&&this.debugHoverWidget.hide({immediate:!1})}doToggleBreakpoint(e=this.position){const t=this.breakpointManager.getBreakpoints(this._uri,{lineNumber:e.lineNumber});if(t.length)for(const e of t)this.breakpointManager.delBreakpoint(e);else this.breakpointManager.addBreakpoint(g.DebugBreakpoint.create(this._uri,{line:e.lineNumber}))}get contributedContextMenu(){return this.menuService.createMenu(c.MenuId.DebugBreakpointsContext,this.contextKeyService)}onContextMenu(e){var t;if(this.marginFreeFromNonDebugDecorations(null===(t=e.target.position)||void 0===t?void 0:t.lineNumber)&&e.target&&e.target.type===d.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const t=this.breakpointManager.getBreakpoint(this._uri,e.target.position.lineNumber);this.breakpointManager.selectedBreakpoint={breakpoint:t,model:this};const n=this.contributedContextMenu,i=(0,c.generateMergedCtxMenu)({menus:n});this.ctxMenuRenderer.show({anchor:e.event.browserEvent,menuNodes:i,args:[e.target.position]})}}marginFreeFromNonDebugDecorations(e){const t=this.editor.getLineDecorations(e);if(Array.isArray(t))for(const{options:e}of t){const t=e.glyphMarginClassName;if(t&&t.includes("testing-run-glyph"))return!1}return!0}onMouseDown(e){var t;this.marginFreeFromNonDebugDecorations(null===(t=e.target.position)||void 0===t?void 0:t.lineNumber)&&(e.target&&e.target.type===d.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&(e.event.rightButton||(this.editor.focus(),this.toggleBreakpoint(e.target.position))),this.hintBreakpoint(e))}onMouseMove(e){var t;this.marginFreeFromNonDebugDecorations(null===(t=e.target.position)||void 0===t?void 0:t.lineNumber)?(this.showHover(e),this.hintBreakpoint(e)):this.onMouseLeave(e)}onMouseLeave(e){this.hideHover(e),this.deltaHintDecorations([])}hintBreakpoint(e){const t=this.createHintDecorations(e);this.deltaHintDecorations(t)}deltaHintDecorations(e){this.hintDecorations=this.deltaDecorations(this.hintDecorations,e)}createHintDecorations(e){if(e.target&&e.target.type===d.editor.MouseTargetType.GUTTER_GLYPH_MARGIN||e.target.type===d.editor.MouseTargetType.GUTTER_LINE_NUMBERS){const t=e.target.position.lineNumber;return this.breakpointManager.getBreakpoint(this._uri,t)?[]:[{range:new d.Range(t,1,t,1),options:v.BREAKPOINT_HINT_DECORATION}]}return[]}getBreakpoints(e,t){return this.breakpointManager.getBreakpoints(e,t)}getEditor(){return this.editor}getBreakpointWidget(){return this.breakpointWidget}getDebugHoverWidget(){return this.debugHoverWidget}};r.__decorate([(0,a.Autowired)(p.DebugEditor),r.__metadata("design:type",Object)],C.prototype,"editor",void 0),r.__decorate([(0,a.Autowired)(b.DebugBreakpointWidget),r.__metadata("design:type",b.DebugBreakpointWidget)],C.prototype,"breakpointWidget",void 0),r.__decorate([(0,a.Autowired)(y.DebugHoverWidget),r.__metadata("design:type",y.DebugHoverWidget)],C.prototype,"debugHoverWidget",void 0),r.__decorate([(0,a.Autowired)(h.IDebugSessionManager),r.__metadata("design:type",_.DebugSessionManager)],C.prototype,"debugSessionManager",void 0),r.__decorate([(0,a.Autowired)(m.BreakpointManager),r.__metadata("design:type",m.BreakpointManager)],C.prototype,"breakpointManager",void 0),r.__decorate([(0,a.Autowired)(c.AbstractMenuService),r.__metadata("design:type",c.AbstractMenuService)],C.prototype,"menuService",void 0),r.__decorate([(0,a.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],C.prototype,"contextKeyService",void 0),r.__decorate([(0,a.Autowired)(c.ICtxMenuRenderer),r.__metadata("design:type",c.ICtxMenuRenderer)],C.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,a.Autowired)(s.IReporterService),r.__metadata("design:type",Object)],C.prototype,"reporterService",void 0),r.__decorate([l.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],C.prototype,"contributedContextMenu",null),C=i=r.__decorate([(0,a.Injectable)(),r.__metadata("design:paramtypes",[])],C),t.DebugModel=C;class S extends l.Disposable{constructor(e,t,n,i,r){super(),this.editor=e,this.decorationId=t,this.breakpoint=i,this.breakpointManager=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.range=this.editor.getModel().getDecorationRange(t),this.addDispose(this.editor.onDidChangeModelDecorations((()=>{const e=this.editor.getModel().getDecorationRange(this.decorationId);this.range&&!this.range.equalsRange(e)&&(this.range=e,this.editor.layoutContentWidget(this))}))),this.addDispose(l.Disposable.create((()=>{this.editor.removeContentWidget(this)}))),this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){const t=document.createElement("div");t.className="inline-breakpoint-widget",e&&t.classList.add(...e.split(" ")),this.domNode=t;const{EditorOption:n}=d.editor,i=()=>{const e=this.editor.getOption(n.lineHeight);t.style.height=`${e}px`,t.style.width=`${Math.ceil(.8*e)}px`,t.style.marginLeft="4px"};i(),this.addDispose(new s.DomListener(t,"click",(async()=>{const e=new l.URI(this.editor.getModel().uri);this.breakpoint?this.breakpointManager.delBreakpoint(this.breakpoint):this.breakpointManager.addBreakpoint(g.DebugBreakpoint.create(e,{line:this.range.startLineNumber,column:this.range.startColumn}))}))),this.addDispose(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(n.fontSize)||e.hasChanged(n.lineHeight))&&i()})))}getId(){return(0,l.uuid)()}getDomNode(){return this.domNode}getPosition(){return this.range?(this.domNode.classList.toggle("line-start",1===this.range.startColumn),{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn-1},preference:[d.editor.ContentWidgetPositionPreference.EXACT]}):null}}r.__decorate([l.memoize,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],S.prototype,"getId",null)},60791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugRunToCursorService=void 0;const i=n(70655),r=n(39993),o=n(92345),a=n(34886),s=n(5887),c=n(10111),l=n(89021);let d=class{constructor(){}async run(e,t=!1){const n=this.sessionManager.currentSession;if(!n)return;if(n.state!==a.DebugState.Stopped)return;const i=this.workbenchEditorService.currentEditor;if(!i)return;if(!i.monacoEditor)return;const{monacoEditor:r}=i,o=r.getPosition();if(!r.hasModel()||!o)return;const s=n.getModel();if(!s)return;const c=!!s.getBreakpoints(e,{column:o.column,lineNumber:o.lineNumber}).length;let l,d=n.currentThread,u=[];if(!c){t&&(u=s.getBreakpoints().filter((e=>e.enabled)).filter((e=>e.raw.column!==o.column&&e.raw.line!==o.lineNumber)),u.forEach((e=>{this.debugBreakpointsService.toggleBreakpointEnable(e)})));const n=await this.addBreakpoints(e,o);if(!n)return void this.recoverStatus(u);n.thread&&(d=n.thread),n.breakpoint&&(l=n.breakpoint)}if(!d)return void this.recoverStatus(u);const p=d.session.onDidChangeState((()=>{const e=n.state;e!==a.DebugState.Stopped&&e!==a.DebugState.Inactive||(l&&n.delBreakpoint(l),p.dispose())}));await d.continue(),this.recoverStatus(u)}async addBreakpoints(e,t){const n=this.sessionManager.currentSession;if(!n)return;let i=1;const r=n.currentFrame;r&&r.range().startLineNumber===t.lineNumber&&(i=t.column||1);const o=s.DebugBreakpoint.create(e,{line:t.lineNumber,column:i});if(await n.addBreakpoint(o,!0),!o)return{breakpoint:void 0,thread:n.currentThread};let a=n.currentThread,c=0;const l=n.threads.filter((e=>e.stopped));if(c<3&&n.currentThread&&l.includes(n.currentThread)&&(a=n.currentThread,c=3),c<2){const e=l.find((e=>e.topFrame));e&&(a=e,c=2)}return c<1&&(a=l[0],c=2),{thread:a,breakpoint:o}}recoverStatus(e){e.forEach((e=>{this.debugBreakpointsService.toggleBreakpointEnable(e)}))}};i.__decorate([(0,r.Autowired)(a.IDebugSessionManager),i.__metadata("design:type",c.DebugSessionManager)],d.prototype,"sessionManager",void 0),i.__decorate([(0,r.Autowired)(o.WorkbenchEditorService),i.__metadata("design:type",o.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(l.DebugBreakpointsService),i.__metadata("design:type",l.DebugBreakpointsService)],d.prototype,"debugBreakpointsService",void 0),d=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.DebugRunToCursorService=d},86457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINT_DECORATION_DISABLED=t.BREAKPOINT_DECORATION=t.BREAKPOINT_HINT_DECORATION=t.TOP_STACK_FRAME_INLINE_DECORATION=t.FOCUSED_STACK_FRAME_DECORATION=t.TOP_STACK_FRAME_EXCEPTION_DECORATION=t.TOP_STACK_FRAME_DECORATION=t.FOCUSED_STACK_FRAME_MARGIN=t.TOP_STACK_FRAME_MARGIN=t.BREAK_PONINT_HOVER_MARGIN=t.STICKINESS=void 0;const i=n(70655).__importStar(n(63138));t.STICKINESS=i.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,t.BREAK_PONINT_HOVER_MARGIN={description:"debug-hover",glyphMarginClassName:"sumi-debug-hover",linesDecorationsClassName:"sumi-debug-hover",isWholeLine:!0},t.TOP_STACK_FRAME_MARGIN={description:"debug-top-stack-frame",glyphMarginClassName:"sumi-debug-top-stack-frame",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_MARGIN={description:"debug-focused-stack-frame",glyphMarginClassName:"sumi-debug-focused-stack-frame",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_DECORATION={description:"debug-top-stack-frame-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_EXCEPTION_DECORATION={description:"debug-top-stack-frame-exception-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-exception-line",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_DECORATION={description:"debug-focused-stack-frame-line",isWholeLine:!0,className:"sumi-debug-focused-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_INLINE_DECORATION={description:"debug-top-stack-frame-column",beforeContentClassName:"sumi-debug-top-stack-frame-column"},t.BREAKPOINT_HINT_DECORATION={description:"debug-breakpoint-hint",glyphMarginClassName:"sumi-debug-breakpoint-hint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION={description:"debug-breakpoint",glyphMarginClassName:"sumi-debug-breakpoint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION_DISABLED={description:"debug-breakpoint-disabled",glyphMarginClassName:"sumi-debug-breakpoint-disabled",stickiness:t.STICKINESS}},19503:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EvaluatableExpressionServiceImpl=t.IEvaluatableExpressionService=void 0;const i=n(70655),r=n(39993),o=new(n(76273).LanguageFeatureRegistry);t.IEvaluatableExpressionService=Symbol("IEvaluatableExpressionService");let a=class{getSupportedEvaluatableExpressionProvider(e){return o.ordered(e)}registerEvaluatableExpressionProvider(e,t){return o.register(e,t)}hasEvaluatableExpressProvider(e){return o.has(e)}};a=i.__decorate([(0,r.Injectable)()],a),t.EvaluatableExpressionServiceImpl=a},33627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(66285),t),i.__exportStar(n(22009),t),i.__exportStar(n(39671),t),i.__exportStar(n(34245),t),i.__exportStar(n(86457),t),i.__exportStar(n(3565),t)},99897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValuesProviderRegistry=void 0;const i=n(76273);t.InlineValuesProviderRegistry=new i.LanguageFeatureRegistry},63249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModule=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(69720),s=n(89329),c=n(23375),l=n(99622),d=n(86161),u=n(92871),p=n(86450),h=n(43688),m=n(70573),g=n(18561),f=n(10111),_=n(33627),b=n(32524),y=n(19503),v=n(87215),C=n(21915),S=n(31021),w=n(75530),E=n(91643),k=n(80089),x=n(86989);n(48249);let T=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:b.DebugHoverSource,useClass:b.DebugHoverSource},{token:_.DebugExpressionProvider,useClass:_.DebugExpressionProvider},{token:_.DebugModelManager,useClass:_.DebugModelManager},{token:s.IDebugSessionManager,useClass:f.DebugSessionManager},{token:c.BreakpointManager,useClass:c.BreakpointManager},{token:d.DebugConfigurationManager,useClass:d.DebugConfigurationManager},{token:y.IEvaluatableExpressionService,useClass:y.EvaluatableExpressionServiceImpl},{token:a.FolderPreferenceProvider,useClass:v.LaunchFolderPreferenceProvider,dropdownForTag:!0,tag:"launch"},{token:s.DebugModelFactory,useFactory:e=>t=>_.DebugModel.createModel(e,t)},{token:g.DebugSessionContributionRegistry,useClass:g.DebugSessionContributionRegistryImpl},{token:s.IDebugService,useClass:m.DebugService},{token:s.IDebugServer,useValue:{}},{token:s.IDebugProgress,useClass:h.DebugProgressService},C.LaunchPreferencesContribution,u.DebugContribution,w.DebugConsoleContribution,k.VariablesPanelContribution,E.DebugCallStackContribution,x.WatchPanelContribution,{token:l.DebugCallStackItemTypeKey,useFactory:e=>e.get(o.IContextKeyService).createKey("callStackItemType")}],this.contributionProvider=g.DebugSessionContribution,this.preferences=p.injectDebugPreferences,this.isOverlay=!0,this.component=S.DebugToolbarOverlayWidget}};T=i.__decorate([(0,r.Injectable)()],T),t.DebugModule=T,i.__exportStar(n(23375),t),i.__exportStar(n(99622),t),i.__exportStar(n(86161),t),i.__exportStar(n(86929),t),i.__exportStar(n(92871),t),i.__exportStar(n(86450),t),i.__exportStar(n(29602),t),i.__exportStar(n(37930),t),i.__exportStar(n(1572),t),i.__exportStar(n(18561),t),i.__exportStar(n(10111),t),i.__exportStar(n(34245),t),i.__exportStar(n(80526),t),i.__exportStar(n(28965),t)},80526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(31469),t),i.__exportStar(n(79251),t)},31469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerManager=t.MarkerCollection=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(33361),s=n(33361);class c{constructor(e,t){this.uri=e,this.kind=t,this.owner2Markers=new Map}get empty(){return!this.owner2Markers.size}getOwners(){return Array.from(this.owner2Markers.keys())}getMarkers(e){return this.owner2Markers.get(e)||[]}setMarkers(e,t){const n=this.owner2Markers.get(e);return t.length>0?this.owner2Markers.set(e,t.map((t=>this.createMarker(e,t)))):this.owner2Markers.delete(e),n||[]}createMarker(e,t){return Object.freeze({uri:this.uri.toString(),kind:this.kind,owner:e,data:t})}findMarkers(e){if(e.owner)return this.owner2Markers.has(e.owner)?this.filterMarkers(e,this.owner2Markers.get(e.owner)):[];{const t=[];for(const n of this.owner2Markers.values())t.push(...this.filterMarkers(e,n));return t}}filterMarkers(e,t){return t?e.dataFilter?t.filter((t=>e.dataFilter(t.data))):t:[]}}t.MarkerCollection=c;let l=class{constructor(){this.uri2MarkerCollection=new Map,this.onDidChangeMarkersEmitter=new o.Emitter,this.init()}init(){this.fileService.onFilesChanged((e=>{const t=e.filter((({type:e})=>e===a.FileChangeType.DELETED));t.length&&this.cleanMarkers(t)}))}cleanMarkers(e){for(const t of this.uri2MarkerCollection.keys()){const n=new o.URI(t);a.FileChangeEvent.isDeleted(e,n)&&this.cleanAllMarkers(n)}}get onDidChangeMarkers(){return this.onDidChangeMarkersEmitter.event}fireOnDidChangeMarkers(e){this.onDidChangeMarkersEmitter.fire(e)}setMarkers(e,t,n){const i=e.toString(),r=this.uri2MarkerCollection.get(i)||new c(e,this.getKind()),o=r.setMarkers(t,n);return r.empty?this.uri2MarkerCollection.delete(e.toString()):this.uri2MarkerCollection.set(i,r),this.fireOnDidChangeMarkers(e),o}findMarkers(e={}){if(e.uri){const t=this.uri2MarkerCollection.get(e.uri.toString());return t?t.findMarkers(e):[]}const t=[];for(const n of this.getUris())t.push(...this.uri2MarkerCollection.get(n).findMarkers(e));return t}getUris(){return this.uri2MarkerCollection.keys()}cleanAllMarkers(e){if(e)this.doCleanAllMarkers(e);else for(const e of this.getUris())this.doCleanAllMarkers(new o.URI(e))}doCleanAllMarkers(e){const t=e.toString();void 0!==this.uri2MarkerCollection.get(t)&&(this.uri2MarkerCollection.delete(t),this.fireOnDidChangeMarkers(e))}};i.__decorate([(0,r.Autowired)(s.IFileServiceClient),i.__metadata("design:type",Object)],l.prototype,"fileService",void 0),l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.MarkerManager=l},79251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSource=t.DebugSourceData=void 0;const i=n(894);class r{}t.DebugSourceData=r;class o extends r{constructor(e,t,n,i,r){super(),this.session=e,this.labelProvider=t,this.modelManager=n,this.workbenchEditorService=i,this.fileSystem=r}get uri(){return o.toUri(this.raw)}update(e){Object.assign(this,e)}async open(e,t){if(this.uri.scheme===o.SCHEME){const e=await this.load();await this.fileSystem.setContent({uri:this.uri.toString(),lastModification:0},e)}if(t&&t.raw){const{line:n,column:i}=t.raw,r={startLineNumber:n,startColumn:"number"==typeof i?i:0,endLineNumber:n,endColumn:1/0};await this.workbenchEditorService.open(this.uri,Object.assign(Object.assign({},e),{range:r})),t.thread.currentFrame=t;const o=this.modelManager.resolve(this.uri);if(o)for(const e of o)e.focusStackFrame()}else await this.workbenchEditorService.open(this.uri,e)}async load(){const e=this.raw,t=e.sourceReference;return(await this.session.sendRequest("source",{sourceReference:t,source:e})).body.content}get inMemory(){return this.uri.scheme===o.SCHEME}get reference(){return this.raw.sourceReference}get name(){return this.inMemory?this.raw.name||this.uri.path.base||this.uri.path.toString():this.labelProvider.getName(this.uri)}get longName(){return this.inMemory?this.name:this.labelProvider.getLongName(this.uri)}static toUri(e){if(e.sourceReference&&e.sourceReference>0)return(new i.URI).withScheme(o.SCHEME).withPath(e.name).withQuery(String(e.sourceReference));if(!e.path)throw new Error("Unrecognized source type: "+JSON.stringify(e));return e.path.match(o.SCHEME_PATTERN)?new i.URI(e.path):new i.URI(i.Uri.file(e.path))}}t.DebugSource=o,o.SCHEME="debug",o.SCHEME_PATTERN=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/},82659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackFrame=t.DebugStackFrameData=void 0;const i=n(15353),r=n(90624);class o{}t.DebugStackFrameData=o;t.DebugStackFrame=class extends o{constructor(e,t){super(),this.thread=e,this.session=t}get id(){return this.session.id+":"+this.thread.id+":"+this.raw.id}get source(){return this._source}update(e){Object.assign(this,e),this._source=this.raw.source&&this.session.getSource(this.raw.source)}async restart(){return this.session.capabilities.supportsRestartFrame?await this.session.sendRequest("restartFrame",{frameId:this.raw.id}):Promise.reject(new Error("restartFrame not supported"))}get canRestart(){return"boolean"!=typeof this.raw.canRestart||this.raw.canRestart}async open(e){if(!this.source)return;const{line:t,column:n,endLine:i,endColumn:r}=this.raw;let o={startLineNumber:t,startColumn:n,endLineNumber:t,endColumn:1/0};"number"==typeof i&&(o=Object.assign(Object.assign({},o),{endLineNumber:i,endColumn:"number"==typeof r?r:1/0})),this.source.open(Object.assign(Object.assign({},e),{range:o}))}toArgs(e){return Object.assign({},e,{frameId:this.raw.id})}getScopes(e){return this.doGetScopes(e)}async doGetScopes(e){try{return(await this.session.sendRequest("scopes",this.toArgs())).body.scopes.map((t=>new r.DebugScope(t,this.session,e)))}catch(e){return[]}}range(){const e=this.raw;return new i.Range(e.line,e.column,e.endLine||e.line,e.endColumn||e.column)}async getMostSpecificScopes(e){const t=(await this.doGetScopes()).filter((e=>!e.getRawScope().expensive));if(!t.some((e=>!!e.range())))return t;const n=t.filter((t=>t.range()&&i.Range.containsRange(t.range(),e))).sort(((e,t)=>e.range().endLineNumber-e.range().startLineNumber-(t.range().endLineNumber-t.range().startLineNumber)));return n.length?n:t}}},33324:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugThread=t.DebugThreadData=void 0;const i=n(894),r=n(89329),o=n(82659);class a{}t.DebugThreadData=a;t.DebugThread=class extends a{constructor(e){super(),this.session=e,this._onDidChanged=new i.Emitter,this.onDidChanged=this._onDidChanged.event,this._frames=new Map,this.pendingFetch=Promise.resolve([])}get id(){return this.session.id+":"+this.raw.id}get currentFrame(){return this._currentFrame}set currentFrame(e){this._currentFrame=e,this._onDidChanged.fire()}get stopped(){return!!this.stoppedDetails}update(e){Object.assign(this,e),"stoppedDetails"in e&&this.clearFrames()}clear(){this.update({raw:this.raw,stoppedDetails:void 0})}continue(){return this.session.sendRequest("continue",this.toArgs())}stepOver(){return this.session.sendRequest("next",this.toArgs())}stepIn(){return this.session.sendRequest("stepIn",this.toArgs())}stepOut(){return this.session.sendRequest("stepOut",this.toArgs())}pause(){return this.session.sendRequest("pause",this.toArgs())}terminate(){return this.session.sendRequest("terminateThreads",{threadIds:[this.raw.id]})}get frames(){return Array.from(this._frames.values())}get topFrame(){return this.frames[0]}get frameCount(){return this._frames.size}async rawFetchFrames(e=20){return this.pendingFetch=this.pendingFetch.then((async()=>{try{const t=this.frameCount,n=await this.doFetchFrames(t,e);return this.doUpdateFrames(n)}catch(e){return[]}}))}async fetchFrames(e=20){const t=await this.rawFetchFrames(e);return this.updateCurrentFrame(),t}async doFetchFrames(e,t){try{const n=await this.session.sendRequest("stackTrace",this.toArgs({startFrame:e,levels:t}));return this.stoppedDetails&&(this.stoppedDetails.totalFrames=n.body.totalFrames),n.body.stackFrames}catch(e){return this.stoppedDetails&&(this.stoppedDetails.framesErrorMessage=e.message),[]}}doUpdateFrames(e){const t=this.session.reportTime(r.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.session.id,threadId:this.raw.id,threadAmount:this.session.threadCount}),n=new Map(this._frames);for(const t of e){const e=t.id,i=this._frames.get(e)||new o.DebugStackFrame(this,this.session);this._frames.set(e,i),i.update({raw:t}),n.set(e,i)}const i=[...n.values()];return t("doUpdateFrames"),i}clearFrames(){this._frames.clear(),this.updateCurrentFrame()}updateCurrentFrame(){const{currentFrame:e}=this,t=e&&e.raw.id;this.currentFrame="number"==typeof t&&this._frames.get(t)||this._frames.values().next().value}toArgs(e){return Object.assign({},e,{threadId:this.raw.id})}}},26689:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatch=t.IDebugWatchData=void 0;const i=n(70655).__importDefault(n(23493)),r=n(894),o=n(89329),a=n(92871),s=n(90624);t.IDebugWatchData=Symbol("IDebugWatchData");t.DebugWatch=class{constructor(e,t){this.manager=e,this.reporterService=t,this.toDispose=new r.DisposableCollection,this.fireDidChange=(0,i.default)((()=>this.onDidChangeEmitter.fire()),50),this.fireVariableChange=(0,i.default)((()=>this.onDidVariableChangeEmitter.fire()),50),this.fireExpressionChange=(0,i.default)((e=>this.onDidExExpressionChangeEmitter.fire(e)),50),this._expressions=[],this.onDidChangeEmitter=new r.Emitter,this.onDidVariableChangeEmitter=new r.Emitter,this.onDidExExpressionChangeEmitter=new r.Emitter,this.whenReady=this.init()}get onDidChange(){return this.onDidChangeEmitter.event}get onDidVariableChange(){return this.onDidVariableChangeEmitter.event}get onDidExpressionChange(){return this.onDidExExpressionChangeEmitter.event}async getRoot(){const e=[],t=new s.DebugWatchRoot(this.manager.currentSession);for(const n of this._expressions){const i=new s.DebugWatchNode(this.manager.currentSession,n,t);await i.evaluate(),e.push(i)}return t.updatePresetChildren(e),this._root=t,this._root}async init(){this.toDispose.push(this.manager.onDidStopDebugSession((()=>{this.fireDidChange()}))),this.toDispose.push(this.manager.onDidDestroyDebugSession((()=>{this.fireDidChange()}))),this.toDispose.push(this.manager.onDidChangeActiveDebugSession((()=>{const e=this.manager.currentSession;e&&(e.onVariableChange((()=>{this.fireVariableChange()})),e.onDidChangeCallStack((()=>{this.fireVariableChange()})))})))}async clear(){this.updateWatchExpressions([]),this.fireExpressionChange([]),this.fireDidChange()}async updateWatchExpressions(e){this._expressions=e}addWatchExpression(e){this.reporterService.point(null===o.DEBUG_REPORT_NAME||void 0===o.DEBUG_REPORT_NAME?void 0:o.DEBUG_REPORT_NAME.DEBUG_WATCH,a.DEBUG_COMMANDS.ADD_WATCHER.id,{value:e});-1===this._expressions.indexOf(e)&&(this._expressions.push(e),this.fireExpressionChange(this._expressions))}renameWatchExpression(e,t){const n=this._expressions.indexOf(e);n>=0&&this._expressions.splice(n,1,t),this.fireExpressionChange(this._expressions)}removeWatchExpression(e){const t=this._expressions.indexOf(e);t>=0&&this._expressions.splice(t,1),this.fireExpressionChange(this._expressions)}}},28965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(83211),t),i.__exportStar(n(82659),t),i.__exportStar(n(33324),t),i.__exportStar(n(26689),t)},87215:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchFolderPreferenceProvider=void 0;const i=n(70655),r=n(39993),o=n(69720);let a=class extends o.FolderPreferenceProvider{parse(e){const t=super.parse(e);if(void 0!==t)return{launch:Object.assign({},t)}}getPath(e){return"launch"===e?[]:e.startsWith("launch.")?[e.substr("launch.".length)]:void 0}};a=i.__decorate([(0,r.Injectable)()],a),t.LaunchFolderPreferenceProvider=a},21915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchPreferencesContribution=void 0;const i=n(70655),r=n(894),o=n(41926);let a=class{constructor(){this.schema=o.launchPreferencesSchema,this.name="launch"}};a=i.__decorate([(0,r.Domain)(r.PreferenceContribution,r.PreferenceConfiguration)],a),t.LaunchPreferencesContribution=a},41926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchPreferencesSchema=void 0;const i=n(89329);t.launchPreferencesSchema={type:"object",scope:"resource",properties:{launch:{$ref:i.launchSchemaUri,description:"Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces",defaultValue:{configurations:[],compounds:[]}}}}},69850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiConsoleNode=t.TreeWithLinkWrapper=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=i.__importDefault(n(5868)),s=n(25880),c=n(894),l=i.__importDefault(n(25341)),d=e=>{if(void 0===e)return(0,r.default)(l.default.variable_repl_text,l.default.info);switch(e){case c.MessageType.Error:return(0,r.default)(l.default.variable_repl_text,l.default.error);case c.MessageType.Warning:return(0,r.default)(l.default.variable_repl_text,l.default.warn);case c.MessageType.Info:default:return(0,r.default)(l.default.variable_repl_text,l.default.info)}};class u extends o.default.Component{componentDidMount(){if(this.props.html){const e=a.default.findDOMNode(this);null==e||e.appendChild(this.props.html)}}render(){return o.default.createElement("code",{className:this.props.className})}}t.TreeWithLinkWrapper=u;class p extends s.TreeNode{constructor(e,t,n,i,r,o,a){var s;super({},t),this.description=e,this._compositeTreeNode=t,this.linkDetector=n,this.ansiNode=i,this.severity=r,this.source=o,this.line=a,this.linkDetectorHTML=null!==(s=this.ansiNode)&&void 0!==s?s:this.linkDetector.linkify(this.description)}get parent(){return this._compositeTreeNode}static is(e){return!!e&&!!e.template}get name(){return`log_${this.id}`}get el(){return this.linkDetectorHTML}get template(){return()=>o.default.createElement(u,{className:d(this.severity),html:this.linkDetectorHTML})}}t.AnsiConsoleNode=p},90624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverVariableRoot=t.DebugVariableRoot=t.DebugWatchRoot=t.DebugConsoleRoot=t.DebugConsoleNode=t.DebugConsoleVariableContainer=t.DebugWatchNode=t.DebugScope=t.DebugVariableContainer=t.DebugVariable=t.DebugVirtualVariable=t.ExpressionContainer=t.ExpressionNode=t.DebugConsoleTreeService=t.ExpressionTreeService=void 0;const i=n(25880),r=n(894),o=n(15353),a="undefined";class s{constructor(e,t,n){this.session=e,this.source=t,this.line=n}async resolveChildren(e){var t;return!_.is(e)||e.variablesReference||e.presetChildren?await this.doResolve(e):await(null===(t=this.session)||void 0===t?void 0:t.getScopes(e))||[]}async doResolve(e){const t=[];if(!e)return t;if(Array.isArray(e.presetChildren))return e.presetChildren;if(!this.session||this.session.terminated)return t;const{variablesReference:n,startOfVariables:i,indexedVariables:r}=e;if(e.namedVariables&&await this.fetch(t,n,"named",e),r){let n=d.BASE_CHUNK_SIZE;for(;r>n*d.BASE_CHUNK_SIZE;)n*=d.BASE_CHUNK_SIZE;if(r>n){const i=Math.ceil(r/n);for(let o=0;ot.name?1:e.name{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(90624),t),i.__exportStar(n(69850),t)},89021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointsService=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(11792),c=n(92345),l=n(70888),d=n(14238),u=n(53743),p=n(89329),h=n(34886),m=n(23375),g=n(10111),f=n(43380);let _=class extends a.WithEventBus{constructor(){super(),this.nodes=[],this.init()}get inputEditor(){return this._inputEditor}async init(){await this.updateRoots(),this.updateBreakpoints(),this.workspaceService.onWorkspaceChanged((async()=>{await this.updateRoots(),this.updateBreakpoints()})),this.breakpoints.onDidChangeBreakpoints((()=>{this.updateBreakpoints()})),this.breakpoints.onDidChangeExceptionsBreakpoints((()=>{this.updateBreakpoints()})),this.contextKeyService.onDidChangeContext((e=>{e.payload.affectsSome(new Set([p.CONTEXT_IN_DEBUG_MODE_KEY]))&&(0,r.runInAction)((()=>{this.inDebugMode=this.contextKeyService.getContextValue(p.CONTEXT_IN_DEBUG_MODE_KEY)||!1}))}))}getBreakpointDecoration(e,t=!1,n=!0){return(new m.DebugDecorator).getDecoration(e,t,n)}onRenameFile(e){this.removeBreakpoints(e.payload.oldUri)}onDeleteFile(e){this.removeBreakpoints(e.payload.oldUri)}removeBreakpoints(e){this.breakpoints.cleanAllMarkers(e),this.updateBreakpoints()}async updateRoots(){this.enable=this.breakpoints.breakpointsEnabled,this.inDebugMode=this.contextKeyService.getContextValue(p.CONTEXT_IN_DEBUG_MODE_KEY)||!1;const e=await this.workspaceService.roots;this.roots=e.map((e=>new a.URI(e.uri)))}toggleBreakpointEnable(e){if((0,m.isDebugBreakpoint)(e)){const t=this.breakpoints.getBreakpoint(a.URI.parse(e.uri),{lineNumber:e.raw.line,column:e.raw.column});t&&(t.enabled=!t.enabled,this.breakpoints.updateBreakpoint(t))}(0,m.isDebugExceptionBreakpoint)(e)&&this.breakpoints.updateExceptionBreakpoints(e.filter,!e.default)}extractNodes(e){const t=[];return e.forEach((e=>{if((0,m.isDebugBreakpoint)(e)){const n=a.URI.parse(e.uri),i=this.roots.filter((e=>e.isEqualOrParent(n)))[0];t.push({id:e.id,name:n.displayName,description:i&&i.relative(n).toString(),breakpoint:e})}(0,m.isDebugExceptionBreakpoint)(e)&&t.push({id:e.filter,name:e.label,description:"",breakpoint:e})})),t}updateBreakpoints(){this.nodes=this.extractNodes([...this.breakpoints.getExceptionBreakpoints(),...this.breakpoints.getBreakpoints()])}removeAllBreakpoints(){this.breakpoints.clearBreakpoints()}delBreakpoint(e){this.breakpoints.delBreakpoint(e)}toggleBreakpoints(){this.breakpoints.breakpointsEnabled=!this.breakpoints.breakpointsEnabled,this.enable=this.breakpoints.breakpointsEnabled,this.enable?this.reporterService.point(null===p.DEBUG_REPORT_NAME||void 0===p.DEBUG_REPORT_NAME?void 0:p.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"enabled"):this.reporterService.point(null===p.DEBUG_REPORT_NAME||void 0===p.DEBUG_REPORT_NAME?void 0:p.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"unenabled")}async createBreakpointInput(e){this._inputEditor=await this.editorService.createCodeEditor(e,Object.assign(Object.assign({},(0,c.getSimpleEditorOptions)()),{scrollbar:{horizontal:"hidden",vertical:"hidden",handleMouseWheel:!1},acceptSuggestionOnEnter:"on",renderIndentGuides:!1}));const t=(await this.documentService.createModelReference(new a.URI("debug/breakpoint/expression/input").withScheme(a.Schemes.walkThroughSnippet))).instance.getMonacoModel();return t.updateOptions({tabSize:2}),this._inputEditor.monacoEditor.setModel(t),Promise.resolve(this.inputEditor)}};i.__decorate([(0,o.Autowired)(f.DebugViewModel),i.__metadata("design:type",f.DebugViewModel)],_.prototype,"model",void 0),i.__decorate([(0,o.Autowired)(d.IWorkspaceService),i.__metadata("design:type",Object)],_.prototype,"workspaceService",void 0),i.__decorate([(0,o.Autowired)(m.BreakpointManager),i.__metadata("design:type",m.BreakpointManager)],_.prototype,"breakpoints",void 0),i.__decorate([(0,o.Autowired)(h.IDebugSessionManager),i.__metadata("design:type",g.DebugSessionManager)],_.prototype,"sessions",void 0),i.__decorate([(0,o.Autowired)(s.LabelService),i.__metadata("design:type",s.LabelService)],_.prototype,"labelProvider",void 0),i.__decorate([(0,o.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),i.__decorate([(0,o.Autowired)(a.IReporterService),i.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),i.__decorate([(0,o.Autowired)(c.EditorCollectionService),i.__metadata("design:type",c.EditorCollectionService)],_.prototype,"editorService",void 0),i.__decorate([(0,o.Autowired)(l.IEditorDocumentModelService),i.__metadata("design:type",Object)],_.prototype,"documentService",void 0),i.__decorate([r.observable,i.__metadata("design:type",Array)],_.prototype,"nodes",void 0),i.__decorate([r.observable,i.__metadata("design:type",Boolean)],_.prototype,"enable",void 0),i.__decorate([r.observable,i.__metadata("design:type",Boolean)],_.prototype,"inDebugMode",void 0),i.__decorate([(0,a.OnEvent)(u.WorkspaceEditDidRenameFileEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[u.WorkspaceEditDidRenameFileEvent]),i.__metadata("design:returntype",void 0)],_.prototype,"onRenameFile",null),i.__decorate([(0,a.OnEvent)(u.WorkspaceEditDidDeleteFileEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[u.WorkspaceEditDidDeleteFileEvent]),i.__metadata("design:returntype",void 0)],_.prototype,"onDeleteFile",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],_.prototype,"updateRoots",null),i.__decorate([r.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],_.prototype,"toggleBreakpointEnable",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],_.prototype,"updateBreakpoints",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],_.prototype,"toggleBreakpoints",null),_=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],_),t.DebugBreakpointsService=_},25161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointItem=t.DebugBreakpointView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(25880),l=n(894),d=n(89329),u=n(23375),p=i.__importDefault(n(31182)),h=n(89021);t.DebugBreakpointView=(0,o.observer)((({viewState:e})=>{const{nodes:n,enable:i,inDebugMode:o,toggleBreakpointEnable:s}=(0,l.useInjectable)(h.DebugBreakpointsService),d={height:e.height,width:e.width};return a.default.createElement("div",{className:(0,r.default)(p.default.debug_breakpoints,!i&&p.default.debug_breakpoints_disabled)},a.default.createElement(c.RecycleList,{data:n,itemHeight:22,template:({data:e})=>a.default.createElement(t.BreakpointItem,{toggle:()=>s(e.breakpoint),breakpointEnabled:i,data:e,isDebugMode:o}),style:d}))}));t.BreakpointItem=({data:e,toggle:t,isDebugMode:n,breakpointEnabled:i})=>{const o=(0,u.isDebugBreakpoint)(e.breakpoint)?e.breakpoint.enabled:!!e.breakpoint.default,m=(0,l.useInjectable)(d.IDebugSessionManager),g=(0,l.useInjectable)(l.CommandService),f=(0,l.useInjectable)(h.DebugBreakpointsService),[_,b]=a.default.useState(o),[y,v]=a.default.useState(void 0);a.default.useEffect((()=>{const t=()=>{if((0,u.isDebugBreakpoint)(e.breakpoint)&&(0,u.isRuntimeBreakpoint)(e.breakpoint)){const t=(0,u.getStatus)(e.breakpoint);v(t)}},n=m.onDidChangeActiveDebugSession((()=>t()));return t(),()=>{v(void 0),n.dispose()}}),[]);const C=!n||(0,u.isDebugBreakpoint)(e.breakpoint)&&(0,u.isRuntimeBreakpoint)(e.breakpoint);return a.default.createElement("div",{className:(0,r.default)(p.default.debug_breakpoints_item)},a.default.createElement("div",{className:(0,r.default)((0,u.isDebugBreakpoint)(e.breakpoint)?C?(()=>{const{className:t}=f.getBreakpointDecoration(e.breakpoint,n,i&&_);return t})():"sumi-debug-breakpoint-unverified":"",p.default.debug_breakpoints_icon)}),a.default.createElement(s.CheckBox,{id:e.id,onChange:()=>{t(),b(!_)},checked:_}),a.default.createElement("div",{className:p.default.debug_breakpoints_wrapper,onClick:()=>{if(e.breakpoint.uri){const t={preview:!0,focus:!0};t.range=y?{startColumn:y.column||0,endColumn:y.column||0,startLineNumber:y.line,endLineNumber:y.line}:{startColumn:e.breakpoint.raw.column||0,endColumn:e.breakpoint.raw.column||0,startLineNumber:e.breakpoint.raw.line,endLineNumber:e.breakpoint.raw.line},g.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,new l.URI(e.breakpoint.uri),t)}}},a.default.createElement("span",{className:p.default.debug_breakpoints_name},e.name),a.default.createElement("span",{className:p.default.debug_breakpoints_description},e.description)),(0,u.isDebugBreakpoint)(e.breakpoint)?a.default.createElement(a.default.Fragment,null,a.default.createElement("a",{title:"鍒犻櫎鏂偣",onClick:t=>(t=>{t.stopPropagation(),f.delBreakpoint(e.breakpoint)})(t),className:(0,r.default)(p.default.debug_remove_breakpoints_icon,(0,l.getIcon)("close"))}),a.default.createElement(c.Badge,{className:p.default.debug_breakpoints_badge},e.breakpoint.raw.line,!!e.breakpoint.raw.column&&`:${e.breakpoint.raw.column}`)):null)}},44686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationService=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(14238),c=n(89329),l=n(34886),d=n(86161),u=n(10111),p=n(12614),h=n(43380);let m=class{constructor(){this.currentValue=c.DEFAULT_ADD_CONFIGURATION_KEY,this.float=!0,this.workspaceRoots=[],this.start=async()=>{const e=this.debugConfigurationManager.current;e?this.debugSessionManager.start(e):this.debugConfigurationManager.addConfiguration()},this.openConfiguration=()=>{const{current:e}=this.debugConfigurationManager,t=null==e?void 0:e.workspaceFolderUri;this.debugConfigurationManager.openConfiguration(t)},this.openDebugConsole=()=>{this.debugConsoleService.activate()},this.addConfiguration=e=>{this.debugConfigurationManager.addConfiguration("string"==typeof e?e:void 0)},this.updateConfiguration=(e,t,n)=>{this.debugConfigurationManager.current=this.debugConfigurationManager.find(e,t,n)},this.toName=({configuration:e,workspaceFolderUri:t})=>t&&this.workspaceService.isMultiRootWorkspaceEnabled?e.name+" ("+new a.URI(t).path.base+")":e.name,this._whenReady=this.init()}get whenReady(){return this._whenReady}async init(){await this.debugConfigurationManager.whenReady,await this.updateConfigurationOptions(),this.debugConfigurationManager.onDidChange((async()=>{this.updateConfigurationOptions()})),this.preferenceService.onPreferenceChanged((e=>{const{preferenceName:t,newValue:n}=e;"debug.toolbar.float"===t&&this.float!==n&&this.updateFloat(n)})),await this.updateWorkspaceState(),this.workspaceService.onWorkspaceChanged((async()=>{await this.updateWorkspaceState()})),this.updateFloat(!!this.preferenceService.get("debug.toolbar.float"))}async updateWorkspaceState(){this.isMultiRootWorkspace=this.workspaceService.isMultiRootWorkspaceOpened,this.workspaceRoots=(await this.workspaceService.tryGetRoots()).map((e=>e.uri))}updateFloat(e){this.float=e}updateCurrentValue(e){this.currentValue=e}updateConfigurationOptions(){this.configurationOptions=this.debugConfigurationManager.all;const{current:e}=this.debugConfigurationManager;if(e){const t=this.toValue(e);this.updateCurrentValue(t)}else this.updateCurrentValue(c.DEFAULT_ADD_CONFIGURATION_KEY)}toValue({configuration:e,workspaceFolderUri:t,index:n}){if(!t)return e.name;if((0,a.isUndefined)(n)){const n=this.debugConfigurationManager.find(e.name,t);return n&&n.index?this.toValue(n):this.currentValue}return e.name+c.DEFAULT_CONFIGURATION_NAME_SEPARATOR+t+c.DEFAULT_CONFIGURATION_INDEX_SEPARATOR+n}};i.__decorate([(0,o.Autowired)(s.IWorkspaceService),i.__metadata("design:type",Object)],m.prototype,"workspaceService",void 0),i.__decorate([(0,o.Autowired)(d.DebugConfigurationManager),i.__metadata("design:type",d.DebugConfigurationManager)],m.prototype,"debugConfigurationManager",void 0),i.__decorate([(0,o.Autowired)(l.IDebugSessionManager),i.__metadata("design:type",u.DebugSessionManager)],m.prototype,"debugSessionManager",void 0),i.__decorate([(0,o.Autowired)(h.DebugViewModel),i.__metadata("design:type",h.DebugViewModel)],m.prototype,"debugViewModel",void 0),i.__decorate([(0,o.Autowired)(p.DebugConsoleService),i.__metadata("design:type",p.DebugConsoleService)],m.prototype,"debugConsoleService",void 0),i.__decorate([(0,o.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),i.__decorate([r.observable,i.__metadata("design:type",String)],m.prototype,"currentValue",void 0),i.__decorate([r.observable,i.__metadata("design:type",Object)],m.prototype,"float",void 0),i.__decorate([r.observable,i.__metadata("design:type",Boolean)],m.prototype,"isMultiRootWorkspace",void 0),i.__decorate([r.observable,i.__metadata("design:type",Array)],m.prototype,"workspaceRoots",void 0),i.__decorate([r.observable.shallow,i.__metadata("design:type",Array)],m.prototype,"configurationOptions",void 0),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],m.prototype,"updateWorkspaceState",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Boolean]),i.__metadata("design:returntype",void 0)],m.prototype,"updateFloat",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[String]),i.__metadata("design:returntype",void 0)],m.prototype,"updateCurrentValue",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],m.prototype,"updateConfigurationOptions",null),m=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],m),t.DebugConfigurationService=m},95947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationView=t.DebugActionBar=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(894),l=n(86915),d=n(89329),u=n(30853),p=i.__importDefault(n(14204)),h=n(44686),m=n(31021),g=a.default.memo((({currentValue:e,options:t,onChangeConfiguration:n,isMultiRootWorkspace:i,addConfigurationLabel:o,toValue:u,workspaceRoots:h})=>{const m=a.default.useCallback((e=>e&&e.length?e.map(((e,t)=>{const n=i?`${e.configuration.name} (${new c.URI(e.workspaceFolderUri).displayName})`:e.configuration.name;return(0,c.isElectronRenderer)()?a.default.createElement("option",{key:t,value:u(e),label:n},n):a.default.createElement(s.Option,{key:t,value:u(e),label:n},n)})):(0,c.isElectronRenderer)()?[a.default.createElement("option",{value:d.DEFAULT_NO_CONFIGURATION_KEY,key:d.DEFAULT_NO_CONFIGURATION_KEY,label:(0,c.localize)("debug.action.no.configuration")},(0,c.localize)("debug.action.no.configuration"))]:[a.default.createElement(s.Option,{value:d.DEFAULT_NO_CONFIGURATION_KEY,key:d.DEFAULT_NO_CONFIGURATION_KEY,label:(0,c.localize)("debug.action.no.configuration")},(0,c.localize)("debug.action.no.configuration"))]),[i]),g=a.default.useCallback((()=>{if(i){let e=o;const t=h.map(((t,n)=>{const i=`${o} (${new c.URI(t).displayName})`;return e.lengtha.default.createElement("div",{className:p.default.kt_debug_actions},a.default.createElement(u.DebugAction,{id:"debug.action.start",icon:"start",label:(0,c.localize)("debug.action.start"),run:e}),a.default.createElement(u.DebugAction,{id:"debug.action.open.configuration",icon:"setting",label:(0,c.localize)("debug.action.open.configuration"),run:t}),a.default.createElement(u.DebugAction,{id:"debug.action.debug.console",icon:"terminal",label:(0,c.localize)("debug.action.debug.console"),run:n})))),t.DebugConfigurationView=(0,o.observer)((e=>{const{configurationOptions:n,toValue:i,currentValue:r,openConfiguration:o,addConfiguration:s,openDebugConsole:l,updateConfiguration:u,start:f,float:_,isMultiRootWorkspace:b,workspaceRoots:y}=(0,c.useInjectable)(h.DebugConfigurationService),v=(0,c.localize)("debug.action.add.configuration"),C=a.default.useCallback((e=>{let t;if(t="object"==typeof e?e.target.value:e,t.startsWith(d.DEFAULT_ADD_CONFIGURATION_KEY)){const e=t.slice(d.DEFAULT_ADD_CONFIGURATION_KEY.length);s(e?y[e]:y[0])}else{const[e,n]=t.split(d.DEFAULT_CONFIGURATION_NAME_SEPARATOR),[i,r]=n.split(d.DEFAULT_CONFIGURATION_INDEX_SEPARATOR);u(e,i,+r)}}),[]);return a.default.createElement("div",null,a.default.createElement("div",{className:p.default.debug_configuration_toolbar},a.default.createElement(g,{currentValue:r,options:n,onChangeConfiguration:C,isMultiRootWorkspace:b,addConfigurationLabel:v,toValue:i,workspaceRoots:y}),a.default.createElement(t.DebugActionBar,{runDebug:f,openConfiguration:o,openDebugConsole:l})),!_&&a.default.createElement(m.DebugToolbarView,{float:!1}))}))},21680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugToolbarService=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(57061),c=n(29277),l=n(89329),d=n(43380);let u=class{constructor(){this.sessions=[],this.toolBarMenuMap=new Map,this.doStart=()=>this.model.start(),this.doRestart=async()=>{const e=this.instrumentReporter("restart"),t=await this.model.restart();return e(),t},this.doStop=async()=>{if(!this.model.currentSession)return;const e=this.instrumentReporter("stop"),t=await this.model.currentSession.terminate();return e(),t},this.doContinue=async()=>{if(!this.model.currentThread)return;const e=this.instrumentReporter("continue"),t=await this.model.currentThread.continue();return e(),t},this.doPause=async()=>{if(!this.model.currentThread)return;const e=this.instrumentReporter("pause"),t=await this.model.currentThread.pause();return e(),t},this.doStepOver=async()=>{if(!this.model.currentThread)return;const e=this.instrumentReporter("stepOver"),t=await this.model.currentThread.stepOver();return e(),t},this.doStepIn=async()=>{if(!this.model.currentThread)return;const e=this.instrumentReporter("stepIn"),t=await this.model.currentThread.stepIn();return e(),t},this.doStepOut=async()=>{if(!this.model.currentThread)return;const e=this.instrumentReporter("stepOut"),t=await this.model.currentThread.stepOut();return e(),t},this.updateCurrentSession=e=>{this.model.currentSession=e},this.model.onDidChange((()=>{this.updateToolBarMenu(),this.updateModel()}))}get mainUIService(){return this.injector.get(c.IElectronMainUIService)}updateModel(){this.state=this.model.state,this.currentSession=this.model.currentSession,this.sessions=Array.from(this.model.sessions).filter((e=>e&&e.state>l.DebugState.Inactive)),this.sessionCount=this.sessions.length}updateToolBarMenu(){if(this.currentSession&&this.currentSession.id&&!this.toolBarMenuMap.has(this.currentSession.id)){const e=this.contextMenuService.createMenu({id:s.MenuId.DebugToolBar,contextKeyService:this.contextKeyService.createScoped()});this.currentSession.on("terminated",(()=>{var e;this.toolBarMenuMap.delete(null===(e=this.currentSession)||void 0===e?void 0:e.id)})),this.toolBarMenuMap.set(this.currentSession.id,e)}}instrumentReporter(e){var t,n,i;const r=this.model.currentSession,o=null===(t=r.configuration)||void 0===t?void 0:t.type,a=this.model.currentThread,s=null===(n=null==a?void 0:a.raw)||void 0===n?void 0:n.id;this.model.reportAction(r.id,s,e);const c={type:o,request:null===(i=this.currentSession)||void 0===i?void 0:i.configuration.request,sessionId:r.id,threadId:s};this.model.report(l.DEBUG_REPORT_NAME.DEBUG_TOOLBAR_OPERATION,e,c);const d=this.model.reportTime(l.DEBUG_REPORT_NAME.DEBUG_TOOLBAR_OPERATION_TIME,c);return()=>{d(e)}}};i.__decorate([(0,o.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),i.__decorate([(0,o.Autowired)(s.AbstractContextMenuService),i.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"contextMenuService",void 0),i.__decorate([(0,o.Autowired)(d.DebugViewModel),i.__metadata("design:type",d.DebugViewModel)],u.prototype,"model",void 0),i.__decorate([(0,o.Autowired)(a.IReporterService),i.__metadata("design:type",Object)],u.prototype,"reporterService",void 0),i.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),i.__metadata("design:type",o.Injector)],u.prototype,"injector",void 0),i.__decorate([r.observable,i.__metadata("design:type",Number)],u.prototype,"state",void 0),i.__decorate([r.observable,i.__metadata("design:type",Number)],u.prototype,"sessionCount",void 0),i.__decorate([r.observable,i.__metadata("design:type",Object)],u.prototype,"currentSession",void 0),i.__decorate([r.observable.shallow,i.__metadata("design:type",Array)],u.prototype,"sessions",void 0),i.__decorate([a.memoize,i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[])],u.prototype,"mainUIService",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],u.prototype,"updateModel",null),i.__decorate([r.action,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],u.prototype,"updateToolBarMenu",null),u=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.DebugToolbarService=u},31021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugToolbarOverlayWidget=t.DebugToolbarView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(22188),a=n(32834),s=i.__importStar(n(616)),c=n(39993),l=n(25880),d=n(894),u=n(32278),p=n(86915),h=n(67109),m=n(89329),g=n(30853),f=n(30785),_=i.__importDefault(n(14204)),b=n(44686),y=n(21680);let v=class{constructor(){this.x=0,this.line=0,this.enable=!1,this._origin=0,this._last=0,this._y=0}onMouseDown(e){this.enable=!0,this._origin=e.clientX,this._y=e.clientY}onMouseMove(e){e.stopPropagation(),this.enable&&(this.x=e.clientX-this._origin+this._last,this.line=e.clientY-this._y>10?1:0)}onMouseUp(){this.enable=!1,this._last=this.x}};i.__decorate([o.observable,i.__metadata("design:type",Number)],v.prototype,"x",void 0),i.__decorate([o.observable,i.__metadata("design:type",Number)],v.prototype,"line",void 0),i.__decorate([o.observable,i.__metadata("design:type",Boolean)],v.prototype,"enable",void 0),i.__decorate([o.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],v.prototype,"onMouseDown",null),i.__decorate([o.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],v.prototype,"onMouseMove",null),i.__decorate([o.action.bound,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],v.prototype,"onMouseUp",null),v=i.__decorate([(0,c.Injectable)(),i.__metadata("design:paramtypes",[])],v),t.DebugToolbarView=(0,a.observer)((e=>{const{state:t,toolBarMenuMap:n,doStop:i,doStepIn:o,doStepOut:a,doStepOver:c,doContinue:h,doRestart:b,doPause:v,currentSession:C,sessions:S,updateCurrentSession:w}=(0,d.useInjectable)(y.DebugToolbarService),{isElectronRenderer:E}=(0,d.useInjectable)(d.AppConfig),k=!!C&&"attach"===C.configuration.request&&!(0,f.isExtensionHostDebugging)(C.configuration),x=C&&C.id,T=e=>e.map((e=>E?s.default.createElement("option",{key:e.id,value:e.id},e.label):s.default.createElement(l.Option,{key:e.id,label:e.label,value:e.id},e.label))),D=e=>{let t=e;if(E&&(t=e.target.value),S)for(const e of S)e.id===t&&w(e)};return s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:_.default.kt_debug_action_bar},(t=>{if(t.length>1)return s.default.createElement("div",{className:(0,r.default)(_.default.debug_selection)},E?s.default.createElement(p.Select,{value:x,onChange:D},T(t)):s.default.createElement(l.Select,{className:(0,r.default)(_.default.debug_selection,_.default.special_radius),size:e.float?"small":"default",value:x,onChange:D},T(t)))})(S.filter((e=>!e.parentSession))),s.default.createElement("div",{className:_.default.kt_debug_actions},(e=>e===m.DebugState.Stopped?s.default.createElement(g.DebugAction,{run:h,icon:"continue",label:(0,d.localize)("debug.action.continue")}):s.default.createElement(g.DebugAction,{run:v,enabled:"number"==typeof e&&e===m.DebugState.Running,icon:"pause",label:(0,d.localize)("debug.action.pause")}))(t),s.default.createElement(g.DebugAction,{run:c,enabled:"number"==typeof t&&t===m.DebugState.Stopped,icon:"step",label:(0,d.localize)("debug.action.step-over")}),s.default.createElement(g.DebugAction,{run:o,enabled:"number"==typeof t&&t===m.DebugState.Stopped,icon:"step-in",label:(0,d.localize)("debug.action.step-into")}),s.default.createElement(g.DebugAction,{run:a,enabled:"number"==typeof t&&t===m.DebugState.Stopped,icon:"step-out",label:(0,d.localize)("debug.action.step-out")}),s.default.createElement(g.DebugAction,{run:b,enabled:"number"==typeof t&&t!==m.DebugState.Inactive,icon:"reload",label:(0,d.localize)("debug.action.restart")}),(e=>k?s.default.createElement(g.DebugAction,{run:i,enabled:"number"==typeof e&&e!==m.DebugState.Inactive,icon:"disconnect",label:(0,d.localize)("debug.action.disattach")}):s.default.createElement(g.DebugAction,{run:i,enabled:"number"==typeof e&&e!==m.DebugState.Inactive,icon:"stop",label:(0,d.localize)("debug.action.stop")}))(t),(A=C)&&A.id&&n.has(A.id)?s.default.createElement(u.InlineMenuBar,{menus:n.get(A.id)}):null)));var A}));const C=(0,a.observer)((()=>{const e=(0,d.useInjectable)(v),n=(0,d.useInjectable)(d.PreferenceService),{isElectronRenderer:i}=(0,d.useInjectable)(d.AppConfig),o=(0,d.useInjectable)(y.DebugToolbarService),[a,c]=(0,s.useState)(0),{state:l}=o;(0,s.useEffect)((()=>{const e=new d.DisposableCollection,t=n.get("debug.toolbar.top")||0;if(i){const n=o.mainUIService,i=()=>d.isMacintosh&&parseFloat(d.electronEnv.osRelease)>=20;n.isFullScreen(d.electronEnv.currentWindowId).then((e=>{c(e?t:t+(i()?h.LAYOUT_VIEW_SIZE.TITLEBAR_HEIGHT:h.LAYOUT_VIEW_SIZE.BIG_SUR_TITLEBAR_HEIGHT))})),e.push(n.on("fullScreenStatusChange",((e,n)=>{e===d.electronEnv.currentWindowId&&c(n?t:t+(i()?h.LAYOUT_VIEW_SIZE.TITLEBAR_HEIGHT:h.LAYOUT_VIEW_SIZE.BIG_SUR_TITLEBAR_HEIGHT))})))}else c(t);return()=>{e.dispose()}}),[]);const u=n.get("debug.toolbar.height")||0,p=(0,r.default)({[_.default.debug_toolbar_wrapper]:!0,[_.default.debug_toolbar_wrapper_electron]:i});return l?s.default.createElement("div",{style:{pointerEvents:e.enable?"all":"none"},className:_.default.debug_toolbar_container,onMouseMove:t=>e.onMouseMove(t),onMouseUp:t=>e.onMouseUp()},s.default.createElement("div",{style:{transform:`translateX(${e.x}px) translateY(${a+e.line*u}px)`,height:`${u}px`},className:p},s.default.createElement("div",{className:(0,r.default)(_.default.debug_toolbar_drag_wrapper)},s.default.createElement("div",{className:(0,r.default)((0,d.getIcon)("drag"),_.default.debug_toolbar_drag),onMouseDown:t=>e.onMouseDown(t),onMouseMove:t=>e.onMouseMove(t)})),s.default.createElement(t.DebugToolbarView,{float:!0}))):(e.enable=!1,null)}));t.DebugToolbarOverlayWidget=(0,a.observer)((()=>{const{float:e}=(0,d.useInjectable)(b.DebugConfigurationService);return e?s.default.createElement(C,null):null}))},74946:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterModel=void 0;const r=n(70655),o=n(39993),a=n(894);let s=i=class{constructor(){this._parsedQueries=[]}set filterQuery(e){if(this._parsedQueries=[],(e=e.trim())&&""!==e){const t=(0,a.splitGlobAware)(e,",").map((e=>e.trim())).filter((e=>!!e.length));for(const e of t)e.startsWith("!")?this._parsedQueries.push({type:"exclude",query:e.slice(1)}):this._parsedQueries.push({type:"include",query:e})}}filter(e){let t=!1,n=!1;for(const{type:r,query:o}of this._parsedQueries){if("exclude"===r&&i.matchQuery(o,e))return!1;"include"===r&&(t=!0,i.matchQuery(o,e)&&(n=!0))}return t&&n}};s.matchQuery=a.matchesFuzzy,s=i=r.__decorate([(0,o.Injectable)({multiple:!0})],s),t.DebugConsoleFilterModel=s},69847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(30785),s=n(74946),c=n(1458),{convertSimple2RegExpPattern:l}=o.strings;let d=class{constructor(){this._onDidValueChange=new o.Emitter,this._onDidFocus=new o.Emitter,this._filterText="",this.filterModel=new s.DebugConsoleFilterModel}get onDidValueChange(){return this._onDidValueChange.event}get onDidFocus(){return this._onDidFocus.event}focusInput(){this._onDidFocus.fire()}get filterText(){return this._filterText}setFilterText(e){return this._filterText!==e&&(this._filterText=e,this.filterModel.filterQuery=this._filterText,this._onDidValueChange.fire(this._filterText)),this}filter(e){const t=c.ansiToText(e);return""===this._filterText||this.filterModel.filter(t)}findMatches(e){const t=new RegExp(l(this._filterText.toLowerCase()),"g");if(""===this._filterText.trim())return[];const n=(0,a.matchAll)(e.toLowerCase(),t),i=this._filterText.length;if(0===i)return[];return n.map((e=>({startIndex:void 0!==e.index?e.index:-1,count:i}))).filter((e=>e.startIndex>=0))}};d=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.DebugConsoleFilterService=d},35899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterView=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(32834),a=i.__importDefault(n(616)),s=n(1056),c=n(894),l=n(894),d=n(894),u=n(69847),p=i.__importDefault(n(25341));t.DebugConsoleFilterView=(0,o.observer)((()=>{const e=(0,l.useInjectable)(u.DebugConsoleFilterService),[t,n]=a.default.useState(""),[i,o]=a.default.useState(),h=(0,r.default)((t=>{n(t),e.setFilterText(t),i&&i.addToHistory(t)}),400);a.default.useEffect((()=>{const t=e.onDidValueChange((e=>{n(e)}));return()=>{t.dispose()}}),[]);return a.default.useEffect((()=>{const t=e.onDidFocus((()=>{i&&i.focus()}));return()=>{t.dispose()}}),[i]),a.default.createElement("div",{className:p.default.debug_console_filter},a.default.createElement(s.HistoryInputBox,{hasClear:!0,className:p.default.filter_input,value:t,placeholder:(0,c.localize)("debug.console.filter.placeholder"),onValueChange:h,onReady:e=>{o(e)},onKeyDown:e=>{i&&(e.keyCode===d.Key.ARROW_UP.keyCode?i.showPreviousValue():e.keyCode===d.Key.ARROW_DOWN.keyCode&&i.showNextValue())}}))}))},76377:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleTreeModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(90624);let l=i=class extends a.TreeModel{constructor(e){super(),this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),this.onWillUpdateEmitter=new s.Emitter,this._tempScrollOffset=0,this.init(e)}get onWillUpdate(){return this.onWillUpdateEmitter.event}get isScrollBottom(){return this._tempScrollOffset=Math.max(this.state.scrollOffset,this._tempScrollOffset),this._tempScrollOffset===this.state.scrollOffset}init(e){this.root=e,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,(()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{await this.onWillUpdateEmitter.fireAndAwait(),this.dispatchChange()}))}))}};l.DEFAULT_FLUSH_DELAY=100,l=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[c.ExpressionContainer])],l),t.DebugConsoleTreeModel=l},59783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleSession=void 0;const i=n(70655),r=i.__importDefault(n(23493)),o=n(39993),a=n(90642),s=n(52292),c=n(1795),l=n(73563),d=n(37930),u=n(84324),p=n(76377);let h=class{constructor(e,t){this.session=e,this.treeModel=t,this.toDispose=new a.DisposableCollection,this.fireDidChange=(0,r.default)((()=>this.onDidChangeEmitter.fire()),50),this.onDidChangeEmitter=new a.Emitter,this.init()}resolveChildren(){return(this.treeModel.root.flattenedBranch||[]).map((e=>this.treeModel.root.getTreeNodeById(e)))}getLastItem(){const{flattenedBranch:e}=this.treeModel.root,t=(null==e?void 0:e.length)?e[e.length-1]:void 0;return t?this.treeModel.root.getTreeNodeById(t):void 0}async init(){this.session.on("output",(e=>this.logOutput(this.session,e)))}get onDidChange(){return this.onDidChangeEmitter.event}clear(){this.fireDidChange()}async logOutput(e,t){var n;const i=t.body,{category:r,variablesReference:o,source:s,line:c}=i;if(!this.treeModel)return;const l="stderr"===r?a.MessageType.Error:"console"===t.body.category?a.MessageType.Warning:a.MessageType.Info;if("telemetry"!==r){if(o){const t=new u.ExpressionContainer({session:e,variablesReference:o,source:s,line:c},null===(n=this.treeModel)||void 0===n?void 0:n.root);if(await t.hardReloadChildren(),t.children)for(const e of t.children)this.treeModel.root.insertItem(e)}else if("string"==typeof i.output){const e=this.getLastItem();!e||e.description.endsWith("\n")||e.description.endsWith("\r\n")?await this.insertItemWithAnsi(i.output,l,s,c):(this.treeModel.root.unlinkItem(e),await this.insertItemWithAnsi(e.description+i.output,l,s,c))}this.fireDidChange()}else this.logger.debug(`telemetry/${t.body.output}`,t.body.data)}async insertItemWithAnsi(e,t,n,i){var r;const o=await(0,c.handleANSIOutput)(e,this.linkDetector,this.themeService,void 0);this.treeModel.root.insertItem(new u.AnsiConsoleNode(e,null===(r=this.treeModel)||void 0===r?void 0:r.root,this.linkDetector,o,t,n,i))}async execute(e){var t;this.treeModel.root.insertItem(new u.AnsiConsoleNode(e,this.treeModel.root,this.linkDetector,void 0,a.MessageType.Info));const n=new u.DebugConsoleNode(this.session,e,null===(t=this.treeModel)||void 0===t?void 0:t.root);this.treeModel.root.insertItem(n),this.fireDidChange()}append(e){var t;if(!e)return;const n=this.resolveChildren().slice(-1)[0];n instanceof u.AnsiConsoleNode&&n.description===this.uncompletedItemContent?(this.resolveChildren().pop(),this.uncompletedItemContent+=e):this.uncompletedItemContent=e,this.treeModel.root.insertItem(new u.AnsiConsoleNode(this.uncompletedItemContent,null===(t=this.treeModel)||void 0===t?void 0:t.root,this.linkDetector,void 0,a.MessageType.Info)),this.fireDidChange()}appendLine(e){var t;this.treeModel.root.insertItem(new u.AnsiConsoleNode(e,null===(t=this.treeModel)||void 0===t?void 0:t.root,this.linkDetector,void 0,a.MessageType.Info)),this.fireDidChange()}};i.__decorate([(0,o.Autowired)(a.ILogger),i.__metadata("design:type",Object)],h.prototype,"logger",void 0),i.__decorate([(0,o.Autowired)(l.LinkDetector),i.__metadata("design:type",l.LinkDetector)],h.prototype,"linkDetector",void 0),i.__decorate([(0,o.Autowired)(s.IThemeService),i.__metadata("design:type",Object)],h.prototype,"themeService",void 0),h=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__param(0,(0,o.Optional)()),i.__param(1,(0,o.Optional)()),i.__metadata("design:paramtypes",[d.DebugSession,p.DebugConsoleTreeModel])],h),t.DebugConsoleSession=h},95719:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleModelService=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(57061),l=n(89329),d=n(73563),u=n(84324),p=n(90624),h=n(43380),m=n(92842),g=n(76377),f=n(59783),_=r.__importDefault(n(25341)),{Path:b}=s.path;let y=i=class{constructor(){this.debugSessionModelMap=new Map,this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(_.default.mod_selected),this.contextMenuDecoration=new a.Decoration(_.default.mod_actived),this.loadingDecoration=new a.Decoration(_.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new s.Emitter,this.onDidUpdateTreeModelEmitter=new s.Emitter,this.treeModelDisposableCollection=new s.DisposableCollection,this.debugConsoleDisposableCollection=new s.DisposableCollection,this.clear=()=>{this.initTreeModel(this.manager.currentSession,!0)},this.collapseAll=()=>{var e;null===(e=this.treeModel)||void 0===e||e.root.collapsedAll()},this.copyAll=()=>{var e;let t="";if((null===(e=this.treeModel)||void 0===e?void 0:e.root)&&this.treeModel.root.children){for(const e of this.treeModel.root.children)t+=this.getValidText(e)+"\n";this.clipboardService.writeText(t.slice(0,-"\n".length))}},this.copy=e=>{e&&this.clipboardService.writeText(this.getValidText(e))},this.activeNodeDecoration=(e,t=!0)=>{var n;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),e){if(this.selectedNodes.length>0)for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e);this.focusedNode,this.selectedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],t&&(null===(n=this.treeModel)||void 0===n||n.dispatchChange())}},this.activeNodeActivedDecoration=e=>{var t;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this._focusedNode=void 0),this.contextMenuDecoration.addTarget(e),this._contextMenuNode=e,null===(t=this.treeModel)||void 0===t||t.dispatchChange()},this.enactiveNodeDecoration=()=>{var e;this.focusedNode&&(this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),null===(e=this.treeModel)||void 0===e||e.dispatchChange()},this.handleContextMenu=(e,t)=>{var n;e.stopPropagation(),e.preventDefault();const{x:i,y:r}=e.nativeEvent;let o;this.debugContextKey.contextInDebugConsole.set(!0),t?this.activeNodeActivedDecoration(t):this.enactiveNodeDecoration(),o=t||(null===(n=this.treeModel)||void 0===n?void 0:n.root);const a=this.contextMenuService.createMenu({id:c.MenuId.DebugConsoleContext,contextKeyService:this.debugContextKey.contextKeyScoped}),s=a.getMergedMenuNodes();a.dispose(),this.ctxMenuRenderer.show({anchor:{x:i,y:r},menuNodes:s,args:[o],onHide:()=>{window.requestAnimationFrame((()=>{this.debugContextKey.contextInDebugConsole.set(!1)}))}})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=e=>{this.activeNodeDecoration(e)},this.handleTwistierClick=(e,t)=>{if(t===a.TreeNodeType.CompositeTreeNode){if(p.DebugConsoleNode.is(e)&&e.available)return this.activeNodeDecoration(e,!1),void this.toggleDirectory(e);if(e.variablesReference)return this.activeNodeDecoration(e,!1),void this.toggleDirectory(e)}this.activeNodeDecoration(e)},this.toggleDirectory=async e=>{e.expanded?this.treeHandle.collapseNode(e):this.treeHandle.expandNode(e)},this.flushEventQueue=()=>{let e;if(!this._changeEventDispatchQueue||0===this._changeEventDispatchQueue.length)return;this._changeEventDispatchQueue.sort(((e,t)=>b.pathDepth(e)-b.pathDepth(t)));const t=[this._changeEventDispatchQueue[0]];for(const e of this._changeEventDispatchQueue)t.some((t=>0===e.indexOf(t)))||t.push(e);return e=(0,s.pSeries)(t.map((e=>async()=>{var t,n;const i=null===(n=null===(t=this.treeModel)||void 0===t?void 0:t.root)||void 0===n?void 0:n.getTreeNodeByPath(e);return i&&a.CompositeTreeNode.is(i)&&await i.refresh(),null}))),this._changeEventDispatchQueue=[],e},this.init()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){var e;return null===(e=this._activeDebugSessionModel)||void 0===e?void 0:e.treeModel}get debugConsoleSession(){var e;return null===(e=this._activeDebugSessionModel)||void 0===e?void 0:e.debugConsoleSession}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}getValidText(e){return e.description}getConsoleModel(e){return this.debugSessionModelMap.get(e)}dispose(){this.disposeTreeModel(),this.disposeDebugConsole()}disposeTreeModel(){this.treeModelDisposableCollection.disposed||this.treeModelDisposableCollection.dispose()}disposeDebugConsole(){this.debugConsoleDisposableCollection.disposed||this.debugConsoleDisposableCollection.dispose()}async init(){this.debugConsoleDisposableCollection.push(this.manager.onDidDestroyDebugSession((e=>{this.debugSessionModelMap.delete(e.id),this.debugSessionModelMap.size>0&&this.initTreeModel(this.manager.currentSession)}))),this.debugConsoleDisposableCollection.push(this.manager.onDidChangeActiveDebugSession((e=>{e.current&&this.initTreeModel(e.current)})))}listenTreeViewChange(){var e,t;this.disposeTreeModel(),this.treeModelDisposableCollection.push(null===(e=this.treeModel)||void 0===e?void 0:e.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.treeModelDisposableCollection.push(null===(t=this.treeModel)||void 0===t?void 0:t.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.treeModelDisposableCollection.push(this.treeModel.onWillUpdate((()=>{var e;if(0!==this.selectedNodes.length){const t=null===(e=this.treeModel)||void 0===e?void 0:e.root.getTreeNodeByPath(this.selectedNodes[0].path);this.selectedDecoration.addTarget(t)}})))}async initTreeModel(e,t){if(!e)return this._activeDebugSessionModel=void 0,void this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel);const n=e.hasSeparateRepl()?e.id:e.parentSession.id;if(this.debugSessionModelMap.has(n)&&!t){const e=this.debugSessionModelMap.get(n);this._activeDebugSessionModel=e}else{const t=new p.DebugConsoleRoot({});if(!t)return;const i=this.injector.get(g.DebugConsoleTreeModel,[t]),r=this.injector.get(f.DebugConsoleSession,[e,i]);this._activeDebugSessionModel={treeModel:i,debugConsoleSession:r},r.onDidChange((async()=>{if(!i)return;const e=i.root.branchSize,t=r.resolveChildren();i.root.updatePresetChildren(t),e!==t.length&&(this.refresh(),i.isScrollBottom&&await this.treeHandle.ensureVisible(t[t.length-1]),null==i||i.dispatchChange())})),this.debugSessionModelMap.set(n,this._activeDebugSessionModel),this.initDecorations(t),this.listenTreeViewChange()}return this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel),this._activeDebugSessionModel}initDecorations(e){this._decorations=new a.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(e){this._debugWatchTreeHandle=e}dispatchWatchEvent(e,t,n){const i=e.watchEvents.get(t);i&&i.callback&&i.callback(n)}collapsedAll(){var e;null===(e=this.treeModel)||void 0===e||e.root.collapsedAll()}async refresh(e){if(!e){if(!this.treeModel)return;e=this.treeModel.root}!p.ExpressionContainer.is(e)&&e.parent&&(e=e.parent),this.queueChangeEvent(e.path,(()=>{this.onDidRefreshedEmitter.fire()}))}queueChangeEvent(e,t){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new s.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout((async()=>{var e;await this.flushEventQueue(),null===(e=this.flushEventQueueDeferred)||void 0===e||e.resolve(),this.flushEventQueueDeferred=null,t()}),i.DEFAULT_REFRESH_DELAY)),-1===this._changeEventDispatchQueue.indexOf(e)&&this._changeEventDispatchQueue.push(e)}async execute(e){if(!this.treeModel)return;const t=this.treeModel.root,n=new u.AnsiConsoleNode(e,t,this.linkDetector);this.dispatchWatchEvent(t,t.path,{type:a.WatchEvent.Added,node:n,id:t.id});const i=new p.DebugConsoleNode(this.manager.currentSession,e,t);await i.evaluate(),this.dispatchWatchEvent(t,t.path,{type:a.WatchEvent.Added,node:i,id:t.id}),this.treeHandle.ensureVisible(i,"end",!0)}};y.DEFAULT_REFRESH_DELAY=200,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(c.ICtxMenuRenderer),r.__metadata("design:type",c.ICtxMenuRenderer)],y.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(c.AbstractContextMenuService),r.__metadata("design:type",c.AbstractContextMenuService)],y.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(h.DebugViewModel),r.__metadata("design:type",h.DebugViewModel)],y.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],y.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(l.IDebugSessionManager),r.__metadata("design:type",Object)],y.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(s.IClipboardService),r.__metadata("design:type",Object)],y.prototype,"clipboardService",void 0),r.__decorate([(0,o.Autowired)(d.LinkDetector),r.__metadata("design:type",d.LinkDetector)],y.prototype,"linkDetector",void 0),r.__decorate([(0,o.Autowired)(m.DebugContextKey),r.__metadata("design:type",m.DebugContextKey)],y.prototype,"debugContextKey",void 0),y=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],y),t.DebugConsoleModelService=y},75530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleContribution=t.DEBUG_CONSOLE_VIEW_ID=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(18570),c=n(70888),l=n(89329),d=n(92842),u=n(92871),p=n(80098),h=n(69847),m=n(35899),g=n(95719),f=n(12614),_=n(83939);t.DEBUG_CONSOLE_VIEW_ID="debug-console-view";let b=class{registerComponent(e){e.register("debug-console",{id:t.DEBUG_CONSOLE_VIEW_ID,component:_.DebugConsoleView},{title:(0,o.localize)("debug.console.panel.title"),priority:8,containerId:l.DEBUG_CONSOLE_CONTAINER_ID,iconClass:(0,o.getIcon)("debug"),titleComponent:m.DebugConsoleFilterView})}registerToolbarItems(e){e.registerItem({id:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,command:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,iconClass:(0,o.getIcon)("clear"),viewId:l.DEBUG_CONSOLE_CONTAINER_ID,tooltip:u.DEBUG_COMMANDS.CLEAR_CONSOLE.label})}registerEditorDocumentModelContentProvider(e){e.registerEditorDocumentModelContentProvider(this.debugConsoleInputDocumentProvider)}registerCommands(e){e.registerCommand(u.DEBUG_COMMANDS.CLEAR_CONSOLE,{execute:()=>{this.debugConsoleModelService.clear()}}),e.registerCommand(u.DEBUG_COMMANDS.COPY_CONSOLE_ITEM,{execute:e=>{this.debugConsoleModelService.copy(e)}}),e.registerCommand(u.DEBUG_COMMANDS.COPY_CONSOLE_ALL,{execute:()=>{this.debugConsoleModelService.copyAll()}}),e.registerCommand(u.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM,{execute:()=>{this.debugConsoleModelService.collapseAll()},isEnabled:()=>!0===this.debugContextKey.contextInDebugConsole.get()}),e.registerCommand(u.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE,{execute:()=>{this.debugConsoleService.runExecute()}}),e.registerCommand(u.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW,{execute:()=>{this.debugConsoleService.showNextValue()}}),e.registerCommand(u.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW,{execute:()=>{this.debugConsoleService.showPreviousValue()}}),e.registerCommand(u.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS,{execute:()=>{this.debugConsoleFilterService.focusInput()}})}registerMenus(e){e.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COPY_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.copy")},group:"copy"}),e.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COPY_CONSOLE_ALL.id,label:(0,o.localize)("debug.console.copyAll")},group:"copy"}),e.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,label:(0,o.localize)("debug.console.clear")},group:"other"}),e.registerMenuItem(a.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.collapseAll")},group:"other"})}registerKeybindings(e){e.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE.id,keybinding:"enter",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),e.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW.id,keybinding:"down",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),e.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW.id,keybinding:"up",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),e.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS.id,keybinding:"ctrlcmd+f",when:`${p.CONTEXT_IN_DEBUG_REPL.raw}`,priority:Number.MAX_SAFE_INTEGER})}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",g.DebugConsoleModelService)],b.prototype,"debugConsoleModelService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",f.DebugConsoleInputDocumentProvider)],b.prototype,"debugConsoleInputDocumentProvider",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],b.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(f.DebugConsoleService),i.__metadata("design:type",f.DebugConsoleService)],b.prototype,"debugConsoleService",void 0),i.__decorate([(0,r.Autowired)(h.DebugConsoleFilterService),i.__metadata("design:type",h.DebugConsoleFilterService)],b.prototype,"debugConsoleFilterService",void 0),i.__decorate([(0,r.Autowired)(d.DebugContextKey),i.__metadata("design:type",d.DebugContextKey)],b.prototype,"debugContextKey",void 0),b=i.__decorate([(0,s.Domain)(o.ComponentContribution,c.BrowserEditorContribution,o.TabBarToolbarContribution,o.CommandContribution,a.MenuContribution,o.KeybindingContribution)],b),t.DebugConsoleContribution=b},12614:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleInputDocumentProvider=t.DebugConsoleService=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(90642),c=n(92345),l=n(70888),d=n(92674),u=n(52292),p=n(83249),h=r.__importStar(n(63138)),m=n(89329),g=n(10111),f=n(92842),_=n(95719),b="consoleinputdecoration",y=e=>e.replace(/^\S/,(e=>e.toUpperCase())),v=Object.assign(Object.assign({},(0,l.getSimpleEditorOptions)()),{scrollbar:{horizontal:"visible",vertical:"hidden",handleMouseWheel:!0},lineHeight:26,acceptSuggestionOnEnter:"on",readOnly:!0});let C=i=class{constructor(){this._consoleInputElement=null,this._updateDisposable=null,this._onConsoleInputValueChange=new s.Emitter,this.onConsoleInputValueChange=this._onConsoleInputValueChange.event,this._onInputHeightChange=new s.Emitter,this.onInputHeightChange=this._onInputHeightChange.event,this.contextKeyService.onDidChangeContext((e=>{if(e.payload.affectsSome(i.keySet)){this.contextKeyService.match(m.CONTEXT_IN_DEBUG_MODE_KEY)?(this.updateReadOnly(!1),this.updateInputDecoration(),this.debugContextKey.contextInDdebugMode.set(!0)):(this.updateReadOnly(!0),this.debugContextKey&&this.debugContextKey.contextInDdebugMode.set(!1))}}))}get _isReadonly(){const e=this.manager.currentSession;return!e||e.state===m.DebugState.Inactive}get isVisible(){const e=this.mainLayoutService.getTabbarHandler(m.DEBUG_CONSOLE_CONTAINER_ID);return e&&e.isVisible}get consoleModel(){return this.debugConsoleModelService}activate(){const e=this.mainLayoutService.getTabbarHandler(m.DEBUG_CONSOLE_CONTAINER_ID);e&&!e.isVisible&&e.activate()}focusInput(){this.inputEditor&&this.inputEditor.monacoEditor.focus()}async init(e){if(!e)return;const t=await this.storageProvider(s.STORAGE_NAMESPACE.DEBUG);this.history=new p.HistoryNavigator(t.get("debug.console.history",[]),50),this._consoleInputElement=e,this.inputEditor=this.editorService.createCodeEditor(this._consoleInputElement,Object.assign({},v)),this.debugContextKey=this.injector.get(f.DebugContextKey,[this.inputEditor.monacoEditor._contextKeyService]),this.registerDecorationType(),await this.createConsoleInput(),this.setMode()}get contextInDebugRepl(){return this.debugContextKey.contextInDebugRepl}get consoleInputValue(){return this._consoleModel&&this._consoleModel.getValue()||""}showPreviousValue(){this._isReadonly||this.navigateHistory(!0)}showNextValue(){this._isReadonly||this.navigateHistory(!1)}async runExecute(){if(!this.inputEditor)return;const e=this.inputEditor.monacoEditor,t=e.getValue();await this.consoleModel.execute(t),this.history.add(t),e.setValue("")}navigateHistory(e){const t=e?this.history.previous():this.history.next();if(t&&this.inputEditor&&this.inputEditor.monacoEditor){const{monacoEditor:e}=this.inputEditor;e.setValue(t),e.setPosition({lineNumber:1,column:t.length+1})}}get consoleInputUri(){return new s.URI("debug/console/input").withScheme(s.Schemes.walkThroughSnippet)}async createConsoleInput(){var e;if(!(null===(e=this.inputEditor)||void 0===e?void 0:e.monacoEditor))return;const{monacoEditor:t}=this.inputEditor,n=(await this.documentService.createModelReference(this.consoleInputUri)).instance.getMonacoModel();n.updateOptions({tabSize:2}),this._consoleModel=n,t.setModel(n),setTimeout((()=>{this.layoutBody()}),0),t.onDidFocusEditorText((()=>{this.contextInDebugRepl.set(!0),this.updateInputDecoration()})),t.onDidBlurEditorText((()=>{this.contextInDebugRepl.set(!1),this.updateInputDecoration()})),t.onDidChangeModelContent((()=>{const e=t.getModel().getLineCount();this.layoutBody(18*e)})),this.manager.onDidChangeActiveDebugSession((()=>{this.registerCompletion(),this.setMode()})),await this.updateInputDecoration()}layoutBody(e,t){var n;if(!this.inputEditor)return;const{monacoEditor:i}=this.inputEditor,r=Math.max(e||26,i.getContentHeight());i.layout({width:t||(null===(n=this._consoleInputElement)||void 0===n?void 0:n.offsetWidth),height:r}),this._onInputHeightChange.fire(r)}updateReadOnly(e){this.inputEditor&&this.inputEditor.monacoEditor.updateOptions({readOnly:e})}async updateInputDecoration(){if(!this.inputEditor)return;const e=[];if(this._isReadonly&&this.inputEditor.monacoEditor.hasTextFocus()&&!this.inputEditor.monacoEditor.getValue()){const t=(0,u.transparent)(u.editorForeground,.4)(await this.themeService.getCurrentTheme());e.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,a.localize)("debug.console.input.placeholder"),color:t?t.toString():void 0}}})}this.inputEditor.monacoEditor.setDecorations("debug-console-input",b,e)}setMode(){var e;if(!this.inputEditor)return;const t=this.manager.currentSession;if(!t)return;const n=t.currentEditor();n&&this.inputEditor.monacoEditor.getModel().setMode(null===(e=n.getModel())||void 0===e?void 0:e.getLanguageIdentifier())}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("console-input-decoration",b,{})}registerCompletion(){var e;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null);const t=this.manager.currentSession;if(!t)return;const n=t.currentEditor();n&&(this._updateDisposable=h.languages.registerCompletionItemProvider(null===(e=n.getModel())||void 0===e?void 0:e.getLanguageIdentifier().language,{triggerCharacters:["."],provideCompletionItems:async(e,t,n)=>{var i;if(!(null===(i=this.manager.currentSession)||void 0===i?void 0:i.capabilities.supportsCompletionsRequest))return;if(e.uri.toString()!==this.consoleInputUri.toString())return null;const r=this.manager.currentSession,{triggerCharacter:o}=n;let a=e.getWordAtPosition(t);if(a&&r){const{word:e,startColumn:n,endColumn:i}=a;return{suggestions:(await r.sendRequest("completions",{text:e,column:i,frameId:r.currentFrame&&r.currentFrame.raw.id})).body.targets.map((e=>({label:e.label,insertText:e.text||e.label,sortText:e.sortText,kind:h.languages.CompletionItemKind[y(e.type||"property")],range:{startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:n,endColumn:i}})))}}if(a=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column-1}),a&&r&&o){const{word:e,endColumn:n}=a;return{suggestions:(await r.sendRequest("completions",{text:e+o,column:n+1,frameId:r.currentFrame&&r.currentFrame.raw.id})).body.targets.map((e=>({label:e.label,insertText:e.text||e.label,sortText:e.sortText,kind:h.languages.CompletionItemKind[y(e.type||"property")],range:{startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:n+1,endColumn:n+1}})))}}return null}}))}disable(){var e,t;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null),null===(e=this.inputEditor)||void 0===e||e.monacoEditor.setValue(""),null===(t=this.inputEditor)||void 0===t||t.monacoEditor.setModel(null)}};C.keySet=new Set([m.CONTEXT_IN_DEBUG_MODE_KEY]),r.__decorate([(0,o.Autowired)(_.DebugConsoleModelService),r.__metadata("design:type",_.DebugConsoleModelService)],C.prototype,"debugConsoleModelService",void 0),r.__decorate([(0,o.Autowired)(d.IMainLayoutService),r.__metadata("design:type",Object)],C.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(l.IEditorDocumentModelService),r.__metadata("design:type",Object)],C.prototype,"documentService",void 0),r.__decorate([(0,o.Autowired)(c.EditorCollectionService),r.__metadata("design:type",c.EditorCollectionService)],C.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(s.CommandRegistry),r.__metadata("design:type",Object)],C.prototype,"commands",void 0),r.__decorate([(0,o.Autowired)(a.IContextKeyService),r.__metadata("design:type",Object)],C.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(m.IDebugSessionManager),r.__metadata("design:type",g.DebugSessionManager)],C.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(u.IThemeService),r.__metadata("design:type",Object)],C.prototype,"themeService",void 0),r.__decorate([(0,o.Autowired)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],C.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(a.StorageProvider),r.__metadata("design:type",Function)],C.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],C.prototype,"injector",void 0),C=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],C),t.DebugConsoleService=C;let S=class{handlesScheme(e){return e===s.Schemes.walkThroughSnippet}async provideEditorDocumentModelContent(){return this.debugConsole.consoleInputValue}isReadonly(){return!1}get onDidChangeContent(){return this.debugConsole.onConsoleInputValueChange}preferLanguageForUri(){return"plaintext"}};r.__decorate([(0,o.Autowired)(C),r.__metadata("design:type",C)],S.prototype,"debugConsole",void 0),S=r.__decorate([(0,o.Injectable)()],S),t.DebugConsoleInputDocumentProvider=S},83939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_CONSOLE_TREE_FIELD_NAME=t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=t.DebugConsoleRenderedNode=t.DebugConsoleView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(23279)),a=n(32834),s=i.__importDefault(n(616)),c=n(25880),l=n(25880),d=n(894),u=n(894),p=n(90642),h=n(73563),m=n(30785),g=n(84324),f=n(69847),_=i.__importDefault(n(25341)),b=n(12614);t.DebugConsoleView=(0,a.observer)((({viewState:e})=>{const n=(0,d.useInjectable)(b.DebugConsoleService),i=(0,d.useInjectable)(f.DebugConsoleFilterService),r=(0,d.useInjectable)(u.PreferenceService),{consoleModel:a}=n,l=s.default.createRef(),{height:h,width:m}=e,[g,y]=s.default.useState(),[v,C]=s.default.useState(26),[S,w]=s.default.useState(""),[E,k]=s.default.useState(!0),x=new p.Disposable,T=s.default.createRef();s.default.useEffect((()=>{n.init(l.current)}),[l.current]),s.default.useEffect((()=>(x.addDispose(a.onDidUpdateTreeModel((async e=>{e&&(await e.treeModel.root.ensureLoaded(),x.addDispose(e.treeModel.root.watcher.on(c.TreeNodeEvent.WillChangeExpansionState,(()=>{a.treeHandle.layoutItem()})))),y(e)}))),x.addDispose(i.onDidValueChange((e=>{w(e)}))),x.addDispose(n.onInputHeightChange((e=>{C(e)}))),x.addDispose(r.onSpecificPreferenceChange("debug.console.wordWrap",(e=>{const{newValue:t}=e;k(t)}))),k(!!r.get("debug.console.wordWrap",E)),()=>{a.removeNodeDecoration(),x.dispose()})),[]),s.default.useEffect((()=>{if(T.current&&E){let e;const t=(0,o.default)((()=>{var e;return null===(e=a.treeHandle)||void 0===e?void 0:e.layoutItem()}),10),n=new ResizeObserver((()=>{e=window.requestAnimationFrame((()=>t()))}));return n.observe(T.current),()=>{T.current&&(null==n||n.unobserve(T.current)),e&&window.cancelAnimationFrame(e)}}}),[T.current]),s.default.useEffect((()=>{g&&E&&x.addDispose(g.treeModel.state.onChangeScrollOffset((()=>{a.treeHandle.layoutItem()})))}),[g,E]);const D=e=>{a.handleTreeHandler(Object.assign(Object.assign({},e),{getModel:()=>null==g?void 0:g.treeModel,hasDirectFocus:()=>T.current===document.activeElement}))},A=(e,t,n)=>{const i=window.getSelection();i&&"Range"===i.type&&i.rangeCount>0&&e.stopPropagation();const{handleTwistierClick:r}=a;t&&r(t,n)},I=(e,t)=>{const{handleContextMenu:n}=a;n(e,t)},M=()=>({pre:"",post:"",extract:e=>e.description?e.description:e.name}),R=s.default.useCallback((e=>{const n=a.decorations.getDecorations(e.item);return s.default.createElement(t.DebugConsoleRenderedNode,{item:e.item,itemType:e.itemType,decorations:n,filterValue:S,filterMode:"filter",onClick:A,onTwistierClick:A,onContextMenu:I,defaultLeftPadding:14,isWordWrap:E,leftPadding:8})}),[g,S,E]);return s.default.createElement("div",{className:_.default.debug_console,onContextMenu:e=>{const{handleContextMenu:t}=a;t(e)},onClick:e=>{const{enactiveNodeDecoration:t}=a;t(),n.focusInput()}},s.default.createElement("div",{className:_.default.debug_console_output,tabIndex:-1,onBlur:e=>{const{enactiveNodeDecoration:t}=a;t()},ref:T,"data-name":t.DEBUG_CONSOLE_TREE_FIELD_NAME},g?s.default.createElement(c.RecycleTree,{height:Math.max(h-v,26),width:m,itemHeight:t.DEBUG_CONSOLE_TREE_NODE_HEIGHT,onReady:D,overScanCount:10,filter:S,filterProvider:{fuzzyOptions:M,filterAlways:!0},model:g.treeModel,overflow:"auto",supportDynamicHeights:E},R):null),s.default.createElement("div",{className:_.default.variable_repl_bar,style:{maxHeight:h-26+"px"}},s.default.createElement("div",{className:_.default.variable_repl_bar_icon},s.default.createElement("span",{className:(0,d.getIcon)("right")})),s.default.createElement("div",{className:_.default.variable_repl_editor,ref:l})))}));t.DebugConsoleRenderedNode=({item:e,decorations:t,defaultLeftPadding:n,leftPadding:i,filterMode:o,filterValue:a,onClick:u,onTwistierClick:p,onContextMenu:b,isWordWrap:y,itemType:v})=>{const C=(0,d.useInjectable)(f.DebugConsoleFilterService),S=(0,d.useInjectable)(h.LinkDetector),[w,E]=s.default.useState();s.default.useEffect((()=>{const t=window.getComputedStyle(g.AnsiConsoleNode.is(e)?e.el:S.linkify(e.description),null),n=`${t.fontStyle} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`;E(n)}),[e]);const k=()=>g.AnsiConsoleNode.is(e)?"":(g.DebugConsoleNode.is(e)?"":e.name)+(e.description&&!g.DebugConsoleNode.is(e)?": ":""),x=(e,t)=>m.CharWidthReader.getInstance().getCharWidth(e,t),T=s.default.useCallback((()=>{if(!w)return;const t=k()+e.description,n=C.findMatches(t||""),i=e=>Number(e.toFixed(4)),r=new Map,o=(e,o)=>{if(e>0){const a=(e,n,r)=>Array.from({length:e-n},((e,t)=>n+t)).reduce(((e,n)=>i(e+x(t.charAt(n),w))),r);let s;if(0!==o&&r.has(n[o].startIndex)){const t=r.get(n[o].startIndex);s=a(e,t.startIndex,t.left)}else s=a(e,0,0);return r.set(e,{startIndex:e,left:s}),s}return 0};return n.map(((e,n)=>{return{height:16,top:3,width:(r=e.startIndex,a=e.count,Array.from({length:a},((e,t)=>t)).reduce(((e,n)=>e+i(x(t.charAt(r+n),w))),0)),left:o(e.startIndex,Math.max(0,n-1))};var r,a})).map((e=>s.default.createElement("div",{key:e.left,className:_.default.block,style:e})))}),[a,w]),D=()=>{var t,n,i;return g.AnsiConsoleNode.is(e)?s.default.createElement("div",{className:_.default.debug_console_node_status,title:null===(t=e.source)||void 0===t?void 0:t.path},(null===(n=e.source)||void 0===n?void 0:n.name)?`${null===(i=e.source)||void 0===i?void 0:i.name}:${e.line}`:""):s.default.createElement("div",{className:_.default.debug_console_node_status},e.badge)};return s.default.createElement("div",{key:e.id,onClick:t=>{u(t,e,c.CompositeTreeNode.is(e)?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode)},onContextMenu:t=>{0!==t.nativeEvent.which&&(v!==c.TreeNodeType.TreeNode&&v!==c.TreeNodeType.CompositeTreeNode||b&&b(t,e,v))},title:e.tooltip,className:(0,r.default)(_.default.debug_console_node,t?t.classlist:null),style:{paddingLeft:`${(n||8)+(e.depth||0)*(i||0)}px`},"data-id":e.id},s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_content)},(e=>{if(c.CompositeTreeNode.is(e))return n=e,i=p,t&&(null==t?void 0:t.classlist.indexOf(_.default.mod_loading))>-1?s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_segment,_.default.expansion_toggle)},s.default.createElement(l.Loading,null)):n instanceof g.DebugConsoleNode&&0===n.variablesReference?null:s.default.createElement("div",{onClick:e=>{i(e,n,v)},className:(0,r.default)(_.default.debug_console_node_segment,_.default.expansion_toggle,(0,d.getIcon)("right"),{[`${_.default.mod_collapsed}`]:!n.expanded})});var n,i})(e),s.default.createElement("div",{className:_.default.debug_console_node_overflow_wrap,style:{whiteSpace:y?"pre-wrap":"nowrap",cursor:e instanceof g.DebugVariableContainer?"pointer":"initial"}},(A=e,g.AnsiConsoleNode.is(A)||A instanceof g.DebugConsoleNode&&0===A.variablesReference?null:s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_segment,!g.DebugConsoleNode.is(A)&&_.default.debug_console_node_display_name,_.default.debug_console_variable,e.description?_.default.name:_.default.info)},s.default.createElement(g.TreeWithLinkWrapper,{html:S.linkify(k())}))),(t=>{const n=t.description||"",i=[_.default.debug_console_variable];return g.AnsiConsoleNode.is(t)?s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_segment,_.default.debug_console_node_display_name)},t.template()):("number"===e.variableType||"boolean"===e.variableType||"string"===e.variableType?i.push(_.default[e.variableType]):isNaN(+n)?/^true|false$/i.test(n)?i.push(_.default.boolean):/^(['"]).*\1$/.test(n)&&i.push(_.default.string):i.push(_.default.number),s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_segment_grow,_.default.debug_console_node_description,...i)},s.default.createElement(g.TreeWithLinkWrapper,{html:S.linkify(n)})))})(e)),s.default.createElement("div",{className:(0,r.default)(_.default.debug_console_node_segment,_.default.debug_console_node_tail)},D())),s.default.createElement("div",{className:_.default.debug_console_selection},"matcher"===o&&T()));var A},t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=22,t.DEBUG_CONSOLE_TREE_FIELD_NAME="DEBUG_CONSOLE_TREE_FIELD"},43380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugViewModel=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(34886),s=n(10111);let c=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidChangeEmitter,this.onDidChangeBreakpointsEmitter),this._sessions=new Set}fireDidChange(){this.onDidChangeEmitter.fire(void 0)}fireDidChangeBreakpoints(e){this.onDidChangeBreakpointsEmitter.fire(e)}get sessions(){return this._sessions.values()}get sessionCount(){return this._sessions.size}push(e){this._sessions.has(e)||(this._sessions.add(e),this.fireDidChange())}delete(e){return!!this._sessions.delete(e)&&(this.fireDidChange(),!0)}get session(){return this.sessions.next().value}get id(){return this.session&&this.session.id||"-1"}get label(){return this.session&&this.session.label||"Unknown Session"}has(e){return!!e&&this._sessions.has(e)}init(e){e&&this.push(e),this.toDispose.push(this.manager.onDidChangeActiveDebugSession((({previous:e,current:t})=>{this.has(e)&&!this.has(t)&&this.fireDidChange()}))),this.toDispose.push(this.manager.onDidChange((e=>{this.has(e)&&this.fireDidChange()}))),this.toDispose.push(this.manager.onDidDestroyDebugSession((e=>{this.has(e)&&this.fireDidChange()})))}dispose(){this.toDispose.dispose()}get threads(){if(this.manager.currentSession)return this.manager.currentSession.getThreads((()=>!0))}get currentSession(){const{currentSession:e}=this.manager;return this.has(e)&&e||this.session}set currentSession(e){this.manager.updateCurrentSession(e)}get state(){const{currentSession:e}=this;return e&&e.state||a.DebugState.Inactive}get currentThread(){const{currentSession:e}=this;return e&&e.currentThread}get currentFrame(){const{currentThread:e}=this;return e&&e.currentFrame}async start(){const{session:e}=this;if(!e)return;const t=await this.manager.start(e.options);t&&(this._sessions.delete(e),this._sessions.add(t),this.fireDidChange())}async restart(){const{currentSession:e}=this;if(!e)return;const t=await this.manager.restart(e);t!==e&&(this._sessions.delete(e),this._sessions.add(t)),this.fireDidChange()}report(e,t,n){return this.manager.report(e,t,n)}reportTime(e,t){return this.manager.reportTime(e,t)}reportAction(e,t,n){return this.manager.reportAction(e,t,n)}};i.__decorate([(0,r.Autowired)(a.IDebugSessionManager),i.__metadata("design:type",s.DebugSessionManager)],c.prototype,"manager",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.DebugViewModel=c},48654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackFramesView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(894),l=n(89329),d=i.__importDefault(n(74552)),u=n(16513);t.DebugStackFramesView=(0,o.observer)((e=>{const{viewState:t,frames:n,thread:i,indent:o=0,session:p}=e,[h,m]=a.default.useState(),[g,f]=a.default.useState(!1),[_,b]=a.default.useState([]),[y,v]=a.default.useState(""),[C,S]=a.default.useState(!1),w=(0,c.useInjectable)(l.IDebugSessionManager),E=(0,c.useInjectable)(u.DebugCallStackService),k=e=>{e&&e.source&&e.source.open({},e)};a.default.useEffect((()=>{b([...n]);const e=new c.DisposableCollection;return e.push(w.onDidChangeActiveDebugSession((({previous:e})=>{e&&e!==i.session&&m(void 0)}))),p&&e.push(p.onDidChangeCallStack((()=>{b([...i.frames])}))),()=>{e.dispose()}}),[]),a.default.useEffect((()=>{if(i){const e=i.frames.find((e=>!!e.source));e&&(m(e.raw.id),k(e))}}),[i.frameCount]),a.default.useEffect((()=>{if(i)if(i.stoppedDetails){const{framesErrorMessage:e,totalFrames:t}=i.stoppedDetails;v(e||""),t&&t>i.frameCount?S(!0):S(!1)}else S(!1);else S(!1)}),[_]);const x=()=>a.default.createElement("div",{className:d.default.debug_stack_frames_item,onClick:async()=>{f(!0),await(async()=>{var e,t;if(!i)return;const n="number"==typeof(null===(e=i.stoppedDetails)||void 0===e?void 0:e.totalFrames)?(null===(t=i.stoppedDetails)||void 0===t?void 0:t.totalFrames)-i.frameCount:void 0,r=await i.fetchFrames(n);b(r)})(),f(!1)}},a.default.createElement("span",{className:d.default.debug_stack_frames_load_more},(0,c.localize)("debug.stack.loadMore")));if(y)return a.default.createElement("div",{className:d.default.debug_stack_frames},(T=y,a.default.createElement("div",{className:d.default.debug_stack_frames_item},a.default.createElement("span",{className:d.default.debug_stack_frames_error_message,title:T},T))));var T;return a.default.createElement(s.RecycleList,{data:_,template:({data:e})=>{const t=e,n="label"===t.raw.presentationHint,i="subtle"===t.raw.presentationHint;return a.default.createElement("div",{style:{paddingLeft:`${o}px`},className:(0,r.default)(d.default.debug_stack_frames_item,h===t.raw.id&&d.default.selected,!(t.raw&&t.raw.source&&t.raw.source.name)&&d.default.debug_stack_frames_item_hidden),onClick:()=>{n||i||(w.updateCurrentSession(t.session),t.session.currentThread=t.thread,m(t.raw.id),k(t))},onContextMenu:t=>E.handleContextMenu(t,e)},a.default.createElement("span",{className:(0,r.default)(d.default.debug_stack_frames_item_label,n&&d.default.label,i&&d.default.subtle)},t.raw&&t.raw.name),a.default.createElement("span",{className:d.default.debug_stack_frames_item_description},t.raw&&t.raw.source&&t.raw.source.name||(0,c.localize)("debug.stack.frame.noSource")),a.default.createElement(a.default.Fragment,null,a.default.createElement("a",{title:"",onClick:e=>(e=>{e.preventDefault(),e.stopPropagation(),t.canRestart&&t.restart()})(e),className:(0,r.default)(d.default.debug_restart_frame_icon,(0,c.getIcon)("debug-restart-frame"))}),a.default.createElement("div",{className:(0,r.default)(!(0,c.isUndefined)(t.raw.line)&&d.default.debug_stack_frames_item_badge)},t.raw&&t.raw.line,!(0,c.isUndefined)(t.raw.line)&&":",t.raw&&t.raw.column)))},itemHeight:22,width:t.width,height:g||C?22*(_.length+1):22*_.length,footer:g||C?()=>g?a.default.createElement("div",{className:d.default.debug_stack_frames_item},a.default.createElement("span",{className:d.default.debug_stack_frames_load_more},(0,c.localize)("debug.stack.loading"))):C?x():null:void 0})}))},35786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackSessionView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(894),s=n(89329),c=n(93565),l=i.__importDefault(n(74552)),d=n(30867),u=n(16513);t.DebugStackSessionView=e=>{const{session:n,viewState:i,indent:p}=e,h=(0,a.useInjectable)(s.IDebugSessionManager),m=(0,a.useInjectable)(u.DebugCallStackService),[g,f]=o.default.useState([]),[_,b]=o.default.useState([]),[y,v]=o.default.useState([]),[C,S]=o.default.useState([]),[w,E]=o.default.useState(!0),[k,x]=o.default.useState(!1),[T,D]=o.default.useState(!0),A=h.sessions.length>1,I=n.supportsThreadIdCorrespond,M=()=>{var e,t;const i=h.sessions.filter((e=>e.parentSession)),r=[];for(;i[0];)(null===(t=h.getSession(null===(e=i[0].parentSession)||void 0===e?void 0:e.id))||void 0===t?void 0:t.id)===n.id&&r.push(i[0]),i.shift();return r},R=async()=>{D(!0);const e=await n.fetchThreads();D(!1),b(e)};o.default.useEffect((()=>{const e=h.onDidCreateDebugSession((()=>{const e=M();S(e)})),t=h.onDidDestroyDebugSession((()=>{const e=M();S(e)}));return()=>{e.dispose(),t.dispose(),S([])}}),[]),o.default.useEffect((()=>{f(Array.from(n.threads));const e=new a.DisposableCollection;return e.push(n.onDidChange((()=>{f([...n.threads])}))),e.push(n.onDidThread((async({body:{reason:e}})=>{n.supportsThreadIdCorrespond&&n.state===s.DebugState.Stopped&&"started"===e&&await R()}))),e.push(n.onDidStop((async()=>{if(!n.supportsThreadIdCorrespond)return;const e=Array.from(n.multipleThreadPaused.values());v(e),await R()}))),e.push(n.onDidContinued((async()=>{if(!n.supportsThreadIdCorrespond)return;const e=Array.from(n.multipleThreadPaused.values());v(e)}))),()=>{e.dispose()}}),[]);if((e=>{if(e.threads.some((e=>e.frameCount>0)))return!1;const t=M();return 1===t.length&&!!t[0].compact})(n)){const e=M();return o.default.createElement("div",{className:l.default.debug_stack_item},e.map((e=>o.default.createElement(t.DebugStackSessionView,{key:e.id,viewState:i,session:e,indent:1}))))}return o.default.createElement("div",{className:l.default.debug_stack_item,onContextMenu:e=>m.handleContextMenu(e,n)},A&&o.default.createElement("div",{className:l.default.debug_stack_item_label,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},(I||g.length>0)&&o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:w?(0,a.getIcon)("down"):(0,a.getIcon)("right"),onClick:()=>E(!w)}),o.default.createElement("div",{className:(0,r.default)([(0,a.getIcon)("debug"),l.default.debug_session_icon])})),o.default.createElement("div",{className:l.default.debug_stack_item_label_title},n.label),k&&o.default.createElement(d.DebugStackOperationView,{session:n})),I&&w?y.map((e=>o.default.createElement(c.DebugStackThreadView,{key:e.id,indent:A?16:0,viewState:i,thread:e,session:n}))):null,!I&&(!A||w)&&g.map((e=>o.default.createElement(c.DebugStackThreadView,{key:e.id,indent:A?16:0,viewState:i,thread:e,session:n}))),C.length>0&&C.map((e=>w&&o.default.createElement(t.DebugStackSessionView,{key:e.id,viewState:i,session:e,indent:1}))),n.state!==s.DebugState.Stopped?null:I&&w?T?o.default.createElement("div",{className:l.default.debug_stack_item_loading},o.default.createElement("span",null,"姝e湪鍔犺浇绾跨▼...")):_.map((e=>!n.hasInMultipleThreadPaused(e.raw.id)&&o.default.createElement(c.DebugStackThreadView,{key:e.id,indent:A?16:0,viewState:i,thread:e,session:n}))):void 0)}},93565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackThreadView=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(894),a=n(89329),s=n(48654),c=i.__importDefault(n(74552)),l=n(30867),d=n(16513);t.DebugStackThreadView=e=>{var t;const{thread:n,viewState:i,indent:u,session:p}=e,h=(0,o.useInjectable)(a.IDebugSessionManager),m=(0,o.useInjectable)(d.DebugCallStackService),[g,f]=r.default.useState(!0),_=h.sessions.length>1,b=!!(null===(t=h.currentSession)||void 0===t?void 0:t.supportsThreadIdCorrespond)||(h.sessions.length>1||h.sessions[0].threadCount>1);return r.default.useEffect((()=>{const e=new o.DisposableCollection;return e.push(p.onDidChangeCallStack((()=>{n.stopped&&h.currentThread&&h.currentThread.id===n.id?f(!0):f(!1)}))),()=>{e.dispose()}}),[]),r.default.createElement("div",{className:c.default.debug_stack_item,onContextMenu:e=>m.handleContextMenu(e,n)},b&&r.default.createElement("div",{style:{paddingLeft:`${u}px`},className:c.default.debug_stack_item_label},n.frames.length>0?r.default.createElement("div",{className:g?(0,o.getIcon)("down"):(0,o.getIcon)("right"),onClick:()=>f(!g)}):r.default.createElement("div",{style:{width:14}}),r.default.createElement("div",{className:c.default.debug_threads_item},n.raw.name),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:c.default.debug_threads_operation},r.default.createElement(l.DebugStackOperationView,{thread:n})),r.default.createElement("span",{className:c.default.debug_threads_description},n.stopped&&n.stoppedDetails?n.raw.id===n.stoppedDetails.threadId?`${(0,o.localize)("debug.stack.frame.because")} ${n.stoppedDetails.reason} ${(0,o.localize)("debug.stack.frame.stopped")}`:(0,o.localize)("debug.stack.frame.stopped"):(0,o.localize)("debug.stack.frame.running")))),(!b||g)&&n.frames.length>0&&r.default.createElement(s.DebugStackFramesView,{indent:b?_?38:30:8,viewState:i,thread:n,frames:n.frames,session:p}))}},91643:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(92871),c=n(80098),l=n(34886),d=n(10111);function u(e,t){if((n=t)&&"string"==typeof n.sessionId&&"string"==typeof n.threadId&&"string"==typeof n.frameId){const n=e.getSession(t.sessionId);if(n){const e=[n.currentThread,...n.threads].find((e=>e.id===t.threadId));if(e)return e.frames.find((e=>e.id===t.frameId))}}var n}let p=class{registerCommands(e){e.registerCommand(s.DEBUG_COMMANDS.RESTART_FRAME,{execute:async(e,t)=>{const n=u(this.debugSessionManager,t);n&&await n.restart()}}),e.registerCommand(s.DEBUG_COMMANDS.COPY_STACK_TRACE,{execute:async(e,t)=>{const n=u(this.debugSessionManager,t);if(n){const e=n.thread.frames.map((e=>`${e.raw&&e.raw.name} (${e.raw&&e.raw.source&&e.raw.source.path}:${e.raw&&e.raw.line})`));this.clipboardService.writeText(e.join("\n"))}}})}registerMenus(e){e.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:s.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${c.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${c.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:c.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),e.registerMenuItem(a.MenuId.DebugCallStackContext,{command:{id:s.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:c.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};i.__decorate([(0,r.Autowired)(l.IDebugSessionManager),i.__metadata("design:type",d.DebugSessionManager)],p.prototype,"debugSessionManager",void 0),i.__decorate([(0,r.Autowired)(o.IClipboardService),i.__metadata("design:type",Object)],p.prototype,"clipboardService",void 0),p=i.__decorate([(0,o.Domain)(a.MenuContribution,o.CommandContribution)],p),t.DebugCallStackContribution=p},30867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackOperationView=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(894),a=n(30853),s=n(21680),c=i.__importDefault(n(74552));t.DebugStackOperationView=e=>{const{session:t,thread:n}=e,{doStop:i,doStepIn:l,doStepOut:d,doStepOver:u,doContinue:p,doRestart:h,doPause:m,updateCurrentSession:g}=(0,o.useInjectable)(s.DebugToolbarService);if(t&&!n){const e=e=>{g(t),e()};return r.default.createElement("div",{className:c.default.debug_stack_session_operations},r.default.createElement(a.DebugAction,{run:()=>e(h),icon:"reload",label:(0,o.localize)("debug.action.restart")}),r.default.createElement(a.DebugAction,{run:()=>e(i),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!t&&n){const{stopped:e}=n,t=e=>{n.session.currentThread=n,e()},i=e=>e?r.default.createElement(a.DebugAction,{run:()=>t(p),icon:"continue",label:(0,o.localize)("debug.action.continue")}):r.default.createElement(a.DebugAction,{run:()=>t(m),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return r.default.createElement("div",{className:c.default.debug_stack_thread_operations},i(e),r.default.createElement(a.DebugAction,{run:()=>t(u),enabled:e,icon:"step",label:(0,o.localize)("debug.action.step-over")}),r.default.createElement(a.DebugAction,{run:()=>t(l),enabled:e,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),r.default.createElement(a.DebugAction,{run:()=>t(d),enabled:e,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null}},16513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackService=void 0;const i=n(70655),r=n(39993),o=n(57061),a=n(28965),s=n(80098),c=n(92842),l=n(37930);let d=class{constructor(){this.handleContextMenu=(e,t)=>{this.stackFrameSupportsRestart.reset(),e.stopPropagation(),e.preventDefault(),t instanceof l.DebugSession?this.callStackItemType.set("session"):t instanceof a.DebugThread?this.callStackItemType.set("thread"):t instanceof a.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(t.canRestart)):this.callStackItemType.reset();const{x:n,y:i}=e.nativeEvent,r=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),s=r.getMergedMenuNodes();r.dispose();var c;this.ctxMenuRenderer.show({anchor:{x:n,y:i},menuNodes:s,args:[t instanceof a.DebugStackFrame?(null===(c=t.source)||void 0===c?void 0:c.inMemory)?t.source.raw.path||t.source.reference||t.source.name:t.source?t.source.uri.toString():"":t instanceof a.DebugThread||t instanceof l.DebugSession?t.id:"",t instanceof a.DebugStackFrame?{sessionId:t.session.id,threadId:t.thread.id,frameId:t.id}:t instanceof a.DebugThread?{sessionId:t.session.id,threadId:t.id}:t instanceof l.DebugSession?{sessionId:t.id}:void 0],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=s.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=s.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};i.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),i.__metadata("design:type",o.AbstractContextMenuService)],d.prototype,"contextMenuService",void 0),i.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),i.__metadata("design:type",o.ICtxMenuRenderer)],d.prototype,"ctxMenuRenderer",void 0),i.__decorate([(0,r.Autowired)(c.DebugContextKey),i.__metadata("design:type",c.DebugContextKey)],d.prototype,"debugContextKey",void 0),d=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.DebugCallStackService=d},9670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackView=void 0;const i=n(70655),r=n(32834),o=i.__importDefault(n(616)),a=n(894),s=n(89329),c=n(35786);t.DebugCallStackView=(0,r.observer)((({viewState:e})=>{const t=(0,a.useInjectable)(s.IDebugSessionManager),[n,i]=o.default.useState([]);return o.default.useEffect((()=>{const e=t.onDidStartDebugSession((e=>{n.push(e),i([...n])})),r=t.onDidDestroyDebugSession((e=>{const t=n.findIndex((t=>t.id===e.id));n.splice(t,1),i([...n])}));return()=>{e.dispose(),r.dispose()}}),[]),o.default.createElement("div",{style:{width:e.width}},n.filter((e=>!e.parentSession)).map((t=>o.default.createElement(c.DebugStackSessionView,{key:t.id,viewState:e,session:t,indent:0}))))}))},67199:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(90624);let l=i=class extends a.TreeModel{constructor(e){super(),this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),this.onWillUpdateEmitter=new s.Emitter,this.init(e)}get onWillUpdate(){return this.onWillUpdateEmitter.event}init(e){this.root=e,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,(()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{await this.onWillUpdateEmitter.fireAndAwait(),this.dispatchChange()}))}))}};l.DEFAULT_FLUSH_DELAY=100,l=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[c.ExpressionContainer])],l),t.DebugVariablesModel=l},67118:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModelService=void 0;const r=n(70655),o=r.__importDefault(n(18446)),a=n(39993),s=n(25880),c=n(894),l=n(57061),d=n(90624),u=n(43380),p=n(92842),h=n(67199),m=r.__importDefault(n(78004));class g{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(e){return Array.from(this._keepExpandedScopesMap.keys()).find((t=>(0,o.default)(t,e.getRawScope())))}set(e){const t=e.getRawScope();if(t){const n=this.getMirrorScope(e);if(n){const t=this._keepExpandedScopesMap.get(n);let i;i=e.expanded?Array.from(new Set([...t,e.variablesReference])):t.filter((t=>t!==e.variablesReference)),this._keepExpandedScopesMap.set(n,i)}else this._keepExpandedScopesMap.set(t,e.expanded?[e.variablesReference]:[])}}get(e){const t=this.getMirrorScope(e);return t&&this._keepExpandedScopesMap.get(t)||[]}clear(){this._keepExpandedScopesMap.clear()}}let f=i=class{constructor(){this.selectedDecoration=new s.Decoration(m.default.mod_selected),this.focusedDecoration=new s.Decoration(m.default.mod_focused),this.contextMenuDecoration=new s.Decoration(m.default.mod_actived),this.loadingDecoration=new s.Decoration(m.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new c.Emitter,this.onDidUpdateTreeModelEmitter=new c.Emitter,this.flushDispatchChangeDelayer=new c.ThrottledDelayer(i.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new c.DisposableCollection,this.keepExpandedScopesModel=new g,this.activeNodeDecoration=(e,t=!0)=>{var n;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),e){if(this.selectedNodes.length>0)for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],t&&(null===(n=this.treeModel)||void 0===n||n.dispatchChange())}},this.activeNodeActivedDecoration=e=>{var t;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(e),this._contextMenuNode=e,null===(t=this.treeModel)||void 0===t||t.dispatchChange()},this.enactiveNodeDecoration=()=>{var e;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),null===(e=this.treeModel)||void 0===e||e.dispatchChange()},this.handleContextMenu=(e,t)=>{var n;if(e.stopPropagation(),e.preventDefault(),!t||t instanceof d.DebugScope)return this.enactiveNodeDecoration(),void this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);this._currentVariableInternalContext=t;const{x:i,y:r}=e.nativeEvent;t&&(this.activeNodeActivedDecoration(t),this.debugContextKey.contextDebugProtocolVariableMenu.set(t.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!t.evaluateName)),(null===(n=t.session)||void 0===n?void 0:n.capabilities.supportsReadMemoryRequest)&&void 0!==t.memoryReference?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const o=this.contextMenuService.createMenu({id:l.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),a=o.getMergedMenuNodes();o.dispose(),this.ctxMenuRenderer.show({anchor:{x:i,y:r},menuNodes:a,args:[t.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=e=>{this.activeNodeDecoration(e)},this.handleTwistierClick=(e,t)=>{t===s.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(e,!1),this.toggleDirectory(e)):this.activeNodeDecoration(e)},this.toggleDirectory=async e=>{e.expanded?e.setCollapsed():await e.setExpanded(!0),this.keepExpandedScopesModel.set(e)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange((async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{var e,t;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const n=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=n,await(null===(e=this._activeTreeModel)||void 0===e?void 0:e.root.ensureLoaded());const i=(null===(t=this._activeTreeModel)||void 0===t?void 0:t.root.children)||[];if(i.length>0&&i.every((e=>!e.expanded)))for(const e of i)!1!==e.getRawScope().expensive||e.expanded||await this.toggleDirectory(e);const r=async e=>{for(const t of e){this.keepExpandedScopesModel.get(t).includes(t.variablesReference)&&(await t.setExpanded(!0),Array.isArray(t.children)&&await r(t.children))}};i.forEach((async e=>{Array.isArray(e.children)&&await r(e.children)}))}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)}))}))}listenTreeViewChange(){var e,t;this.dispose(),this.disposableCollection.push(null===(e=this.treeModel)||void 0===e?void 0:e.root.watcher.on(s.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.disposableCollection.push(null===(t=this.treeModel)||void 0===t?void 0:t.root.watcher.on(s.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.disposableCollection.push(this.treeModel.onWillUpdate((()=>{var e;if(0!==this.selectedNodes.length){const t=null===(e=this.treeModel)||void 0===e?void 0:e.root.getTreeNodeByPath(this.selectedNodes[0].path);this.selectedDecoration.addTarget(t)}})))}async initTreeModel(e){const t=new d.DebugVariableRoot(e);if(t)return this._activeTreeModel=this.injector.get(h.DebugVariablesModel,[t]),this.initDecorations(t),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(e){this._decorations=new s.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(e){this._debugVariablesTreeHandle=Object.assign(Object.assign({},e),{getModel:()=>this.treeModel})}async copyEvaluateName(e){e&&await this.clipboardService.writeText(e.evaluateName)}async copyValue(e){if(!e)return;const t=await(async()=>{if(!e.session||!e.session.capabilities.supportsValueFormattingOptions)return e.value;try{const{variable:{evaluateName:t}}=e;if(t){const n=await e.session.evaluate(t,"clipboard");if(n)return n.result}return""}catch(e){return""}})();t&&await this.clipboardService.writeText(t)}};f.DEFAULT_TRIGGER_DELAY=200,r.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),r.__metadata("design:type",a.Injector)],f.prototype,"injector",void 0),r.__decorate([(0,a.Autowired)(l.ICtxMenuRenderer),r.__metadata("design:type",l.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,a.Autowired)(l.AbstractContextMenuService),r.__metadata("design:type",l.AbstractContextMenuService)],f.prototype,"contextMenuService",void 0),r.__decorate([(0,a.Autowired)(u.DebugViewModel),r.__metadata("design:type",u.DebugViewModel)],f.prototype,"viewModel",void 0),r.__decorate([(0,a.Autowired)(c.IClipboardService),r.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),r.__decorate([(0,a.Autowired)(p.DebugContextKey),r.__metadata("design:type",p.DebugContextKey)],f.prototype,"debugContextKey",void 0),f=i=r.__decorate([(0,a.Injectable)(),r.__metadata("design:paramtypes",[])],f),t.DebugVariablesModelService=f},80089:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariablesPanelContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(90642),c=n(70888),l=n(33361),d=n(64747),u=n(1500),p=n(76101),h=n(77025),m=n(89329),g=n(92871),f=n(60193),_=n(43380),b=n(80098),y=n(36563),v=n(67118);let C=class{registerCommands(e){e.registerCommand(g.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var e;this.reporterService.point(null===m.DEBUG_REPORT_NAME||void 0===m.DEBUG_REPORT_NAME?void 0:m.DEBUG_REPORT_NAME.DEBUG_VARIABLES,g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:t}=this.debugVariablesModelService;if(!t)return;const n=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:t.description.replace(/^\"(.*)\"$/,"$1")});if(null!=n){try{await t.setValue(n)}catch(e){this.messageService.error(e.message)}null===(e=this.debugVariablesModelService.treeModel)||void 0===e||e.dispatchChange()}}}),e.registerCommand(g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:e}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(e)}}),e.registerCommand(g.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:e}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(e)}}),e.registerCommand(g.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async e=>{const{currentVariableInternalContext:t}=this.debugVariablesModelService;if(e instanceof s.URI){const e=this.workbenchEditorService.currentEditor;if(!(null==e?void 0:e.monacoEditor))return;if(!(null==e?void 0:e.monacoEditor.hasModel()))return;const t=e.monacoEditor,n=t.getModel().getValueInRange(t.getSelection());this.debugWatchModelService.addWatchExpression(n)}else t&&this.debugWatchModelService.addWatchExpression(t.evaluateName)}});const t=`${s.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;e.registerCommand(g.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async e=>{var n;const i=await this.commandService.executeCommand("extension.getDescription","ms-vscode.hexeditor");if(i&&i.enabled){const i=null===(n=this.viewModel.currentSession)||void 0===n?void 0:n.id,r=e.memoryReference;this.workbenchEditorService.open(s.URI.from({scheme:b.DEBUG_MEMORY_SCHEME,authority:i,path:"/"+encodeURIComponent(r||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:"component",componentId:t}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(b.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(e){e.registerResourceProvider({scheme:b.DEBUG_MEMORY_SCHEME,provideResource:async e=>({uri:e,icon:(0,o.getIcon)("hex"),name:e.displayName})})}registerMenus(e){var t;e.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:b.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),e.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),e.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:b.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),e.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:b.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),e.registerMenuItem(a.MenuId.EditorContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:null===(t=h.ContextKeyExpr.and(p.EditorContextKeys.hasNonEmptySelection,p.EditorContextKeys.editorTextFocus))||void 0===t?void 0:t.keys().reduce(((e,t)=>e+" && "+t),b.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),e.registerMenuItem(a.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${b.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${b.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};i.__decorate([(0,r.Autowired)(o.IQuickInputService),i.__metadata("design:type",Object)],C.prototype,"quickInputService",void 0),i.__decorate([(0,r.Autowired)(v.DebugVariablesModelService),i.__metadata("design:type",v.DebugVariablesModelService)],C.prototype,"debugVariablesModelService",void 0),i.__decorate([(0,r.Autowired)(y.DebugWatchModelService),i.__metadata("design:type",y.DebugWatchModelService)],C.prototype,"debugWatchModelService",void 0),i.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),i.__metadata("design:type",c.WorkbenchEditorService)],C.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(u.IMessageService),i.__metadata("design:type",Object)],C.prototype,"messageService",void 0),i.__decorate([(0,r.Autowired)(o.IReporterService),i.__metadata("design:type",Object)],C.prototype,"reporterService",void 0),i.__decorate([(0,r.Autowired)(s.CommandService),i.__metadata("design:type",Object)],C.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(_.DebugViewModel),i.__metadata("design:type",_.DebugViewModel)],C.prototype,"viewModel",void 0),i.__decorate([(0,r.Autowired)(l.IFileServiceClient),i.__metadata("design:type",d.FileServiceClient)],C.prototype,"fileSystem",void 0),i.__decorate([(0,r.Autowired)(f.DebugMemoryFileSystemProvider),i.__metadata("design:type",f.DebugMemoryFileSystemProvider)],C.prototype,"debugMemoryFileSystemProvider",void 0),C=i.__decorate([(0,o.Domain)(o.ClientAppContribution,c.BrowserEditorContribution,a.MenuContribution,o.CommandContribution)],C),t.VariablesPanelContribution=C},20287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=t.DebugVariableRenderedNode=t.DebugVariableView=t.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(25880),l=n(894),d=n(90624),u=n(67118),p=i.__importDefault(n(78004));t.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD",t.DebugVariableView=(0,o.observer)((({viewState:e})=>{const{width:n,height:i}=e,r=a.default.createRef(),[o,c]=a.default.useState(),d=(0,l.useInjectable)(u.DebugVariablesModelService);a.default.useEffect((()=>{const e=d.onDidUpdateTreeModel((async e=>{c(e)}));return()=>{e.dispose(),d.removeNodeDecoration(),c(void 0)}}),[]);const h=e=>{d.handleTreeHandler(Object.assign(Object.assign({},e),{hasDirectFocus:()=>r.current===document.activeElement}))},m=(e,t,n)=>{e.stopPropagation();const{handleTwistierClick:i}=d;t&&i(t,n)},g=(e,t)=>{const{handleContextMenu:n}=d;n(e,t)},f=a.default.useCallback((e=>{const n=d.decorations.getDecorations(e.item);return a.default.createElement(t.DebugVariableRenderedNode,{item:e.item,itemType:e.itemType,decorations:n,onClick:m,onTwistierClick:m,onContextMenu:g,defaultLeftPadding:0,leftPadding:8})}),[o]);return a.default.createElement("div",{className:p.default.debug_variables_container,tabIndex:-1,ref:r,onContextMenu:e=>{const{handleContextMenu:t}=d;t(e)},onClick:e=>{const{enactiveNodeDecoration:t}=d;t()},onBlur:e=>{const{enactiveNodeDecoration:t}=d;t()},"data-name":t.DEBUG_VARIABLE_TREE_FIELD_NAME},o?a.default.createElement(s.RecycleTree,{height:i,width:n,itemHeight:22,onReady:h,model:o,placeholder:()=>a.default.createElement("span",null),overflow:"auto"},f):a.default.createElement("span",null))}));t.DebugVariableRenderedNode=({item:e,decorations:n,defaultLeftPadding:i,leftPadding:o,onClick:u,onTwistierClick:h,onContextMenu:m,itemType:g})=>{const f=`${(i||8)+(e.depth||0)*(o||0)+(d.ExpressionContainer.is(e)?0:16)}px`,_={height:t.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:f},b=()=>a.default.createElement("div",{className:p.default.debug_variables_node_status},e.badge);return a.default.createElement("div",{key:e.id,onClick:t=>{u(t,e,s.CompositeTreeNode.is(e)?s.TreeNodeType.CompositeTreeNode:s.TreeNodeType.TreeNode)},onContextMenu:t=>{0!==t.nativeEvent.which&&(g!==s.TreeNodeType.TreeNode&&g!==s.TreeNodeType.CompositeTreeNode||m&&m(t,e,g))},title:e.description||"",className:(0,r.default)(p.default.debug_variables_node,n?n.classlist:null),style:_,"data-id":e.id},a.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_content)},(e=>{if(s.CompositeTreeNode.is(e))return t=e,i=h,n&&(null==n?void 0:n.classlist.indexOf(p.default.mod_loading))>-1?a.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.expansion_toggle)},a.default.createElement(c.Loading,null)):a.default.createElement("div",{onClick:e=>{i(e,t,g)},className:(0,r.default)(p.default.debug_variables_node_segment,p.default.expansion_toggle,(0,l.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!t.expanded})});var t,i})(e),a.default.createElement("div",{className:p.default.debug_variables_node_overflow_wrap},(y=e,a.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_display_name,p.default.debug_variables_variable,y.description?p.default.name:"")},y.displayName,y.description?":":"")),(t=>{const n=t.description?t.description.replace("function","茠 "):"",i=[p.default.debug_variables_variable];return"number"===e.variableType||"boolean"===e.variableType||"string"===e.variableType?i.push(p.default[e.variableType]):isNaN(+n)?/^true|false$/i.test(n)?i.push(p.default.boolean):/^(['"]).*\1$/.test(n)&&i.push(p.default.string):i.push(p.default.number),a.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment_grow,p.default.debug_variables_node_description,...i)},n)})(e)),a.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_tail)},b())));var y},t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},96913:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(90624);let l=i=class extends a.TreeModel{constructor(e){super(),this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),this.onWillUpdateEmitter=new s.Emitter,this.init(e)}get onWillUpdate(){return this.onWillUpdateEmitter.event}init(e){this.root=e,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,(()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{await this.onWillUpdateEmitter.fireAndAwait(),this.dispatchChange()}))}))}};l.DEFAULT_FLUSH_DELAY=100,l=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[c.ExpressionContainer])],l),t.DebugWatchModel=l},36563:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModelService=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(57061),l=n(10111),d=n(28965),u=n(90624),p=n(43380),h=n(80098),m=n(34886),g=n(90624),f=n(96913),_=r.__importDefault(n(46478)),{Path:b}=s.path;let y=i=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new a.Decoration(_.default.mod_selected),this.focusedDecoration=new a.Decoration(_.default.mod_focused),this.contextMenuDecoration=new a.Decoration(_.default.mod_actived),this.loadingDecoration=new a.Decoration(_.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new s.Emitter,this.onDidUpdateTreeModelEmitter=new s.Emitter,this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new s.DisposableCollection,this.loadedDeferred=new s.Deferred,this.activeNodeDecoration=(e,t=!0)=>{var n;if(h.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),e){if(this.selectedNodes.length>0)for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],t&&(null===(n=this.treeModel)||void 0===n||n.dispatchChange())}},this.activeNodeActivedDecoration=e=>{var t;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(e),this._contextMenuNode=e,null===(t=this.treeModel)||void 0===t||t.dispatchChange()},this.enactiveNodeDecoration=()=>{var e;h.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),null===(e=this.treeModel)||void 0===e||e.dispatchChange()},this.handleContextMenu=(e,t)=>{var n;e.stopPropagation(),e.preventDefault();const{x:i,y:r}=e.nativeEvent;let o;t?this.activeNodeActivedDecoration(t):this.enactiveNodeDecoration(),o=t||(null===(n=this.treeModel)||void 0===n?void 0:n.root),this.watchItemType.set(o instanceof u.DebugWatchNode?"expression":o instanceof g.DebugVariable||o instanceof g.DebugVariableContainer?"variable":void 0);const a=this.contextMenuService.createMenu({id:c.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),s=a.getMergedMenuNodes();a.dispose(),this.ctxMenuRenderer.show({anchor:{x:i,y:r},menuNodes:s,args:[o]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=e=>{this.activeNodeDecoration(e)},this.handleTwistierClick=(e,t)=>{if(t===a.TreeNodeType.CompositeTreeNode){if(u.DebugWatchNode.is(e)&&e.available)return this.activeNodeDecoration(e,!1),void this.toggleDirectory(e);if(e.variablesReference)return this.activeNodeDecoration(e,!1),void this.toggleDirectory(e)}this.activeNodeDecoration(e)},this.toggleDirectory=async e=>{e.expanded?this.treeHandle.collapseNode(e):this.treeHandle.expandNode(e)},this.proxyPrompt=e=>{let t=!1;const n=async n=>{if(!t){if(t=!0,n)if(e instanceof a.NewPromptHandle){const t=e.parent;if(e.addAddonAfter("loading_indicator"),t.session)this.addWatchExpression(n);else{const e=new u.DebugWatchNode(t.session,n,t);this.dispatchWatchEvent(t.path,{type:a.WatchEvent.Added,node:e,id:t.id}),this.debugWatch.addWatchExpression(n)}}else if(e instanceof a.RenamePromptHandle){const t=e.target,i=t.parent;if(e.addAddonAfter("loading_indicator"),i.session)this.debugWatch.renameWatchExpression(t.name,n),this.initTreeModel();else{const e=new b(t.path).dir.join(n).toString();this.dispatchWatchEvent(i.path,{type:a.WatchEvent.Moved,oldPath:t.path,newPath:e}),this.debugWatch.renameWatchExpression(t.name,n)}}return!0}};e.destroyed||(e.onCommit(n),e.onBlur(n))},this.flushEventQueue=()=>{let e;if(!this._changeEventDispatchQueue||0===this._changeEventDispatchQueue.length)return;this._changeEventDispatchQueue.sort(((e,t)=>b.pathDepth(e)-b.pathDepth(t)));const t=[this._changeEventDispatchQueue[0]];for(const e of this._changeEventDispatchQueue)t.some((t=>0===e.indexOf(t)))||t.push(e);return e=(0,s.pSeries)(t.map((e=>async()=>{var t,n;const i=null===(n=null===(t=this.treeModel)||void 0===t?void 0:t.root)||void 0===n?void 0:n.watchEvents.get(e);return i&&"function"==typeof i.callback&&await i.callback({type:a.WatchEvent.Changed,path:e}),null}))),this._changeEventDispatchQueue=[],e},this.debugWatch=new d.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=h.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(e=[]){const t=await this.storageProvider(s.STORAGE_NAMESPACE.DEBUG);await t.set(i.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,e)}async load(){const e=await this.storageProvider(s.STORAGE_NAMESPACE.DEBUG),t=await e.get(i.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(t),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange((async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{this.initTreeModel()}))})),this.debugWatch.onDidVariableChange((async()=>{this.refresh()})),this.debugWatch.onDidExpressionChange((e=>{this.save(e)}))}listenTreeViewChange(){var e,t;this.dispose(),this.disposableCollection.push(null===(e=this.treeModel)||void 0===e?void 0:e.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.disposableCollection.push(null===(t=this.treeModel)||void 0===t?void 0:t.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.disposableCollection.push(this.treeModel.onWillUpdate((()=>{var e;if(0!==this.selectedNodes.length){const t=null===(e=this.treeModel)||void 0===e?void 0:e.root.getTreeNodeByPath(this.selectedNodes[0].path);this.selectedDecoration.addTarget(t)}})))}async initTreeModel(){const e=await this.debugWatch.getRoot();if(e)return this._activeTreeModel=this.injector.get(f.DebugWatchModel,[e]),this.initDecorations(e),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(e){this._decorations=new a.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(e){this._debugWatchTreeHandle=e}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(e){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(e))}removeDebugWatchNode(e){this.debugWatch.removeWatchExpression(e.name),e.session?this.initTreeModel():this.dispatchWatchEvent(e.parent.path,{type:a.WatchEvent.Removed,path:e.path})}async copyValue(e){const t=await e.getClipboardValue();t&&await this.clipboardService.writeText(t)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(e){this.debugWatch.addWatchExpression(e),this.initTreeModel()}dispatchWatchEvent(e,t){var n;const i=null===(n=this.treeModel)||void 0===n?void 0:n.root.watchEvents.get(e);i&&i.callback&&i.callback(t)}collapsedAll(){var e;null===(e=this.treeModel)||void 0===e||e.root.collapsedAll()}async refresh(e){if(!e){if(!this.treeModel)return;e=this.treeModel.root}!u.ExpressionContainer.is(e)&&e.parent&&(e=e.parent),this.queueChangeEvent(e.path,(()=>{this.onDidRefreshedEmitter.fire()}))}queueChangeEvent(e,t){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new s.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout((async()=>{var e;await this.flushEventQueue(),null===(e=this.flushEventQueueDeferred)||void 0===e||e.resolve(),this.flushEventQueueDeferred=null,t()}),i.DEFAULT_REFRESH_DELAY)),-1===this._changeEventDispatchQueue.indexOf(e)&&this._changeEventDispatchQueue.push(e)}};y.DEFAULT_REFRESH_DELAY=100,y.DEFAULT_TRIGGER_DELAY=200,y.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(c.ICtxMenuRenderer),r.__metadata("design:type",c.ICtxMenuRenderer)],y.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(c.AbstractContextMenuService),r.__metadata("design:type",c.AbstractContextMenuService)],y.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(p.DebugViewModel),r.__metadata("design:type",p.DebugViewModel)],y.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(m.IDebugSessionManager),r.__metadata("design:type",l.DebugSessionManager)],y.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(s.IReporterService),r.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],y.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(s.StorageProvider),r.__metadata("design:type",Function)],y.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(s.IClipboardService),r.__metadata("design:type",Object)],y.prototype,"clipboardService",void 0),y=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],y),t.DebugWatchModelService=y},86989:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchPanelContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(57061),c=n(89329),l=n(92871),d=n(90624),u=n(80098),p=n(36563);let h=class{registerCommands(e){e.registerCommand(l.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),e.registerCommand(l.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),e.registerCommand(l.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),e.registerCommand(l.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:e=>{e instanceof d.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(e);const[t]=this.debugWatchModelService.selectedNodes;t instanceof d.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(t)}}),e.registerCommand(l.DEBUG_COMMANDS.EDIT_WATCHER,{execute:e=>{this.debugWatchModelService.renameDebugWatchNodePrompt(e)}}),e.registerCommand(l.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:e=>{this.debugWatchModelService.copyValue(e)}})}registerToolbarItems(e){e.registerItem({id:l.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:l.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,viewId:c.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),e.registerItem({id:l.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,command:l.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:c.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:u.CONTEXT_IN_DEBUG_MODE.raw}),e.registerItem({id:l.DEBUG_COMMANDS.ADD_WATCHER.id,command:l.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:c.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:u.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(e){e.registerMenuItem(s.MenuId.DebugWatchContext,{command:{id:l.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),e.registerMenuItem(s.MenuId.DebugWatchContext,{command:{id:l.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:u.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),e.registerMenuItem(s.MenuId.DebugWatchContext,{command:{id:l.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${u.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${u.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${u.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:u.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),e.registerMenuItem(s.MenuId.DebugWatchContext,{command:{id:l.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:u.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),e.registerMenuItem(s.MenuId.DebugWatchContext,{command:{id:l.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(e){e.registerKeybinding({command:l.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:u.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};i.__decorate([(0,r.Autowired)(p.DebugWatchModelService),i.__metadata("design:type",p.DebugWatchModelService)],h.prototype,"debugWatchModelService",void 0),h=i.__decorate([(0,o.Domain)(o.ClientAppContribution,a.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],h),t.WatchPanelContribution=h},35176:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_WATCH_TREE_NODE_HEIGHT=t.DebugWatchRenderedNode=t.DebugWatchView=t.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=n(25880),c=n(25880),l=n(894),d=n(90624),u=n(36563),p=i.__importDefault(n(46478));t.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD",t.DebugWatchView=(0,o.observer)((({viewState:e})=>{const{height:n}=e,i=a.default.createRef(),[r,o]=a.default.useState(),c=(0,l.useInjectable)(u.DebugWatchModelService);a.default.useEffect((()=>d()),[]);const d=()=>{const e=c.treeModel;let t=!0;const n=new l.DisposableCollection;return n.push(l.Disposable.create((()=>{t=!1}))),e&&e.root.ensureLoaded().then((()=>{t&&o(e)})),n.push(c.onDidUpdateTreeModel((async e=>{e&&await e.root.ensureLoaded(),t&&o(e)}))),()=>{c.removeNodeDecoration(),n.dispose()}},h=e=>{c.handleTreeHandler(Object.assign(Object.assign({},e),{getModel:()=>r,hasDirectFocus:()=>i.current===document.activeElement}))},m=(e,t,n)=>{e.stopPropagation();const{handleTwistierClick:i}=c;t&&i(t,n)},g=(e,t)=>{const{handleContextMenu:n}=c;n(e,t)},f=a.default.useCallback((e=>{const n=c.decorations.getDecorations(e.item);return a.default.createElement(t.DebugWatchRenderedNode,{item:e.item,itemType:e.itemType,decorations:n,onClick:m,onTwistierClick:m,onContextMenu:g,defaultLeftPadding:12,leftPadding:8})}),[r]);return a.default.createElement("div",{className:p.default.debug_watch_container,tabIndex:-1,ref:i,onContextMenu:e=>{const{handleContextMenu:t}=c;t(e)},onClick:e=>{const{enactiveNodeDecoration:t}=c;t()},onBlur:e=>{const{enactiveNodeDecoration:t}=c;t()},"data-name":t.DEBUG_WATCH_TREE_FIELD_NAME},r?a.default.createElement(s.RecycleTree,{height:n,itemHeight:22,onReady:h,model:r,placeholder:()=>a.default.createElement("span",null)},f):a.default.createElement("span",null))}));t.DebugWatchRenderedNode=({item:e,decorations:n,defaultLeftPadding:i,leftPadding:o,onClick:u,onTwistierClick:h,onContextMenu:m,itemType:g})=>{const f=g===s.TreeNodeType.RenamePrompt,_=g===s.TreeNodeType.NewPrompt,b=f||_,y={height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(i||8)+(e.depth||0)*(o||0)}px`},v=()=>a.default.createElement("div",{className:p.default.debug_watch_node_status},e.badge),C=(e,t)=>n&&(null==n?void 0:n.classlist.indexOf(p.default.mod_loading))>-1?a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.expansion_toggle)},a.default.createElement(c.Loading,null)):a.default.createElement("div",{onClick:n=>{t(n,e,g)},className:(0,r.default)(p.default.debug_watch_node_segment,p.default.expansion_toggle,(0,l.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!e.expanded})});return a.default.createElement("div",{key:e.id,onClick:t=>{const n=e.getRawWatch();n&&u(t,e,n.variablesReference>0?s.TreeNodeType.CompositeTreeNode:s.TreeNodeType.TreeNode)},onContextMenu:t=>{0!==t.nativeEvent.which&&(g!==s.TreeNodeType.TreeNode&&g!==s.TreeNodeType.CompositeTreeNode||m&&m(t,e,g))},title:e.tooltip,className:(0,r.default)(p.default.debug_watch_node,n?n.classlist:null),style:y,"data-id":e.id},a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_content)},(e=>{if(d.DebugWatchNode.is(e)){if(e.available&&e.variablesReference)return C(e,h)}else if(d.ExpressionContainer.is(e)&&e.variablesReference)return C(e,h)})(e),a.default.createElement("div",{style:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT},className:b?p.default.debug_watch_node_prompt_wrap:p.default.debug_watch_node_overflow_wrap},(S=e,b&&S instanceof s.PromptHandle?a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_inputbox)},a.default.createElement("div",{className:(0,r.default)("input-box",p.default.debug_watch_node_prompt_box)},a.default.createElement(S.ProxiedInput,{wrapperStyle:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_display_name,p.default.debug_watch_variable,S.description?p.default.name:"")},S.name,S.description?":":"")),(t=>{const n=t.description?t.description.replace("function","茠 "):"",i=[p.default.debug_watch_variable];return b?null:("number"===e.variableType||"boolean"===e.variableType||"string"===e.variableType?i.push(p.default[e.variableType]):isNaN(+n)?/^true|false$/i.test(n)?i.push(p.default.boolean):/^(['"]).*\1$/.test(n)&&i.push(p.default.string):i.push(p.default.number),a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment_grow,p.default.debug_watch_node_description,...i)},n))})(e)),a.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_tail)},v())));var S},t.DEBUG_WATCH_TREE_NODE_HEIGHT=22},80098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=t.CONTEXT_BREAKPOINT_ACCESS_TYPE=t.CONTEXT_BREAKPOINT_ITEM_TYPE=t.CONTEXT_WATCH_ITEM_TYPE=t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=t.CONTEXT_CALLSTACK_ITEM_STOPPED=t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_EXIST=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_CONSOLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.CONTEXT_DEBUG_TYPE_KEY=t.CONTEXT_IN_DEBUG_MODE_KEY=t.CONTEXT_DEBUG_STOPPED_KEY=t.DEBUG_SCHEME=t.DEBUG_FLOATING_CLICK_WIDGET=t.DEBUG_STACK_ID=t.DEBUG_WELCOME_ID=t.DEBUG_BREAKPOINTS_ID=t.DEBUG_VARIABLES_ID=t.DEBUG_THREAD_ID=t.DEBUG_WATCH_ID=t.DEBUG_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.DEBUG_MEMORY_SCHEME=void 0,t.CONTEXT_CAN_VIEW_MEMORY=t.CONTEXT_MULTI_SESSION_DEBUG=t.CONTEXT_MULTI_SESSION_REPL=t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=void 0;const i=n(48794);t.DEBUG_MEMORY_SCHEME="vscode-debug-memory",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console-container",t.DEBUG_CONTAINER_ID="debug",t.DEBUG_WATCH_ID="debug-watch",t.DEBUG_THREAD_ID="debug-thread",t.DEBUG_VARIABLES_ID="debug-variable",t.DEBUG_BREAKPOINTS_ID="debug-breakpoints",t.DEBUG_WELCOME_ID="debug-welcome",t.DEBUG_STACK_ID="debug-stack",t.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",t.DEBUG_SCHEME="debug",t.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",t.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",t.CONTEXT_DEBUG_TYPE_KEY="debugType",t.CONTEXT_DEBUG_TYPE=new i.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new i.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new i.RawContextKey("debugState","Inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new i.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new i.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new i.RawContextKey("inDebugRepl",!1),t.CONTEXT_IN_DEBUG_CONSOLE=new i.RawContextKey("inDebugConsole",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new i.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new i.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new i.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new i.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_EXIST=new i.RawContextKey("watchExpressionsExist",!1),t.CONTEXT_VARIABLES_FOCUSED=new i.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new i.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new i.RawContextKey("breakpointInputFocused",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new i.RawContextKey("callStackItemType",void 0),t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new i.RawContextKey("callStackSessionIsAttach",!1),t.CONTEXT_CALLSTACK_ITEM_STOPPED=new i.RawContextKey("callStackItemStopped",!1),t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new i.RawContextKey("callStackSessionHasOneThread",!1),t.CONTEXT_WATCH_ITEM_TYPE=new i.RawContextKey("watchItemType",void 0),t.CONTEXT_BREAKPOINT_ITEM_TYPE=new i.RawContextKey("breakpointItemType",void 0),t.CONTEXT_BREAKPOINT_ACCESS_TYPE=new i.RawContextKey("breakpointAccessType",void 0),t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new i.RawContextKey("breakpointSupportsCondition",!1),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new i.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new i.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new i.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new i.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new i.RawContextKey("restartFrameSupported",!1),t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new i.RawContextKey("stackFrameSupportsRestart",!1),t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new i.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new i.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new i.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new i.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new i.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new i.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new i.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new i.RawContextKey("breakWhenValueIsAccessedSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new i.RawContextKey("breakWhenValueIsReadSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new i.RawContextKey("variableEvaluateNamePresent",!1),t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new i.RawContextKey("exceptionWidgetVisible",!1),t.CONTEXT_MULTI_SESSION_REPL=new i.RawContextKey("multiSessionRepl",!1),t.CONTEXT_MULTI_SESSION_DEBUG=new i.RawContextKey("multiSessionDebug",!1),t.CONTEXT_CAN_VIEW_MEMORY=new i.RawContextKey("canViewMemory",void 0)},35072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13620:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=t.DEFAULT_CONFIGURATION_NAME_SEPARATOR=t.DEFAULT_NO_CONFIGURATION_KEY=t.DEFAULT_ADD_CONFIGURATION_KEY=t.DebugConfiguration=void 0,function(e){e.is=function(e){return!!e&&"object"==typeof e&&"type"in e&&"name"in e&&"request"in e}}(t.DebugConfiguration||(t.DebugConfiguration={})),t.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",t.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",t.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__"},4491:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditor=void 0,t.DebugEditor=Symbol("DebugEditor")},76809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10825:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryRegion=t.IDebugModel=t.DebugModelFactory=t.DebugAdapterContribution=t.DebugAdapterFactory=t.DebugAdapterSessionFactory=t.DebugAdapterSession=void 0;const i=n(90642);t.DebugAdapterSession=Symbol("DebugAdapterSession"),t.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),t.DebugAdapterFactory=Symbol("DebugAdapterFactory"),t.DebugAdapterContribution=Symbol("DebugAdapterContribution"),t.DebugModelFactory=Symbol("DebugModelFactory"),t.IDebugModel=Symbol("IDebugModel");class r extends i.Disposable{constructor(e,t){super(),this.memoryReference=e,this.session=t,this.invalidateEmitter=this.registerDispose(new i.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(t.onDidInvalidateMemory((t=>{t.body.memoryReference===e&&this.invalidate(t.body.offset,t.body.count-t.body.offset)})))}async read(e,t){var n;const r=t-e,o=e,a=await this.session.readMemory(this.memoryReference,o,r);if(void 0===a||!(null===(n=a.body)||void 0===n?void 0:n.data))return[{type:1,offset:o,length:r}];let s;try{s=(0,i.decodeBase64)(a.body.data)}catch(e){return[{type:2,offset:o,length:r,error:"Invalid base64 data from debug adapter"}]}const c=a.body.unreadableBytes||0,l=r-c;if(s.byteLengthl&&(s=s.slice(0,l));return c?[{type:0,offset:o,length:l,data:s},{type:1,offset:o+l,length:c}]:[{type:0,offset:o,length:r,data:s}]}async write(e,t){var n,r;const o=await this.session.writeMemory(this.memoryReference,e,(0,i.encodeBase64)(t),!0),a=null!==(r=null===(n=null==o?void 0:o.body)||void 0===n?void 0:n.bytesWritten)&&void 0!==r?r:t.byteLength;return this.invalidate(e,e+a),a}dispose(){super.dispose()}invalidate(e,t){this.invalidateEmitter.fire({fromOffset:e,toOffset:t})}}t.MemoryRegion=r},750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugProgress=void 0,t.IDebugProgress=Symbol("DebugProgress")},13907:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSchemaUri=void 0,t.launchSchemaUri="vscode://schemas/launch"},12490:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugError=t.IDebugService=t.IDebugServer=t.DebugAdapterPath=void 0;const i=n(90642);t.DebugAdapterPath="DebugAdaptor",t.IDebugServer=Symbol("DebugServer"),t.IDebugService=Symbol("DebugService"),function(e){e.NotFound=i.ApplicationError.declare(-41e3,(e=>({message:`'${e}' debugger type is not supported.`,data:{type:e}})))}(t.DebugError||(t.DebugError={}))},59730:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionDTO=void 0,function(e){e.is=function(e){return"id"in e}}(t.IDebugSessionDTO||(t.IDebugSessionDTO={}))},34886:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSequenceId=t.IDebugSessionManager=t.IDebugSession=t.DebugState=void 0,function(e){e[e.Inactive=0]="Inactive",e[e.Initializing=1]="Initializing",e[e.Running=2]="Running",e[e.Stopped=3]="Stopped"}(t.DebugState||(t.DebugState={})),t.IDebugSession=Symbol("DebugSession"),t.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;t.getSequenceId=function(){return n++}},89329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(13620),t),i.__exportStar(n(12490),t),i.__exportStar(n(76809),t),i.__exportStar(n(35072),t),i.__exportStar(n(10825),t),i.__exportStar(n(34886),t),i.__exportStar(n(59730),t),i.__exportStar(n(4491),t),i.__exportStar(n(750),t),i.__exportStar(n(13907),t),i.__exportStar(n(69609),t),i.__exportStar(n(82462),t),i.__exportStar(n(80098),t)},69609:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},82462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_REPORT_NAME=void 0,function(e){e.DEBUG_SESSION_START_TIME="debugSessionStartTime",e.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",e.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",e.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",e.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",e.DEBUG_WATCH="debugWatch",e.DEBUG_VARIABLES="debugVariables",e.DEBUG_BREAKPOINT="debugBreakpoint",e.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",e.DEBUG_STOPPED="debugStopped",e.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"}(t.DEBUG_REPORT_NAME||(t.DEBUG_REPORT_NAME={}))},35392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(89329),t)},60368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDecorationsService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(90642),s=n(90642),{isFalsyOrWhitespace:c}=a.strings,{asArray:l}=a.arrays;class d{constructor(){this._data=s.TernarySearchTree.forPaths()}affectsResource(e){return this._data.get(e.toString())||void 0!==this._data.findSuperstr(e.toString())}static debouncer(e,t){if(e||(e=new d),Array.isArray(t))for(const n of t)e._data.set(n.toString(),!0);else e._data.set(t.toString(),!0);return e}}class u{constructor(e,t){this.source=e,this.thenable=t}}class p{constructor(e,t,n){this._provider=e,this._uriEmitter=t,this._flushEmitter=n,this.data=s.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange((e=>{if(e)for(const t of e)this._fetchData(t);else this.data.clear(),this._flushEmitter.fire({affectsResource:()=>!0})}))}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(e){return Boolean(this.data.get(e.toString()))||Boolean(this.data.findSuperstr(e.toString()))}getOrRetrieve(e,t,n){const i=e.toString();let r=this.data.get(i);if(void 0===r&&(r=this._fetchData(e)),!r||r instanceof u||n(r,!1),t){const e=this.data.findSuperstr(i);if(e)for(let t=e.next();!t.done;t=e.next())!t.value||t.value instanceof u||n(t.value,!0)}}_fetchData(e){const t=this.data.get(e.toString());t instanceof u&&(t.source.cancel(),this.data.delete(e.toString()));const n=new o.CancellationTokenSource,i=this._provider.provideDecorations(e,n.token);if((0,o.isThenable)(i)){const t=new u(n,Promise.resolve(i).then((n=>{this.data.get(e.toString())===t&&this._keepItem(e,n)})).catch((n=>{(0,s.isPromiseCanceledError)(n)||this.data.get(e.toString())!==t||this.data.delete(e.toString())})));return this.data.set(e.toString(),t),null}return this._keepItem(e,i)}_keepItem(e,t){const n=t||null,i=this.data.set(e.toString(),n);return(n||i)&&this._uriEmitter.fire(e),n}}function h(e){return l(e).map((({color:e,letter:t})=>`${e}/${t}`)).join(",")}let m=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,a.getDebugLogger)(),this._data=new s.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,d.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(e){this.logger.log("DecorationService#registerDecorationsProvider",e);const t=new p(e,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),n=this._data.push(t);return this._onDidChangeDecorations.fire({affectsResource:()=>!0}),(0,o.toDisposable)((()=>{n(),this._onDidChangeDecorations.fire({affectsResource:e=>t.knowsAbout(e)}),t.dispose()}))}getDecoration(e,t){const n=[];let i=!1;for(let r=this._data.iterator(),o=r.next();!o.done;o=r.next())o.value.getOrRetrieve(e,t,((e,t)=>{t&&!e.bubble||(n.push(e),i=t||i)}));if(0!==n.length){return this.asDecoration(n,i)}}asDecoration(e,t){e.sort(((e,t)=>(t.weight||0)-(e.weight||0)));const n=function(e){const t=l(e);if(t.length)return{key:h(e),color:t[0].color,badge:t.filter((e=>!c(e.letter))).map((e=>e.letter)).join(","),tooltip:t.filter((e=>!c(e.tooltip))).map((e=>e.tooltip)).join(" 鈥� ")}}(e);return n&&t&&(n.badge="鈥�",n.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),n}};m=i.__decorate([(0,r.Injectable)()],m),t.FileDecorationsService=m},75104:(e,t,n)=>{"use strict";Object.defineProperty(t,"X",{value:!0}),t.q=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(93457),s=n(60368);let c=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:a.IDecorationsService,useClass:s.FileDecorationsService}]}};c=i.__decorate([(0,r.Injectable)()],c),t.q=c},93457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=void 0;const i=n(90642);class r extends i.Disposable{}t.IDecorationsService=r},39890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(93457),t)},53356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(39890),t)},2706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findCurrentDocumentSymbol=t.DefaultBreadCrumbProvider=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(39993),a=n(894),s=n(11792),c=n(46679),l=n(14238),d=n(92675),u=n(86412),{Path:p}=a.path;let h=class extends a.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new a.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new a.LRUMap(200,100)}handlesUri(e){return e.scheme===a.Schemes.file||e.scheme===a.Schemes.userStorage}provideBreadCrumbForUri(e,t){return this.getFileParts(e).concat(this.getDocumentSymbolParts(e,t))}getFileParts(e){const t=this.workspaceService.workspace?new a.URI(this.workspaceService.workspace.uri):void 0;let n,i;t&&t.isEqualOrParent(e)?(n=t,i=t.relative(e)):(n=a.URI.from({scheme:e.scheme,authority:e.authority}),i=e.path);let r=n.path;const o=[];for(const t of i.toString().split(p.separator).filter((e=>!!e))){r=r.join(t);const i=n.withPath(r);o.push(this.createFilePartBreadCrumbUri(i,!i.isEqual(e)))}return o}createFilePartBreadCrumbUri(e,t){const n=e.toString();if(this.cachedBreadCrumb.has(n))return this.cachedBreadCrumb.get(n);const i={name:e.path.base,icon:this.labelService.getIcon(e,{isDirectory:t}),getSiblings:async()=>{const t=a.URI.from({scheme:e.scheme}).withPath(e.path.dir),n=await this.fileServiceClient.getFileStat(t.toString()),i=[];let r=-1;return n&&n.children&&n.children.length>0&&g(n.children).forEach(((t,n)=>{i.push(this.createFilePartBreadCrumbUri(new a.URI(t.uri),t.isDirectory)),-1===r&&e.toString()===t.uri&&(r=n)})),{parts:i,currentIndex:r}}};return t?i.getChildren=async()=>{const t=await this.fileServiceClient.getFileStat(e.toString()),n=[];return t&&t.children&&t.children.length>0&&g(t.children).forEach(((e,t)=>{n.push(this.createFilePartBreadCrumbUri(new a.URI(e.uri),e.isDirectory))})),n}:i.onClick=()=>{this.commandService.executeCommand(a.EDITOR_COMMANDS.OPEN_RESOURCE.id,e)},this.cachedBreadCrumb.set(n,i),i}getDocumentSymbolParts(e,t){if(!t)return[];const n=this.documentSymbolStore.getDocumentSymbol(e);if(n&&n.length>0){const e=m(n,t.monacoEditor.getPosition());return e.length>0?e.map((e=>this.createFromDocumentSymbol(e,t))):[{name:"...",getSiblings:()=>({parts:n.sort(((e,t)=>_(e.range,t.range))).map((e=>this.createFromDocumentSymbol(e,t))),currentIndex:-1})}]}return[]}createFromDocumentSymbol(e,t){const n={name:e.name,icon:(0,a.getSymbolIcon)(e.kind),onClick:()=>{t.setSelection({startColumn:e.range.startColumn,endColumn:e.range.startColumn,startLineNumber:e.range.startLineNumber,endLineNumber:e.range.startLineNumber}),t.monacoEditor.revealRangeInCenter(e.range),t.monacoEditor.focus()}};return e.parent&&(n.getSiblings=()=>({parts:e.parent.children.sort(((e,t)=>_(e.range,t.range))).map((e=>this.createFromDocumentSymbol(e,t))),currentIndex:e.parent.children.indexOf(e)})),e.children&&e.children.length>0&&(n.getChildren=()=>e.children.sort(((e,t)=>_(e.range,t.range))).map((e=>this.createFromDocumentSymbol(e,t)))),n}onDocumentSymbolChangedEvent(e){this.notifyUpdate(e.payload)}onEditorSelectionChangeEvent(e){this.notifyUpdate(e.payload.editorUri)}notifyUpdate(e){this.debouncedFireUriEvent.has(e.toString())||this.debouncedFireUriEvent.set(e.toString(),(0,r.default)((()=>{this._onDidUpdateBreadCrumb.fire(e)}),100,{maxWait:1e3})),this.debouncedFireUriEvent.get(e.toString())()}};function m(e,t){const n=[];if(!t)return n;let i=e;for(;i&&i.length>0;){let e=!1;for(const r of i)if(f(t,r.range)){n.push(r),i=r.children,e=!0;break}if(!e)break}return n}function g(e){return e.sort(((e,t)=>{if(e.isDirectory&&t.isDirectory||!e.isDirectory&&!t.isDirectory){const n=new a.URI(e.uri).path.name,i=new a.URI(t.uri).path.name;return n.localeCompare(i,"kn",{numeric:!0})}return e.isDirectory&&!t.isDirectory?-1:!e.isDirectory&&t.isDirectory?1:0}))}function f(e,t){return!(e.lineNumber=t.startColumn:e.lineNumbert.startLineNumber?1:e.startLineNumbert.startColumn?1:-1}i.__decorate([(0,o.Autowired)(c.IFileServiceClient),i.__metadata("design:type",Object)],h.prototype,"fileServiceClient",void 0),i.__decorate([(0,o.Autowired)(l.IWorkspaceService),i.__metadata("design:type",Object)],h.prototype,"workspaceService",void 0),i.__decorate([(0,o.Autowired)(s.LabelService),i.__metadata("design:type",s.LabelService)],h.prototype,"labelService",void 0),i.__decorate([(0,o.Autowired)(a.CommandService),i.__metadata("design:type",Object)],h.prototype,"commandService",void 0),i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",u.DocumentSymbolStore)],h.prototype,"documentSymbolStore",void 0),i.__decorate([(0,a.OnEvent)(u.DocumentSymbolChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[u.DocumentSymbolChangedEvent]),i.__metadata("design:returntype",void 0)],h.prototype,"onDocumentSymbolChangedEvent",null),i.__decorate([(0,a.OnEvent)(d.EditorSelectionChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[d.EditorSelectionChangeEvent]),i.__metadata("design:returntype",void 0)],h.prototype,"onEditorSelectionChangeEvent",null),h=i.__decorate([(0,o.Injectable)()],h),t.DefaultBreadCrumbProvider=h,t.findCurrentDocumentSymbol=m},86412:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.DocumentSymbolChangedEvent=t.DocumentSymbolStore=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(39993),a=n(894),s=i.__importStar(n(67266)),c=n(67266);Object.defineProperty(t,"SymbolTag",{enumerable:!0,get:function(){return c.SymbolTag}});const l=n(23730),d=n(49539);let u=class extends a.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(s.DocumentSymbolProviderRegistry.onDidChange((()=>{Array.from(this.documentSymbols.keys()).forEach((e=>{this.markNeedUpdate(new a.URI(e))}))})))}getDocumentSymbol(e){return this.documentSymbols.has(e.toString())||(this.documentSymbols.set(e.toString(),void 0),this.createDocumentSymbolCache(e)),this.pendingUpdate.has(e.toString())&&this.updateDocumentSymbolCache(e),this.documentSymbols.get(e.toString())}async getDocumentSymbolAsync(e,t){var n;const i=e.toString();return t&&t.onCancellationRequested((()=>{var e;null===(e=this.symbolDeferred.get(i))||void 0===e||e.resolve(),this.symbolDeferred.delete(i)})),this.documentSymbols.has(i)&&!this.pendingUpdate.has(i)||this.symbolDeferred.has(i)||(this.symbolDeferred.set(i,new a.Deferred),this.updateDocumentSymbolCache(e)),await(null===(n=this.symbolDeferred.get(i))||void 0===n?void 0:n.promise),this.documentSymbols.get(i)}async createDocumentSymbolCache(e){this.updateDocumentSymbolCache(e)}async doUpdateDocumentSymbolCache(e){var t,n;this.pendingUpdate.delete(e.toString());const i=await this.editorDocumentModelRegistry.createModelReference(e);if(i){try{const t=await s.DocumentSymbolProviderRegistry.all(i.instance.getMonacoModel());let n;for(const e of t)if(n=await e.provideDocumentSymbols(i.instance.getMonacoModel(),(new a.CancellationTokenSource).token),n)break;n&&h(n,{children:n},e),this.documentSymbols.set(e.toString(),n),this.eventBus.fire(new p(e))}finally{i.dispose()}null===(n=this.symbolDeferred.get(e.toString()))||void 0===n||n.resolve()}else null===(t=this.symbolDeferred.get(e.toString()))||void 0===t||t.resolve()}updateDocumentSymbolCache(e){this.debounced.has(e.toString())||this.debounced.set(e.toString(),(0,r.default)((()=>this.doUpdateDocumentSymbolCache(e)),100,{maxWait:1e3})),this.debounced.get(e.toString())()}onEditorDocumentModelContentChangedEvent(e){e.payload.changes&&e.payload.changes.length>0&&this.markNeedUpdate(e.payload.uri)}markNeedUpdate(e){this.pendingUpdate.add(e.toString()),this.isWatching(e)&&this.updateDocumentSymbolCache(e)}isWatching(e){for(const t of this.editorService.editorGroups)if(t.currentResource&&t.currentResource.uri.isEqual(e))return!0;return!1}};i.__decorate([(0,o.Autowired)(d.IEditorDocumentModelService),i.__metadata("design:type",Object)],u.prototype,"editorDocumentModelRegistry",void 0),i.__decorate([(0,o.Autowired)(l.WorkbenchEditorService),i.__metadata("design:type",l.WorkbenchEditorService)],u.prototype,"editorService",void 0),i.__decorate([(0,a.OnEvent)(d.EditorDocumentModelContentChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[d.EditorDocumentModelContentChangedEvent]),i.__metadata("design:returntype",void 0)],u.prototype,"onEditorDocumentModelContentChangedEvent",null),u=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.DocumentSymbolStore=u;class p extends a.BasicEvent{}function h(e,t,n){return e.forEach(((e,i)=>{const r=e;r.parent=t,r.id=function(e,t,n){const i=[t.name];for(;t.parent;){const e=t.parent;if(!e.name)break;i.unshift(e.name),t=e}return`${e.toString()}__${i.join("-")}__${n}`}(n,r,i),e.children&&e.children.length>0&&h(e.children,e,n)})),e}t.DocumentSymbolChangedEvent=p},72082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbServiceImpl=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(2706),{addElement:s}=o.arrays;let c=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(e){const t=s(this.providers,e);return e.onDidUpdateBreadCrumb((e=>{this.crumbResults.forEach(((t,n)=>{t.has(e.toString())&&this.getBreadCrumbs(e,n)}))})),t}getBreadCrumbs(e,t){const n=this.getEditorCrumbResults(t);for(const i of this.providers)if(i.handlesUri(e)){const r=n.get(e.toString()),o=i.provideBreadCrumbForUri(e,t);l(r,o)||(n.set(e.toString(),o),this._onDidUpdateBreadCrumbResults.fire({editor:t,uri:e}));break}return n.get(e.toString())}getEditorCrumbResults(e){return this.crumbResults.has(e)||(this.crumbResults.set(e,new Map),e&&e.monacoEditor.onDidDispose((()=>{this.crumbResults.delete(e)}))),this.crumbResults.get(e)}disposeCrumb(e){}};function l(e,t){if(e||t){if(e&&t){if(e.length!==t.length)return!1;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorComponentRegistryImpl=void 0;const i=n(70655),r=i.__importDefault(n(18446)),o=i.__importDefault(n(87185)),a=i.__importDefault(n(5868)),s=n(39993),c=n(90642),l=n(92675);let d=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(e,t){const n=e.uid;return e.renderMode||(e.renderMode=l.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(n,e),this.initialPropsMap.set(n,t),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:n})),this.eventBus.fire(new l.RegisterEditorComponentEvent(n)),{dispose:()=>{this.components.get(n)===e&&(this.components.delete(n),this.eventBus.fire(new l.EditorComponentDisposeEvent(e)))}}}registerEditorComponentResolver(e,t){let n;return n="function"==typeof e?{handleScheme:e,resolver:t}:{handleScheme:t=>t===e?10:-1,resolver:t},this.normalizedResolvers.push(n),this.resolvers.clear(),{dispose:()=>{for(const e of this.resolvers.values()){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}const e=this.normalizedResolvers.indexOf(n);-1!==e&&this.normalizedResolvers.splice(e,1)}}}async resolveEditorComponent(e){let t=[];const n=this.getResolvers(e.uri.scheme).slice();let i=!1;const a=e=>{t=e,i=!0};for(const r of n)if(await r(e,t,a),i)break;return t.sort(((e,t)=>{const n=e.weight||0;return(t.weight||0)-n})),(0,o.default)(t,r.default)}calculateSchemeResolver(e){const t=this.normalizedResolvers.slice(),n=[];return t.forEach(((t,i)=>{const r=t.handleScheme(e);r>=0&&n.push({weight:r,index:i,resolver:t.resolver})})),n.sort(((e,t)=>e.weight>t.weight?-1:e.weighte.resolver))}getResolvers(e){return this.resolvers.has(e)||this.resolvers.set(e,this.calculateSchemeResolver(e)),this.resolvers.get(e)}getEditorComponent(e){return this.components.get(e)||null}getEditorInitialProps(e){return this.initialPropsMap.get(e)||null}clearPerWorkbenchComponentCache(e){a.default.unmountComponentAtNode(this.perWorkbenchComponents[e]),delete this.perWorkbenchComponents[e]}getSideWidgets(e,t){const n=[];return this.sideWidgets[e].forEach((e=>{e.displaysOnResource(t)&&n.push(e)})),n.sort(((e,t)=>{const n=void 0===e.weight?10:e.weight;return(void 0===t.weight?10:t.weight)-n}))}registerEditorSideWidget(e){const t=e.side||"bottom";return this.sideWidgets[t].add(e),this.eventBus.fire(new l.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[t].delete(e)}}}};i.__decorate([(0,s.Autowired)(c.IEventBus),i.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),d=i.__decorate([(0,s.Injectable)()],d),t.EditorComponentRegistryImpl=d},81682:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(16871),t)},81943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoEditorDecorationApplier=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(39993),a=n(90642),s=n(52292),c=n(92675);let l=class extends a.Disposable{constructor(e){super(),this.editor=e,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel((()=>{this.clearDecorations(),this.applyDecorationFromProvider()})),this.editor.onDidDispose((()=>{this.dispose()})),this.addDispose(this.eventBus.on(c.EditorDecorationChangeEvent,(e=>{const t=this.getEditorUri();t&&e.payload.uri.isEqual(t)&&this.applyDecorationFromProvider(e.payload.key)}))),this.addDispose(this.eventBus.on(c.EditorDecorationTypeRemovedEvent,(e=>{this.deltaDecoration(e.payload,[])})))}getEditorUri(){if(this.editor.getModel()){return new a.URI(this.editor.getModel().uri.toString())}return null}async applyDecorationFromProvider(e){if(this.editor.getModel()){const t=new a.URI(this.editor.getModel().uri.toString()),n=await this.decorationService.getDecorationFromProvider(t,e);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==t.toString())return;for(const e of Object.keys(n))this.deltaDecoration(e,n[e]);this.eventBus.fire(new c.DidApplyEditorDecorationFromProvider({key:e,uri:t}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach((e=>{e.dispose(),this.editor.deltaDecorations(e.decorations,[])})),this.decorations.clear()}deltaDecoration(e,t){let n=[];if(this.decorations.has(e)&&(n=this.decorations.get(e).decorations,this.decorations.get(e).dispose(),this.decorations.delete(e)),0===n.length&&0===t.length)return;const i=this.editor.deltaDecorations(n,t);this.decorations.set(e,{decorations:i,dispose:()=>null})}applyDecoration(e,t){const n=this.decorations.get(e);n&&n.dispose();const i=n?n.decorations:[],r=[],o=new a.Disposable;if(0===i.length&&0===t.length)return;t.forEach((t=>{const n=this.resolveDecorationRenderer(e,t.renderOptions);r.push({range:t.range,options:Object.assign(Object.assign({},n.options),{hoverMessage:p(t.hoverMessage)})}),o.addDispose(n)}));const s=this.editor.deltaDecorations(i,r);this.decorations.set(e,{decorations:s,dispose:()=>o.dispose()})}resolveDecorationRenderer(e,t){const n=this.decorationService.getTextEditorDecorationType(e),i={description:e},r=this.themeService.getCurrentThemeSync().type,o=new a.Disposable;if(n){d(i,n.property,r)}if(t){const e=this.decorationService.createTextEditorDecorationType(t);d(i,e.property,r),o.addDispose(e)}return{options:i,dispose:()=>o.dispose()}}};function d(e,t,n){t.overviewRulerLane&&(e.overviewRuler?e.overviewRuler.position=t.overviewRulerLane:e.overviewRuler={color:null,range:null,position:t.overviewRulerLane}),t.default&&u(e,t.default),"dark"===n&&t.dark&&u(e,t.dark),"light"===n&&t.light&&u(e,t.light),void 0!==t.isWholeLine&&(e.isWholeLine=t.isWholeLine),t.rangeBehavior&&(e.stickiness=t.rangeBehavior),e.inlineClassNameAffectsLetterSpacing=!0}function u(e,t){t.className&&(e.className=(0,r.default)(e.className,t.className)),t.inlineClassName&&(e.inlineClassName=(0,r.default)(e.inlineClassName,t.inlineClassName)),t.afterContentClassName&&(e.afterContentClassName=(0,r.default)(e.afterContentClassName,t.afterContentClassName)),t.beforeContentClassName&&(e.beforeContentClassName=(0,r.default)(e.beforeContentClassName,t.beforeContentClassName)),t.glyphMarginClassName&&(e.glyphMarginClassName=(0,r.default)(e.glyphMarginClassName,t.glyphMarginClassName)),t.overviewRulerColor&&e.overviewRuler&&(e.overviewRuler.color=t.overviewRulerColor)}function p(e){if(e)return e instanceof Array?e.map(h):h(e)}function h(e){return"string"==typeof e?{value:e,isTrusted:!0}:e}i.__decorate([(0,o.Autowired)(c.IEditorDecorationCollectionService),i.__metadata("design:type",Object)],l.prototype,"decorationService",void 0),i.__decorate([(0,o.Autowired)(s.IThemeService),i.__metadata("design:type",Object)],l.prototype,"themeService",void 0),i.__decorate([(0,o.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),l=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],l),t.MonacoEditorDecorationApplier=l},80055:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompareEditorContribution=t.CompareService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(894),s=n(57061),c=n(92675);let l=class{constructor(){this.comparing=new Map}compare(e,t,n){const i=o.URI.from({scheme:"diff",query:o.URI.stringifyQuery({name:n,original:e,modified:t,comparing:!0})});if(!this.comparing.has(i.toString())){const e=new o.Deferred;this.comparing.set(i.toString(),e),e.promise.then((()=>{this.comparing.delete(i.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,i)}))}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,i),this.comparing.get(i.toString()).promise}};i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],l.prototype,"commandService",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.CompareService=l;let d=class{registerMenus(e){e.registerMenuItems(s.MenuId.EditorTitle,[{command:{id:"editor.diff.accept",label:(0,o.localize)("editor.action.accept")},iconClass:(0,a.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),e.registerMenuItems(s.MenuId.EditorTitle,[{command:{id:"editor.diff.revert",label:(0,o.localize)("editor.action.revert")},iconClass:(0,a.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}])}registerCommands(e){e.registerCommand({id:"editor.diff.accept"},{execute:e=>{e&&this.compareService.comparing.has(e.toString())&&this.compareService.comparing.get(e.toString()).resolve(c.CompareResult.accept)}}),e.registerCommand({id:"editor.diff.revert"},{execute:e=>{e&&this.compareService.comparing.has(e.toString())&&this.compareService.comparing.get(e.toString()).resolve(c.CompareResult.revert)}})}};i.__decorate([(0,r.Autowired)(c.ICompareService),i.__metadata("design:type",l)],d.prototype,"compareService",void 0),d=i.__decorate([(0,o.Domain)(s.MenuContribution,o.CommandContribution)],d),t.CompareEditorContribution=d},88806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiffEditorContribution=t.DiffResourceProvider=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(11792),s=n(23730),c=n(92675);let l=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme="diff",this.modifiedToResource=new Map}onResourceDecorationChangeEvent(e){e.payload.uri&&this.modifiedToResource.has(e.payload.uri.toString())&&this.eventBus.fire(new s.ResourceDecorationChangeEvent({uri:this.modifiedToResource.get(e.payload.uri.toString()),decoration:e.payload.decoration}))}async provideResource(e){const{original:t,modified:n,name:i}=e.getParsedQuery(),r=new o.URI(t),a=new o.URI(n),s=await this.labelService.getIcon(r);return this.modifiedToResource.set(a.toString(),e),{name:i,icon:s,uri:e,metadata:{original:r,modified:a}}}async shouldCloseResource(e,t){const{modified:n}=e.uri.getParsedQuery(),i=new o.URI(n),r=await this.resourceService.getResource(i);return!r||await this.resourceService.shouldCloseResource(r,t)}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",a.LabelService)],l.prototype,"labelService",void 0),i.__decorate([(0,r.Autowired)(s.ResourceService),i.__metadata("design:type",s.ResourceService)],l.prototype,"resourceService",void 0),i.__decorate([(0,o.OnEvent)(s.ResourceDecorationChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[s.ResourceDecorationChangeEvent]),i.__metadata("design:returntype",void 0)],l.prototype,"onResourceDecorationChangeEvent",null),l=i.__decorate([(0,r.Injectable)()],l),t.DiffResourceProvider=l;let d=class{registerResource(e){e.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(e){e.registerEditorComponentResolver("diff",((e,t)=>{t.push({type:"diff"})}))}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",l)],d.prototype,"diffResourceProvider",void 0),d=i.__decorate([(0,o.Domain)(c.BrowserEditorContribution)],d),t.DefaultDiffEditorContribution=d},8271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyDocCacheImpl=void 0;const i=n(70655),r=n(39993);let o=class{hasCache(e){return!1}isFlushed(){return!0}getCache(e){return null}persistCache(e,t){}};o=i.__decorate([(0,r.Injectable)()],o),t.EmptyDocCacheImpl=o},8769:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(8271),t),i.__exportStar(n(5856),t)},5856:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageDocCacheImpl=void 0;const i=n(70655),r=n(39993),o=n(14238),a=n(95335);let s=class{hasCache(e){return!0}isFlushed(){return!0}async getCache(e){const t=this.parseKeyFrom(e);return await this.storageService.getData(t)||null}persistCache(e,t){const n=this.parseKeyFrom(e),i=this.parseCacheFrom(e,t);this.storageService.setData(n,i)}parseCacheFrom(e,t){if(t.dirty&&t.changeMatrix.length)return{path:e.path.toString(),startMD5:t.startMD5,changeMatrix:t.changeMatrix.map((e=>e.map((e=>(0,a.parseCacheValueFrom)(e)))))}}parseKeyFrom(e){return`LocalStorageDocCacheImpl_${e.toString()}`}};i.__decorate([(0,r.Autowired)(o.IWorkspaceStorageService),i.__metadata("design:type",Object)],s.prototype,"storageService",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.LocalStorageDocCacheImpl=s},47702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentError=void 0,function(e){e.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",e.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",e.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",e.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"}(t.EditorDocumentError||(t.EditorDocumentError={}))},73022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelServiceImpl=t.EDITOR_DOC_OPTIONS_PREF_KEY=t.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(55229),s=n(45673),c=n(49539);t.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),t.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let l=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=new o.ReadyEvent,this._modelReferenceManager=new o.ReferenceManager((e=>(this._modelsToDispose.has(e)&&this._modelsToDispose.delete(e),this.getOrCreateModel(e)))),this._modelReferenceManager.onReferenceAllDisposed((e=>{this._delete(e)})),this._modelReferenceManager.onInstanceCreated((e=>{this.eventBus.fire(new c.EditorDocumentModelCreationEvent({uri:e.uri,languageId:e.languageId,eol:e.eol,encoding:e.encoding,content:e.getText(),readonly:e.readonly,versionId:e.getMonacoModel().getVersionId()}))})),this.addDispose(this.preferenceService.onPreferenceChanged((e=>{"editor.detectIndentation"===e.preferenceName&&this.editorDocModels.forEach((e=>{e.updateOptions({})}))})))}_delete(e){const t=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(e.toString());let n=null;const i=this.addDispose({dispose:()=>{n&&clearTimeout(n)}});n=window.setTimeout((()=>{i.dispose(),n=null,this._modelsToDispose.has(e.toString())&&this._doDelete(e.toString())}),t)}_doDelete(e){const t=this.editorDocModels.get(e);if(t&&(!t.dirty||t.disposeEvenDirty))return t.dispose(),this.editorDocModels.delete(e),t;this._modelsToDispose.delete(e)}async changeModelOptions(e,t){return this.onceReady((()=>{this.preferredModelOptions.has(e.toString())&&(t=Object.assign(Object.assign({},this.preferredModelOptions.get(e.toString())),t)),this.preferredModelOptions.set(e.toString(),t);const n=this.getModelReference(e);return n&&(t.encoding&&t.encoding!==n.instance.encoding&&n.instance.updateEncoding(t.encoding),t.languageId&&t.languageId!==n.instance.languageId&&(n.instance.languageId=t.languageId),t.eol&&t.eol!==n.instance.eol&&(n.instance.eol=t.eol),n.dispose()),this.persistOptionsPreference()}))}persistOptionsPreference(){return this.storage.set(t.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(t.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(e){this.logger.error(e)}this._ready.ready()}async acceptExternalChange(e){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const t=this.editorDocModels.get(e.payload.toString());if(t)if(t.dirty);else{const e=await this.contentRegistry.getProvider(t.uri);if(e)if(e.provideEditorDocumentModelContentMd5){await e.provideEditorDocumentModelContentMd5(t.uri,t.encoding)!==t.getBaseContentMd5()&&t.updateContent(await this.contentRegistry.getContentForUri(t.uri,t.encoding),void 0,!0)}else{const e=await this.contentRegistry.getContentForUri(t.uri,t.encoding);this.hashCalculateService.calculate(e)!==t.getBaseContentMd5()&&t.updateContent(e,void 0,!0)}}}createModelReference(e,t){return this._modelReferenceManager.getReference(e.toString(),t)}getModelReference(e,t){return this._modelReferenceManager.getReferenceIfHasInstance(e.toString(),t)}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(e){return-1!==this.getAllModels().findIndex((t=>t.languageId===e))}async getOrCreateModel(e,t){return this.editorDocModels.has(e)?this.editorDocModels.get(e):this.createModel(e,t)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(e,t){if(!this.creatingEditorModels.has(e)){const n=this.onceReady((()=>this.doCreateModel(e,t))).then((t=>(this.creatingEditorModels.delete(e),t)),(t=>{throw this.creatingEditorModels.delete(e),t}));this.creatingEditorModels.set(e,n)}return this.creatingEditorModels.get(e)}async doCreateModel(e,t){const n=new o.URI(e),i=await this.contentRegistry.getProvider(n);if(!i)throw new Error(`鏈壘鍒�${n.toString()}鐨勬枃妗f彁渚涘晢`);const r=this.preferredModelOptions.get(n.toString());!t&&i.provideEncoding&&r&&r.encoding&&(t=r.encoding);const a=r&&r.languageId,[c,l,d,u,p,h,m]=await Promise.all([i.provideEditorDocumentModelContent(n,t),i.isReadonly?i.isReadonly(n):void 0,a||(i.preferLanguageForUri?i.preferLanguageForUri(n):void 0),(null==r?void 0:r.eol)||(i.provideEOL?i.provideEOL(n):void 0),!!i.isAlwaysDirty&&i.isAlwaysDirty(n),!!i.closeAutoSave&&i.closeAutoSave(n),!!i.disposeEvenDirty&&i.disposeEvenDirty(n)]);!t&&i.provideEncoding&&(t=await i.provideEncoding(n));const g=!!i.saveDocumentModel,f=this.injector.get(s.EditorDocumentModel,[n,c,{readonly:l,languageId:d,savable:g,eol:u,encoding:t,alwaysDirty:p,closeAutoSave:h,disposeEvenDirty:m}]);return this.editorDocModels.set(n.toString(),f),f}async saveEditorDocumentModel(e,t,n,i,r,o,a){const s=await this.contentRegistry.getProvider(e);if(!s)throw new Error(`鏈壘鍒�${e.toString()}鐨勬枃妗f彁渚涘晢`);if(!s.saveDocumentModel)throw new Error(`${e.toString()}鐨勬枃妗f彁渚涘晢涓嶅瓨鍦ㄤ繚瀛樻柟娉昤);return await s.saveDocumentModel(e,t,n,i,r,o,a)}dispose(){super.dispose(),this.getAllModels().forEach((e=>{e.getMonacoModel().dispose()}))}};i.__decorate([(0,r.Autowired)(c.IEditorDocumentModelContentRegistry),i.__metadata("design:type",Object)],l.prototype,"contentRegistry",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],l.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(o.StorageProvider),i.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],l.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],l.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(a.IHashCalculateService),i.__metadata("design:type",Object)],l.prototype,"hashCalculateService",void 0),i.__decorate([o.memoize,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],l.prototype,"initialize",null),i.__decorate([(0,o.OnEvent)(c.EditorDocumentModelOptionExternalUpdatedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[c.EditorDocumentModelOptionExternalUpdatedEvent]),i.__metadata("design:returntype",Promise)],l.prototype,"acceptExternalChange",null),l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.EditorDocumentModelServiceImpl=l},45673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModel=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(39993),a=n(894),s=n(55229),c=n(44049),l=n(30713),d=n(1500),u=n(23730),p=n(57553),h=n(92675),m=n(47702),g=n(67174),f=n(49539);let _=class extends a.Disposable{constructor(e,t,n={}){super(),this.uri=e,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this._onDidChangeEncoding=new a.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose((()=>{this.eventBus.fire(new f.EditorDocumentModelRemovalEvent(this.uri))})),n.encoding&&(this._encoding=n.encoding),this.readonly=!!n.readonly,this.savable=!!n.savable,this.alwaysDirty=!!n.alwaysDirty,this.disposeEvenDirty=!!n.disposeEvenDirty,this.closeAutoSave=!!n.closeAutoSave,this.monacoModel=c.monaco.editor.createModel(t,n.languageId,c.URI.parse(e.toString())),this.editorPreferences=(0,p.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId),this.updateOptions({}),n.eol&&(this.eol=n.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=t,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding)}updateOptions(e){const t=Object.assign({tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"]},e);t.detectIndentation?this.monacoModel.detectIndentation(t.insertSpaces,t.tabSize):this.monacoModel.updateOptions(t)}listenTo(e){this.addDispose(e.onDidChangeContent((e=>{e.changes&&e.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:e.versionId,changes:e.changes}),this._previousVersionId=e.versionId,this.notifyChangeEvent(e.changes,e.isRedoing,e.isUndoing)}))),this.addDispose(e)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const e=this.cacheProvider.getCache(this.uri,this.encoding);e&&((0,a.isThenable)(e)?e.then((e=>{e&&this.applyCache(e)})).catch((e=>{this.logger.error(`${m.EditorDocumentError.READ_CACHE_ERROR} ${e&&e.message}`)})):this.applyCache(e))}applyCache(e){if(this.dirty)this.logger.error(m.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);else if(this.baseContentMd5===e.startMD5)if((0,u.isDocContentCache)(e))this.monacoModel.setValue(e.content);else for(const t of e.changeMatrix){const e=t.map((e=>({range:(0,u.parseRangeFrom)(e),text:e[0]})));this.monacoModel.applyEdits(e)}else this.logger.error(m.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT)}cleanAndUpdateContent(e){this.monacoModel.setValue(e),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=e}async updateEncoding(e){let t=!1;this._encoding!==e&&(t=!0),this._encoding=e,await this.reload(),t&&(this.eventBus.fire(new f.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(e){this.monacoModel.setEOL("\n"===e?l.EndOfLineSequence.LF:l.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new f.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:e}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return!!this.alwaysDirty||!!this.savable&&(!this.monacoModel.isDisposed()&&this._persistVersionId!==this.monacoModel.getAlternativeVersionId())}set languageId(e){c.monaco.editor.setModelLanguage(this.monacoModel,e),this.eventBus.fire(new f.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:e}))}get languageId(){return this.monacoModel.getModeId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async save(e=!1,t=u.SaveReason.Manual){if(await this.formatOnSave(t),await this.eventBus.fireAndAwait(new f.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:t,language:this.languageId})),this.editorPreferences["editor.askIfDiff"]||(e=!0),!this.dirty)return!1;const n=this.monacoModel.getVersionId(),i=this.savingTasks[this.savingTasks.length-1];if(i&&i.versionId===n){i.cancel();const e=this.savingTasks.pop();null==e||e.dispose()}const r=new g.SaveTask(this.uri,n,this.monacoModel.getAlternativeVersionId(),this.getText(),e);this.savingTasks.push(r),1===this.savingTasks.length&&this.initSave();const o=await r.finished;return"success"===o.state||("error"===o.state?(this.logger.error(o.errorMessage),this.messageService.error((0,a.localize)("doc.saveError.failed")+"\n"+o.errorMessage),!1):"diff"===o.state&&(this.messageService.error((0,a.formatLocalize)("doc.saveError.diff",this.uri.toString()),[(0,a.localize)("doc.saveError.diffAndSave")]).then((e=>{e&&this.compareAndSave()})),this.logger.error("鏂囦欢鏃犳硶淇濆瓨锛岀増鏈拰纾佺洏涓嶄竴鑷�"),!1))}async compareAndSave(){const e=a.URI.from({scheme:f.ORIGINAL_DOC_SCHEME,query:a.URI.stringifyQuery({target:this.uri.toString()})}),t=this.uri.path.base,n=await this.compareService.compare(e,this.uri,(0,a.formatLocalize)("editor.compareAndSave.title",t,t));n===h.CompareResult.revert?this.revert():n===h.CompareResult.accept&&this.save(!0)}async initSave(){for(;this.savingTasks.length>0;){const e=this.dirtyChanges;this.dirtyChanges=[];"success"===(await this.savingTasks[0].run(this.service,this.baseContent,e,this.encoding,this.eol)).state&&this.savingTasks[0]?(this.baseContent=this.savingTasks[0].content,this.eventBus.fire(new f.EditorDocumentModelSavedEvent(this.uri)),this.setPersist(this.savingTasks[0].alternativeVersionId)):this.dirtyChanges.unshift(...e),this.savingTasks.shift()}}setPersist(e){this._persistVersionId=e,this.notifyChangeEvent([],!1,!1)}async reload(){try{const e=await this.contentRegistry.getContentForUri(this.uri,this._encoding);(0,a.isUndefinedOrNull)(e)||this.cleanAndUpdateContent(e)}catch(e){this._persistVersionId=this.monacoModel.getAlternativeVersionId()}}async revert(e){e?this._persistVersionId=this.monacoModel.getAlternativeVersionId():await this.updateEncoding(this._originalEncoding)}getText(e){return e?this.monacoModel.getValueInRange(e):this.monacoModel.getValue()}updateContent(e,t,n=!1){this.monacoModel.pushEditOperations([],[{range:this.monacoModel.getFullModelRange(),text:e}],(()=>[])),t&&(this.eol=t),n&&(this.setPersist(this.monacoModel.getAlternativeVersionId()),this.baseContent=e,this.dirtyChanges=[])}set baseContent(e){this._baseContent=e,this._baseContentMd5=null}get baseContent(){return this._baseContent}get baseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}get tryAutoSaveAfterDelay(){return this._tryAutoSaveAfterDelay||(this._tryAutoSaveAfterDelay=(0,r.default)((()=>{this.save(void 0,u.SaveReason.AfterDelay)}),this.editorPreferences["editor.autoSaveDelay"]||1e3),this.addDispose(this.editorPreferences.onPreferenceChanged((e=>{"editor.autoSaveDelay"===e.preferenceName&&(this._tryAutoSaveAfterDelay=(0,r.default)((()=>{this.save(void 0,u.SaveReason.AfterDelay)}),this.editorPreferences["editor.autoSaveDelay"]||1e3))})))),this._tryAutoSaveAfterDelay}getBaseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}notifyChangeEvent(e=[],t,n){!this.closeAutoSave&&this.savable&&"afterDelay"===this.editorPreferences["editor.autoSave"]&&this.tryAutoSaveAfterDelay(),this.eventBus.fire(new f.EditorDocumentModelContentChangedEvent({uri:this.uri,dirty:this.dirty,changes:e,eol:this.eol,isRedoing:t,isUndoing:n,versionId:this.monacoModel.getVersionId()}));const i=this;this.cacheProvider.persistCache(this.uri,{get dirty(){return i.dirty},get startMD5(){return i.getBaseContentMd5()},get content(){return i.getText()},get changeMatrix(){return i.dirtyChanges.map((({changes:e})=>e))},encoding:this.encoding})}async formatOnSave(e){if(this.editorPreferences["editor.formatOnSave"]&&e!==u.SaveReason.AfterDelay){const e=this.editorPreferences["editor.formatOnSaveTimeout"]||3e3,t=this.reporter.time(a.REPORT_NAME.FORMAT_ON_SAVE);try{await Promise.race([new Promise(((t,n)=>{setTimeout((()=>{const t=new Error((0,a.formatLocalize)("preference.editor.formatOnSaveTimeoutError",e));t.name="FormatOnSaveTimeoutError",n(t)}),e)})),this.commandService.executeCommand("editor.action.formatDocument")])}catch(e){"FormatOnSaveTimeoutError"===e.name&&this.reporter.point(a.REPORT_NAME.FORMAT_ON_SAVE_TIMEOUT_ERROR,this.uri.toString()),this.logger.warn(`${m.EditorDocumentError.FORMAT_ERROR} ${e&&e.message}`)}finally{t.timeEnd(this.uri.path.ext)}}}};i.__decorate([(0,o.Autowired)(f.IEditorDocumentModelContentRegistry),i.__metadata("design:type",Object)],_.prototype,"contentRegistry",void 0),i.__decorate([(0,o.Autowired)(f.IEditorDocumentModelService),i.__metadata("design:type",Object)],_.prototype,"service",void 0),i.__decorate([(0,o.Autowired)(h.ICompareService),i.__metadata("design:type",Object)],_.prototype,"compareService",void 0),i.__decorate([(0,o.Autowired)(u.IDocPersistentCacheProvider),i.__metadata("design:type",Object)],_.prototype,"cacheProvider",void 0),i.__decorate([(0,o.Autowired)(d.IMessageService),i.__metadata("design:type",Object)],_.prototype,"messageService",void 0),i.__decorate([(0,o.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),i.__decorate([(0,o.Autowired)(a.ILogger),i.__metadata("design:type",Object)],_.prototype,"logger",void 0),i.__decorate([(0,o.Autowired)(a.CommandService),i.__metadata("design:type",Object)],_.prototype,"commandService",void 0),i.__decorate([(0,o.Autowired)(a.IReporterService),i.__metadata("design:type",Object)],_.prototype,"reporter",void 0),i.__decorate([(0,o.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],_.prototype,"preferences",void 0),i.__decorate([(0,o.Autowired)(s.IHashCalculateService),i.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),_=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[a.URI,String,Object])],_),t.EditorDocumentModel=_},57056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelContentRegistryImpl=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(49539);let s=class{constructor(){this.providers=[],this._onOriginalDocChanged=new o.Emitter,this.cachedProviders=new o.LRUMap(1e3,500),this.originalProvider={handlesScheme:e=>e===a.ORIGINAL_DOC_SCHEME,provideEditorDocumentModelContent:async e=>{const{target:t}=e.getParsedQuery(),n=new o.URI(t);return await this.getContentForUri(n)||""},isReadonly:()=>!0,onDidChangeContent:this._onOriginalDocChanged.event},this.registerEditorDocumentModelContentProvider(this.originalProvider)}registerEditorDocumentModelContentProvider(e){this.providers.push(e),this.cachedProviders.clear();const t=e.onDidChangeContent((e=>{this.eventBus.fire(new a.EditorDocumentModelOptionExternalUpdatedEvent(e))}));return e!==this.originalProvider&&e.onDidChangeContent&&e.onDidChangeContent((e=>{this._onOriginalDocChanged.fire(o.URI.from({scheme:a.ORIGINAL_DOC_SCHEME,query:o.URI.stringifyQuery({target:e.toString()})}))})),{dispose:()=>{t.dispose();const n=this.providers.indexOf(e);n&&(this.providers.splice(n,1),this.cachedProviders.clear())}}}getProvider(e){const t=e.toString();return this.cachedProviders.has(t)||this.cachedProviders.set(t,this.calculateProvider(e)),this.cachedProviders.get(t)}async calculateProvider(e){let t={provider:void 0,weight:-1,index:1};for(const n of this.providers){let i=-1;const r=this.providers.indexOf(n);n.handlesUri?i=await n.handlesUri(e):n.handlesScheme&&(i=await n.handlesScheme(e.scheme)?10:-1),i>=0&&(i>t.weight||i===t.weight&&r>t.index)&&(t={index:r,weight:i,provider:n})}return t.provider}async getContentForUri(e,t){const n=await this.getProvider(e);if(!n)throw new Error;return n.provideEditorDocumentModelContent(e,t)}};i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],s.prototype,"eventBus",void 0),s=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],s),t.EditorDocumentModelContentRegistryImpl=s},83720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(73022),t),i.__exportStar(n(45673),t),i.__exportStar(n(57056),t),i.__exportStar(n(67174),t)},34737:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoTextModelService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(49539);let s=class{canHandleResource(e){return!0}hasTextModelContentProvider(e){throw new Error("Method not implemented.")}async createModelReference(e){const t=await this.documentModelManager.createModelReference(new o.URI(e.toString()),"monaco");if(t){const e=t.instance.getMonacoModel();return Promise.resolve({object:{textEditorModel:e},dispose:()=>{t.dispose()}})}}registerTextModelContentProvider(e,t){return{dispose(){}}}};i.__decorate([(0,r.Autowired)(a.IEditorDocumentModelService),i.__metadata("design:type",Object)],s.prototype,"documentModelManager",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.MonacoTextModelService=s},67174:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaveTask=void 0;const i=n(894);class r extends i.Disposable{constructor(e,t,n,r,o){super(),this.uri=e,this.versionId=t,this.alternativeVersionId=n,this.content=r,this.ignoreDiff=o,this.deferred=new i.Deferred,this.finished=this.deferred.promise,this.started=!1,this.disposables.push(this.cancelToken=new i.CancellationTokenSource)}async run(e,t,n,i,r){this.started=!0;try{const o=await e.saveEditorDocumentModel(this.uri,this.content,t,n,i,this.ignoreDiff,r,this.cancelToken.token);return this.deferred.resolve(o),o}catch(e){const t={errorMessage:e.message,state:"error"};return this.deferred.resolve(t),t}}cancel(){this.cancelToken.cancel();this.deferred.reject({errorMessage:"cancel",state:"error"})}}t.SaveTask=r},46772:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaveParticipantsContribution=t.CodeActionOnSaveParticipant=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(44049),s=i.__importStar(n(67266)),c=n(7866),l=n(53378),d=i.__importStar(n(63138)),u=n(92675),p=n(49539);let h=class extends o.WithEventBus{get bulkEditService(){return this.overrideServiceRegistry.getRegisteredService(o.ServiceNames.BULK_EDIT_SERVICE)}activate(){}async onEditorDocumentModelWillSave(e){if(e.payload.reason!==u.SaveReason.Manual)return;const t=this.preferenceService.get("editor.codeActionsOnSave",void 0,e.payload.uri.toString(),e.payload.language);if(!t)return;const n=[];for(const e of Object.keys(t).map((e=>new l.CodeActionKind(e))))(l.CodeActionKind.SourceFixAll.equals(e)||l.CodeActionKind.SourceFixAll.contains(e))&&n.push(l.CodeActionKind.SourceFixAll),l.CodeActionKind.SourceOrganizeImports.equals(e)&&n.push(l.CodeActionKind.SourceOrganizeImports);if(0===n.length)return;const i=this.docService.getModelReference(e.payload.uri,"codeActionOnSave");if(!i)return;const r=i.instance.getMonacoModel(),o=new d.CancellationTokenSource,a=this.preferenceService.get("editor.codeActionsOnSaveTimeout",void 0,e.payload.uri.toString(),e.payload.language);return Promise.race([new Promise(((e,t)=>setTimeout((()=>{o.cancel(),t("codeActionsOnSave timeout")}),a))),this.applyOnSaveActions(r,n,o.token)]).finally((()=>{o.cancel(),i.dispose()}))}async applyOnSaveActions(e,t,n){for(const i of t)try{const t=await this.getActionsToRun(e,i,n);await this.applyCodeActions(t.validActions)}catch(e){this.logger.error(e)}}async applyCodeActions(e){var t;for(const n of e)n.action.edit&&await(null===(t=this.bulkEditService)||void 0===t?void 0:t.apply(a.ResourceEdit.convert(n.action.edit))),n.action.command&&await this.commandService.executeCommand(n.action.command.id,...n.action.command.arguments||[])}async getActionsToRun(e,t,n){return(0,c.getCodeActions)(e,e.getFullModelRange(),{type:s.CodeActionTriggerType.Auto,filter:{include:t,includeSourceActions:!0}},o.Progress.None,n)}};i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],h.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(o.MonacoService),i.__metadata("design:type",o.MonacoService)],h.prototype,"monacoService",void 0),i.__decorate([(0,r.Autowired)(o.MonacoOverrideServiceRegistry),i.__metadata("design:type",o.MonacoOverrideServiceRegistry)],h.prototype,"overrideServiceRegistry",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],h.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),i.__metadata("design:type",Object)],h.prototype,"docService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],h.prototype,"logger",void 0),i.__decorate([(0,o.OnEvent)(p.EditorDocumentModelWillSaveEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[p.EditorDocumentModelWillSaveEvent]),i.__metadata("design:returntype",Promise)],h.prototype,"onEditorDocumentModelWillSave",null),h=i.__decorate([(0,r.Injectable)()],h),t.CodeActionOnSaveParticipant=h;let m=class{onStart(){this.codeActionOnSaveParticipant.activate()}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",h)],m.prototype,"codeActionOnSaveParticipant",void 0),m=i.__decorate([(0,o.Domain)(o.ClientAppContribution)],m),t.SaveParticipantsContribution=m},49539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ORIGINAL_DOC_SCHEME=t.EditorDocumentModelWillSaveEvent=t.EditorDocumentModelSavedEvent=t.EditorDocumentModelRemovalEvent=t.EditorDocumentModelCreationEvent=t.EditorDocumentModelOptionExternalUpdatedEvent=t.EditorDocumentModelOptionChangedEvent=t.EditorDocumentModelContentChangedEvent=t.IEditorDocumentModelContentRegistry=t.IEditorDocumentModelService=void 0;const i=n(894);t.IEditorDocumentModelService=Symbol("IEditorDocumentModelService"),t.IEditorDocumentModelContentRegistry=Symbol("IEditorDocumentModelContentRegistry");class r extends i.BasicEvent{}t.EditorDocumentModelContentChangedEvent=r;class o extends i.BasicEvent{}t.EditorDocumentModelOptionChangedEvent=o;class a extends i.BasicEvent{}t.EditorDocumentModelOptionExternalUpdatedEvent=a;class s extends i.BasicEvent{}t.EditorDocumentModelCreationEvent=s;class c extends i.BasicEvent{}t.EditorDocumentModelRemovalEvent=c;class l extends i.BasicEvent{}t.EditorDocumentModelSavedEvent=l;class d extends i.BasicEvent{}t.EditorDocumentModelWillSaveEvent=d,t.ORIGINAL_DOC_SCHEME="original_doc"},35579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserDiffEditor=t.BrowserCodeEditor=t.BaseMonacoEditorWrapper=t.insertSnippetWithMonacoEditor=t.EditorCollectionServiceImpl=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(44749),s=n(90642),c=n(90642),l=i.__importStar(n(63138)),d=n(93599),u=n(23730),p=n(81943),h=n(49539),m=n(61173),g=n(42267),f=n(92675),{removeUndefined:_}=s.objects;let b=class extends s.WithEventBus{constructor(){super(),this._editors=new Set,this._diffEditors=new Set,this._onCodeEditorCreate=new c.Emitter,this._onDiffEditorCreate=new c.Emitter,this.onCodeEditorCreate=this._onCodeEditorCreate.event,this.onDiffEditorCreate=this._onDiffEditorCreate.event,this.addDispose(this.editorFeatureRegistry.onDidRegisterFeature((e=>{this._editors.forEach((t=>{this.editorFeatureRegistry.runOneContribution(t,e)}))})))}get currentEditor(){return this._currentEditor}createCodeEditor(e,t,n){const i=Object.assign(Object.assign({},(0,g.getConvertedMonacoOptions)(this.configurationService).editorOptions),t),r=this.monacoService.createCodeEditor(e,i,n),o=this.injector.get(C,[r,t]);return this._onCodeEditorCreate.fire(o),o}listEditors(){return Array.from(this._editors.values())}addEditors(e){this._editors.size;e.forEach((e=>{this._editors.has(e)||(this._editors.add(e),this.editorFeatureRegistry.runContributions(e),e.monacoEditor.onDidFocusEditorWidget((()=>{this._currentEditor=e})),e.monacoEditor.onContextMenu((()=>{this._currentEditor=e})))})),this._editors.size}removeEditors(e){this._editors.size;e.forEach((e=>{this._editors.delete(e),this._currentEditor===e&&(this._currentEditor=void 0)})),this._editors.size}createDiffEditor(e,t,n){const i=(0,g.getConvertedMonacoOptions)(this.configurationService),r=Object.assign(Object.assign(Object.assign({},i.editorOptions),i.diffOptions),t),o=this.monacoService.createDiffEditor(e,r,n),a=this.injector.get(S,[o,t]);return this._onDiffEditorCreate.fire(a),a}listDiffEditors(){return Array.from(this._diffEditors.values())}addDiffEditors(e){this._diffEditors.size;e.forEach((e=>{this._diffEditors.has(e)||this._diffEditors.add(e)})),this._diffEditors.size}removeDiffEditors(e){this._diffEditors.size;e.forEach((e=>{this._diffEditors.delete(e)})),this._diffEditors.size}onDocModelContentChangedEvent(e){this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:e.payload.uri,decoration:{dirty:!!e.payload.dirty}}))}};function y(e,t,n,i){const r=e.getContribution("snippetController2"),o=n.map((e=>new l.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)));e.setSelections(o),e.focus(),r.insert(t,0,0,i.undoStopBefore,i.undoStopAfter)}i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",o.MonacoService)],b.prototype,"monacoService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],b.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(d.IConfigurationService),i.__metadata("design:type",Object)],b.prototype,"configurationService",void 0),i.__decorate([(0,r.Autowired)(f.IEditorFeatureRegistry),i.__metadata("design:type",m.EditorFeatureRegistryImpl)],b.prototype,"editorFeatureRegistry",void 0),i.__decorate([(0,r.Autowired)(h.IEditorDocumentModelService),i.__metadata("design:type",Object)],b.prototype,"documentModelService",void 0),i.__decorate([(0,s.OnEvent)(h.EditorDocumentModelContentChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[h.EditorDocumentModelContentChangedEvent]),i.__metadata("design:returntype",void 0)],b.prototype,"onDocModelContentChangedEvent",null),b=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],b),t.EditorCollectionServiceImpl=b,t.insertSnippetWithMonacoEditor=y;let v=class extends s.Disposable{constructor(e,t){super(),this.monacoEditor=e,this.type=t,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(p.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel((()=>{this._editorOptionsFromContribution={};const e=this.currentUri;e&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(e)).then((t=>{this.currentUri&&e.isEqual(this.currentUri)&&t&&Object.keys(t).length>0&&(this._editorOptionsFromContribution=t,this._doUpdateOptions())})),this._doUpdateOptions()}))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage((()=>{this._doUpdateOptions()}))),this.addDispose(this.configurationService.onDidChangeConfiguration((e=>{e.affectedKeys.filter((e=>(0,g.isEditorOption)(e))).length>0&&this._doUpdateOptions()})))}get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}getType(){return this.type}updateOptions(e={},t={}){this._specialEditorOptions=_(Object.assign(Object.assign({},this._specialEditorOptions),e)),this._specialModelOptions=_(Object.assign(Object.assign({},this._specialModelOptions),t)),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:e,modelOptions:t}=this._calculateFinalOptions();!function(e,t,n){e.updateOptions(t),e.getModel()&&e.getModel().updateOptions(n)}(this.monacoEditor,e,t)}_calculateFinalOptions(){var e;const t=this.currentUri?this.currentUri.toString():void 0,n=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,i=(0,g.getConvertedMonacoOptions)(this.configurationService,t,n,void 0),r={readOnly:(null===(e=this.currentDocumentModel)||void 0===e?void 0:e.readonly)||!1};return{editorOptions:Object.assign(Object.assign(Object.assign(Object.assign({},r),i.editorOptions),this._editorOptionsFromContribution),this._specialEditorOptions),modelOptions:Object.assign(Object.assign({},i.modelOptions),this._specialModelOptions)}}insertSnippet(e,t,n){y(this.monacoEditor,e,t,n)}applyDecoration(e,t){this.decorationApplier.applyDecoration(e,t)}onSelectionsChanged(e){return this.monacoEditor.onDidChangeCursorSelection((t=>{this._disableSelectionEmitter||e({selections:this.getSelections(),source:t.source})}))}onVisibleRangesChanged(e){const t=new s.Disposable,n=this.monacoEditor;return t.addDispose(n.onDidScrollChange((t=>{e(this.monacoEditor.getVisibleRanges())}))),t.addDispose(n.onDidLayoutChange((t=>{e(this.monacoEditor.getVisibleRanges())}))),t}setSelections(e){return this.monacoEditor.setSelections(e)}setSelection(e){return this.monacoEditor.setSelection(e)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(e){return this.monacoEditor.onDidChangeConfiguration((t=>{e()}))}};i.__decorate([(0,r.Autowired)(f.IEditorFeatureRegistry),i.__metadata("design:type",Object)],v.prototype,"editorFeatureRegistry",void 0),i.__decorate([(0,r.Autowired)(d.IConfigurationService),i.__metadata("design:type",Object)],v.prototype,"configurationService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),v=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,Number])],v),t.BaseMonacoEditorWrapper=v;class C extends v{constructor(e,t={}){super(e,u.EditorType.CODE),this.monacoEditor=e,this.editorState=new Map,this.toDispose=[],this._onCursorPositionChanged=new s.Emitter,this.onCursorPositionChanged=this._onCursorPositionChanged.event,this._disposed=!1,this._onRefOpen=new c.Emitter,this.onRefOpen=this._onRefOpen.event,this._specialEditorOptions=t,this.collectionService.addEditors([this]);const n=e.onDidChangeModel((()=>{this.monacoEditor.getDomNode().addEventListener("mousewheel",w),n.dispose()}));this.toDispose.push(e.onDidChangeCursorPosition((()=>{if(!this.currentDocumentModel)return;const t=e.getSelection();this._onCursorPositionChanged.fire({position:e.getPosition(),selectionLength:t?this.currentDocumentModel.getMonacoModel().getValueInRange(t).length:0})}))),this.addDispose({dispose:()=>{this.monacoEditor.dispose()}})}get currentDocumentModel(){return this._currentDocumentModelRef&&!this._currentDocumentModelRef.disposed?this._currentDocumentModelRef.instance:null}getType(){return u.EditorType.CODE}layout(){this.monacoEditor.layout()}focus(){this.monacoEditor.focus()}dispose(){super.dispose(),this.saveCurrentState(),this.collectionService.removeEditors([this]),this._disposed=!0,this.toDispose.forEach((e=>e.dispose()))}saveCurrentState(){if(this.currentUri){const e=this.monacoEditor.saveViewState();e&&this.editorState.set(this.currentUri.toString(),e)}}restoreState(){if(this.currentUri){const e=this.editorState.get(this.currentUri.toString());e&&this.monacoEditor.restoreViewState(e)}}async open(e){this.saveCurrentState(),this._currentDocumentModelRef=e;const t=this.currentDocumentModel.getMonacoModel();this.disableSelectionEmitter(),this.monacoEditor.setModel(t),this.enableSelectionEmitter(),this.restoreState(),this._onRefOpen.fire(e),this._onCursorPositionChanged.fire({position:this.monacoEditor.getPosition(),selectionLength:0})}}i.__decorate([(0,r.Autowired)(u.EditorCollectionService),i.__metadata("design:type",b)],C.prototype,"collectionService",void 0),i.__decorate([(0,r.Autowired)(f.IEditorFeatureRegistry),i.__metadata("design:type",Object)],C.prototype,"editorFeatureRegistry",void 0),t.BrowserCodeEditor=C;class S extends s.Disposable{constructor(e,t={}){super(),this.monacoDiffEditor=e,this.specialOptions=t,this.editorState=new Map,this.wrapEditors(),this.addDispose(this.configurationService.onDidChangeConfiguration((e=>{e.affectedKeys.filter((e=>(0,g.isDiffEditorOption)(e))).length>0&&this.doUpdateDiffOptions()})))}get originalDocModel(){return this.originalDocModelRef&&!this.originalDocModelRef.disposed?this.originalDocModelRef.instance:null}get modifiedDocModel(){return this.modifiedDocModelRef&&!this.modifiedDocModelRef.disposed?this.modifiedDocModelRef.instance:null}saveCurrentState(){if(this.currentUri){const e=this.monacoDiffEditor.saveViewState();e&&this.editorState.set(this.currentUri.toString(),e)}}restoreState(){if(this.currentUri){const e=this.editorState.get(this.currentUri.toString());e&&this.monacoDiffEditor.restoreViewState(e)}}async compare(e,t,n={},i){if(this.saveCurrentState(),this.originalDocModelRef=e,this.modifiedDocModelRef=t,this.monacoDiffEditor.setModel({original:this.originalDocModel.getMonacoModel(),modified:this.modifiedDocModel.getMonacoModel()}),this.currentUri=i||s.URI.from({scheme:"diff",query:s.URI.stringifyQuery({name,original:this.originalDocModel.uri.toString(),modified:this.modifiedDocModel.uri.toString()})}),n.range||n.originalRange){const e=n.range||n.originalRange,t=n.range?this.modifiedEditor.monacoEditor:this.originalEditor.monacoEditor;setTimeout((()=>{t.revealRangeInCenter(e),t.setSelection(e)}));const i=this.monacoDiffEditor.onDidUpdateDiff((()=>{i.dispose(),t.setSelection(e),setTimeout((()=>{t.revealRangeInCenter(e)}))}))}else this.restoreState();if(n.revealFirstDiff){const e=this.monacoDiffEditor.getLineChanges();if(e&&e.length>0)this.showFirstDiff();else{const e=this.monacoDiffEditor.onDidUpdateDiff((()=>{this.showFirstDiff(),e.dispose()}))}}await this.updateOptionsOnModelChange(),this.diffResourceKeys.forEach((e=>e.set(this.currentUri)))}showFirstDiff(){const e=this.monacoDiffEditor.getLineChanges();e&&e.length>0&&setTimeout((()=>{this.monacoDiffEditor.revealLineInCenter(e[0].modifiedStartLineNumber)}),0)}async updateOptionsOnModelChange(){await this.doUpdateDiffOptions()}async doUpdateDiffOptions(){const e=this.modifiedEditor.currentUri?this.modifiedEditor.currentUri.toString():void 0,t=this.modifiedEditor.currentDocumentModel?this.modifiedEditor.currentDocumentModel.languageId:void 0,n=(0,g.getConvertedMonacoOptions)(this.configurationService,e,t);this.monacoDiffEditor.updateOptions(Object.assign(Object.assign({},n.diffOptions),this.specialOptions))}updateDiffOptions(e){this.specialOptions=_(Object.assign(Object.assign({},this.specialOptions),e)),this.doUpdateDiffOptions()}getLineChanges(){return this.monacoDiffEditor.getLineChanges()}wrapEditors(){const e=this;this.originalEditor=this.injector.get(E,[e.monacoDiffEditor.getOriginalEditor(),()=>e.originalDocModel,u.EditorType.ORIGINAL_DIFF]),this.modifiedEditor=this.injector.get(E,[e.monacoDiffEditor.getModifiedEditor(),()=>e.modifiedDocModel,u.EditorType.MODIFIED_DIFF]),this.collectionService.addEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.addDiffEditors([this]);const t=this.contextKeyService.createScoped(this.modifiedEditor.monacoEditor._contextKeyService),n=this.contextKeyService.createScoped(this.originalEditor.monacoEditor._contextKeyService);this.diffResourceKeys=[new a.ResourceContextKey(t,void 0,"diffResource"),new a.ResourceContextKey(n,void 0,"diffResource")]}layout(){return this.monacoDiffEditor.layout()}focus(){this.monacoDiffEditor.focus()}dispose(){super.dispose(),this.collectionService.removeEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.removeDiffEditors([this]),this.monacoDiffEditor.dispose(),this._disposed=!0}}function w(e){e.preventDefault(),e.stopPropagation(),(this.offsetWidth+this.scrollLeft+e.deltaX>this.scrollWidth||this.scrollLeft+e.deltaX<0)&&(e.preventDefault(),e.stopPropagation())}i.__decorate([(0,r.Autowired)(u.EditorCollectionService),i.__metadata("design:type",b)],S.prototype,"collectionService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],S.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(d.IConfigurationService),i.__metadata("design:type",Object)],S.prototype,"configurationService",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],S.prototype,"contextKeyService",void 0),t.BrowserDiffEditor=S;let E=class extends v{constructor(e,t,n){super(e,n),this.getDocumentModel=t}get currentDocumentModel(){return this.getDocumentModel()}};E=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,Function,Number])],E)},8888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorOpener=void 0;const i=n(70655),r=n(39993),o=n(23730);let a=class{async open(e){let t;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);if(n){const i=parseInt(n[1],10),r=n[2]?parseInt(n[2],10):1;t={startLineNumber:i,startColumn:r,endLineNumber:i,endColumn:r},e=e.withFragment("")}return await this.workbenchEditorService.open(e,{range:t}),!0}async handleURI(e){return this.resourceService.handlesUri(e)}handleScheme(){return!1}};i.__decorate([(0,r.Autowired)(o.ResourceService),i.__metadata("design:type",o.ResourceService)],a.prototype,"resourceService",void 0),i.__decorate([(0,r.Autowired)(o.WorkbenchEditorService),i.__metadata("design:type",o.WorkbenchEditorService)],a.prototype,"workbenchEditorService",void 0),a=i.__decorate([(0,r.Injectable)()],a),t.EditorOpener=a},1748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorAutoSaveEditorContribution=t.EditorContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(26149),s=n(57061),c=n(68122),l=n(11866),d=n(90642),u=n(76101),p=i.__importStar(n(63138)),h=n(77025),m=n(53398),g=n(23730),f=n(19437),_=n(34737),b=n(49539),y=n(49539),v=n(8888),C=n(85101),S=n(29470),w=n(4448),E=n(70103),k=n(4262),x=n(57380),T=n(68303),D=n(24253),A=n(28662),I=n(75082),M=n(92675),R=n(30773),P=n(8514),O=n(97276);let N=class{registerComponent(e){e.register("@opensumi/ide-editor",{id:"ide-editor",component:w.EditorView}),e.register("breadcrumb-menu",{id:"breadcrumb-menu",component:D.NavigationMenuContainer})}registerOverrideService(e){const t=this.injector.get(C.MonacoCodeService),n=this.injector.get(o.IContextKeyService).createScoped();this.workbenchEditorService.setEditorContextKeyService(n),e.registerOverrideService(o.ServiceNames.CONTEXT_KEY_SERVICE,n.contextKeyService),e.registerOverrideService(o.ServiceNames.CODE_EDITOR_SERVICE,t),e.registerOverrideService(o.ServiceNames.CONTEXT_VIEW_SERVICE,new C.MonacoContextViewService(t)),e.registerOverrideService(o.ServiceNames.TEXT_MODEL_SERVICE,this.injector.get(_.MonacoTextModelService))}registerMonacoDefaultFormattingSelector(e){const t=this.injector.get(k.FormattingSelector);e(t.select.bind(t))}registerEditorExtensionContribution(e){e(T.EditorContextMenuController.ID,new m.SyncDescriptor(T.EditorContextMenuController,[this.contextMenuService,this.globalContextKeyService,this.contextMenuRenderer]))}async interceptOpen(e){try{return await this.openerService.open(e),!0}catch(e){return this.logger.error(e),!1}}onWillStop(e){return this.appConfig.isElectronRenderer?this.onWillStopElectron():this.workbenchEditorService.hasDirty()||!this.cacheProvider.isFlushed()}extractGroupAndUriFromArgs(e,t){let n,i;if(e instanceof o.URI)n=t||this.workbenchEditorService.currentEditorGroup,i=e||n&&n.currentResource&&n.currentResource.uri;else{const t=e||{};n=t.group||this.workbenchEditorService.currentEditorGroup,i=t.uri||n&&n.currentResource&&n.currentResource.uri}return{group:n,uri:i}}async onWillStopElectron(){return!!await this.workbenchEditorService.closeAllOnlyConfirmOnce()||!this.cacheProvider.isFlushed()}isElectronRenderer(){return this.appConfig.isElectronRenderer}registerKeybindings(e){e.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_CURRENT.id,keybinding:"ctrlcmd+s"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+w":"alt+shift+w"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"alt+cmd+left":"ctrlcmd+ctrl+left"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"alt+cmd+right":"ctrlcmd+ctrl+right"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pageup":"alt+pageup"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pagedown":"alt+pagedown"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.GO_FORWARD.id,keybinding:d.isWindows?"alt+right":"ctrl+shift+-"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.GO_BACK.id,keybinding:d.isWindows?"alt+left":"ctrl+-"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.CHANGE_LANGUAGE.id,keybinding:"ctrlcmd+k m"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,keybinding:"ctrlcmd+\\"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_NEXT.id,keybinding:"ctrlcmd+k ctrlcmd+right"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS.id,keybinding:"ctrlcmd+k ctrlcmd+left"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_ALL.id,keybinding:"alt+ctrlcmd+s"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,keybinding:"ctrlcmd+k w"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL.id,keybinding:"ctrlcmd+k ctrlcmd+w"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.PIN_CURRENT.id,keybinding:"ctrlcmd+k enter"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.COPY_CURRENT_PATH.id,keybinding:"ctrlcmd+k p"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.REOPEN_CLOSED.id,keybinding:this.isElectronRenderer()?"ctrlcmd+shift+t":"alt+shift+t"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+n":"alt+n"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,keybinding:this.isElectronRenderer()?"ctrlcmd+t":"ctrlcmd+o"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+alt+t":"ctrlcmd+alt+o"}),this.isElectronRenderer()&&(e.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrl+tab"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrl+shift+tab"}),d.isOSX&&(e.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrlcmd+shift+]"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrlcmd+shift+["})));for(let t=1;t<10;t++)e.registerKeybinding({command:o.EDITOR_COMMANDS.GO_TO_GROUP.id,keybinding:"ctrlcmd+"+t,args:[t]});["left","up","down","right"].forEach((t=>{e.registerKeybinding({command:o.EDITOR_COMMANDS.MOVE_GROUP.id,keybinding:"ctrlcmd+k "+t,args:[t]})})),e.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_UNDO.id,keybinding:"ctrlcmd+z",when:"inEditorComponent"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_REDO.id,keybinding:"shift+ctrlcmd+z",when:"inEditorComponent"}),e.registerKeybinding({command:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,keybinding:"alt+z",when:"editorFocus"})}initialize(){this.editorStatusBarService.setListener(),this.historyService.start()}registerCommands(e){e.registerCommand(o.EDITOR_COMMANDS.GO_FORWARD,{execute:()=>{this.historyService.forward()}}),e.registerCommand(o.EDITOR_COMMANDS.GO_BACK,{execute:()=>{this.historyService.back()}}),e.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE,{execute:async(e,t)=>{const n=await this.workbenchEditorService.open(e,t);if(n)return{groupId:null==n?void 0:n.group.name}}}),e.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCES,{execute:({uris:e})=>{this.workbenchEditorService.openUris(e)}}),e.registerCommand(o.EDITOR_COMMANDS.COMPARE,{execute:({original:e,modified:t,name:n},i={})=>(n=n||`${e.displayName} <=> ${t.displayName}`,this.workbenchEditorService.open(o.URI.from({scheme:"diff",query:o.URI.stringifyQuery({name:n,original:e,modified:t})}),i))}),e.registerCommand(o.EDITOR_COMMANDS.SAVE_CURRENT,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;e&&e.currentResource&&(e.pin(e.currentResource.uri),e.saveCurrent())}}),e.registerCommand(o.EDITOR_COMMANDS.SAVE_URI,{execute:async e=>{for(const t of this.workbenchEditorService.editorGroups){const n=t.resources.find((t=>t.uri.isEqual(e)));n&&t.saveResource(n)}}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP,{execute:async(e,t)=>{const{group:n}=this.extractGroupAndUriFromArgs(e,t);n&&await n.closeAll()}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_SAVED,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup}=e;t&&await t.closeSaved()}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.closeOthers(n)}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.close(n)}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_TO_RIGHT,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.closeToRight(n)}}),e.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT,{execute:()=>this.workbenchEditorService.currentEditorGroup}),e.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT_RESOURCE,{execute:()=>this.workbenchEditorService.currentResource}),e.registerCommand(o.EDITOR_COMMANDS.PIN_CURRENT,{execute:()=>{const e=this.workbenchEditorService.currentEditorGroup;e&&e.pinPreviewed()}}),e.registerCommand(o.EDITOR_COMMANDS.COPY_CURRENT_PATH,{execute:()=>{const e=this.workbenchEditorService.currentResource;e&&e.uri.scheme===o.Schemes.file&&this.clipboardService.writeText(e.uri.codeUri.fsPath)}}),e.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_LEFT,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.split(g.EditorGroupSplitAction.Left,n,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_RIGHT,{execute:async(e,t)=>{const{group:n,uri:i}=this.extractGroupAndUriFromArgs(e,t);n&&i&&await n.split(g.EditorGroupSplitAction.Right,i,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.GO_TO_GROUP,{execute:async(e=1)=>{var t;const n=this.workbenchEditorService.sortedEditorGroups[e-1];if(n)return void n.focus();const i=this.workbenchEditorService.sortedEditorGroups.length;if(i===e-1){const e=this.workbenchEditorService.sortedEditorGroups[i-1],n=null===(t=null==e?void 0:e.currentResource)||void 0===t?void 0:t.uri;e&&n&&await e.split(g.EditorGroupSplitAction.Right,n,{focus:!0})}}}),e.registerCommand(o.EDITOR_COMMANDS.MOVE_GROUP,{execute:async e=>{if(e){const t=this.workbenchEditorService.currentEditorGroup;t&&t.grid.move(e)}}}),e.registerCommand(o.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;e&&e.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_TOP,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.split(g.EditorGroupSplitAction.Top,n,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM,{execute:async e=>{e=e||{};const{group:t=this.workbenchEditorService.currentEditorGroup,uri:n=t&&t.currentResource&&t.currentResource.uri}=e;t&&n&&await t.split(g.EditorGroupSplitAction.Bottom,n,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.CHANGE_LANGUAGE,{execute:async e=>{const t=this.languagesService.languages.map((e=>({label:e.name,value:e.id,description:`(${e.id})`}))),n=await this.quickPickService.show(t,{placeholder:(0,o.localize)("editor.changeLanguageId"),selectIndex:()=>t.findIndex((e=>{var t,n;return e.value===(null===(n=null===(t=this.workbenchEditorService.currentCodeEditor)||void 0===t?void 0:t.currentDocumentModel)||void 0===n?void 0:n.languageId)}))});if(n&&e!==n&&this.workbenchEditorService.currentEditor){const e=this.workbenchEditorService.currentEditor.currentDocumentModel;e&&this.editorDocumentModelService.changeModelOptions(e.uri,{languageId:n})}}}),e.registerCommand(o.EDITOR_COMMANDS.CHANGE_ENCODING,{execute:async()=>{var e,t;const n=this.workbenchEditorService.currentResource,i=null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.currentDocumentModel;if(!n||!i)return;const r=this.preferenceService.get("files.encoding","utf8",n.uri.toString(),(0,o.getLanguageIdFromMonaco)(n.uri)),a=await this.contentRegistry.getProvider(n.uri),s=await(null===(t=null==a?void 0:a.guessEncoding)||void 0===t?void 0:t.call(a,n.uri)),c=i.encoding;let l;const d=Object.keys(o.SUPPORTED_ENCODINGS).sort(((e,t)=>e===r?-1:t===r?1:o.SUPPORTED_ENCODINGS[e].order-o.SUPPORTED_ENCODINGS[t].order)).filter((e=>(e!==s||s===r)&&!o.SUPPORTED_ENCODINGS[e].encodeOnly)).map(((e,t)=>(e!==c&&o.SUPPORTED_ENCODINGS[e].alias!==c||(l=t),{label:o.SUPPORTED_ENCODINGS[e].labelLong,value:e,description:e})));s&&r!==s&&o.SUPPORTED_ENCODINGS[s]&&(d[0]&&(d[0].showBorder=!0),d.unshift({label:o.SUPPORTED_ENCODINGS[s].labelLong,value:s,description:(0,o.localize)("editor.guessEncodingFromContent")}),"number"==typeof l&&l++);const u=await this.quickPickService.show(d,{placeholder:(0,o.localize)("editor.chooseEncoding"),selectIndex:e=>e?-1:"number"==typeof l?l:-1});if(!u)return;("diff"===n.uri.scheme?[n.metadata.original,n.metadata.modified]:[n.uri]).forEach((e=>{this.editorDocumentModelService.changeModelOptions(e,{encoding:u})}))}}),e.registerCommand(o.EDITOR_COMMANDS.CHANGE_EOL,{execute:async()=>{const e=this.workbenchEditorService.currentResource,t=this.workbenchEditorService.currentCodeEditor;if(t&&t.currentDocumentModel&&e){const n=await this.quickPickService.show([{label:"LF",value:"\n"},{label:"CRLF",value:"\r\n"}],{placeholder:(0,o.localize)("editor.changeEol"),selectIndex:()=>"\n"===t.currentDocumentModel.eol?0:1});n&&this.editorDocumentModelService.changeModelOptions(e.uri,{eol:n})}}}),e.registerCommand(o.EDITOR_COMMANDS.FOCUS,{execute:async()=>{this.workbenchEditorService.currentEditor&&this.workbenchEditorService.currentEditor.monacoEditor.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_NEXT,{execute:async()=>{let e=this.workbenchEditorService.currentEditorGroup.index+1;return this.workbenchEditorService.editorGroups.length<=e&&(e=0),this.workbenchEditorService.sortedEditorGroups[e].focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS,{execute:async()=>{let e=this.workbenchEditorService.currentEditorGroup.index-1;return e<0&&(e=this.workbenchEditorService.editorGroups.length-1),this.workbenchEditorService.sortedEditorGroups[e].focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_UP,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup.grid.findGird(g.Direction.UP);if(e)return e.editorGroup.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_DOWN,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup.grid.findGird(g.Direction.DOWN);if(e)return e.editorGroup.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_LEFT,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup.grid.findGird(g.Direction.LEFT);if(e)return e.editorGroup.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_RIGHT,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup.grid.findGird(g.Direction.RIGHT);if(e)return e.editorGroup.focus()}}),e.registerCommand(o.EDITOR_COMMANDS.PREVIOUS_IN_GROUP,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(!e.currentResource)return;const t=e.resources.findIndex((t=>t.uri.isEqual(e.currentResource.uri)))-1;return e.resources[t]?e.open(e.resources[t].uri,{focus:!0}):e.open(e.resources[0].uri,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.NEXT_IN_GROUP,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(!e.currentResource)return;const t=e.resources.findIndex((t=>t.uri.isEqual(e.currentResource.uri)))+1;return e.resources[t]?e.open(e.resources[t].uri,{focus:!0}):e.open(e.resources[e.resources.length-1].uri,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.NEXT,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(!e.currentResource)return;const t=e.resources.findIndex((t=>t.uri.isEqual(e.currentResource.uri)))+1;if(e.resources[t])return e.open(e.resources[t].uri,{focus:!0});{const t=e.index===this.workbenchEditorService.editorGroups.length-1?0:e.index+1,n=this.workbenchEditorService.sortedEditorGroups[t];return n.focus(),n.open(n.resources[0].uri,{focus:!0})}}}),e.registerCommand(o.EDITOR_COMMANDS.PREVIOUS,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(!e.currentResource)return;const t=e.resources.findIndex((t=>t.uri.isEqual(e.currentResource.uri)))-1;if(e.resources[t])return e.open(e.resources[t].uri,{focus:!0});{const t=0===e.index?this.workbenchEditorService.editorGroups.length-1:e.index-1,n=this.workbenchEditorService.sortedEditorGroups[t];return n.focus(),n.open(n.resources[n.resources.length-1].uri,{focus:!0})}}}),e.registerCommand(o.EDITOR_COMMANDS.LAST_IN_GROUP,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(e.resources.length>0)return e.open(e.resources[e.resources.length-1].uri,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.EVEN_EDITOR_GROUPS,{execute:async()=>{this.injector.get(o.IEventBus).fire(new M.EditorGroupsResetSizeEvent)}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_GROUPS,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;this.workbenchEditorService.editorGroups.filter((t=>t!==e)).forEach((e=>{e.dispose()}))}}),e.registerCommand(o.EDITOR_COMMANDS.OPEN_EDITOR_AT_INDEX,{execute:async e=>{const t=this.workbenchEditorService.currentEditorGroup,n=t.resources[e];n&&await t.open(n.uri,{focus:!0})}}),e.registerCommand(o.EDITOR_COMMANDS.REVERT_DOCUMENT,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(e.isCodeEditorMode()){const t=e.codeEditor.currentDocumentModel;t&&await t.revert()}}}),e.registerCommand(o.EDITOR_COMMANDS.REVERT_AND_CLOSE,{execute:async()=>{const e=this.workbenchEditorService.currentEditorGroup;if(e.isCodeEditorMode()){const t=e.codeEditor.currentDocumentModel;t&&await t.revert(),e.close(e.currentResource.uri)}}}),e.registerCommand(o.EDITOR_COMMANDS.SAVE_ALL,{execute:async e=>{this.workbenchEditorService.saveAll(void 0,e)}}),e.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL,{execute:async e=>{this.workbenchEditorService.closeAll(e)}}),e.registerCommand(o.EDITOR_COMMANDS.REOPEN_CLOSED,{execute:async()=>{this.historyService.popClosed()}}),e.registerCommand(o.EDITOR_COMMANDS.NEW_UNTITLED_FILE,{execute:()=>{this.workbenchEditorService.createUntitledResource()}}),e.registerCommand(o.EDITOR_COMMANDS.COMPONENT_UNDO,{execute:()=>{this.workbenchEditorService.currentEditorGroup.componentUndo()}}),e.registerCommand(o.EDITOR_COMMANDS.COMPONENT_REDO,{execute:()=>{this.workbenchEditorService.currentEditorGroup.componentRedo()}}),e.registerCommand(o.EDITOR_COMMANDS.TEST_TOKENIZE,{execute:()=>{const e=this.workbenchEditorService.currentCodeEditor;if(e){const t=e.getSelections();if(t&&t.length>0&&e.currentDocumentModel){const{selectionStartLineNumber:n,selectionStartColumn:i,positionLineNumber:r,positionColumn:o}=t[0],a=e.currentDocumentModel.getText(new p.Range(n,i,r,o));this.monacoService.testTokenize(a,e.currentDocumentModel.languageId)}}}}),e.registerCommand(o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL,{execute:()=>this.prefixQuickOpenService.open("#")}),e.registerCommand(o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS,{execute:()=>this.prefixQuickOpenService.open("##")}),e.registerCommand(o.EDITOR_COMMANDS.GO_TO_LINE,{execute:()=>this.prefixQuickOpenService.open(":")}),e.registerCommand(o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP,{execute:()=>{const e=this.preferenceService.get("editor.wordWrap");if(e){const t=["off","on"],n=t.indexOf(e)+1;n>-1&&this.preferenceService.set("editor.wordWrap",t[n%t.length],d.PreferenceScope.User)}}}),e.registerCommand(o.EDITOR_COMMANDS.FORMAT_DOCUMENT_WITH,{execute:async()=>{this.injector.get(E.DocumentFormatService).formatDocumentWith()}}),e.registerCommand(o.EDITOR_COMMANDS.FORMAT_SELECTION_WITH,{execute:async()=>{this.injector.get(E.DocumentFormatService).formatSelectionWith()}})}registerMenus(e){e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_LEFT.id,group:"9_split"}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,group:"9_split"}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_TOP.id,group:"9_split"}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id,group:"9_split"}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.EDITOR_COMMANDS.CLOSE.id,label:(0,o.localize)("editor.title.context.close")},group:"0_tab",order:1}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,group:"0_tab",order:2}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_SAVED.id,group:"0_tab",order:3}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP.id,group:"0_tab",order:4}),e.registerMenuItem(s.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_TO_RIGHT.id,group:"0_tab",order:5}),e.registerMenuItem(s.MenuId.EditorTitle,{command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,group:"0_internal"}),e.registerMenuItem(s.MenuId.EditorTitle,{command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,group:"navigation",when:"resource",order:5}),e.registerMenuItem(s.MenuId.EditorContext,{command:o.EDITOR_COMMANDS.FORMAT_DOCUMENT_WITH.id,group:"1_modification",order:1.3,when:h.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasMultipleDocumentFormattingProvider)}),e.registerMenuItem(s.MenuId.EditorContext,{command:o.EDITOR_COMMANDS.FORMAT_SELECTION_WITH.id,when:h.ContextKeyExpr.and(u.EditorContextKeys.writable,u.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider,u.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31})}registerOpener(e){e.registerOpener(this.editorOpener)}registerQuickOpenHandlers(e){e.registerHandler(this.workspaceSymbolQuickOpenHandler,{title:(0,o.localize)("quickopen.tab.symbol"),order:3,commandId:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,sub:{"#":{title:(0,o.localize)("quickopen.tab.class"),order:2,commandId:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id}}}),e.registerHandler(this.goToLineQuickOpenHandler,{title:(0,o.localize)("quickopen.tab.goToLine"),commandId:o.EDITOR_COMMANDS.GO_TO_LINE.id,order:5})}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],N.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],N.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),i.__metadata("design:type",O.WorkbenchEditorServiceImpl)],N.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",S.EditorStatusBarService)],N.prototype,"editorStatusBarService",void 0),i.__decorate([(0,r.Autowired)(o.QuickPickService),i.__metadata("design:type",Object)],N.prototype,"quickPickService",void 0),i.__decorate([(0,r.Autowired)(g.ILanguageService),i.__metadata("design:type",Object)],N.prototype,"languagesService",void 0),i.__decorate([(0,r.Autowired)(b.IEditorDocumentModelService),i.__metadata("design:type",Object)],N.prototype,"editorDocumentModelService",void 0),i.__decorate([(0,r.Autowired)(g.IDocPersistentCacheProvider),i.__metadata("design:type",Object)],N.prototype,"cacheProvider",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",x.EditorHistoryService)],N.prototype,"historyService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",o.MonacoService)],N.prototype,"monacoService",void 0),i.__decorate([(0,r.Autowired)(o.IOpenerService),i.__metadata("design:type",Object)],N.prototype,"openerService",void 0),i.__decorate([(0,r.Autowired)(d.ILogger),i.__metadata("design:type",Object)],N.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",v.EditorOpener)],N.prototype,"editorOpener",void 0),i.__decorate([(0,r.Autowired)(o.IClipboardService),i.__metadata("design:type",Object)],N.prototype,"clipboardService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",I.WorkspaceSymbolQuickOpenHandler)],N.prototype,"workspaceSymbolQuickOpenHandler",void 0),i.__decorate([(0,r.Autowired)(o.PrefixQuickOpenService),i.__metadata("design:type",Object)],N.prototype,"prefixQuickOpenService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",A.GoToLineQuickOpenHandler)],N.prototype,"goToLineQuickOpenHandler",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],N.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(y.IEditorDocumentModelContentRegistry),i.__metadata("design:type",Object)],N.prototype,"contentRegistry",void 0),i.__decorate([(0,r.Autowired)(c.AbstractContextMenuService),i.__metadata("design:type",c.AbstractContextMenuService)],N.prototype,"contextMenuService",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],N.prototype,"globalContextKeyService",void 0),i.__decorate([(0,r.Autowired)(l.ICtxMenuRenderer),i.__metadata("design:type",l.ICtxMenuRenderer)],N.prototype,"contextMenuRenderer",void 0),N=i.__decorate([(0,o.Domain)(o.CommandContribution,o.ClientAppContribution,o.KeybindingContribution,o.MonacoContribution,a.ComponentContribution,s.MenuContribution,o.OpenerContribution,o.QuickOpenContribution)],N),t.EditorContribution=N;let L=class{registerEditorFeature(e){e.registerEditorFeatureContribution({contribute:e=>{const t=new o.Disposable;return t.addDispose(e.monacoEditor.onDidBlurEditorWidget((()=>{this.preferenceService.get("editor.autoSave")===f.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE&&e.currentDocumentModel&&!e.currentDocumentModel.closeAutoSave&&e.currentDocumentModel.dirty&&e.currentDocumentModel.savable&&e.currentDocumentModel.save(void 0,g.SaveReason.FocusOut)}))),t.addDispose(e.monacoEditor.onDidChangeModel((e=>{if(this.preferenceService.get("editor.autoSave")===f.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE&&e.oldModelUrl){const t=new o.URI(e.oldModelUrl.toString()),n=this.editorDocumentService.getModelReference(t,"editor-focus-autosave");n&&!n.instance.closeAutoSave&&n.instance.dirty&&n.instance.savable&&n.instance.save(void 0,g.SaveReason.FocusOut),null==n||n.dispose()}}))),t}}),window.addEventListener("blur",(()=>{this.preferenceService.get("editor.autoSave")===f.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS&&this.commandService.executeCommand(o.EDITOR_COMMANDS.SAVE_ALL.id,g.SaveReason.FocusOut)})),this.preferenceSettings.setEnumLabels("editor.autoSave",{[f.AUTO_SAVE_MODE.OFF]:(0,o.localize)("editor.autoSave.enum.off"),[f.AUTO_SAVE_MODE.AFTER_DELAY]:(0,o.localize)("editor.autoSave.enum.afterDelay"),[f.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE]:(0,o.localize)("editor.autoSave.enum.editorFocusChange"),[f.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS]:(0,o.localize)("editor.autoSave.enum.windowLostFocus")}),e.registerEditorFeatureContribution(new P.EditorTopPaddingContribution),e.registerEditorFeatureContribution(this.injector.get(R.EditorSuggestWidgetContribution)),this.registerAutoSaveConfigurationChange()}registerAutoSaveConfigurationChange(){this.preferenceService.onSpecificPreferenceChange("editor.autoSave",(e=>{const t=e.newValue;if(t!==f.AUTO_SAVE_MODE.OFF){let n=g.SaveReason.FocusOut;t===f.AUTO_SAVE_MODE.AFTER_DELAY&&(n=g.SaveReason.AfterDelay);for(const t of this.workbenchEditorService.editorGroups)for(const i of t.resources)e.affects(null==i?void 0:i.uri.toString())&&t.saveResource(i,n)}}))}registerCommands(e){e.registerCommand(o.EDITOR_COMMANDS.AUTO_SAVE,{execute:()=>{const e="editor.autoSave",t=this.preferenceSettings.getPreference(e,d.PreferenceScope.User).value||f.AUTO_SAVE_MODE.OFF,n=[f.AUTO_SAVE_MODE.AFTER_DELAY,f.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE,f.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS].includes(t)?f.AUTO_SAVE_MODE.OFF:f.AUTO_SAVE_MODE.AFTER_DELAY;return this.preferenceSettings.setPreference(e,n,d.PreferenceScope.User)}})}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],L.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],L.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),i.__metadata("design:type",O.WorkbenchEditorServiceImpl)],L.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],L.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(b.IEditorDocumentModelService),i.__metadata("design:type",Object)],L.prototype,"editorDocumentService",void 0),i.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),i.__metadata("design:type",Object)],L.prototype,"preferenceSettings",void 0),L=i.__decorate([(0,o.Domain)(M.BrowserEditorContribution,o.CommandContribution)],L),t.EditorAutoSaveEditorContribution=L},88012:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDecorationCollectionService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(52292),s=n(22197),c=n(92675);let l=class{constructor(){this.decorations=new Map,this.tempId=0,this.decorationProviders=new Map}getNextTempId(){return this.tempId++,"temp-decoration-"+this.tempId}createTextEditorDecorationType(e,t){t||(t=this.getNextTempId());const n=this.resolveDecoration(t,e),i={key:t,property:n,dispose:()=>{t&&this.decorations.has(t)&&(n.dispose(),this.decorations.delete(t),this.eventBus.fire(new c.EditorDecorationTypeRemovedEvent(t)))}};return this.decorations.set(t,i),i}getTextEditorDecorationType(e){return this.decorations.get(e)}resolveDecoration(e,t){const n={default:this.addedThemeDecorationToCSSStyleSheet(e,t),light:t.light?this.addedThemeDecorationToCSSStyleSheet(e+"-light",t.light):null,dark:t.dark?this.addedThemeDecorationToCSSStyleSheet(e+"-dark",t.dark):null,isWholeLine:t.isWholeLine||!1,overviewRulerLane:t.overviewRulerLane,dispose:()=>{n.default.dispose(),n.light&&n.light.dispose(),n.dark&&n.dark.dispose()}};return n}addedThemeDecorationToCSSStyleSheet(e,t){const n=e,i=e+"-inline",r=new o.Disposable;let a,s,c;const l=this.resolveCSSStyle(t),d=this.resolveInlineCSSStyle(t);if(r.addDispose(this.cssManager.addClass(n,l)),r.addDispose(this.cssManager.addClass(i,d)),t.after){const n=this.resolveContentCSSStyle(t.after);r.addDispose(this.cssManager.addClass(e+"-after::after",n)),a=e+"-after",r.addDispose(this.cssManager.addClass(a,{display:"inline-block"}))}if(t.before){const n=this.resolveContentCSSStyle(t.before);r.addDispose(this.cssManager.addClass(e+"-before::before",n)),s=e+"-before",r.addDispose(this.cssManager.addClass(s,{display:"inline-block"}))}if(t.gutterIconPath){const n=this.resolveCSSStyle({backgroundIconSize:t.gutterIconSize,backgroundIcon:t.gutterIconPath.toString()});c=e+"-glyphMargin",r.addDispose(this.cssManager.addClass(c,n))}return{className:n,inlineClassName:i,afterContentClassName:a,beforeContentClassName:s,glyphMarginClassName:c,overviewRulerColor:t.overviewRulerColor,dispose:()=>r.dispose()}}resolveCSSStyle(e){return{backgroundColor:this.themeService.getColorVar(e.backgroundColor),background:e.backgroundIcon?`url('${e.backgroundIcon}') center center no-repeat`:void 0,backgroundSize:e.backgroundIconSize?`${e.backgroundIconSize}`:void 0,outline:e.outline,outlineColor:e.outlineColor,outlineStyle:e.outlineStyle,outlineWidth:e.outlineWidth,border:e.border,borderColor:this.themeService.getColorVar(e.borderColor),borderRadius:e.borderRadius,borderSpacing:e.borderSpacing,borderStyle:e.borderStyle,borderWidth:e.borderWidth}}resolveInlineCSSStyle(e){return{fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration,cursor:e.cursor,color:this.themeService.getColorVar(e.color),opacity:e.opacity,letterSpacing:e.letterSpacing}}resolveContentCSSStyle(e){let t;return e.contentText?t=`"${e.contentText}"`:e.contentIconPath&&(t=`url('${o.URI.from(e.contentIconPath).toString(!0).replace(/'/g,"%27")}')`),{display:"block",content:t,border:e.border,borderColor:this.themeService.getColorVar(e.borderColor),fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration,color:this.themeService.getColorVar(e.color),backgroundColor:this.themeService.getColorVar(e.backgroundColor),margin:e.margin,width:e.width,height:e.height}}registerDecorationProvider(e){this.decorationProviders.set(e.key,e),this.eventBus.fire(new c.EditorDecorationProviderRegistrationEvent(e));const t=e.onDidDecorationChange((t=>{this.eventBus.fire(new c.EditorDecorationChangeEvent({uri:t,key:e.key}))}));return{dispose:()=>{this.decorationProviders.get(e.key)===e&&(this.decorationProviders.delete(e.key),this.eventBus.fire(new c.EditorDecorationTypeRemovedEvent(e.key))),t.dispose()}}}async getDecorationFromProvider(e,t){const n={};let i=[];return t?this.decorationProviders.has(t)&&i.push(this.decorationProviders.get(t)):i=Array.from(this.decorationProviders.values()),await Promise.all(i.map((async t=>{if(t.schemes&&-1===t.schemes.indexOf(e.scheme))return;const i=await t.provideEditorDecoration(e);i&&(n[t.key]=i)}))),n}};i.__decorate([(0,r.Autowired)(s.ICSSStyleService),i.__metadata("design:type",Object)],l.prototype,"cssManager",void 0),i.__decorate([(0,r.Autowired)(a.IThemeService),i.__metadata("design:type",Object)],l.prototype,"themeService",void 0),i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.EditorDecorationCollectionService=l},85101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoContextViewService=t.MonacoCodeService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(93799),c=i.__importStar(n(63138)),l=n(98809),d=n(60213),u=n(92845),p=n(23730),h=n(97276);let m=class extends s.CodeEditorServiceImpl{constructor(){super(null,d.StaticServices.standaloneThemeService.get())}getActiveCodeEditor(){return this.workbenchEditorService.currentEditor?this.workbenchEditorService.currentEditor.monacoEditor:null}async openCodeEditor(e,t,n){var i,r,o,s,l,d;const u=new a.URI(e.resource.toString());if(!this.preferenceService.get("editor.enablePreviewFromCodeNavigation")&&t&&!n&&!new a.URI(null===(i=t.getModel())||void 0===i?void 0:i.uri).isEqual(e.resource))for(const e of this.workbenchEditorService.editorGroups)if("code"===(null===(r=e.currentOpenType)||void 0===r?void 0:r.type)){if((null===(o=e.currentEditor)||void 0===o?void 0:o.monacoEditor)===t){e.pinPreviewed(null===(s=e.currentResource)||void 0===s?void 0:s.uri);break}}else if("diff"===(null===(l=e.currentOpenType)||void 0===l?void 0:l.type)&&(e.diffEditor.modifiedEditor.monacoEditor===t||e.diffEditor.originalEditor.monacoEditor===t)){e.pinPreviewed(null===(d=e.currentResource)||void 0===d?void 0:d.uri);break}let p,h=this.workbenchEditorService.currentEditorGroup;t&&(h=this.workbenchEditorService.editorGroups.find((e=>e.currentEditor&&e.currentEditor.monacoEditor===t))||h,p=h.resources.findIndex((e=>h.currentResource&&e.uri===h.currentResource.uri)),p>=0&&p++);const m=e.options?e.options.selection:null;let g;return m&&(g="number"==typeof m.endLineNumber&&"number"==typeof m.endColumn?m:new c.Range(m.startLineNumber,m.startColumn,m.startLineNumber,m.startColumn)),await h.open(u,{index:p,range:g,focus:!0}),h.codeEditor.monacoEditor}};i.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),i.__metadata("design:type",h.WorkbenchEditorServiceImpl)],m.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),m=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],m),t.MonacoCodeService=m;class g extends u.ContextViewService{constructor(e){super(new l.SimpleLayoutService(e,document.body))}setContainer(e){this.menuContainer||(this.menuContainer=document.createElement("div"),this.menuContainer.className=e.className,this.menuContainer.style.left="0",this.menuContainer.style.top="0",this.menuContainer.style.position="fixed",this.menuContainer.style.zIndex="10",document.body.append(this.menuContainer)),super.setContainer(this.menuContainer)}}t.MonacoContextViewService=g},29470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorStatusBarService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(11792),s=n(23730),c=n(49539);let l=class extends o.WithEventBus{setListener(){this.workbenchEditorService.onActiveResourceChange((()=>{this.updateLanguageStatus(this.workbenchEditorService.currentEditor)})),this.workbenchEditorService.onCursorChange((e=>{this.updateCursorStatus(e)})),this.eventBus.on(c.EditorDocumentModelOptionChangedEvent,(e=>{const t=this.workbenchEditorService.currentEditor;t&&t.currentUri&&t.currentUri.isEqual(e.payload.uri)&&this.updateLanguageStatus(this.workbenchEditorService.currentEditor)}))}updateCursorStatus(e){const{position:t,selectionLength:n}=e;if(!t)return void this.statusBar.removeElement("editor-status-cursor");this.statusBar.addElement("editor-status-cursor",{name:(0,o.localize)("status-bar.editor-selection"),text:`%status-bar.label.line%${t.lineNumber}锛�%status-bar.label.column%${t.column}${n?`锛�%status-bar.label.selected%${n}锛塦:""}`,priority:4,alignment:a.StatusBarAlignment.RIGHT,command:o.EDITOR_COMMANDS.GO_TO_LINE.id,tooltip:(0,o.localize)("status.editor.goToLineCol")})}updateLanguageStatus(e){if(!e)return this.statusBar.removeElement("editor-status-language"),this.statusBar.removeElement("editor-status-encoding"),this.statusBar.removeElement("editor-status-eol"),void this.statusBar.removeElement("editor-status-space");let t="",n="",i="",r=!1,s=2;const c=e.currentDocumentModel;c&&(t=c.languageId,n=c.encoding,i=c.eol,r=c.getMonacoModel().getOptions().insertSpaces,s=c.getMonacoModel().getOptions().tabSize);const l="\n"===i?"LF":"CRLF",d=this.languageService.getLanguage(t),u=d?d.name:"";this.statusBar.addElement("editor-status-language",{name:(0,o.localize)("status-bar.editor-language"),text:u,alignment:a.StatusBarAlignment.RIGHT,priority:1,command:o.EDITOR_COMMANDS.CHANGE_LANGUAGE.id,tooltip:(0,o.localize)("status.editor.chooseLanguage")}),this.statusBar.addElement("editor-status-encoding",{name:(0,o.localize)("status-bar.editor-encoding"),text:n.toUpperCase(),alignment:a.StatusBarAlignment.RIGHT,priority:2,command:o.EDITOR_COMMANDS.CHANGE_ENCODING.id,tooltip:(0,o.localize)("status.editor.chooseEncoding")}),this.statusBar.addElement("editor-status-eol",{name:(0,o.localize)("status-bar.editor-eol"),text:l,alignment:a.StatusBarAlignment.RIGHT,priority:3,command:o.EDITOR_COMMANDS.CHANGE_EOL.id,tooltip:(0,o.localize)("status.editor.changeEol")}),this.statusBar.addElement("editor-status-space",{name:(0,o.localize)("status-bar.editor-space"),text:(r?(0,o.localize)("status-bar.label.tabType.space"):(0,o.localize)("status-bar.label.tabType.tab"))+": "+s,alignment:a.StatusBarAlignment.RIGHT,priority:4,command:void 0})}};i.__decorate([(0,r.Autowired)(a.IStatusBarService),i.__metadata("design:type",Object)],l.prototype,"statusBar",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",s.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(s.ILanguageService),i.__metadata("design:type",Object)],l.prototype,"languageService",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.EditorStatusBarService=l},4448:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentWrapper=t.ComponentsWrapper=t.EditorGroupBody=t.EditorGroupView=t.EditorGridView=t.EditorView=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(32834),a=i.__importDefault(n(616)),s=i.__importDefault(n(5868)),c=i.__importDefault(n(59864)),l=n(894),d=n(52e3),u=n(16871),p=n(12059),h=n(23730),m=i.__importDefault(n(90182)),g=n(78913),f=n(24253),_=n(92495),b=n(92675);t.EditorView=()=>{const e=a.default.useRef(),n=(0,p.useInjectable)(h.WorkbenchEditorService),i=(0,p.useInjectable)(l.ComponentRegistry).getComponentRegistryInfo("editor-widget-right"),r=i&&i.views[0].component,[o,s]=a.default.useState(n.gridReady);return a.default.useEffect((()=>{if(!o){if(!n.gridReady){const e=n.onDidGridReady((()=>{s(!0)}));return()=>e.dispose()}s(!0)}}),[]),o?a.default.createElement("div",{className:m.default.kt_workbench_editor,id:"workbench-editor",ref:t=>{e.current=t,t&&n.onDomCreated(t)}},a.default.createElement("div",{className:m.default.kt_editor_main_wrapper},a.default.createElement(t.EditorGridView,{grid:n.topGrid})),r?a.default.createElement("div",{className:m.default.kt_editor_right_widget},a.default.createElement(l.ErrorBoundary,null,a.default.createElement(r,null))):null):null};const y={};t.EditorGridView=({grid:e})=>{let n;const i=a.default.useContext(l.ConfigContext),o=(0,p.useInjectable)(l.IEventBus),c=[],[,u]=a.default.useState(),h=a.default.useCallback((()=>u({})),[]);if(a.default.useEffect((()=>{if(n)if(y[e.editorGroup.name])n.appendChild(y[e.editorGroup.name]),e.editorGroup.layoutEditors();else{const r=document.createElement("div");y[e.editorGroup.name]=r,r.style.height="100%",n.appendChild(r),s.default.render(a.default.createElement(l.ConfigProvider,{value:i},a.default.createElement(t.EditorGroupView,{group:e.editorGroup})),r)}})),(0,l.useDisposable)((()=>[o.on(b.EditorGroupsResetSizeEvent,(()=>{e.splitDirection&&c.length>0&&c.forEach((t=>{t.setSize(1/e.children.length,1/e.children.length)}))})),e.onDidGridStateChange((()=>{h()}))]),[]),0===e.children.length&&e.editorGroup)return a.default.createElement("div",{style:{height:"100%"},ref:e=>e&&(n=e)});const f=e.splitDirection===g.SplitDirection.Horizontal?{width:100/e.children.length+"%"}:{height:100/e.children.length+"%"},_=[];return e.children.forEach(((n,i)=>{0!==i&&(e.splitDirection===g.SplitDirection.Vertical?_.push(a.default.createElement(d.ResizeHandleVertical,{key:"resize-"+e.children[i-1].uid+"-"+n.uid,onResize:()=>{e.children[i-1].emitResizeWithEventBus(o),n.emitResizeWithEventBus(o)},delegate:e=>{c.push(e)},flexMode:d.ResizeFlexMode.Percentage})):_.push(a.default.createElement(d.ResizeHandleHorizontal,{key:"resize-"+e.children[i-1].uid+"-"+n.uid,onResize:()=>{e.children[i-1].emitResizeWithEventBus(o),n.emitResizeWithEventBus(o)},delegate:e=>{c.push(e)}}))),_.push(a.default.createElement("div",{className:(0,r.default)({[m.default.kt_grid_vertical_child]:e.splitDirection===g.SplitDirection.Vertical,[m.default.kt_grid_horizontal_child]:e.splitDirection===g.SplitDirection.Horizontal}),style:f,key:n.uid,"data-min-resize":e.splitDirection===g.SplitDirection.Horizontal?150:60},a.default.createElement(t.EditorGridView,{grid:n})))})),a.default.createElement("div",{className:(0,r.default)({[m.default.kt_grid_vertical]:e.splitDirection===g.SplitDirection.Vertical,[m.default.kt_grid_horizontal]:e.splitDirection===g.SplitDirection.Horizontal})},_)};const v={},C={},S=({editorBackgroundImage:e})=>e?a.default.createElement("div",{className:m.default.editorEmpty},a.default.createElement("img",{className:m.default.editorEmptyImg,src:e})):null;t.EditorGroupView=(0,o.observer)((({group:e})=>{const n=a.default.useRef(),i=(0,p.useInjectable)(l.PreferenceService),[r,o]=a.default.useState(0===e.resources.length),s=(0,p.useInjectable)(l.AppConfig),{editorBackgroundImage:d}=s;a.default.useEffect((()=>{e.attachToDom(n.current)})),a.default.useEffect((()=>{o(0===e.resources.length);const t=e.onDidEditorGroupTabChanged((()=>{o(0===e.resources.length)}));return()=>{t.dispose()}}),[]);const[u,h]=a.default.useState((()=>!!i.get("editor.showActionWhenGroupEmpty")));(0,l.useDisposable)((()=>[i.onPreferenceChanged((e=>{"editor.showActionWhenGroupEmpty"===e.preferenceName&&h(!!e.newValue)}))]),[]);const g=(0,p.useInjectable)(l.ComponentRegistry),f=a.default.useMemo((()=>{const e=g.getComponentRegistryInfo("editor-empty");return e&&e.views[0]||{component:S,initialProps:{editorBackgroundImage:d}}}),[]);return a.default.createElement("div",{ref:n,className:m.default.kt_editor_group,tabIndex:1,onFocus:t=>{e.gainFocus()}},(!r||u)&&a.default.createElement("div",{className:m.default.editorGroupHeader},a.default.createElement(_.Tabs,{group:e})),a.default.createElement(t.EditorGroupBody,{group:e}),r&&a.default.createElement("div",{className:m.default.kt_editor_background,style:{backgroundImage:!f&&d?`url(${d})`:"none"}},f&&c.default.isValidElementType(f.component)?a.default.createElement(l.ErrorBoundary,null,a.default.createElement(f.component,f.initialProps)):null))})),t.EditorGroupBody=(0,o.observer)((({group:e})=>{const n=a.default.useRef(null),i=(0,p.useInjectable)(h.WorkbenchEditorService),o=(0,p.useInjectable)(l.IEventBus),s=[],c=a.default.useRef(null),d=a.default.useRef(null),[,u]=a.default.useState(),g=a.default.useCallback((()=>u({})),[]);a.default.useEffect((()=>{if(c.current)if(v[e.name])v[e.name].remove(),c.current.appendChild(v[e.name]);else{const t=document.createElement("div");c.current.appendChild(t),v[e.name]=t,e.createEditor(t)}if(d.current)if(C[e.name])C[e.name].remove(),d.current.appendChild(C[e.name]);else{const t=document.createElement("div");d.current.appendChild(t),C[e.name]=t,e.createDiffEditor(t)}}),[c.current]),(0,l.useDisposable)((()=>e.onDidEditorGroupBodyChanged((()=>{g()}))),[]),e.activeComponents.forEach(((n,i)=>{const o=e.activateComponentsProps.get(i);s.push(a.default.createElement("div",{key:i.uid,className:(0,r.default)({[m.default.kt_hidden]:!(e.currentOpenType&&e.currentOpenType.componentId===i.uid)})},a.default.createElement(t.ComponentsWrapper,Object.assign({key:i.uid,component:i},o,{resources:n,current:e.currentResource}))))}));const _=a.default.useMemo((()=>0===e.resources.length||!e.currentResource),[e.resources.length,e.currentResource]);return a.default.useEffect((()=>{var t,n;"code"===(null===(t=e.currentOpenType)||void 0===t?void 0:t.type)?o.fire(new b.CodeEditorDidVisibleEvent({groupName:e.name,type:"code",editorId:e.codeEditor.getId()})):"diff"===(null===(n=e.currentOpenType)||void 0===n?void 0:n.type)&&o.fire(new b.CodeEditorDidVisibleEvent({groupName:e.name,type:"diff",editorId:e.diffEditor.modifiedEditor.getId()}))})),a.default.createElement("div",{ref:n,className:m.default.kt_editor_body,onDragOver:e=>{if(e.preventDefault(),n.current){const t=w(e.nativeEvent,n.current);!function(e,t){E(e,m.default.kt_on_drag_over),[b.DragOverPosition.LEFT,b.DragOverPosition.RIGHT,b.DragOverPosition.TOP,b.DragOverPosition.BOTTOM].filter((e=>e!==t)).forEach((t=>{k(e,m.default["kt_on_drag_over_"+t])})),E(e,m.default["kt_on_drag_over_"+t])}(n.current,t)}},onDragLeave:e=>{n.current&&x(n.current)},onDrop:t=>{if(n.current){if(x(n.current),t.dataTransfer.getData("uri")){const r=new l.URI(t.dataTransfer.getData("uri"));let o;t.dataTransfer.getData("uri-source-group")&&(o=i.getEditorGroup(t.dataTransfer.getData("uri-source-group"))),e.dropUri(r,w(t.nativeEvent,n.current),o)}t.dataTransfer.files.length>0&&o.fire(new b.EditorGroupFileDropEvent({group:e,files:t.dataTransfer.files,position:w(t.nativeEvent,n.current)}))}}},!_&&a.default.createElement(f.NavigationBar,{editorGroup:e}),a.default.createElement("div",{className:m.default.kt_editor_components},a.default.createElement("div",{className:(0,r.default)({[m.default.kt_editor_component]:!0,[m.default.kt_hidden]:!e.currentOpenType||"component"!==e.currentOpenType.type})},s),a.default.createElement("div",{className:(0,r.default)({[m.default.kt_editor_code_editor]:!0,[m.default.kt_editor_component]:!0,[m.default.kt_hidden]:!e.currentOpenType||"code"!==e.currentOpenType.type}),ref:c}),a.default.createElement("div",{className:(0,r.default)(m.default.kt_editor_diff_editor,m.default.kt_editor_component,{[m.default.kt_hidden]:!e.currentOpenType||"diff"!==e.currentOpenType.type}),ref:d})),e.currentResource&&a.default.createElement(T,{side:"bottom",resource:e.currentResource}))}));t.ComponentsWrapper=e=>{var{component:n,resources:r,current:o}=e,s=i.__rest(e,["component","resources","current"]);return a.default.createElement("div",{className:m.default.kt_editor_component_wrapper},r.map((e=>a.default.createElement(t.ComponentWrapper,Object.assign({},s,{key:e.toString(),component:n,resource:e,hidden:!(o&&o.uri.toString()===e.uri.toString())})))))};function w(e,t){const n=t.getBoundingClientRect(),i=e.clientX-n.left,r=e.clientY-n.top,o=t.offsetWidth,a=t.offsetHeight;return i<.15*o?b.DragOverPosition.LEFT:i>.85*o?b.DragOverPosition.RIGHT:r<.15*a?b.DragOverPosition.TOP:r>.85*a?b.DragOverPosition.BOTTOM:b.DragOverPosition.CENTER}function E(e,t){e.classList.contains(t)||e.classList.add(t)}function k(e,t){e.classList.contains(t)&&e.classList.remove(t)}function x(e){k(e,m.default.kt_on_drag_over),[b.DragOverPosition.LEFT,b.DragOverPosition.RIGHT,b.DragOverPosition.TOP,b.DragOverPosition.BOTTOM].forEach((t=>{k(e,m.default["kt_on_drag_over_"+t])}))}t.ComponentWrapper=e=>{var{component:t,resource:n,hidden:o}=e,c=i.__rest(e,["component","resource","hidden"]);const d=(0,p.useInjectable)(b.EditorComponentRegistry);let h,g=null;t.renderMode!==b.EditorComponentRenderMode.ONE_PER_WORKBENCH&&(h=a.default.createElement(t.component,Object.assign({resource:n},c)));const f=a.default.useContext(l.ConfigContext);return a.default.useEffect((()=>{if(t.renderMode===b.EditorComponentRenderMode.ONE_PER_WORKBENCH){if(!d.perWorkbenchComponents[t.uid]){const e=document.createElement("div");e.style.height="100%",d.perWorkbenchComponents[t.uid]=e,s.default.render(a.default.createElement(l.ConfigProvider,{value:f},a.default.createElement(t.component,{resource:n})),e)}g.appendChild(d.perWorkbenchComponents[t.uid])}})),a.default.createElement("div",{key:n.uri.toString(),className:(0,r.default)({[m.default.kt_hidden]:o})},a.default.createElement(u.Scroll,null,a.default.createElement(l.ErrorBoundary,null,a.default.createElement("div",{ref:e=>{g=e},style:{height:"100%"}},h))))};const T=({side:e,resource:t})=>{const n=(0,p.useInjectable)(b.EditorComponentRegistry),i=(0,p.useInjectable)(l.IEventBus),o=n.getSideWidgets(e,t),[,s]=a.default.useState(),c=a.default.useCallback((()=>s({})),[]);return(0,l.useDisposable)((()=>i.on(b.RegisterEditorSideComponentEvent,c)),[]),a.default.createElement("div",{className:(0,r.default)(m.default.kt_editor_side_widgets,m.default["kt_editor_side_widgets_"+e])},o.map((e=>{const n=e.component;return a.default.createElement(n,Object.assign({resource:t,key:e.id},e.initialProps))})))}},11313:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEditorError=t.EditorTabChangedError=t.EditorError=void 0;class n extends Error{}t.EditorError=n;class i extends n{constructor(){super("editor current tab changed when opening resource"),this.type=i.errorCode}}t.EditorTabChangedError=i,i.errorCode=1001,t.isEditorError=function(e,t){return e&&e.type===t.errorCode}},61173:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorFeatureRegistryImpl=void 0;const i=n(70655),r=n(39993),o=n(894),{addElement:a}=o.arrays;let s=class{constructor(){this.contributions=[],this._onDidRegisterFeature=new o.Emitter,this.onDidRegisterFeature=this._onDidRegisterFeature.event}registerEditorFeatureContribution(e){const t=a(this.contributions,e);return this._onDidRegisterFeature.fire(e),t}runContributions(e){this.contributions.forEach((t=>{this.runOneContribution(e,t)}))}async runProvideEditorOptionsForUri(e){return(await Promise.all(this.contributions.map((t=>t.provideEditorOptionsForUri?t.provideEditorOptionsForUri(e):{})))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}runOneContribution(e,t){try{const n=t.contribute(e);e.onDispose((()=>{n.dispose()}))}catch(e){this.logger.error(e)}}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],s.prototype,"logger",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.EditorFeatureRegistryImpl=s},70103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentFormatService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(15353),s=n(67266),c=n(16004),l=n(53750),d=n(92675),u=n(97276),p=n(4262);let h=class{async formatDocumentWith(){var e,t;const n=null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.monacoEditor.getModel();if(n){const e=(0,c.getRealAndSyntheticDocumentFormattersOrdered)(n),i=this.injector.get(p.FormattingSelector),r=await i.select(e,n,c.FormattingMode.Explicit,!0);if(r)try{const e=await r.provideDocumentFormattingEdits(n,n.getFormattingOptions(),o.CancellationToken.None);e&&l.FormattingEdit.execute(null===(t=this.workbenchEditorService.currentEditor)||void 0===t?void 0:t.monacoEditor,e,!0)}catch(e){this.logger.error("execute format document with error",e)}}}async formatSelectionWith(){var e,t,n,i;if(!(null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.monacoEditor.hasModel()))return;const r=null===(t=this.workbenchEditorService.currentEditor)||void 0===t?void 0:t.monacoEditor.getModel();if(r){let e=null===(n=this.workbenchEditorService.currentEditor)||void 0===n?void 0:n.monacoEditor.getSelection();(null==e?void 0:e.isEmpty())&&(e=new a.Range(e.startLineNumber,1,e.startLineNumber,r.getLineMaxColumn(e.startLineNumber)));const t=s.DocumentRangeFormattingEditProviderRegistry.ordered(r),d=this.injector.get(p.FormattingSelector),u=await d.select(t,r,c.FormattingMode.Explicit,!0);if(u)try{const t=await u.provideDocumentRangeFormattingEdits(r,e,r.getFormattingOptions(),o.CancellationToken.None);t&&l.FormattingEdit.execute(null===(i=this.workbenchEditorService.currentEditor)||void 0===i?void 0:i.monacoEditor,t,!0)}catch(e){this.logger.error("execute format document with error",e)}}}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],h.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(d.WorkbenchEditorService),i.__metadata("design:type",u.WorkbenchEditorServiceImpl)],h.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],h.prototype,"injector",void 0),h=i.__decorate([(0,r.Injectable)()],h),t.DocumentFormatService=h},4262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormattingSelector=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(16004),s=n(49539);let c=class{async select(e,t,n,i=!1){const r=this.modelService.getModelReference(o.URI.from(t.uri.toJSON()));if(!r)return;const s=r.instance.languageId;let c;r.dispose(),i||(c=(this.preferenceService.get("editor.preferredFormatter")||{})[s]);const l={};if(e.forEach((e=>{e.extensionId&&(l[e.extensionId]=e)})),c&&!i){const t=e.findIndex((e=>e.extensionId===c));if(t>=0)return e[t]}else if(e.length<2&&!i)return e[0];if(n===a.FormattingMode.Explicit){const e=await this.quickPickService.show(Object.keys(l).map((e=>({label:l[e].displayName,value:l[e].extensionId}))),{placeholder:(0,o.localize)("editor.format.chooseFormatter")});if(e){const t=this.preferenceService.get("editor.preferredFormatter")||{};return this.preferenceService.set("editor.preferredFormatter",Object.assign(Object.assign({},t),{[s]:e}),o.PreferenceScope.User),l[e]}}}};i.__decorate([(0,r.Autowired)(o.QuickPickService),i.__metadata("design:type",Object)],c.prototype,"quickPickService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(s.IEditorDocumentModelService),i.__metadata("design:type",Object)],c.prototype,"modelService",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.FormattingSelector=c},39953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeSet=t.FileTreeNode=void 0;class n{constructor(e,t,n="/"){this.path=e,this.parent=t,this.separator=n,this._disposed=!1,this.key=t?t.key+this.separator+e:e}get children(){return this._children||(this._children=new Map),this._children}bindOnDispose(e){this._onDisposed=e}addChild(e){const t=new n(e,this,this.separator);return this.children.set(e,t),t}getAllDescendants(){if(this._children){const e=[this];return this.children.forEach((t=>{e.push(...t.getAllDescendants())})),e}return[this]}dispose(){this._disposed||(this.parent&&(this.parent.children.delete(this.path),0===this.parent.children.size&&this.parent.dispose()),this._onDisposed&&this._onDisposed(),this._disposed=!0)}}t.FileTreeNode=n;t.FileTreeSet=class{constructor(e=!1){this.nodes=new Map,this.separator=e?"\\":"/"}add(e){const t=e.split(this.separator);let i,r;for(const e of t){let t;void 0===i?i=e:i+=this.separator+e,this.nodes.has(i)?t=this.nodes.get(i):(t=r?r.addChild(e):new n(e,void 0,this.separator),t.bindOnDispose((()=>{this.nodes.delete(t.key)})),this.nodes.set(t.key,t)),r=t}}delete(e){const t=this.effects(e);return t.forEach((e=>{const t=this.nodes.get(e);t&&t.dispose()})),t}effects(e){const t=this.nodes.get(e);return t?t.getAllDescendants().map((e=>e.key)):[]}}},6146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseFileSystemEditorDocumentProvider=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(33361),s=n(91793);let c=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this._fileContentMd5OnBrowserFs=new Set,this._detectedEncodingMap=new Map,this.fileServiceClient.onFilesChanged((e=>{e.forEach((e=>{this._fileContentMd5OnBrowserFs.has(e.uri)&&(e.type!==o.FileChangeType.ADDED&&e.type!==o.FileChangeType.UPDATED||this._onDidChangeContent.fire(new o.URI(e.uri)))}))}))}handlesScheme(e){return this.fileServiceClient.handlesScheme(e)}provideEncoding(e){return this._detectedEncodingMap.get(e.toString())||o.UTF8}async provideEOL(e){const t=await this.applicationService.getBackendOS(),n=this.preferenceService.get("files.eol","auto",e.toString(),(0,o.getLanguageIdFromMonaco)(e));return"auto"!==n?n:t===o.OperatingSystem.Windows?"\r\n":"\n"}async read(e,t){const{content:n}=await this.fileServiceClient.readFile(e.toString()),i=t.autoGuessEncoding||this.preferenceService.get("files.autoGuessEncoding",void 0,e.toString(),(0,o.getLanguageIdFromMonaco)(e)),r=await(0,o.detectEncodingFromBuffer)(n,i);r.encoding=await this.getReadEncoding(e,t,r.encoding);const a=n.toString(r.encoding),s=e.toString();return this._detectedEncodingMap.set(s,r.encoding),this._fileContentMd5OnBrowserFs.add(s),{encoding:r.encoding||o.UTF8,content:a}}async provideEditorDocumentModelContent(e,t){return(await this.read(e,{encoding:t})).content}async isReadonly(e){const t=this.editorPreferences["editor.readonlyFiles"];if(t&&t.length)for(const n of t)if(e.isEqual(o.URI.file(n))||e.matchGlobPattern(n)||e.toString().endsWith(n.replace("./","")))return!0;return this.fileServiceClient.isReadonly(e.toString())}async saveDocumentModel(e,t,n,i,r,o=!1){try{const n=await this.fileServiceClient.getFileStat(e.toString());return n?await this.fileServiceClient.setContent(n,t,{encoding:r}):await this.fileServiceClient.createFile(e.toString(),{content:t,overwrite:!0,encoding:r}),{state:"success"}}catch(e){return{state:"error",errorMessage:e.message}}}onDidDisposeModel(e){this._fileContentMd5OnBrowserFs.delete(e.toString())}async guessEncoding(e){return(await this.read(e,{autoGuessEncoding:!0})).encoding}getReadEncoding(e,t,n){let i;return(null==t?void 0:t.encoding)?i=n===o.UTF8_with_bom&&t.encoding===o.UTF8?o.UTF8_with_bom:t.encoding:n&&(i=n),this.getEncodingForResource(e,i)}async getEncodingForResource(e,t){return this.encodingRegistry.getEncodingForResource(e,t)}};i.__decorate([(0,r.Autowired)(a.IFileServiceClient),i.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),i.__decorate([(0,r.Autowired)(s.EditorPreferences),i.__metadata("design:type",Object)],c.prototype,"editorPreferences",void 0),i.__decorate([(0,r.Autowired)(o.IApplicationService),i.__metadata("design:type",Object)],c.prototype,"applicationService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],c.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(o.EncodingRegistry),i.__metadata("design:type",o.EncodingRegistry)],c.prototype,"encodingRegistry",void 0),c=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],c),t.BaseFileSystemEditorDocumentProvider=c},4712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemResourceProvider=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(11792),s=n(90642),c=n(17735),l=n(1500),d=n(23730),u=n(23730),p=n(49539),h=n(39953),{Path:m}=s.path;let g=class extends o.WithEventBus{constructor(){super(),this.cachedFileStat=new o.LRUMap(200,100),this.ready=this.init(),this.listen()}async init(){const e=await this.applicationService.getBackendOS();this.involvedFiles=new h.FileTreeSet(e===o.OperatingSystem.Windows)}handlesUri(e){const t=e.scheme;return this.fileServiceClient.handlesScheme(t)?10:-1}listen(){this.fileServiceClient.onFilesChanged((e=>{e.forEach((e=>{var t;if(e.type===s.FileChangeType.ADDED||e.type===s.FileChangeType.DELETED){(null===(t=this.involvedFiles)||void 0===t?void 0:t.effects(new o.URI(e.uri).codeUri.fsPath)).forEach((e=>{const t=o.URI.file(e);this.cachedFileStat.delete(t.toString()),this.eventBus.fire(new d.ResourceNeedUpdateEvent(t))}))}else this.cachedFileStat.has(e.uri)&&void 0===this.cachedFileStat.get(e.uri)&&(this.cachedFileStat.delete(e.uri),this.eventBus.fire(new d.ResourceNeedUpdateEvent(new o.URI(e.uri))))}))})),this.labelService.onDidChange((e=>{var t;e.codeUri.fsPath&&(null===(t=this.involvedFiles)||void 0===t?void 0:t.effects(e.codeUri.fsPath))&&this.eventBus.fire(new d.ResourceNeedUpdateEvent(e))}))}async getFileStat(e){return this.cachedFileStat.has(e)||this.cachedFileStat.set(e,await this.fileServiceClient.getFileStat(e.toString())),this.cachedFileStat.get(e)}async provideResource(e){return await this.ready,this.involvedFiles.add(e.codeUri.fsPath),Promise.all([this.getFileStat(e.toString()),this.labelService.getName(e),this.labelService.getIcon(e)]).then((([t,n,i])=>({name:t?n:n+(0,o.localize)("file.resource-deleted","(宸插垹闄�)"),icon:i,uri:e,metadata:null,deleted:!t,supportsRevive:!0})))}provideResourceSubname(e,t){const n=[];for(const i of t)this.fileServiceClient.handlesScheme(i.uri.scheme)&&i.uri.displayName===e.uri.displayName&&i!==e&&n.push(i.uri);return n.length>0?"..."+m.separator+function(e,t){const n=e.path.dir.toString().split(m.separator).reverse(),i=t.map((e=>e.path.dir.toString().split(m.separator).reverse()));for(let e=0;e1)return!0;const i=this.documentModelService.getModelReference(e.uri,"close-resource-check");if(!i||!i.instance.dirty)return i&&i.dispose(),!0;const r={[(0,o.localize)("file.prompt.dontSave","涓嶄繚瀛�")]:d.AskSaveResult.REVERT,[(0,o.localize)("file.prompt.save","淇濆瓨")]:d.AskSaveResult.SAVE,[(0,o.localize)("file.prompt.cancel","鍙栨秷")]:d.AskSaveResult.CANCEL},a=r[await this.dialogService.open((0,o.formatLocalize)("saveChangesMessage",e.name),o.MessageType.Info,Object.keys(r))];return this.close(e,a)}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",a.LabelService)],g.prototype,"labelService",void 0),i.__decorate([(0,r.Autowired)(c.IFileServiceClient),i.__metadata("design:type",Object)],g.prototype,"fileServiceClient",void 0),i.__decorate([(0,r.Autowired)(l.IDialogService),i.__metadata("design:type",Object)],g.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),i.__metadata("design:type",Object)],g.prototype,"documentModelService",void 0),i.__decorate([(0,r.Autowired)(o.IApplicationService),i.__metadata("design:type",Object)],g.prototype,"applicationService",void 0),g=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],g),t.FileSystemResourceProvider=g},40572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemResourceContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(92675),s=n(6146),c=n(4712);let l=class{registerResource(e){e.registerResourceProvider(this.fsResourceProvider)}registerEditorDocumentModelContentProvider(e){e.registerEditorDocumentModelContentProvider(this.fsDocProvider)}};i.__decorate([(0,r.Autowired)(c.FileSystemResourceProvider),i.__metadata("design:type",c.FileSystemResourceProvider)],l.prototype,"fsResourceProvider",void 0),i.__decorate([(0,r.Autowired)(s.BaseFileSystemEditorDocumentProvider),i.__metadata("design:type",s.BaseFileSystemEditorDocumentProvider)],l.prototype,"fsDocProvider",void 0),l=i.__decorate([(0,o.Domain)(a.BrowserEditorContribution)],l),t.FileSystemResourceContribution=l},78913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitDirectionMatches=t.SplitDirection=t.EditorGrid=t.editorGridUid=void 0;const i=n(894),r=n(90642),o=n(23730),a=n(92675);t.editorGridUid=new Set;class s{constructor(e){this.parent=e,this.editorGroup=null,this.children=[],this._onDidGridStateChange=new i.Emitter,this.onDidGridStateChange=this._onDidGridStateChange.event,this._onDidGridAndDesendantStateChange=new i.Emitter,this.onDidGridAndDesendantStateChange=this._onDidGridAndDesendantStateChange.event;let n=(0,r.makeRandomHexString)(5);for(;t.editorGridUid.has(n);)n=(0,r.makeRandomHexString)(5);this.uid=n,t.editorGridUid.add(n),this.onDidGridStateChange((()=>{var e;this._onDidGridAndDesendantStateChange.fire(),null===(e=this.parent)||void 0===e||e._onDidGridAndDesendantStateChange.fire()}))}setEditorGroup(e){this.editorGroup=e,e.grid=this,this.splitDirection=void 0}generateSplitParent(e,t,n){this.splitDirection=e;const i=new s(this);i.setEditorGroup(this.editorGroup),this.editorGroup=null;const r=new s(this);r.setEditorGroup(t),this.children=n?[r,i]:[i,r],this._onDidGridStateChange.fire()}generateSplitSibling(e,t){if(this.parent){const n=this.parent.children.indexOf(this),i=new s(this.parent);i.setEditorGroup(e),t?this.parent.children.splice(n,0,i):this.parent.children.splice(n+1,0,i),this.parent._onDidGridStateChange.fire()}}split(e,t,n){this.splitDirection||(this.parent?this.parent.splitDirection===e?this.generateSplitSibling(t,n):this.parent.splitDirection!==e&&this.generateSplitParent(e,t,n):this.generateSplitParent(e,t,n))}dispose(){if(this.editorGroup){if(this.editorGroup=null,!this.parent)return;const e=this.parent.children.indexOf(this);this.parent.children.splice(e,1),1===this.parent.children.length&&this.parent.replaceBy(this.parent.children[0]),this.parent._onDidGridStateChange.fire()}}replaceBy(e){e.editorGroup&&this.setEditorGroup(e.editorGroup),this.splitDirection=e.splitDirection,this.children.splice(0,this.children.length,...e.children.splice(0,e.children.length)),this.children.forEach((e=>{e.parent=this})),this.parent&&this.parent._onDidGridStateChange.fire()}emitResizeWithEventBus(e){e.fire(new a.GridResizeEvent({gridId:this.uid})),this.children.forEach((t=>{t.emitResizeWithEventBus(e)}))}serialize(){if(this.editorGroup){const e=this.editorGroup.getState();return this.parent&&0===e.uris.length?null:{editorGroup:e}}{if(this.parent&&0===this.children.length)return null;const e=this.children.map((e=>e.serialize())).filter((e=>!!e));return 1===e.length?e[0]:{splitDirection:this.splitDirection,children:e}}}async deserialize(e,t,n){const i=[];return e.editorGroup?(this.setEditorGroup(t()),n.push(this.editorGroup.restoreState(e.editorGroup))):(this.splitDirection=e.splitDirection,this.children=(e.children||[]).map((e=>{const r=new s(this);return i.push(r.deserialize(e,t,n)),r}))),Promise.all(i)}findGird(e,t=0){if(this.splitDirection&&l(this.splitDirection,e)){const n=t+(e===o.Direction.LEFT||e===o.Direction.UP?-1:1);if(this.children[n])return this.children[n].getFirstLeaf()}return this.parent?this.parent.findGird(e,this.parent.children.indexOf(this)):null}getFirstLeaf(){return this.editorGroup?this:this.children.length>0?this.children[0].getFirstLeaf():null}sortEditorGroups(e){this.editorGroup?e.push(this.editorGroup):this.children.length>0&&this.children.forEach((t=>{t.sortEditorGroups(e)}))}move(e){if(this.parent)if(this.parent.splitDirection===c.Horizontal){if(e===o.Direction.LEFT){const e=this.parent.children.indexOf(this);e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._onDidGridStateChange.fire())}else if(e===o.Direction.RIGHT){const e=this.parent.children.indexOf(this);e0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._onDidGridStateChange.fire())}else if(e===o.Direction.DOWN){const e=this.parent.children.indexOf(this);e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorHistoryState=t.EditorHistoryService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(23730),s=n(92675);let c=class extends o.WithEventBus{constructor(){super(...arguments),this.currentIndex=-1,this.stack=[],this.closedStack=[]}start(){}onEditorSelectionChangeEvent(e){e.payload.selections[0]&&this.onNewState(new l(e.payload.editorUri,{lineNumber:e.payload.selections[0].selectionStartLineNumber,column:e.payload.selections[0].selectionStartColumn},e.payload.group.index,!1))}onEditorGroupChangeEvent(e){if(e.payload.newOpenType&&("code"===e.payload.newOpenType.type||"diff"===e.payload.newOpenType.type)){const t=e.payload.group.currentEditor.getSelections();t&&t.length>0&&this.onNewState(new l(e.payload.newResource.uri,{lineNumber:t[0].selectionStartLineNumber,column:t[0].selectionStartColumn},e.payload.group.index,!0))}}onEditorGroupCloseEvent(e){this.pushClosed(e.payload.resource.uri)}onNewState(e){if(this.currentIndex!==this.stack.length-1){if(e.isTabChange&&this.currentState.isRelevant(e))return;if(this.currentState&&this.currentState.isEqual(e))return}const t=this.currentState&&this.currentState.isRelevant(e);this.doPushState(e,t)}get currentState(){return this.stack[this.currentIndex]}doPushState(e,t){this.stack.splice(this.currentIndex+(t?0:1)),this.stack.push(e),this.stack.length>200&&this.stack.splice(0,this.stack.length-100),this.currentIndex=this.stack.length-1}forward(){this.currentIndex0&&(this.currentIndex--,this.restoreState(this.currentState))}restoreState(e){if(!e)return;(this.editorService.editorGroups[e.groupIndex]||this.editorService.currentEditorGroup).open(e.uri,{range:{startColumn:e.position.column,startLineNumber:e.position.lineNumber,endColumn:e.position.column,endLineNumber:e.position.lineNumber},focus:!0})}pushClosed(e){this.closedStack.push(e),this.closedStack.length>200&&this.closedStack.splice(0,this.closedStack.length-100)}popClosed(){const e=this.closedStack.pop();e&&(this.editorService.open(e,{focus:!0}),this.closedStack=this.closedStack.filter((t=>!e.isEqual(t))))}};i.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),i.__metadata("design:type",a.WorkbenchEditorService)],c.prototype,"editorService",void 0),i.__decorate([(0,o.OnEvent)(s.EditorSelectionChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[s.EditorSelectionChangeEvent]),i.__metadata("design:returntype",void 0)],c.prototype,"onEditorSelectionChangeEvent",null),i.__decorate([(0,o.OnEvent)(s.EditorGroupChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[s.EditorGroupChangeEvent]),i.__metadata("design:returntype",void 0)],c.prototype,"onEditorGroupChangeEvent",null),i.__decorate([(0,o.OnEvent)(s.EditorGroupCloseEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[s.EditorGroupCloseEvent]),i.__metadata("design:returntype",void 0)],c.prototype,"onEditorGroupCloseEvent",null),c=i.__decorate([(0,r.Injectable)()],c),t.EditorHistoryService=c;class l{constructor(e,t,n,i){this.uri=e,this.position=t,this.groupIndex=n,this.isTabChange=i}isRelevant(e){if(this.uri.isEqual(e.uri)){if(e.position.lineNumberthis.position.lineNumber-7)return!0;if(this.isTabChange||e.isTabChange)return!0}return!1}isEqual(e){return this.uri.isEqual(e.uri)&&this.position.lineNumber===e.position.lineNumber&&this.position.column===e.position.column}}t.EditorHistoryState=l},70888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorClientAppContribution=t.EditorModule=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(61344),s=n(65135),c=n(69387),l=n(6109),d=n(23730),u=n(95335),p=n(72082),h=n(94571),m=n(88806),g=n(80055),f=n(8769),_=n(83720),b=n(46772),y=n(49539),v=n(35579),C=n(1748),S=n(88012),w=n(4448),E=n(61173),k=n(40572),x=n(78686),T=n(2620),D=n(6959),A=n(24210),I=n(37312),M=n(12246),R=n(79778),P=n(2052),O=n(34496),N=n(91793),L=n(12820),F=n(92675),B=n(97276);i.__exportStar(n(91793),t),i.__exportStar(n(92675),t),i.__exportStar(n(49539),t),i.__exportStar(n(8769),t),i.__exportStar(n(82871),t),i.__exportStar(n(5146),t);let j=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:d.EditorCollectionService,useClass:v.EditorCollectionServiceImpl},{token:d.WorkbenchEditorService,useClass:B.WorkbenchEditorServiceImpl},{token:d.ResourceService,useClass:L.ResourceServiceImpl},{token:F.EditorComponentRegistry,useClass:h.EditorComponentRegistryImpl},{token:F.IEditorDecorationCollectionService,useClass:S.EditorDecorationCollectionService},{token:y.IEditorDocumentModelContentRegistry,useClass:_.EditorDocumentModelContentRegistryImpl},{token:y.IEditorDocumentModelService,useClass:_.EditorDocumentModelServiceImpl},{token:d.ILanguageService,useClass:D.LanguageService},{token:F.IEditorActionRegistry,useClass:A.EditorActionRegistryImpl},{token:u.IDocPersistentCacheProvider,useClass:f.EmptyDocCacheImpl},{token:F.ICompareService,useClass:g.CompareService},{token:F.IBreadCrumbService,useClass:p.BreadCrumbServiceImpl},{token:F.IEditorFeatureRegistry,useClass:E.EditorFeatureRegistryImpl},{token:N.EditorPreferences,useFactory:e=>{const t=e.get(o.PreferenceService);return(0,o.createPreferenceProxy)(t,N.editorPreferenceSchema)}},{token:a.ICallHierarchyService,useClass:M.CallHierarchyService},{token:l.ITypeHierarchyService,useClass:M.TypeHierarchyService},{token:s.ICommandServiceToken,useClass:R.MonacoCommandService},{token:s.IMonacoCommandsRegistry,useClass:R.MonacoCommandRegistry},{token:s.IMonacoActionRegistry,useClass:R.MonacoActionRegistry},{token:c.ITextmateTokenizer,useClass:P.TextmateService},{token:F.ILanguageStatusService,useClass:T.LanguageStatusService},O.EditorPreferenceContribution,m.DefaultDiffEditorContribution,z,C.EditorContribution,g.CompareEditorContribution,C.EditorAutoSaveEditorContribution,b.SaveParticipantsContribution,k.FileSystemResourceContribution,M.CallHierarchyContribution,M.TypeHierarchyContribution,x.LanguageStatusContribution,I.OpenTypeMenuContribution],this.contributionProvider=F.BrowserEditorContribution,this.component=w.EditorView}};j=i.__decorate([(0,r.Injectable)()],j),t.EditorModule=j;let z=class{async initialize(){for(const e of this.contributions.getContributions())e.registerResource&&e.registerResource(this.resourceService),e.registerEditorComponent&&e.registerEditorComponent(this.editorComponentRegistry),e.registerEditorDocumentModelContentProvider&&e.registerEditorDocumentModelContentProvider(this.modelContentRegistry),e.registerEditorActions&&e.registerEditorActions(this.editorActionRegistry),e.registerEditorFeature&&e.registerEditorFeature(this.editorFeatureRegistry);this.workbenchEditorService.contributionsReady.resolve(),await Promise.all([this.workbenchEditorService.initialize(),this.modelService.initialize()])}async onDidStart(){this.workbenchEditorService.prepareContextKeyService()}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",d.ResourceService)],z.prototype,"resourceService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",F.EditorComponentRegistry)],z.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,r.Autowired)(d.WorkbenchEditorService),i.__metadata("design:type",B.WorkbenchEditorServiceImpl)],z.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(y.IEditorDocumentModelContentRegistry),i.__metadata("design:type",Object)],z.prototype,"modelContentRegistry",void 0),i.__decorate([(0,r.Autowired)(F.IEditorActionRegistry),i.__metadata("design:type",Object)],z.prototype,"editorActionRegistry",void 0),i.__decorate([(0,r.Autowired)(F.IEditorFeatureRegistry),i.__metadata("design:type",Object)],z.prototype,"editorFeatureRegistry",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],z.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(y.IEditorDocumentModelService),i.__metadata("design:type",_.EditorDocumentModelServiceImpl)],z.prototype,"modelService",void 0),i.__decorate([(0,r.Autowired)(F.BrowserEditorContribution),i.__metadata("design:type",Object)],z.prototype,"contributions",void 0),z=i.__decorate([(0,o.Domain)(o.ClientAppContribution)],z),t.EditorClientAppContribution=z},41953:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoModelDiagnostics=t.MonacoDiagnosticCollection=void 0;const i=n(70655).__importStar(n(63138)),r=n(90642),o=n(23730);t.MonacoDiagnosticCollection=class{constructor(e){this.name=e,this.diagnostics=new Map,this.toDispose=new r.DisposableCollection}dispose(){this.toDispose.dispose()}get(e){const t=this.diagnostics.get(e);return t?t.diagnostics:[]}set(e,t){const n=this.diagnostics.get(e);if(n)n.diagnostics=t;else{const n=new a(e,t,this.name);this.diagnostics.set(e,n),this.toDispose.push(r.Disposable.create((()=>{this.diagnostics.delete(e),n.dispose()})))}}};class a{constructor(e,t,n){this.owner=n,this._markers=[],this._diagnostics=[],this.uri=i.Uri.parse(e),this.diagnostics=t,i.editor.onDidCreateModel((e=>this.doUpdateModelMarkers(e)))}set diagnostics(e){this._diagnostics=e,this._markers=(0,o.asDiagnostics)(e)||[],this.updateModelMarkers()}get diagnostics(){return this._diagnostics}get markers(){return this._markers}dispose(){this._markers=[],this.updateModelMarkers()}updateModelMarkers(){const e=i.editor.getModel(this.uri);this.doUpdateModelMarkers(e)}doUpdateModelMarkers(e){e&&this.uri.toString()===e.uri.toString()&&i.editor.setModelMarkers(e,this.owner,this._markers)}}t.MonacoModelDiagnostics=a},78686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageStatusContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(23730),s=n(49539);let c=class extends o.WithEventBus{initialize(){this.workbenchEditorService.onActiveResourceChange((()=>{this.updateLanguageStatus(this.workbenchEditorService.currentEditor)})),this.eventBus.on(s.EditorDocumentModelOptionChangedEvent,(e=>{const t=this.workbenchEditorService.currentEditor;t&&t.currentUri&&t.currentUri.isEqual(e.payload.uri)&&this.updateLanguageStatus(this.workbenchEditorService.currentEditor)}))}updateLanguageStatus(e){if(!e)return void this.statusBar.removeElement("editor-status-language-status");const t=e.currentDocumentModel;if(t){const e=this.languageStatusService.getLanguageStatus(t.getMonacoModel());e.length&&this.statusBar.addElement("editor-status-language-status",{name:(0,o.localize)("status-bar.editor-langStatus"),alignment:o.StatusBarAlignment.RIGHT,text:this.getLanguageStatusText(e),priority:1.1,hoverContents:e.map((e=>({title:e.label,name:e.name,command:e.command}))),onClick:()=>{}})}}getLanguageStatusText(e){if(0===e.length)return;const[t]=e;switch(t.severity){case o.Severity.Error:return"$(bracket-error)";case o.Severity.Warning:return"$(bracket-dot)";default:return"$(bracket)"}}};i.__decorate([(0,r.Autowired)(o.IStatusBarService),i.__metadata("design:type",Object)],c.prototype,"statusBar",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",a.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(a.ILanguageStatusService),i.__metadata("design:type",Object)],c.prototype,"languageStatusService",void 0),c=i.__decorate([(0,o.Domain)(o.ClientAppContribution)],c),t.LanguageStatusContribution=c},2620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageStatusService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(76273),{compare:s}=o.strings;let c=class{constructor(){this._provider=new a.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(e){return this._provider.register(e.selector,e)}getLanguageStatus(e){return this._provider.ordered(e).sort(((e,t)=>{let n=t.severity-e.severity;return 0===n&&(n=s(e.source,t.source)),0===n&&(n=s(e.id,t.id)),n}))}};c=i.__decorate([(0,r.Injectable)()],c),t.LanguageStatusService=c},6959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=i.__importStar(n(63138)),s=n(23730),c=n(41953);function l(e){switch(e){case o.MarkerSeverity.Error:return s.DiagnosticSeverity.Error;case o.MarkerSeverity.Warning:return s.DiagnosticSeverity.Warning;case o.MarkerSeverity.Info:return s.DiagnosticSeverity.Information;case o.MarkerSeverity.Hint:return s.DiagnosticSeverity.Hint}}function d(e,t,n,i){return{start:{line:e-1,character:t-1},end:{line:n-1,character:i-1}}}function u(e){return{message:e.message,location:{uri:e.resource,range:d(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)}}}function p(e){const t={code:e.code,severity:l(e.severity),range:d(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),message:e.message,source:e.source,relatedInformation:void 0,tags:e.tags};return e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(u)),t}let h=class{constructor(){this.markers=new Map,this.workspaceSymbolProviders=[];for(const e of this.markerManager.getResources())this.updateMarkers(new o.URI(e));this.markerManager.onMarkerChanged((e=>{e&&e.forEach((e=>this.updateMarkers(new o.URI(e))))}))}get languages(){return[...this.mergeLanguages(a.languages.getLanguages()).values()]}getLanguage(e){return this.mergeLanguages(a.languages.getLanguages().filter((t=>t.id===e))).get(e)}mergeLanguages(e){const t=new Map;for(const{id:n,aliases:i,extensions:r,filenames:o}of e){const e=t.get(n)||{id:n,name:"",extensions:new Set,filenames:new Set};if(!e.name&&i&&i.length&&(e.name=i[0]),r&&r.length)for(const t of r)e.extensions.add(t);if(o&&o.length)for(const t of o)e.filenames.add(t);t.set(n,e)}for(const[e,n]of t)n.name||(n.name=e);return t}registerWorkspaceSymbolProvider(e){return this.workspaceSymbolProviders.push(e),o.Disposable.create((()=>{const t=this.workspaceSymbolProviders.indexOf(e);-1!==t&&this.workspaceSymbolProviders.splice(t,1)}))}updateMarkers(e){const t=e.toString(),n=new Map;for(const t of this.markerManager.getMarkers({resource:e.toString()})){const e=n.get(t.type)||[];e.push(p(t)),n.set(t.type,e)}const i=new Set(this.markers.keys());for(const[e,r]of n){i.delete(e);const n=this.markers.get(e)||new c.MonacoDiagnosticCollection(e);n.set(t,r),this.markers.set(e,n)}for(const e of i){const n=this.markers.get(e);n&&n.set(t,[])}}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",o.MarkerManager)],h.prototype,"markerManager",void 0),h=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],h),t.LanguageService=h},68303:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorContextMenuController=void 0;const i=n(70655),r=n(894),o=n(57061),a=i.__importStar(n(56670)),s=n(13329),c=n(27141),l=n(47986),d=n(1379),u=i.__importStar(n(63138));class p extends r.Disposable{constructor(e,t,n,i){super(),this.contextMenuService=e,this.globalContextKeyService=t,this.contextMenuRenderer=n,this.codeEditor=i,this.contextKeyService=this.registerDispose(this.globalContextKeyService.createScoped(this.codeEditor._contextKeyService)),this.addDispose(this.codeEditor.onContextMenu((e=>this.onContextMenu(e)))),this.addDispose(this.codeEditor.onKeyDown((e=>{e.keyCode===s.KeyCode.ContextMenu&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(e){return e.getContribution(d.ContextMenuController.ID)}showContextMenu(e){if(!this.codeEditor.getOption(l.EditorOption.contextmenu))return;if(!this.codeEditor.hasModel())return;if(!this.contextMenuService)return void this.codeEditor.focus();const t=this.getMenuNodes();t.length>0&&this._doShowContextMenu(t,e)}onContextMenu(e){if(!this.codeEditor.hasModel())return;if(!this.codeEditor.getOption(l.EditorOption.contextmenu))return this.codeEditor.focus(),void(e.target.position&&!this.codeEditor.getSelection().containsPosition(e.target.position)&&this.codeEditor.setPosition(e.target.position));if(e.target.type===c.MouseTargetType.OVERLAY_WIDGET)return;if(e.target.type===c.MouseTargetType.CONTENT_TEXT&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type!==c.MouseTargetType.CONTENT_TEXT&&e.target.type!==c.MouseTargetType.CONTENT_EMPTY&&e.target.type!==c.MouseTargetType.TEXTAREA)return;if(this.codeEditor.focus(),e.target.position){let t=!1;for(const n of this.codeEditor.getSelections())if(n.containsPosition(e.target.position)){t=!0;break}t||this.codeEditor.setPosition(e.target.position)}let t=null;e.target.type!==c.MouseTargetType.TEXTAREA&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}_doShowContextMenu(e,t){const n=this.codeEditor;if(!n.hasModel())return;const i=n.getOption(u.editor.EditorOption.hover);if(n.updateOptions({hover:{enabled:!1}}),!t){n.revealPosition(n.getPosition(),u.editor.ScrollType.Immediate),n.render();const e=n.getScrolledVisiblePosition(n.getPosition()),i=a.getDomNodePagePosition(n.getDomNode());t={x:i.left+e.left,y:i.top+e.top+e.height}}this.contextMenuRenderer.show({anchor:{x:t.x-window.scrollX,y:t.y-window.scrollY},menuNodes:e,args:[n.getModel().uri],onHide:()=>{this.codeEditor.updateOptions({hover:i}),this.codeEditor.focus()}})}getMenuNodes(){const e=this.contextMenuService.createMenu({id:o.MenuId.EditorContext,contextKeyService:this.contextKeyService}),t=e.getMergedMenuNodes();return e.dispose(),t}}t.EditorContextMenuController=p,p.ID="editor.contrib.contextmenu"},24210:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActionRegistryImpl=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061);let s=class extends o.Disposable{constructor(){super(...arguments),this._cachedMenus=new Map}registerEditorAction(){return this.logger.warn(new Error("registerEditorAction has been deprecated, use menu apis instead")),new o.Disposable}getMenu(e){const t=e.currentFocusedEditor?"editor-menu-"+e.currentFocusedEditor.getId():"editor-group-menu-"+e.name;if(!this._cachedMenus.has(t)){const n=e.currentFocusedEditor?this.contextKeyService.createScoped(e.currentFocusedEditor.monacoEditor._contextKeyService):e.contextKeyService,i=this.registerDispose(this.menuService.createMenu(a.MenuId.EditorTitle,n));this._cachedMenus.set(t,i),i.onDispose((()=>{this._cachedMenus.get(t)===i&&this._cachedMenus.delete(t)}))}return this._cachedMenus.get(t)}};i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],s.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(a.AbstractMenuService),i.__metadata("design:type",a.AbstractMenuService)],s.prototype,"menuService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],s.prototype,"logger",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.EditorActionRegistryImpl=s},37312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenTypeMenuContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57061),s=n(90642),c=n(18570),l=n(92675),d=n(97276);var u;!function(e){e.EDITOR_OPEN_TYPE={id:"editor.opentype"}}(u||(u={}));let p=class extends s.Disposable{constructor(){super(),this.disposables.push(this.workbenchEditorService.onActiveResourceChange((e=>{const t=this.workbenchEditorService.currentEditorGroup.availableOpenTypes,n=this.menuRegistry.getMenuItems(a.MenuId.OpenTypeSubmenuContext).map((e=>e.command));n.forEach((e=>{this.menuRegistry.unregisterMenuItem(a.MenuId.OpenTypeSubmenuContext,e.id)})),this.menuRegistry.unregisterMenuItem(a.MenuId.EditorTitle,a.MenuId.OpenTypeSubmenuContext),t.length>=2&&this.registerMenuItem(t)})))}registerCommands(e){e.registerCommand(u.EDITOR_OPEN_TYPE,{execute:e=>{e&&this.workbenchEditorService.currentEditorGroup.changeOpenType(e)}})}registerMenus(e){}registerMenuItem(e){const t={submenu:a.MenuId.OpenTypeSubmenuContext,label:(0,s.localize)("editor.openType"),group:"navigation",order:Number.MIN_SAFE_INTEGER,iconClass:(0,o.getIcon)("setting"),type:"default"};this.menuRegistry.registerMenuItem(a.MenuId.EditorTitle,t),e.forEach((e=>{var t;this.menuRegistry.registerMenuItem(a.MenuId.OpenTypeSubmenuContext,{command:{id:u.EDITOR_OPEN_TYPE.id,label:e.title||e.componentId||e.type},extraTailArgs:[null!==(t=e.componentId)&&void 0!==t?t:e.type],group:"navigation"})}))}};i.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),i.__metadata("design:type",d.WorkbenchEditorServiceImpl)],p.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(a.IMenuRegistry),i.__metadata("design:type",a.IMenuRegistry)],p.prototype,"menuRegistry",void 0),p=i.__decorate([(0,c.Domain)(s.CommandContribution,a.MenuContribution),i.__metadata("design:paramtypes",[])],p),t.OpenTypeMenuContribution=p},91936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabTitleMenuService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(26044),s=n(57061);let c=class{get editorTitleContextKey(){return this._editorTitleContextKey||(this._editorTitleContextKey=this.contextKeyService.createKey("editorTitleContext",!1)),this._editorTitleContextKey}show(e,t,n,i){const r=i.contextKeyService.createScoped();new a.ResourceContextKey(r).set(n),this.editorTitleContextKey.set(!0);const o=this.ctxMenuService.createMenu({id:s.MenuId.EditorTitleContext,contextKeyService:r}),c=o.getMergedMenuNodes();o.dispose(),r.dispose(),this.ctxMenuRenderer.show({anchor:{x:e,y:t},menuNodes:c,args:[{uri:n,group:i}],onHide:()=>{this.editorTitleContextKey.set(!1)}})}};i.__decorate([(0,r.Autowired)(s.AbstractContextMenuService),i.__metadata("design:type",s.AbstractContextMenuService)],c.prototype,"ctxMenuService",void 0),i.__decorate([(0,r.Autowired)(s.ICtxMenuRenderer),i.__metadata("design:type",s.ICtxMenuRenderer)],c.prototype,"ctxMenuRenderer",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],c.prototype,"contextKeyService",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.TabTitleMenuService=c},39565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyContribution=t.executeProvideOutgoingCallsCommand=t.executeProvideIncomingCallsCommand=t.executePrepareCallHierarchyCommand=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(48794),s=n(61344),c=n(92675);t.executePrepareCallHierarchyCommand={id:"_executePrepareCallHierarchy"},t.executeProvideIncomingCallsCommand={id:"_executeProvideIncomingCalls"},t.executeProvideOutgoingCallsCommand={id:"_executeProvideOutgoingCalls"};const l=new a.RawContextKey("editorHasCallHierarchyProvider",!1);let d=class{registerCommands(e){e.registerCommand(t.executePrepareCallHierarchyCommand,{execute:(e,t)=>this.callHierarchyService.prepareCallHierarchyProvider(e,t)}),e.registerCommand(t.executeProvideIncomingCallsCommand,{execute:e=>this.callHierarchyService.provideIncomingCalls(e)}),e.registerCommand(t.executeProvideOutgoingCallsCommand,{execute:e=>this.callHierarchyService.provideOutgoingCalls(e)})}registerEditorFeature(e){this.ctxHasProvider=l.bind(this.contextKeyService),e.registerEditorFeatureContribution({contribute:e=>{const t=e.monacoEditor;return o.Event.any(t.onDidChangeModel,t.onDidChangeModelLanguage,s.CallHierarchyProviderRegistry.onDidChange)((()=>{t.hasModel()&&this.ctxHasProvider.set(s.CallHierarchyProviderRegistry.has(t.getModel()))}))}})}};i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(s.ICallHierarchyService),i.__metadata("design:type",Object)],d.prototype,"callHierarchyService",void 0),d=i.__decorate([(0,o.Domain)(o.CommandContribution,c.BrowserEditorContribution)],d),t.CallHierarchyContribution=d},11438:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyService=t.CallHierarchyModel=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(61344),s=n(49539),{isNonEmptyArray:c}=o.arrays;class l{constructor(e,t,n,i){this.id=e,this.provider=t,this.roots=n,this.ref=i,this.root=n[0]}static async create(e,t,n){const[i]=a.CallHierarchyProviderRegistry.ordered(e);if(!i)return;const r=await i.prepareCallHierarchy(e,t,n);return r?new l(r.roots.reduce(((e,t)=>e+t._sessionId),""),i,r.roots,new o.RefCountedDisposable(r)):void 0}dispose(){this.ref.release()}fork(e){const t=this;return new class extends l{constructor(){super(t.id,t.provider,[e],t.ref.acquire())}}}async resolveIncomingCalls(e,t){try{const n=await this.provider.provideIncomingCalls(e,t);if(c(n))return n}catch(e){(0,o.onUnexpectedExternalError)(e)}return[]}async resolveOutgoingCalls(e,t){try{const n=await this.provider.provideOutgoingCalls(e,t);if(c(n))return n}catch(e){(0,o.onUnexpectedExternalError)(e)}return[]}}t.CallHierarchyModel=l;let d=class{constructor(){this.models=new Map}registerCallHierarchyProvider(e,t){a.CallHierarchyProviderRegistry.register(e,t)}async prepareCallHierarchyProvider(e,t){var n;let i,r=null===(n=this.modelService.getModelReference(o.URI.parse(e.toString())))||void 0===n?void 0:n.instance.getMonacoModel();if(!r){const t=await this.modelService.createModelReference(o.URI.parse(e.toString()));r=t.instance.getMonacoModel(),i=t}try{const e=await l.create(r,t,o.CancellationToken.None);return e?(this.models.set(e.id,e),this.models.forEach(((e,t,n)=>{n.size>10&&(e.dispose(),this.models.delete(t))})),[e.root]):[]}finally{null==i||i.dispose()}}provideIncomingCalls(e){const t=this.models.get(e._sessionId);if(t)return t.resolveIncomingCalls(e,o.CancellationToken.None)}provideOutgoingCalls(e){const t=this.models.get(e._sessionId);if(t)return t.resolveOutgoingCalls(e,o.CancellationToken.None)}};i.__decorate([(0,r.Autowired)(s.IEditorDocumentModelService),i.__metadata("design:type",Object)],d.prototype,"modelService",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.CallHierarchyService=d},79778:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoActionRegistry=t.MonacoCommandRegistry=t.MonacoCommandService=t.MonacoCommandType=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(65135),c=n(44049),l=n(52732),d=n(92675),u={"editor.action.smartSelect.grow":"editor.action.smartSelect.expand",cursorWordPartStartLeft:"cursorWordPartLeft",cursorWordPartStartLeftSelect:"cursorWordPartLeftSelect","editor.action.previewDeclaration":"editor.action.peekDefinition","editor.action.openDeclarationToTheSide":"editor.action.revealDefinitionAside","editor.action.goToDeclaration":"editor.action.revealDefinition"};!function(e){e[e.ACTION=0]="ACTION",e[e.COMMAND=1]="COMMAND"}(t.MonacoCommandType||(t.MonacoCommandType={}));let p=class{constructor(){this._onDidExecuteCommand=new a.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._onWillExecuteCommand=new a.Emitter}setDelegate(e){this.delegate=e}get onWillExecuteCommand(){return this._onWillExecuteCommand.event}async executeCommand(e,...t){this.logger.debug("command: "+e),this._onWillExecuteCommand.fire({commandId:e,args:t});try{const n=await this.commandService.executeCommand(e,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}catch(e){if((null==e?void 0:e.name)!==a.HANDLER_NOT_FOUND)throw e}if(this.delegate){const n=this.delegate.executeCommand(u[e]?u[e]:e,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}return this.reporterService.point(a.REPORT_NAME.NOT_FOUND_COMMAND,e),Promise.reject(new Error(`command '${e}' not found`))}};r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],p.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(a.CommandRegistry),r.__metadata("design:type",Object)],p.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(a.CommandService),r.__metadata("design:type",Object)],p.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(a.IReporterService),r.__metadata("design:type",Object)],p.prototype,"reporterService",void 0),p=r.__decorate([(0,o.Injectable)()],p),t.MonacoCommandService=p;let h=class{validate(e){var t;return null===(t=this.commands.getRawCommand(e))||void 0===t?void 0:t.id}registerCommand(e,t){this.commands.registerCommand(e,this.newHandler(t))}registerHandler(e,t){this.commands.registerHandler(e,this.newHandler(t))}newHandler(e){return{execute:(...t)=>this.execute(e,...t)}}execute(e,...t){const n=this.getActiveCodeEditor();return n?Promise.resolve(e.execute(n,...t)):Promise.resolve()}getActiveCodeEditor(){if(this.editorCollectionService.currentEditor)return this.editorCollectionService.currentEditor.monacoEditor;const e=this.workbenchEditorService.currentEditorGroup;if(e){const t=e.currentOrPreviousFocusedEditor||e.currentEditor;if(t)return t.monacoEditor}}};r.__decorate([(0,o.Autowired)(a.CommandRegistry),r.__metadata("design:type",Object)],h.prototype,"commands",void 0),r.__decorate([(0,o.Autowired)(d.WorkbenchEditorService),r.__metadata("design:type",d.WorkbenchEditorService)],h.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(d.EditorCollectionService),r.__metadata("design:type",d.EditorCollectionService)],h.prototype,"editorCollectionService",void 0),h=r.__decorate([(0,o.Injectable)()],h),t.MonacoCommandRegistry=h;let m=i=class{get globalInstantiationService(){const e=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.CODE_EDITOR_SERVICE),t=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.TEXT_MODEL_SERVICE),n=this.overrideServiceRegistry.getRegisteredService(a.ServiceNames.CONTEXT_KEY_SERVICE),[,i]=l.StaticServices.init({codeEditorService:e,textModelService:t,contextKeyService:n});return i}get monacoEditorRegistry(){return s.EditorExtensionsRegistry}get monacoCommands(){return s.CommandsRegistry.getCommands()}registerMonacoActions(){var e;const t=new Map(this.monacoEditorRegistry.getEditorActions().map((({id:e,label:t,alias:n})=>[e,{label:t,alias:n}])));for(const n of this.monacoCommands.keys()){if(i.EXCLUDE_ACTIONS.includes(n))continue;const r=null!==(e=t.get(n))&&void 0!==e?e:{},o=this.actAndComHandler(t,n);this.monacoCommandRegistry.registerCommand({id:n,label:r.label,alias:r.alias},o);const a=i.COMMON_ACTIONS.get(n);a&&this.monacoCommandRegistry.registerHandler(a,o)}}actAndComHandler(e,t){if(i.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.has(t)){const e=i.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID.get(t);if(this.monacoEditorRegistry.getSomeEditorContributions([e]).length>0)return this.newCommandHandler(t)}return e.has(t)?this.newActionHandler(t):this.newCommandHandler(t)}isInternalExecuteCommand(e){return e.startsWith("_execute")}processInternalCommandArgument(e,t=[]){return this.isInternalExecuteCommand(e)?t.map((e=>e instanceof a.Uri?c.URI.revive(e):e)):i.CONVERT_MONACO_COMMAND_ARGS.has(e)?i.CONVERT_MONACO_COMMAND_ARGS.get(e)(...t):t}newCommandHandler(e){return{execute:(t,...n)=>{var r;if(!t)return;const o=!!this.monacoEditorRegistry.getEditorCommand(e)||!(this.isInternalExecuteCommand(e)||"setContext"===e||i.COMMON_ACTIONS.has(e))?t&&t._instantiationService:this.globalInstantiationService;if(!o)return;const a=this.processInternalCommandArgument(e,n);return o.invokeFunction(null===(r=this.monacoCommands.get(e))||void 0===r?void 0:r.handler,...a)}}}newActionHandler(e){return{execute:t=>{const n=t.getAction(e);if(n&&n.isSupported())return this.runAction(e,t)}}}runAction(e,t){if(t){const n=t.getAction(e);if(n)return n.run()}return Promise.resolve()}newKeyboardHandler(e){return{execute:(t,...n)=>t.trigger("keyboard",e,n)}}};m.COMMON_ACTIONS=new Map([["undo",a.EDITOR_COMMANDS.UNDO.id],["redo",a.EDITOR_COMMANDS.REDO.id],["editor.action.selectAll",a.EDITOR_COMMANDS.SELECT_ALL.id]]),m.CONVERT_MONACO_COMMAND_ARGS=new Map([["editor.action.showReferences",(e,...t)=>[c.URI.parse(e),...t]],["editor.action.goToLocations",(e,...t)=>[c.URI.parse(e),...t]]]),m.CONVERT_MONACO_ACTIONS_TO_CONTRIBUTION_ID=new Map([["editor.action.rename","editor.contrib.renameController"]]),m.EXCLUDE_ACTIONS=["setContext","editor.action.quickCommand","editor.action.quickOutline","editor.action.toggleHighContrast","editor.action.gotoLine"],r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",h)],m.prototype,"monacoCommandRegistry",void 0),r.__decorate([(0,o.Autowired)(a.MonacoOverrideServiceRegistry),r.__metadata("design:type",a.MonacoOverrideServiceRegistry)],m.prototype,"overrideServiceRegistry",void 0),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],m.prototype,"globalInstantiationService",null),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],m.prototype,"monacoEditorRegistry",null),r.__decorate([a.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],m.prototype,"monacoCommands",null),m=i=r.__decorate([(0,o.Injectable)()],m),t.MonacoActionRegistry=m},12246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(39565),t),i.__exportStar(n(11438),t),i.__exportStar(n(13577),t),i.__exportStar(n(99563),t)},87374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextmateRegistry=void 0;const i=n(70655),r=n(39993),o=n(90642);let a=class{constructor(){this.scopeToProvider=new Map,this.languageToConfig=new Map,this.languageIdToScope=new Map}registerTextmateGrammarScope(e,t){return this.scopeToProvider.has(e)&&(0,o.getDebugLogger)().warn(new Error(`a registered grammar provider for '${e}' scope is overridden`)),this.scopeToProvider.set(e,t),()=>{this.scopeToProvider.delete(e)}}getProvider(e){return this.scopeToProvider.get(e)}mapLanguageIdToTextmateGrammar(e,t){const n=this.getScope(e);return"string"==typeof n&&(0,o.getDebugLogger)().warn(new Error(`'${e}' language is remapped from '${n}' to '${t}' scope`)),this.languageIdToScope.set(e,t),()=>{this.languageIdToScope.delete(e)}}getScope(e){return this.languageIdToScope.get(e)}getLanguageId(e){for(const t of this.languageIdToScope.keys())if(this.languageIdToScope.get(t)===e)return t}registerGrammarConfiguration(e,t){return this.languageToConfig.has(e),this.languageToConfig.set(e,t),()=>{this.languageToConfig.delete(e)}}getGrammarConfiguration(e){return this.languageToConfig.get(e)||(()=>({}))}};a=i.__decorate([(0,r.Injectable)()],a),t.TextmateRegistry=a},26835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTextmateTokenizer=t.TokenizerState=void 0;const i=n(22190);class r{constructor(e){this.ruleStack=e}clone(){return new r(this.ruleStack)}equals(e){return e instanceof r&&(e===this||e.ruleStack===this.ruleStack)}}t.TokenizerState=r,t.createTextmateTokenizer=function(e,t){if(void 0!==t.lineLimit&&(t.lineLimit<=0||!Number.isInteger(t.lineLimit)))throw new Error(`The 'lineLimit' must be a positive integer. It was ${t.lineLimit}.`);return{getInitialState:()=>new r(i.INITIAL),tokenizeEncoded(n,o){if(void 0!==t.lineLimit&&n.length>t.lineLimit){const e=new Uint32Array(2);return e[0]=0,e[1]=16793601,{endState:new r(i.INITIAL),tokens:e}}const a=e.tokenizeLine2(n,o.ruleStack);return{endState:new r(a.ruleStack),tokens:a.tokens}},tokenize(t,n){const i=e.tokenizeLine(t,n.ruleStack);return{endState:new r(i.ruleStack),tokens:i.tokens.map((e=>Object.assign(Object.assign({},e),{scopes:e.scopes.join("\r\n")})))}}}}},2052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextmateService=t.getLegalThemeName=t.getEncodedLanguageId=void 0;const i=n(70655),r=n(35930),o=n(22190),a=n(39993),s=n(894),c=n(90642),l=n(17735),d=n(44049),u=n(22060),p=n(93761),h=n(49539),m=n(87374),g=n(26835);let f=!1;function _(e){return d.monaco.languages.getEncodedLanguageId(e)}function b(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-")}t.getEncodedLanguageId=_,t.getLegalThemeName=b;class y{createOnigScanner(e){return new r.OnigScanner(e)}createOnigString(e){return new r.OnigString(e)}}function v(e){if(!Array.isArray(e))return!1;for(let t=0,n=e.length;t{const t=e.payload.theme.themeData;this.setTheme(t)}))}async registerLanguage(e,t){return this.registerLanguages([e],t)}async registerLanguages(e,t){this.dynamicLanguages.push(...e.map((e=>({id:e.id,aliases:e.aliases,extensions:e.extensions,filenamePatterns:e.filenamePatterns,filenames:e.filenames,firstLine:e.firstLine,mimetypes:e.mimetypes})))),p.ModesRegistry.setDynamicLanguages(this.dynamicLanguages);const n=[];if(await Promise.all(e.map((async e=>{let i;if(this.addDispose(d.monaco.languages.onLanguage(e.id,(()=>{this.activateLanguage(e.id)}))),"object"==typeof e.resolvedConfiguration)i=await e.resolvedConfiguration;else if(e.configuration){const n=e.configuration.replace(/^\.\//,""),r=t.resolve(n),o=(await this.fileServiceClient.resolveContent(r.toString())).content;if(o){const e=this.safeParseJSON(o);e&&(i=e)}}i&&d.monaco.languages.setLanguageConfiguration(e.id,{wordPattern:this.createRegex(i.wordPattern),autoClosingPairs:this.extractValidAutoClosingPairs(e.id,i),brackets:this.extractValidBrackets(e.id,i),comments:this.extractValidCommentRule(e.id,i),folding:this.convertFolding(i.folding),surroundingPairs:this.extractValidSurroundingPairs(e.id,i),indentationRules:this.convertIndentationRules(i.indentationRules)}),n.push(e.id)}))),this.initialized){const e=this.editorDocumentModelService.getAllModels().map((e=>e.uri));for(const t of e){const e=this.editorDocumentModelService.getModelReference(c.URI.parse(t.codeUri.toString()));if(e&&e.instance){const t=e.instance.getMonacoModel().getModeId();n.includes(t)&&this.activateLanguage(t)}null==e||e.dispose()}}}async registerGrammar(e,t){if(e.path){const n=e.path.replace(/^\.\//,"");e.location=t.resolve(n)}this.doRegisterGrammar(e)}unregisterGrammar(e){const t=this.registeredGrammarDisposableCollection.get(e.scopeName);t&&t.dispose()}doRegisterGrammar(e){const t=new c.Disposable;if(e.injectTo)for(const n of e.injectTo){let i=this.injections.get(n);i||(i=[],t.addDispose(c.Disposable.create((()=>{this.injections.delete(n)}))),this.injections.set(n,i)),i.push(e.scopeName)}t.addDispose(c.Disposable.create(this.textmateRegistry.registerTextmateGrammarScope(e.scopeName,{getGrammarDefinition:async()=>({format:/\.json$/.test(e.path)?"json":"plist",location:e.location,content:await e.resolvedConfiguration}),getInjections:e=>{const t=e.split(".");let n=[];for(let e=1;e<=t.length;e++){const i=t.slice(0,e).join(".");n=[...n,...this.injections.get(i)||[]]}return n}}))),e.language&&(t.addDispose(c.Disposable.create(this.textmateRegistry.mapLanguageIdToTextmateGrammar(e.language,e.scopeName))),t.addDispose(c.Disposable.create(this.textmateRegistry.registerGrammarConfiguration(e.language,(()=>({embeddedLanguages:this.convertEmbeddedLanguages(e.embeddedLanguages),tokenTypes:this.convertTokenTypes(e.tokenTypes)})))))),this.registeredGrammarDisposableCollection.set(e.scopeName,t)}async activateLanguage(e){this.eventBus.fire(new s.ExtensionActivateEvent({topic:"onLanguage",data:e})),this.activatedLanguage.has(e)||(this.activatedLanguage.add(e),this.setTokensProviderByLanguageId(e))}async setTokensProviderByLanguageId(e){const t=this.textmateRegistry.getScope(e);if(!t)return;if(!this.textmateRegistry.getProvider(t))return;const n={lineLimit:this.preferenceService.get("editor.maxTokenizationLineLength")||1e4},i=this.textmateRegistry.getGrammarConfiguration(e)(),r=_(e);try{const o=await this.grammarRegistry.loadGrammarWithConfiguration(t,r,i),a=i.tokenizerOption?i.tokenizerOption:n;o&&d.monaco.languages.setTokensProvider(e,(0,g.createTextmateTokenizer)(o,a))}catch(t){this.logger.warn("No grammar for this language id",e,t)}}setTheme(e){this.generateEncodedTokenColors(e),d.monaco.editor.defineTheme(b(e.name),e),d.monaco.editor.setTheme(b(e.name))}generateEncodedTokenColors(e){this.grammarRegistry.setTheme(e),e.encodedTokensColors=this.grammarRegistry.getColorMap(),e.encodedTokensColors[0]=null}createRegex(e){if("string"==typeof e)return new RegExp(e,"")}safeParseJSON(e){let t;try{return t=(0,s.parseWithComments)(e),t}catch(t){return void this.logger.error("璇█閰嶇疆鏂囦欢瑙f瀽鍑洪敊锛�",e)}}convertFolding(e){if(!e)return;const t={offSide:e.offSide};return e.markers&&(t.markers={end:this.createRegex(e.markers.end),start:this.createRegex(e.markers.start)}),t}convertIndentationRules(e){if(!e)return;const t={decreaseIndentPattern:this.createRegex(e.decreaseIndentPattern),increaseIndentPattern:this.createRegex(e.increaseIndentPattern)};return e.indentNextLinePattern&&(t.indentNextLinePattern=this.createRegex(e.indentNextLinePattern)),e.unIndentedLinePattern&&(t.unIndentedLinePattern=this.createRegex(e.unIndentedLinePattern)),t}convertEmbeddedLanguages(e){if(null==e)return;const t=Object.create(null),n=Object.keys(e),i=n.length;for(let r=0;r{const t=this.textmateRegistry.getProvider(e);if(t){const e=await t.getGrammarDefinition();if(!e.content){const t=(await this.fileServiceClient.resolveContent(e.location.toString())).content;e.content="json"===e.format?this.safeParseJSON(t):t}let n;return n="string"==typeof e.content?(0,o.parseRawGrammar)(e.content,"json"===e.format?"grammar.json":"grammar.plist"):e.content,n}},getInjections:e=>{const t=this.textmateRegistry.getProvider(e);return t&&t.getInjections?t.getInjections(e):[]}}),this.activateLanguages()}activateLanguages(){for(const{id:e}of d.monaco.languages.getLanguages())this.editorDocumentModelService.hasLanguage(e)&&this.activateLanguage(e)}async getOnigLib(){if(f)return new y;let e;e=this.appConfig.isElectronRenderer&&s.electronEnv.onigWasmPath?c.URI.file(s.electronEnv.onigWasmPath).codeUri.toString():this.appConfig.isElectronRenderer&&s.electronEnv.onigWasmUri?s.electronEnv.onigWasmUri:this.appConfig.onigWasmUri||this.appConfig.onigWasmPath||"https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm";const t=await fetch(e),n=await t.arrayBuffer();return await(0,r.loadWASM)(n),f=!0,new y}listenPreferenceChange(){this.preferenceService.onPreferenceChanged((e=>{if("editor.maxTokenizationLineLength"===e.preferenceName)for(const e of this.activatedLanguage)this.setTokensProviderByLanguageId(e)}))}async testTokenize(e,t){const n=this.textmateRegistry.getScope(t);if(!n)return;const i=this.textmateRegistry.getGrammarConfiguration(t)(),r=_(t),a=await this.grammarRegistry.loadGrammarWithConfiguration(n,r,i);let c=o.INITIAL;const l=a.tokenizeLine(e,c),d=(0,s.getDebugLogger)("tokenize");d.log(`\nTokenizing line: ${e}`);for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyContribution=t.executeProvideSubtypesCommand=t.executeProvideSupertypesCommand=t.executePrepareTypeHierarchyCommand=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(48794),s=n(6109),c=n(92675);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const l=new a.RawContextKey("editorHasCallHierarchyProvider",!1);let d=class{registerCommands(e){e.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(e,t)=>this.typeHierarchyService.prepareTypeHierarchyProvider(e,t)}),e.registerCommand(t.executeProvideSupertypesCommand,{execute:e=>this.typeHierarchyService.provideSupertypes(e)}),e.registerCommand(t.executeProvideSubtypesCommand,{execute:e=>this.typeHierarchyService.provideSubtypes(e)})}registerEditorFeature(e){this.ctxHasProvider=l.bind(this.contextKeyService),e.registerEditorFeatureContribution({contribute:e=>{const t=e.monacoEditor;return o.Event.any(t.onDidChangeModel,t.onDidChangeModelLanguage,s.TypeHierarchyProviderRegistry.onDidChange)((()=>{t.hasModel()&&this.ctxHasProvider.set(s.TypeHierarchyProviderRegistry.has(t.getModel()))}))}})}};i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(s.ITypeHierarchyService),i.__metadata("design:type",Object)],d.prototype,"typeHierarchyService",void 0),d=i.__decorate([(0,o.Domain)(o.CommandContribution,c.BrowserEditorContribution)],d),t.TypeHierarchyContribution=d},99563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyService=t.TypeHierarchyModel=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(6109),s=n(49539),{isNonEmptyArray:c}=o.arrays;class l{constructor(e,t,n,i){this.id=e,this.provider=t,this.roots=n,this.ref=i,this.root=n[0]}static async create(e,t,n){const[i]=a.TypeHierarchyProviderRegistry.ordered(e);if(!i)return;const r=await i.prepareTypeHierarchy(e,t,n);return r?new l(r.roots.reduce(((e,t)=>e+t._sessionId),""),i,r.roots,new o.RefCountedDisposable(r)):void 0}dispose(){this.ref.release()}fork(e){const t=this;return new class extends l{constructor(){super(t.id,t.provider,[e],t.ref.acquire())}}}async provideSupertypes(e,t){try{const n=await this.provider.provideSupertypes(e,t);if(c(n))return n}catch(e){(0,o.onUnexpectedExternalError)(e)}return[]}async provideSubtypes(e,t){try{const n=await this.provider.provideSubtypes(e,t);if(c(n))return n}catch(e){(0,o.onUnexpectedExternalError)(e)}return[]}}t.TypeHierarchyModel=l;let d=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(e,t){a.TypeHierarchyProviderRegistry.register(e,t)}async prepareTypeHierarchyProvider(e,t){var n;let i,r=null===(n=this.modelService.getModelReference(o.URI.parse(e.toString())))||void 0===n?void 0:n.instance.getMonacoModel();if(!r){const t=await this.modelService.createModelReference(o.URI.parse(e.toString()));r=t.instance.getMonacoModel(),i=t}try{const e=await l.create(r,t,o.CancellationToken.None);return e?(this.models.set(e.id,e),this.models.forEach(((e,t,n)=>{n.size>10&&(e.dispose(),this.models.delete(t))})),[e.root]):[]}finally{null==i||i.dispose()}}async provideSupertypes(e){const t=this.models.get(e._sessionId);if(t)return t.provideSupertypes(e,o.CancellationToken.None)}async provideSubtypes(e){const t=this.models.get(e._sessionId);if(t)return t.provideSubtypes(e,o.CancellationToken.None)}};i.__decorate([(0,r.Autowired)(s.IEditorDocumentModelService),i.__metadata("design:type",Object)],d.prototype,"modelService",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.TypeHierarchyService=d},24253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationMenuModel=t.NavigationBarViewService=t.NavigationMenuContainer=t.NavigationMenu=t.NavigationItem=t.NavigationBar=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=n(22188),a=n(32834),s=i.__importDefault(n(616)),c=n(39993),l=n(25880),d=n(894),u=n(894),p=n(16871),h=i.__importDefault(n(93475)),m=n(92675),g=n(55753);t.NavigationBar=({editorGroup:e})=>{const n=(0,d.useInjectable)(m.IBreadCrumbService);if((0,g.useUpdateOnGroupTabChange)(e),(0,d.useUpdateOnEvent)(n.onDidUpdateBreadCrumbResults,[],(t=>{var n;const i=e.currentEditor&&e.currentEditor.currentDocumentModel?e.currentEditor:null,r=e.currentEditor&&e.currentEditor.currentDocumentModel?e.currentEditor.currentDocumentModel.uri:null===(n=e.currentResource)||void 0===n?void 0:n.uri;return!!r&&t.editor===i&&t.uri.isEqual(r)})),0===e.resources.length||!e.currentResource)return null;let i;return i=e.currentEditor&&e.currentEditor.currentDocumentModel?n.getBreadCrumbs(e.currentEditor.currentDocumentModel.uri,e.currentEditor):n.getBreadCrumbs(e.currentResource.uri,null),i?0===i.length?null:s.default.createElement("div",{className:h.default.navigation_container},i.map(((e,n)=>s.default.createElement(s.default.Fragment,{key:n+"-crumb:"+e.name},n>0&&s.default.createElement(l.Icon,{icon:"right",size:"small",className:h.default.navigation_icon}),s.default.createElement(t.NavigationItem,{part:e}))))):null},t.NavigationItem=s.default.memo((({part:e})=>{const t=(0,d.useInjectable)(f),n=s.default.useRef(),i=s.default.useCallback((async()=>{if(e.getSiblings&&n.current){const{left:i,top:r,height:o}=n.current.getBoundingClientRect(),a=await e.getSiblings();let s=i;window.innerWidth-s<210&&(s=window.innerWidth-200-5),t.showMenu(a.parts,s,r+o+5,a.currentIndex)}}),[n.current,e]);return s.default.createElement("span",{onClick:i,className:h.default["navigation-part"],ref:n},e.icon&&s.default.createElement("span",{className:e.icon}),s.default.createElement("span",null,e.name))})),t.NavigationMenu=(0,a.observer)((({model:e})=>{let n=window.innerHeight-e.y-20,i=e.y;const o=22*e.parts.length;n<100&&n{t.scrollTo({top:22*e.initialIndex-.5*Math.min(n,o),left:0})}},e.parts.map(((t,n)=>{let i;const o=t.getChildren?async()=>{if(i){const{left:n,top:r,width:o}=i.getBoundingClientRect();let a=n+o+5;window.innerWidth-a<210&&(a=n-o-5),e.showSubMenu(await t.getChildren(),a,r)}}:void 0,c=t.onClick?()=>{t.onClick(),a.dispose()}:void 0;return s.default.createElement("div",{onClick:c||o,ref:e=>i=e,className:(0,r.default)({[h.default.navigation_menu_item_current]:n===e.initialIndex}),key:"menu-"+t.name},s.default.createElement("span",{className:t.icon||(0,u.getIcon)("smile")}),s.default.createElement("span",{className:h.default.navigation_menu_item_label},t.name),t.getChildren&&s.default.createElement("span",{className:h.default.navigation_right,onClick:c&&o?e=>{e.stopPropagation(),o()}:void 0},s.default.createElement(l.Icon,{icon:"right",size:"small"})))}))),e.subMenu&&s.default.createElement(t.NavigationMenu,{model:e.subMenu}))})),t.NavigationMenuContainer=(0,a.observer)((()=>{const e=(0,d.useInjectable)(f),n=s.default.useRef();return s.default.useEffect((()=>{if(n.current){const t=new d.Disposable;return t.addDispose(new d.DomListener(window,"mouseup",(()=>{e.dispose()}))),t.addDispose(new d.DomListener(n.current,"mouseup",(e=>{e.stopPropagation()}))),t.dispose.bind(t)}})),e.current?s.default.createElement("div",{tabIndex:1,ref:n},s.default.createElement(t.NavigationMenu,{model:e.current})):null}));let f=class{showMenu(e,t,n,i){this.current=new _(e,t,n,i)}dispose(){this.current&&this.current.dispose(),this.current=void 0}};i.__decorate([o.observable.ref,i.__metadata("design:type",Object)],f.prototype,"current",void 0),f=i.__decorate([(0,c.Injectable)()],f),t.NavigationBarViewService=f;class _{constructor(e,t,n,i=-1){this.parts=e,this.x=t,this.y=n,this.initialIndex=i}showSubMenu(e,t,n){this.subMenu=new _(e,t,n)}dispose(){this.subMenu&&this.subMenu.dispose(),this.subMenu=void 0}}i.__decorate([o.observable.ref,i.__metadata("design:type",_)],_.prototype,"subMenu",void 0),t.NavigationMenuModel=_},34496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferenceContribution=void 0;const i=n(70655),r=n(894),o=n(91793);let a=class{constructor(){this.schema=o.editorPreferenceSchema}};a=i.__decorate([(0,r.Domain)(r.PreferenceContribution,r.ClientAppContribution)],a),t.EditorPreferenceContribution=a},42267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDiffEditorOption=t.isEditorOption=t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=t.getConvertedMonacoOptions=void 0;const i=n(894),{removeUndefined:r}=i.objects;function o(e,t){if(t.has(e))return!0;{const n=t.keys();for(const t of n)if(e.startsWith(t))return!0}return!1}t.getConvertedMonacoOptions=function(e,n,o,a){const s={},c={},l={},d=a?a.filter((e=>t.editorOptionsConverters.has(e))):Array.from(t.editorOptionsConverters.keys()),u=a?a.filter((e=>t.textModelUpdateOptionsConverters.has(e))):Array.from(t.textModelUpdateOptionsConverters.keys()),p=a?a.filter((e=>t.diffEditorOptionsConverters.has(e))):Array.from(t.diffEditorOptionsConverters.keys());return d.forEach((r=>{const a=e.getValue(r,{resource:n?i.Uri.parse(n):void 0,overrideIdentifier:o});if(void 0!==a)if(t.editorOptionsConverters.get(r)){const e=t.editorOptionsConverters.get(r);s[e.monaco]=e.convert?e.convert(a):a}else s[r]=a})),u.forEach((r=>{const a=e.getValue(r,{resource:n?i.Uri.parse(n):void 0,overrideIdentifier:o});if(void 0!==a)if(t.textModelUpdateOptionsConverters.get(r)){const e=t.textModelUpdateOptionsConverters.get(r);l[e.monaco]=e.convert?e.convert(a):a}else l[r]=a})),p.forEach((r=>{const a=e.getValue(r,{resource:n?i.Uri.parse(n):void 0,overrideIdentifier:o});if(void 0!==a)if(t.diffEditorOptionsConverters.get(r)){const e=t.diffEditorOptionsConverters.get(r);c[e.monaco]=e.convert?e.convert(a):a}else s[r]=a})),{editorOptions:r(s),modelOptions:r(l),diffOptions:r(c)}},t.editorOptionsConverters=new Map([["editor.ariaLabel",{monaco:"ariaLabel"}],["editor.rulers",{monaco:"rulers"}],["editor.wordSeparators",{monaco:"wordSeparators"}],["editor.selectionClipboard",{monaco:"selectionClipboard"}],["editor.lineNumbers",{monaco:"lineNumbers"}],["editor.renderFinalNewline",{monaco:"renderFinalNewline"}],["editor.selectOnLineNumbers",{monaco:"selectOnLineNumbers"}],["editor.lineNumbersMinChars",{monaco:"lineNumbersMinChars"}],["editor.glyphMargin",{monaco:"glyphMargin"}],["editor.lineDecorationsWidth",{monaco:"lineDecorationsWidth"}],["editor.revealHorizontalRightPadding",{monaco:"revealHorizontalRightPadding"}],["editor.roundedSelection",{monaco:"roundedSelection"}],["editor.extraEditorClassName",{monaco:"extraEditorClassName"}],["editor.readOnly",{monaco:"readOnly"}],["editor.scrollbar",{monaco:"scrollbar"}],["editor.minimap",{monaco:"minimap",convert:e=>({enabled:e})}],["editor.find",{monaco:"find"}],["editor.fixedOverflowWidgets",{monaco:"fixedOverflowWidgets"}],["editor.overviewRulerLanes",{monaco:"overviewRulerLanes"}],["editor.overviewRulerBorder",{monaco:"overviewRulerBorder"}],["editor.cursorBlinking",{monaco:"cursorBlinking"}],["editor.mouseWheelZoom",{monaco:"mouseWheelZoom"}],["editor.cursorSmoothCaretAnimation",{monaco:"cursorSmoothCaretAnimation"}],["editor.cursorStyle",{monaco:"cursorStyle"}],["editor.cursorWidth",{monaco:"cursorWidth"}],["editor.fontLigatures",{monaco:"fontLigatures"}],["editor.disableLayerHinting",{monaco:"disableLayerHinting"}],["editor.disableMonospaceOptimizations",{monaco:"disableMonospaceOptimizations"}],["editor.hideCursorInOverviewRuler",{monaco:"hideCursorInOverviewRuler"}],["editor.scrollBeyondLastLine",{monaco:"scrollBeyondLastLine"}],["editor.scrollBeyondLastColumn",{monaco:"scrollBeyondLastColumn"}],["editor.smoothScrolling",{monaco:"smoothScrolling"}],["editor.automaticLayout",{monaco:"automaticLayout"}],["editor.wordWrap",{monaco:"wordWrap"}],["editor.wordWrapColumn",{monaco:"wordWrapColumn"}],["editor.wordWrapMinified",{monaco:"wordWrapMinified"}],["editor.wrappingIndent",{monaco:"wrappingIndent"}],["editor.wordWrapBreakBeforeCharacters",{monaco:"wordWrapBreakBeforeCharacters"}],["editor.wordWrapBreakAfterCharacters",{monaco:"wordWrapBreakAfterCharacters"}],["editor.wordWrapBreakObtrusiveCharacters",{monaco:"wordWrapBreakObtrusiveCharacters"}],["editor.stopRenderingLineAfter",{monaco:"stopRenderingLineAfter"}],["editor.hover",{monaco:"hover"}],["editor.links",{monaco:"links"}],["editor.colorDecorators",{monaco:"colorDecorators"}],["editor.contextmenu",{monaco:"contextmenu"}],["editor.mouseWheelScrollSensitivity",{monaco:"mouseWheelScrollSensitivity"}],["editor.fastScrollSensitivity",{monaco:"fastScrollSensitivity"}],["editor.multiCursorModifier",{monaco:"multiCursorModifier"}],["editor.multiCursorMergeOverlapping",{monaco:"multiCursorMergeOverlapping"}],["editor.accessibilitySupport",{monaco:"accessibilitySupport"}],["editor.suggest",{monaco:"suggest"}],["editor.gotoLocation",{monaco:"gotoLocation"}],["editor.quickSuggestions",{monaco:"quickSuggestions"}],["editor.quickSuggestionsDelay",{monaco:"quickSuggestionsDelay"}],["editor.parameterHints",{monaco:"parameterHints"}],["editor.autoClosingBrackets",{monaco:"autoClosingBrackets"}],["editor.autoClosingQuotes",{monaco:"autoClosingQuotes"}],["editor.autoSurround",{monaco:"autoSurround"}],["editor.autoIndent",{monaco:"autoIndent"}],["editor.formatOnType",{monaco:"formatOnType"}],["editor.formatOnPaste",{monaco:"formatOnPaste"}],["editor.dragAndDrop",{monaco:"dragAndDrop"}],["editor.suggestOnTriggerCharacters",{monaco:"suggestOnTriggerCharacters"}],["editor.acceptSuggestionOnEnter",{monaco:"acceptSuggestionOnEnter"}],["editor.acceptSuggestionOnCommitCharacter",{monaco:"acceptSuggestionOnCommitCharacter"}],["editor.snippetSuggestions",{monaco:"snippetSuggestions"}],["editor.emptySelectionClipboard",{monaco:"emptySelectionClipboard"}],["editor.copyWithSyntaxHighlighting",{monaco:"copyWithSyntaxHighlighting"}],["editor.wordBasedSuggestions",{monaco:"wordBasedSuggestions"}],["editor.suggestSelection",{monaco:"suggestSelection"}],["editor.suggestFontSize",{monaco:"suggestFontSize"}],["editor.suggestLineHeight",{monaco:"suggestLineHeight"}],["editor.tabCompletion",{monaco:"tabCompletion"}],["editor.selectionHighlight",{monaco:"selectionHighlight"}],["editor.occurrencesHighlight",{monaco:"occurrencesHighlight"}],["editor.codeLens",{monaco:"codeLens"}],["editor.lightbulb",{monaco:"lightbulb"}],["editor.codeActionsOnSave",{monaco:"codeActionsOnSave"}],["editor.codeActionsOnSaveTimeout",{monaco:"codeActionsOnSaveTimeout"}],["editor.folding",{monaco:"folding"}],["editor.foldingStrategy",{monaco:"foldingStrategy"}],["editor.showFoldingControls",{monaco:"showFoldingControls"}],["editor.matchBrackets",{monaco:"matchBrackets"}],["editor.renderWhitespace",{monaco:"renderWhitespace"}],["editor.renderControlCharacters",{monaco:"renderControlCharacters"}],["editor.renderIndentGuides",{monaco:"guides.indentation"}],["editor.highlightActiveIndentGuide",{monaco:"guides.highlightActiveIndentation"}],["editor.guides",{monaco:"guides"}],["editor.renderLineHighlight",{monaco:"renderLineHighlight"}],["editor.useTabStops",{monaco:"useTabStops"}],["editor.fontFamily",{monaco:"fontFamily"}],["editor.fontWeight",{monaco:"fontWeight"}],["editor.fontSize",{monaco:"fontSize"}],["editor.lineHeight",{monaco:"lineHeight"}],["editor.letterSpacing",{monaco:"letterSpacing"}],["editor.showUnused",{monaco:"showUnused"}],["editor.rename.enablePreview",{monaco:"editor.rename.enablePreview"}],["editor.semanticHighlighting",{monaco:"semanticHighlighting"}],["editor.bracketPairColorization",{monaco:"bracketPairColorization"}],["editor.wrappingStrategy",{monaco:"wrappingStrategy"}],["editor.forceReadOnly",{monaco:"readOnly",convert:e=>!!e||void 0}]]),t.textModelUpdateOptionsConverters=new Map([["editor.tabSize",{monaco:"tabSize"}],["editor.indentSize",{monaco:"indentSize"}],["editor.insertSpaces",{monaco:"insertSpaces"}],["editor.trimAutoWhitespace",{monaco:"trimAutoWhitespace"}]]),t.diffEditorOptionsConverters=new Map([["diffEditor.enableSplitViewResizing",{monaco:"enableSplitViewResizing"}],["diffEditor.renderSideBySide",{monaco:"renderSideBySide"}],["diffEditor.ignoreTrimWhitespace",{monaco:"ignoreTrimWhitespace"}],["diffEditor.renderIndicators",{monaco:"renderIndicators"}],["diffEditor.originalEditable",{monaco:"originalEditable"}]]),t.isEditorOption=function(e){return o(e,t.editorOptionsConverters)||o(e,t.textModelUpdateOptionsConverters)||o(e,t.diffEditorOptionsConverters)},t.isDiffEditorOption=function(e){return o(e,t.diffEditorOptionsConverters)}},91793:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferences=t.editorPreferenceSchema=t.EDITOR_DEFAULTS=t.EDITOR_INLINE_SUGGEST_DEFAULTS=t.EDITOR_SUGGEST_DEFAULTS=t.EDITOR_MODEL_DEFAULTS=t.EDITOR_FONT_DEFAULTS=t.USUAL_WORD_SEPARATORS=void 0;const i=n(894);t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";t.EDITOR_FONT_DEFAULTS={fontFamily:i.isOSX?"Menlo, Monaco, 'Courier New', monospace":i.isLinux?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:12,tabSize:2,renderWhitespace:!1,cursorStyle:"line",insertSpace:!0,wordWrap:"off",wordWrapColumn:80,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_SUGGEST_DEFAULTS={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,preview:!0,statusBar:{visible:!1}},t.EDITOR_INLINE_SUGGEST_DEFAULTS={enabled:!0},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:t.USUAL_WORD_SEPARATORS,lineNumbersMinChars:3,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!0,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{鈥樷€溿€堛€娿€屻€庛€愩€旓紙锛伙經锝⒙Bワ紕锟★骏+锛�",wordWrapBreakAfterCharacters:" \t})]?|/&.,;垄掳鈥测€斥€扳剝銆併€傦健锝わ繝锛岋紟锛氾紱锛燂紒锛呫兓锝ャ倽銈炪兘銉俱兗銈°偅銈ャ偋銈┿儍銉c儱銉с儺銉点兌銇併亙銇呫亣銇夈仯銈冦倕銈囥値銈曘倴銍般嚤銍层嚦銍淬嚨銍躲嚪銍搞嚬銍恒嚮銍笺嚱銍俱嚳銆呫€伙涧锝僵锝将锝江锝蒋锝扳€濄€夈€嬨€嶃€忋€戙€曪級锛斤綕锝�",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,wrappingStrategy:"simple",viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:(0,i.localize)("editorViewAccessibleLabel","Editor content"),renderLineNumbers:0,renderCustomLineNumbers:null,renderFinalNewline:!0,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorSmoothCaretAnimation:!1,cursorStyle:1,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderLineHighlight:"none",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1,fastScrollSensitivity:5},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},guides:{indentation:!0,highlightActiveIndentGuide:!0,bracketPairs:!1},fixedOverflowWidgets:!0},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!1,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",gotoLocation:{multiple:"peek"},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1,addExtraSpaceOnTop:!0},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}};const r={"editor.ariaLabel":{type:"string",default:t.EDITOR_DEFAULTS.viewInfo.ariaLabel,description:(0,i.localize)("ariaLabel","The aria label for the editor's textarea (when it is focused).")},"editor.extraEditorClassName":{type:"string",description:(0,i.localize)("extraEditorClassName","Class name to be added to the editor.")},"editor.fixedOverflowWidgets":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fixedOverflowWidgets,description:(0,i.localize)("fixedOverflowWidgets","Display overflow widgets as fixed.")},"editor.revealHorizontalRightPadding":{type:"number",description:(0,i.localize)("revealHorizontalRightPadding","When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. Defaults to 30 (px).")},"editor.selectOnLineNumbers":{type:"boolean",description:(0,i.localize)("selectOnLineNumbers","Should the corresponding line be selected when clicking on the line number? Defaults to true.")},"editor.wordWrapMinified":{type:"boolean",description:(0,i.localize)("wordWrapMinified","Force word wrapping when the text appears to be of a minified/generated file. Defaults to true.")},"editor.wordWrapBreakAfterCharacters":{type:"string",default:" \t})]?|/&.,;垄掳鈥测€斥€扳剝銆併€傦健锝わ繝锛岋紟锛氾紱锛燂紒锛呫兓锝ャ倽銈炪兘銉俱兗銈°偅銈ャ偋銈┿儍銉c儱銉с儺銉点兌銇併亙銇呫亣銇夈仯銈冦倕銈囥値銈曘倴銍般嚤銍层嚦銍淬嚨銍躲嚪銍搞嚬銍恒嚮銍笺嚱銍俱嚳銆呫€伙涧锝僵锝将锝江锝蒋锝扳€濄€夈€嬨€嶃€忋€戙€曪級锛斤綕锝�",description:(0,i.localize)("wordWrapBreakAfterCharacters","Configure word wrapping characters. A break will be introduced after these characters. Defaults to ' \t})]?|/&.,;垄掳鈥测€斥€扳剝銆併€傦健锝わ繝锛岋紟锛氾紱锛燂紒锛呫兓锝ャ倽銈炪兘銉俱兗銈°偅銈ャ偋銈┿儍銉c儱銉с儺銉点兌銇併亙銇呫亣銇夈仯銈冦倕銈囥値銈曘倴銍般嚤銍层嚦銍淬嚨銍躲嚪銍搞嚬銍恒嚮銍笺嚱銍俱嚳銆呫€伙涧锝僵锝将锝江锝蒋锝扳€濄€夈€嬨€嶃€忋€戙€曪級锛斤綕锝�'.")},"editor.wrappingStrategy":{type:"string",enum:["advanced","simple"],default:"simple",description:(0,i.localize)("wrappingStrategy","Controls the algorithm that computes wrapping points.")},"editor.wordWrapBreakBeforeCharacters":{type:"string",default:"([{鈥樷€溿€堛€娿€屻€庛€愩€旓紙锛伙經锝⒙Bワ紕锟★骏+锛�",description:(0,i.localize)("wordWrapBreakBeforeCharacters","Configure word wrapping characters. A break will be introduced before these characters. Defaults to '([{鈥樷€溿€堛€娿€屻€庛€愩€旓紙锛伙經锝⒙Bワ紕锟★骏+锛�'.")},"editor.lineNumbersMinChars":{type:"number",default:t.EDITOR_DEFAULTS.lineNumbersMinChars,description:(0,i.localize)("lineNumbersMinChars","Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits. Defaults to 5.")},"editor.lineDecorationsWidth":{type:"number",default:t.EDITOR_DEFAULTS.lineDecorationsWidth,description:(0,i.localize)("lineDecorationsWidth",'The width reserved for line decorations (in px). Line decorations are placed between line numbers and the editor content. You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch. Defaults to 10.')},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily,description:(0,i.localize)("fontFamily","Controls the font family.")},"editor.fontWeight":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontWeight,description:(0,i.localize)("editor.configuration.fontWeight")},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,description:(0,i.localize)("fontSize","Controls the font size in pixels.")},"editor.lineHeight":{type:"number",default:t.EDITOR_FONT_DEFAULTS.lineHeight,description:(0,i.localize)("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")},"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[(0,i.localize)("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),(0,i.localize)("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:"insert",description:(0,i.localize)("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.filterGraceful,description:(0,i.localize)("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.localityBonus,description:(0,i.localize)("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.shareSuggestSelections,description:(0,i.localize)("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.snippetsPreventQuickSuggestions,description:(0,i.localize)("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.showIcons,description:(0,i.localize)("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.maxVisibleSuggestions":{type:"number",default:t.EDITOR_SUGGEST_DEFAULTS.maxVisibleSuggestions,minimum:1,maximum:15,description:(0,i.localize)("editor.suggest.maxVisibleSuggestions","Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")},"editor.suggest.showMethods":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,description:(0,i.localize)("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,description:(0,i.localize)("editor.suggest.statusBar.visible","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.preview,description:(0,i.localize)("editor.suggest.preview","Enable or disable the rendering of the suggestion preview.")},"editor.inlineSuggest.enabled":{type:"boolean",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,description:(0,i.localize)("inlineSuggest.enabled","Enable or disable the rendering of automatic inline completions.")},"editor.letterSpacing":{type:"number",default:t.EDITOR_FONT_DEFAULTS.letterSpacing,description:(0,i.localize)("letterSpacing","Controls the letter spacing in pixels.")},"editor.lineNumbers":{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[(0,i.localize)("lineNumbers.off","Line numbers are not rendered."),(0,i.localize)("lineNumbers.on","Line numbers are rendered as absolute number."),(0,i.localize)("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),(0,i.localize)("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:(0,i.localize)("lineNumbers","Controls the display of line numbers.")},"editor.renderFinalNewline":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderFinalNewline,description:(0,i.localize)("renderFinalNewline","Render last line number when the file ends with a newline.")},"editor.rulers":{type:"array",items:{type:"number"},default:t.EDITOR_DEFAULTS.viewInfo.rulers,description:(0,i.localize)("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")},"editor.wordSeparators":{type:"string",default:t.EDITOR_DEFAULTS.wordSeparators,description:(0,i.localize)("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")},"editor.tabSize":{type:"number",default:t.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:(0,i.localize)("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:(0,i.localize)("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:(0,i.localize)("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.roundedSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.roundedSelection,description:(0,i.localize)("roundedSelection","Controls whether selections should have rounded corners.")},"editor.scrollBeyondLastLine":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,description:(0,i.localize)("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")},"editor.scrollBeyondLastColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,description:(0,i.localize)("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")},"editor.smoothScrolling":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.smoothScrolling,description:(0,i.localize)("smoothScrolling","Controls whether the editor will scroll using an animation.")},"editor.minimap.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.enabled,description:(0,i.localize)("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.side,description:(0,i.localize)("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.showSlider,description:(0,i.localize)("minimap.showSlider","Controls whether the minimap slider is automatically hidden.")},"editor.minimap.renderCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,description:(0,i.localize)("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,description:(0,i.localize)("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.hover.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.enabled,description:(0,i.localize)("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.delay,description:(0,i.localize)("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.sticky,description:(0,i.localize)("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,description:(0,i.localize)("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,description:(0,i.localize)("find.autoFindInSelection","Controls whether the find operation is carried out on selected text or the entire file in the editor.")},"editor.find.globalFindClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,description:(0,i.localize)("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:i.isOSX},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:!0,description:(0,i.localize)("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.wordWrap":{type:"string",enum:["off","on","wordWrapColumn","bounded"],markdownEnumDescriptions:[(0,i.localize)("wordWrap.off","Lines will never wrap."),(0,i.localize)("wordWrap.on","Lines will wrap at the viewport width."),(0,i.localize)("wordWrap.wordWrapColumn","Lines will wrap at `#editor.wordWrapColumn#`."),(0,i.localize)("wordWrap.bounded","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],default:t.EDITOR_DEFAULTS.wordWrap,description:(0,i.localize)("wordWrap","Controls how lines should wrap.")},"editor.wordWrapColumn":{type:"integer",default:t.EDITOR_DEFAULTS.wordWrapColumn,minimum:1,markdownDescription:(0,i.localize)("wordWrapColumn","Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")},"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[(0,i.localize)("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),(0,i.localize)("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),(0,i.localize)("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),(0,i.localize)("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],default:"same",description:(0,i.localize)("wrappingIndent","Controls the indentation of wrapped lines.")},"editor.mouseWheelScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,markdownDescription:(0,i.localize)("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},"editor.fastScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,markdownDescription:(0,i.localize)("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")},"editor.multiCursorModifier":{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,i.localize)("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,i.localize)("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"alt",markdownDescription:(0,i.localize)("multiCursorModifier","The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")},"editor.multiCursorMergeOverlapping":{type:"boolean",default:t.EDITOR_DEFAULTS.multiCursorMergeOverlapping,description:(0,i.localize)("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")},"editor.quickSuggestions":{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:!1,description:(0,i.localize)("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:!1,description:(0,i.localize)("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:!0,description:(0,i.localize)("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestions,description:(0,i.localize)("quickSuggestions","Controls whether suggestions should automatically show up while typing.")},"editor.quickSuggestionsDelay":{type:"integer",default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,minimum:0,description:(0,i.localize)("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")},"editor.parameterHints.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.enabled,description:(0,i.localize)("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.cycle,description:(0,i.localize)("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")},"editor.autoClosingBrackets":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,i.localize)("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),(0,i.localize)("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingBrackets,description:(0,i.localize)("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")},"editor.autoClosingQuotes":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,i.localize)("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),(0,i.localize)("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingQuotes,description:(0,i.localize)("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")},"editor.autoSurround":{type:"string",enum:["languageDefined","brackets","quotes","never"],enumDescriptions:[(0,i.localize)("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),(0,i.localize)("editor.autoSurround.brackets","Surround with brackets but not quotes."),(0,i.localize)("editor.autoSurround.quotes","Surround with quotes but not brackets."),""],default:t.EDITOR_DEFAULTS.autoSurround,description:(0,i.localize)("autoSurround","Controls whether the editor should automatically surround selections.")},"editor.formatOnType":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnType,description:(0,i.localize)("formatOnType","Controls whether the editor should automatically format the line after typing.")},"editor.formatOnPaste":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnPaste,description:(0,i.localize)("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")},"editor.autoIndent":{type:"boolean",default:t.EDITOR_DEFAULTS.autoIndent,description:(0,i.localize)("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste or move lines. Extensions with indentation rules of the language must be available.")},"editor.suggestOnTriggerCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,description:(0,i.localize)("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter,markdownEnumDescriptions:["",(0,i.localize)("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:(0,i.localize)("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter,markdownDescription:(0,i.localize)("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],enumDescriptions:[(0,i.localize)("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),(0,i.localize)("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),(0,i.localize)("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),(0,i.localize)("snippetSuggestions.none","Do not show snippet suggestions.")],default:"inline",description:(0,i.localize)("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")},"editor.emptySelectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.emptySelectionClipboard,description:(0,i.localize)("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")},"editor.copyWithSyntaxHighlighting":{type:"boolean",default:t.EDITOR_DEFAULTS.copyWithSyntaxHighlighting,description:(0,i.localize)("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")},"editor.wordBasedSuggestions":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions,description:(0,i.localize)("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.suggestSelection":{type:"string",enum:["first","recentlyUsed","recentlyUsedByPrefix"],markdownEnumDescriptions:[(0,i.localize)("suggestSelection.first","Always select the first suggestion."),(0,i.localize)("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),(0,i.localize)("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:(0,i.localize)("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:(0,i.localize)("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:(0,i.localize)("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[(0,i.localize)("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),(0,i.localize)("tabCompletion.off","Disable tab completions."),(0,i.localize)("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:(0,i.localize)("tabCompletion","Enables tab completions.")},"editor.suggest.filteredTypes":{type:"object",default:{keyword:!0,snippet:!0},markdownDescription:(0,i.localize)("suggest.filtered","Controls whether some suggestion types should be filtered from IntelliSense. A list of suggestion types can be found here: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions."),properties:{method:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.method","When set to `false` IntelliSense never shows `method` suggestions.")},function:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.function","When set to `false` IntelliSense never shows `function` suggestions.")},constructor:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.constructor","When set to `false` IntelliSense never shows `constructor` suggestions.")},field:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.field","When set to `false` IntelliSense never shows `field` suggestions.")},variable:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.variable","When set to `false` IntelliSense never shows `variable` suggestions.")},class:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.class","When set to `false` IntelliSense never shows `class` suggestions.")},struct:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.struct","When set to `false` IntelliSense never shows `struct` suggestions.")},interface:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.interface","When set to `false` IntelliSense never shows `interface` suggestions.")},module:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.module","When set to `false` IntelliSense never shows `module` suggestions.")},property:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.property","When set to `false` IntelliSense never shows `property` suggestions.")},event:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.event","When set to `false` IntelliSense never shows `event` suggestions.")},operator:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.operator","When set to `false` IntelliSense never shows `operator` suggestions.")},unit:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.unit","When set to `false` IntelliSense never shows `unit` suggestions.")},value:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.value","When set to `false` IntelliSense never shows `value` suggestions.")},constant:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.constant","When set to `false` IntelliSense never shows `constant` suggestions.")},enum:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.enum","When set to `false` IntelliSense never shows `enum` suggestions.")},enumMember:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.enumMember","When set to `false` IntelliSense never shows `enumMember` suggestions.")},keyword:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.keyword","When set to `false` IntelliSense never shows `keyword` suggestions.")},text:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.text","When set to `false` IntelliSense never shows `text` suggestions.")},color:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.color","When set to `false` IntelliSense never shows `color` suggestions.")},file:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.file","When set to `false` IntelliSense never shows `file` suggestions.")},reference:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.reference","When set to `false` IntelliSense never shows `reference` suggestions.")},customcolor:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.customcolor","When set to `false` IntelliSense never shows `customcolor` suggestions.")},folder:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.folder","When set to `false` IntelliSense never shows `folder` suggestions.")},typeParameter:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.typeParameter","When set to `false` IntelliSense never shows `typeParameter` suggestions.")},snippet:{type:"boolean",default:!0,markdownDescription:(0,i.localize)("suggest.filtered.snippet","When set to `false` IntelliSense never shows `snippet` suggestions.")}}},"editor.gotoLocation.multiple":{description:(0,i.localize)("editor.gotoLocation.multiple","Controls the behavior of 'Go To' commands, like Go To Definition, when multiple target locations exist."),type:"string",enum:["peek","gotoAndPeek","goto"],default:t.EDITOR_DEFAULTS.contribInfo.gotoLocation.multiple,enumDescriptions:[(0,i.localize)("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),(0,i.localize)("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),(0,i.localize)("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},"editor.selectionHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionHighlight,description:(0,i.localize)("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")},"editor.occurrencesHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,description:(0,i.localize)("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:(0,i.localize)("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.overviewRulerBorder,description:(0,i.localize)("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:"blink",description:(0,i.localize)("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,markdownDescription:(0,i.localize)("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorSmoothCaretAnimation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.cursorSmoothCaretAnimation,description:(0,i.localize)("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle,description:(0,i.localize)("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:t.EDITOR_DEFAULTS.viewInfo.cursorWidth,markdownDescription:(0,i.localize)("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fontLigatures,description:(0,i.localize)("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler,description:(0,i.localize)("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","selection","all"],enumDescriptions:["",(0,i.localize)("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),(0,i.localize)("renderWhitespace.selection","Render whitespace characters only on selected text."),""],default:t.EDITOR_DEFAULTS.viewInfo.renderWhitespace,description:(0,i.localize)("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.rename.enablePreview":{type:"boolean",default:!0,description:"Enable/disable the ability to preview changes before renaming"},"editor.renderControlCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderControlCharacters,description:(0,i.localize)("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.guides.indentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.indentation,description:(0,i.localize)("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.highlightActiveIndentGuide,description:(0,i.localize)("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")},"editor.guides.bracketPairs":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.bracketPairs,description:(0,i.localize)("editor.configuration.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",(0,i.localize)("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:t.EDITOR_DEFAULTS.viewInfo.renderLineHighlight,description:(0,i.localize)("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.codeLens,description:(0,i.localize)("codeLens","Controls whether the editor shows CodeLens.")},"editor.folding":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.folding,description:(0,i.localize)("folding","Controls whether the editor has code folding enabled.")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:t.EDITOR_DEFAULTS.contribInfo.foldingStrategy,markdownDescription:(0,i.localize)("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.contribInfo.showFoldingControls,description:(0,i.localize)("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.matchBrackets,description:(0,i.localize)("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.glyphMargin,description:(0,i.localize)("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:t.EDITOR_DEFAULTS.useTabStops,description:(0,i.localize)("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:(0,i.localize)("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:(0,i.localize)("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:t.EDITOR_DEFAULTS.dragAndDrop,description:(0,i.localize)("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[(0,i.localize)("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),(0,i.localize)("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),(0,i.localize)("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:t.EDITOR_DEFAULTS.accessibilitySupport,description:(0,i.localize)("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:t.EDITOR_DEFAULTS.showUnused,description:(0,i.localize)("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.links,description:(0,i.localize)("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.colorDecorators,description:(0,i.localize)("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,description:(0,i.localize)("codeActions","Enables the code action lightbulb in the editor.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:(0,i.localize)("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:(0,i.localize)("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")},"source.fixAll":{type:"boolean",description:(0,i.localize)("codeActionsOnSave.fixAll","Controls whether auto fix action should be run on file save.")}},additionalProperties:{type:"boolean"},default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,description:(0,i.localize)("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,description:(0,i.localize)("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionClipboard,description:(0,i.localize)("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:i.isLinux},"editor.largeFileOptimizations":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:(0,i.localize)("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:(0,i.localize)("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"editor.defaultFormatter":{type:"string",description:(0,i.localize)("defaultFormatter","Default code formatter")}},o={"editor.tokenColorCustomizations":{type:"object",description:"%preference.editor.tokenColorCustomizations%",default:{}},"editor.askIfDiff":{type:"boolean",default:!0,description:"%editor.configuration.askIfDiff%"},"editor.showActionWhenGroupEmpty":{type:"boolean",default:!1,description:"%editor.configuration.showActionWhenGroupEmpty%"},"editor.autoSave":{type:"string",enum:["off","afterDelay","editorFocusChange","windowLostFocus"],default:"off",description:"%editor.configuration.autoSave%"},"editor.autoSaveDelay":{type:"number",default:1e3,description:"%editor.configuration.autoSaveDelay%"},"editor.preferredFormatter":{type:"object",default:{},description:"%editor.configuration.preferredFormatter%"},"editor.previewMode":{type:"boolean",default:!0,description:"%editor.configuration.previewMode%"},"editor.wrapTab":{type:"boolean",default:!1,description:"%editor.configuration.wrapTab%"},"editor.enablePreviewFromCodeNavigation":{type:"boolean",default:!1,description:"%editor.configuration.enablePreviewFromCodeNavigation%"},"editor.minimap":{type:"boolean",default:!1},"editor.forceReadOnly":{type:"boolean",default:!1,description:"%editor.configuration.forceReadOnly%"},"editor.languageFeatureEnabledMaxSize":{type:"number",default:2097152,description:"%editor.configuration.languageFeatureEnabledMaxSize%"},"editor.docExtHostSyncMaxSize":{type:"number",default:2097152,description:"%editor.configuration.docExtHostSyncMaxSize%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:"all",description:"%editor.configuration.renderLineHighlight%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,minimum:6},"editor.tabSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.tabSize,minimum:1,description:"%editor.configuration.tabSize%"},"editor.formatOnPaste":{type:"boolean",default:!1},"editor.detectIndentation":{type:"boolean",default:!0},"editor.renderWhitespace":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.renderWhitespace},"editor.cursorStyle":{type:"string",enum:["line","block","block-outline","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.insertSpace},"editor.wordWrap":{type:"string",enum:["off","on"],default:t.EDITOR_FONT_DEFAULTS.wordWrap},"editor.wordWrapColumn":{type:"number",default:t.EDITOR_FONT_DEFAULTS.wordWrapColumn,description:"%editor.configuration.wordWrapColumn%"},"editor.readonlyFiles":{type:"array",default:[],items:{type:"string"}},"editor.formatOnSave":{type:"boolean",default:!1,description:"%preference.editor.formatOnSave%"},"editor.formatOnSaveTimeout":{type:"number",default:750,description:"%editor.configuration.formatOnSaveTimeout%"},"editor.lineHeight":{type:"number",default:0,description:"%editor.lineHeight.description%"},"editor.maxTokenizationLineLength":{type:"integer",default:1e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[(0,i.localize)("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),(0,i.localize)("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),(0,i.localize)("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:!0,description:(0,i.localize)("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.bracketPairColorization.enabled":{type:"boolean",default:!1,description:"%editor.configuration.bracketPairColorization.enabled%"},"editor.largeFile":{type:"number",default:2097152,description:"%editor.configuration.largeFileSize%"},"editor.quickSuggestionsDelay":{type:"integer",default:100,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.modelDisposeTime":{type:"integer",default:3e3},"workbench.editorAssociations":{type:"object",description:"%preference.workbench.editorAssociations%",default:{},additionalProperties:{type:"string"}},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:"%diffEditor.configuration.renderSideBySide%"},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!1,description:"%diffEditor.configuration.ignoreTrimWhitespace%"}};t.editorPreferenceSchema={type:"object",properties:Object.assign(Object.assign({},r),o)},t.EditorPreferences=Symbol("EditorPreference")},57553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorPreferenceProxy=void 0;const i=n(894),r=n(91793);t.createEditorPreferenceProxy=function(e,t,n){return(0,i.createPreferenceProxy)(e,r.editorPreferenceSchema,{resourceUri:t,overrideIdentifier:n})}},28662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoToLineQuickOpenHandler=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(43780),s=n(19306),c=i.__importStar(n(63138)),l=n(92675);class d extends s.AbstractGotoLineQuickAccessProvider{clearDecorations(e){super.clearDecorations(e)}preview(e,t){e.revealRangeInCenter(t,c.editor.ScrollType.Smooth),this.addDecorations(e,t)}goTo(e,t,n=!0){this.gotoLocation({editor:e},{range:t,preserveFocus:n,keyMods:{alt:!1,ctrlCmd:!1}})}}let u=class{constructor(){this.prefix=":",this.description=(0,o.localize)("quickopen.goToLine.desc"),this.quickAccess=new d}getFirstSelection(){const e=this.workbenchEditorService.currentEditor,t=null==e?void 0:e.getSelections();return null==t?void 0:t[0]}getRange(e=1,t=1){return{startLineNumber:e,endLineNumber:e,startColumn:t,endColumn:t}}init(){var e;this.savedViewState=(0,o.withNullAsUndefined)(null===(e=this.workbenchEditorService.currentEditor)||void 0===e?void 0:e.monacoEditor.saveViewState())}getModel(){var e,t,n,i,r;const s=this.workbenchEditorService.currentEditor,c=this.getFirstSelection();if(!c||!s)return{onType:(e,t)=>{t([new a.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const l=null!==(e=c.positionLineNumber)&&void 0!==e?e:1,d=null!==(t=c.positionColumn)&&void 0!==t?t:1,u=null!==(r=null===(i=null===(n=s.currentDocumentModel)||void 0===n?void 0:n.getMonacoModel())||void 0===i?void 0:i.getLineCount())&&void 0!==r?r:1;return{onType:(e,t)=>{const n=e.split(/,|:|#|锛殀锛�/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),i=n[0],r=n[1];if(i){let e=(0,o.formatLocalize)("quickopen.goToLine.lineInfo",i);r&&(e+=(0,o.formatLocalize)("quickopen.goToLine.colInfo",r));const n=this.getRange(i,r);t([new a.QuickOpenItem({label:e,run:e=>e===a.Mode.PREVIEW?(this.quickAccess.preview(s.monacoEditor,n),!1):(this.quickAccess.goTo(s.monacoEditor,n,!0),!0)})])}else this.quickAccess.clearDecorations(s.monacoEditor),t([new a.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",l,d,u),run:()=>!1})])}}}getOptions(){return{}}onClose(e){const t=this.workbenchEditorService.currentEditor;t&&(t.monacoEditor.focus(),this.quickAccess.clearDecorations(t.monacoEditor),e&&this.savedViewState&&t.monacoEditor.restoreViewState(this.savedViewState))}};i.__decorate([(0,r.Autowired)(a.PrefixQuickOpenService),i.__metadata("design:type",Object)],u.prototype,"quickOpenService",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],u.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),i.__metadata("design:type",l.WorkbenchEditorService)],u.prototype,"workbenchEditorService",void 0),u=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.GoToLineQuickOpenHandler=u},75082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolInformationQuickOpenItem=t.WorkspaceSymbolQuickOpenHandler=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(48770),c=n(14238),l=n(67266),d=n(23730);let u=class extends s.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,a.localize)("quickOpen.openSide"),class:(0,o.getIcon)("embed")})}async run(e){await e.openSide()}};u=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],u);let p=class{hasActions(){return!0}getActions(){return[this.workspaceSymbolOpenSideActionOpen]}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",u)],p.prototype,"workspaceSymbolOpenSideActionOpen",void 0),p=i.__decorate([(0,r.Injectable)()],p);let h=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,a.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(e,t)=>{if(""===e)return void t([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);if("#"===e)return void t([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(0===this.languageService.workspaceSymbolProviders.length)return void t([new o.QuickOpenItem({label:(0,a.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);const n="#"===e[0],i=[];this.cancellationSource.cancel();const r=new o.CancellationTokenSource;this.cancellationSource=r;const s={query:n?e.slice(1):e},c=this.reporterService.time(a.REPORT_NAME.QUICK_OPEN_MEASURE);Promise.all(this.languageService.workspaceSymbolProviders.map((async e=>{let a=await e.provideWorkspaceSymbols(s,r.token);if(n&&(a=null==a?void 0:a.filter((e=>e.kind===l.SymbolKind.Class))),a&&a.length&&!r.token.isCancellationRequested){const n=await Promise.all(a.map((async t=>{const n=await this.workspaceService.asRelativePath(new o.URI(t.location.uri).parent)||"";return new m(t,e,this.workbenchEditorService,r.token,n)})));i.push(...n),t(i,this.workspaceSymbolActionProvider)}return a}))).catch((e=>{this.logger.log(e)})).finally((()=>{r.token.isCancellationRequested||(i.length||t([]),c.timeEnd(n?"class":"symbol",{lookFor:e,stat:{symbol:i.length}}))}))}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(e,t)=>new o.QuickOpenItem({label:(0,a.localize)(t.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};i.__decorate([(0,r.Autowired)(d.ILanguageService),i.__metadata("design:type",Object)],h.prototype,"languageService",void 0),i.__decorate([(0,r.Autowired)(c.IWorkspaceService),i.__metadata("design:type",Object)],h.prototype,"workspaceService",void 0),i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],h.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(d.WorkbenchEditorService),i.__metadata("design:type",d.WorkbenchEditorService)],h.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",p)],h.prototype,"workspaceSymbolActionProvider",void 0),i.__decorate([(0,r.Autowired)(a.IReporterService),i.__metadata("design:type",Object)],h.prototype,"reporterService",void 0),h=i.__decorate([(0,r.Injectable)()],h),t.WorkspaceSymbolQuickOpenHandler=h;class m extends o.QuickOpenItem{constructor(e,t,n,i,r){super({}),this.symbol=e,this.provider=t,this.workbenchEditorService=n,this.token=i,this.relativePath=r}getLabel(){return this.symbol.name}getUri(){return new o.URI(this.symbol.location.uri)}getIconClass(){return(0,o.getSymbolIcon)(this.symbol.kind)}getDescription(){const e=this.symbol.containerName;return`${e?`${e} 路 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(e){if(!e)return;const{start:t,end:n}=e;return{startLineNumber:t.line+1,startColumn:t.character+1,endLineNumber:n.line+1,endColumn:n.character+1}}open(e,t){this.workbenchEditorService.open(e,{range:this.fromRange(t)})}run(e){const t=this.getUri();return e===o.QuickOpenMode.OPEN&&this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then((e=>{e?this.open(t,e.location.range):this.open(t,this.symbol.location.range)})),!0}openSide(){const e=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then((t=>{this.workbenchEditorService.open(e,{preview:!1,split:d.EditorGroupSplitAction.Right,range:this.fromRange(t?t.location.range:this.symbol.location.range),focus:!0})}))}}t.SymbolInformationQuickOpenItem=m},12820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceServiceImpl=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(90642),c=n(23730),{addElement:l}=s.arrays;let d=class extends a.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new s.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new s.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new s.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(e){const t=e.payload;if(this.resources.has(t.toString())){const e=this.resources.get(t.toString());this.doGetResource(t).then((n=>{e&&(Object.assign(null==e?void 0:e.resource,null==n?void 0:n.resource),e.provider=null==n?void 0:n.provider),this.eventBus.fire(new c.ResourceDidUpdateEvent(t))}))}}onResourceDecorationChangeEvent(e){this.getResourceDecoration(e.payload.uri);let t=!1;const n=this.resourceDecoration.get(e.payload.uri.toString())||{};new Set([...Object.keys(n),...Object.keys(e.payload.decoration)]).forEach((i=>{n[i]!==e.payload.decoration[i]&&(t=!0)})),t&&(Object.assign(this.resourceDecoration.get(e.payload.uri.toString()),e.payload.decoration),this.eventBus.fire(new c.ResourceDecorationChangeEvent(e.payload)))}async getResource(e){if(!this.resources.has(e.toString())){const t=await this.doGetResource(e);if(!t)return null;const n={resource:(0,r.observable)(Object.assign({},t.resource)),provider:t.provider};this.resources.set(e.toString(),n)}return this.resources.get(e.toString()).resource}handlesUri(e){return!!this.calculateProvider(e)}async doGetResource(e){if(!this.gettingResources.has(e.toString())){const t=(async()=>{const t=this.calculateProvider(e);if(t){const n=await t.provideResource(e);return n.uri=e,{resource:n,provider:t}}return this.logger.error("URI has no resource provider: "+e),null})();this.gettingResources.set(e.toString(),t),t.finally((()=>{this.gettingResources.delete(e.toString())}))}return this.gettingResources.get(e.toString())}registerResourceProvider(e){this.onRegisterResourceProviderEmitter.fire(e);const t=new s.Disposable;return t.addDispose(l(this.providers,e)),t.addDispose({dispose:()=>{for(const t of this.resources.values())t.provider===e&&(t.provider=p,this.onUnregisterResourceProviderEmitter.fire(e));this.cachedProvider.clear()}}),this.cachedProvider.clear(),t}async shouldCloseResource(e,t){const n=this.getProvider(e.uri);return!n||!n.shouldCloseResource||await n.shouldCloseResource(e,t)}async shouldCloseResourceWithoutConfirm(e){const t=this.getProvider(e.uri);return!(!t||!t.shouldCloseResourceWithoutConfirm)&&await t.shouldCloseResourceWithoutConfirm(e)}async close(e,t){const n=this.getProvider(e.uri);return!n||!n.close||await n.close(e,t)}calculateProvider(e){if(this.cachedProvider.has(e.toString()))return this.cachedProvider.get(e.toString());let t,n={weight:-1,index:-1};function i(e,i,r){n={weight:i,index:r},t=e}return this.providers.forEach(((t,r)=>{let o=-1;t.handlesUri?o=t.handlesUri(e):t.scheme&&(o=t.scheme===e.scheme?10:-1),o>=0&&(o>n.weight||o===n.weight&&r>n.index)&&i(t,o,r)})),this.cachedProvider.set(e.toString(),t),t}getProvider(e){const t=this.resources.get(e.toString());return t?t.provider:void 0}getResourceDecoration(e){return this.resourceDecoration.has(e.toString())||this.resourceDecoration.set(e.toString(),(0,r.observable)(u)),this.resourceDecoration.get(e.toString())}getResourceSubname(e,t){const n=this.getProvider(e.uri);return n?n.provideResourceSubname?n.provideResourceSubname(e,t):null:(this.logger.error("URI has no resource provider: "+e.uri),null)}disposeResource(e){const t=this.getProvider(e.uri);return this.resources.delete(e.uri.toString()),t&&t.onDisposeResource?t.onDisposeResource(e):void 0}};i.__decorate([(0,o.Autowired)(s.ILogger),i.__metadata("design:type",Object)],d.prototype,"logger",void 0),i.__decorate([(0,a.OnEvent)(c.ResourceNeedUpdateEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[c.ResourceNeedUpdateEvent]),i.__metadata("design:returntype",void 0)],d.prototype,"onResourceNeedUpdateEvent",null),i.__decorate([(0,a.OnEvent)(c.ResourceDecorationNeedChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[c.ResourceDecorationNeedChangeEvent]),i.__metadata("design:returntype",void 0)],d.prototype,"onResourceDecorationChangeEvent",null),d=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.ResourceServiceImpl=d;const u={dirty:!1},p={handlesUri:()=>-1,provideResource:e=>({uri:e,name:"",icon:""})}},92495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActions=t.Tabs=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=n(894),s=n(32278),c=n(16871),l=n(67109),d=n(57061),u=n(12059),p=n(23730),h=i.__importDefault(n(90182)),m=n(91936),g=n(92675),f=n(55753),_=n(46227).u2;function b(e){(this.offsetWidth+this.scrollLeft+e.deltaX>this.scrollWidth||this.scrollLeft+e.deltaX<0)&&e.preventDefault()}t.Tabs=({group:e})=>{const n=(0,o.useRef)(),i=(0,o.useRef)(),s=(0,o.useRef)(null),y=(0,o.useRef)(null),v=(0,u.useInjectable)(p.ResourceService),C=(0,u.useInjectable)(a.IEventBus),S=(0,o.useContext)(a.ConfigContext),w=(0,u.useInjectable)(p.WorkbenchEditorService),E=(0,u.useInjectable)(m.TabTitleMenuService),k=(0,u.useInjectable)(a.PreferenceService),x=(0,u.useInjectable)(d.IMenuRegistry),[T,D]=(0,o.useState)({}),[A,I]=(0,o.useState)(!!k.get("editor.wrapTab")),[M,R]=(0,o.useState)(new Map),[P,O]=(0,o.useState)(),N=(0,o.useMemo)((()=>(0,a.getSlotLocation)(_,S.layoutConfig)),[]);(0,f.useUpdateOnGroupTabChange)(e),(0,u.useUpdateOnEventBusEvent)(p.ResourceDidUpdateEvent,[e.resources],(t=>!!i&&-1!==e.resources.findIndex((e=>e.uri.isEqual(t))))),(0,o.useEffect)((()=>{const t=new a.Disposable;return t.addDispose(e.onDidEditorGroupContentLoading((t=>{var n;null===(n=e.resourceStatus.get(t))||void 0===n||n.finally((()=>{D(Object.assign({},T,{[t.uri.toString()]:!1}))})),D(Object.assign({},T,{[t.uri.toString()]:!0}))}))),t.addDispose(e.onDidEditorGroupTabChanged((()=>{A||F()}))),()=>{t.dispose()}}),[e]);const L=(0,o.useCallback)(((t,n,i)=>{if(t.dataTransfer.getData("uri")){const n=new a.URI(t.dataTransfer.getData("uri"));let r;t.dataTransfer.getData("uri-source-group")&&(r=w.getEditorGroup(t.dataTransfer.getData("uri-source-group"))),e.dropUri(n,g.DragOverPosition.CENTER,r,i)}t.dataTransfer.files.length>0&&C.fire(new g.EditorGroupFileDropEvent({group:e,tabIndex:n,files:t.dataTransfer.files}))}),[e]),F=(0,o.useCallback)((()=>{if(n.current&&e.currentResource)try{const t=n.current.querySelector("."+h.default.kt_editor_tab+"[data-uri='"+e.currentResource.uri.toString()+"']");t&&function(e,t){const n=function(e,t){const n=e.scrollLeft,i=n+e.offsetWidth,r=t.offsetLeft,o=t.offsetWidth+r;if(t.offsetWidth>e.offsetWidth)return-1;return n<=r?i>=o?0:1:-1}(e,t);n<0?e.scrollLeft=t.offsetLeft:n>0&&(e.scrollLeft=t.offsetLeft+t.offsetWidth-e.offsetWidth)}(n.current,t)}catch(e){}}),[e]),B=(0,o.useCallback)((()=>{s.current&&(clearTimeout(s.current),s.current=null);const e=setTimeout((()=>{var e,t;(null===(e=y.current)||void 0===e?void 0:e.offsetWidth)!==P&&O(null===(t=y.current)||void 0===t?void 0:t.offsetWidth)}),200);s.current=e}),[y.current,s.current,P]);(0,o.useEffect)((()=>{A||queueMicrotask((()=>{F()}))}),[A,n.current]),(0,o.useEffect)((()=>{if(!A){const t=new a.Disposable;return n.current&&t.addDispose(new a.DomListener(n.current,"mousewheel",b)),t.addDispose(C.on(a.ResizeEvent,(e=>{e.payload.slotLocation===N&&F()}))),t.addDispose(C.on(g.GridResizeEvent,(t=>{t.payload.gridId===e.grid.uid&&F()}))),()=>{t.dispose()}}}),[A]);const j=o.default.useCallback((()=>{if(i.current&&A){const e=new Map;let t,n;const r=Array.from(i.current.children);r.pop(),r.forEach((i=>{i.offsetTop!==t&&(t=i.offsetTop,n&&e.set(r.indexOf(n),!0)),n=i,e.set(r.indexOf(i),!1)})),R(e)}}),[i.current,A]);(0,o.useEffect)((()=>{B()}),[y.current,A]),(0,o.useEffect)(j,[A,i.current,e,e.resources.length]),(0,o.useEffect)((()=>{const e=new a.DisposableCollection;return e.push(C.on(a.ResizeEvent,(e=>{e.payload.slotLocation===N&&j()}))),e.push(k.onPreferenceChanged((e=>{"editor.wrapTab"===e.preferenceName&&I(!!e.newValue)}))),e.push(w.onDidCurrentEditorGroupChanged((()=>{window.requestAnimationFrame(B)}))),e.push(a.Event.debounce(a.Event.filter(x.onDidChangeMenu,(e=>e===d.MenuId.EditorTitle)),(()=>{}),200)((()=>{window.requestAnimationFrame(B)}))),()=>{e.dispose()}}),[]),(0,o.useEffect)((()=>{const t=new a.DisposableCollection;return t.push(e.onDidEditorFocusChange((e=>{B()}))),()=>{t.dispose()}}),[e]);const z=()=>o.default.createElement("div",{className:h.default.kt_editor_tabs_content,ref:i,onDragLeave:()=>{i.current&&i.current.classList.remove(h.default.kt_on_drag_over)},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),i.current&&i.current.classList.add(h.default.kt_on_drag_over)},onDrop:e=>{i.current&&i.current.classList.remove(h.default.kt_on_drag_over),L&&L(e,-1)},onDoubleClick:e=>{e.target===e.currentTarget&&w.createUntitledResource()}},e.resources.map(((t,n)=>{let i;const s=v.getResourceDecoration(t.uri),c=v.getResourceSubname(t,e.resources);return o.default.createElement("div",{draggable:!0,className:(0,r.default)({[h.default.kt_editor_tab]:!0,[h.default.last_in_row]:M.get(n),[h.default.kt_editor_tab_current]:e.currentResource===t,[h.default.kt_editor_tab_preview]:e.previewURI&&e.previewURI.isEqual(t.uri)}),style:A&&n===e.resources.length-1?{marginRight:P,height:l.LAYOUT_VIEW_SIZE.EDITOR_TABS_HEIGHT}:{height:l.LAYOUT_VIEW_SIZE.EDITOR_TABS_HEIGHT},onContextMenu:n=>{E.show(n.nativeEvent.x,n.nativeEvent.y,t&&t.uri,e),n.preventDefault()},key:t.uri.toString(),onMouseUp:n=>{2===n.nativeEvent.which&&(n.preventDefault(),n.stopPropagation(),e.close(t.uri))},onMouseDown:n=>{1===n.nativeEvent.which&&e.open(t.uri,{focus:!0})},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),i&&i.classList.add(h.default.kt_on_drag_over)},"data-uri":t.uri.toString(),onDragLeave:e=>{i&&i.classList.remove(h.default.kt_on_drag_over)},onDrop:e=>{i&&i.classList.remove(h.default.kt_on_drag_over),L&&L(e,n,t)},onDoubleClick:n=>{e.pinPreviewed(t.uri)},ref:e=>i=e,onDragStart:n=>{n.dataTransfer.setData("uri",t.uri.toString()),n.dataTransfer.setData("uri-source-group",e.name)}},o.default.createElement("div",{className:T[t.uri.toString()]?"loading_indicator":(0,r.default)(t.icon)}," "),o.default.createElement("div",null,t.name),c?o.default.createElement("div",{className:h.default.subname},c):null,o.default.createElement("div",{className:h.default.tab_right},o.default.createElement("div",{className:(0,r.default)({[h.default.kt_hidden]:!s.dirty,[h.default.dirty]:!0})}),o.default.createElement("div",{className:h.default.close_tab,onMouseDown:n=>{n.stopPropagation(),e.close(t.uri)}},o.default.createElement("div",{className:(0,r.default)((0,a.getIcon)("close"),h.default.kt_editor_close_icon)}))))})),A&&o.default.createElement(t.EditorActions,{className:h.default.kt_editor_wrap_mode_action,ref:y,group:e}));return o.default.createElement("div",{className:h.default.kt_editor_tabs},o.default.createElement("div",{className:h.default.kt_editor_tabs_scroll_wrapper},A?o.default.createElement("div",{className:h.default.kt_editor_wrap_container},z()):o.default.createElement(c.Scroll,{ref:e=>e?n.current=e.ref:null,className:h.default.kt_editor_tabs_scroll},z())),!A&&o.default.createElement(t.EditorActions,{ref:y,group:e}))},t.EditorActions=(0,o.forwardRef)(((e,t)=>{var n;const{group:i,className:c}=e,d=(0,u.useInjectable)(g.IEditorActionRegistry),m=(0,u.useInjectable)(p.WorkbenchEditorService),f=d.getMenu(i),[_,b]=(0,o.useState)(m.currentEditorGroup===i),[y,v]=(0,o.useState)(i.currentResource?[i.currentResource.uri,i,null===(n=i.currentOrPreviousFocusedEditor)||void 0===n?void 0:n.currentUri]:void 0);return(0,o.useEffect)((()=>{const e=new a.DisposableCollection;return e.push(m.onDidCurrentEditorGroupChanged((()=>{b(m.currentEditorGroup===i)}))),e.push(m.onActiveResourceChange((()=>{var e;v(i.currentResource?[i.currentResource.uri,i,null===(e=i.currentOrPreviousFocusedEditor)||void 0===e?void 0:e.currentUri]:void 0)}))),()=>{e.dispose()}}),[]),o.default.createElement("div",{ref:t,className:(0,r.default)(h.default.editor_actions,c),style:{height:l.LAYOUT_VIEW_SIZE.EDITOR_TABS_HEIGHT}},o.default.createElement(s.InlineActionBar,{menus:f,context:y,regroup:(e,t)=>_?[e,t]:[[],t],debounce:{delay:100,maxWait:300}}))}))},92675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditorDidVisibleEvent=t.EditorComponentDisposeEvent=t.ResourceOpenTypeChangedEvent=t.IEditorFeatureRegistry=t.IBreadCrumbService=t.CompareResult=t.ICompareService=t.IEditorActionRegistry=t.EditorDecorationTypeRemovedEvent=t.EditorDecorationChangeEvent=t.EditorDecorationProviderRegistrationEvent=t.RegisterEditorSideComponentEvent=t.EditorGroupsResetSizeEvent=t.EditorGroupIndexChangedEvent=t.EditorConfigurationChangedEvent=t.EditorVisibleChangeEvent=t.EditorSelectionChangeEvent=t.IEditorDecorationCollectionService=t.EditorGroupFileDropEvent=t.EditorActiveResourceStateChangedEvent=t.EditorGroupChangeEvent=t.EditorGroupDisposeEvent=t.EditorGroupCloseEvent=t.EditorGroupOpenEvent=t.GridResizeEvent=t.BrowserEditorContribution=t.EditorComponentRegistry=t.RegisterEditorComponentEvent=t.RegisterEditorComponentResolverEvent=t.EditorComponentRenderMode=void 0;const i=n(70655),r=n(894);i.__exportStar(n(23730),t),function(e){e[e.ONE_PER_RESOURCE=1]="ONE_PER_RESOURCE",e[e.ONE_PER_GROUP=2]="ONE_PER_GROUP",e[e.ONE_PER_WORKBENCH=3]="ONE_PER_WORKBENCH"}(t.EditorComponentRenderMode||(t.EditorComponentRenderMode={}));class o extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=o;class a extends r.BasicEvent{}t.RegisterEditorComponentEvent=a;t.EditorComponentRegistry=class{},t.BrowserEditorContribution=Symbol("BrowserEditorContribution");class s extends r.BasicEvent{}t.GridResizeEvent=s;class c extends r.BasicEvent{}t.EditorGroupOpenEvent=c;class l extends r.BasicEvent{}t.EditorGroupCloseEvent=l;class d extends r.BasicEvent{}t.EditorGroupDisposeEvent=d;class u extends r.BasicEvent{}t.EditorGroupChangeEvent=u;class p extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=p;class h extends r.BasicEvent{}t.EditorGroupFileDropEvent=h,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class m extends r.BasicEvent{}t.EditorSelectionChangeEvent=m;class g extends r.BasicEvent{}t.EditorVisibleChangeEvent=g;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class _ extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=_;class b extends r.BasicEvent{}t.EditorGroupsResetSizeEvent=b;class y extends r.BasicEvent{}t.RegisterEditorSideComponentEvent=y;class v extends r.BasicEvent{}t.EditorDecorationProviderRegistrationEvent=v;class C extends r.BasicEvent{}t.EditorDecorationChangeEvent=C;class S extends r.BasicEvent{}t.EditorDecorationTypeRemovedEvent=S,t.IEditorActionRegistry=Symbol("IEditorActionRegistry"),t.ICompareService=Symbol("ICompareService"),function(e){e.revert="revert",e.accept="accept",e.cancel="cancel"}(t.CompareResult||(t.CompareResult={})),t.IBreadCrumbService=Symbol("IBreadScrumbService"),t.IEditorFeatureRegistry=Symbol("IEditorFeatureRegistry");class w extends r.BasicEvent{}t.ResourceOpenTypeChangedEvent=w;class E extends r.BasicEvent{}t.EditorComponentDisposeEvent=E;class k extends r.BasicEvent{}t.CodeEditorDidVisibleEvent=k},49645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UntitledSchemeResourceProvider=t.UntitledSchemeDocumentProvider=t.UntitledDocumentIdCounter=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(1500),s=n(23730),c=n(49539);let l=class{constructor(){this._id=1}get id(){return this._id++}};l=i.__decorate([(0,r.Injectable)()],l),t.UntitledDocumentIdCounter=l;let d=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(e){return e===o.Schemes.untitled}async provideEncoding(e){return this.preferenceService.get("files.encoding",void 0,e.toString(),(0,o.getLanguageIdFromMonaco)(e))||"utf8"}async provideEOL(e){const t=await this.applicationService.getBackendOS(),n=this.preferenceService.get("files.eol","auto",e.toString(),(0,o.getLanguageIdFromMonaco)(e));return"auto"!==n?n:t===o.OperatingSystem.Windows?"\r\n":"\n"}async provideEditorDocumentModelContent(e,t){return""}isReadonly(e){return!1}isAlwaysDirty(e){return!0}disposeEvenDirty(e){return!0}closeAutoSave(e){return!0}async saveDocumentModel(e,t,n,i,r,a=!1){const{name:s}=e.getParsedQuery(),c="/"!==e.path.toString()?o.path.dirname(e.path.toString()):this.appConfig.workspaceDir,l=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:s||e.displayName,defaultUri:o.URI.file(o.isWindows?c.replaceAll("\\","/"):c)});return l&&(await this.editorDocumentModelService.saveEditorDocumentModel(l,t,n,i,r,a),await this.workbenchEditorService.open(l,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:"success"}}onDidDisposeModel(){}};i.__decorate([(0,r.Autowired)(c.IEditorDocumentModelService),i.__metadata("design:type",Object)],d.prototype,"editorDocumentModelService",void 0),i.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),i.__metadata("design:type",s.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],d.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],d.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(o.IApplicationService),i.__metadata("design:type",Object)],d.prototype,"applicationService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],d.prototype,"preferenceService",void 0),d=i.__decorate([(0,r.Injectable)()],d),t.UntitledSchemeDocumentProvider=d;let u=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=o.Schemes.untitled}provideResource(e){const{name:t}=e.getParsedQuery();return{name:t||e.displayName,uri:e,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(e){const t=this.documentModelService.getModelReference(e.uri,"close-resource-check");return!(!t||!t.instance.dirty)}async close(e,t){const n=this.documentModelService.getModelReference(e.uri,"close-resource-check");if(!n)return!1;if(t===s.AskSaveResult.SAVE){const e=await n.instance.save();return n.dispose(),e}return t===s.AskSaveResult.REVERT?(await n.instance.revert(),n.dispose(),!0):!(!t||t===s.AskSaveResult.CANCEL)||(n.dispose(),!1)}async shouldCloseResource(e){const t=this.documentModelService.getModelReference(e.uri,"close-resource-check");if(!t||!t.instance.dirty)return t&&t.dispose(),!0;const n={[(0,o.localize)("file.prompt.dontSave","涓嶄繚瀛�")]:s.AskSaveResult.REVERT,[(0,o.localize)("file.prompt.save","淇濆瓨")]:s.AskSaveResult.SAVE,[(0,o.localize)("file.prompt.cancel","鍙栨秷")]:s.AskSaveResult.CANCEL},i=await this.dialogService.open((0,o.formatLocalize)("saveChangesMessage",e.name),o.MessageType.Info,Object.keys(n));return await this.close(e,n[i])}};i.__decorate([(0,r.Autowired)(a.IDialogService),i.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(c.IEditorDocumentModelService),i.__metadata("design:type",Object)],u.prototype,"documentModelService",void 0),u=i.__decorate([(0,r.Injectable)()],u),t.UntitledSchemeResourceProvider=u},5146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditor=void 0;const i=n(70655).__importDefault(n(616)),r=n(894),o=n(23730),a=n(49539);t.CodeEditor=e=>{const t=i.default.useRef(),n=(0,r.useInjectable)(o.EditorCollectionService),s=(0,r.useInjectable)(a.IEditorDocumentModelService),[c,l]=i.default.useState(void 0),[d,u]=i.default.useState(void 0),[p,h]=i.default.useState(void 0),[m,g]=i.default.useState(void 0);let f=!1;return i.default.useEffect((()=>{if(t.current){c&&c.dispose();const i=n.createCodeEditor(t.current,Object.assign({automaticLayout:!0},e.options));l(i),d&&i.open(d)}return()=>{f=!0,c&&c.dispose(),d&&d.dispose()}}),[t.current]),e&&c&&e.editorRef&&e.editorRef(c),p&&m!==p&&(g(p),s.createModelReference(new r.URI(p),"editor-react-component").then((e=>{d&&d.dispose(),f||e.instance.uri.toString()!==p?e.dispose():u(e)}))),d&&c&&c.currentDocumentModel!==d.instance&&c.open(d),e.uri&&e.uri.toString()!==p&&h(e.uri.toString()),i.default.createElement("div",Object.assign({ref:e=>e&&(t.current=e)},e))}},55753:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateOnGroupTabChange=void 0;const i=n(894);t.useUpdateOnGroupTabChange=function(e){return(0,i.useUpdateOnEvent)(e.onDidEditorGroupTabChanged,[e])}},30773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSuggestWidgetContribution=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(97783);let c=class{contribute(e){const t=new o.DisposableCollection,n=e.monacoEditor.getContribution(s.SuggestController.ID);if(n&&n.widget&&n.widget.value){const e=n.widget.value;t.push(e.onDidSelect((e=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:e}))}))),t.push(e.onDidHide((e=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:e}))}))),t.push(e.onDidShow((e=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:e}))}))),t.push(e.onDidFocus((e=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:e}))})))}return t}};i.__decorate([(0,r.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],c.prototype,"eventBus",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.EditorSuggestWidgetContribution=c},8514:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTopPaddingContribution=void 0;t.EditorTopPaddingContribution=class{contribute(e){return e.monacoEditor.onDidChangeModel((()=>{e.monacoEditor.changeViewZones((e=>{e.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})}))}))}}},97276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorGroup=t.WorkbenchEditorServiceImpl=void 0;const i=n(70655),r=n(22188),o=n(39993),a=n(894),s=n(26044),c=n(90642),l=n(90642),d=n(1500),u=i.__importStar(n(63138)),p=n(23730),h=n(49539),m=n(11313),g=n(78913),f=n(92675),_=n(49645),b=e=>!(!e.supportsRevive||e.deleted);let y=class extends l.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new l.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new l.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new l.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new l.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new l.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new l.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new l.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.initialize()}setEditorContextKeyService(e){this.editorContextKeyService=e}setCurrentGroup(e){var t;if(e){if(this._currentEditorGroup===e)return;this._currentEditorGroup=e,this._onActiveResourceChange.fire(e.currentResource),this.eventBus.fire(new f.EditorActiveResourceStateChangedEvent({resource:e.currentResource,openType:e.currentOpenType,editorUri:null===(t=this.currentEditor)||void 0===t?void 0:t.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(e){var t;e.payload.group===this.currentEditorGroup&&this.eventBus.fire(new f.EditorActiveResourceStateChangedEvent({resource:e.payload.newResource,openType:e.payload.newOpenType,editorUri:null===(t=this.currentEditor)||void 0===t?void 0:t.currentUri}))}getAllOpenedUris(){const e=[];for(const t of this.editorGroups)for(const n of t.resources){-1===e.findIndex((e=>e.isEqual(n.uri)))&&e.push(n.uri)}return e}async saveAll(e,t){for(const n of this.editorGroups)await n.saveAll(e,t)}hasDirty(){for(const e of this.editorGroups)if(e.hasDirty())return!0;return!1}calcDirtyCount(){return this.editorGroups.reduce(((e,t)=>e+t.calcDirtyCount()),0)}createEditorGroup(){const e=this.injector.get(v,[this.generateRandomEditorGroupName()]);this.editorGroups.push(e);const t=new l.Disposable(e.onDidEditorGroupBodyChanged((()=>{e===this.currentEditorGroup&&(!e.currentOpenType&&e.currentResource||this._onActiveResourceChange.fire(e.currentResource))})),e.onDidEditorFocusChange((()=>{var t;e===this.currentEditorGroup&&(!e.currentOpenType&&e.currentResource||this._onActiveEditorUriChange.fire(null===(t=e.currentOrPreviousFocusedEditor)||void 0===t?void 0:t.currentUri))})));e.addDispose({dispose:()=>{t.dispose()}});const n=e.onDidEditorGroupTabChanged((()=>{this.saveOpenedResourceState()}));return e.addDispose({dispose:()=>{n.dispose()}}),e.onCurrentEditorCursorChange((t=>{this._currentEditorGroup===e&&this._onCursorChange.fire(t)})),e}generateRandomEditorGroupName(){let e=(0,l.makeRandomHexString)(5);for(;-1!==this.editorGroups.findIndex((t=>t.name===e));)e=(0,l.makeRandomHexString)(5);return e}initialize(){return this.initializing||(this.initializing=this.doInitialize()),this.initializing}async doInitialize(){this.openedResourceState=await this.initializeState(),await this.contributionsReady.promise,await this.restoreState(),this._currentEditorGroup=this.editorGroups[0]}async initializeState(){return await this.getStorage(l.STORAGE_NAMESPACE.WORKBENCH)}get currentEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentEditor}get currentCodeEditor(){return this.currentEditorGroup.currentCodeEditor}get currentEditorGroup(){return this._currentEditorGroup}async open(e,t){await this.initialize();let n,i=this.currentEditorGroup;if(t&&void 0!==t.groupIndex?n=t.groupIndex:t&&t.relativeGroupIndex&&(n=this.currentEditorGroup.index+t.relativeGroupIndex),"number"==typeof n&&n>=0){if(n>=this.editorGroups.length)return i.open(e,Object.assign({},t,{split:p.EditorGroupSplitAction.Right}));i=this.sortedEditorGroups[n]||this.currentEditorGroup}return i.open(e,t)}async openUris(e){await this.initialize(),await this.currentEditorGroup.openUris(e)}getEditorGroup(e){return this.editorGroups.find((t=>t.name===e))}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(e){const t=this.editorGroups.findIndex((t=>t===e));if(-1!==t){if(1===this.editorGroups.length)return;this.editorGroups.splice(t,1),this.currentEditorGroup===e&&this.setCurrentGroup(this.editorGroups[0]);for(let e=t;e{let t=null;const n=this.documentModelManager.getModelReference(e,"resourceContextKey");return n&&(t=n.instance.languageId,n.dispose()),t},t=new s.ResourceContextKey(this.editorContextKeyService,(t=>{const n=e(t);return n||e(t)}));this.onActiveResourceChange((e=>{this.currentEditor&&this.currentEditor.currentUri?t.set(this.currentEditor.currentUri):e?t.set(e.uri):t.reset()})),this.currentEditor&&this.currentEditor.currentUri?t.set(this.currentEditor.currentUri):this.currentResource?t.set(this.currentResource.uri):t.reset()}onDomCreated(e){this._domNode=e,this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(e)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let e={editorGroup:{uris:[],previewIndex:-1}};e=this.openedResourceState.get("grid",e),this.topGrid=new g.EditorGrid,this.topGrid.onDidGridAndDesendantStateChange((()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const t=[],n=this.topGrid.deserialize(e,(()=>this.createEditorGroup()),t).then((()=>{0!==this.topGrid.children.length||this.topGrid.editorGroup||this.topGrid.setEditorGroup(this.createEditorGroup()),this.gridReady=!0,this._onDidGridReady.fire(),this.notifyGroupChanged()}));return Promise.all(t).then((()=>{this._restoring=!1;for(const e of this.contributions.getContributions())e.onDidRestoreState&&e.onDidRestoreState()})),n}async closeAll(e,t){for(const n of this.editorGroups.slice(0))e?await n.close(e,{force:t}):await n.closeAll()}async closeAllOnlyConfirmOnce(){const e=[];for(const t of this.editorGroups)for(const n of t.resources)e.push(n);const t=(await Promise.all(e.map((async e=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(e),resource:e}))))).filter((e=>e.shouldClose));if(0===t.length)return!1;const n={[(0,c.localize)("file.prompt.dontSave","涓嶄繚瀛�")]:f.AskSaveResult.REVERT,[(0,c.localize)("file.prompt.save","淇濆瓨")]:f.AskSaveResult.SAVE,[(0,c.localize)("file.prompt.cancel","鍙栨秷")]:f.AskSaveResult.CANCEL};let i=t.slice(0,10).map((e=>e.resource.name)).join("銆�");t.length>10&&(t.length-10==1?i+=(0,c.localize)("file.prompt.more.one"):i+=(0,l.formatLocalize)("file.prompt.more.number",t.length-10));const r=n[await this.dialogService.open((0,a.toMarkdown)((0,l.formatLocalize)("saveNFilesChangesMessage",t.length,i),this.openner),c.MessageType.Info,Object.keys(n))];return r===f.AskSaveResult.SAVE?(await Promise.all(t.map((e=>{var t,n;return null===(n=(t=this.resourceService).close)||void 0===n?void 0:n.call(t,e.resource,f.AskSaveResult.SAVE)}))),!1):r!==f.AskSaveResult.REVERT||(await Promise.all(t.map((e=>{var t,n;return null===(n=(t=this.resourceService).close)||void 0===n?void 0:n.call(t,e.resource,f.AskSaveResult.REVERT)}))),!1)}async close(e,t){return this.closeAll(e,t)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(e){if(e.payload.resource.uri.scheme===c.Schemes.untitled){const{index:t}=e.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(t,10)),this.untitledCloseIndex.sort(((e,t)=>e-t))}}createUntitledURI(){const e=this.untitledCloseIndex.shift()||this.untitledIndex.id;return(new l.URI).withScheme(c.Schemes.untitled).withQuery(`name=Untitled-${e}&index=${e}`)}createUntitledResource(e={uri:this.createUntitledURI()}){return this.open(e.uri,Object.assign({preview:!1,focus:!0},e.resourceOpenOptions))}};i.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),i.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),i.__decorate([(0,o.Autowired)(p.ResourceService),i.__metadata("design:type",p.ResourceService)],y.prototype,"resourceService",void 0),i.__decorate([(0,o.Autowired)(l.StorageProvider),i.__metadata("design:type",Function)],y.prototype,"getStorage",void 0),i.__decorate([(0,o.Autowired)(d.IDialogService),i.__metadata("design:type",Object)],y.prototype,"dialogService",void 0),i.__decorate([(0,o.Autowired)(a.IOpenerService),i.__metadata("design:type",Object)],y.prototype,"openner",void 0),i.__decorate([(0,o.Autowired)(f.BrowserEditorContribution),i.__metadata("design:type",Object)],y.prototype,"contributions",void 0),i.__decorate([(0,o.Autowired)(h.IEditorDocumentModelService),i.__metadata("design:type",Object)],y.prototype,"documentModelManager",void 0),i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",_.UntitledDocumentIdCounter)],y.prototype,"untitledIndex",void 0),i.__decorate([(0,l.OnEvent)(f.EditorGroupChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[f.EditorGroupChangeEvent]),i.__metadata("design:returntype",void 0)],y.prototype,"onEditorGroupChangeEvent",null),i.__decorate([(0,l.OnEvent)(f.EditorGroupCloseEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[f.EditorGroupCloseEvent]),i.__metadata("design:returntype",void 0)],y.prototype,"handleOnCloseUntitledResource",null),y=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],y),t.WorkbenchEditorServiceImpl=y;let v=class extends l.WithEventBus{constructor(e){super(),this.name=e,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new l.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new l.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupBodyChanged=new l.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new l.Emitter,this.onDidEditorGroupContentLoading=this._onDidEditorGroupContentLoading.event,this.previewURI=null,this.resources=[],this.resourceStatus=new Map,this.cachedResourcesActiveOpenTypes=new Map,this.cachedResourcesOpenTypes=new Map,this.availableOpenTypes=[],this.activeComponents=new Map,this.activateComponentsProps=new Map,this.holdDocumentModelRefs=new Map,this.toDispose=[],this._prevDomHeight=0,this._prevDomWidth=0,this._codeEditorPendingLayout=!1,this._diffEditorPendingLayout=!1,this._onCurrentEditorCursorChange=new l.Emitter,this.onCurrentEditorCursorChange=this._onCurrentEditorCursorChange.event,this.resourceOpenHistory=[],this._domNode=null,this.codeEditorReady=new l.ReadyEvent,this.diffEditorReady=new l.ReadyEvent,this._restoringState=!1,this.eventBus.on(a.ResizeEvent,(e=>{e.payload.slotLocation===(0,a.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)&&this.doLayoutEditors()})),this.eventBus.on(f.GridResizeEvent,(e=>{e.payload.gridId===this.grid.uid&&this.doLayoutEditors()})),this.eventBus.on(f.EditorComponentDisposeEvent,(e=>{this.activeComponents.delete(e.payload),this.activateComponentsProps.delete(e.payload)})),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged((e=>{"explorer.autoReveal"===e.preferenceName&&(this.explorerAutoRevealConfig=e.newValue)})))}attachToDom(e){this._domNode=e,e&&(this.contextKeyService.attachToDomNode(e),this.layoutEditors())}layoutEditors(){if(this._domNode){const e=this._domNode.offsetWidth,t=this._domNode.offsetHeight;e===this._prevDomWidth&&t===this._prevDomHeight||this.doLayoutEditors(),this._prevDomWidth=e,this._prevDomHeight=t}}doLayoutEditors(){this.codeEditor&&(this.currentOpenType&&"code"===this.currentOpenType.type?(this.codeEditor.layout(),this._codeEditorPendingLayout=!1):this._codeEditorPendingLayout=!0),this.diffEditor&&(this.currentOpenType&&"diff"===this.currentOpenType.type?(this.diffEditor.layout(),this._diffEditorPendingLayout=!1):this._diffEditorPendingLayout=!0)}setContextKeys(){var e;if(!this._resourceContext){const e=e=>{let t=null;const n=this.documentModelManager.getModelReference(e,"resourceContextKey");return n&&(n&&(t=n.instance.languageId),n.dispose()),t};this._resourceContext=new s.ResourceContextKey(this.contextKeyService,(t=>{const n=e(t);return n||e(t)})),this._diffResourceContextKey=new s.ResourceContextKey(this.contextKeyService,(t=>{const n=e(t);return n||e(t)}),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!1),this._isInDiffRightEditorContextKey=this.contextKeyService.createKey("isInDiffRightEditor",!1),this._isInEditorComponentContextKey=this.contextKeyService.createKey("inEditorComponent",!1)}this.currentOrPreviousFocusedEditor&&this.currentOrPreviousFocusedEditor.currentUri?(this._resourceContext.set(this.currentOrPreviousFocusedEditor.currentUri),this.currentOrPreviousFocusedEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentOrPreviousFocusedEditor.currentDocumentModel.languageId)):this.currentEditor&&this.currentEditor.currentUri?(this._resourceContext.set(this.currentEditor.currentUri),this.currentEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentEditor.currentDocumentModel.languageId)):(this.currentResource?this._resourceContext.set(this.currentResource.uri):this._resourceContext.reset(),this._editorLangIDContextKey.reset()),this._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set(null===(e=this.currentResource)||void 0===e?void 0:e.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const e=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new l.Disposable(this.diffEditor.modifiedEditor.onFocus((()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.modifiedEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()})),this.diffEditor.originalEditor.onFocus((()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.originalEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()})),this.codeEditor.onFocus((()=>{this._currentOrPreviousFocusedEditor=this.codeEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()})),this.codeEditor.onBlur(e),this.diffEditor.originalEditor.onBlur(e),this.diffEditor.modifiedEditor.onBlur(e)),this.addDispose(this.updateContextKeyWhenEditorChangesFocusDisposer)}get contextKeyService(){return this._contextKeyService||(this._contextKeyService=this.workbenchEditorService.editorContextKeyService.createScoped()),this._contextKeyService}get index(){return this.workbenchEditorService.sortedEditorGroups.indexOf(this)}onResourceDecorationChangeEvent(e){e.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(e.payload.uri)&&this.pinPreviewed();this.resources.find((t=>t.uri.isEqual(e.payload.uri)))&&this.notifyTabChanged()}oResourceOpenTypeChangedEvent(e){const t=e.payload;this.cachedResourcesOpenTypes.has(t.toString())&&this.cachedResourcesOpenTypes.delete(t.toString()),this.currentResource&&this.currentResource.uri.isEqual(t)&&(this._currentOpenType=null,this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const e=this.currentResource,t=await this.editorComponentRegistry.resolveEditorComponent(e);this.currentResource===e&&(this.availableOpenTypes=t,this.cachedResourcesOpenTypes.set(e.uri.toString(),t))}}pinPreviewed(e){const t=this.previewURI;(void 0===e||this.previewURI&&this.previewURI.isEqual(e))&&(this.previewURI=null),t!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(e){this._onDidEditorGroupContentLoading.fire(e)}get currentEditor(){return this.currentOpenType?"code"===this.currentOpenType.type?this.codeEditor:"diff"===this.currentOpenType.type?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType)if("code"===this.currentOpenType.type){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if("diff"===this.currentOpenType.type){if(this.diffEditor.modifiedEditor.monacoEditor.hasTextFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasTextFocus())return this.diffEditor.originalEditor;if(this.diffEditor.modifiedEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.originalEditor}return null}get currentCodeEditor(){return this.currentOpenType&&"code"===this.currentOpenType.type?this.codeEditor:null}createEditor(e){this.codeEditor=this.collectionService.createCodeEditor(e,{},{[a.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout((()=>{this.codeEditor.layout()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged((e=>{this._onCurrentEditorCursorChange.fire(e)}))),this.toDispose.push(this.codeEditor.onSelectionsChanged((e=>{this.currentOpenType&&"code"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:e.selections,source:e.source,editorUri:this.codeEditor.currentUri}))}))),this.toDispose.push(this.codeEditor.onVisibleRangesChanged((e=>{this.currentOpenType&&"code"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:e,editorUri:this.codeEditor.currentUri}))}))),this.toDispose.push(this.codeEditor.onConfigurationChanged((()=>{this.currentOpenType&&"code"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))}))),this.eventBus.fire(new f.CodeEditorDidVisibleEvent({groupName:this.name,type:"code",editorId:this.codeEditor.getId()})),this.codeEditorReady.ready()}createDiffEditor(e){this.diffEditor=this.collectionService.createDiffEditor(e,{},{[a.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout((()=>{this.diffEditor.layout()})),this.addDiffEditorEventListeners(this.diffEditor.originalEditor,"original"),this.addDiffEditorEventListeners(this.diffEditor.modifiedEditor,"modified"),this.eventBus.fire(new f.CodeEditorDidVisibleEvent({groupName:this.name,type:"diff",editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new f.CodeEditorDidVisibleEvent({groupName:this.name,type:"diff",editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(e,t){this.toDispose.push(e.onSelectionsChanged((n=>{var i;this.currentOpenType&&"diff"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:n.selections,source:n.source,editorUri:l.URI.from(null===(i=e.monacoEditor.getModel())||void 0===i?void 0:i.uri),side:t}))}))),this.toDispose.push(e.onVisibleRangesChanged((t=>{this.currentOpenType&&"diff"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:t,editorUri:e.currentUri}))}))),this.toDispose.push(e.onConfigurationChanged((()=>{this.currentOpenType&&"diff"===this.currentOpenType.type&&this.eventBus.fire(new f.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:e.currentUri}))})))}async split(e,t,n){var i,r,o;const a=this.workbenchEditorService.createEditorGroup(),s=e===p.EditorGroupSplitAction.Left||e===p.EditorGroupSplitAction.Right?g.SplitDirection.Horizontal:g.SplitDirection.Vertical,c=e===p.EditorGroupSplitAction.Left||e===p.EditorGroupSplitAction.Top;if(this.grid.split(s,a,c),n&&!n.scrollTop&&(n.scrollTop=null===(i=this.currentEditor)||void 0===i?void 0:i.monacoEditor.getScrollTop()),n&&!n.scrollLeft&&(n.scrollLeft=null===(r=this.currentEditor)||void 0===r?void 0:r.monacoEditor.getScrollLeft()),n&&!(null==n?void 0:n.range)){const e=null===(o=this.currentCodeEditor)||void 0===o?void 0:o.monacoEditor.getSelection();e&&(n.range=new u.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn))}return a.open(t,Object.assign(Object.assign({},n),{preview:!1}))}async open(e,t={}){if(e.scheme===c.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(e.withoutFragment().toString()),t&&t.split)return this.split(t.split,e,Object.assign({},t,{split:void 0,preview:!1}));if(!this.openingPromise.has(e.toString())){const n=this.doOpen(e,t);this.openingPromise.set(e.toString(),n),n.then((()=>{this.openingPromise.delete(e.toString())}),(()=>{this.openingPromise.delete(e.toString())}))}return this.preferenceService.get("editor.previewMode")&&(!!(0,c.isUndefinedOrNull)(t.preview)||t.preview)||this.openingPromise.get(e.toString()).then((()=>{this.pinPreviewed(e)})),this.openingPromise.get(e.toString())}async pin(e){return this.pinPreviewed(e)}async doOpen(e,t={}){var n,i;if(!this.resourceService.handlesUri(e))return this.openerService.open(e),!1;let r;try{const o=this.preferenceService.get("editor.previewMode")&&(!!(0,c.isUndefinedOrNull)(t.preview)||t.preview);if(this.currentResource&&this.currentResource.uri.isEqual(e))return t.focus&&this.currentEditor&&(null===(n=this._domNode)||void 0===n||n.focus(),this.currentEditor.monacoEditor.focus()),t.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(t.range),setTimeout((()=>{var e;null===(e=this.currentEditor)||void 0===e||e.monacoEditor.revealRangeInCenter(t.range,0)}),0)),t&&t.disableNavigate||t&&t.backend||this.locateInFileTree(e),this.notifyTabChanged(),{group:this,resource:this.currentResource};{const n=this._currentOpenType,a=this._currentResource;let s=this.resources.find((t=>t.uri.toString()===e.toString()));if(!s){if(s=await this.resourceService.getResource(e),!s)throw new Error("This uri cannot be opened!: "+e);if(s.deleted){if("fail"===t.deletedPolicy)throw new Error("resource deleted "+e);if("skip"===t.deletedPolicy)return!1}t&&t.label&&(s.name=t.label);let n=null;if(t&&void 0!==t.index&&t.index0&&this.recentFilesManager.updateMostRecentlyOpenedFile(a.uri.toString(),{lineNumber:e[0].selectionStartLineNumber,column:e[0].selectionStartColumn})}this._currentResource=s,this.notifyTabChanged(),this._currentOpenType=null,this.notifyBodyChanged();const d=this.reporterService.time(c.REPORT_NAME.EDITOR_REACTIVE);r=new l.Deferred,this.resourceStatus.set(s,r.promise);const u=setTimeout((()=>{this.notifyTabLoading(s)}),60);return await this.displayResourceComponent(s,t),clearTimeout(u),r.resolve(),d.timeEnd(s.uri.toString()),this._currentOrPreviousFocusedEditor=this.currentEditor,this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new f.EditorGroupOpenEvent({group:this,resource:s})),t&&t.disableNavigate||t&&t.backend||this.locateInFileTree(e),this.eventBus.fire(new f.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:n,oldResource:a})),{group:this,resource:s}}}catch(t){return(0,l.getDebugLogger)().error(t),r&&r.reject(),(0,m.isEditorError)(t,m.EditorTabChangedError)||this.messageService.error((0,l.formatLocalize)("editor.failToOpen",e.displayName,t.message),[],!0),!1}}locateInFileTree(e){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(a.FILE_COMMANDS.LOCATION.id,e)}async openUris(e){for(const t of e)await this.open(t)}async getDocumentModelRef(e){return this.holdDocumentModelRefs.has(e.toString())||this.holdDocumentModelRefs.set(e.toString(),await this.documentModelManager.createModelReference(e,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(e.toString())}disposeDocumentRef(e){if("diff"===e.scheme){const t=e.getParsedQuery();this.doDisposeDocRef(new l.URI(t.original)),this.doDisposeDocRef(new l.URI(t.modified))}else this.doDisposeDocRef(e)}doDisposeDocRef(e){this.holdDocumentModelRefs.has(e.toString())&&(this.holdDocumentModelRefs.get(e.toString()).dispose(),this.holdDocumentModelRefs.delete(e.toString()))}async displayResourceComponent(e,t={}){const n=e,i=await this.resolveOpenType(e,t);if(i){const{activeOpenType:r,openTypes:o}=i;if(this.availableOpenTypes=o,t.preserveFocus&&(t.focus=!1),"code"===r.type){const i=await this.getDocumentModelRef(e.uri);this.resolveTabChanged(n,this.currentResource),await this.codeEditorReady.onceReady((async()=>{var n;if(await this.codeEditor.open(i),t.range){const e=new u.Range(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn);this.codeEditor.monacoEditor.setSelection(e),setTimeout((()=>{this.codeEditor.monacoEditor.revealRangeInCenter(e,1)}))}if(queueMicrotask((()=>{t.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(t.scrollTop),t.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(t.scrollLeft)})),t.focus){null===(n=this._domNode)||void 0===n||n.focus();const t=this.eventBus.on(f.CodeEditorDidVisibleEvent,(n=>{var i;if(n.payload.groupName===this.name&&"code"===n.payload.type){if(t.dispose(),this.disposed)return;if(this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(null===(i=this.codeEditor.currentUri)||void 0===i?void 0:i.isEqual(e.uri)))try{this.codeEditor.focus()}catch(n){}}}))}})),i.instance.dirty&&this.pinPreviewed(e.uri)}else if("diff"===r.type){const n=e,[i,r]=await Promise.all([this.getDocumentModelRef(n.metadata.original),this.getDocumentModelRef(n.metadata.modified)]);await this.diffEditorReady.onceReady((async()=>{var n;if(await this.diffEditor.compare(i,r,t,e.uri),t.focus){null===(n=this._domNode)||void 0===n||n.focus();const e=this.eventBus.on(f.CodeEditorDidVisibleEvent,(t=>{if(t.payload.groupName===this.name&&"diff"===t.payload.type){if(e.dispose(),this.disposed)return;if(this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch(t){}}}))}}))}else{if("component"!==r.type)return;{const t=this.editorComponentRegistry.getEditorComponent(r.componentId),n=this.editorComponentRegistry.getEditorInitialProps(r.componentId);if(!t)throw new Error("Cannot find Editor Component with id: "+r.componentId);if(this.activateComponentsProps.set(t,n),t.renderMode===f.EditorComponentRenderMode.ONE_PER_RESOURCE){const n=this.activeComponents.get(t)||[];-1===n.findIndex((t=>t.uri.toString()===e.uri.toString()))&&n.push(e),this.activeComponents.set(t,n)}else if(t.renderMode===f.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(t,[e]);else if(t.renderMode===f.EditorComponentRenderMode.ONE_PER_WORKBENCH){const n=[];this.workbenchEditorService.editorGroups.forEach((t=>{if(t===this)return;const i=t.resources.find((t=>t.uri.isEqual(e.uri)));i&&n.push(t.close(i.uri))})),await Promise.all(n).catch((0,l.getDebugLogger)().error),this.activeComponents.set(t,[e])}this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}}this.resolveTabChanged(n,this.currentResource),this._currentOpenType=r,this.notifyBodyChanged(),(this._codeEditorPendingLayout&&"code"===r.type||this._diffEditorPendingLayout&&"diff"===r.type)&&this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(e.uri.toString(),r)}}resolveTabChanged(e,t){if(e!==t)throw new m.EditorTabChangedError}async resolveOpenType(e,t){const n=this.cachedResourcesOpenTypes.get(e.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(e),i=this.preferenceService.get("workbench.editorAssociations"),r=function(e,t,n,i,r){if(r)return e.find((e=>C(e,r)))||e[0];if(t)return e.find((e=>C(e,t)))||e[0];if(i){const t=e.find((e=>{const t=Object.keys(i).find((e=>(0,c.match)(e,n.uri.path.toString().toLowerCase())||(0,c.match)(e,n.uri.path.base.toLowerCase()))),r=t&&i[t];return!!r&&e.componentId===r}));if(t)return t}return e[0]}(n,this.cachedResourcesActiveOpenTypes.get(e.uri.toString()),e,i,t.forceOpenType);return this.cachedResourcesOpenTypes.set(e.uri.toString(),n),{activeOpenType:r,openTypes:n}}async close(e,{treatAsNotCurrent:t,force:n}={}){const i=this.resources.findIndex((t=>t.uri.toString()===e.toString()));if(-1!==i){const r=this.resources[i];if(!n&&!await this.shouldClose(r))return;if(this.resources.splice(i,1),this.eventBus.fire(new f.EditorGroupCloseEvent({group:this,resource:r})),this.previewURI&&this.previewURI.isEqual(e)&&(this.previewURI=null),r!==this.currentResource||t)this.notifyTabChanged();else{let e;for(;this.resourceOpenHistory.length>0;){if(-1!==this.resources.findIndex((e=>e.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1]))){e=this.resourceOpenHistory.pop();break}this.resourceOpenHistory.pop()}if(e)this.open(e);else{let e=i;for(;e>0&&!this.resources[e];)e--;this.resources[e]?this.open(this.resources[e].uri):this.backToEmpty()}}for(const e of this.activeComponents.values()){const t=e.indexOf(r);-1!==t&&e.splice(t,1)}this.disposeDocumentRef(e)}0===this.resources.length&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[])}async shouldClose(e){const t=this.workbenchEditorService.editorGroups.map((e=>e.resources));if(await this.resourceService.shouldCloseResource(e,t)){let n=0;for(const i of t)for(const t of i)if(t.uri.isEqual(e.uri)&&(n++,n>=2))break;return n<=1&&this.resourceService.disposeResource(e),!0}return!1}backToEmpty(){const e=this._currentOpenType,t=this._currentResource;this._currentResource=null,this._currentOpenType=null,this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new f.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:e,oldResource:t}))}async closeAll(){for(const e of this.resources)if(!await this.shouldClose(e))return;this.resources.splice(0,this.resources.length).forEach((e=>{this.clearResourceOnClose(e)})),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty()}async closeSaved(){const e=this.resources.filter((e=>{const t=this.resourceService.getResourceDecoration(e.uri);if(!t||!t.dirty)return!0}));for(const t of e)if(!await this.shouldClose(t))return;for(const t of e)await this.close(t.uri)}async closeToRight(e){const t=this.resources.findIndex((t=>t.uri.toString()===e.toString()));if(-1!==t){const n=this.resources.slice(t+1);for(const e of n)if(!await this.shouldClose(e))return;this.resources.splice(t+1);for(const e of n)this.clearResourceOnClose(e);this.open(e)}}clearResourceOnClose(e){this.eventBus.fire(new f.EditorGroupCloseEvent({group:this,resource:e}));for(const t of this.activeComponents.values()){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}async closeOthers(e){const t=this.resources.findIndex((t=>t.uri.toString()===e.toString()));if(-1!==t){const n=this.resources.filter(((e,n)=>n!==t));for(const e of n)if(!await this.shouldClose(e))return;this.resources=[this.resources[t]];for(const e of n)this.clearResourceOnClose(e);await this.open(e)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(e){const t=this.availableOpenTypes.find((t=>t.type===e||t.componentId===e));if(!t)return;if(!this.currentResource)return;if(C(t,this.currentOpenType))return;const n=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:t}),this.eventBus.fire(new f.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:n,oldResource:this.currentResource}))}async dropUri(e,t,n,i){if(t!==f.DragOverPosition.CENTER)await this.split((0,p.getSplitActionFromDragDrop)(t),e,{preview:!1,focus:!0});else if(i){const t=this.resources.indexOf(i);if(-1===t)await this.open(e,{preview:!1,focus:!0});else{const n=this.resources.findIndex((t=>t.uri.toString()===e.toString()));if(-1===n)await this.open(e,{index:t,preview:!1});else{const i=this.resources[n];n>t?(this.resources.splice(n,1),this.resources.splice(t,0,i),await this.open(e,{preview:!1})):ne.dispose())),this.eventBus.fire(new f.EditorGroupDisposeEvent({group:this}))}getState(){const e=this.resources.filter(b).map((e=>e.uri.toString()));return{uris:e,current:this.currentResource&&b(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?e.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&"code"===this.currentOpenType.type}isDiffEditorMode(){return!!this.currentOpenType&&"diff"===this.currentOpenType.type}isComponentMode(){return!!this.currentOpenType&&"component"===this.currentOpenType.type}async restoreState(e){this._restoringState=!0,this.previewURI=e.uris[e.previewIndex]?new l.URI(e.uris[e.previewIndex]):null;for(const t of e.uris)await this.doOpen(new l.URI(t),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"});let t;e.current?t=new l.URI(e.current):e.uris.length>0&&(t=new l.URI(e.uris[e.uris.length-1])),t&&(await this.open(t,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(e,t){for(const n of this.resources)(e||n.uri.scheme!==c.Schemes.untitled)&&await this.saveResource(n,t)}async saveResource(e,t=p.SaveReason.Manual){if(await this.saveByOpenType(e,t))return;const n=this.documentModelManager.getModelReference(e.uri);n&&(n.instance.dirty&&await n.instance.save(void 0,t),n.dispose())}async saveByOpenType(e,t){const n=this.cachedResourcesActiveOpenTypes.get(e.uri.toString());if(n&&n.saveResource)try{return await n.saveResource(e,t),!0}catch(e){this.logger.error(e)}return!1}async saveCurrent(e=p.SaveReason.Manual){const t=this.currentResource;if(t&&!await this.saveByOpenType(t,e))return this.currentEditor?this.currentEditor.save():void 0}hasDirty(){for(const e of this.resources){const t=this.documentModelManager.getModelReference(e.uri);if(t){const e=t.instance.dirty;if(t.dispose(),e)return!0}}return!1}calcDirtyCount(){let e=0;for(const t of this.resources){const n=this.documentModelManager.getModelReference(t.uri);if(n){const t=n.instance.dirty;n.dispose(),t&&(e+=1)}}return e}componentUndo(){const e=this.currentOpenType;(null==e?void 0:e.undo)&&e.undo(this.currentResource)}componentRedo(){const e=this.currentOpenType;(null==e?void 0:e.redo)&&e.redo(this.currentResource)}toJSON(){return{name:this.name}}};function C(e,t){return e.type===t.type&&("component"!==e.type||e.componentId===t.componentId)}i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",p.EditorCollectionService)],v.prototype,"collectionService",void 0),i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",p.ResourceService)],v.prototype,"resourceService",void 0),i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",f.EditorComponentRegistry)],v.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),i.__metadata("design:type",y)],v.prototype,"workbenchEditorService",void 0),i.__decorate([(0,o.Autowired)(h.IEditorDocumentModelService),i.__metadata("design:type",Object)],v.prototype,"documentModelManager",void 0),i.__decorate([(0,o.Autowired)(l.CommandService),i.__metadata("design:type",Object)],v.prototype,"commands",void 0),i.__decorate([(0,o.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),i.__decorate([(0,o.Autowired)(a.RecentFilesManager),i.__metadata("design:type",a.RecentFilesManager)],v.prototype,"recentFilesManager",void 0),i.__decorate([(0,o.Autowired)(d.IMessageService),i.__metadata("design:type",Object)],v.prototype,"messageService",void 0),i.__decorate([(0,o.Autowired)(l.IReporterService),i.__metadata("design:type",Object)],v.prototype,"reporterService",void 0),i.__decorate([(0,o.Autowired)(a.AppConfig),i.__metadata("design:type",Object)],v.prototype,"config",void 0),i.__decorate([(0,o.Autowired)(a.IOpenerService),i.__metadata("design:type",Object)],v.prototype,"openerService",void 0),i.__decorate([(0,o.Autowired)(l.ILogger),i.__metadata("design:type",Object)],v.prototype,"logger",void 0),i.__decorate([r.observable.shallow,i.__metadata("design:type",Array)],v.prototype,"availableOpenTypes",void 0),i.__decorate([(0,l.OnEvent)(p.ResourceDecorationChangeEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[p.ResourceDecorationChangeEvent]),i.__metadata("design:returntype",void 0)],v.prototype,"onResourceDecorationChangeEvent",null),i.__decorate([(0,l.OnEvent)(f.ResourceOpenTypeChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[f.ResourceOpenTypeChangedEvent]),i.__metadata("design:returntype",void 0)],v.prototype,"oResourceOpenTypeChangedEvent",null),i.__decorate([(0,l.OnEvent)(f.RegisterEditorComponentEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Promise)],v.prototype,"onRegisterEditorComponentEvent",null),v=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[String])],v),t.EditorGroup=v},95335:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRangeFrom=t.parseCacheValueFrom=t.isDocChangesCache=t.isDocContentCache=t.IDocPersistentCacheProvider=void 0;const i=n(15353);t.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider"),t.isDocContentCache=function(e){return e.hasOwnProperty("content")},t.isDocChangesCache=function(e){return e.hasOwnProperty("changeMatrix")},t.parseCacheValueFrom=function(e){return[e.text,e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn]},t.parseRangeFrom=function(e){const[t,n,r,o,a]=e;return i.Range.lift({startLineNumber:n,startColumn:r,endLineNumber:o,endColumn:a})}},19437:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleEditorOptions=t.AUTO_SAVE_MODE=t.SaveReason=t.Direction=t.EditorGroupSplitAction=t.DragOverPosition=t.IEditorPriority=t.OverviewRulerLane=t.WorkbenchEditorService=t.DidApplyEditorDecorationFromProvider=t.DidChangeEditorGroupUriEvent=t.CollectionEditorsUpdateEvent=t.EditorCollectionService=t.EditorType=void 0;const i=n(70655),r=n(39993),o=n(90642);!function(e){e[e.CODE=0]="CODE",e[e.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",e[e.MODIFIED_DIFF=2]="MODIFIED_DIFF"}(t.EditorType||(t.EditorType={}));let a=class{};a=i.__decorate([(0,r.Injectable)()],a),t.EditorCollectionService=a;class s extends o.BasicEvent{}t.CollectionEditorsUpdateEvent=s;class c extends o.BasicEvent{}t.DidChangeEditorGroupUriEvent=c;class l extends o.BasicEvent{}t.DidApplyEditorDecorationFromProvider=l;t.WorkbenchEditorService=class{},function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(t.OverviewRulerLane||(t.OverviewRulerLane={})),function(e){e.builtin="builtin",e.option="option",e.exclusive="exclusive",e.default="default"}(t.IEditorPriority||(t.IEditorPriority={})),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e.CENTER="center"}(t.DragOverPosition||(t.DragOverPosition={})),function(e){e[e.Top=1]="Top",e[e.Bottom=2]="Bottom",e[e.Left=3]="Left",e[e.Right=4]="Right"}(t.EditorGroupSplitAction||(t.EditorGroupSplitAction={})),function(e){e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right"}(t.Direction||(t.Direction={})),function(e){e[e.Manual=1]="Manual",e[e.AfterDelay=2]="AfterDelay",e[e.FocusOut=3]="FocusOut"}(t.SaveReason||(t.SaveReason={})),function(e){e.OFF="off",e.AFTER_DELAY="afterDelay",e.EDITOR_FOCUS_CHANGE="editorFocusChange",e.WINDOWS_LOST_FOCUS="windowLostFocus"}(t.AUTO_SAVE_MODE||(t.AUTO_SAVE_MODE={})),t.getSimpleEditorOptions=function(){return{fontSize:12,fontWeight:"normal",lineHeight:0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1},guides:{highlightActiveIndentation:!1,indentation:!1,bracketPairs:!1}}}},23730:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(95335),t),i.__exportStar(n(19437),t),i.__exportStar(n(35220),t),i.__exportStar(n(47698),t),i.__exportStar(n(19172),t),i.__exportStar(n(10605),t)},10605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILanguageStatusService=void 0,t.ILanguageStatusService=Symbol("ILanguageStatusService")},47698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asDiagnostic=t.asDiagnostics=t.asRelatedInformation=t.asRelatedInformations=t.asSeverity=t.DiagnosticTag=t.DiagnosticSeverity=t.ILanguageService=void 0;const i=n(90642),r=n(4865);function o(e){return 1===e?i.MarkerSeverity.Error:2===e?i.MarkerSeverity.Warning:3===e?i.MarkerSeverity.Info:i.MarkerSeverity.Hint}function a(e){if(e)return e.map((e=>s(e)))}function s(e){return{resource:r.URI.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}}function c(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:o(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:a(e.relatedInformation),tags:e.tags}}t.ILanguageService=Symbol("ILanguageService"),function(e){e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint"}(t.DiagnosticSeverity||(t.DiagnosticSeverity={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(t.DiagnosticTag||(t.DiagnosticTag={})),t.asSeverity=o,t.asRelatedInformations=a,t.asRelatedInformation=s,t.asDiagnostics=function(e){if(e)return e.map((e=>c(e)))},t.asDiagnostic=c},35220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AskSaveResult=t.isDiffResource=t.DIFF_SCHEME=t.ResourceDecorationNeedChangeEvent=t.ResourceDecorationChangeEvent=t.ResourceRemoveEvent=t.ResourceDidUpdateEvent=t.ResourceNeedUpdateEvent=t.ResourceService=void 0;const i=n(90642);t.ResourceService=class{};class r extends i.BasicEvent{}t.ResourceNeedUpdateEvent=r;class o extends i.BasicEvent{}t.ResourceDidUpdateEvent=o;class a extends i.BasicEvent{}t.ResourceRemoveEvent=a;class s extends i.BasicEvent{}t.ResourceDecorationChangeEvent=s;class c extends i.BasicEvent{}t.ResourceDecorationNeedChangeEvent=c,t.DIFF_SCHEME="diff",t.isDiffResource=function(e){return e.uri.scheme===t.DIFF_SCHEME},function(e){e[e.REVERT=1]="REVERT",e[e.SAVE=2]="SAVE",e[e.CANCEL=3]="CANCEL"}(t.AskSaveResult||(t.AskSaveResult={}))},19172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSplitActionFromDragDrop=void 0;const i=n(19437);t.getSplitActionFromDragDrop=function(e){return{[i.DragOverPosition.LEFT]:i.EditorGroupSplitAction.Left,[i.DragOverPosition.RIGHT]:i.EditorGroupSplitAction.Right,[i.DragOverPosition.BOTTOM]:i.EditorGroupSplitAction.Bottom,[i.DragOverPosition.TOP]:i.EditorGroupSplitAction.Top}[e]}},92345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(23730),t)},59831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerContribution=t.EXPLORER_CONTAINER_ID=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(894),s=n(52148),c=n(26149);t.EXPLORER_CONTAINER_ID="explorer";let l=class{registerComponent(e){e.register("@opensumi/ide-explorer",[],{iconClass:(0,a.getIcon)("explorer"),title:(0,o.localize)("explorer.title"),priority:10,containerId:t.EXPLORER_CONTAINER_ID})}onStart(){this.extensionsPointService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:t.EXPLORER_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:Object.assign(Object.assign({},s.browserViews.properties),{description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))})})}};i.__decorate([(0,r.Autowired)(o.IExtensionsPointService),i.__metadata("design:type",Object)],l.prototype,"extensionsPointService",void 0),l=i.__decorate([(0,o.Domain)(o.ClientAppContribution,c.ComponentContribution)],l),t.ExplorerContribution=l},71922:(e,t,n)=>{"use strict";Object.defineProperty(t,"X",{value:!0}),t.u=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(59831);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[a.ExplorerContribution]}};s=i.__decorate([(0,r.Injectable)()],s),t.u=s},86292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageContribution=t.ExtensionStorageModule=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(21793),s=n(74213),c=n(59548),l=n(17492),d=n(57569);let u=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:a.IExtensionStorageService,useClass:l.ExtensionStorageService},{token:a.IExtensionStoragePathServer,useClass:c.ExtensionStoragePathServer},{token:a.IExtensionStorageServer,useClass:s.ExtensionStorageServer},p]}};u=i.__decorate([(0,o.EffectDomain)(d.name)],u),t.ExtensionStorageModule=u;let p=class{onReconnect(){this.extensionStorageService.reConnectInit()}};i.__decorate([(0,r.Autowired)(a.IExtensionStorageService),i.__metadata("design:type",Object)],p.prototype,"extensionStorageService",void 0),p=i.__decorate([(0,o.Domain)(o.ClientAppContribution)],p),t.ExtensionStorageContribution=p,i.__exportStar(n(17492),t)},59548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStoragePathServer=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(55229),c=n(33361),l=n(81677),d=n(14238),{Path:u}=a.path;let p=class{constructor(){this.windowsDataFolders=[a.StoragePaths.WINDOWS_APP_DATA_DIR,a.StoragePaths.WINDOWS_ROAMING_DIR],this.deferredWorkspaceStoragePath=new a.Deferred,this.deferredStoragePath=new a.Deferred,this.storagePathInitialized=!1}get workspaceSuffixName(){return this.appConfig.workspaceSuffixName||d.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const e=await this.getLogsDirPath();if(!e)throw new Error("Unable to get parent log directory");const t=e,n=a.URI.file(t).toString();return await this.fileSystem.access(n)||await this.fileSystem.createFolder(n),new a.URI(e)}async provideHostStoragePath(e,t,n){const i=await this.getWorkspaceStorageDirPath(n);if(!i)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(a.URI.file(i).toString())||await this.fileSystem.createFolder(a.URI.file(i).toString());const r=await this.buildWorkspaceId(e,t,n),o=new u(i).join(r).toString();await this.fileSystem.access(a.URI.file(o).toString())||await this.fileSystem.createFolder(a.URI.file(o).toString());const s=new a.URI(o);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(s.path.toString()),this.deferredStoragePath.resolve(i),this.storagePathInitialized=!0),this.cachedStoragePath=s}async getLastWorkspaceStoragePath(){var e;return this.storagePathInitialized?null===(e=this.cachedStoragePath)||void 0===e?void 0:e.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(e){return this.hashCalculateService.calculate(e)}async buildWorkspaceId(e,t,n){const i=await this.getUserHomeDir();if(!e){const e=new a.URI(i).resolve(n||d.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${d.UNTITLED_WORKSPACE}`).withScheme(a.Schemes.file);return this.doHash(e.toString())}const r=(e=>e.resolve(n||d.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${d.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(a.Schemes.file))(new a.URI(i));if(r.toString()===e.uri){const e=t.map((e=>e.uri)).sort().join(",");return this.doHash(e)}{const t=new a.URI(e.uri);return this.doHash(t.toString())}}async getLogsDirPath(){const e=await this.loggerManager.getLogFolder();return new u(e).join(a.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(e){const t=await this.getWorkspaceDataDirPath(e);return new u(t).join(a.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(e){const t=await this.getUserHomeDir(),n=e;return new u(t).join(...a.isWindows?this.windowsDataFolders:[""],n).toString()}async getUserHomeDir(){const e=await this.fileSystem.getCurrentUserHome();if(!e)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(e.uri)}};i.__decorate([(0,r.Autowired)(c.IFileServiceClient),i.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),i.__decorate([(0,r.Autowired)(l.ILoggerManagerClient),i.__metadata("design:type",Object)],p.prototype,"loggerManager",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(s.IHashCalculateService),i.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),p=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],p),t.ExtensionStoragePathServer=p},74213:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageServer=void 0;const r=n(70655),o=n(39993),a=n(90642),s=n(33361),c=n(21793),{Path:l}=a.path;let d=i=class{constructor(){this.deferredWorkspaceDataDirPath=new a.Deferred,this.storageThrottler=new a.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(e,t,n){return this.storageDelayer=new a.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),await this.setupDirectories(e,t,n||c.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(e,t){if(t)return await this.fileSystem.access(e);if(!this.storageExistPromises.has(e)){const t=this.fileSystem.access(e);this.storageExistPromises.set(e,t)}return await this.storageExistPromises.get(e)}async setupDirectories(e,t,n){const i=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(n),r=a.URI.file(i).toString();await this.fileSystem.access(r)||await this.fileSystem.createFolder(r),this.workspaceDataDirPath=i,this.globalDataPath=new l(this.workspaceDataDirPath).join(a.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const o=a.URI.file(this.globalDataPath).toString();await this.fileSystem.access(o)||await this.fileSystem.createFolder(o),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const s=await this.extensionStoragePathsServer.provideHostLogPath(),c=await this.extensionStoragePathsServer.provideHostStoragePath(e,t,n);return{logUri:s.codeUri||void 0,storageUri:null==c?void 0:c.codeUri,globalStorageUri:a.Uri.parse(this.globalDataPath)}}async resolveStorageTask(e){const t=Object.keys(e);for(const n of t){const t=await this.readFromFile(n);for(const{key:i,value:r}of e[n])void 0===r||r==={}?delete t[i]:t[i]=r;await this.writeToFile(n,t)}}doSet(){const e=Object.assign({},this.storageTasks);return this.storageTasks={},this.resolveStorageTask(e)}async set(e,t,n){const i=await this.getDataPath(n);if(!i)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[i]||(this.storageTasks[i]=[]),this.storageTasks[i].push({key:e,value:t}),this.storageDelayer.trigger((()=>this.storageThrottler.queue(this.doSet.bind(this))))}async get(e,t){const n=await this.getDataPath(t);if(!n)return{};return(await this.readFromFile(n))[e]}async getAll(e){const t=await this.getDataPath(e);if(!t)return{};return await this.readFromFile(t)}async getDataPath(e){if(void 0===this.workspaceDataDirPath&&await this.deferredWorkspaceDataDirPath.promise,e)return new l(this.globalDataPath).join("global-state.json").toString();{const e=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return e?new l(e).join("workspace-state.json").toString():void 0}}async readFromFile(e){const t=a.URI.file(e);if(!await this.asAccess(t.toString(),!0))return{};try{const{content:e}=await this.fileSystem.readFile(t.toString());return JSON.parse(e.toString())}catch(e){return this.logger.error('Failed to parse data from "',t.toString(),'". Reason:',e),{}}}async writeToFile(e,t){const n=a.URI.file(e);await this.asAccess(n.parent.toString())||await this.fileSystem.createFolder(n.parent.toString());const i=JSON.stringify(t);let r=await this.fileSystem.getFileStat(n.toString());r||(r=await this.fileSystem.createFile(n.toString())),await this.fileSystem.setContent(r,i)}};d.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(c.IExtensionStoragePathServer),r.__metadata("design:type",Object)],d.prototype,"extensionStoragePathsServer",void 0),r.__decorate([(0,o.Autowired)(s.IFileServiceClient),r.__metadata("design:type",Object)],d.prototype,"fileSystem",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],d.prototype,"logger",void 0),d=i=r.__decorate([(0,o.Injectable)()],d),t.ExtensionStorageServer=d},17492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(14238),c=n(21793);let l=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const e=await this.workspaceService.roots,t=this.workspaceService.workspace,n=this.appConfig.extensionStorageDirName||c.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(t,e,n),this._extensionStoragePath}async updateEnvState(){void 0===await this.get(a.firstSessionDateStorageKey,!0)&&await this.set(a.firstSessionDateStorageKey,{date:(new Date).toUTCString()},!0)}set(e,t,n){return this.extensionStorageServer.set(e,t,n)}get(e,t){return this.extensionStorageServer.get(e,t)}getAll(e=!1){return this.extensionStorageServer.getAll(e)}async reConnectInit(){const e=await this.workspaceService.roots,t=this.workspaceService.workspace,n=this.appConfig.extensionStorageDirName||c.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(t,e,n),this._extensionStoragePath}};i.__decorate([(0,r.Autowired)(c.IExtensionStorageServer),i.__metadata("design:type",Object)],l.prototype,"extensionStorageServer",void 0),i.__decorate([(0,r.Autowired)(s.IWorkspaceService),i.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),l=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],l),t.ExtensionStorageService=l},21793:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(87697),t),i.__exportStar(n(28876),t),i.__exportStar(n(53317),t)},87697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=t.IExtensionStoragePathServer=void 0,t.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},28876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionStorageService=t.IExtensionStorageServer=void 0,t.IExtensionStorageServer=Symbol("ExtensionStorageServer"),t.IExtensionStorageService=Symbol("ExtensionStorageService")},53317:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38097:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(70655).__exportStar(n(21793),t)},20385:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivationEventServiceImpl=void 0;const i=n(70655),r=i.__importDefault(n(59444)),o=n(39993);let a=class{constructor(){this.eventListeners=new Map,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}async fireEvent(e,t=""){let n;this.activatedEventSet.add(JSON.stringify({topic:e,data:t})),n=this.wildCardTopics.has(e)||this.eventListeners.has(e)?this.eventListeners.get(e):this.eventListeners.get(e+":"+t),n&&await Promise.all(n.map((n=>this.tryRun(e,t,n))))}addWildCardTopic(e){return this.wildCardTopics.add(e),{dispose:()=>{this.wildCardTopics.delete(e)}}}onEvent(e,t){const n=e.indexOf(":");let i,r;return-1===n?(i=e,r=""):(i=e.substr(0,n),r=e.substr(n+1)),this.addListener(i,{topic:i,data:r,execute:t})}addListener(e,t){if(this.wildCardTopics.has(e))return this.eventListeners.has(e)||this.eventListeners.set(e,[]),this.eventListeners.get(e).push(t),{dispose:()=>{const n=this.eventListeners.get(e).indexOf(t);-1!==n&&this.eventListeners.get(e).splice(n,1)}};{const n=e+":"+t.data;return this.eventListeners.has(n)||this.eventListeners.set(n,[]),this.eventListeners.get(n).push(t),{dispose:()=>{const e=this.eventListeners.get(n).indexOf(t);-1!==e&&this.eventListeners.get(n).splice(e,1)}}}}async tryRun(e,t,n){this.wildCardTopics.has(e)?(0,r.default)(n.data)(t)&&await n.execute():await n.execute()}};a=i.__decorate([(0,o.Injectable)(),i.__metadata("design:paramtypes",[])],a),t.ActivationEventServiceImpl=a},84221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionNoExportsView=t.ExtensionLoadingView=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(894),a=n(83663),s=i.__importDefault(n(21681));t.ExtensionLoadingView=({style:e})=>r.default.createElement("div",{style:e||{},className:s.default.kt_extension_view},r.default.createElement(a.ProgressBar,{loading:!0}));t.ExtensionNoExportsView=(e,t)=>r.default.createElement("div",{className:s.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",e,t))},99426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PortalRoot=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(894),s=n(894),c=n(69518),l=n(44468);t.PortalRoot=e=>{var t;const[n,i]=o.default.useState(null),d=(0,a.useInjectable)(l.AbstractViewExtProcessService),u=(0,a.useInjectable)(c.IThemeService);o.default.useEffect((()=>{const e=new s.DisposableCollection;return u.getCurrentTheme().then((e=>i(e.type))),e.push(u.onThemeChange((e=>{e.type&&e.type!==n&&i(e.type)}))),e.dispose.bind(e)}),[]);const p=e.original;return o.default.createElement(p,Object.assign({},e.otherProps,{className:(0,r.default)(null===(t=e.otherProps)||void 0===t?void 0:t.className,(0,c.getThemeTypeSelector)(n)),getContainer:()=>d.getPortalShadowRoot(e.extensionId)}))}},81311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TREE_VIEW_NODE_HEIGHT=t.TreeViewNode=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importDefault(n(616)),a=n(25880),s=n(25880),c=n(894),l=n(32278),d=n(57061),u=i.__importDefault(n(37438));t.TreeViewNode=({item:e,onClick:n,onContextMenu:i,itemType:p,leftPadding:h=8,onTwistierClick:m,decorations:g,defaultLeftPadding:f=8,treeViewId:_})=>{const b=t=>{p!==a.TreeNodeType.TreeNode&&p!==a.TreeNodeType.CompositeTreeNode||(m?m(t,e,p):n(t,e,p))},y=p===a.TreeNodeType.CompositeTreeNode,v=y?`${f+(e.depth||0)*(h||0)}px`:`${f+(e.depth||0)*(h||0)+8}px`,C={height:t.TREE_VIEW_NODE_HEIGHT,lineHeight:`${t.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:v},S=()=>{if(e.actions.length>0)return o.default.createElement("div",{className:u.default.tree_view_actions},o.default.createElement(l.TitleActionList,{className:u.default.inlineMenu,context:[{treeViewId:_,treeItemId:e.treeItemId}],nav:e.actions,menuId:d.MenuId.ViewItemContext}))};return o.default.createElement("div",{key:e.id,onClick:t=>{p!==a.TreeNodeType.TreeNode&&p!==a.TreeNodeType.CompositeTreeNode||n(t,e,p)},onContextMenu:t=>{0!==t.nativeEvent.which&&i&&(p!==a.TreeNodeType.TreeNode&&p!==a.TreeNodeType.CompositeTreeNode||i(t,e,p))},title:e.tooltip||e.name,className:(0,r.default)(u.default.tree_view_node,g?g.classlist:null),"data-id":e.id,style:C,draggable:p===a.TreeNodeType.TreeNode||p===a.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(u.default.tree_view_node_content)},(e=>{if(y)return t=e,n=b,g&&(null==g?void 0:g.classlist.indexOf(u.default.mod_loading))>-1?o.default.createElement(s.Loading,null):o.default.createElement("div",{onClick:n,className:(0,r.default)(u.default.tree_view_node_segment,u.default.expansion_toggle,(0,c.getIcon)("arrow-right"),{[`${u.default.mod_collapsed}`]:!t.expanded})});var t,n})(e),(w=e,o.default.createElement("div",{className:(0,r.default)(u.default.file_icon,w.icon),style:{maxHeight:t.TREE_VIEW_NODE_HEIGHT}})),o.default.createElement("div",{className:u.default.tree_view_node_overflow_wrap},(e=>o.default.createElement("div",{className:(0,r.default)(u.default.tree_view_node_segment,u.default.tree_view_node_displayname,e.strikethrough&&u.default.strikethrough)},(()=>{if(e.highlights){let t=[],n=0;const i=e.highlights.sort(((e,t)=>e[0]-t[0]));return t=i.map(((t,r)=>{const[a,s]=t,c=e.displayName.slice(n,a);n=s;const l=e.displayName.slice(a,s),d=[o.default.createElement("span",{key:`line_begin_${r}_${c}`},c),o.default.createElement("span",{className:u.default.highlight,key:`line_hightlight_${r}_${l}`},l)];if(r===i.length-1){const t=e.displayName.slice(s);d.push(o.default.createElement("span",{key:`line_end_${r}_${t}`},t))}return d})),t}return e.displayName})()))(e),(e=>o.default.createElement("div",{className:(0,r.default)(u.default.tree_view_node_segment_grow,u.default.tree_view_node_description)},e.name||e.description?e.description:"鈥斺€�"))(e)),o.default.createElement("div",{className:(0,r.default)(u.default.tree_view_node_segment,u.default.tree_view_node_tail)},S())));var w},t.TREE_VIEW_NODE_HEIGHT=22},1018:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTabBarTreeView=void 0;const i=n(70655),r=n(32834),o=i.__importDefault(n(616)),a=n(25880),s=n(894),c=n(83663),l=n(76326),d=n(44062),u=n(81311),p=i.__importDefault(n(21681));t.ExtensionTabBarTreeView=(0,r.observer)((({viewState:e,model:t,dataProvider:n,treeViewId:i})=>{const[r,a]=o.default.useState(!1),[c,l]=o.default.useState(n.isTreeEmpty),u=(0,s.useInjectable)(d.IMainLayoutService),m=o.default.useMemo((()=>u.getViewAccordionService(i)),[]),g=o.default.useMemo((()=>{const e=null==m?void 0:m.getViewState(i);return!!e&&(!e.collapsed&&!e.hidden)}),[m]);o.default.useEffect((()=>{const e=n.onDidChangeEmpty((()=>{l(n.isTreeEmpty)}));return()=>e.dispose()}),[]);const{height:f}=e,{canSelectMany:_}=t.treeViewOptions||{},b=o.default.createRef(),y=o.default.useCallback(((e,n)=>{e.stopPropagation();const{toggleDirectory:i}=t;i(n)}),[t]),v=e=>{const{metaKey:t,ctrlKey:n}=e;return s.isOSX&&t||n},C=o.default.useCallback(((e,n,i)=>{e.stopPropagation();const{handleItemClick:r,handleItemToggleClick:o,handleItemRangeClick:a}=t;if(!n)return;const s=(e=>!v(e)&&e.shiftKey)(event),c=v(event);_?s?a(n,i):c&&o(n,i):r(n,i)}),[_]),S=o.default.useCallback(((e,n)=>{const{handleContextMenu:i}=t;i(e,n)}),[t]);return o.default.useEffect((()=>{let e=!1;return(async()=>{await t.whenReady,t.treeModel&&g&&await t.treeModel.root.ensureLoaded(),e||a(!0)})(),()=>{e=!0,t&&t.removeNodeDecoration()}}),[t,g]),o.default.useEffect((()=>{var e;const n=()=>{t.handleTreeBlur()};return null===(e=b.current)||void 0===e||e.addEventListener("blur",n,!0),()=>{var e;null===(e=b.current)||void 0===e||e.removeEventListener("blur",n,!0)}}),[b.current]),o.default.createElement("div",{className:p.default.kt_extension_view,tabIndex:-1,ref:b,onContextMenu:e=>{const{handleContextMenu:n}=t;n(e)},onClick:e=>{const{enactiveNodeDecoration:n}=t;n()},"data-tree-view-id":i},o.default.createElement(h,{isReady:r,isEmpty:c,height:f,handleTreeReady:e=>{t.handleTreeHandler(Object.assign(Object.assign({},e),{getModel:()=>t.treeModel,hasDirectFocus:()=>b.current===document.activeElement}))},handleItemClicked:C,handleTwistierClick:y,handlerContextMenu:S,treeViewId:i,model:t}))}));const h=o.default.memo((({isReady:e,isEmpty:t,model:n,treeViewId:i,height:r,handleTreeReady:s,handleItemClicked:d,handleTwistierClick:p,handlerContextMenu:h})=>{const m=o.default.useCallback((e=>o.default.createElement(u.TreeViewNode,{item:e.item,itemType:e.itemType,decorations:n.decorations.getDecorations(e.item),onClick:d,onTwistierClick:p,onContextMenu:h,defaultLeftPadding:8,leftPadding:8,treeViewId:i})),[n.treeModel]);return e?t?o.default.createElement(l.WelcomeView,{viewId:i}):n.treeModel?o.default.createElement(a.RecycleTree,{height:r,itemHeight:u.TREE_VIEW_NODE_HEIGHT,onReady:s,model:n.treeModel},m):null:o.default.createElement(c.ProgressBar,{loading:!0})}),(function(e,t){return e.isReady===t.isReady&&e.isEmpty===t.isEmpty&&e.model===t.model&&e.treeViewId===t.treeViewId&&e.height===t.height}));h.displayName="ExtensionsTreeView"},55948:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionWebviewView=t.WebviewViewShouldShowEvent=void 0;const i=n(70655).__importDefault(n(616)),r=n(894),o=n(57280);class a extends r.BasicEvent{}t.WebviewViewShouldShowEvent=a;t.ExtensionWebviewView=({viewId:e})=>{const t=i.default.useRef(null),n=(0,r.useInjectable)(r.IEventBus),s=(0,r.useInjectable)(o.ExtensionService);return i.default.useEffect((()=>{const i=new r.CancellationTokenSource,o=new r.Disposable({dispose:()=>i.cancel()});return s.eagerExtensionsActivated.promise.then((()=>{i.token.isCancellationRequested||t.current&&n.fire(new a({viewType:e,container:t.current,title:"",cancellationToken:i.token,disposer:o}))})),()=>{o.dispose()}}),[]),i.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:t})}},23591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(1018),t),i.__exportStar(n(84221),t)},35765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtCommandManagementImpl=void 0;const i=n(70655),r=n(39993),o=n(90642);let a=class extends o.Disposable{constructor(){super(...arguments),this.commandEnvRegistry=new Map,this.proxyCommandExecutorRegistry=new Map}dispose(){this.commandEnvRegistry.clear(),this.proxyCommandExecutorRegistry.clear()}registerProxyCommandExecutor(e,t){this.proxyCommandExecutorRegistry.set(e,t)}async executeExtensionCommand(e,t,n){const i=this.proxyCommandExecutorRegistry.get(e);if(!i)throw new Error('Proxy command executor"'+e+'" is not existed');return i.$executeExtensionCommand(t,...n)}registerExtensionCommandEnv(e,t="node"){return this.commandEnvRegistry.set(e,t),{dispose:()=>{this.commandEnvRegistry.delete(e)}}}getExtensionCommandEnv(e){return this.commandEnvRegistry.get(e)}};a=i.__decorate([(0,r.Injectable)()],a),t.ExtCommandManagementImpl=a},25221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtInstanceManagementService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(57280),c=n(18094);let l=class extends o.Disposable{constructor(){super(...arguments),this.extensionMap=new Map}dispose(){this.disposeExtensionInstances()}getExtensionInstances(){return Array.from(this.extensionMap.values())}disposeExtensionInstances(){for(const e of this.extensionMap.values())e.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(e){e.forEach((e=>{this.extensionMap.has(e)&&this.extensionMap.get(e).dispose()}))}resetExtensionInstances(){for(const e of this.extensionMap.values())e.reset()}getExtensionInstanceByPath(e){return this.extensionMap.get(e)}getExtensionInstanceByExtId(e){for(const t of this.extensionMap.values())if(t.id===e)return t}deleteExtensionInstanceByPath(e){this.extensionMap.delete(e)}addExtensionInstance(e){this.extensionMap.set(e.path,e)}async checkExtensionEnable(e){const[t,n]=await Promise.all([this.storageProvider(o.STORAGE_NAMESPACE.EXTENSIONS),this.storageProvider(o.STORAGE_NAMESPACE.GLOBAL_EXTENSIONS)]),i=n.get(e.extensionId,s.EXTENSION_ENABLE.ENABLE);return t.get(e.extensionId,i)===s.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(e,t,n){const i="string"==typeof e?await this.extensionNodeClient.getExtension(e,(0,a.getLanguageId)(),{}):e;if(i)return this.injector.get(c.Extension,[i,await this.checkExtensionEnable(i),t||!!this.appConfig.extensionDir&&i.realPath.startsWith(this.appConfig.extensionDir),!!n])}checkIsBuiltin(e){const t=this.getExtensionCandidateByPath(e.realPath);return!!this.appConfig.extensionDir&&e.realPath.startsWith(this.appConfig.extensionDir)||!!t&&t.isBuiltin}checkIsDevelopment(e){const t=this.getExtensionCandidateByPath(e.realPath);return!!(null==t?void 0:t.isDevelopment)}getExtensionCandidateByPath(e){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find((t=>t.path===e))}};i.__decorate([(0,r.Autowired)(o.StorageProvider),i.__metadata("design:type",Function)],l.prototype,"storageProvider",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],l.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(s.ExtensionNodeServiceServerPath),i.__metadata("design:type",Object)],l.prototype,"extensionNodeClient",void 0),l=i.__decorate([(0,r.Injectable)()],l),t.ExtInstanceManagementService=l},89555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionManagementService=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280),s=n(73939);let c=class extends o.WithEventBus{async getExtensionProps(e,t){const n=await this.extensionNodeClient.getExtension(e,(0,o.getLanguageId)(),t);if(n){const t=this.getExtensionByPath(e);if(t)return Object.assign(Object.assign({},t.toJSON()),{extraMetadata:n.extraMetadata})}}getExtensionByPath(e){return this.extInstanceManagementService.getExtensionInstances().find((t=>e===t.path))}getExtensionByExtId(e){return this.extInstanceManagementService.getExtensionInstances().find((t=>e===t.id))}async postChangedExtension(e,t,n){const{upgrade:i,extensionPath:r,oldExtensionPath:o,isBuiltin:a}="boolean"==typeof e?{upgrade:e,extensionPath:t,oldExtensionPath:n,isBuiltin:!1}:e,s=this.extInstanceManagementService.getExtensionInstanceByPath(r);if(s)return void this.logger.warn(`Extension ${s.id} already exists, skip activate`);const c=await this.extInstanceManagementService.createExtensionInstance(r,!!a);return c?(i&&this.disableExtension(o),await this.enableExtension(c)):void 0}async postEnableExtension(e){const t=await this.extInstanceManagementService.getExtensionInstanceByPath(e);if(t)return await this.enableExtension(t)}async postDisableExtension(e){return this.disableExtension(e)}async postUninstallExtension(e){return this.uninstallExtension(e)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map((e=>e.toJSON()))}disableExtension(e){const t=this.extInstanceManagementService.getExtensionInstanceByPath(e);t&&(t.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(e))}async enableExtension(e){this.extInstanceManagementService.addExtensionInstance(e),e.enable(),await e.contributeIfEnabled(),this.eventBus.fire(new s.ExtensionDidEnabledEvent(e.toJSON()))}async uninstallExtension(e){const t=this.extInstanceManagementService.getExtensionInstanceByPath(e);t&&(t.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(e)),this.eventBus.fire(new s.ExtensionDidUninstalledEvent)}};i.__decorate([(0,r.Autowired)(s.AbstractExtInstanceManagementService),i.__metadata("design:type",s.AbstractExtInstanceManagementService)],c.prototype,"extInstanceManagementService",void 0),i.__decorate([(0,r.Autowired)(a.ExtensionNodeServiceServerPath),i.__metadata("design:type",Object)],c.prototype,"extensionNodeClient",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),c=i.__decorate([(0,r.Injectable)()],c),t.ExtensionManagementService=c},5100:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeExtProcessService=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(49943),s=n(894),c=n(57280),l=n(24453),d=n(50033),u=n(70406);let p=class{constructor(){this._apiFactoryDisposables=[],this.ready=new s.Deferred,this._extHostUpdated=new s.Deferred,this.extensions=[]}disposeApiFactory(){this._apiFactoryDisposables.forEach((e=>{e.dispose()})),this._apiFactoryDisposables=[]}async disposeProcess(){this.disposeApiFactory(),await this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}async activate(){if(this.protocol=await this.createExtProcess(),this.protocol){this.ready.resolve(),this.logger.verbose("init node thread api proxy",this.protocol),await this.createBrowserMainThreadAPI(this.protocol);const e=await this.getProxy();await e.$updateExtHostData(),this._extHostUpdated.resolve()}return this.protocol}async activeExtension(e,t){if(!this.appConfig.noExtHost&&!t){await this._extHostUpdated.promise;const t=await this.getProxy();await t.$activateExtension(e.id)}}async updateExtensionData(e){if(this.extensions=e,this.protocol){const e=await this.getProxy();await e.$updateExtHostData(),e.$fireChangeEvent()}}getExtension(e){return this.extensions.find((t=>t.id===e))}async $activateExtension(e){const t=this.extensions.find((t=>t.path===e));t&&await t.activate()}async $getExtensions(){return this.extensions.map((e=>e.toJSON()))}async getProxy(){return await this.ready.promise,this.protocol.getProxy(l.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(e){this._apiFactoryDisposables.push((0,s.toDisposable)(await(0,u.createApiFactory)(e,this.injector,this)),(0,s.toDisposable)((0,d.createSumiApiFactory)(e,this.injector)))}async getActivatedExtensions(){const e=await this.getProxy();return await e.$getActivatedExtensions()}get clientId(){let e;if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote)this.logger.verbose("createExtProcess electronEnv.metadata.windowClientId",s.electronEnv.metadata.windowClientId),e=s.electronEnv.metadata.windowClientId;else{e=this.injector.get(a.WSChannelHandler).clientId}return e}async createExtProcess(){return await this.extensionNodeClient.createProcess(this.clientId,{enableDebugExtensionHost:this.appConfig.enableDebugExtensionHost,extensionConnectOption:this.appConfig.extensionConnectOption}),this.initExtProtocol()}async initExtProtocol(){const e=new o.RPCServiceCenter;if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const t=await this.extensionNodeClient.getElectronMainThreadListenPath(s.electronEnv.metadata.windowClientId);this.logger.verbose("electron initExtProtocol connectPath",t),e.setConnection((0,s.createElectronClientConnection)(t))}else{const t=this.injector.get(a.WSChannelHandler),n=await t.openChannel("ExtMainThreadConnection");e.setConnection((0,o.createWebSocketConnection)(n))}const{getRPCService:t}=(0,o.initRPCService)(e),n=t("ExtProtocol"),i=new s.Emitter;n.on("onMessage",(e=>{i.fire(e)}));const r=i.event,c=n.onMessage;return new o.RPCProtocol({onMessage:r,send:c})}};i.__decorate([(0,r.Autowired)(s.ILogger),i.__metadata("design:type",Object)],p.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(s.AppConfig),i.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(c.ExtensionNodeServiceServerPath),i.__metadata("design:type",Object)],p.prototype,"extensionNodeClient",void 0),p=i.__decorate([(0,r.Injectable)()],p),t.NodeExtProcessService=p},62008:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ViewExtProcessService=void 0;const r=n(70655),o=n(39993),a=n(15003),s=n(41037),c=n(894),l=n(894),d=n(90642),u=n(43881),p=n(57280),h=n(44468),m=n(23591),g=n(63526),f=n(9481),_=n(85729),b=n(86911),{Path:y,posix:v}=l.path;let C=i=class{constructor(){this.debugLogger=(0,d.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(e){return this.extensions.find((t=>t.id===e))}async initExtension(e){this.extensions=e}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(e){}async $getExtensions(){return this.extensions.map((e=>e.toJSON()))}async disposeProcess(){}activate(){const e=this.requireInterceptorContributionProvider.getContributions();for(const t of e)t.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(e,t)=>{let n,i=`Error: ${e.message}`;for(const e of t)if(i+=`\n\tat ${e.toString()}`,!n&&e.isEval()){const t=e.getEvalOrigin(),r=this.getExtension.apply(this,[t]);if(r){n=r;const t=e.getColumnNumber(),o=e.getLineNumber();i=`\n\tat ${n.name} (${n.workerScriptPath}:${o}:${t})`+i}}if(n){const t=`${n&&n.name} - ${e.name||"Error"}: ${e.message||""}${i}`;return this.debugLogger.log("get error",t),this.reportRuntimeError(e,n,t),t}return e.stack}}reportRuntimeError(e,t,n){var i;e&&e.message&&this.reporterService.point(d.REPORT_NAME.RUNTIME_ERROR_EXTENSION,t.id,{stackTraceMessage:n,error:e.message,version:null===(i=t.packageJSON)||void 0===i?void 0:i.version})}getRegisterViewKind(e){return i.tabBarLocation.includes(e)?"replace":"add"}async activeExtension(e,t){var n;const{extendConfig:i,packageJSON:r,contributes:o}=e;if(null===(n=null==i?void 0:i.browser)||void 0===n?void 0:n.main)return(0,a.warning)(!1,"[Deprecated warning]: kaitian.js is deprecated, please use `package.json#kaitianContributes` instead"),void await this.activateExtensionByDeprecatedExtendConfig(e);r.kaitianContributes&&(null==o?void 0:o.browserMain)&&await this.activeExtensionContributes(e)}async activeExtensionContributes(e){var t;const{contributes:n}=e,i=new l.URI(e.extensionLocation.with({path:v.join(e.extensionLocation.path,n.browserMain)})),{moduleExports:o,proxiedHead:a}=await this.getExtensionModuleExports(i.toString(),e);if(n.browserViews){const{browserViews:t}=n;this.appConfig.useExperimentalShadowDom&&this.registerPortalShadowRoot(e.id);const i=Object.keys(t).reduce(((n,i)=>(n[i]={type:this.getRegisterViewKind(i),view:t[i].view.map((t=>{var{id:n,titleComponentId:i,title:s}=t,c=r.__rest(t,["id","titleComponentId","title"]);return Object.assign(Object.assign({},c),{title:(0,d.replaceLocalizePlaceholder)(s,e.id),id:n,component:this.getModuleExportsComponent(o,e,n,a),titleComponent:i&&this.getModuleExportsComponent(o,e,i,a)})}))},n)),{});this.registerBrowserComponent(i,e)}if(n.toolbar&&(null===(t=n.toolbar)||void 0===t?void 0:t.actions))for(const t of n.toolbar.actions)if("button"===t.type&&t.popoverComponent){const n=o[t.popoverComponent];if(!n){this.logger.error(`Can not find CustomPopover from extension ${e.id}, id: ${t.popoverComponent}`);continue}if(this.appConfig.useExperimentalShadowDom){const i=i=>(0,_.getShadowRoot)(n,e,i,t.popoverComponent,a,this.appConfig.componentCDNType);this.toolbarPopoverRegistry.registerComponent(`${e.id}:${t.popoverComponent}`,i)}else this.toolbarPopoverRegistry.registerComponent(`${e.id}:${t.popoverComponent}`,n)}}async activateExtensionByDeprecatedExtendConfig(e){const{extendConfig:t}=e;this.logger.verbose(`register view by Deprecated config ${e.id}`);const n=await this.staticResourceService.resolveStaticResource(l.URI.file(new y(e.path).join(t.browser.main).toString()));try{const t=e;if(this.appConfig.useExperimentalShadowDom){this.registerPortalShadowRoot(e.id);const{moduleExports:i,proxiedHead:r}=await this.loadBrowserModuleUseInterceptor(n.toString(),e,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(i,e,r),t)}else{const{moduleExports:i}=await this.loadBrowserModule(n.toString(),e,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(i,e),t)}}catch(t){"load"===t.errorCode?this.logger.error(`[Extension-Host] failed to load ${e.name} - browser module, path: \n\n ${t.moduleId}`):this.logger.error(t)}}async getExtensionModuleExports(e,t){if(this.appConfig.useExperimentalShadowDom)return await this.loadBrowserModuleUseInterceptor(e,t,!1);const{moduleExports:n}=await this.loadBrowserModule(e,t,!1);return{moduleExports:n}}registerBrowserComponent(e,t){this.activatedViewExtensionMap.set(t.path,t),e.default&&(e=e.default);const n=e;t.addDispose(this.injector.get(b.SumiBrowserContributionRunner,[t,n]).run({getExtensionExtendService:this.getExtensionExtendService.bind(this)}))}getExtensionExtendService(e,t){const n=this.createExtensionExtendProtocol(e,t);return this.logger.log(`bind extend service for ${e.id}:${t}`),{extendProtocol:n,extendService:n.getProxy(p.MOCK_EXTENSION_EXTEND_PROXY_IDENTIFIER)}}createExtensionExtendProtocol(e,t){const{id:n}=e;return new Proxy(Object.create(null),{get:(e,i)=>{if("symbol"==typeof i)return e[i];if("getProxy"===i)return()=>{let e,t;return this.nodeExtensionService.protocol&&(e=this.createExtendProxy(this.nodeExtensionService.protocol,n)),this.workerExtensionService.protocol&&(t=this.createExtendProxy(this.workerExtensionService.protocol,n)),{node:e,worker:t}};if("set"===i){const e={serviceId:`${p.EXTENSION_EXTEND_SERVICE_PREFIX}:${n}:${t}`};return t=>{const n={};for(const e in t)t.hasOwnProperty(e)&&(n[`$${e}`]=t[e]);if(this.logger.log("componentProxyIdentifier",e,"service",n),this.workerExtensionService.protocol&&this.workerExtensionService.protocol.set(e,n),this.nodeExtensionService.protocol)return this.nodeExtensionService.protocol.set(e,n)}}}})}createExtendProxy(e,t){const n=e.getProxy(new s.ProxyIdentifier(`${p.EXTENSION_EXTEND_SERVICE_PREFIX}:${t}`));return this.dollarProxy(n)}dollarProxy(e){return new Proxy(e,{get:(e,t)=>"symbol"==typeof t?e[t]:e[`$${t}`]})}getModuleExportsComponent(e,t,n,i){return e[n]?this.appConfig.useExperimentalShadowDom?r=>(0,_.getShadowRoot)(e[n],t,r,n,i,this.appConfig.componentCDNType):e[n]:()=>(0,m.ExtensionNoExportsView)(t.id,n)}registerPortalShadowRoot(e){if(!this.portalShadowRootMap.has(e)){const t=document.createElement("div");t.setAttribute("id",`portal-shadow-root-${e}`),document.body.appendChild(t);const n=t.attachShadow({mode:"open"});(0,f.retargetEvents)(n),this.portalShadowRootMap.set(e,n)}}getPortalShadowRoot(e){return this.portalShadowRootMap.get(e)}getShadowRootBody(e){return this.shadowRootBodyMap.get(e)}doFetch(e){const t={};this.appConfig.extensionFetchCredentials&&(t.credentials=this.appConfig.extensionFetchCredentials);return fetch(e,t)}getMockAmdLoader(e,t){const n={};return{_module:{exports:n},_exports:n,_require:n=>{const i=this.requireInterceptorService.getRequireInterceptor(n);return null==i?void 0:i.load({injector:this.injector,extension:e,rpcProtocol:t})}}}async loadBrowserModule(e,t,n){const i=this.reporterService.time(d.REPORT_NAME.LOAD_EXTENSION_MAIN),r=await this.doFetch(decodeURIComponent(e));i.timeEnd(t.id);const{_module:o,_exports:a,_require:s}=this.getMockAmdLoader(t,this.nodeExtensionService.protocol);return new Function("module","exports","require",await r.text()+`\n//# sourceURL=${t.id}`)(o,a,s),{moduleExports:n?o.exports.default:o.exports}}normalizeDeprecatedViewsConfig(e,t,n){if(this.appConfig.useExperimentalShadowDom)return Object.keys(e).filter((t=>e[t]&&Array.isArray(e[t].component))).reduce(((i,o)=>(i[o]={view:e[o].component.map((e=>{var{panel:i,id:o}=e,a=r.__rest(e,["panel","id"]);return Object.assign(Object.assign({},a),{id:o,component:e=>(0,_.getShadowRoot)(i,t,e,o,n,this.appConfig.componentCDNType)})}))},i)),{});{const t=e.default?e.default:e;return Object.keys(t).filter((e=>t[e]&&Array.isArray(t[e].component))).reduce(((e,n)=>(e[n]={view:t[n].component.map((e=>{var{panel:t}=e,n=r.__rest(e,["panel"]);return Object.assign(Object.assign({},n),{component:t})}))},e)),{})}}async loadBrowserModuleUseInterceptor(e,t,n){const i=this.reporterService.time(d.REPORT_NAME.LOAD_EXTENSION_MAIN),r=await this.doFetch(decodeURIComponent(e));i.timeEnd(t.id);const{_module:o,_exports:a,_require:s}=this.getMockAmdLoader(t,this.nodeExtensionService.protocol),c=document.createElement("head"),l=(0,g.createProxiedDocument)(c),u=(0,g.createProxiedWindow)(l,c);return new Function("module","exports","require","styles","document","window",await r.text()+`\n//# sourceURL=${t.id}`)(o,a,s,[],l,u),{moduleExports:n?o.exports.default:o.exports,proxiedHead:c}}};C.tabBarLocation=["left","right"],r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],C.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(d.ILogger),r.__metadata("design:type",Object)],C.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(c.AppConfig),r.__metadata("design:type",Object)],C.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(c.IToolbarPopoverRegistry),r.__metadata("design:type",Object)],C.prototype,"toolbarPopoverRegistry",void 0),r.__decorate([(0,o.Autowired)(h.AbstractWorkerExtProcessService),r.__metadata("design:type",h.AbstractWorkerExtProcessService)],C.prototype,"workerExtensionService",void 0),r.__decorate([(0,o.Autowired)(h.AbstractNodeExtProcessService),r.__metadata("design:type",h.AbstractNodeExtProcessService)],C.prototype,"nodeExtensionService",void 0),r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",u.StaticResourceService)],C.prototype,"staticResourceService",void 0),r.__decorate([(0,o.Autowired)(p.RequireInterceptorContribution),r.__metadata("design:type",Object)],C.prototype,"requireInterceptorContributionProvider",void 0),r.__decorate([(0,o.Autowired)(p.IRequireInterceptorService),r.__metadata("design:type",Object)],C.prototype,"requireInterceptorService",void 0),r.__decorate([(0,o.Autowired)(d.IReporterService),r.__metadata("design:type",Object)],C.prototype,"reporterService",void 0),C=i=r.__decorate([(0,o.Injectable)()],C),t.ViewExtProcessService=C},57267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerExtProcessService=void 0;const i=n(70655),r=n(39993),o=n(69198),a=n(5763),s=n(894),c=n(90642),l=n(57280),d=n(38196),u=n(70406),p=n(91064),{posix:h}=c.path;let m=class extends c.Disposable{constructor(){super(...arguments),this.ready=new s.Deferred,this._extHostUpdated=new s.Deferred,this.extensions=[]}disposeApiFactory(){var e;null===(e=this.apiFactoryDisposable)||void 0===e||e.dispose()}disposeProcess(){this.disposeApiFactory()}async activate(e){return this.protocol=await this.createExtProcess(e),this.protocol&&(this.ready.resolve(),this.logger.log("[Worker Host] init worker thread api proxy"),this.logger.verbose(this.protocol),this.apiFactoryDisposable=(0,c.toDisposable)(await(0,u.initWorkerThreadAPIProxy)(this.protocol,this.injector,this)),this.addDispose(this.apiFactoryDisposable),await this.getProxy().$updateExtHostData(),this._extHostUpdated.resolve()),this.protocol}async activeExtension(e,t){var n,i;const{extendConfig:r,packageJSON:a}=e;if(null===(n=null==r?void 0:r.worker)||void 0===n?void 0:n.main)return(0,o.warning)(!1,"[Deprecated warning]: kaitian.js is deprecated, please use `package.json#kaitianContributes` instead"),void await this.doActivateExtension(e);(a.kaitianContributes&&(null===(i=e.contributes)||void 0===i?void 0:i.workerMain)||t&&a.browser)&&await this.doActivateExtension(e)}async doActivateExtension(e){this.appConfig.extWorkerHost&&(await this._extHostUpdated.promise,await this.getProxy().$activateExtension(e.id))}async updateExtensionData(e){this.extensions=e,this.protocol&&this.getProxy().$updateExtHostData()}getExtension(e){return this.extensions.find((t=>t.id===e))}async $activateExtension(e){const t=this.extensions.find((t=>t.workerScriptPath===e));t&&await t.activate()}async $getExtensions(){return this.extensions.map((e=>e.contributes&&e.contributes.workerMain?this.getWorkerExtensionProps(e,e.contributes.workerMain):e.packageJSON.browser?this.getWorkerExtensionProps(e,e.packageJSON.browser):e.extendConfig&&e.extendConfig.worker&&e.extendConfig.worker.main?this.getWorkerExtensionProps(e,e.extendConfig.worker.main):e.toJSON()))}async $getStaticServicePath(){return this.appConfig.staticServicePath||"http://0.0.0.0:8000"}async createExtProcess(e){const t=(0,d.getWorkerBootstrapUrl)(this.appConfig.extWorkerHost,"ExtensionWorkerHost",e);return await this.initWorkerProtocol(t)}async initWorkerProtocol(e){return this.logger.log("[Worker Host] init web worker extension host"),new Promise(((t,n)=>{const i=new s.Deferred,r=new s.Emitter;if(this.appConfig.useIframeWrapWorkerHost){const{iframe:n,extHostUuid:o}=(0,p.startInsideIframe)(e);window.addEventListener("message",(e=>{e.source===n.contentWindow&&e.data.kaitianWebWorkerExtHostId===o&&e.data.data instanceof MessagePort&&i.resolve(e.data.data)})),i.promise.then((e=>{t(this.createProtocol(e,r))}))}else try{const o=new Worker(e,{name:"KaitianWorkerExtensionHost"});this.addDispose({dispose:()=>o.terminate()}),o.onmessage=e=>{e.data instanceof MessagePort&&i.resolve(e.data)},o.onerror=e=>{n(e)},i.promise.then((e=>{t(this.createProtocol(e,r))}))}catch(e){n(e)}}))}createProtocol(e,t){const n=t.event,i=new a.RPCProtocol({onMessage:n,send:e.postMessage.bind(e)},this.logger);return e.onmessage=e=>{t.fire(e.data)},this.logger.log("[Worker Host] web worker extension host ready"),i}getActivatedExtensions(){return this.getProxy().$getActivatedExtensions()}getProxy(){return this.protocol.getProxy(l.WorkerHostAPIIdentifier.ExtWorkerHostExtensionService)}getWorkerExtensionProps(e,t){let n=t;n.endsWith(".js")||(n+=".js");const i=new s.URI(e.extensionLocation.with({path:h.join(e.extensionLocation.path,n)})).toString();return Object.assign({},e.toJSON(),{workerScriptPath:i})}};i.__decorate([(0,r.Autowired)(s.AppConfig),i.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(s.ILogger),i.__metadata("design:type",Object)],m.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),m=i.__decorate([(0,r.Injectable)()],m),t.WorkerExtProcessService=m},65557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionCommandContribution=t.ExtensionClientAppContribution=t.getClientId=void 0;const i=n(70655),r=n(39993),o=n(49943),a=n(894),s=n(39205),c=n(92345),l=n(1500),d=n(67851),u=n(57280),p=n(65049),h=n(56075),m=n(73939),g=i.__importStar(n(42854)),f=n(95308);t.getClientId=e=>{let t;const n=e.get(a.AppConfig);if(n.isElectronRenderer&&!n.isRemote)t=a.electronEnv.metadata.windowClientId;else{t=e.get(o.WSChannelHandler).clientId}return t};let _=class{initialize(){this.extensionService.activate().catch((e=>{this.logger.error(e)})).finally((()=>{const e=this.webviewService.registerWebviewReviver({handles:()=>0,revive:async t=>new Promise((n=>{this.eventBus.on(m.ExtensionApiReadyEvent,(()=>{e.dispose(),n(this.webviewService.tryReviveWebviewComponent(t))}))}))})}))}async onStart(){this.preferenceSettingsService.registerSettingGroup({id:"extension",title:(0,a.localize)("settings.group.extension"),iconClass:(0,a.getIcon)("extension")});for(const e of f.VSCodeContributeRunner.ContributePoints){const t=Reflect.getMetadata(u.CONTRIBUTE_NAME_KEY,e);this.extensionsPointService.registerExtensionPoint({extensionPoint:t,jsonSchema:e.schema||{},frameworkKind:["vscode","opensumi"]})}for(const e of h.SumiContributesRunner.ContributePoints){const t=Reflect.getMetadata(u.CONTRIBUTE_NAME_KEY,e);this.extensionsPointService.registerExtensionPoint({extensionPoint:t,jsonSchema:e.schema||{},frameworkKind:["opensumi"]})}}onDisposeSideEffects(){this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}get clientId(){return(0,t.getClientId)(this.injector)}};i.__decorate([(0,r.Autowired)(a.IPreferenceSettingsService),i.__metadata("design:type",Object)],_.prototype,"preferenceSettingsService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(u.ExtensionNodeServiceServerPath),i.__metadata("design:type",Object)],_.prototype,"extensionNodeClient",void 0),i.__decorate([(0,r.Autowired)(a.QuickOpenService),i.__metadata("design:type",Object)],_.prototype,"quickOpenService",void 0),i.__decorate([(0,r.Autowired)(s.IStatusBarService),i.__metadata("design:type",Object)],_.prototype,"statusBar",void 0),i.__decorate([(0,r.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),i.__decorate([(0,r.Autowired)(d.IWebviewService),i.__metadata("design:type",Object)],_.prototype,"webviewService",void 0),i.__decorate([(0,r.Autowired)(u.ExtensionService),i.__metadata("design:type",u.ExtensionService)],_.prototype,"extensionService",void 0),i.__decorate([(0,r.Autowired)(a.IExtensionsPointService),i.__metadata("design:type",Object)],_.prototype,"extensionsPointService",void 0),i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],_.prototype,"logger",void 0),_=i.__decorate([(0,a.Domain)(a.ClientAppContribution)],_),t.ExtensionClientAppContribution=_;let b=class{registerCommands(e){e.registerCommand({id:"ext.restart",label:"%extension.host.restart%"},{execute:async()=>{this.logger.log("鎻掍欢杩涚▼寮€濮嬮噸鍚�"),await this.extensionService.restartExtProcess(),this.logger.log("鎻掍欢杩涚▼閲嶅惎缁撴潫")}}),e.registerCommand(g.GET_EXTENSION,{execute:async e=>{const t=this.extensionInstanceManageService.getExtensionInstanceByExtId(e);return t&&t.toJSON()}}),this.registerVSCBuiltinCommands(e)}registerVSCBuiltinCommands(e){e.registerCommand(g.SET_CONTEXT,{execute:(e,t)=>{this.contextKeyService.createKey(String(e),t)}}),e.registerCommand(g.RELOAD_WINDOW_COMMAND,{execute:()=>{this.clientApp.fireOnReload()}}),e.registerCommand(u.EMIT_EXT_HOST_EVENT,{execute:async(e,...t)=>{await this.activationEventService.fireEvent("onEvent:"+e);const n=await this.eventBus.fireAndAwait(new m.ExtHostEvent({eventName:e,eventArgs:t})),i=[];return n.forEach((e=>{e.err?i.push(e):i.push(...e.result||[])})),i}}),e.registerCommand(g.SHOW_RUN_TIME_EXTENSION,{execute:async()=>{const e=await this.extensionService.getActivatedExtensions();this.quickOpenService.open({onType:(t,n)=>n(this.asQuickOpenItems(e))},{placeholder:"杩愯涓殑鎻掍欢",fuzzyMatchLabel:{enableSeparateSubstringMatching:!0}})}}),e.registerCommand(g.START_EXTENSION_HOST_PROFILER,{execute:async()=>{this.cpuProfileStatus||(this.cpuProfileStatus=this.statusBar.addElement("ExtensionHostProfile",{tooltip:(0,a.formatLocalize)("extension.profiling.clickStop","Click to stop profiling."),text:`$(sync~spin) ${(0,a.formatLocalize)("extension.profilingExtensionHost","Profiling Extension Host")}`,alignment:s.StatusBarAlignment.RIGHT,command:g.STOP_EXTENSION_HOST_PROFILER.id})),await this.extensionProfiler.$startProfile(this.clientId)},isPermitted:()=>!1}),e.registerCommand(g.STOP_EXTENSION_HOST_PROFILER,{execute:async()=>{const e=await this.extensionProfiler.$stopProfile(this.clientId);if(this.cpuProfileStatus&&(this.cpuProfileStatus.dispose(),this.cpuProfileStatus=null),e){const e=await this.dialogService.showSaveDialog({saveLabel:(0,a.formatLocalize)("extension.profile.save","Save Extension Host Profile"),showNameInput:!0,defaultFileName:`CPU-${(new Date).toISOString().replace(/[\-:]/g,"")}.cpuprofile`});(null==e?void 0:e.codeUri)&&await this.extensionProfiler.$saveLastProfile(null==e?void 0:e.codeUri.fsPath)}},isPermitted:()=>!1}),e.registerCommand(g.COPY_FILE_PATH,{execute:async e=>{await this.commandService.executeCommand(a.FILE_COMMANDS.COPY_PATH.id,a.URI.from(e))}}),e.registerCommand(g.COPY_RELATIVE_FILE_PATH,{execute:async e=>{await this.commandService.executeCommand(a.FILE_COMMANDS.COPY_RELATIVE_PATH.id,a.URI.from(e))}}),e.registerCommand(g.OPEN,{execute:(e,t,n)=>{const i=a.URI.from(e);return this.doOpenWith(i,t,n,void 0)}}),e.registerCommand(g.OPEN_WITH,{execute:(e,t,n)=>{const i=a.URI.from(e),r="default"===t?void 0:{type:"component",componentId:`${a.CUSTOM_EDITOR_SCHEME}-${t}`};return this.doOpenWith(i,n,void 0,r)}}),e.registerCommand(g.DIFF,{execute:(e,t,n,i)=>{const r=Object.assign(Object.assign(Object.assign({},(0,p.viewColumnToResourceOpenOptions)(null==i?void 0:i.viewColumn)),{revealFirstDiff:!0}),i);return this.commandService.executeCommand(a.EDITOR_COMMANDS.COMPARE.id,{original:a.URI.from(e),modified:a.URI.from(t),name:n},r)}}),[g.WORKBENCH_CLOSE_ACTIVE_EDITOR,g.REVERT_AND_CLOSE_ACTIVE_EDITOR,g.SPLIT_EDITOR_RIGHT,g.SPLIT_EDITOR_DOWN,g.EDITOR_NAVIGATE_BACK,g.EDITOR_NAVIGATE_FORWARD,g.EDITOR_SAVE_ALL,g.CLOSE_ALL_EDITORS,g.PREVIOUS_EDITOR,g.PREVIOUS_EDITOR_IN_GROUP,g.NEXT_EDITOR,g.NEXT_EDITOR_IN_GROUP,g.EVEN_EDITOR_WIDTH,g.CLOSE_OTHER_GROUPS,g.LAST_EDITOR_IN_GROUP,g.OPEN_EDITOR_AT_INDEX,g.CLOSE_OTHER_EDITORS,g.NEW_UNTITLED_FILE,g.FILE_SAVE,g.SPLIT_EDITOR,g.SPLIT_EDITOR_ORTHOGONAL,g.NAVIGATE_LEFT,g.NAVIGATE_RIGHT,g.NAVIGATE_UP,g.NAVIGATE_DOWN,g.NAVIGATE_NEXT,g.REVERT_FILES,g.WORKBENCH_FOCUS_FILES_EXPLORER,g.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP,g.API_OPEN_EDITOR_COMMAND_ID,g.API_OPEN_DIFF_EDITOR_COMMAND_ID,g.API_OPEN_WITH_EDITOR_COMMAND_ID,g.DEBUG_COMMAND_STEP_INTO,g.DEBUG_COMMAND_STEP_OVER,g.DEBUG_COMMAND_STEP_OUT,g.DEBUG_COMMAND_CONTINUE,g.DEBUG_COMMAND_RUN,g.DEBUG_COMMAND_START,g.DEBUG_COMMAND_PAUSE,g.DEBUG_COMMAND_RESTART,g.DEBUG_COMMAND_STOP,g.EDITOR_SHOW_ALL_SYMBOLS,g.REVEAL_IN_EXPLORER,g.OPEN_FOLDER,g.CLEAR_TERMINAL,g.TOGGLE_WORKBENCH_VIEW_TERMINAL,g.NEW_WORKBENCH_VIEW_TERMINAL,g.RELOAD_WINDOW,g.SETTINGS_COMMAND_OPEN_SETTINGS,g.SETTINGS_COMMAND_OPEN_SETTINGS_JSON].forEach((t=>{e.registerCommand(t)}))}doOpenWith(e,t,n,i){const[r,o]=null!=t?t:[],a={};if("number"==typeof r&&(a.groupIndex=r),o){if(a.focus=a.preserveFocus=o.preserveFocus,o.selection&&(0,p.isLikelyVscodeRange)(o.selection)&&(o.selection=(0,p.fromRange)(o.selection)),Array.isArray(o.selection)&&2===o.selection.length){const[e,t]=o.selection;a.range={startLineNumber:e.line+1,startColumn:e.character+1,endLineNumber:t.line+1,endColumn:t.character+1}}else a.range=o.selection;a.preview=o.preview}return i&&(a.forceOpenType=i),n&&(a.label=n),this.workbenchEditorService.open(e,a)}asQuickOpenItems(e){return[...e.node?e.node.map(((e,t)=>this.toQuickOpenItem(e,"Node.js",0===t))):[],...e.worker?e.worker.map(((e,t)=>this.toQuickOpenItem(e,"Web Worker",0===t))):[]]}toQuickOpenItem(e,t,n){const i=this.extensionInstanceManageService.getExtensionInstanceByExtId(e.id);return new a.QuickOpenItem({groupLabel:n?t:void 0,showBorder:!!n,label:(0,a.replaceLocalizePlaceholder)(e.displayName,e.id),description:(0,a.replaceLocalizePlaceholder)(e.description,e.id),detail:null==i?void 0:i.realPath})}get clientId(){return(0,t.getClientId)(this.injector)}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],b.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),i.__metadata("design:type",c.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),i.__decorate([(0,r.Autowired)(m.IActivationEventService),i.__metadata("design:type",m.IActivationEventService)],b.prototype,"activationEventService",void 0),i.__decorate([(0,r.Autowired)(a.QuickOpenService),i.__metadata("design:type",Object)],b.prototype,"quickOpenService",void 0),i.__decorate([(0,r.Autowired)(u.ExtensionHostProfilerServicePath),i.__metadata("design:type",Object)],b.prototype,"extensionProfiler",void 0),i.__decorate([(0,r.Autowired)(s.IStatusBarService),i.__metadata("design:type",Object)],b.prototype,"statusBar",void 0),i.__decorate([(0,r.Autowired)(l.IWindowDialogService),i.__metadata("design:type",Object)],b.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(a.IClientApp),i.__metadata("design:type",Object)],b.prototype,"clientApp",void 0),i.__decorate([(0,r.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],b.prototype,"eventBus",void 0),i.__decorate([(0,r.Autowired)(a.CommandService),i.__metadata("design:type",Object)],b.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],b.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(d.IWebviewService),i.__metadata("design:type",Object)],b.prototype,"webviewService",void 0),i.__decorate([(0,r.Autowired)(u.ExtensionService),i.__metadata("design:type",u.ExtensionService)],b.prototype,"extensionService",void 0),i.__decorate([(0,r.Autowired)(m.AbstractExtInstanceManagementService),i.__metadata("design:type",m.AbstractExtInstanceManagementService)],b.prototype,"extensionInstanceManageService",void 0),i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],b.prototype,"logger",void 0),b=i.__decorate([(0,a.Domain)(a.CommandContribution)],b),t.ExtensionCommandContribution=b},18094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(43881),s=n(57280),c=n(14128),l=n(73939),d=Symbol.for("metaDataSymbol");let u=class extends o.WithEventBus{constructor(e,t,n,i){super(),this.extensionData=e,this.isUseEnable=t,this.isBuiltin=n,this.isDevelopment=i,this.extraMetadata={},this._activated=!1,this.logger=(0,o.getDebugLogger)(),this.pkgLocalizedField=new Map,this._enabled=t,this.packageJSON=this.extensionData.packageJSON,this.defaultPkgNlsJSON=this.extensionData.defaultPkgNlsJSON,this.packageNlsJSON=this.extensionData.packageNlsJSON,this.id=this.extensionData.id,this.extensionId=this.extensionData.extensionId,this.name=this.packageJSON.name,this.extraMetadata=this.extensionData.extraMetadata,this.path=this.extensionData.path,this.uri=this.extensionData.uri,this.realPath=this.extensionData.realPath,this.extendConfig=this.extensionData.extendConfig||{},this.enableProposedApi=Boolean(this.extensionData.packageJSON.enableProposedApi),this.extensionLocation=this.staticResourceService.resolveStaticResource(o.URI.from(this.uri)).codeUri}localize(e){if(!this.pkgLocalizedField.get(e)){const t=(0,o.replaceNlsField)(this.packageJSON[e],this.id);return this.pkgLocalizedField.set(e,t),t||this.packageJSON[e]}return this.pkgLocalizedField.get(e)}get activated(){return this._activated}get enabled(){return this._enabled}set enabled(e){this._enabled=e}disable(){this._enabled&&(this.extMetadataService.dispose(),this._enabled=!1,super.dispose())}enable(){this._enabled||(this._enabled=!0)}async contributeIfEnabled(){this._enabled&&(this.addDispose(this.extMetadataService),this.logger.log(`${this.name} extensionMetadataService.run`),this.packageNlsJSON&&(0,o.registerLocalizationBundle)(Object.assign(Object.assign({},(0,o.getCurrentLanguageInfo)()),{contents:this.packageNlsJSON}),this.id),this.defaultPkgNlsJSON&&(0,o.registerLocalizationBundle)({languageId:"default",languageName:"en-US",localizedLanguageName:"English",contents:this.defaultPkgNlsJSON},this.id),await this.extMetadataService.run(this))}async activate(e=new Set){var t;const n=(null===(t=this.packageJSON)||void 0===t?void 0:t.extensionDependencies)||[];e.add(this.extensionId);for(const t of n){const n="string"==typeof t?t:Object.keys(t)[0];if(e.has(n))continue;const i=this.extensionInstanceManageService.getExtensionInstanceByExtId(n);i&&await i.activate(e)}if(this._activated)return;const i=await this.eventBus.fireAndAwait(new l.ExtensionWillActivateEvent(this));return i.length>0&&i[0].result?(this._activated=!0,Promise.resolve()):(this._activating||(this._activating=new o.Deferred,this.extensionService.activeExtension(this).then((()=>{var e;this._activated=!0,this.eventBus.fire(new l.ExtensionDidActivatedEvent(this.toJSON())),null===(e=this._activating)||void 0===e||e.resolve()})).catch((e=>{var t;this.logger.error(e),this._activated=!1,null===(t=this._activating)||void 0===t||t.reject(e)}))),this._activating.promise)}get contributes(){return this.packageJSON.contributes}reset(){this._activated=!1,this._activating=void 0}toJSON(){return{id:this.id,extensionId:this.extensionId,name:this.name,displayName:this.localize("displayName"),activated:this.activated,enabled:this.enabled,packageJSON:this.packageJSON,defaultPkgNlsJSON:this.defaultPkgNlsJSON,packageNlsJSON:this.packageNlsJSON,path:this.path,realPath:this.realPath,isUseEnable:this.isUseEnable,extendConfig:this.extendConfig,enableProposedApi:this.enableProposedApi,extraMetadata:this.extraMetadata,isBuiltin:this.isBuiltin,isDevelopment:this.isDevelopment,extensionLocation:this.extensionLocation}}};i.__decorate([(0,r.Autowired)(c.ExtensionMetadataService),i.__metadata("design:type",c.ExtensionMetadataService)],u.prototype,"extMetadataService",void 0),i.__decorate([(0,r.Autowired)(s.ExtensionService),i.__metadata("design:type",s.ExtensionService)],u.prototype,"extensionService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",a.StaticResourceService)],u.prototype,"staticResourceService",void 0),i.__decorate([(0,r.Autowired)(l.AbstractExtInstanceManagementService),i.__metadata("design:type",l.AbstractExtInstanceManagementService)],u.prototype,"extensionInstanceManageService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(d)),i.__param(1,(0,r.Optional)(Symbol())),i.__param(2,(0,r.Optional)(Symbol())),i.__param(3,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object,Boolean,Boolean,Boolean])],u),t.Extension=u},86332:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionServiceImpl=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(45467),c=n(90642),l=n(38097),d=n(9550),u=n(1500),p=n(14238),h=n(57280),m=n(44468),g=n(24453),f=n(73939);let _=i=class extends c.WithEventBus{constructor(){super(...arguments),this.ready=new Map,this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=!1,this.eagerExtensionsActivated=new a.Deferred,this.extensionScanDir=new Set,this.extensionCandidatePath=new Set}async getActivatedExtensions(){const e={};return this.nodeExtensionService.protocol&&(e.node=await this.nodeExtensionService.getActivatedExtensions()),this.workerExtensionService.protocol&&(e.worker=await this.workerExtensionService.getActivatedExtensions()),e}async onActivateExtension(e){await this.activationEventService.fireEvent(e.payload.topic,e.payload.data)}async onExtensionEnabled(e){const t=e.payload;await this.updateExtHostData(),await this.fireActivationEventsIfNeed(t.packageJSON.activationEvents)}async onExtensionUninstalled(){await this.updateExtHostData()}async activate(){await this.initExtensionMetaData(),await this.initExtensionInstanceData(),await this.runExtensionContributes(),this.doActivate();const e=()=>{"visible"===document.visibilityState&&this.isExtProcessWaitingForRestart&&!this.isExtProcessRestarting&&this.extProcessRestartHandler()};document.addEventListener("visibilitychange",e,!1),this.addDispose(a.Disposable.create((()=>{document.removeEventListener("visibilitychange",e)})))}async initExtensionMetaData(){const{extensionDir:e,extensionCandidate:t}=this.appConfig;e&&this.extensionScanDir.add(e),t&&t.forEach((e=>{this.extensionCandidatePath.add(e.path)})),this.extensionMetaDataArr=await this.getExtensionsMetaData(Array.from(this.extensionScanDir),Array.from(this.extensionCandidatePath)),this.logger.verbose("ExtensionMetaDataArr",this.extensionMetaDataArr)}async initExtensionInstanceData(){for(const e of this.extensionMetaDataArr){const t=this.extensionInstanceManageService.checkIsBuiltin(e),n=this.extensionInstanceManageService.checkIsDevelopment(e),i=await this.extensionInstanceManageService.createExtensionInstance(e,t,n);i&&this.extensionInstanceManageService.addExtensionInstance(i)}this.eventBus.fire(new f.ExtensionsInitializedEvent(this.extensionInstanceManageService.getExtensionInstances()));const e=this.extensionInstanceManageService.getExtensionInstances();this.nodeExtensionService.updateExtensionData(e),this.workerExtensionService.updateExtensionData(e),this.viewExtensionService.initExtension(e)}async doActivate(){await this.workspaceService.whenReady,await this.extensionStorageService.whenReady,await this.viewExtensionService.activate(),await this.startExtProcess(!0);try{await this.eventBus.fireAndAwait(new f.ExtensionBeforeActivateEvent),await this.activationEventService.fireEvent("*")}catch(e){this.logger.error(`[Extension Activate Error], \n ${e.message||e}`)}finally{this.eagerExtensionsActivated.resolve(),this.activationEventService.fireEvent("onStartupFinished"),this.eventBus.fire(new f.ExtensionApiReadyEvent)}}async restartExtProcess(){"visible"===document.visibilityState?this.extProcessRestartHandler():this.isExtProcessWaitingForRestart=!0}async extProcessRestartHandler(){if(this.isExtProcessRestarting)return;const e=()=>{this.progressService.withProgress({location:c.ProgressLocation.Notification,title:(0,c.localize)("extension.exthostRestarting.content")},(async()=>{try{await this.startExtProcess(!1)}catch(e){this.logger.error(`[ext-restart]: ext-host restart failure, error: ${e}`)}this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=!1}))};this.isExtProcessRestarting=!0,this.isExtProcessWaitingForRestart?setTimeout(e,1e3):e()}async startExtProcess(e){if(e||(this.resetExtensionInstances(),this.disposeSumiViewExtension(),await this.disposeExtProcess()),await Promise.all([this.startNodeExtHost(e),this.startWorkerExtHost(e)]),!e&&(await this.rerunSumiViewExtensionContributes(),this.activationEventService.activatedEventSet.size)){const e=Array.from(this.activationEventService.activatedEventSet);this.activationEventService.activatedEventSet.clear(),await Promise.all(e.map((e=>{const{topic:t,data:n}=JSON.parse(e);return this.logger.verbose("fireEvent","event.topic",t,"event.data",n),this.activationEventService.fireEvent(t,n)})))}}async startNodeExtHost(e){if(!this.appConfig.noExtHost){const t=await this.nodeExtensionService.activate();this.extensionCommandManager.registerProxyCommandExecutor("node",t.get(g.MainThreadAPIIdentifier.MainThreadCommands)),e&&this.ready.set("node",this.nodeExtensionService.ready)}}async startWorkerExtHost(e){if(this.appConfig.extWorkerHost)try{const t=await this.workerExtensionService.activate();this.extensionCommandManager.registerProxyCommandExecutor("worker",t.get(g.MainThreadAPIIdentifier.MainThreadCommands)),e&&this.ready.set("worker",this.workerExtensionService.ready)}catch(e){this.logger.error(`Worker host activate fail, \n ${e.message}`)}}async updateExtHostData(){const e=this.extensionInstanceManageService.getExtensionInstances();this.appConfig.noExtHost||await this.nodeExtensionService.updateExtensionData(e),this.appConfig.extWorkerHost&&await this.workerExtensionService.updateExtensionData(e)}async fireActivationEventsIfNeed(e){if(!Array.isArray(e)||!e.length)return;const t=["*","onStartupFinished"],n=e.filter((e=>"*"!==e)),i=Array.from(this.activationEventService.activatedEventSet).map((e=>JSON.parse(e))).filter((({topic:e,data:t})=>n.find((n=>n===`${e}:${t}`))));for(const n of t)e.includes(n)&&(this.logger.verbose(`Fire activation event ${n}`),this.activationEventService.fireEvent(n));for(const e of i){const{topic:t,data:n}=e;this.logger.verbose(`Fire activation event ${t}:${n}`),this.activationEventService.fireEvent(t,n)}await this.activateByWorkspaceContains(e)}async activateByWorkspaceContains(e){if(!Array.isArray(e)||!e.length)return;const t=[],n=[];for(const i of e)if(/^workspaceContains:/.test(i)){const e=i.substr("workspaceContains:".length);e.indexOf("*")>=0||e.indexOf("?")>=0?n.push(e):t.push(e)}const i=[];t.length&&i.push(this.workspaceService.containsSome(t)),n.length&&i.push((async()=>{try{return(await this.fileSearchService.find("",{rootUris:this.workspaceService.tryGetRoots().map((e=>e.uri)),includePatterns:n,limit:1})).length>0}catch(e){return this.logger.error(e),!1}})()),i.length&&await Promise.all(i).then((e=>e.some((e=>e))))&&this.activationEventService.fireEvent("workspaceContains",[...t,...n][0])}async getExtensionsMetaData(e,t){if(!this.extensionMetaDataArr){const n=await this.extensionNodeClient.getAllExtensions(e,t,(0,c.getLanguageId)(),i.extraMetadata);this.extensionMetaDataArr=n}return this.extensionMetaDataArr}async runExtensionContributes(){const e=Array.from(this.extensionInstanceManageService.getExtensionInstances()),t=[],n=[];for(const i of e)(0,g.isLanguagePackExtension)(i.packageJSON)?t.push(i):n.push(i);await Promise.all(t.map((e=>e.contributeIfEnabled()))),await Promise.all(n.map((e=>e.contributeIfEnabled()))),Promise.all(e.map((e=>this.activateByWorkspaceContains(e.packageJSON.activationEvents)))).catch((e=>this.logger.error(e))),this.commandRegistry.beforeExecuteCommand((async(e,t)=>(await this.activationEventService.fireEvent("onCommand",e),t))),this.eventBus.fire(new c.ExtensionDidContributes)}whetherWebExtension({packageJSON:e}){const{browser:t,main:n}=e||{},i=Boolean(this.appConfig.noExtHost);if(t&&!n)return!0;if(t&&n)return i;if(!t&&n)return!1;if(void 0!==e.contributes)for(const t of["debuggers","terminal","typescriptServerPlugins"])if(e.contributes.hasOwnProperty(t))return!1;return i}async activeExtension(e){const t=this.whetherWebExtension(e);t&&!this.appConfig.extWorkerHost&&this.logger.error("[extension.service]: has no ext worker host"),await Promise.all([this.nodeExtensionService.activeExtension(e,t),this.workerExtensionService.activeExtension(e,t)]),await this.viewExtensionService.activeExtension(e,this.nodeExtensionService.protocol)}resetExtensionInstances(){this.extensionInstanceManageService.resetExtensionInstances(),this.nodeExtensionService.disposeApiFactory(),this.workerExtensionService.disposeApiFactory()}disposeSumiViewExtension(){const e=Array.from(this.viewExtensionService.activatedViewExtensionMap.keys());this.extensionInstanceManageService.disposeExtensionInstancesByPath(e)}async rerunSumiViewExtensionContributes(){const{activatedViewExtensionMap:e}=this.viewExtensionService,t=Array.from(e.keys());await Promise.all(t.map((e=>{var t;return null===(t=this.extensionInstanceManageService.getExtensionInstanceByPath(e))||void 0===t?void 0:t.contributeIfEnabled()}))),e.clear()}async disposeExtProcess(){await this.nodeExtensionService.disposeProcess(),await this.workerExtensionService.disposeProcess()}async disposeExtensions(){this.extensionInstanceManageService.disposeExtensionInstances()}async executeExtensionCommand(e,t){var n;const i=this.extensionCommandManager.getExtensionCommandEnv(e);if(!i)throw new Error('No Command with id "'+e+'" is declared by extensions');return await(null===(n=this.ready.get(i))||void 0===n?void 0:n.promise),this.extensionCommandManager.executeExtensionCommand(i,e,t)}get invalidReloadStrategy(){return this.corePreferences["application.invalidExthostReload"]}async $restartExtProcess(){await this.restartExtProcess()}async $processNotExist(){const e=(0,c.localize)("extension.invalidExthostReload.confirm.ok"),t=[e],n="ifRequired"===this.invalidReloadStrategy;n&&t.unshift((0,c.localize)("extension.invalidExthostReload.confirm.cancel"));await this.dialogService.info((0,c.localize)("extension.invalidExthostReload.confirm.content"),t,!!n)===e&&this.clientApp.fireOnReload()}async $processCrashRestart(){const e=(0,c.localize)("common.yes"),t=[e],n="ifRequired"===this.invalidReloadStrategy;n&&t.unshift((0,c.localize)("common.no"));await this.messageService.info((0,c.localize)("extension.crashedExthostReload.confirm"),t,!!n)===e&&await this.restartExtProcess()}};_.extraMetadata={[h.LANGUAGE_BUNDLE_FIELD]:"./package.nls.json"},r.__decorate([(0,o.Autowired)(h.ExtensionNodeServiceServerPath),r.__metadata("design:type",Object)],_.prototype,"extensionNodeClient",void 0),r.__decorate([(0,o.Autowired)(a.AppConfig),r.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(a.CommandRegistry),r.__metadata("design:type",Object)],_.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(f.IActivationEventService),r.__metadata("design:type",f.IActivationEventService)],_.prototype,"activationEventService",void 0),r.__decorate([(0,o.Autowired)(p.IWorkspaceService),r.__metadata("design:type",Object)],_.prototype,"workspaceService",void 0),r.__decorate([(0,o.Autowired)(l.IExtensionStorageService),r.__metadata("design:type",Object)],_.prototype,"extensionStorageService",void 0),r.__decorate([(0,o.Autowired)(s.IProgressService),r.__metadata("design:type",Object)],_.prototype,"progressService",void 0),r.__decorate([(0,o.Autowired)(u.IDialogService),r.__metadata("design:type",Object)],_.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(a.IClientApp),r.__metadata("design:type",Object)],_.prototype,"clientApp",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],_.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(u.IMessageService),r.__metadata("design:type",Object)],_.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(a.CorePreferences),r.__metadata("design:type",Object)],_.prototype,"corePreferences",void 0),r.__decorate([(0,o.Autowired)(m.AbstractWorkerExtProcessService),r.__metadata("design:type",m.AbstractWorkerExtProcessService)],_.prototype,"workerExtensionService",void 0),r.__decorate([(0,o.Autowired)(m.AbstractNodeExtProcessService),r.__metadata("design:type",m.AbstractNodeExtProcessService)],_.prototype,"nodeExtensionService",void 0),r.__decorate([(0,o.Autowired)(m.AbstractViewExtProcessService),r.__metadata("design:type",m.AbstractViewExtProcessService)],_.prototype,"viewExtensionService",void 0),r.__decorate([(0,o.Autowired)(h.IExtCommandManagement),r.__metadata("design:type",h.IExtCommandManagement)],_.prototype,"extensionCommandManager",void 0),r.__decorate([(0,o.Autowired)(f.AbstractExtInstanceManagementService),r.__metadata("design:type",f.AbstractExtInstanceManagementService)],_.prototype,"extensionInstanceManageService",void 0),r.__decorate([(0,o.Autowired)(d.FileSearchServicePath),r.__metadata("design:type",Object)],_.prototype,"fileSearchService",void 0),r.__decorate([(0,c.OnEvent)(a.ExtensionActivateEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[a.ExtensionActivateEvent]),r.__metadata("design:returntype",Promise)],_.prototype,"onActivateExtension",null),r.__decorate([(0,c.OnEvent)(f.ExtensionDidEnabledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[f.ExtensionDidEnabledEvent]),r.__metadata("design:returntype",Promise)],_.prototype,"onExtensionEnabled",null),r.__decorate([(0,c.OnEvent)(f.ExtensionDidUninstalledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Promise)],_.prototype,"onExtensionUninstalled",null),_=i=r.__decorate([(0,o.Injectable)()],_),t.ExtensionServiceImpl=_},90175:(e,t,n)=>{"use strict";Object.defineProperty(t,"X",{value:!0}),t.c=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(35392),s=n(63249),c=n(9550),l=n(57280),d=n(44468),u=n(20385),p=n(35765),h=n(25221),m=n(89555),g=n(5100),f=n(62008),_=n(57267),b=n(65557),y=n(86332),v=n(2349),C=n(73939),S=n(14074);let w=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[l.RequireInterceptorContribution],this.providers=[{token:l.ExtensionService,useClass:y.ExtensionServiceImpl},{token:a.IDebugServer,useClass:S.ExtensionDebugService,override:!0},{token:s.DebugSessionContributionRegistry,useClass:S.ExtensionDebugSessionContributionRegistry,override:!0},{token:C.IActivationEventService,useClass:u.ActivationEventServiceImpl},{token:l.IExtCommandManagement,useClass:p.ExtCommandManagementImpl},{token:C.AbstractExtInstanceManagementService,useClass:h.ExtInstanceManagementService},{token:l.AbstractExtensionManagementService,useClass:m.ExtensionManagementService},{token:d.AbstractNodeExtProcessService,useClass:g.NodeExtProcessService},{token:d.AbstractWorkerExtProcessService,useClass:_.WorkerExtProcessService},{token:d.AbstractViewExtProcessService,useClass:f.ViewExtProcessService},{token:l.IRequireInterceptorService,useClass:l.RequireInterceptorService},b.ExtensionCommandContribution,b.ExtensionClientAppContribution,v.BrowserRequireInterceptorContribution],this.backServices=[{servicePath:l.ExtensionNodeServiceServerPath,clientToken:l.ExtensionService},{servicePath:c.FileSearchServicePath},{servicePath:l.ExtensionHostProfilerServicePath}]}};w=i.__decorate([(0,r.Injectable)()],w),t.c=w},38196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkerBootstrapUrl=void 0,t.getWorkerBootstrapUrl=function(e,t,n){if(n)return e;if(/^(http:)|(https:)|(file:)/.test(e)){const n=String(window.location),i=n.substr(0,n.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(e.substring(0,i.length)!==i){const n=new Blob([`/*${t}*/importScripts('${e}');/*${t}*/`],{type:"application/javascript"});return URL.createObjectURL(n)}}return e}},14128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionMetadataService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(56075),s=n(73939),c=n(95308);let l=class extends o.Disposable{async run(e){try{const t=this.injector.get(c.VSCodeContributeRunner,[e]),n=this.injector.get(a.SumiContributesRunner,[e]);this.addDispose(t),this.addDispose(n),this.eventBus.fire(new o.ExtensionEnabledEvent(e.toJSON())),await Promise.all([t.run(),n.run()]),this.addDispose(this.registerActivationEvent(e))}catch(t){this.logger.error("鍚敤鎻掍欢鏃惰В鏋愬厓鏁版嵁鍑洪敊"+e.name),this.logger.error(t)}}registerActivationEvent(e){const{activationEvents:t=[]}=e.packageJSON,n=new o.Disposable;return t.forEach((t=>{"onUri"===t&&(t=`onUri:${e.id}`),n.addDispose(this.activationService.onEvent(t,(async()=>{await e.activate()})))})),n}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],l.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",s.IActivationEventService)],l.prototype,"activationService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],l.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0})],l),t.ExtensionMetadataService=l},63526:(e,t)=>{"use strict";function n(){}function i(e,t){return"function"==typeof e[t]&&/^[a-z]/.test(t)?e[t].bind&&e[t].bind(e):e[t]}function r(e){return new Proxy(document,{get:(t,r)=>{switch(r){case"write":case"writeln":return n;case"querySelector":return n=>"head"===n?e:i(t,r)(n);default:return i(t,r)}}})}Object.defineProperty(t,"__esModule",{value:!0}),t.createProxiedWindow=t.createProxiedDocument=void 0,t.createProxiedDocument=r,t.createProxiedWindow=function(e,t){return new Proxy(window,{get:(n,o)=>"document"===o?e||r(t):i(n,o)})}},2349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRequireInterceptorContribution=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=i.__importDefault(n(5868)),a=n(894),s=n(92787),c=n(32735);let l=class{registerRequireInterceptor(e){e.registerRequireInterceptor({moduleName:"React",load:()=>r.default}),e.registerRequireInterceptor({moduleName:"ReactDOM",load:()=>o.default}),e.registerRequireInterceptor({moduleName:"kaitian-browser",load:e=>(0,c.createBrowserApi)(e.injector,e.extension,e.rpcProtocol)})}};l=i.__decorate([(0,a.Domain)(s.RequireInterceptorContribution)],l),t.BrowserRequireInterceptorContribution=l},9481:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retargetEvents=void 0;const n=["onAbort","onAnimationCancel","onAnimationEnd","onAnimationIteration","onAuxClick","onBlur","onChange","onClick","onClose","onContextMenu","onDoubleClick","onError","onFocus","onGotPointerCapture","onInput","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadEnd","onLoadStart","onLostPointerCapture","onMouseDown","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onReset","onResize","onScroll","onSelect","onSelectionChange","onSelectStart","onSubmit","onTouchCancel","onTouchMove","onTouchStart","onTouchEnd","onTransitionCancel","onTransitionEnd","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onFocusOut"],i={onDoubleClick:"dblclick"},r={onInput:"onChange",onFocusOut:"onBlur",onSelectionChange:"onSelect"};function o(e){return a(e,"__reactEventHandlers")}function a(e,t){for(const n in e)if(e.hasOwnProperty(n)&&-1!==n.indexOf(t))return e[n]}function s(e){if(e)return e.memoizedProps?e.memoizedProps:e._currentElement&&e._currentElement.props?e._currentElement.props:void 0}function c(e,t,n){e.persist=()=>{e.isPersistent=()=>!0},n[t]&&n[t](e)}t.retargetEvents=function(e){const t=[];return n.forEach((n=>{const l=function(e){if(i[e])return i[e];return e.replace(/^on/,"").toLowerCase()}(n);function d(t){t.nativeEvent=t;const i=t.path||t.composedPath&&t.composedPath()||function(e){const t=[];for(;e;){if(t.push(e),"HTML"===e.tagName)return t.push(document),t.push(window),t;e=e.parentElement}}(t.target);for(const l of i){let i=null;const d=a(l,"_reactInternal"),u=o(l);if(i=u||s(d),d&&i&&c(t,n,i),d&&i&&r[n]&&c(t,r[n],i),t.cancelBubble)break;if(l===e)break}}e.addEventListener(l,d,!1),t.push((()=>{e.removeEventListener(l,d,!1)}))})),()=>{t.forEach((e=>{e()}))}}},85729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRoot=void 0;const i=n(70655),r=i.__importDefault(n(94184)),o=i.__importStar(n(616)),a=n(616),s=i.__importDefault(n(5868)),c=n(25880),l=n(894),d=n(90642),u=n(52292),p=n(44468),h=n(46742),m=({root:e,children:t})=>s.default.createPortal(t,e);const g={alipay:"https://gw.alipayobjects.com/os/lib",unpkg:"https://unpkg.com/browse",jsdelivr:"https://cdn.jsdelivr.net/npm"};const f="@opensumi/ide-components";function _(e,t,n="alipay"){const i=document.createElement("link");let r="";return r="alipay"===n?`${g.alipay}/${f.slice(1)}/${t}/${e}`:`${g[n]}/${f}@${t}/${e}`,i.setAttribute("href",r),i.setAttribute("rel","stylesheet"),i}const b=({id:e,extensionId:t,children:n,proxiedHead:i,cdnType:s})=>{const c=(0,a.useRef)(null),[d,g]=o.default.useState(null),f=(0,l.useInjectable)(p.AbstractViewExtProcessService),b=(0,l.useInjectable)(u.IThemeService),y=(0,l.useInjectable)(u.IIconService),[v,C]=(0,a.useState)(null);return(0,a.useEffect)((()=>{var e;const n=new l.DisposableCollection;if(c.current){const r=c.current.attachShadow({mode:"open"});if(i){i.appendChild(_("dist/index.css",h.version,s)),i.appendChild(_("lib/icon/iconfont/iconfont.css",h.version,s));const o=i.cloneNode(!0);n.push(function(e,t){const n=new MutationObserver((e=>{for(const n of e)if("childList"===n.type){if(n.addedNodes.length>0)for(const e of Array.from(n.addedNodes))t.appendChild(e.cloneNode(!0));if(n.removedNodes.length>0)for(const e of Array.from(n.removedNodes))t.contains(e)&&t.removeChild(e)}}));return n.observe(e,{childList:!0,subtree:!0}),{dispose:()=>{n.disconnect()}}}(i,o));const a=document.createElement("style");a.id="icon-style",a.innerHTML=null===(e=y.currentTheme)||void 0===e?void 0:e.styleSheetContent,o.appendChild(a),n.push(y.onThemeChange((e=>{a.innerHTML=e.styleSheetContent}))),r.appendChild(o);const c=f.getPortalShadowRoot(t);c&&c.appendChild(i)}return d||g(r),b.getCurrentTheme().then((e=>C(e.type))),n.push(b.onThemeChange((e=>{e.type&&e.type!==v&&C(e.type)}))),n.dispose.bind(n)}}),[]),o.default.createElement("div",{id:e,style:{width:"100%",height:"100%"},ref:c},d&&o.default.createElement(m,{root:d},o.default.createElement("div",{className:(0,r.default)((0,u.getThemeTypeSelector)(v),"shadow-context-wrapper","show-file-icons"),style:{width:"100%",height:"100%"}},n)))};t.getShadowRoot=function(e,t,n,i,r,a){const s=e,{getIcon:u}=o.default.useContext(c.IconContext),p=(0,l.useInjectable)(l.LabelService),h=(0,o.useCallback)(((e,t)=>p.getIcon(d.URI.parse(e),t)),[]);return o.default.createElement(c.ComponentContextProvider,{value:{getIcon:u,localize:d.localize,getResourceIcon:h}},o.default.createElement(b,{id:`${t.id}-${i}`,extensionId:t.id,proxiedHead:r,cdnType:a},o.default.createElement(s,Object.assign({},n))))}},60654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserCommandsApiFactory=t.KaitianBrowserCommand=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(90642)),a=n(65135),s=n(24453);let c=class{constructor(e){this.rpcProtocol=e,this.rpcProtocol&&(this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostCommands))}async executeCommand(e,t,...n){const i={id:t.id,extensionId:t.extensionId,isBuiltin:t.isBuiltin},r=this.commandRegistry.getCommand(e);if(this.proxy&&r)return this.proxy.$executeCommandWithExtensionInfo(e,i,...n);if(!this.commandRegistry.isPermittedCommand(e,i,...n))throw new Error(`Extension ${i.id} has not permit to execute ${e}`);try{return await this.monacoCommandService.executeCommand(e,...n)}catch(e){throw this.logger.error(e),e}}};i.__decorate([(0,r.Autowired)(a.ICommandServiceToken),i.__metadata("design:type",Object)],c.prototype,"monacoCommandService",void 0),i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],c.prototype,"commandRegistry",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),c=i.__decorate([(0,r.Injectable)(),i.__param(0,(0,r.Optional)()),i.__metadata("design:paramtypes",[Object])],c),t.KaitianBrowserCommand=c,t.createBrowserCommandsApiFactory=function(e,t,n){const i=e.get(c,[n]);return{executeCommand:(e,...n)=>i.executeCommand(e,t,...n)}}},35701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserComponents=void 0;const i=n(70655),r=i.__importDefault(n(616)),o=n(894),a=i.__importStar(n(52e3)),s=n(99426);t.createBrowserComponents=function(e,t){return e.get(o.AppConfig).useExperimentalShadowDom?new Proxy(a,{get(e,n){if("Dialog"===n||"Overlay"===n){const e=a[n];return n=>r.default.createElement(s.PortalRoot,{otherProps:n,extensionId:t.id,original:e})}return e[n]}}):a}},36441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBrowserContributionRunner=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92345),s=n(70888),c=n(92674),l=n(52292),d=n(15087);let u=class extends d.AbstractSumiBrowserContributionRunner{run(e){const t=new o.Disposable;return this.contribution.editor&&this.contribution.editor.view.forEach((n=>{t.addDispose(this.registerEditorComponent(n,e))})),t}registerEditorComponent(e,t){const n=new o.Disposable,{extendProtocol:i,extendService:r}=t.getExtensionExtendService(this.extension,e.id),a=e.scheme||o.Schemes.file;return n.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:e.id,scheme:a,component:e.component,renderMode:e.renderMode},{kaitianExtendService:r,kaitianExtendSet:i,sumiExtendService:r,sumiExtendSet:i})),a===o.Schemes.file?n.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(a,((t,n)=>{let i=!1;if(e.fileExt&&e.fileExt.indexOf(t.uri.path.ext)>-1){if(!e.shouldPreview)return;e.shouldPreview(t.uri.path)&&(i=!0)}e.handles&&e.handles(t.uri.codeUri)&&(i=!0),i&&n.push({type:"component",componentId:e.id,title:e.title||"棰勮",weight:e.priority||10})}))):n.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(a,((t,n)=>{e.handles&&!e.handles(t.uri.codeUri)||n.push({type:"component",componentId:e.id,title:e.title||e.id,weight:e.priority||10})}))),this.resourceService.registerResourceProvider({scheme:a,provideResource:t=>({uri:t,name:e.tabTitle||e.id,icon:e.tabIconPath?this.iconService.fromIcon(this.extension.path,e.tabIconPath,l.IconType.Background):""})}),n}};i.__decorate([(0,r.Autowired)(c.IMainLayoutService),i.__metadata("design:type",Object)],u.prototype,"layoutService",void 0),i.__decorate([(0,r.Autowired)(a.ResourceService),i.__metadata("design:type",a.ResourceService)],u.prototype,"resourceService",void 0),i.__decorate([(0,r.Autowired)(s.EditorComponentRegistry),i.__metadata("design:type",s.EditorComponentRegistry)],u.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,r.Autowired)(l.IIconService),i.__metadata("design:type",Object)],u.prototype,"iconService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0})],u),t.EditorBrowserContributionRunner=u},42259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSideBrowserContributionRunner=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92345),s=n(70888),c=n(97276),l=n(15087);let d=class extends l.AbstractSumiBrowserContributionRunner{run(e){const t=new o.Disposable,n=this.contribution.editorSide;return n&&n.view.forEach((n=>{t.addDispose(this.registerEditorSideComponent(n,e))})),t}registerEditorSideComponent(e,t){const n=new o.Disposable,{extendProtocol:i,extendService:r}=t.getExtensionExtendService(this.extension,e.id);return n.addDispose(this.editorComponentRegistry.registerEditorSideWidget({id:e.id,side:e.side,component:e.component,initialProps:{kaitianExtendService:r,kaitianExtendSet:i,sumiExtendService:r,sumiExtendSet:i},displaysOnResource:()=>this.editorService.editorContextKeyService.match(null==e?void 0:e.when)})),n}};i.__decorate([(0,r.Autowired)(s.EditorComponentRegistry),i.__metadata("design:type",s.EditorComponentRegistry)],d.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),i.__metadata("design:type",c.WorkbenchEditorServiceImpl)],d.prototype,"editorService",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0})],d),t.EditorSideBrowserContributionRunner=d},86911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiBrowserContributionRunner=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(15087),s=n(36441),c=n(42259),l=n(40657),d=n(26387);let u=class extends a.AbstractSumiBrowserContributionRunner{run(e){const t=new o.Disposable;return t.addDispose(this.injector.get(l.TabbarBrowserContributionRunner,[this.extension,this.contribution]).run(e)),t.addDispose(this.injector.get(s.EditorBrowserContributionRunner,[this.extension,this.contribution]).run(e)),t.addDispose(this.injector.get(c.EditorSideBrowserContributionRunner,[this.extension,this.contribution]).run(e)),t.addDispose(this.injector.get(d.ToolBarBrowserContributionRunner,[this.extension,this.contribution]).run(e)),t}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0})],u),t.SumiBrowserContributionRunner=u},40657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarBrowserContributionRunner=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(92674),c=n(52292),l=n(15087),d=["left","right","bottom","editor","toolBar"];let u=class extends l.AbstractSumiBrowserContributionRunner{run(e){const t=new a.Disposable;return this.contribution.left&&this.contribution.left.view.forEach((n=>{var i;t.addDispose(this.registerTabBar(n,e,null===(i=this.contribution.left)||void 0===i?void 0:i.type,"left"))})),this.contribution.right&&this.contribution.right.view.forEach((n=>{var i;t.addDispose(this.registerTabBar(n,e,null===(i=this.contribution.right)||void 0===i?void 0:i.type,"right"))})),this.contribution.bottom&&this.contribution.bottom.view.forEach((n=>{var i;t.addDispose(this.registerTabBar(n,e,null===(i=this.contribution.bottom)||void 0===i?void 0:i.type,"bottom"))})),Object.keys(this.contribution).forEach((n=>{var i;-1===d.indexOf(n)&&(null===(i=this.contribution[n])||void 0===i?void 0:i.view).forEach((n=>{t.addDispose(this.registerTabBar(n,e,"replace"))}))})),t}registerTabBar(e,t,n="add",i){const{extendProtocol:r,extendService:a}=t.getExtensionExtendService(this.extension,e.id),s=`${this.extension.id}:${e.id}`,c={kaitianExtendService:a,kaitianExtendSet:r,sumiExtendService:a,sumiExtendSet:r};return this.layoutService.viewReady.promise.then((()=>{var t;if("add"===n){const{component:t,titleComponent:n}=e;this.layoutService.collectTabbarComponent([{id:s}],Object.assign(Object.assign({},e),{iconClass:e.icon?(0,o.getIcon)(e.icon):e.iconPath?this.iconService.fromIcon(this.extension.path,e.iconPath):"",containerId:s,component:t,titleComponent:n,titleProps:c,initialProps:c,fromExtension:!0}),i)}else this.layoutService.replaceViewComponent(e,c),e.titleComponent&&(null===(t=this.layoutService.getTabbarHandler(s))||void 0===t||t.setTitleComponent(e.titleComponent,c))})),{dispose:()=>{const e=this.layoutService.getTabbarHandler(s);e&&e.dispose()}}}};i.__decorate([(0,r.Autowired)(s.IMainLayoutService),i.__metadata("design:type",Object)],u.prototype,"layoutService",void 0),i.__decorate([(0,r.Autowired)(c.IIconService),i.__metadata("design:type",Object)],u.prototype,"iconService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0})],u),t.TabbarBrowserContributionRunner=u},26387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolBarBrowserContributionRunner=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92674),s=n(52292),c=n(34734),l=n(15087);let d=class extends l.AbstractSumiBrowserContributionRunner{run(e){const t=new o.Disposable;return this.injector.creatorMap.has(c.IToolBarViewService)?(this.contribution.toolBar&&this.contribution.toolBar.view.forEach((n=>{const{extendProtocol:i,extendService:r}=e.getExtensionExtendService(this.extension,n.id),o=this.toolBarViewService.registerToolBarElement({type:"component",component:n.component,position:n.position||this.contribution.toolBar.position||c.ToolBarPosition.LEFT,initialProps:{kaitianExtendService:r,kaitianExtendSet:i,sumiExtendService:r,sumiExtendSet:i},description:n.description,order:n.order,weight:n.weight});o&&t.addDispose(o)})),t):(this.logger.warn("娌℃湁鎵惧埌 toolbarViewService"),t)}};i.__decorate([(0,r.Autowired)(a.IMainLayoutService),i.__metadata("design:type",Object)],d.prototype,"layoutService",void 0),i.__decorate([(0,r.Autowired)(c.IToolBarViewService),i.__metadata("design:type",c.IToolBarViewService)],d.prototype,"toolBarViewService",void 0),i.__decorate([(0,r.Autowired)(s.IIconService),i.__metadata("design:type",Object)],d.prototype,"iconService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],d.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0})],d),t.ToolBarBrowserContributionRunner=d},32735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserApi=void 0;const i=n(894),r=n(52e3),o=n(70888),a=n(81682),s=n(52292),c=n(50187),l=n(67851),d=n(60654),u=n(35701),{format:p}=i.strings;t.createBrowserApi=function(e,t,n){const h=(0,d.createBrowserCommandsApiFactory)(e,t,n),m=(0,u.createBrowserComponents)(e,t),g=e.get(i.IReporterService);return Object.assign(Object.assign({},m),{commands:h,Scroll:a.Scroll,ResizeHandleHorizontal:r.ResizeHandleHorizontal,ResizeHandleVertical:r.ResizeHandleVertical,PlainWebview:l.PlainWebview,URI:i.URI,localize:(e,n)=>(0,i.localize)(e,n,t.id),formatLocalize:(e,...n)=>p((0,i.localize)(e,void 0,t.id),...n),getIcon:i.getIcon,getThemeColors:()=>{const t=e.get(s.IThemeService).getCurrentThemeSync();return(0,s.getColorRegistry)().getColors().reduce(((e,n)=>{const i=t.getColor(n.id);return i&&(e[n.id.replace(".","-")]=i.toString()),e}),{})},ToolBarPosition:c.ToolBarPosition,EditorComponentRenderMode:o.EditorComponentRenderMode,reporter:g})}},15087:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSumiBrowserContributionRunner=void 0;t.AbstractSumiBrowserContributionRunner=class{constructor(e,t){this.extension=e,this.contribution=t}}},56614:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMainContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){}};s.schema={type:"string",defaultSnippets:[{body:"./out/browser/index.js"}],description:(0,o.localize)("sumiContributes.browserMain")},s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("browserMain")],s),t.BrowserMainContributionPoint=s},93398:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserViewContributionPoint=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(52148),c=n(90642),l=n(92674),d=n(52292),u=n(57280),p=n(23591),h=["left","right","bottom","editor","toolBar","editorSide"];let m=i=class extends u.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new c.DisposableCollection}contribute(){this.mainLayoutService.viewReady.promise.then((()=>{var e;const t=Object.keys(this.json).filter((e=>!i.unsupportLocation.includes(e)));for(let n of t){const t=this.json[n].view.map((e=>Object.assign(Object.assign({},e),{component:p.ExtensionLoadingView})));if(!h.includes(n)){if(this.mainLayoutService.getTabbarHandler(n)){for(const i of t){i.titleComponentId&&(0,c.getDebugLogger)().warn(`custom title component '${i.titleComponentId}' is not allowed for built-in container ${n}!`);const{title:t,id:r,priority:o,component:a,when:s,weight:l}=i,d=(null===(e=this.mainLayoutService.getTabbarHandler(n))||void 0===e?void 0:e.containerId)||n,u=this.mainLayoutService.collectViewComponent({id:r,priority:o,component:a,name:t,when:s,weight:l},d,{},{fromExtension:!0});this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(u).disposeView(r)}})}return}n="left"}for(const e of t){const{title:t,icon:i,iconPath:r,id:o,priority:s,component:c,expanded:l,noResize:d,when:u,weight:p,hideTab:h}=e,m=`${this.extension.id}:${o}`,g=this.mainLayoutService.collectTabbarComponent([{id:o,priority:s,component:c,when:u,weight:p}],{iconClass:r?this.iconService.fromIcon(this.extension.path,r):(0,a.getIcon)(i),title:t&&this.getLocalizeFromNlsJSON(t),priority:s,expanded:l,containerId:m,noResize:d,fromExtension:!0,hideTab:h},n);this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(g).dispose()}})}}}))}};m.schema=s.browserViews.schema,m.unsupportLocation=["bottom","editor","toolBar"],r.__decorate([(0,o.Autowired)(l.IMainLayoutService),r.__metadata("design:type",Object)],m.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(d.IIconService),r.__metadata("design:type",Object)],m.prototype,"iconService",void 0),m=i=r.__decorate([(0,o.Injectable)(),(0,u.Contributes)("browserViews")],m),t.BrowserViewContributionPoint=m},56075:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SumiContributesRunner=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(57280),c=n(73939),l=n(56614),d=n(93398),u=n(8853),p=n(28811),h=n(43015),m=n(41631),g=n(45878),f=n(45919),_=n(3152),b=Symbol();let y=i=class extends a.WithEventBus{constructor(e){super(),this.extension=e}async run(){var e;const t=this.extension.packageJSON.kaitianContributes;if(!t)return;const n=await this.eventBus.fireAndAwait(new c.ExtensionWillContributeEvent(this.extension));if(!(n.length>0&&(null===(e=n[0])||void 0===e?void 0:e.result))){for(const e of i.ContributePoints){const n=Reflect.getMetadata(s.CONTRIBUTE_NAME_KEY,e);if(void 0!==t[n])try{const i=this.injector.get(e,[t[n],t,this.extension,this.extension.packageNlsJSON,this.extension.defaultPkgNlsJSON]);e.schema&&(a.OpensumiExtensionPackageSchema.properties.kaitianContributes.properties[n]=e.schema),this.addDispose(i),await i.contribute()}catch(e){this.logger.error(e)}}this.schemaRegistry.registerSchema(a.EXTENSION_JSON_URI,a.OpensumiExtensionPackageSchema,["package.json"])}}};y.ContributePoints=[d.BrowserViewContributionPoint,l.BrowserMainContributionPoint,h.NodeMainContributionPoint,_.WorkerMainContributionPoint,f.ViewsProxiesContributionPoint,p.MenubarsContributionPoint,m.SubmenusContributionPoint,g.ToolbarContributionPoint,u.MenuExtendContributionPoint],r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(a.IJSONSchemaRegistry),r.__metadata("design:type",Object)],y.prototype,"schemaRegistry",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],y.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(a.IEventBus),r.__metadata("design:type",Object)],y.prototype,"eventBus",void 0),y=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)(b)),r.__metadata("design:paramtypes",[Object])],y),t.SumiContributesRunner=y},8853:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuExtendContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(57061),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){for(const e of Object.keys(this.json)){const t=this.json[e];this.addDispose(this.menuRegistry.registerMenuExtendInfo(e,t.map(this.handleExtendInfo.bind(this))))}}handleExtendInfo(e){var t;return Object.assign(Object.assign({},e),{extraDesc:this.getLocalizeFromNlsJSON(null!==(t=null==e?void 0:e.extraDesc)&&void 0!==t?t:"")})}};i.__decorate([(0,r.Autowired)(o.IMenuRegistry),i.__metadata("design:type",o.IMenuRegistry)],s.prototype,"menuRegistry",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("menu-extend")],s),t.MenuExtendContributionPoint=s},28811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenubarsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(57061),a=n(90642),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){for(const e of this.json)this.addDispose(this.menuRegistry.registerMenubarItem(e.id,{label:this.getLocalizeFromNlsJSON(e.title),order:e.order,nativeRole:e.nativeRole}))}};c.schema={description:(0,a.localize)("sumiContributes.menubars"),type:"array",items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"${1}",title:"${2}"}}],properties:{id:{type:"string",description:(0,a.localize)("sumiContributes.menubars.id")},title:{type:"string",description:(0,a.localize)("sumiContributes.menubars.title")},order:{type:"number",description:(0,a.localize)("sumiContributes.menubars.order")},nativeRole:{type:"string",description:(0,a.localize)("sumiContributes.menubars.order")}}}},i.__decorate([(0,r.Autowired)(o.IMenuRegistry),i.__metadata("design:type",o.IMenuRegistry)],c.prototype,"menuRegistry",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("menubars")],c),t.MenubarsContributionPoint=c},43015:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMainContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){}};s.schema={type:"string",defaultSnippets:[{body:"./out/node/index.js"}],description:(0,o.localize)("sumiContributes.nodeMain")},s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("nodeMain")],s),t.NodeMainContributionPoint=s},41631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenusContributionPoint=t.isValidSubmenu=void 0;const i=n(70655),r=n(39993),o=n(75059),a=n(57061),s=n(90642),c=n(52292),l=n(57280),d=n(22456);function u(e,t){if(!Array.isArray(e))return t.error((0,s.formatLocalize)("requirearray")),!1;for(const n of e){if("string"!=typeof n.id)return t.error((0,s.formatLocalize)("requirestring","id")),!1;if(n.title&&"string"!=typeof n.title)return t.error((0,s.formatLocalize)("optstring","title")),!1;if(n.when&&"string"!=typeof n.when)return t.error((0,s.formatLocalize)("optstring","when")),!1;if(n.group&&"string"!=typeof n.group)return t.error((0,s.formatLocalize)("optstring","group")),!1}return!0}t.isValidSubmenu=u;let p=class extends l.VSCodeContributePoint{contribute(){const e=console;for(const t of Object.keys(this.json)){const n=this.json[t];if(!u(n,console))return;const i=(0,d.parseMenuId)(t);if((0,s.isUndefined)(i))return void e.warn((0,s.formatLocalize)("menuId.invalid","`{0}` is not a valid submenu identifier",t));for(const e of n){const[t,n]=(0,d.parseMenuGroup)(e.group);this.addDispose(this.menuRegistry.registerMenuItem(i,{submenu:e.id,label:e.title&&this.getLocalizeFromNlsJSON(e.title),iconClass:this.iconService.fromIcon(this.extension.path,e.icon,c.IconType.Background),when:e.when,group:t,order:n,nativeRole:e.nativeRole}))}}}};p.schema=o.menus.subMenusSchema,i.__decorate([(0,r.Autowired)(a.IMenuRegistry),i.__metadata("design:type",a.IMenuRegistry)],p.prototype,"menuRegistry",void 0),i.__decorate([(0,r.Autowired)(c.IIconService),i.__metadata("design:type",Object)],p.prototype,"iconService",void 0),p=i.__decorate([(0,r.Injectable)(),(0,l.Contributes)("submenus")],p),t.SubmenusContributionPoint=p},45878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(5536),s=n(57280),c=n(88459);let l=class extends s.VSCodeContributePoint{toLocalized(e,t){return t.reduce(((e,t)=>(e[t]&&(e[t]=this.getLocalizeFromNlsJSON(e[t])),e)),e)}contribute(){if(this.json.groups)for(const e of this.json.groups)this.addDispose(this.toolbarRegistry.registerToolbarActionGroup({id:e.id,preferredLocation:e.preferredLocation,weight:e.weight}));if(this.json.actions)for(const e of this.json.actions)"button"===e.type?this.addDispose(this.kaitianExtToolbarService.registerToolbarButton(this.extension.id,this.extension.path,this.toLocalized(e,["title"]))):"select"===e.type&&this.addDispose(this.kaitianExtToolbarService.registerToolbarSelect(this.extension.id,this.extension.path,this.toLocalized(e,["description"])))}};l.schema=a.toolbar.schema,i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",c.KaitianExtensionToolbarService)],l.prototype,"kaitianExtToolbarService",void 0),i.__decorate([(0,r.Autowired)(o.IToolbarRegistry),i.__metadata("design:type",Object)],l.prototype,"toolbarRegistry",void 0),l=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("toolbar")],l),t.ToolbarContributionPoint=l},45919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsProxiesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){}};s.schema={type:"array",markdownDescription:(0,o.localize)("sumiContributes.viewsProxies"),defaultSnippets:[{body:["${1}"]}],items:{type:"string"}},s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("viewsProxies")],s),t.ViewsProxiesContributionPoint=s},3152:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMainContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){}};s.schema={type:"string",defaultSnippets:[{body:"./out/worker/index.js"}],description:(0,o.localize)("sumiContributes.workerMain")},s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("workerMain")],s),t.WorkerMainContributionPoint=s},50033:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSumiApiFactory=void 0;const i=n(90642),r=n(89338),o=n(18796),a=n(24061),s=n(71538),c=n(44130),l=n(88459),d=n(1218);t.createSumiApiFactory=function(e,t){const n=new i.Disposable,u=t.get(s.MainThreadLifeCycle,[t]),p=t.get(c.MainThreadTheme,[e,t]);n.addDispose(p);const h=t.get(a.MainThreadLayout,[e]);n.addDispose(h);const m=t.get(o.MainThreadCommon,[e,t]);n.addDispose(m);const g=t.get(l.MainThreadToolbar);n.addDispose(g);const f=t.get(d.MainThreadIDEWindow,[e]);return n.addDispose(f),e.set(r.MainThreadSumiAPIIdentifier.MainThreadLifecycle,u),e.set(r.MainThreadSumiAPIIdentifier.MainThreadTheme,p),e.set(r.MainThreadSumiAPIIdentifier.MainThreadLayout,h),e.set(r.MainThreadSumiAPIIdentifier.MainThreadCommon,m),e.set(r.MainThreadSumiAPIIdentifier.MainThreadToolbar,g),e.set(r.MainThreadSumiAPIIdentifier.MainThreadIDEWindow,f),()=>{n.dispose()}}},18796:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommon=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(90642),s=n(89338),c=n(73939);let l=class extends o.WithEventBus{constructor(e,t){super(),this.rpcProtocol=e,this.injector=t,this.subscribedEvent=new Set,this._proxy=this.rpcProtocol.getProxy(s.ExtHostSumiAPIIdentifier.ExtHostCommon)}onExtHostEvent(e){if(this.subscribedEvent.has(e.payload.eventName))return this._proxy.$acceptEvent(e.payload.eventName,e.payload.eventArgs)}async $subscribeEvent(e){this.subscribedEvent.add(e),this.addDispose(a.Disposable.create((()=>{this.$unSubscribeEvent(e)})))}async $unSubscribeEvent(e){this.subscribedEvent.delete(e)}};i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],l.prototype,"themeService",void 0),i.__decorate([(0,o.OnEvent)(c.ExtHostEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[c.ExtHostEvent]),i.__metadata("design:returntype",void 0)],l.prototype,"onExtHostEvent",null),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,r.Injector])],l),t.MainThreadCommon=l},24061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLayout=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(92674),s=n(52292),c=n(89338);let l=class extends o.Disposable{constructor(e){super(),this.handlerMap=new Map,this.proxy=e.getProxy(c.ExtHostSumiAPIIdentifier.ExtHostLayout)}$setTitle(e,t){this.getHandler(e).updateTitle(t)}$setIcon(e,t){const n=this.iconService.fromIcon("",t,s.IconType.Background,s.IconShape.Square);this.getHandler(e).setIconClass(n)}$setSize(e,t){this.getHandler(e).setSize(t)}$activate(e){this.getHandler(e).activate()}$deactivate(e){this.getHandler(e).deactivate()}$setBadge(e,t){this.getHandler(e).setBadge(t)}async $setVisible(e,t){t?this.getHandler(e).show():(this.getHandler(e).isActivated()&&this.getHandler(e).deactivate(),this.getHandler(e).hide())}async $connectTabbar(e){if(!this.handlerMap.has(e)){const t=this.layoutService.getTabbarHandler(e);if(t)this.bindHandleEvents(t);else{const t=this.eventBus.on(a.TabBarRegistrationEvent,(n=>{if(n.payload.tabBarId===e){const n=this.layoutService.getTabbarHandler(e);this.bindHandleEvents(n),t.dispose()}}));this.addDispose(t)}}}async $isAttached(e){return!!this.layoutService.getTabbarHandler(e)}bindHandleEvents(e){this.handlerMap.set(e.containerId,e),e.onActivate((()=>{this.proxy.$acceptMessage(e.containerId,"activate")})),e.onInActivate((()=>{this.proxy.$acceptMessage(e.containerId,"deactivate")}))}getHandler(e){const t=this.layoutService.getTabbarHandler(e);return t||this.logger.warn(`MainThreaLayout:娌℃湁鎵惧埌${e}瀵瑰簲鐨刪andler`),t}};i.__decorate([(0,r.Autowired)(a.IMainLayoutService),i.__metadata("design:type",Object)],l.prototype,"layoutService",void 0),i.__decorate([(0,r.Autowired)(s.IIconService),i.__metadata("design:type",Object)],l.prototype,"iconService",void 0),i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],l.prototype,"logger",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],l),t.MainThreadLayout=l},71538:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLifeCycle=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(29277);let s=class{constructor(e){this.injector=e}$setExtensionCandidate(e){if(!this.appConfig.isElectronRenderer)throw new Error("Not implemented");this.injector.get(a.IElectronMainLifeCycleService).setExtensionCandidate(e,o.electronEnv.currentWindowId)}$setExtensionDir(e){if(!this.appConfig.isElectronRenderer)throw new Error("Not implemented");this.injector.get(a.IElectronMainLifeCycleService).setExtensionDir(e,o.electronEnv.currentWindowId)}};i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],s.prototype,"appConfig",void 0),s=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[r.Injector])],s),t.MainThreadLifeCycle=s},44130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTheme=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(52292),s=n(89338);let c=class extends o.Disposable{constructor(e,t){super(),this.rpcProtocol=e,this.injector=t,this._proxy=this.rpcProtocol.getProxy(s.ExtHostSumiAPIIdentifier.ExtHostTheme),this.addDispose(this.themeService.onThemeChange((()=>{this._proxy.$notifyThemeChanged()})))}async $getThemeColors(){const e=this.themeService.getCurrentThemeSync();return(0,a.getColorRegistry)().getColors().reduce(((t,n)=>{const i=e.getColor(n.id);return i&&(t[n.id.replace(".","-")]=i.toString()),t}),{})}};i.__decorate([(0,r.Autowired)(a.IThemeService),i.__metadata("design:type",Object)],c.prototype,"themeService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,r.Injector])],c),t.MainThreadTheme=c},88459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadToolbar=t.KaitianExtensionToolbarService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(894),s=n(52292),c=n(57280),l=n(23591);let d=class{constructor(){this.btnDelegates=new Map,this.selectDelegates=new Map,this.connected=new Set,this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.btn.setState"},{execute:(e,t,n)=>{this.btnDelegates.has(e)&&this.btnDelegates.get(e).setState(t,n)}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.btn.setContext"},{execute:(e,t)=>{if(this.btnDelegates.has(e)){const n=this.btnDelegates.get(e);n&&n.setContext(t)}}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.btn.connectHandle"},{execute:e=>{this.connected.has(e)||(this.doConnectToolbarButtonHandle(e),this.connected.add(e))}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.select.setState"},{execute:(e,t)=>{this.selectDelegates.has(e)&&this.selectDelegates.get(e).setState(t)}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.select.setOptions"},{execute:(e,t,n)=>{this.selectDelegates.has(e)&&(n.forEach((e=>{e.iconPath&&(e.iconClass=this.iconService.fromIcon(t,e.iconPath,e.iconMaskMode?s.IconType.Mask:s.IconType.Background))})),this.selectDelegates.get(e).setOptions(n))}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.select.setSelect"},{execute:(e,t)=>{this.selectDelegates.has(e)&&this.selectDelegates.get(e).setSelect(t)}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.select.connectHandle"},{execute:e=>{if(this.connected.has(e)||(this.doConnectToolbarSelectHandle(e),this.connected.add(e)),this.selectDelegates.get(e))return this.selectDelegates.get(e).getValue()}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.showPopover"},{execute:(e,t)=>{this.btnDelegates.has(e)&&this.btnDelegates.get(e).showPopOver(t)}}),this.commandRegistry.registerCommand({id:"sumi-extension.toolbar.hidePopover"},{execute:e=>{this.btnDelegates.has(e)&&this.btnDelegates.get(e).hidePopOver()}})}getPopoverComponent(e,t){return this.toolbarPopover.getComponent(e)||(()=>{var e,n,i,r;return(0,l.ExtensionLoadingView)({style:{minHeight:(null===(e=t.popoverStyle)||void 0===e?void 0:e.minHeight)?Number(null===(n=t.popoverStyle)||void 0===n?void 0:n.minHeight):200,minWidth:(null===(i=t.popoverStyle)||void 0===i?void 0:i.minWidth)?Number(null===(r=t.popoverStyle)||void 0===r?void 0:r.minWidth):300}})})}registerToolbarButton(e,t,n){const i=e+"."+n.id,r={};return n.states&&Object.keys(n.states).forEach((e=>{const i=n.states[e];r[e]=Object.assign({},i),i.iconPath&&(r[e].iconClass=this.iconService.fromIcon(t,i.iconPath,i.iconMaskMode?s.IconType.Mask:s.IconType.Background))})),this.toolbarRegistry.registerToolbarAction({id:i,preferredPosition:n.preferredPosition,strictPosition:n.strictPosition,description:n.description||n.title||i,weight:n.weight,when:n.when,component:(0,o.createToolbarActionBtn)({id:i,popoverId:`${e}:${n.popoverComponent}`,title:n.title,styles:r,defaultState:n.defaultState,iconClass:this.iconService.fromIcon(t,n.iconPath,n.iconMaskMode?s.IconType.Mask:s.IconType.Background),popoverComponent:n.popoverComponent?this.getPopoverComponent(`${e}:${n.popoverComponent}`,n):void 0,popoverStyle:n.popoverStyle||{noContainerStyle:!1},delegate:e=>{e&&(this.btnDelegates.set(i,e),n.command&&e.onClick((async()=>{e.showPopOver(),await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onAction",data:n.id})),this.commandService.executeCommand(n.command)})),this.connected.has(i)&&this.doConnectToolbarButtonHandle(i))}})})}doConnectToolbarButtonHandle(e){const t=this.btnDelegates.get(e);t&&(t.onClick((()=>this.commandService.executeCommand(c.EMIT_EXT_HOST_EVENT.id,"sumi-extension.toolbar.btn.click",e))),t.onChangeState((t=>this.commandService.executeCommand(c.EMIT_EXT_HOST_EVENT.id,"sumi-extension.toolbar.btn.stateChange",e,t))))}registerToolbarSelect(e,t,n){const i=e+"."+n.id,r=n.options||[];return r.forEach((e=>{e.iconPath&&(e.iconClass=this.iconService.fromIcon(t,e.iconPath,e.iconMaskMode?s.IconType.Mask:s.IconType.Background))})),this.toolbarRegistry.registerToolbarAction({id:i,preferredPosition:n.preferredPosition,strictPosition:n.strictPosition,description:n.description,component:(0,o.createToolbarActionSelect)({styles:n.states,options:r,defaultState:n.defaultState,defaultValue:n.defaultValue,equals:n.optionEqualityKey?(e,t)=>{const i=n.optionEqualityKey;return e&&t?e[i]===t[i]:e===t}:void 0,delegate:e=>{e&&(this.selectDelegates.set(i,e),n.command&&e.onSelect((e=>{this.commandService.executeCommand(n.command,e)})),this.connected.has(i)&&this.doConnectToolbarSelectHandle(i))}})})}doConnectToolbarSelectHandle(e){const t=this.selectDelegates.get(e);t&&(t.onSelect((t=>this.commandService.executeCommand(c.EMIT_EXT_HOST_EVENT.id,"sumi-extension.toolbar.select.onSelect",e,t))),t.onChangeState((t=>this.commandService.executeCommand(c.EMIT_EXT_HOST_EVENT.id,"sumi-extension.toolbar.select.stateChange",e,t))))}};i.__decorate([(0,r.Autowired)(o.IEventBus),i.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),i.__decorate([(0,r.Autowired)(o.IToolbarPopoverRegistry),i.__metadata("design:type",Object)],d.prototype,"toolbarPopover",void 0),i.__decorate([(0,r.Autowired)(o.IToolbarRegistry),i.__metadata("design:type",Object)],d.prototype,"toolbarRegistry",void 0),i.__decorate([(0,r.Autowired)(s.IIconService),i.__metadata("design:type",Object)],d.prototype,"iconService",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],d.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],d.prototype,"commandRegistry",void 0),d=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],d),t.KaitianExtensionToolbarService=d;let u=class extends a.Disposable{$registerToolbarButtonAction(e,t,n){return this.addDispose(this.toolbarService.registerToolbarButton(e,t,n)),Promise.resolve()}$registerToolbarSelectAction(e,t,n){return this.addDispose(this.toolbarService.registerToolbarSelect(e,t,n)),Promise.resolve()}};i.__decorate([(0,r.Autowired)(d),i.__metadata("design:type",d)],u.prototype,"toolbarService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0})],u),t.MainThreadToolbar=u},1218:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadIDEWindow=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(67851),s=n(89338);let c=class extends o.Disposable{constructor(e){super(),this.rpcProtocol=e,this._plainWebviewWindowMap=new Map,this._proxy=this.rpcProtocol.getProxy(s.ExtHostSumiAPIIdentifier.ExtHostIDEWindow),window.onbeforeunload=()=>{this.dispose()}}async $createWebviewWindow(e,t,n){let i;return this._plainWebviewWindowMap.has(e)?i=this._plainWebviewWindowMap.get(e):(i=this.webviewService.createWebviewWindow(t,n),i&&(this.disposables.push(i.onMessage((t=>{this._proxy.$postMessage(e,t)}))),this.disposables.push(i.onClosed((t=>{this._proxy.$dispatchClosed(e),this.$destroy(e)}))),this.disposables.push(i),this._plainWebviewWindowMap.set(e,i))),await i.ready,{windowId:i.windowId,webContentsId:i.webContentsId}}async $show(e){if(this._plainWebviewWindowMap.has(e)){const t=this._plainWebviewWindowMap.get(e);null==t||t.show()}}async $hide(e){if(this._plainWebviewWindowMap.has(e)){const t=this._plainWebviewWindowMap.get(e);null==t||t.hide()}}async $setSize(e,t){if(this._plainWebviewWindowMap.has(e)){const n=this._plainWebviewWindowMap.get(e);null==n||n.setSize(t)}}async $postMessage(e,t){if(this._plainWebviewWindowMap.has(e)){const n=this._plainWebviewWindowMap.get(e);null==n||n.postMessage(t)}}async $setAlwaysOnTop(e,t){if(this._plainWebviewWindowMap.has(e)){const n=this._plainWebviewWindowMap.get(e);null==n||n.setAlwaysOnTop(t)}}async $loadURL(e,t){if(this._plainWebviewWindowMap.has(e)){const n=this._plainWebviewWindowMap.get(e);null==n||n.loadURL(t)}}async $destroy(e){if(this._plainWebviewWindowMap.has(e)){const t=this._plainWebviewWindowMap.get(e);null==t||t.dispose(),this._plainWebviewWindowMap.delete(e)}}};i.__decorate([(0,r.Autowired)(a.IWebviewService),i.__metadata("design:type",Object)],c.prototype,"webviewService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadIDEWindow=c},73939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDidEnabledEvent=t.ExtensionDidUninstalledEvent=t.ExtensionsInitializedEvent=t.ExtensionDidActivatedEvent=t.ExtensionWillContributeEvent=t.ExtensionWillActivateEvent=t.ExtensionBeforeActivateEvent=t.ExtensionApiReadyEvent=t.AbstractExtInstanceManagementService=t.IActivationEventService=t.ExtHostEvent=void 0;const i=n(70655),r=n(39993),o=n(894);class a extends o.BasicEvent{}t.ExtHostEvent=a;let s=class{};s=i.__decorate([(0,r.Injectable)()],s),t.IActivationEventService=s;t.AbstractExtInstanceManagementService=class{};class c extends o.BasicEvent{}t.ExtensionApiReadyEvent=c;class l extends o.BasicEvent{}t.ExtensionBeforeActivateEvent=l;class d extends o.BasicEvent{}t.ExtensionWillActivateEvent=d;class u extends o.BasicEvent{}t.ExtensionWillContributeEvent=u;class p extends o.BasicEvent{}t.ExtensionDidActivatedEvent=p;class h extends o.BasicEvent{}t.ExtensionsInitializedEvent=h;class m extends o.BasicEvent{}t.ExtensionDidUninstalledEvent=m;class g extends o.BasicEvent{}t.ExtensionDidEnabledEvent=g},21731:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugAdapterContribution=void 0;t.ExtensionDebugAdapterContribution=class{constructor(e,t,n){this.description=e,this.extDebug=t,this.activationEventService=n}get type(){return this.description.type}get label(){return this.description.label}get languages(){return this.extDebug.$getSupportedLanguages(this.type)}async getSchemaAttributes(){return await this.extDebug.$getSchemaAttributes(this.type)}async getConfigurationSnippets(){return await this.extDebug.$getConfigurationSnippets(this.type)}async provideDebugConfigurations(e){return await this.extDebug.$provideDebugConfigurations(this.type,e)}async resolveDebugConfiguration(e,t){return await this.extDebug.$resolveDebugConfigurations(e,t)}async resolveDebugConfigurationWithSubstitutedVariables(e,t){return await this.extDebug.$resolveDebugConfigurationWithSubstitutedVariables(e,t)}async createDebugSession(e){const{configuration:t}=e;return await this.activationEventService.fireEvent("onDebugAdapterProtocolTracker",t.type),await this.extDebug.$createDebugSession(Object.assign(Object.assign({},e),{parentSession:void 0,parent:e.parentSession?e.parentSession.id:void 0}))}async terminateDebugSession(e){await this.extDebug.$terminateDebugSession(e)}}},55963:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugService=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(35392),s=n(63249),c=n(67350),l=n(14238),d=n(73939);let u=class{constructor(){this.contributors=new Map,this.toDispose=new o.DisposableCollection,this.sessionId2contrib=new Map,this.activationEvents=new Set,this.init()}init(){this.logger=this.loggerManager.getLogger(c.SupportLogNamespace.ExtensionHost),this.debugSessionManager.onWillStartDebugSession((e=>this.ensureDebugActivation(e))),this.debugSessionManager.onWillResolveDebugConfiguration((e=>this.ensureDebugActivation(e,"onDebugResolve",e.debugType))),this.debugConfigurationManager.onWillProvideDebugConfiguration((e=>this.ensureDebugActivation(e,"onDebugInitialConfigurations"))),this.toDispose.pushAll([o.Disposable.create((()=>{for(const e of this.sessionId2contrib.keys()){this.sessionId2contrib.get(e).terminateDebugSession(e)}this.sessionId2contrib.clear()}))])}registerDebugAdapterContribution(e){const{type:t}=e;return this.contributors.has(t)?(this.logger.warn(`Debugger with type '${t}' already registered.`),o.Disposable.NULL):(this.contributors.set(t,e),o.Disposable.create((()=>this.unregisterDebugAdapterContribution(t))))}unregisterDebugAdapterContribution(e){this.contributors.delete(e)}ensureDebugActivation(e,t,n){"function"==typeof e.waitUntil&&e.waitUntil(this.activateByDebug(t,n))}async activateByDebug(e,t){const n=[this.activationEventService.fireEvent("onDebug")];e&&(n.push(this.activationEventService.fireEvent(e)),t&&n.push(this.activationEventService.fireEvent(e,t))),await Promise.all(n)}async debugTypes(){return Array.from(this.contributors.keys())}async provideDebugConfigurations(e,t){const n=this.contributors.get(e);return n&&n.provideDebugConfigurations&&n.provideDebugConfigurations(t)||[]}async resolveDebugConfiguration(e,t){const n=this.contributors.get(e.type);if(n)try{return await n.resolveDebugConfiguration(e,t)}catch(e){this.logger.error(e)}}async resolveDebugConfigurationWithSubstitutedVariables(e,t){const n=this.contributors.get(e.type);if(n)try{return await n.resolveDebugConfigurationWithSubstitutedVariables(e,t)}catch(e){this.logger.error(e)}}async getDebuggersForLanguage(e){const t=[];for(const n of this.contributors.values()){const i=await n.languages;if(i&&-1!==i.indexOf(e)){const{type:e}=n;t.push({type:e,label:await n.label||e})}}return t}async getSchemaAttributes(e){const t=this.contributors.get(e);return t&&t.getSchemaAttributes&&t.getSchemaAttributes()||[]}async getConfigurationSnippets(){let e=[];for(const t of this.contributors.values())t.getConfigurationSnippets&&(e=e.concat(await t.getConfigurationSnippets()));return e}async createDebugSession(e){const{configuration:t}=e,n=this.contributors.get(t.type);if(n){const t=await n.createDebugSession(e);return this.sessionId2contrib.set(t,n),t}}async terminateDebugSession(e){const t=this.sessionId2contrib.get(e);if(t)return this.sessionId2contrib.delete(e),t.terminateDebugSession(e)}dispose(){this.toDispose.dispose()}};i.__decorate([(0,r.Autowired)(l.IWorkspaceService),i.__metadata("design:type",Object)],u.prototype,"workspaceService",void 0),i.__decorate([(0,r.Autowired)(c.ILoggerManagerClient),i.__metadata("design:type",Object)],u.prototype,"loggerManager",void 0),i.__decorate([(0,r.Autowired)(a.IDebugSessionManager),i.__metadata("design:type",Object)],u.prototype,"debugSessionManager",void 0),i.__decorate([(0,r.Autowired)(s.DebugConfigurationManager),i.__metadata("design:type",s.DebugConfigurationManager)],u.prototype,"debugConfigurationManager",void 0),i.__decorate([(0,r.Autowired)(d.IActivationEventService),i.__metadata("design:type",d.IActivationEventService)],u.prototype,"activationEventService",void 0),u=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],u),t.ExtensionDebugService=u},68651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionContributionRegistry=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(63249);let s=class{constructor(){this.contribs=new Map,this.debug=(0,o.getDebugLogger)(),this.init()}init(){for(const e of this.contributions.getContributions())this.contribs.set(e.debugType,e)}get(e){return this.contribs.get(e)}registerDebugSessionContribution(e){const{debugType:t}=e;return this.contribs.has(t)?(this.debug.warn(`Debug session contribution already registered for ${t}`),o.Disposable.NULL):(this.contribs.set(t,e),o.Disposable.create((()=>this.unregisterDebugSessionContribution(t))))}unregisterDebugSessionContribution(e){this.contribs.delete(e)}};i.__decorate([(0,r.Autowired)(a.DebugSessionContribution),i.__metadata("design:type",Object)],s.prototype,"contributions",void 0),s=i.__decorate([(0,r.Injectable)(),i.__metadata("design:paramtypes",[])],s),t.ExtensionDebugSessionContributionRegistry=s},43048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionFactory=t.ExtensionDebugSession=void 0;const i=n(63249);class r extends i.DebugSession{constructor(e,t,n,i,r,o,a,s,c,l,d,u){super(e,t,n,i,r,o,a,s,c,l,d),this.id=e,this.options=t,this.connection=n,this.terminalService=i,this.editorService=r,this.breakpointManager=o,this.modelManager=a,this.labelService=s,this.messageService=c,this.fileSystem=l,this.sessionManager=d,this.terminalOptionsExt=u}async doRunInTerminal(e,t){const n=Object.assign({},e,this.terminalOptionsExt);return super.doRunInTerminal(n,t)}}t.ExtensionDebugSession=r;t.ExtensionDebugSessionFactory=class{constructor(e,t,n,i,r,o,a,s,c,l,d,u,p,h){this.editorManager=e,this.breakpoints=t,this.modelManager=n,this.terminalService=i,this.labelService=r,this.messageService=o,this.debugPreferences=a,this.connectionFactory=s,this.fileSystem=c,this.terminalOptionsExt=l,this.debugPreference=d,this.outputService=u,this.injector=p,this.sessionManager=h}get(e,t){const n=this.injector.get(i.DebugSessionConnection,[e,this.connectionFactory,this.getTraceOutputChannel()]);return new r(e,t,n,this.terminalService,this.editorManager,this.breakpoints,this.modelManager,this.labelService,this.messageService,this.fileSystem,this.sessionManager,this.terminalOptionsExt)}getTraceOutputChannel(){if(this.debugPreferences["debug.trace"])return this.outputService.getChannel("Debug adapters")}}},14074:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(70655);i.__exportStar(n(43048),t),i.__exportStar(n(68651),t),i.__exportStar(n(55963),t),i.__exportStar(n(21731),t)},70406:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initWorkerThreadAPIProxy=t.createApiFactory=void 0;const i=n(16329),r=n(24453),o=n(96516),a=n(2160),s=n(7466),c=n(57229),l=n(84179),d=n(67626),u=n(89360),p=n(48656),h=n(74718),m=n(62821),g=n(9558),f=n(73123),_=n(19820),b=n(75855),y=n(69910),v=n(43995),C=n(1905),S=n(3229),w=n(2718),E=n(10537),k=n(55851),x=n(23344),T=n(83266),D=n(33280),A=n(48469),I=n(66562),M=n(52013),R=n(5282),P=n(90289),O=n(75859),N=n(22184),L=n(6874),F=n(28502),B=n(91795);t.createApiFactory=async function(e,t,n){const j=t.get(v.MainThreadLanguages,[e]),z=t.get(c.MainThreadCommands,[e]),U=t.get(m.MainThreadExtensionDocumentData,[e]),W=t.get(g.MainThreadEditorService,[e,U]),V=t.get(D.MainThreadStatusBar,[e]),H=t.get(S.MainThreadMessage,[e]),K=t.get(B.MainThreadWorkspace,[e]),$=t.get(E.MainThreadPreference,[e]),G=t.get(A.MainThreadStorage,[e]),q=t.get(_.MainThreadEnv,[e,G]),Z=t.get(k.MainThreadQuickOpen,[e]),Y=t.get(w.MainThreadOutput),X=t.get(b.MainThreadFileSystem,[e]),Q=t.get(y.MainThreadFileSystemEvent,[e]),J=t.get(a.MainThreadWebview,[e]),ee=t.get(a.MainThreadWebviewView,[e,J]),te=t.get(x.MainThreadSCM,[e]),ne=t.get(O.MainThreadTreeView,[e]),ie=t.get(h.MainThreadDecorations,[e]),re=t.get(F.MainThreadWindowState,[e]),oe=t.get(L.MainThreadWindow,[e]),ae=t.get(d.MainThreadConnection,[e]),se=t.get(p.MainThreadDebug,[e,ae]),ce=t.get(M.MainThreadTerminal,[e]),le=t.get(o.MainThreadProgress,[e]),de=t.get(I.MainthreadTasks,[e]),ue=t.get(l.MainthreadComments,[e,z]),pe=t.get(N.MainThreadUrls,[e]),he=t.get(P.MainThreadTheming,[e]),me=t.get(u.MainThreadCustomEditor,[e,J]),ge=t.get(s.MainThreadAuthentication,[e]),fe=t.get(T.MainThreadSecret,[e]),_e=t.get(R.MainThreadTestsImpl,[e]),be=t.get(f.MainThreadEditorTabsService,[e]);return e.set(r.MainThreadAPIIdentifier.MainThreadExtensionService,n),e.set(r.MainThreadAPIIdentifier.MainThreadCommands,z),e.set(r.MainThreadAPIIdentifier.MainThreadLanguages,j),e.set(r.MainThreadAPIIdentifier.MainThreadDocuments,U),e.set(r.MainThreadAPIIdentifier.MainThreadEditors,W),e.set(r.MainThreadAPIIdentifier.MainThreadStatusBar,V),e.set(r.MainThreadAPIIdentifier.MainThreadMessages,H),e.set(r.MainThreadAPIIdentifier.MainThreadWorkspace,K),e.set(r.MainThreadAPIIdentifier.MainThreadPreference,$),e.set(r.MainThreadAPIIdentifier.MainThreadEnv,q),e.set(r.MainThreadAPIIdentifier.MainThreadQuickOpen,Z),e.set(r.MainThreadAPIIdentifier.MainThreadStorage,G),e.set(r.MainThreadAPIIdentifier.MainThreadOutput,Y),e.set(r.MainThreadAPIIdentifier.MainThreadFileSystem,X),e.set(r.MainThreadAPIIdentifier.MainThreadWebview,J),e.set(r.MainThreadAPIIdentifier.MainThreadWebviewView,ee),e.set(r.MainThreadAPIIdentifier.MainThreadSCM,te),e.set(r.MainThreadAPIIdentifier.MainThreadTreeView,ne),e.set(r.MainThreadAPIIdentifier.MainThreadDecorations,ie),e.set(r.MainThreadAPIIdentifier.MainThreadWindowState,re),e.set(r.MainThreadAPIIdentifier.MainThreadWindow,oe),e.set(r.MainThreadAPIIdentifier.MainThreadConnection,ae),e.set(r.MainThreadAPIIdentifier.MainThreadDebug,se),e.set(r.MainThreadAPIIdentifier.MainThreadTerminal,ce),e.set(r.MainThreadAPIIdentifier.MainThreadProgress,le),e.set(r.MainThreadAPIIdentifier.MainThreadTasks,de),e.set(r.MainThreadAPIIdentifier.MainThreadComments,ue),e.set(r.MainThreadAPIIdentifier.MainThreadUrls,pe),e.set(r.MainThreadAPIIdentifier.MainThreadTheming,he),e.set(i.MainThreadExtensionLogIdentifier,t.get(C.MainThreadExtensionLog)),e.set(r.MainThreadAPIIdentifier.MainThreadCustomEditor,me),e.set(r.MainThreadAPIIdentifier.MainThreadAuthentication,ge),e.set(r.MainThreadAPIIdentifier.MainThreadSecret,fe),e.set(r.MainThreadAPIIdentifier.MainThreadTests,_e),e.set(r.MainThreadAPIIdentifier.MainThreadEditorTabs,be),await J.init(),()=>{j.dispose(),z.dispose(),U.dispose(),W.dispose(),V.dispose(),H.dispose(),K.dispose(),$.dispose(),q.dispose(),Z.dispose(),G.dispose(),Y.dispose(),X.dispose(),Q.dispose(),J.dispose(),te.dispose(),ne.dispose(),ie.dispose(),re.dispose(),oe.dispose(),ae.dispose(),se.dispose(),ce.dispose(),le.dispose(),de.dispose(),ue.dispose(),pe.dispose(),he.dispose(),ge.dispose(),fe.dispose(),_e.dispose(),be.dispose()}},t.initWorkerThreadAPIProxy=async function(e,t,n){const d=t.get(c.MainThreadCommands,[e,!0]),p=t.get(C.MainThreadExtensionLog);e.set(r.MainThreadAPIIdentifier.MainThreadExtensionService,n),e.set(r.MainThreadAPIIdentifier.MainThreadCommands,d),e.set(i.MainThreadExtensionLogIdentifier,p);const f=t.get(v.MainThreadLanguages,[e]),I=t.get(D.MainThreadStatusBar,[e]),M=t.get(k.MainThreadQuickOpen,[e]),R=t.get(m.MainThreadExtensionDocumentData,[e]),L=t.get(g.MainThreadEditorService,[e,R]),F=t.get(o.MainThreadProgress,[e]),j=t.get(B.MainThreadWorkspace,[e]),z=t.get(b.MainThreadFileSystem,[e]),U=t.get(y.MainThreadFileSystemEvent,[e]),W=t.get(E.MainThreadPreference,[e]),V=t.get(w.MainThreadOutput),H=t.get(S.MainThreadMessage,[e]),K=t.get(a.MainThreadWebview,[e]),$=t.get(a.MainThreadWebviewView,[e,K]),G=t.get(A.MainThreadStorage,[e]),q=t.get(_.MainThreadEnv,[e,G]),Z=t.get(N.MainThreadUrls,[e]),Y=t.get(l.MainthreadComments,[e,d]),X=t.get(P.MainThreadTheming,[e]),Q=t.get(u.MainThreadCustomEditor,[e,K]),J=t.get(s.MainThreadAuthentication,[e]),ee=t.get(T.MainThreadSecret,[e]),te=t.get(x.MainThreadSCM,[e]),ne=t.get(O.MainThreadTreeView,[e]),ie=t.get(h.MainThreadDecorations,[e]);return e.set(r.MainThreadAPIIdentifier.MainThreadLanguages,f),e.set(r.MainThreadAPIIdentifier.MainThreadDocuments,R),e.set(r.MainThreadAPIIdentifier.MainThreadEnv,q),e.set(r.MainThreadAPIIdentifier.MainThreadWebviewView,$),e.set(r.MainThreadAPIIdentifier.MainThreadStatusBar,I),e.set(r.MainThreadAPIIdentifier.MainThreadQuickOpen,M),e.set(r.MainThreadAPIIdentifier.MainThreadWorkspace,j),e.set(r.MainThreadAPIIdentifier.MainThreadFileSystem,z),e.set(r.MainThreadAPIIdentifier.MainThreadPreference,W),e.set(r.MainThreadAPIIdentifier.MainThreadOutput,V),e.set(r.MainThreadAPIIdentifier.MainThreadEditors,L),e.set(r.MainThreadAPIIdentifier.MainThreadMessages,H),e.set(r.MainThreadAPIIdentifier.MainThreadWebview,K),e.set(r.MainThreadAPIIdentifier.MainThreadStorage,G),e.set(r.MainThreadAPIIdentifier.MainThreadUrls,Z),e.set(r.MainThreadAPIIdentifier.MainThreadComments,Y),e.set(r.MainThreadAPIIdentifier.MainThreadProgress,F),e.set(r.MainThreadAPIIdentifier.MainThreadTheming,X),e.set(r.MainThreadAPIIdentifier.MainThreadCustomEditor,Q),e.set(r.MainThreadAPIIdentifier.MainThreadAuthentication,J),e.set(r.MainThreadAPIIdentifier.MainThreadSecret,ee),e.set(r.MainThreadAPIIdentifier.MainThreadSCM,te),e.set(r.MainThreadAPIIdentifier.MainThreadTreeView,ne),e.set(r.MainThreadAPIIdentifier.MainThreadDecorations,ie),await K.init(),()=>{d.dispose(),f.dispose(),I.dispose(),M.dispose(),R.dispose(),L.dispose(),q.dispose(),F.dispose(),j.dispose(),z.dispose(),U.dispose(),W.dispose(),V.dispose(),H.dispose(),K.dispose(),G.dispose(),Z.dispose(),Y.dispose(),X.dispose(),Q.dispose(),J.dispose(),ee.dispose(),te.dispose(),ie.dispose(),ne.dispose()}}},96516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadProgress=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(45467),s=n(90642),c=n(24453);let l=class{constructor(e){this.rpcProtocol=e,this.progress=new Map,this.proxy=this.rpcProtocol.getProxy(c.ExtHostAPIIdentifier.ExtHostProgress)}$startProgress(e,t,n){const i=this.createTask(e);if(t.location===s.ProgressLocation.Notification&&n){t=Object.assign(Object.assign({},t),{location:s.ProgressLocation.Notification})}this.progressService.withProgress(t,i,(()=>this.proxy.$acceptProgressCanceled(e)))}$progressReport(e,t){const n=this.progress.get(e);n&&n.progress.report(t)}$progressEnd(e){const t=this.progress.get(e);t&&(t.resolve(),this.progress.delete(e))}dispose(){this.progress.forEach((e=>e.resolve())),this.progress.clear()}createTask(e){return t=>new Promise((n=>{this.progress.set(e,{resolve:n,progress:t})}))}};i.__decorate([(0,r.Autowired)(a.IProgressService),i.__metadata("design:type",Object)],l.prototype,"progressService",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],l),t.MainThreadProgress=l},2160:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWebviewView=t.MainThreadWebview=void 0;const i=n(70655),r=i.__importDefault(n(23493)),o=n(39993),a=(n(41037),n(894)),s=n(894),c=n(9015),l=n(79653),d=n(90642),u=n(92345),p=n(70888),h=n(92674),m=n(43881),g=n(52292),f=n(67851),_=n(24453),b=n(65049),y=n(55948),v=n(73939),{addMapElement:C}=a.arrays;let S=class extends a.Disposable{constructor(e){super(),this.rpcProtocol=e,this.webivewPanels=new Map,this.webviews=new Map,this.plainWebviews=new Map,this.webviewPanelStates=new Map,this._hasSerializer=new Set,this.statePersister=new Map,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostWebview),this.sumiProxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.SumiExtHostWebview),this.initEvents(),this.extWebviewStorage=this.getStorage(new a.URI("extension-webview-panels").withScheme(a.STORAGE_SCHEMA.SCOPE)),this.webviewService.registerWebviewReviver({revive:e=>this.reviveWebview(e),handles:async e=>(await this.extWebviewStorage).get(e)?10:-1})}async init(){await this.proxy.$init()}isSupportedLink(e,t,n){if(l.HttpOpener.standardSupportedLinkSchemes.has(e.scheme))return!0;if(t.enableCommandUris&&e.scheme===a.Schemes.command){const{id:t,args:i}=c.CommandOpener.parseURI(e);if(!this.commandRegistry.isPermittedCommand(t,n,...i))throw new Error(`Extension ${n.id} has not permit to execute ${t}`);return!0}return!1}initEvents(){this.addDispose(this.editorService.onActiveResourceChange((()=>{this.onChange()}))),this.addDispose(this.eventBus.on(p.EditorGroupChangeEvent,(()=>{this.onChange()})))}isActive(e,t,n){return e.resourceState.uri.isEqual(null==t?void 0:t.uri)&&e.resourceState.openTypeId===(null==n?void 0:n.componentId)}onChange(){const e=this.editorService.currentResource,t=this.editorService.currentEditorGroup.currentOpenType,n=this.editorService.editorGroups.map((e=>({resource:e.currentResource,openType:e.currentOpenType,index:e.index+1})));this.webviewPanelStates.forEach(((i,r)=>{if(!this.hasWebviewPanel(r))return;let o=!1;const a=this.getWebivewPanel(r);if(i.active?e&&this.isActive(a,e,t)||(i.active=!1,o=!0):e&&this.isActive(a,e,t)&&(i.active=!0,o=!0),i.visible){const e=n.find((e=>e.resource&&this.isActive(a,e.resource,e.openType)));e?e.index!==i.position&&(i.position=e.index,o=!0):(i.visible=!1,i.position=-1,o=!0)}else{const e=n.find((e=>e.resource&&this.isActive(a,e.resource,e.openType)));e&&(i.visible=!0,i.position=e.index,o=!0)}o&&(this.proxy.$onDidChangeWebviewPanelViewState(r,i),i.position!==this.getWebivewPanel(r).viewColumn&&(this.getWebivewPanel(r).viewColumn=i.position,this._persistWebviewPanelMeta(r)))}))}$createWebviewPanel(e,t,n,i={},r={},o){this.doCreateWebviewPanel(e,t,n,i,r,o)}pipeBrowserHostedWebviewPanel(e,t,n,i,r){const o=e.id,a=new w(o,n,t,{},{},r,e);this.onCreateWebviewPanel(a),this.proxy.$pipeBrowserHostedWebviewPanel(o,n)}async reviveWebview(e){var t;const n=(await this.extWebviewStorage).get(e);if(!n)throw new Error("No revival info for webview "+e);const{viewType:i,webviewOptions:r,extensionInfo:o,title:a}=n;await this.activation.fireEvent("onWebviewPanel",i);const s=await this.getPersistedWebviewState(i,e),c=this.webviewService.createEditorWebviewComponent({allowScripts:r.enableScripts,allowForms:null!==(t=r.enableForms)&&void 0!==t?t:r.enableScripts,longLive:r.retainContextWhenHidden},e),l=c.group?c.group.index+1:n.viewColumn;await this.doCreateWebviewPanel(e,i,a,{viewColumn:l},r,o,s),await this.proxy.$deserializeWebviewPanel(e,i,a,await this.getPersistedWebviewState(i,e),l,r)}onCreateWebviewPanel(e){this.webivewPanels.set(e.id,e);const t=e.webview,n=e.id;e.editorWebview&&e.addDispose(e.editorWebview),e.addDispose(this.connectWebview(e.id,e.webview)),e.addDispose(t.onRemove((()=>{t.dispose(),this.proxy.$onDidDisposeWebviewPanel(n)}))),this.webviewPanelStates.set(e.id,{active:!1,visible:!1,position:-1}),this.addDispose({dispose:()=>{this.webivewPanels.has(n)&&this.getWebivewPanel(n).dispose()}}),t.onDidClickLink((t=>{this.isSupportedLink(t,e.options,e.extensionInfo)&&this.openerService.open(t)})),this.addDispose(t.onDidUpdateState((t=>{this._hasSerializer.has(e.viewType)&&this.persistWebviewState(e.viewType,n,t)}))),this._persistWebviewPanelMeta(n)}async doCreateWebviewPanel(e,t,n,i={},r={},o,a){var s;const c=this.webviewService.createEditorWebviewComponent({allowScripts:r.enableScripts,allowForms:null!==(s=r.enableForms)&&void 0!==s?s:r.enableScripts,longLive:r.retainContextWhenHidden},e),l=new w(e,t,{uri:c.webviewUri,openTypeId:c.componentId},i,r,o,c.webview,c);c.title=n,this.onCreateWebviewPanel(l),c.supportsRevive=this._hasSerializer.has(l.viewType);const d=(0,b.viewColumnToResourceOpenOptions)(i.viewColumn);c.open(d),a&&(l.webview.state=a)}getWebivewPanel(e){if(!this.webivewPanels.has(e))throw new Error("鎷ユ湁ID "+e+" 鐨� webview 涓嶅瓨鍦ㄥ湪browser杩涚▼涓紒");return this.webivewPanels.get(e)}hasWebviewPanel(e){return this.webivewPanels.has(e)}$disposeWebview(e){this.getWebivewPanel(e).dispose(),this.webivewPanels.delete(e),this._persistWebviewPanelMeta(e)}$reveal(e,t={}){var n;const i=this.getWebivewPanel(e),r=Object.assign({},i.showOptions,t).viewColumn;null===(n=i.editorWebview)||void 0===n||n.open((0,b.viewColumnToResourceOpenOptions)(r))}$setTitle(e,t){const n=this.getWebivewPanel(e);n.editorWebview&&(n.editorWebview.title=t,n.title=t,this._persistWebviewPanelMeta(e))}$setIconPath(e,t){const n=this.getWebivewPanel(e);n.editorWebview&&(n.editorWebview.icon=t?this.iconService.fromIcon("",t,g.IconType.Background)+" background-tab-icon":"")}connectWebview(e,t){this.webviews.set(e,t);const n=new a.Disposable;return n.addDispose(t.onMessage((t=>{this.proxy.$onMessage(e,t)}))),n.addDispose(C(this.webviews,e,t)),t.onDispose((()=>{n.dispose()})),n}getWebivew(e){return this.webviews.get(e)}$setHtml(e,t){var n;null===(n=this.getWebivew(e))||void 0===n||n.setContent(t)}$setOptions(e,t){var n;null===(n=this.getWebivew(e))||void 0===n||n.updateOptions({allowScripts:t.enableScripts,allowForms:t.enableForms})}async $postMessage(e,t){var n;try{return await(null===(n=this.getWebivew(e))||void 0===n?void 0:n.postMessage(t)),!0}catch(e){return!1}}$registerSerializer(e){this._hasSerializer.add(e),this.webivewPanels.forEach((t=>{t.viewType===e&&t.editorWebview&&(t.editorWebview.supportsRevive=!0)}))}$unregisterSerializer(e){this._hasSerializer.add(e)}_persistWebviewPanelMeta(e){return this.extWebviewStorage.then((t=>{this.webivewPanels.has(e)?t.set(e,this.getWebivewPanel(e).toJSON()):t.delete(e)}))}async persistWebviewState(e,t,n){this.statePersister.has(e)||this.statePersister.set(e,this.getStorage(new a.URI("extension-webview/"+e).withScheme(a.STORAGE_SCHEMA.SCOPE)).then((e=>{const n=(0,r.default)((n=>e.set(t,n)),500);return async e=>{await n(e)}}))),(await this.statePersister.get(e))(n)}async getPersistedWebviewState(e,t){return(await this.getStorage(new a.URI("extension-webview/"+e).withScheme(a.STORAGE_SCHEMA.SCOPE))).get(t)}$connectPlainWebview(e){if(!this.plainWebviews.has(e)){const t=this.webviewService.getEditorPlainWebviewComponent(e)||this.webviewService.getOrCreatePlainWebviewComponent(e);t&&(this.plainWebviews.set(e,t),t.webview.onMessage((t=>{this.sumiProxy.$acceptMessage(e,t)})),t.webview.onDispose((()=>{this.plainWebviews.delete(e)})))}}async $postMessageToPlainWebview(e,t){if(this.plainWebviews.has(e))try{return await this.plainWebviews.get(e).webview.postMessage(t),!0}catch(e){return this.logger.error(e),!1}return!1}async $createPlainWebview(e,t,n){const i=this.webviewService.createEditorPlainWebviewComponent({},e);i.title=t,n&&(i.icon=this.iconService.fromIcon("",n)||""),this.$connectPlainWebview(e)}async $plainWebviewLoadUrl(e,t){if(!this.plainWebviews.has(e))throw new Error("No Plain Webview With id "+e);await this.plainWebviews.get(e).webview.loadURL(t)}async $disposePlainWebview(e){var t;this.plainWebviews.has(e)&&(null===(t=this.plainWebviews.get(e))||void 0===t||t.dispose())}async $revealPlainWebview(e,t){if(!this.plainWebviews.has(e))throw new Error("No Plain Webview With id "+e);const n=this.plainWebviews.get(e);if(!n.open)throw new Error("not able to open plain webview id:"+e);await n.open({groupIndex:t})}async $getWebviewResourceRoots(){return Array.from(this.staticResourceService.resourceRoots)}};i.__decorate([(0,o.Autowired)(f.IWebviewService),i.__metadata("design:type",Object)],S.prototype,"webviewService",void 0),i.__decorate([(0,o.Autowired)(v.IActivationEventService),i.__metadata("design:type",v.IActivationEventService)],S.prototype,"activation",void 0),i.__decorate([(0,o.Autowired)(a.StorageProvider),i.__metadata("design:type",Function)],S.prototype,"getStorage",void 0),i.__decorate([(0,o.Autowired)(),i.__metadata("design:type",u.WorkbenchEditorService)],S.prototype,"editorService",void 0),i.__decorate([(0,o.Autowired)(g.IIconService),i.__metadata("design:type",Object)],S.prototype,"iconService",void 0),i.__decorate([(0,o.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],S.prototype,"eventBus",void 0),i.__decorate([(0,o.Autowired)(a.ILogger),i.__metadata("design:type",Object)],S.prototype,"logger",void 0),i.__decorate([(0,o.Autowired)(m.StaticResourceService),i.__metadata("design:type",m.StaticResourceService)],S.prototype,"staticResourceService",void 0),i.__decorate([(0,o.Autowired)(s.IOpenerService),i.__metadata("design:type",Object)],S.prototype,"openerService",void 0),i.__decorate([(0,o.Autowired)(a.CommandRegistry),i.__metadata("design:type",Object)],S.prototype,"commandRegistry",void 0),S=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__param(0,(0,o.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],S),t.MainThreadWebview=S;class w extends a.Disposable{constructor(e,t,n,i,r,o,a,s){super(),this.id=e,this.viewType=t,this.resourceState=n,this.showOptions=i,this.options=r,this.extensionInfo=o,this.webview=a,this.editorWebview=s}toJSON(){return{id:this.id,viewType:this.viewType,viewColumn:this.viewColumn,extensionInfo:this.extensionInfo,webviewOptions:this.options,title:this.title}}}class E extends a.Disposable{constructor(e,t,n,i){super(),this.id=e,this.viewType=t,this.extension=n,this.webview=i}}let k=class extends d.WithEventBus{constructor(e,t){super(),this.mainThreadWebview=t,this._webviewViews=new Map,this._resolvers=new Map,this.proxy=e.getProxy(_.ExtHostAPIIdentifier.ExtHostWebviewView)}$registerWebviewViewProvider(e,t,n={}){this._resolvers.set(t,{extension:e,options:n}),this.eventBus.fire(new _.WebviewViewResolverRegistrationEvent({viewType:t,options:n}))}$unregisterWebviewViewProvider(e){this._resolvers.delete(e),this.eventBus.fire(new _.WebviewViewResolverRegistrationRemovalEvent({viewType:e}))}$setWebviewViewTitle(e,t){var n;const i=this._webviewViews.get(e);i&&(null===(n=this.mainLayout.getTabbarHandler(i.viewType))||void 0===n||n.updateViewTitle(i.viewType,t||""))}$setWebviewViewDescription(e,t){this._webviewViews.get(e)}onWebviewViewShouldShow(e){const t=e.payload.viewType;this._resolvers.has(t)?e.payload.disposer.addDispose(this.resolveWebviewView(e.payload.container,t,e.payload.title,e.payload.cancellationToken)):this.addDispose(this.eventBus.on(_.WebviewViewResolverRegistrationEvent,(n=>{n.payload.viewType===t&&this._resolvers.has(t)&&e.payload.disposer.addDispose(this.resolveWebviewView(e.payload.container,t,e.payload.title,e.payload.cancellationToken))})))}resolveWebviewView(e,t,n,i){var r;const o=new a.Disposable,s=this.webviewService.createWebview(),c=null===(r=this._resolvers.get(t))||void 0===r?void 0:r.options,l=this._resolvers.get(t).extension,d=s.id,u=new E(d,t,l,s);u.addDispose(this.mainThreadWebview.connectWebview(d,s)),u.addDispose(C(this._webviewViews,d,u)),u.addDispose(s);const p=()=>{const n=this.mainLayout.isViewVisible(t);this.proxy.$onDidChangeWebviewViewVisibility(d,n),(null==c?void 0:c.retainContextWhenHidden)||(n?(s.appendTo(e),u.addDispose(this.mainThreadWebview.connectWebview(d,s))):s.remove())};o.addDispose(this.eventBus.on(h.ViewCollapseChangedEvent,(e=>{e.payload.viewId===t&&p()})));const m=this.mainLayout.getTabbarHandler(t);m&&(o.addDispose(null==m?void 0:m.onActivate((()=>{p()}))),o.addDispose(null==m?void 0:m.onInActivate((()=>{p()})))),this.proxy.$resolveWebviewView(d,t,n,s.state,i);const g=this.mainLayout.isViewVisible(t);return this.proxy.$onDidChangeWebviewViewVisibility(d,g),((null==c?void 0:c.retainContextWhenHidden)||g)&&s.appendTo(e),o.addDispose(u),{dispose:()=>u.dispose()}}$show(e,t){const n=this._webviewViews.get(e);n&&this.mainLayout.revealView(n.viewType)}};i.__decorate([(0,o.Autowired)(h.IMainLayoutService),i.__metadata("design:type",Object)],k.prototype,"mainLayout",void 0),i.__decorate([(0,o.Autowired)(f.IWebviewService),i.__metadata("design:type",Object)],k.prototype,"webviewService",void 0),i.__decorate([(0,d.OnEvent)(y.WebviewViewShouldShowEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[y.WebviewViewShouldShowEvent]),i.__metadata("design:returntype",void 0)],k.prototype,"onWebviewViewShouldShow",null),k=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,S])],k),t.MainThreadWebviewView=k},7466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadAuthentication=t.MainThreadAuthenticationProvider=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(90642),s=n(1500),c=n(24453),l=n(73939);let d=class extends o.Disposable{constructor(e,t,n,i){super(),this._proxy=e,this.id=t,this.label=n,this.supportsMultipleAccounts=i,this._accounts=new Map,this._sessions=new Map}async initialize(){return this.registerCommandsAndContextMenuItems()}async manageTrustedExtensions(e){const t=await this.authenticationService.getAllowedExtensions(this.id,e);if(!t.length)return void this.dialogService.info((0,o.localize)("authentication.noTrustedExtensions"));const n=await this.authenticationService.getAccountUsages(this.id,e),i=t.map((e=>{const t=n.find((t=>e.id===t.extensionId));return{label:e.name,description:t?(0,o.localize)("authentication.accountLastUsedDate"):(0,o.localize)("authentication.notUsed"),value:e}})),r=await this.quickPickService.show(i,{title:(0,o.localize)("authentication.manageTrustedExtensions"),placeholder:(0,o.localize)("authentication.manageExtensions")});r&&await this.authenticationService.setAllowedExtensions(this.id,e,[r])}async signOut(e){const t=await this.authenticationService.getAccountUsages(this.id,e),n=this._accounts.get(e),i=t.length?(0,o.formatLocalize)("authentication.signOutMessage",e,t.map((e=>e.extensionName)).join("\n")):(0,o.formatLocalize)("authentication.signOutMessageSimple",e);await this.dialogService.info(i,[(0,o.localize)("ButtonCancel"),(0,o.localize)("ButtonOK")])===(0,o.localize)("ButtonOK")&&(null==n||n.forEach((e=>this.logout(e))),await this.authenticationService.removeAccountUsage(this.id,e),await this.authenticationService.removeAllowedExtensions(this.id,e))}async getSessions(){return this._proxy.$getSessions(this.id)}hasSessions(){return!!this._sessions.size}async updateSessionItems(e){const{added:t,removed:n}=e,i=(await this._proxy.$getSessions(this.id)).filter((e=>t.some((t=>t.id===e.id))));n.forEach((e=>{const t=this._sessions.get(e.id);if(t){this._sessions.delete(e.id);const n=this._accounts.get(t)||[],i=n.indexOf(e.id);n.splice(i),n.length||this._accounts.delete(t)}})),i.forEach((e=>this.registerSession(e)))}async registerCommandsAndContextMenuItems(){try{(await this._proxy.$getSessions(this.id)).forEach((e=>this.registerSession(e)))}catch(e){this.logger.error(e)}}registerSession(e){this._sessions.set(e.id,e.account.label);const t=this._accounts.get(e.account.label);t?this._accounts.set(e.account.label,t.concat(e.id)):this._accounts.set(e.account.label,[e.id])}login(e){return this._proxy.$login(this.id,e)}async logout(e){await this._proxy.$logout(this.id,e),this.messageService.info((0,o.localize)("authentication.signedOut"))}};i.__decorate([(0,r.Autowired)(a.IAuthenticationService),i.__metadata("design:type",Object)],d.prototype,"authenticationService",void 0),i.__decorate([(0,r.Autowired)(o.QuickPickService),i.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),i.__decorate([(0,r.Autowired)(s.IDialogService),i.__metadata("design:type",Object)],d.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(s.IMessageService),i.__metadata("design:type",Object)],d.prototype,"messageService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],d.prototype,"logger",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,String,String,Boolean])],d),t.MainThreadAuthenticationProvider=d;let u=class extends o.Disposable{constructor(e){super(),this._proxy=e.getProxy(c.ExtHostAPIIdentifier.ExtHostAuthentication),this.addDispose(this.authenticationService.onDidChangeSessions((e=>{this._proxy.$onDidChangeAuthenticationSessions(e.providerId,e.label,e.event)}))),this.addDispose(this.authenticationService.onDidRegisterAuthenticationProvider((e=>{this._proxy.$onDidChangeAuthenticationProviders([e],[])}))),this.addDispose(this.authenticationService.onDidUnregisterAuthenticationProvider((e=>{this._proxy.$onDidChangeAuthenticationProviders([],[e])})))}$getProviderIds(){return Promise.resolve(this.authenticationService.getProviderIds())}async $registerAuthenticationProvider(e,t,n){const i=this.injector.get(d,[this._proxy,e,t,n]);await i.initialize(),this.authenticationService.registerAuthenticationProvider(e,i),this.addDispose(o.Disposable.create((()=>{this.$unregisterAuthenticationProvider(e)})))}$unregisterAuthenticationProvider(e){this.authenticationService.unregisterAuthenticationProvider(e)}$ensureProvider(e){return this.activationService.fireEvent("onAuthenticationRequest",e)}$sendDidChangeSessions(e,t){this.authenticationService.sessionsUpdate(e,t)}$getSessions(e){return this.authenticationService.getSessions(e)}$login(e,t){return this.authenticationService.login(e,t)}$logout(e,t){return this.authenticationService.logout(e,t)}async doGetSession(e,t,n,i,r){const o=await this.authenticationService.getSessions(e,t,!0),a=this.authenticationService.supportsMultipleAccounts(e);if(r.forceNewSession&&!o.length)throw new Error("No existing sessions found.");if(r.forceNewSession&&r.createIfNone)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone");if(r.forceNewSession&&r.silent)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, silent");if(r.createIfNone&&r.silent)throw new Error("Invalid combination of options. Please remove one of the following: createIfNone, silent");if(!r.forceNewSession&&o.length)if(a)if(r.clearSessionPreference)await this.authenticationService.removeExtensionSessionId(i,e);else{const t=await this.authenticationService.getExtensionSessionId(i,e);if(t){const i=o.find((e=>e.id===t));if(i&&await this.authenticationService.isAccessAllowed(e,i.account.label,n))return i}}else if(await this.authenticationService.isAccessAllowed(e,o[0].account.label,n))return o[0];if(r.createIfNone||r.forceNewSession){const s=this.authenticationService.getLabel(e),c="object"==typeof r.forceNewSession?r.forceNewSession.detail:void 0;if(!await this.loginPrompt(s,i,!!r.forceNewSession,c))throw new Error("User did not consent to login.");const l=(null==o?void 0:o.length)&&!r.forceNewSession&&a?await this.selectSession(e,s,n,i,o,t,!!r.clearSessionPreference):await this.authenticationService.login(e,t);return await this.authenticationService.updatedAllowedExtension(e,l.account.label,n,i,!0),await this.authenticationService.setExtensionSessionId(i,e,l.id),l}const s=o.find((t=>this.authenticationService.isAccessAllowed(e,t.account.label,n)));return r.silent||s||await this.authenticationService.requestNewSession(e,t,n,i),s}async $getSession(e,t,n,i,r){const o=await this.doGetSession(e,t,n,i,r);return o&&await this.authenticationService.addAccountUsage(e,o.account.label,n,i),o}async selectSession(e,t,n,i,r,a,s){if(!r.length)throw new Error("No potential sessions found");if(s)await this.authenticationService.removeExtensionSessionId(i,e);else{const o=await this.authenticationService.getExtensionSessionId(i,e);if(o){const a=r.find((e=>e.id===o));if(a){if(await this.$getSessionsPrompt(e,a.account.label,t,n,i))return a}}}const c=r.map((e=>({label:e.account.label,value:e})));c.push({label:(0,o.localize)("authentication.useOtherAccount"),value:void 0});const l=await this.quickPickService.show(c,{title:(0,o.formatLocalize)("authentication.selectAccount",i,t),placeholder:(0,o.formatLocalize)("authentication.getSessionPlaceholder",i),ignoreFocusOut:!0}),d=null!=l?l:await this.authenticationService.login(e,a),u=d.account.label,p=await this.authenticationService.getAllowedExtensions(e,u);return p.find((e=>e.id===n))||(p.push({id:n,name:i}),await this.authenticationService.setAllowedExtensions(e,u,p)),await this.authenticationService.setExtensionSessionId(i,e,d.id),d}async $getSessionsPrompt(e,t,n,i,r){const a=await this.authenticationService.getAllowedExtensions(e,t);if(a.find((e=>e.id===i)))return await this.authenticationService.addAccountUsage(e,t,i,r),!0;const s=await this.dialogService.info((0,o.formatLocalize)("authentication.confirmAuthenticationAccess",r,n,t),[(0,o.localize)("ButtonCancel"),(0,o.localize)("ButtonAllow")])===(0,o.localize)("ButtonAllow");return s&&(this.authenticationService.addAccountUsage(e,t,i,r),a.push({id:i,name:r}),await this.authenticationService.setAllowedExtensions(e,t,a)),s}async loginPrompt(e,t,n,i){return await this.dialogService.info(n?(0,o.formatLocalize)("authentication.confirmReLogin",t,e):(0,o.formatLocalize)("authentication.confirmLogin",t,e),[(0,o.localize)("ButtonCancel"),(0,o.localize)("ButtonAllow")])===(0,o.localize)("ButtonAllow")}async $setTrustedExtensionAndAccountPreference(e,t,n,i,r){const o=await this.authenticationService.getAllowedExtensions(e,t);o.find((e=>e.id===n))||(o.push({id:n,name:i}),await this.authenticationService.setAllowedExtensions(e,t,o)),await this.authenticationService.setExtensionSessionId(i,e,r),await this.authenticationService.addAccountUsage(e,t,n,i)}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(a.IAuthenticationService),i.__metadata("design:type",Object)],u.prototype,"authenticationService",void 0),i.__decorate([(0,r.Autowired)(s.IDialogService),i.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(s.IMessageService),i.__metadata("design:type",Object)],u.prototype,"messageService",void 0),i.__decorate([(0,r.Autowired)(o.QuickPickService),i.__metadata("design:type",Object)],u.prototype,"quickPickService",void 0),i.__decorate([(0,r.Autowired)(l.IActivationEventService),i.__metadata("design:type",l.IActivationEventService)],u.prototype,"activationService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],u),t.MainThreadAuthentication=u},57229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommands=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(90642),c=n(65135),l=n(24453),{isNonEmptyArray:d}=s.arrays;let u=class{constructor(e,t){this.rpcProtocol=e,this.commands=new Map,this.argumentProcessors=[],this.disposable=new s.Disposable,this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostCommands),this.proxy.$registerBuiltInCommands(),this.proxy.$registerCommandConverter(),this.registerUriArgProcessor()}registerUriArgProcessor(){this.disposable.addDispose(this.registerArgumentProcessor({processArgument:e=>e instanceof s.URI?e.codeUri:d(e)?e.map((e=>e instanceof s.URI?e.codeUri:e)):e}))}dispose(){this.commands.forEach((e=>{e.dispose()})),this.commands.clear(),this.disposable.dispose()}registerArgumentProcessor(e){return this.argumentProcessors.push(e),s.Disposable.create((()=>{const t=this.argumentProcessors.indexOf(e);t>=0&&this.argumentProcessors.splice(t,1)}))}$registerCommand(e){const t=this.proxy,n=(...n)=>(n=n.map((e=>this.argumentProcessors.reduce(((e,t)=>t.processArgument(e)),e))),t.$executeContributedCommand(e,...n)),i=new s.Disposable,r={execute:n,dispose:()=>i.dispose()};this.commandRegistry.getCommand(e)?i.addDispose(this.commandRegistry.registerHandler(e,{execute:n})):i.addDispose(this.commandRegistry.registerCommand({id:e},{execute:n})),this.commands.set(e,r)}$unregisterCommand(e){const t=this.commands.get(e);t&&(t.dispose(),this.commands.delete(e))}$getCommands(){return Promise.resolve(this.commandRegistry.getCommands().map((e=>e.id)))}$executeExtensionCommand(e,...t){return this.commands.has(e)?this.commands.get(e).execute(...t):(t=t.map((e=>this.argumentProcessors.reduce(((e,t)=>t.processArgument(e)),e))),this.proxy.$executeContributedCommand(e,...t))}$executeCommandWithExtensionInfo(e,t,...n){if(!this.commandRegistry.isPermittedCommand(e,t,...n))throw new Error(`Extension ${t.id} has not permit to execute ${e}`);return this.$executeCommand(e,...n)}async $executeCommand(e,...t){try{return await this.monacoCommandService.executeCommand(e,...t)}catch(e){throw this.logger.error(e),e}}};i.__decorate([(0,r.Autowired)(a.CommandRegistry),i.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),i.__decorate([(0,r.Autowired)(c.ICommandServiceToken),i.__metadata("design:type",Object)],u.prototype,"monacoCommandService",void 0),i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],u.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.IContextKeyService),i.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object,Boolean])],u),t.MainThreadCommands=u},84179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommentController=t.MainThreadCommentThread=t.MainthreadComments=void 0;const i=n(70655),r=n(39993),o=n(74566),a=(n(41037),n(57061)),s=n(90642),c=n(24453),l=n(11586);let d=class{constructor(e,t){this.rpcProtocol=e,this.mainThreadCommands=t,this._providers=new Map,this._commentControllers=new Map,this.disposable=new s.Disposable,this.proxy=this.rpcProtocol.getProxy(c.ExtHostAPIIdentifier.ExtHostComments),this.disposable.addDispose(this.registerCommentThreadTemplateHander()),this.disposable.addDispose(this.registerArgumentProcessor())}registerCommentThreadTemplateHander(){return this.commentsService.onThreadsCreated((async e=>{if((0,s.isUndefined)(e.data)){const t=this.commentsService.getProviderIdsByLine(e.range.startLineNumber)[0];if(t){const n=this._providers.get(t);if((0,s.isUndefined)(n))return;const i=this._commentControllers.get(n);if(!i)throw new Error("unknown controller");i.createCommentThreadTemplate(e.uri.codeUri,e.range)}}}))}registerArgumentProcessor(){return this.mainThreadCommands.registerArgumentProcessor({processArgument:e=>{if(!e||!e.menuId||!e.thread||(0,s.isUndefined)(e.thread.data))return e;switch(e.menuId){case a.MenuId.CommentsCommentThreadTitle:return{$mid:7,commentControlHandle:e.thread.data.commentControlHandle,commentThreadHandle:e.thread.data.commentThreadHandle};case a.MenuId.CommentsCommentThreadContext:return{$mid:8,thread:{commentControlHandle:e.thread.data.commentControlHandle,commentThreadHandle:e.thread.data.commentThreadHandle},text:e.text};case a.MenuId.CommentsCommentTitle:return{$mid:9,thread:{commentControlHandle:e.thread.data.commentControlHandle,commentThreadHandle:e.thread.data.commentThreadHandle},commentUniqueId:+e.comment.id};case a.MenuId.CommentsCommentContext:return{$mid:10,thread:{commentControlHandle:e.thread.data.commentControlHandle,commentThreadHandle:e.thread.data.commentThreadHandle},commentUniqueId:+e.comment.id,text:e.body};default:return e}}})}$updateCommentThread(e,t,n,i,r){const o=this._commentControllers.get(e);if(o)return o.updateCommentThread(t,n,i,r)}$registerCommentController(e,t,n){this.commentsService.registerCommentPanel(),this._providers.set(t,e);const i=this.injector.get(p,[this.proxy,e,t,n,{}]);this._commentControllers.set(e,i),this.commentsService.forceUpdateDecoration(),this.disposable.addDispose(s.Disposable.create((()=>{this.$unregisterCommentController(e)})))}$updateCommentControllerFeatures(e,t){const n=this._commentControllers.get(e);n&&n.updateFeatures(t)}$unregisterCommentController(e){const t=this._commentControllers.get(e);t&&(t.dispose(),this._providers.delete(t.id)),this._commentControllers.delete(e)}$createCommentThread(e,t,n,i,r,o){const a=this._commentControllers.get(e);if(a)return a.createCommentThread(o,t,n,i,r)}$deleteCommentThread(e,t){const n=this._commentControllers.get(e);if(n)return n.deleteCommentThread(t)}dispose(){this.disposable.dispose(),this._commentControllers.clear()}};i.__decorate([(0,r.Autowired)(o.ICommentsService),i.__metadata("design:type",Object)],d.prototype,"commentsService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,Object])],d),t.MainthreadComments=d;let u=class{constructor(e,t,n,i,r,o,a){this.commentThreadHandle=e,this.controllerHandle=t,this.extensionId=n,this.threadId=i,this.resource=r,this._onDidChangeInput=new s.Emitter,this._onDidChangeLabel=new s.Emitter,this.onDidChangeLabel=this._onDidChangeLabel.event,this._onDidChangeComments=new s.Emitter,this._onDidChangeCanReply=new s.Emitter,this._onDidChangeRange=new s.Emitter,this.onDidChangeRange=this._onDidChangeRange.event,this._onDidChangeCollasibleState=new s.Emitter,this.onDidChangeCollasibleState=this._onDidChangeCollasibleState.event;const c=this.commentsService.commentsThreads.filter((e=>e.uri.toString()===r&&e.range.startLineNumber===o.startLineNumber)),[l]=c.slice(-1),d={commentControlHandle:t,commentThreadHandle:e};l&&!l.data?(l.data=d,this._thread=l):this._thread=this.commentsService.createThread(new s.URI(r),(0,s.positionToRange)(o.startLineNumber),{data:d,readOnly:!a}),this._isDisposed=!1}get input(){return this._input}set input(e){this._input=e,this._onDidChangeInput.fire(e)}get onDidChangeInput(){return this._onDidChangeInput.event}get label(){return this._thread.label}set label(e){this._thread.label=e,this._onDidChangeLabel.fire(e)}get contextValue(){return this._thread.contextValue}set contextValue(e){this._thread.contextValue=e}convertToIThreadComment(e){var t;return{id:e.uniqueIdInThread.toString(),mode:e.mode,body:e.body.value,label:e.label,contextValue:e.contextValue,author:{name:e.userName,iconPath:e.userIconPath},reactions:null===(t=e.commentReactions)||void 0===t?void 0:t.map((e=>this.convertToCommentReaction(e)))}}convertToCommentReaction(e){const{label:t,iconPath:n,count:i,hasReacted:r}=e;return{label:t,iconPath:new s.URI(s.URI.revive(n)),count:null!=i?i:0,authorHasReacted:!!r}}convertToCoreReaction(e){const{label:t,iconPath:n,count:i,authorHasReacted:r}=e;return{label:t,iconPath:s.URI.revive(n),count:null!=i?i:0,hasReacted:r}}convertToCoreComment(e){var t;return{uniqueIdInThread:+e.id,contextValue:e.contextValue,mode:e.mode,label:"string"==typeof e.label?e.label:"",body:{value:e.body},userName:e.author.name,commentReactions:null===(t=e.reactions)||void 0===t?void 0:t.map((e=>this.convertToCoreReaction(e)))}}get comments(){return this._thread.comments.map((e=>this.convertToCoreComment(e)))}set comments(e){this._thread.comments=e?e.map((e=>this.convertToIThreadComment(e))):[],this._onDidChangeComments.fire(e)}get onDidChangeComments(){return this._onDidChangeComments.event}set range(e){this._thread.range=e,this._onDidChangeRange.fire(this._thread.range)}get range(){return this._thread.range}get onDidChangeCanReply(){return this._onDidChangeCanReply.event}set canReply(e){this._thread.readOnly=!e,this._onDidChangeCanReply.fire(e)}get canReply(){return!this._thread.readOnly}get collapsibleState(){return this._thread.isCollapsed?l.CommentThreadCollapsibleState.Collapsed:l.CommentThreadCollapsibleState.Expanded}set collapsibleState(e){this._thread.isCollapsed=e===l.CommentThreadCollapsibleState.Collapsed,this._onDidChangeCollasibleState.fire(this._collapsibleState)}get isDisposed(){return this._isDisposed}batchUpdate(e){const t=t=>Object.prototype.hasOwnProperty.call(e,t);t("range")&&(this.range=e.range),t("label")&&(this.label=e.label),t("contextValue")&&(this.contextValue=e.contextValue),t("comments")&&(this.comments=e.comments),t("collapseState")&&(this.collapsibleState=e.collapseState),t("canReply")&&(this.canReply=e.canReply)}dispose(){this._isDisposed=!0,this._onDidChangeCollasibleState.dispose(),this._onDidChangeComments.dispose(),this._onDidChangeInput.dispose(),this._onDidChangeLabel.dispose(),this._onDidChangeRange.dispose(),this._thread.dispose()}toJSON(){return{$mid:7,commentControlHandle:this.controllerHandle,commentThreadHandle:this.commentThreadHandle}}};i.__decorate([(0,r.Autowired)(o.ICommentsService),i.__metadata("design:type",Object)],u.prototype,"commentsService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Number,Number,String,String,String,Object,Boolean])],u),t.MainThreadCommentThread=u;let p=class extends s.WithEventBus{constructor(e,t,n,i,r){super(),this._proxy=e,this._handle=t,this._id=n,this._label=i,this._features=r,this._threads=new Map,this.addDispose(this.commentsService.registerCommentRangeProvider(n,{getCommentingRanges:e=>this.getCommentingRanges(e.uri,s.CancellationToken.None)}))}get handle(){return this._handle}get id(){return this._id}get contextValue(){return this._id}get proxy(){return this._proxy}get label(){return this._label}get reactions(){return this._reactions}set reactions(e){this._reactions=e}get features(){return this._features}updateFeatures(e){var t;this._features=Object.assign(Object.assign({},this._features),e),this.commentsFeatureRegistry.registerProviderFeature(this._id,{placeholder:null===(t=this._features.options)||void 0===t?void 0:t.placeHolder})}createCommentThread(e,t,n,i,r){const o=s.URI.from(i),a=this.injector.get(u,[t,this.handle,e,n,o.toString(),r,!0]);return this._threads.set(t,a),this.addDispose({dispose:()=>{this._threads.delete(t),a.dispose()}}),a}updateCommentThread(e,t,n,i){this.getKnownThread(e).batchUpdate(i)}deleteCommentThread(e){const t=this.getKnownThread(e);this._threads.delete(e),t.dispose()}deleteCommentThreadMain(e){this._threads.forEach((t=>{t.threadId===e&&this._proxy.$deleteCommentThread(this._handle,t.commentThreadHandle)}))}getKnownThread(e){const t=this._threads.get(e);if(!t)throw new Error("unknown thread");return t}async getCommentingRanges(e,t){return await this._proxy.$provideCommentingRanges(this.handle,e.codeUri,t)||[]}handleCommentReaction(e){var t;const{thread:n,comment:i,reaction:r}=e.payload,o=null===(t=n.data)||void 0===t?void 0:t.commentThreadHandle,a=this.getKnownThread(o),s=a.convertToCoreComment(i),c=a.convertToCoreReaction(r);this.toggleReaction(n.uri,a,s,c)}async toggleReaction(e,t,n,i){return this._proxy.$toggleReaction(this._handle,t.commentThreadHandle,e.codeUri,n,i)}createCommentThreadTemplate(e,t){this._proxy.$createCommentThreadTemplate(this.handle,e,t)}async updateCommentThreadTemplate(e,t){await this._proxy.$updateCommentThreadTemplate(this.handle,e,t)}toJSON(){return{$mid:6,handle:this.handle}}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(o.ICommentsService),i.__metadata("design:type",Object)],p.prototype,"commentsService",void 0),i.__decorate([(0,r.Autowired)(o.ICommentsFeatureRegistry),i.__metadata("design:type",Object)],p.prototype,"commentsFeatureRegistry",void 0),i.__decorate([(0,s.OnEvent)(o.CommentReactionClick),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[o.CommentReactionClick]),i.__metadata("design:returntype",void 0)],p.prototype,"handleCommentReaction",null),p=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,Number,String,String,Object])],p),t.MainThreadCommentController=p},67626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadConnection=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(90642),c=n(24453);let l=class{constructor(e){this.rpcProtocol=e,this.connections=new Map,this.connectionsReady=new Map,this.toDispose=new s.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(c.ExtHostAPIIdentifier.ExtHostConnection),this.logger=this.LoggerManager.getLogger(a.SupportLogNamespace.ExtensionHost)}dispose(){this.connections.forEach((e=>{e.dispose()})),this.connections.clear(),this.toDispose.dispose()}async $sendMessage(e,t){const n=this.connectionsReady.get(e);n&&await n.promise,this.connections.has(e)?this.connections.get(e).reader.readMessage(t):this.logger.warn(`Do not found connection ${e}`)}async $createConnection(e){this.logger.log(`create connection ${e}`),await this.doEnsureConnection(e)}async $deleteConnection(e){this.logger.log(`delete connection ${e}`),this.connections.delete(e)}async ensureConnection(e){const t=await this.doEnsureConnection(e);return await this.proxy.$createConnection(e),t}async doEnsureConnection(e){let t=this.connections.get(e);if(!t){const n=new a.Deferred;this.connectionsReady.set(e,n),t=await this.doCreateConnection(e),n.resolve(),this.connections.set(e,t),this.connectionsReady.delete(e)}return t}async doCreateConnection(e){const t=new c.ExtensionMessageReader,n=new c.ExtensionMessageWriter(e,this.proxy),i=new c.ExtensionConnection(t,n,(()=>{this.connections.delete(e),this.proxy.$deleteConnection(e)})),r=new s.DisposableCollection(s.Disposable.create((()=>t.fireClose())));return this.toDispose.push(r),i}};i.__decorate([(0,r.Autowired)(a.ILoggerManagerClient),i.__metadata("design:type",Object)],l.prototype,"LoggerManager",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],l),t.MainThreadConnection=l},89360:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCustomEditor=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(90642)),a=n(70888),s=n(67851),c=n(24453),l=n(80691),d=n(2160);let u=class extends o.WithEventBus{constructor(e,t){super(),this.webview=t,this.customEditors=new Map,this.proxy=e.getProxy(c.ExtHostAPIIdentifier.ExtHostCustomEditor)}$acceptCustomDocumentDirty(e,t){this.eventBus.fire(new a.ResourceDecorationNeedChangeEvent({uri:o.URI.from(e),decoration:{dirty:t}}))}async onShouldSave(e){const{viewType:t,uri:n,cancellationToken:i}=e.payload,r=this.customEditors.get(t);if(r)if(r.type===c.CustomEditorType.TextEditor){const e=this.editorDocumentModelService.getModelReference(n);if(e)try{await e.instance.save()}finally{e.dispose()}}else if(r.type===c.CustomEditorType.FullEditor)return this.proxy.$saveCustomDocument(t,n.codeUri,i)}async onShouldRevert(e){const{viewType:t,uri:n,cancellationToken:i}=e.payload,r=this.customEditors.get(t);if(r)if(r.type===c.CustomEditorType.TextEditor){const e=this.editorDocumentModelService.getModelReference(n);if(e)try{await e.instance.revert()}finally{e.dispose()}}else if(r.type===c.CustomEditorType.FullEditor)return this.proxy.$revertCustomDocument(t,n.codeUri,i)}async onShouldEdit(e){const{viewType:t,uri:n,type:i}=e.payload,r=this.customEditors.get(t);if(r)if(r.type===c.CustomEditorType.TextEditor){const e=this.editorDocumentModelService.getModelReference(n);if(e)try{"undo"===i?await e.instance.getMonacoModel().undo():await e.instance.getMonacoModel().redo()}finally{e.dispose()}}else r.type===c.CustomEditorType.FullEditor&&("undo"===i?await this.proxy.$undo(t,n.codeUri):await this.proxy.$redo(t,n.codeUri))}async onCustomEditorShouldDisplayEvent(e){const t=this.customEditors.get(e.payload.viewType);if(t){const{viewType:n,uri:i,openTypeId:r,webviewPanelId:o,cancellationToken:a}=e.payload;if(t.type===c.CustomEditorType.TextEditor){const e=await this.editorDocumentModelService.createModelReference(i);if(!e)throw new Error(`failed to open document ${i} for custom editor`);if(a.isCancellationRequested)return void e.dispose();const s=this.webviewService.getWebview(o);if(!s)throw e.dispose(),new Error(`failed to find webview ${o}`);this.eventBus.on(l.CustomEditorShouldHideEvent,(t=>{i.isEqual(t.payload.uri)&&e.dispose()})),this.webview.pipeBrowserHostedWebviewPanel(s,{uri:i,openTypeId:r},n,t.options.webviewOptions||{},t.extensionInfo),this.proxy.$resolveCustomTextEditor(n,i.codeUri,o,a)}else{const e=this.webviewService.getWebview(o);if(!e)throw new Error(`failed to find webview ${o}`);this.webview.pipeBrowserHostedWebviewPanel(e,{uri:i,openTypeId:r},n,t.options.webviewOptions||{},t.extensionInfo),this.proxy.$resolveCustomTextEditor(n,i.codeUri,o,a)}}}$registerCustomEditor(e,t,n={},i){this.customEditors.set(e,{type:t,options:n,extensionInfo:i}),this.eventBus.fire(new l.CustomEditorOptionChangeEvent({viewType:e,options:n}))}$unregisterCustomEditor(e){this.customEditors.delete(e)}};i.__decorate([(0,r.Autowired)(a.IEditorDocumentModelService),i.__metadata("design:type",Object)],u.prototype,"editorDocumentModelService",void 0),i.__decorate([(0,r.Autowired)(s.IWebviewService),i.__metadata("design:type",Object)],u.prototype,"webviewService",void 0),i.__decorate([(0,o.OnEvent)(l.CustomEditorShouldSaveEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.CustomEditorShouldSaveEvent]),i.__metadata("design:returntype",Promise)],u.prototype,"onShouldSave",null),i.__decorate([(0,o.OnEvent)(l.CustomEditorShouldRevertEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.CustomEditorShouldSaveEvent]),i.__metadata("design:returntype",Promise)],u.prototype,"onShouldRevert",null),i.__decorate([(0,o.OnEvent)(l.CustomEditorShouldEditEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.CustomEditorShouldEditEvent]),i.__metadata("design:returntype",Promise)],u.prototype,"onShouldEdit",null),i.__decorate([(0,o.OnEvent)(l.CustomEditorShouldDisplayEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.CustomEditorShouldDisplayEvent]),i.__metadata("design:returntype",Promise)],u.prototype,"onCustomEditorShouldDisplayEvent",null),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object,d.MainThreadWebview])],u),t.MainThreadCustomEditor=u},48656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadDebug=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(11792),c=n(35392),l=n(63249),d=n(95719),u=n(34886),p=n(92345),h=n(33361),m=n(6556),g=n(1500),f=n(22566),_=n(24453),b=n(73939),y=n(14074),v=n(21731),C=n(55963);let S=class{constructor(e,t){this.rpcProtocol=e,this.mainThreadConnection=t,this.toDispose=new Map,this.listenerDispose=new a.DisposableCollection,this.logger=this.loggerManager.getLogger(a.SupportLogNamespace.ExtensionHost),this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostDebug),this.listen(),this.registerDebugContributions()}dispose(){this.toDispose.forEach((e=>{e.dispose()})),this.toDispose.clear(),this.listenerDispose.dispose()}listen(){this.listenerDispose.pushAll([this.breakpointManager.onDidChangeBreakpoints((({added:e,removed:t,changed:n})=>{const i=this.breakpointManager.getBreakpoints();this.proxy.$breakpointsDidChange(this.toCustomApiBreakpoints(i),this.toCustomApiBreakpoints(e),this.toCustomApiBreakpoints(t),this.toCustomApiBreakpoints(n))})),this.sessionManager.onDidStartDebugSession((e=>{this.proxy.$sessionDidStart(e.id)})),this.sessionManager.onDidDestroyDebugSession((e=>{this.proxy.$sessionDidDestroy(e.id)})),this.sessionManager.onDidChangeActiveDebugSession((e=>{this.proxy.$sessionDidChange(e.current&&e.current.id)})),this.sessionManager.onDidReceiveDebugSessionCustomEvent((e=>{this.proxy.$onSessionCustomEvent(e.session.id,e.event,e.body)})),this.debugService.onDidDebugContributionPointChange((({path:e,contributions:t,removed:n})=>{n?(this.proxy.$unregisterDebuggerContributions(t),t.forEach((e=>{this.$unregisterDebuggerContribution({type:e.type,label:e.label||e.type}),this.logger.log(`Debugger contribution has been unregistered: ${e.type}`)}))):(this.proxy.$registerDebuggerContributions(e,t),t.forEach((e=>{this.$registerDebuggerContribution({type:e.type,label:e.label||e.type}),this.logger.log(`Debugger contribution has been registered: ${e.type}`)})))}))])}registerDebugContributions(){const e=this.debugService.debugContributionPoints;for(const[t,n]of e)this.proxy.$registerDebuggerContributions(t,n),n.forEach((e=>{this.$registerDebuggerContribution({type:e.type,label:e.label||e.type}),this.logger.log(`Debugger contribution has been registered: ${e.type}`)}))}async $appendToDebugConsole(e){this.debugConsoleModelService.debugConsoleSession&&this.debugConsoleModelService.debugConsoleSession.append(e)}async $appendLineToDebugConsole(e){this.debugConsoleModelService.debugConsoleSession&&this.debugConsoleModelService.debugConsoleSession.appendLine(e)}async $unregisterDebuggerContribution(e){const t=this.toDispose.get(e.type);null==t||t.dispose()}async $registerDebuggerContribution(e){const t=new a.DisposableCollection,n=await this.proxy.$getTerminalCreationOptions(e.type);this.toDispose.set(e.type,t);const i=new y.ExtensionDebugSessionFactory(this.editorService,this.breakpointManager,this.modelManager,this.terminalService,this.labelService,this.messageService,this.debugPreferences,(async e=>{const t=await this.mainThreadConnection.ensureConnection(e);return new _.ExtensionWSChannel(t)}),this.fileService,n,this.debugPreferences,this.outputService,this.injector,this.sessionManager);t.pushAll([this.adapterContributionRegister.registerDebugAdapterContribution(new v.ExtensionDebugAdapterContribution(e,this.proxy,this.activationEventService)),this.sessionContributionRegistry.registerDebugSessionContribution({debugType:e.type,debugSessionFactory:()=>i})])}async $addBreakpoints(e){const t=new Map;e.forEach((e=>t.set(e.id,e))),this.breakpointManager.findMarkers({dataFilter:e=>(t.has(e.id)&&t.delete(e.id),!1)});for(const e of t.values())if(e.location){const t=e.location;this.breakpointManager.addBreakpoint(l.DebugBreakpoint.create(a.Uri.revive(t.uri),{line:e.location.range.startLineNumber+1,column:1,condition:e.condition,hitCondition:e.hitCondition,logMessage:e.logMessage},!0))}}async $removeBreakpoints(e){const t=new Set;e.forEach((e=>t.add(e.id)));for(const e of this.breakpointManager.findMarkers({dataFilter:e=>t.has(e.id)})){const t=this.modelManager.resolve(new a.URI(e.data.uri));t&&t[0].breakpoint&&this.breakpointManager.delBreakpoint(t[0].breakpoint)}}async $customRequest(e,t,n){const i=this.sessionManager.getSession(e);if(i)return i.sendCustomRequest(t,n);throw new Error(`Debug session '${e}' not found`)}$getDebugProtocolBreakpoint(e,t){const n=this.sessionManager.getSession(e);return n?Promise.resolve(n.getDebugProtocolBreakpoint(t)):Promise.reject(new Error("debug session not found"))}async $startDebugging(e,t,n){let i,r=0;if("string"==typeof t)for(const e of this.debugConfigurationManager.all){if(e.configuration.name===t){i=e.configuration;break}r++}else i=t;if(!i)throw new Error(`No configuration ${t}`);const o={noDebug:!1,parentSession:this.sessionManager.getSession(n.parentSessionID),repl:n.repl,compact:n.compact,lifecycleManagedByParent:n.lifecycleManagedByParent};return!!await this.sessionManager.start(Object.assign({configuration:i,workspaceFolderUri:e&&a.Uri.revive(e.uri).toString(),index:r},o))}$stopDebugging(e){if(!e)return this.sessionManager.stopSession(void 0);{const t=this.sessionManager.getSession(e);if(t)return this.sessionManager.stopSession(t)}throw new Error(`Debug session '${e}' not found`)}toCustomApiBreakpoints(e){return e.map((e=>({id:e.id,enabled:e.enabled,condition:e.raw.condition,hitCondition:e.raw.hitCondition,logMessage:e.raw.logMessage,location:{uri:a.Uri.parse(e.uri),range:{startLineNumber:e.raw.line-1,startColumn:(e.raw.column||1)-1,endLineNumber:e.raw.line-1,endColumn:(e.raw.column||1)-1}}})))}};i.__decorate([(0,r.Autowired)(u.IDebugSessionManager),i.__metadata("design:type",l.DebugSessionManager)],S.prototype,"sessionManager",void 0),i.__decorate([(0,r.Autowired)(s.LabelService),i.__metadata("design:type",s.LabelService)],S.prototype,"labelService",void 0),i.__decorate([(0,r.Autowired)(l.BreakpointManager),i.__metadata("design:type",l.BreakpointManager)],S.prototype,"breakpointManager",void 0),i.__decorate([(0,r.Autowired)(l.DebugModelManager),i.__metadata("design:type",l.DebugModelManager)],S.prototype,"modelManager",void 0),i.__decorate([(0,r.Autowired)(l.DebugConfigurationManager),i.__metadata("design:type",l.DebugConfigurationManager)],S.prototype,"debugConfigurationManager",void 0),i.__decorate([(0,r.Autowired)(l.DebugPreferences),i.__metadata("design:type",Object)],S.prototype,"debugPreferences",void 0),i.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),i.__metadata("design:type",p.WorkbenchEditorService)],S.prototype,"editorService",void 0),i.__decorate([(0,r.Autowired)(g.IMessageService),i.__metadata("design:type",Object)],S.prototype,"messageService",void 0),i.__decorate([(0,r.Autowired)(h.IFileServiceClient),i.__metadata("design:type",Object)],S.prototype,"fileService",void 0),i.__decorate([(0,r.Autowired)(c.IDebugServer),i.__metadata("design:type",C.ExtensionDebugService)],S.prototype,"adapterContributionRegister",void 0),i.__decorate([(0,r.Autowired)(b.IActivationEventService),i.__metadata("design:type",b.IActivationEventService)],S.prototype,"activationEventService",void 0),i.__decorate([(0,r.Autowired)(l.DebugSessionContributionRegistry),i.__metadata("design:type",y.ExtensionDebugSessionContributionRegistry)],S.prototype,"sessionContributionRegistry",void 0),i.__decorate([(0,r.Autowired)(a.ILoggerManagerClient),i.__metadata("design:type",Object)],S.prototype,"loggerManager",void 0),i.__decorate([(0,r.Autowired)(f.ITerminalApiService),i.__metadata("design:type",Object)],S.prototype,"terminalService",void 0),i.__decorate([(0,r.Autowired)(d.DebugConsoleModelService),i.__metadata("design:type",d.DebugConsoleModelService)],S.prototype,"debugConsoleModelService",void 0),i.__decorate([(0,r.Autowired)(m.OutputService),i.__metadata("design:type",m.OutputService)],S.prototype,"outputService",void 0),i.__decorate([(0,r.Autowired)(c.IDebugService),i.__metadata("design:type",Object)],S.prototype,"debugService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],S.prototype,"injector",void 0),S=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__param(1,(0,r.Optional)(_.IMainThreadConnectionService)),i.__metadata("design:paramtypes",[Object,Object])],S),t.MainThreadDebug=S},74718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadDecorations=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(90642),s=n(90642),c=n(53356),l=n(24453);class d{constructor(e){this._proxy=e,this._idPool=0,this._requests=Object.create(null),this._resolver=Object.create(null)}enqueue(e,t,n){const i=++this._idPool,r=new Promise((n=>{this._requests[i]={id:i,handle:e,uri:t},this._resolver[i]=n,this._processQueue()}));return n.onCancellationRequested((()=>{delete this._requests[i],delete this._resolver[i]})),r}_processQueue(){"number"!=typeof this._timer&&(this._timer=setTimeout((()=>{const e=this._requests,t=this._resolver;this._proxy.$provideDecorations(Object.values(e),a.CancellationToken.None).then((e=>{for(const n in t)t[n](e[n])})),this._requests=[],this._resolver=[],this._timer=void 0}),0))}}let u=class{constructor(e){this.rpcProtocol=e,this._provider=new Map,this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostDecorations),this._requestQueue=new d(this.proxy)}dispose(){this._provider.forEach((e=>(0,s.dispose)(e))),this._provider.clear()}$registerDecorationProvider(e,t){const n=new a.Emitter,i=this.decorationsService.registerDecorationsProvider({label:t,onDidChange:n.event,provideDecorations:(t,n)=>this._requestQueue.enqueue(e,t,n).then((e=>{if(!e)return;const[t,n,i,r]=e;return{weight:10,bubble:t||!1,color:null==r?void 0:r.id,tooltip:n,letter:i}}))});this._provider.set(e,[n,i])}$onDidChange(e,t){const n=this._provider.get(e);if(n){const[e]=n;e.fire(t&&t.map((e=>a.Uri.revive(e))))}}$unregisterDecorationProvider(e){const t=this._provider.get(e);t&&((0,s.dispose)(t),this._provider.delete(e))}};i.__decorate([(0,r.Autowired)(c.IDecorationsService),i.__metadata("design:type",c.IDecorationsService)],u.prototype,"decorationsService",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],u),t.MainThreadDecorations=u},62821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadExtensionDocumentData=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(11792),s=n(90642),c=n(92345),l=n(70888),d=n(49645),u=n(33361),p=n(24453);let h=class{constructor(e){this.proxy=e,this.onDidChangeContentEmitter=new s.Emitter,this.onDidChangeContent=this.onDidChangeContentEmitter.event,this.schemes=new Set}registerScheme(e){this.schemes.add(e)}unregisterScheme(e){this.schemes.delete(e)}handlesScheme(e){return this.schemes.has(e)}provideEditorDocumentModelContent(e,t){return this.proxy.$provideTextDocumentContent(e.toString(),t)}isReadonly(e){return!0}};h=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],h);let m=class extends s.WithEventBus{constructor(e){super(),this.rpcProtocol=e,this.editorDisposers=new Map,this.extHoldDocuments=new g,this.docSyncEnabled=new s.LRUMap(200,100),this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostDocuments),this.provider=this.injector.get(h,[this.proxy]),this.contentRegistry.registerEditorDocumentModelContentProvider(this.provider),this.docManager.getAllModels().map((e=>{this.isDocSyncEnabled(e.uri)&&this.proxy.$fireModelOpenedEvent({uri:e.uri.toString(),lines:e.getText().split(e.eol),eol:e.eol,dirty:e.dirty,languageId:e.languageId,versionId:e.getMonacoModel().getVersionId()})}))}isDocSyncEnabled(e){const t=e.toString();if(!this.docSyncEnabled.has(t)){const e=this.docManager.getModelReference(new s.URI(t),"mainthread doc size");e&&(this.docSyncEnabled.set(t,e.instance.getMonacoModel().getValueLength()<(this.preference.get("editor.docExtHostSyncMaxSize")||2097152)),e.dispose())}return this.docSyncEnabled.get(t)}onEditorDocumentModelContentChangeEvent(e){this.isDocSyncEnabled(e.payload.uri)&&this.proxy.$fireModelChangedEvent({changes:e.payload.changes,uri:e.payload.uri.toString(),eol:e.payload.eol,dirty:e.payload.dirty,versionId:e.payload.versionId,isRedoing:e.payload.isRedoing,isUndoing:e.payload.isUndoing})}async onEditorDocumentModelWillSaveEvent(e){this.isDocSyncEnabled(e.payload.uri)&&await this.proxy.$fireModelWillSaveEvent({uri:e.payload.uri.toString(),reason:e.payload.reason})}onEditorDocumentModelOptionChangedEvent(e){this.isDocSyncEnabled(e.payload.uri)&&this.proxy.$fireModelOptionsChangedEvent({encoding:e.payload.encoding,uri:e.payload.uri.toString(),languageId:e.payload.languageId})}onEditorDocumentModelContentCreationEvent(e){this.isDocSyncEnabled(e.payload.uri)&&this.proxy.$fireModelOpenedEvent({uri:e.payload.uri.toString(),lines:e.payload.content.split(e.payload.eol),eol:e.payload.eol,dirty:!1,languageId:e.payload.languageId,versionId:e.payload.versionId})}onEditorDocumentModelRemovedEvent(e){this.isDocSyncEnabled(e.payload)&&this.proxy.$fireModelRemovedEvent({uri:e.payload.toString()})}onEditorDocumentModelSavingEvent(e){this.isDocSyncEnabled(e.payload)&&this.proxy.$fireModelSavedEvent({uri:e.payload.toString()})}async $tryCreateDocument(e){e||(e={});const{language:t,content:n}=e,i=await this.docManager.createModelReference(new s.URI(`${s.Schemes.untitled}://temp/Untitled-`+this.tempDocIdCount.id),"ext-create-document");return t&&(i.instance.languageId=t),(0,s.isUndefinedOrNull)(n)||i.instance.updateContent(n),i.instance.uri.toString()}async $tryOpenDocument(e){const t=await this.docManager.createModelReference(new s.URI(e),"ext-open-document");this.extHoldDocuments.add(t)}async $trySaveDocument(e){const t=await this.docManager.getModelReference(new s.URI(e),"ext-saving-document");if(t)try{return t.instance.save(!0)}finally{t.dispose()}return!1}async $fireTextDocumentChangedEvent(e){this.provider.onDidChangeContentEmitter.fire(new s.URI(e))}$unregisterDocumentProviderWithScheme(e){this.editorDisposers.has(e)&&(this.editorDisposers.get(e).dispose(),this.editorDisposers.delete(e))}$registerDocumentProviderWithScheme(e){this.$unregisterDocumentProviderWithScheme(e);const t=new s.Disposable;t.addDispose(this.resourceService.registerResourceProvider({scheme:e,provideResource:async e=>Promise.all([this.labelService.getName(e),this.labelService.getIcon(e)]).then((([t,n])=>({name:t,icon:n,uri:e,metadata:null})))})),t.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(e,((t,n)=>{this.fileServiceClient.handlesScheme(e)||n.push({type:"code",readonly:!0})}))),t.addDispose({dispose:()=>{this.provider.unregisterScheme(e)}}),this.provider.registerScheme(e),this.editorDisposers.set(e,t)}dispose(){super.dispose();for(const e of this.editorDisposers.values())e.dispose();this.editorDisposers.clear()}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",d.UntitledDocumentIdCounter)],m.prototype,"tempDocIdCount",void 0),i.__decorate([(0,r.Autowired)(l.IEditorDocumentModelService),i.__metadata("design:type",Object)],m.prototype,"docManager",void 0),i.__decorate([(0,r.Autowired)(l.IEditorDocumentModelContentRegistry),i.__metadata("design:type",Object)],m.prototype,"contentRegistry",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",c.ResourceService)],m.prototype,"resourceService",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",l.EditorComponentRegistry)],m.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",a.LabelService)],m.prototype,"labelService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],m.prototype,"preference",void 0),i.__decorate([(0,r.Autowired)(u.IFileServiceClient),i.__metadata("design:type",Object)],m.prototype,"fileServiceClient",void 0),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelContentChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelContentChangedEvent]),i.__metadata("design:returntype",void 0)],m.prototype,"onEditorDocumentModelContentChangeEvent",null),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelWillSaveEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelWillSaveEvent]),i.__metadata("design:returntype",Promise)],m.prototype,"onEditorDocumentModelWillSaveEvent",null),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelOptionChangedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelOptionChangedEvent]),i.__metadata("design:returntype",void 0)],m.prototype,"onEditorDocumentModelOptionChangedEvent",null),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelCreationEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelCreationEvent]),i.__metadata("design:returntype",void 0)],m.prototype,"onEditorDocumentModelContentCreationEvent",null),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelRemovalEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelRemovalEvent]),i.__metadata("design:returntype",void 0)],m.prototype,"onEditorDocumentModelRemovedEvent",null),i.__decorate([(0,s.OnEvent)(l.EditorDocumentModelSavedEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[l.EditorDocumentModelSavedEvent]),i.__metadata("design:returntype",void 0)],m.prototype,"onEditorDocumentModelSavingEvent",null),m=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],m),t.MainThreadExtensionDocumentData=m;class g{constructor(){this.maxLength=83886080,this.maxAge=18e4,this.minAge=2e4,this.refs=[],this.length=0}add(e){const t=e.instance.getText().length;this.length+=t;let n=null;const i={ref:e,dispose:()=>{const r=this.refs.indexOf(i);0!==r&&(this.length-=t,e.dispose(),clearTimeout(n),this.refs.splice(r,1))},createTimeStamp:(new Date).getTime()};n=setTimeout((()=>{i.dispose()}),this.maxAge),this.refs.push(i),this.clean()}clean(){for(;this.length>this.maxLength&&this.refs.length>1;){if(this.refs[0].createTimeStamp+this.minAge>(new Date).getTime())break;this.disposeFirst()}}disposeFirst(){const e=this.refs.shift();e&&e.dispose()}}},73123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadEditorTabsService=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(90642)),a=n(92345),s=n(97276),c=n(24453);let l=class extends o.Disposable{constructor(e){super(),this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(c.ExtHostAPIIdentifier.ExtHostEditorTabs),this.addDispose(this.workbenchEditorService.onDidEditorGroupsChanged((()=>{this._pushEditorTabs()}))),this.addDispose(this.workbenchEditorService.onActiveResourceChange((()=>{this._pushEditorTabs()}))),this.workbenchEditorService.contributionsReady.promise.then((()=>{this._pushEditorTabs()}))}_pushEditorTabs(){var e;const t=[];for(const n of this.workbenchEditorService.editorGroups)for(const i of n.resources)!n.disposed&&i&&t.push({group:n.index,name:i.name,resource:i.uri.toString(),isActive:(null===(e=this.workbenchEditorService.currentResource)||void 0===e?void 0:e.uri)===i.uri});this.proxy.$acceptEditorTabs(t)}};i.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),i.__metadata("design:type",s.WorkbenchEditorServiceImpl)],l.prototype,"workbenchEditorService",void 0),l=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],l),t.MainThreadEditorTabsService=l},9558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cursorStyleToString=t.MainThreadEditorService=void 0;const i=n(70655),r=i.__importDefault(n(23279)),o=n(39993),a=(n(41037),n(90642)),s=n(92345),c=n(70888),l=n(35579),d=n(97276),u=n(43881),p=n(47986),h=i.__importStar(n(63138)),m=n(60213),g=n(24453),f=n(65049),_=n(62821);let b=class extends a.WithEventBus{constructor(e,t){super(),this.rpcProtocol=e,this.documents=t,this.proxy=this.rpcProtocol.getProxy(g.ExtHostAPIIdentifier.ExtHostEditors),this.$getInitialState().then((e=>{this.proxy.$acceptChange(e)}))}async $getInitialState(){this.startEvents();const e=this.editorService.editorGroups.map((e=>{if(e.currentOpenType&&C(e.currentOpenType)){const t=e.currentEditor;if(!t.currentDocumentModel)return;if(!this.documents.isDocSyncEnabled(t.currentDocumentModel.uri))return;return{id:y(e,e.currentResource.uri),uri:t.currentDocumentModel.uri.toString(),selections:t.getSelections()||[],options:v(t.monacoEditor),viewColumn:S(e),visibleRanges:t.monacoEditor.getVisibleRanges()}}})).filter((e=>!!e)),t=this.editorService.currentResource&&e.find((e=>e.uri===this.editorService.currentResource.uri.toString()));return{created:e,actived:t&&this.documents.isDocSyncEnabled(t.uri)&&t.id}}async $closeEditor(e){if(this.getEditor(e)){const t=this.getGroup(e);t.close(t.currentResource.uri)}}async $revealRange(e,t,n){const i=this.getEditor(e);if(i)switch(n){case g.TextEditorRevealType.InCenter:return i.monacoEditor.revealRangeInCenter(t);case g.TextEditorRevealType.AtTop:return i.monacoEditor.revealRangeAtTop(t);case g.TextEditorRevealType.InCenterIfOutsideViewport:return i.monacoEditor.revealRangeInCenterIfOutsideViewport(t);default:return i.monacoEditor.revealRange(t)}}async $createTextEditorDecorationType(e,t){this.resolveIconPaths(t),this.resolveIconPaths(t.dark),this.resolveIconPaths(t.light),this.decorationService.createTextEditorDecorationType(t,e)}resolveIconPaths(e){if(!e)return e;if(e.gutterIconPath){let t;t="string"==typeof e.gutterIconPath?a.URI.file(e.gutterIconPath):a.URI.from(e.gutterIconPath),e.gutterIconPath=this.staticResourceService.resolveStaticResource(t).toString()}}async $deleteTextEditorDecorationType(e){const t=this.decorationService.getTextEditorDecorationType(e);t&&t.dispose()}async $applyDecoration(e,t,n){const i=this.getEditor(e);i&&i.applyDecoration(t,n)}async $insertSnippet(e,t,n=[],i={undoStopAfter:!0,undoStopBefore:!0}){const r=this.getEditor(e);r&&r.insertSnippet(t,n,i)}async $updateOptions(e,t){const n=this.getEditor(e);n&&await this.setConfiguration(n.monacoEditor,t)}getEditor(e){var t,n;const i=this.getGroup(e);if(!i)return;const r=i.currentResource;if(r&&i.currentOpenType&&C(i.currentOpenType)){if(e===y(i,r.uri))return i.currentEditor;if("diff"===(null===(t=i.currentOpenType)||void 0===t?void 0:t.type)&&e===y(i,r.metadata.original,"original"))return i.diffEditor.originalEditor;if("diff"===(null===(n=i.currentOpenType)||void 0===n?void 0:n.type)&&e===y(i,r.metadata.modified,"modified"))return i.diffEditor.modifiedEditor}}getGroup(e){const t=function(e){return e.substr(0,e.indexOf("."))}(e);return this.editorService.getEditorGroup(t)}startEvents(){this.addDispose(this.eventBus.on(c.EditorGroupChangeEvent,(e=>{const t=e.payload;if(!w(t.newResource,t.oldResource)||!E(t.newOpenType,t.oldOpenType)){const e={};if(t.newOpenType&&("code"===t.newOpenType.type||"diff"===t.newOpenType.type)){const n=t.group.currentEditor;if(n.currentDocumentModel)if(this.documents.isDocSyncEnabled(n.currentDocumentModel.uri))if(e.created=[],"diff"===t.newOpenType.type){const n=t.group.diffEditor.originalEditor,i=t.group.diffEditor.modifiedEditor,r=y(t.group,t.newResource.metadata.original,"original");e.created.push({id:r,uri:n.currentUri.toString(),selections:n.getSelections()||[],options:v(n.monacoEditor),viewColumn:S(t.group),visibleRanges:n.monacoEditor.getVisibleRanges()});const o=y(t.group,t.newResource.metadata.modified,"modified");e.created.push({id:o,uri:i.currentUri.toString(),selections:i.getSelections()||[],options:v(i.monacoEditor),viewColumn:S(t.group),visibleRanges:i.monacoEditor.getVisibleRanges()})}else e.created.push({id:y(t.group,t.newResource.uri),uri:n.currentDocumentModel.uri.toString(),selections:n.getSelections()||[],options:v(n.monacoEditor),viewColumn:S(t.group),visibleRanges:n.monacoEditor.getVisibleRanges()});else;else;w(t.newResource,t.oldResource)&&!E(t.newOpenType,t.oldOpenType)&&t.newResource===this.editorService.currentResource&&(e.actived=y(t.group,t.newResource.uri))}!t.oldOpenType||"code"!==t.oldOpenType.type&&"diff"!==t.oldOpenType.type||(e.removed=[],"diff"===t.oldOpenType.type?(e.removed.push(y(t.group,t.oldResource.metadata.original,"original")),e.removed.push(y(t.group,t.oldResource.metadata.modified,"modified"))):e.removed=[y(t.group,t.oldResource.uri)]),this.proxy.$acceptChange(e)}}))),this.addDispose(this.editorService.onActiveEditorUriChange((e=>{var t,n,i,r,o;if(e&&this.editorService.currentEditorGroup&&C(this.editorService.currentEditorGroup.currentOpenType)){let a;const s="diff"===(null===(t=this.editorService.currentEditorGroup.currentOpenType)||void 0===t?void 0:t.type)&&(null===(n=this.editorService.currentEditorGroup.diffEditor.originalEditor.currentUri)||void 0===n?void 0:n.isEqual(e)),c="diff"===(null===(i=this.editorService.currentEditorGroup.currentOpenType)||void 0===i?void 0:i.type)&&(null===(r=this.editorService.currentEditorGroup.diffEditor.modifiedEditor.currentUri)||void 0===r?void 0:r.isEqual(e));s&&(a="original"),c&&(a="modified"),a?this.proxy.$acceptChange({actived:y(this.editorService.currentEditorGroup,e,a)}):this.proxy.$acceptChange({actived:y(this.editorService.currentEditorGroup,null===(o=this.editorService.currentEditorGroup.currentResource)||void 0===o?void 0:o.uri)})}else this.proxy.$acceptChange({actived:"-1"})})));const e=e=>{const t=y(e.payload.group,e.payload.editorUri,e.payload.side);this.proxy.$acceptPropertiesChange({id:t,selections:{selections:e.payload.selections,source:e.payload.source}})},t=(0,r.default)((t=>e(t)),50,{maxWait:200,leading:!0,trailing:!0});this.addDispose(this.eventBus.on(c.EditorSelectionChangeEvent,(n=>{"mouse"===n.payload.source?t(n):(t.cancel(),e(n))}))),this.addDispose(this.eventBus.on(c.EditorVisibleChangeEvent,(0,r.default)((e=>{const t=y(e.payload.group,e.payload.resource.uri);this.proxy.$acceptPropertiesChange({id:t,visibleRanges:e.payload.visibleRanges})}),50,{maxWait:200,leading:!0,trailing:!0}))),this.addDispose(this.eventBus.on(c.EditorConfigurationChangedEvent,(e=>{const t=y(e.payload.group,e.payload.resource.uri);e.payload.group.currentEditor&&e.payload.group.currentEditor.monacoEditor.getModel()&&this.proxy.$acceptPropertiesChange({id:t,options:v(e.payload.group.currentEditor.monacoEditor)})}))),this.addDispose(this.eventBus.on(c.EditorGroupIndexChangedEvent,(e=>{if((t=e.payload.group).currentOpenType&&C(t.currentOpenType)){const t=y(e.payload.group,e.payload.group.currentResource.uri);this.proxy.$acceptPropertiesChange({id:t,viewColumn:S(e.payload.group)})}var t})))}async $applyEdits(e,t,n,i){const r=this.getEditor(e);if(r&&r.currentDocumentModel){const e=r.currentDocumentModel.getMonacoModel();if(e&&e.getVersionId()===t){void 0!==i.setEndOfLine&&e.pushEOL(i.setEndOfLine);const t=n.map((e=>({range:h.Range.lift(e.range),text:e.text,forceMoveMarkers:e.forceMoveMarkers})));return i.undoStopBefore&&r.monacoEditor.pushUndoStop(),r.monacoEditor.executeEdits("MainThreadTextEditor",t),i.undoStopAfter&&r.monacoEditor.pushUndoStop(),!0}return!1}return!1}async $openResource(e,t){t.forceOpenType={type:"code"},t.focus=!0,t=Object.assign(Object.assign({},t),(0,f.viewColumnToResourceOpenOptions)(t.viewColumn));const n=await this.editorService.open(new a.URI(e),t);if(n)return y(n.group,n.resource.uri);throw new Error("Editor Open uri "+e.toString()+" Failed")}$setSelections(e,t){return this.getEditor(e)?(this.getEditor(e).setSelections(t),Promise.resolve()):Promise.reject(`No Such TextEditor: ${e}`)}setConfiguration(e,t){if(e.getModel()&&this._setIndentConfiguration(e.getModel(),t),e){if(t.cursorStyle){const n=k(t.cursorStyle);e.updateOptions({cursorStyle:n})}if(void 0!==t.lineNumbers){let n;switch(t.lineNumbers){case p.RenderLineNumbersType.On:n="on";break;case p.RenderLineNumbersType.Relative:n="relative";break;default:n="off"}e.updateOptions({lineNumbers:n})}}}$getDiffInformation(e){const t=this.getEditor(e);if(!t)return Promise.reject(new Error("No such TextEditor"));const n=t.monacoEditor;if(!n)return Promise.reject(new Error("No such CodeEditor"));const i=n.getId(),r=this.codeEditorService.listDiffEditors(),[o]=r.filter((e=>e.originalEditor.getId()===i||e.modifiedEditor.getId()===i));if(o)return Promise.resolve(o.monacoDiffEditor.getLineChanges()||[]);const a=n.getContribution("editor.contrib.dirtydiff");return a?Promise.resolve(a.getChanges()):Promise.resolve([])}_setIndentConfiguration(e,t){const n=m.StaticServices.modelService.get().getCreationOptions(e.getLanguageIdentifier().language,e.uri,e.isForSimpleWidget);if("auto"===t.tabSize||"auto"===t.insertSpaces){let i=n.insertSpaces,r=n.tabSize;return"auto"!==t.insertSpaces&&void 0!==t.insertSpaces&&(i=t.insertSpaces),"auto"!==t.tabSize&&void 0!==t.tabSize&&(r=t.tabSize),void e.detectIndentation(i,r)}const i={};void 0!==t.insertSpaces&&(i.insertSpaces=t.insertSpaces),void 0!==t.tabSize&&(i.tabSize=t.tabSize),void 0!==t.indentSize&&("tabSize"===t.indentSize?i.indentSize=i.tabSize||n.tabSize:i.indentSize=t.indentSize),e.updateOptions(i)}};function y(e,t,n){return e.name+"."+(n?`${n}.`:"")+t.toString()}function v(e){const t=e.getModel().getOptions();return{tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,cursorStyle:e.getOption(h.editor.EditorOption.cursorStyle),lineNumbers:e.getOption(h.editor.EditorOption.lineNumbers).renderType}}function C(e){return!!e&&("code"===e.type||"diff"===e.type)}function S(e){return e.index+1}function w(e,t){return!e&&!t||!!(e&&t&&e.uri.isEqual(t.uri))}function E(e,t){return!e&&!t||!(!e||!t||e.type!==t.type||e.componentId!==t.componentId)}function k(e){if(e===g.TextEditorCursorStyle.Line)return"line";if(e===g.TextEditorCursorStyle.Block)return"block";if(e===g.TextEditorCursorStyle.Underline)return"underline";if(e===g.TextEditorCursorStyle.LineThin)return"line-thin";if(e===g.TextEditorCursorStyle.BlockOutline)return"block-outline";if(e===g.TextEditorCursorStyle.UnderlineThin)return"underline-thin";throw new Error("cursorStyleToString: Unknown cursorStyle")}i.__decorate([(0,o.Autowired)(s.WorkbenchEditorService),i.__metadata("design:type",d.WorkbenchEditorServiceImpl)],b.prototype,"editorService",void 0),i.__decorate([(0,o.Autowired)(c.IEditorDecorationCollectionService),i.__metadata("design:type",Object)],b.prototype,"decorationService",void 0),i.__decorate([(0,o.Autowired)(s.EditorCollectionService),i.__metadata("design:type",l.EditorCollectionServiceImpl)],b.prototype,"codeEditorService",void 0),i.__decorate([(0,o.Autowired)(u.StaticResourceService),i.__metadata("design:type",u.StaticResourceService)],b.prototype,"staticResourceService",void 0),b=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__param(0,(0,o.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object,_.MainThreadExtensionDocumentData])],b),t.MainThreadEditorService=b,t.cursorStyleToString=k},19820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadEnv=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(49943),s=n(894),c=n(79653),l=n(90642),d=n(67350),u=n(24453),p=n(99727),h=n(48469);let m=class{constructor(e,t){this.rpcProtocol=e,this.storage=t,this.proxy=this.rpcProtocol.getProxy(u.ExtHostAPIIdentifier.ExtHostEnv),this.eventDispose=this.loggerManger.onDidChangeLogLevel((e=>{this.proxy.$fireChangeLogLevel(e)})),this.setLogLevel(),this.setEnvValues()}isSupportedLink(e){return c.HttpOpener.standardSupportedLinkSchemes.has(e.scheme)||e.scheme===this.appConfig.uriScheme}async setEnvValues(){const{appName:e,uriScheme:t,appHost:n,appRoot:i}=this.appConfig,r=await this.storage.$getValue(!0,l.firstSessionDateStorageKey);this.proxy.$setEnvValues({appName:e,uriScheme:t,appHost:n,appRoot:i,language:(0,l.getCodeLanguage)(),uiKind:this.appConfig.isElectronRenderer?p.UIKind.Desktop:p.UIKind.Web,firstSessionDate:null==r?void 0:r.date})}dispose(){this.eventDispose.dispose()}async setLogLevel(){const e=await this.loggerManger.getGlobalLogLevel();await this.proxy.$setLogLevel(e)}async $clipboardReadText(){try{return await this.clipboardService.readText()}catch(e){return""}}$clipboardWriteText(e){return new Promise((async t=>{try{await this.clipboardService.writeText(e)}catch(e){}t()}))}async $openExternal(e){return!!this.isSupportedLink(l.URI.from(e))&&await this.openerService.open(e.toString(!0))}getWindowId(){if(this.appConfig.isElectronRenderer)return s.electronEnv.currentWindowId;return this.injector.get(a.WSChannelHandler).clientId}async $asExternalUri(e){const{uriScheme:t}=this.appConfig,n=l.URI.from(e);if(n.scheme===t){const e=this.getWindowId();let t=n.query;return t?t+=`&windowId=${e}`:t=`windowId=${e}`,n.withQuery(t).codeUri}return this.externalUriService.resolveExternalUri(n).codeUri}};i.__decorate([(0,r.Autowired)(d.ILoggerManagerClient),i.__metadata("design:type",Object)],m.prototype,"loggerManger",void 0),i.__decorate([(0,r.Autowired)(s.IOpenerService),i.__metadata("design:type",Object)],m.prototype,"openerService",void 0),i.__decorate([(0,r.Autowired)(s.IClipboardService),i.__metadata("design:type",Object)],m.prototype,"clipboardService",void 0),i.__decorate([(0,r.Autowired)(s.IExternalUriService),i.__metadata("design:type",Object)],m.prototype,"externalUriService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(s.AppConfig),i.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),m=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object,h.MainThreadStorage])],m),t.MainThreadEnv=m},69910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadFileSystemEvent=void 0;const i=n(70655),r=n(39993),o=n(25880),a=(n(41037),n(894)),s=n(45467),c=n(90642),l=n(33361),d=n(44049),u=n(1500),p=n(53743),h=n(24453);let m=class extends c.Disposable{constructor(e){super(),this.rpcProtocol=e,this._proxy=this.rpcProtocol.getProxy(h.ExtHostAPIIdentifier.ExtHostFileSystemEvent),this._dispatchFileEventListener(),this._participateFileOperation(),this._initShowPreview()}_dispatchFileEventListener(){const e={created:[],changed:[],deleted:[]};this.addDispose(this.fileService.onFilesChanged((t=>{let n=!1;for(const i of t)switch(i.type){case l.FileChangeType.ADDED:e.created.push(new c.URI(i.uri).codeUri),n=!0;break;case l.FileChangeType.UPDATED:e.changed.push(new c.URI(i.uri).codeUri),n=!0;break;case l.FileChangeType.DELETED:e.deleted.push(new c.URI(i.uri).codeUri),n=!0}n&&(this._proxy.$onFileEvent(e),e.created=[],e.changed=[],e.deleted=[])})))}_participateFileOperation(){this.addDispose(this.workspaceFileService.registerFileOperationParticipant({participate:this.fileOperationParticipant.bind(this)})),this.addDispose(this.workspaceFileService.onDidRunWorkspaceFileOperation((e=>this._proxy.$onDidRunFileOperation(e.operation,e.files))))}_initShowPreview(){this._showPreview=this.preferenceService.get("workbench.refactoringChanges.showPreviewStrategy"),this.addDispose(this.preferenceService.onPreferenceChanged((e=>{"workbench.refactoringChanges.showPreviewStrategy"===e.preferenceName&&(this._showPreview=e.newValue)})))}async fileOperationParticipant(...e){const[t,n,i,r,a]=e,s=new c.CancellationTokenSource(a),l=setTimeout((()=>s.cancel()),r),u=await this.progressService.withProgress({location:c.ProgressLocation.Notification,title:this.getProgressLabel(n),cancellable:!0,delay:Math.min(r/2,3e3)},(()=>{const e=this._proxy.$onWillRunFileOperation(n,t,r,a);return(0,c.raceCancellation)(e,s.token)}),(()=>{s.cancel()})).finally((()=>{s.dispose(),clearTimeout(l)}));if(!u)return;let p=this._showPreview;const h=u.edit.edits.some((e=>{var t;return null===(t=e.metadata)||void 0===t?void 0:t.needsConfirmation}));if("askMe"===p){let e;if(e=1===u.extensionNames.length?0===n?(0,c.formatLocalize)("refactoring-changes.ask.1.create",u.extensionNames[0]):3===n?(0,c.formatLocalize)("refactoring-changes.ask.1.copy",u.extensionNames[0]):2===n?(0,c.formatLocalize)("refactoring-changes.ask.1.move",u.extensionNames[0]):(0,c.formatLocalize)("refactoring-changes.ask.1.delete",u.extensionNames[0]):0===n?(0,c.formatLocalize)("refactoring-changes.ask.N.create",u.extensionNames.length):3===n?(0,c.formatLocalize)("refactoring-changes.ask.N.copy",u.extensionNames.length):2===n?(0,c.formatLocalize)("refactoring-changes.ask.N.move",u.extensionNames.length):(0,c.formatLocalize)("refactoring-changes.ask.N.delete",u.extensionNames.length),h){const t=[(0,c.localize)("refactoring-changes.msg.showPreview"),(0,c.localize)("refactoring-changes.msg.skipChanges")];if(p="show",await this.dialogService.open(e,o.MessageType.Info,t)===t[1])return}else{const t=[(0,c.localize)("refactoring-changes.msg.showPreview"),(0,c.localize)("refactoring-changes.msg.skipChanges"),(0,c.localize)("component.modal.okText")],n=await this.dialogService.open(e,o.MessageType.Info,t);if(n===t[1])return;p=n===t[0]?"show":"hide"}}this.logger.log("[onWill-handler] applying additional workspace edit from extensions",u.extensionNames);const m=null==u?void 0:u.edit;m&&await this.bulkEditService.apply(d.ResourceEdit.convert(m),{showPreview:"show"===p})}getProgressLabel(e){switch(e){case 0:return(0,c.localize)("fileOperation.create","Running 'File Create' participants...");case 1:return(0,c.localize)("fileOperation.delete","Running 'File Delete' participants...");case 3:return(0,c.localize)("fileOperation.copy","Running 'File Copy' participants...");case 2:return(0,c.localize)("fileOperation.move","Running 'File Move' participants...")}}};i.__decorate([(0,r.Autowired)(l.IFileServiceClient),i.__metadata("design:type",Object)],m.prototype,"fileService",void 0),i.__decorate([(0,r.Autowired)(p.IWorkspaceFileService),i.__metadata("design:type",Object)],m.prototype,"workspaceFileService",void 0),i.__decorate([(0,r.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(s.IProgressService),i.__metadata("design:type",Object)],m.prototype,"progressService",void 0),i.__decorate([(0,r.Autowired)(c.ILogger),i.__metadata("design:type",Object)],m.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(u.IDialogService),i.__metadata("design:type",Object)],m.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(p.IBulkEditServiceShape),i.__metadata("design:type",Object)],m.prototype,"bulkEditService",void 0),m=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],m),t.MainThreadFileSystemEvent=m},75855:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadFileSystem=void 0;const r=n(70655),o=n(39993),a=(n(41037),n(894)),s=n(27008),c=n(17735),l=n(24453),d=n(65049),u=n(58534);let p=i=class{constructor(e){this.rpcProtocol=e,this.disposable=new a.Disposable,this._fileProvider=new Map,this._proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostFileSystem);const t=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostFileSystemInfo);for(const e of this._fileService.listCapabilities())t.$acceptProviderInfos(e.scheme,e.capabilities);this.disposable.addDispose(this._fileService.onDidChangeFileSystemProviderRegistrations((e=>{var n,i;return t.$acceptProviderInfos(e.scheme,null!==(i=null===(n=e.provider)||void 0===n?void 0:n.capabilities)&&void 0!==i?i:null)}))),this.disposable.addDispose(this._fileService.onDidChangeFileSystemProviderCapabilities((e=>t.$acceptProviderInfos(e.scheme,e.provider.capabilities))))}dispose(){this.disposable.dispose(),this._fileProvider.forEach((e=>e.dispose())),this._fileProvider.clear()}$registerFileSystemProvider(e,t,n){this.disposable.addDispose(this.schemeRegistry.registerFileSystemProvider({scheme:t})),this._fileProvider.set(e,new h(this._fileService,t,n,e,this._proxy))}$unregisterProvider(e){(0,a.dispose)(this._fileProvider.get(e)),this._fileProvider.delete(e)}$onFileSystemChange(e,t){const n=this._fileProvider.get(e);if(!n)throw new Error("Unknown file provider");n.$onFileSystemChange(t)}$stat(e){return this._fileService.getFileStat(a.URI.revive(e).toString()).then((e=>(0,d.toFileStat)(e))).catch(i._handleError)}$readdir(e){return this._fileService.getFileStat(a.URI.revive(e).toString()).then((e=>{if(!e)throw new Error("file stat undefined");if(!e.isDirectory){const t=new Error(e.uri);throw t.name=u.FileSystemProviderErrorCode.FileNotADirectory,t}return e.children?e.children.map((e=>[new a.URI(e.uri).displayName,i._asFileType(e)])):[]})).catch(i._handleError)}static _asFileType(e){let t=0;return e.type&&e.type===c.FileType.File?t+=c.FileType.File:e.isDirectory&&(t+=c.FileType.Directory),e.isSymbolicLink&&(t+=c.FileType.SymbolicLink),t}$readFile(e){return this._fileService.readFile(a.URI.revive(e).toString()).then((e=>e.content.buffer)).catch(i._handleError)}async $writeFile(e,t){const n=a.URI.revive(e),r=await this._fileService.getFileStat(n.toString(),!1);return r?this._fileService.setContent(r,t).then((()=>{})).catch(i._handleError):(await(0,s.ensureDir)(new a.URI(n).path.dir.toString(),{mkdir:e=>this.$mkdir(a.URI.file(e).codeUri),access:e=>this._fileService.getFileStat(a.URI.file(e).codeUri.toString(),!1).then((e=>!!e))}),this._fileService.createFile(n.toString(),{content:a.BinaryBuffer.wrap(t).toString()}).then((()=>{})).catch(i._handleError))}$rename(e,t,n){return this._fileService.move(a.URI.revive(e).toString(),a.URI.revive(t).toString(),n).then((()=>{})).catch(i._handleError)}$copy(e,t,n){return this._fileService.copy(a.URI.revive(e).toString(),a.URI.revive(t).toString(),n).then((()=>{})).catch(i._handleError)}$mkdir(e){return this._fileService.createFolder(a.URI.revive(e).toString()).then((()=>{})).catch(i._handleError)}$delete(e,t){return this._fileService.delete(a.URI.revive(e).toString(),{moveToTrash:t.useTrash}).catch(i._handleError)}static _handleError(e){if(e instanceof c.FileOperationError)switch(e.fileOperationResult){case 1:e.name=u.FileSystemProviderErrorCode.FileNotFound;break;case 0:e.name=u.FileSystemProviderErrorCode.FileIsADirectory;break;case 6:e.name=u.FileSystemProviderErrorCode.NoPermissions;break;case 4:e.name=u.FileSystemProviderErrorCode.FileExists}throw e}};r.__decorate([(0,o.Autowired)(c.IFileServiceClient),r.__metadata("design:type",Object)],p.prototype,"_fileService",void 0),r.__decorate([(0,o.Autowired)(c.IBrowserFileSystemRegistry),r.__metadata("design:type",Object)],p.prototype,"schemeRegistry",void 0),p=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],p),t.MainThreadFileSystem=p;class h{constructor(e,t,n,i,r){this._handle=i,this._proxy=r,this._onDidChange=new a.Emitter,this.onDidChangeFile=this._onDidChange.event,this.onDidChangeCapabilities=a.Event.None,this.capabilities=n,this._registration=e.registerProvider(t,this)}get readonly(){return!!(2048&this.capabilities)}dispose(){this._registration.dispose(),this._onDidChange.dispose()}watch(e,t){const n=Math.random();return this._proxy.$watch(this._handle,n,e,t),n}unwatch(e){this._proxy.$unwatch(this._handle,e)}$onFileSystemChange(e){this._onDidChange.fire(e.map(h._createFileChange))}static _createFileChange(e){return{uri:e.uri,type:e.type}}async stat(e){return await this.doGetStat(e)}async readFile(e){return await this._proxy.$readFile(this._handle,e)}writeFile(e,t,n){return this._proxy.$writeFile(this._handle,e,t,n)}delete(e,t){return this._proxy.$delete(this._handle,e,t)}createDirectory(e){return this._proxy.$mkdir(this._handle,e)}readDirectory(e){return this._proxy.$readdir(this._handle,e)}rename(e,t,n){return this._proxy.$rename(this._handle,e,t,n)}copy(e,t,n){return this._proxy.$copy(this._handle,e,t,n)}async doGetStat(e,t=1){var n;const i=await this._proxy.$stat(this._handle,e),r=(0,d.fromFileStat)(i,e);return r.isDirectory&&(r.children=await this.doGetChildren(e,t)),r.readonly=Boolean((null!==(n=i.permissions)&&void 0!==n?n:0)&u.FilePermission.Readonly)||Boolean(2048&this.capabilities),r}async doGetChildren(e,t){if(t<=0)return[];const n=await this.readDirectory(e);return await Promise.all(n.map((t=>new a.URI(e).resolve(t[0]))).map((e=>this.doGetStat(e.codeUri,t-1))))}}},43995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLanguages=void 0;const i=n(70655),r=n(10152),o=n(39993),a=(n(41037),n(894)),s=n(90642),c=n(19503),l=n(99897),d=n(92345),u=n(70888),p=n(61344),h=n(6109),m=i.__importStar(n(67266)),g=i.__importStar(n(63138)),f=n(60213),_=n(24453),b=n(65049),y=n(93154),v=n(21635),{extname:C}=s.path;let S=class{constructor(e){this.rpcProtocol=e,this.disposables=new Map,this.languageFeatureEnabled=new s.LRUMap(200,100),this._status=new Map,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostLanguages)}_reviveCodeActionDto(e){return e&&e.forEach((e=>this.reviveWorkspaceEditDto(e.edit))),e}dispose(){this.disposables.forEach((e=>{e.dispose()})),this.disposables.clear()}$unregister(e){const t=this.disposables.get(e);t&&(this.disposables.delete(e),t.dispose())}$getLanguages(){return g.languages.getLanguages().map((e=>e.id))}async $changeLanguage(e,t){const n=f.StaticServices.modeService.get().getLanguageIdentifier(t);if(!n||n.language!==t)return Promise.reject(new Error(`Unknown language id: ${t}`));const i=new s.URI(s.URI.revive(e)),r=await this.documentModelManager.createModelReference(i);try{r.instance.languageId=t}finally{r.dispose()}}isLanguageFeatureEnabled(e){const t=e.uri.toString();return this.languageFeatureEnabled.has(t)||this.languageFeatureEnabled.set(t,e.getValueLength()<(this.preference.get("editor.languageFeatureEnabledMaxSize")||2097152)),this.languageFeatureEnabled.get(t)}getUniqueLanguages(){const e=[],t=g.languages.getLanguages().map((e=>e.id));for(const n of t)-1===e.indexOf(n)&&e.push(n);return e}$registerHoverProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createHoverProvider(e,n);this.disposables.set(e,m.HoverProviderRegistry.register(t,i))}createHoverProvider(e,t){return{provideHover:(n,i,r)=>{if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;if(!this.isLanguageFeatureEnabled(n))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_HOVER);return this.proxy.$provideHoverWithDuration(e,n.uri,i,r).then((({result:e,_dur:t})=>(e&&o.timeEnd(C(n.uri.fsPath),{extDuration:t}),e)))}}}isDeflatedSuggestDto(e){return e[_.ISuggestDataDtoField.label]||e[_.ISuggestDataDtoField.kind]||e[_.ISuggestDataDtoField.kindModifier]||e[_.ISuggestDataDtoField.detail]||e[_.ISuggestDataDtoField.documentation]||e[_.ISuggestDataDtoField.sortText]||e[_.ISuggestDataDtoField.filterText]||e[_.ISuggestDataDtoField.preselect]||e[_.ISuggestDataDtoField.range]||e[_.ISuggestDataDtoField.insertTextRules]||e[_.ISuggestDataDtoField.commitCharacters]||e[_.ISuggestDataDtoField.insertText]||e[_.ISuggestDataDtoField.command]}inflateLabel(e){if("object"==typeof e)return e;const t=e.split("~|");return Array.isArray(t)&&t.length>1?{label:t[0],description:t[1],detail:t[2]}:e}inflateSuggestDto(e,t){var n,i,r;if(!this.isDeflatedSuggestDto(t))return t;const o=this.inflateLabel(t[_.ISuggestDataDtoField.label]);return{label:o,kind:null!==(n=t[_.ISuggestDataDtoField.kind])&&void 0!==n?n:m.CompletionItemKind.Property,tags:t[_.ISuggestDataDtoField.kindModifier],detail:t[_.ISuggestDataDtoField.detail],documentation:t[_.ISuggestDataDtoField.documentation],sortText:t[_.ISuggestDataDtoField.sortText],filterText:t[_.ISuggestDataDtoField.filterText],preselect:t[_.ISuggestDataDtoField.preselect],insertText:null!==(i=t[_.ISuggestDataDtoField.insertText])&&void 0!==i?i:"string"==typeof o?o:o.label,range:null!==(r=_.RangeSuggestDataDto.from(t[_.ISuggestDataDtoField.range]))&&void 0!==r?r:e,insertTextRules:t[_.ISuggestDataDtoField.insertTextRules],commitCharacters:t[_.ISuggestDataDtoField.commitCharacters],additionalTextEdits:t[_.ISuggestDataDtoField.additionalTextEdits],command:t[_.ISuggestDataDtoField.command],_id:t.x}}$registerCompletionSupport(e,t,n,i){this.disposables.set(e,g.languages.registerCompletionItemProvider((0,b.fromLanguageSelector)(t),{triggerCharacters:n,provideCompletionItems:async(t,n,i,r)=>{if(!this.isLanguageFeatureEnabled(t))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_COMPLETION_ITEMS),a=await this.proxy.$provideCompletionItems(e,t.uri,n,i,r);if(!a)return;a[_.ISuggestResultDtoField.completions].length&&o.timeEnd(C(t.uri.fsPath),{extDuration:a.d});return{suggestions:a[_.ISuggestResultDtoField.completions].map((e=>this.inflateSuggestDto(a[_.ISuggestResultDtoField.defaultRanges],e))),duration:a[_.ISuggestResultDtoField.duration],incomplete:a[_.ISuggestResultDtoField.isIncomplete]||!1,dispose:()=>{a.x&&setTimeout((()=>{this.proxy.$releaseCompletionItems(e,a.x)}),0)}}},resolveCompletionItem:i?async(t,n)=>(this.reporter.point(s.REPORT_NAME.RESOLVE_COMPLETION_ITEM),this.proxy.$resolveCompletionItem(e,t._id,n).then((e=>{if(!e)return t;const n=this.inflateSuggestDto(t.range,e);return(0,y.mixin)(t,n,!0)}))):void 0}))}matchLanguage(e,t){return Array.isArray(e)?e.some((e=>this.matchLanguage(e,t))):r.DocumentFilter.is(e)?!(e.language||!e.pattern&&!e.scheme)||(null==e?void 0:e.language)===t:e===t}matchModel(e,t){return Array.isArray(e)?e.some((e=>this.matchModel(e,t))):r.DocumentFilter.is(e)?(!e.language||e.language===t.languageId)&&((!e.scheme||e.scheme===t.uri.scheme)&&!(e.pattern&&!(0,_.testGlob)(e.pattern,t.uri.path))):e===t.languageId}$registerDefinitionProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createDefinitionProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerDefinitionProvider(e,i));this.disposables.set(e,r)}$registerDeclarationProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e);this.disposables.set(e,i)}createDefinitionProvider(e,t){return{provideDefinition:async(n,i,r)=>{if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;if(!this.isLanguageFeatureEnabled(n))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_DEFINITION),{result:a,_dur:c}=await this.proxy.$provideDefinitionWithDuration(e,n.uri,i,r);if(a){if(o.timeEnd(C(n.uri.fsPath),{extDuration:c}),Array.isArray(a)){const e=[];for(const t of a)e.push(Object.assign(Object.assign({},t),{uri:g.Uri.revive(t.uri)}));return e}return{uri:g.Uri.revive(a.uri),range:a.range}}}}}$registerTypeDefinitionProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createTypeDefinitionProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerTypeDefinitionProvider(e,i));this.disposables.set(e,r)}createTypeDefinitionProvider(e,t){return{provideTypeDefinition:(n,i,r)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_TYPE_DEFINITION);return this.proxy.$provideTypeDefinition(e,n.uri,i,r).then((e=>{if(e){if(o.timeEnd(C(n.uri.fsPath)),Array.isArray(e)){const t=[];for(const n of e)t.push(Object.assign(Object.assign({},n),{uri:g.Uri.revive(n.uri)}));return t}return{uri:g.Uri.revive(e.uri),range:e.range}}}))}}}$registerFoldingRangeProvider(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createFoldingRangeProvider(e,i);if("number"==typeof n){const e=new s.Emitter;this.disposables.set(n,e),r.onDidChange=e.event}const o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerFoldingRangeProvider(e,r));this.disposables.set(e,o)}$emitFoldingRangeEvent(e,t){const n=this.disposables.get(e);n instanceof s.Emitter&&n.fire(t)}createFoldingRangeProvider(e,t){return{provideFoldingRanges:(n,i,r)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_FOLDING_RANGES);return this.proxy.$provideFoldingRange(e,n.uri,i,r).then((e=>(e&&o.timeEnd(C(n.uri.fsPath)),e)))}}}$registerDocumentColorProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createColorProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerColorProvider(e,i));this.disposables.set(e,r)}createColorProvider(e,t){return{provideDocumentColors:(n,i)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const r=this.reporter.time(s.REPORT_NAME.PROVIDE_DOCUMENT_COLORS);return this.proxy.$provideDocumentColors(e,n.uri,i).then((e=>(r.timeEnd(C(n.uri.fsPath)),e.map((e=>{const[t,n,i,r]=e.color;return{color:{red:t,green:n,blue:i,alpha:r},range:e.range}})))))},provideColorPresentations:(t,n,i)=>{if(!this.isLanguageFeatureEnabled(t))return;const r=this.reporter.time(s.REPORT_NAME.PROVIDE_COLOR_PRESENTATIONS);return this.proxy.$provideColorPresentations(e,t.uri,{color:[n.color.red,n.color.green,n.color.blue,n.color.alpha],range:n.range},i).then((e=>(e&&r.timeEnd(C(t.uri.fsPath)),e)))}}}$registerDocumentHighlightProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createDocumentHighlightProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerDocumentHighlightProvider(e,i));this.disposables.set(e,r)}createDocumentHighlightProvider(e,t){return{provideDocumentHighlights:(n,i,r)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_DOCUMENT_HIGHLIGHTS);return this.proxy.$provideDocumentHighlights(e,n.uri,i,r).then((e=>{if(e&&Array.isArray(e)){o.timeEnd(C(n.uri.fsPath));const t=[];for(const n of e)t.push(Object.assign(Object.assign({},n),{kind:void 0!==n.kind?n.kind:g.languages.DocumentHighlightKind.Text}));return t}}))}}}$registerDocumentFormattingProvider(e,t,n){const i=(0,b.fromLanguageSelector)(n),r=this.createDocumentFormattingEditProvider(e,t,i),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerDocumentFormattingEditProvider(e,r));this.disposables.set(e,o)}createDocumentFormattingEditProvider(e,t,n){return{displayName:t.displayName,extensionId:t.id,provideDocumentFormattingEdits:async(t,i)=>{if(!this.isLanguageFeatureEnabled(t))return;if(!this.matchModel(n,_.MonacoModelIdentifier.fromModel(t)))return;const r=this.reporter.time(s.REPORT_NAME.PROVIDE_DOCUMENT_FORMATTING_EDITS);return this.proxy.$provideDocumentFormattingEdits(e,t.uri,i).then((e=>{if(r.timeEnd(C(t.uri.fsPath)),e)return e}))}}}$registerRangeFormattingProvider(e,t,n){const i=(0,b.fromLanguageSelector)(n),r=this.createDocumentRangeFormattingEditProvider(e,t,i),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerDocumentRangeFormattingEditProvider(e,r));this.disposables.set(e,o)}createDocumentRangeFormattingEditProvider(e,t,n){return{displayName:t.displayName,extensionId:t.id,provideDocumentRangeFormattingEdits:async(t,i,r)=>{if(!this.isLanguageFeatureEnabled(t))return;if(!this.matchModel(n,_.MonacoModelIdentifier.fromModel(t)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_DOCUMENT_RANGE_FORMATTING_EDITS);return this.proxy.$provideDocumentRangeFormattingEdits(e,t.uri,i,r).then((e=>{if(o.timeEnd(C(t.uri.fsPath)),e)return e}))}}}$registerOnTypeFormattingProvider(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createOnTypeFormattingProvider(e,i,n),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerOnTypeFormattingEditProvider(e,r));this.disposables.set(e,o)}createOnTypeFormattingProvider(e,t,n){return{autoFormatTriggerCharacters:n,provideOnTypeFormattingEdits:async(n,i,r,o)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const a=this.reporter.time(s.REPORT_NAME.PROVIDE_ON_TYPE_FORMATTING_EDITS);return this.proxy.$provideOnTypeFormattingEditsWithDuration(e,n.uri,i,r,o).then((({result:e,_dur:t})=>(e&&a.timeEnd(C(n.uri.fsPath),{extDuration:t}),e)))}}}$registerCodeLensSupport(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createCodeLensProvider(e,i);if("number"==typeof n){const e=new s.Emitter;this.disposables.set(n,e),r.onDidChange=e.event}const o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerCodeLensProvider(e,r));this.disposables.set(e,o)}createCodeLensProvider(e,t){return{provideCodeLenses:(t,n)=>{if(!this.isLanguageFeatureEnabled(t))return;const i=this.reporter.time(s.REPORT_NAME.PROVIDE_CODE_LENSES);return this.proxy.$provideCodeLenses(e,t.uri,n).then((n=>(n&&i.timeEnd(C(t.uri.fsPath)),{lenses:(null==n?void 0:n.lenses)||[],dispose:()=>(null==n?void 0:n.cacheId)&&this.proxy.$releaseCodeLens(e,n.cacheId)})))},resolveCodeLens:async(t,n,i)=>{if(this.isLanguageFeatureEnabled(t))return this.reporter.point(s.REPORT_NAME.RESOLVE_CODE_LENS),this.proxy.$resolveCodeLens(e,n,i).then((e=>e))}}}$emitCodeLensEvent(e,t){const n=this.disposables.get(e);n instanceof s.Emitter&&n.fire(t)}$clearDiagnostics(e){this.markerManager.clearMarkers(e)}$changeDiagnostics(e,t){for(const[n,i]of t)this.markerManager.updateMarkers(e,n,i)}$registerImplementationProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createImplementationProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerImplementationProvider(e,i));this.disposables.set(e,r)}$registerDocumentLinkProvider(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createLinkProvider(e,n),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerLinkProvider(e,r));this.disposables.set(e,o)}createImplementationProvider(e,t){return{provideImplementation:(n,i,r)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_IMPLEMENTATION);return this.proxy.$provideImplementationWithDuration(e,n.uri,i).then((({result:e,_dur:t})=>{if(e){if(o.timeEnd(C(n.uri.fsPath),{extDuration:t}),Array.isArray(e)){const t=[];for(const n of e)t.push(Object.assign(Object.assign({},n),{uri:g.Uri.revive(n.uri)}));return t}return{uri:g.Uri.revive(e.uri),range:e.range}}}))}}}$registerQuickFixProvider(e,t,n,i,r){const o=(0,b.fromLanguageSelector)(t),a=this.createQuickFixProvider(e,o,n,i,r),c=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(o,e)&&c.push(m.CodeActionProviderRegistry.register(e,a));this.disposables.set(e,c)}createQuickFixProvider(e,t,n,i,r){const o={provideCodeActions:async(n,i,r)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_CODE_ACTIONS),a=await this.proxy.$provideCodeActions(e,n.uri,i,r).then((e=>(o.timeEnd(C(n.uri.fsPath)),e)));return a?{actions:this._reviveCodeActionDto(a.actions),dispose:()=>{"number"==typeof a.cacheId&&this.proxy.$releaseCodeActions(e,a.cacheId)}}:void 0},documentation:n.documentation,providedCodeActionKinds:n.providedKinds,displayName:i};return r&&(o.resolveCodeAction=async(t,n)=>{const i=await this.proxy.$resolveCodeAction(e,t.cacheId,n);return t.edit=this.reviveWorkspaceEditDto(i),t}),o}createLinkProvider(e,t){const n={provideLinks:(t,n)=>{if(!this.isLanguageFeatureEnabled(t))return;const i=this.reporter.time(s.REPORT_NAME.PROVIDE_LINKS);return this.proxy.$provideDocumentLinks(e,t.uri,n).then((n=>{if(!n)return;i.timeEnd(C(t.uri.fsPath));return{links:n.links.map((e=>this.reviveLink(e))),dispose:()=>{n.id&&this.proxy.$releaseDocumentLinks(e,n.id)}}}))}};return t&&(n.resolveLink=(t,n)=>{const i=t;return i.cacheId?this.proxy.$resolveDocumentLink(e,i.cacheId,n).then((e=>{if(e)return this.reviveLink(e)})):t}),n}reviveLink(e){return e.url&&"string"!=typeof e.url&&(e.url=s.URI.revive(e.url)),e}$setLanguageConfiguration(e,t,n){const i={comments:n.comments,brackets:n.brackets,wordPattern:(0,y.reviveRegExp)(n.wordPattern),indentationRules:(0,y.reviveIndentationRule)(n.indentationRules),onEnterRules:(0,y.reviveOnEnterRules)(n.onEnterRules)};this.disposables.set(e,g.languages.setLanguageConfiguration(t,i))}$registerReferenceProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createReferenceProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerReferenceProvider(e,i));this.disposables.set(e,r)}createReferenceProvider(e,t){return{provideReferences:(n,i,r,o)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const a=this.reporter.time(s.REPORT_NAME.PROVIDE_REFERENCES);return this.proxy.$provideReferencesWithDuration(e,n.uri,i,r,o).then((({result:e,_dur:t})=>{if(e&&Array.isArray(e)){a.timeEnd(C(n.uri.fsPath),{extDuration:t});const i=[];for(const t of e)i.push(Object.assign(Object.assign({},t),{uri:g.Uri.revive(t.uri)}));return i}}))}}}$registerWorkspaceSymbolProvider(e){const t=this.createWorkspaceSymbolProvider(e);this.disposables.set(e,this.languageService.registerWorkspaceSymbolProvider(t))}createWorkspaceSymbolProvider(e){return{provideWorkspaceSymbols:(t,n)=>this.proxy.$provideWorkspaceSymbols(e,t.query,n),resolveWorkspaceSymbol:(t,n)=>this.proxy.$resolveWorkspaceSymbol(e,t,n)}}$registerOutlineSupport(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createDocumentSymbolProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerDocumentSymbolProvider(e,i));this.disposables.set(e,r)}createDocumentSymbolProvider(e,t){return{provideDocumentSymbols:(t,n)=>{if(!this.isLanguageFeatureEnabled(t))return;const i=this.reporter.time(s.REPORT_NAME.PROVIDE_DOCUMENT_SYMBOLS);return this.proxy.$provideDocumentSymbols(e,t.uri,n).then((e=>(e&&i.timeEnd(C(t.uri.fsPath)),e)))}}}$registerSignatureHelpProvider(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createSignatureHelpProvider(e,i,n),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerSignatureHelpProvider(e,r));this.disposables.set(e,o)}createSignatureHelpProvider(e,t,n){return{signatureHelpTriggerCharacters:n.triggerCharacters,signatureHelpRetriggerCharacters:n.retriggerCharacters,provideSignatureHelp:(n,i,r,o)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const a=this.reporter.time(s.REPORT_NAME.PROVIDE_SIGNATURE_HELP);return this.proxy.$provideSignatureHelp(e,n.uri,i,o,r).then((t=>{if(t)return a.timeEnd(C(n.uri.fsPath)),{value:t,dispose:()=>t.id&&this.proxy.$releaseSignatureHelp(e,t.id)}}))}}}$registerRenameProvider(e,t,n){const i=(0,b.fromLanguageSelector)(t),r=this.createRenameProvider(e,i,n),o=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(i,e)&&o.push(g.languages.registerRenameProvider(e,r));this.disposables.set(e,o)}createRenameProvider(e,t,n){return{provideRenameEdits:(n,i,r,o)=>{if(!this.isLanguageFeatureEnabled(n))return;if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;const a=this.reporter.time(s.REPORT_NAME.PROVIDE_RENAME_EDITS);return this.proxy.$provideRenameEdits(e,n.uri,i,r,o).then((e=>(e&&a.timeEnd(C(n.uri.fsPath)),this.reviveWorkspaceEditDto(e))))},resolveRenameLocation:n?(n,i,r)=>{if(this.isLanguageFeatureEnabled(n)&&this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return this.proxy.$resolveRenameLocation(e,n.uri,i,r).then((e=>e))}:void 0}}reviveWorkspaceEditDto(e){if(e&&e.edits)for(const t of e.edits)"object"==typeof t.resource?t.resource=g.Uri.revive(t.resource):(t.newUri=g.Uri.revive(t.newUri),t.oldUri=g.Uri.revive(t.oldUri));return e}$registerSelectionRangeProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createSelectionProvider(e,n),r=new s.DisposableCollection;for(const e of this.getUniqueLanguages())this.matchLanguage(n,e)&&r.push(g.languages.registerSelectionRangeProvider(e,i));this.disposables.set(e,r)}createSelectionProvider(e,t){return{provideSelectionRanges:(n,i,r)=>{if(!this.matchModel(t,_.MonacoModelIdentifier.fromModel(n)))return;if(!this.isLanguageFeatureEnabled(n))return;const o=this.reporter.time(s.REPORT_NAME.PROVIDE_SELECTION_RANGES);return this.proxy.$provideSelectionRanges(e,n.uri,i,r).then((e=>(o.timeEnd(C(n.uri.fsPath)),e)))}}}$registerCallHierarchyProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createCallHierarchyProvider(e,n);this.callHierarchyService.registerCallHierarchyProvider(t,i)}reviveCallHierarchyItemDto(e){return e&&(e.uri=s.URI.revive(e.uri)),e}createCallHierarchyProvider(e,t){return{prepareCallHierarchy:async(t,n,i)=>{const r=await this.proxy.$prepareCallHierarchy(e,t.uri,n,i);if(r)return{dispose:()=>{for(const t of r)this.proxy.$releaseCallHierarchy(e,t._sessionId)},roots:r.map(this.reviveCallHierarchyItemDto)}},provideOutgoingCalls:async(t,n)=>{const i=await this.proxy.$provideCallHierarchyOutgoingCalls(e,t._sessionId,t._itemId,n);return i?(i.forEach((e=>{e.to=this.reviveCallHierarchyItemDto(e.to)})),i):i},provideIncomingCalls:async(t,n)=>{const i=await this.proxy.$provideCallHierarchyIncomingCalls(e,t._sessionId,t._itemId,n);return i?(i.forEach((e=>{e.from=this.reviveCallHierarchyItemDto(e.from)})),i):i}}}$registerTypeHierarchyProvider(e,t){const n=(0,b.fromLanguageSelector)(t),i=this.createTypeHierarchyProvider(e,n);this.typeHierarchyService.registerTypeHierarchyProvider(t,i)}createTypeHierarchyProvider(e,t){return{prepareTypeHierarchy:async(t,n,i)=>{const r=await this.proxy.$prepareTypeHierarchy(e,t.uri,n,i);if(r)return{dispose:()=>{for(const t of r)this.proxy.$releaseTypeHierarchy(e,t._sessionId)},roots:r.map(this.reviveTypeHierarchyItemDto)}},provideSupertypes:async(t,n)=>{const i=await this.proxy.$provideTypeHierarchySupertypes(e,t._sessionId,t._itemId,n);return i?i.map(this.reviveTypeHierarchyItemDto):i},provideSubtypes:async(t,n)=>{const i=await this.proxy.$provideTypeHierarchySubtypes(e,t._sessionId,t._itemId,n);return i?i.map(this.reviveTypeHierarchyItemDto):i}}}reviveTypeHierarchyItemDto(e){return e&&(e.uri=s.URI.revive(e.uri)),e}$registerDocumentSemanticTokensProvider(e,t,n){const i=new v.DocumentSemanticTokensProvider(this.proxy,e,n);this.disposables.set(e,m.DocumentSemanticTokensProviderRegistry.register((0,b.fromLanguageSelector)(t),i))}$registerDocumentRangeSemanticTokensProvider(e,t,n){const i=new v.DocumentRangeSemanticTokensProviderImpl(this.proxy,e,n);this.disposables.set(e,m.DocumentRangeSemanticTokensProviderRegistry.register((0,b.fromLanguageSelector)(t),i))}$registerEvaluatableExpressionProvider(e,t){const n={provideEvaluatableExpression:(t,n,i)=>this.proxy.$provideEvaluatableExpression(e,t.uri,n,i)};this.disposables.set(e,this.evaluatableExpressionService.registerEvaluatableExpressionProvider(t,n))}$registerInlineValuesProvider(e,t,n){const i={provideInlineValues:(t,n,i,r)=>this.proxy.$provideInlineValues(e,t.uri,n,i,r)};if("number"==typeof n){const e=new s.Emitter;this.disposables.set(n,e),i.onDidChangeInlineValues=e.event}this.disposables.set(e,l.InlineValuesProviderRegistry.register(t,i))}$emitInlineValuesEvent(e,t){const n=this.disposables.get(e);n instanceof s.Emitter&&n.fire(t)}$registerLinkedEditingRangeProvider(e,t){const n=(0,b.fromLanguageSelector)(t);m.LinkedEditingRangeProviderRegistry.register(n,{provideLinkedEditingRanges:async(t,n,i)=>{const r=await this.proxy.$provideLinkedEditingRanges(e,t.uri,n,i);if(r)return{ranges:r.ranges,wordPattern:r.wordPattern?(0,y.reviveRegExp)(r.wordPattern):void 0}}})}$registerInlayHintsProvider(e,t,n){const i={provideInlayHints:async(t,n,i)=>{const r=await this.proxy.$provideInlayHints(e,t.uri,n,i);return null==r?void 0:r.hints}};if("number"==typeof n){const e=new s.Emitter;this.disposables.set(n,e),i.onDidChangeInlayHints=e.event}this.disposables.set(e,m.InlayHintsProviderRegistry.register(t,i))}$emitInlayHintsEvent(e,t){const n=this.disposables.get(e);n instanceof s.Emitter&&n.fire(t)}$setLanguageStatus(e,t){var n;null===(n=this._status.get(e))||void 0===n||n.dispose(),this._status.set(e,this.languageStatusService.addStatus(t))}$removeLanguageStatus(e){var t;null===(t=this._status.get(e))||void 0===t||t.dispose()}};i.__decorate([(0,o.Autowired)(s.MarkerManager),i.__metadata("design:type",s.MarkerManager)],S.prototype,"markerManager",void 0),i.__decorate([(0,o.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],S.prototype,"preference",void 0),i.__decorate([(0,o.Autowired)(a.IReporterService),i.__metadata("design:type",Object)],S.prototype,"reporter",void 0),i.__decorate([(0,o.Autowired)(d.ILanguageService),i.__metadata("design:type",Object)],S.prototype,"languageService",void 0),i.__decorate([(0,o.Autowired)(p.ICallHierarchyService),i.__metadata("design:type",Object)],S.prototype,"callHierarchyService",void 0),i.__decorate([(0,o.Autowired)(h.ITypeHierarchyService),i.__metadata("design:type",Object)],S.prototype,"typeHierarchyService",void 0),i.__decorate([(0,o.Autowired)(c.IEvaluatableExpressionService),i.__metadata("design:type",Object)],S.prototype,"evaluatableExpressionService",void 0),i.__decorate([(0,o.Autowired)(u.IEditorDocumentModelService),i.__metadata("design:type",Object)],S.prototype,"documentModelManager",void 0),i.__decorate([(0,o.Autowired)(u.ILanguageStatusService),i.__metadata("design:type",Object)],S.prototype,"languageStatusService",void 0),S=i.__decorate([(0,o.Injectable)({multiple:!0}),i.__param(0,(0,o.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],S),t.MainThreadLanguages=S},1905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createExtensionLogFactory=t.MainThreadExtensionLog=void 0;const i=n(70655),r=n(39993),o=n(67350),a=n(16329);let s=class{get logger(){return this.loggerManager.getLogger(o.SupportLogNamespace.ExtensionHost)}$getLevel(){return this.logger.getLevel()}$setLevel(e){return this.logger.setLevel(e)}async $verbose(...e){return this.logger.verbose(...e)}async $debug(...e){return this.logger.debug(...e)}async $log(...e){return this.logger.log(...e)}async $warn(...e){return this.logger.warn(...e)}async $error(...e){return this.logger.error(...e)}async $critical(...e){return this.logger.critical(...e)}$dispose(){return this.logger.dispose()}};i.__decorate([(0,r.Autowired)(o.ILoggerManagerClient),i.__metadata("design:type",Object)],s.prototype,"loggerManager",void 0),s=i.__decorate([(0,r.Injectable)()],s),t.MainThreadExtensionLog=s,t.createExtensionLogFactory=function(e,t){e.set(a.MainThreadExtensionLogIdentifier,t.get(s))}},3229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadMessage=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(1500),s=n(24453);let c=class{constructor(e){this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostMessage)}dispose(){}async $showMessage(e,t,n,i,r){const o=n.modal?await this.dialogService.open(t,e,i):await this.messageService.open(t,e,i,!0,r);return o?i.indexOf(o):void 0}};i.__decorate([(0,r.Autowired)(a.IDialogService),i.__metadata("design:type",Object)],c.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(a.IMessageService),i.__metadata("design:type",Object)],c.prototype,"messageService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadMessage=c},2718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadOutput=void 0;const i=n(70655),r=n(39993),o=n(92674),a=n(6556);let s=class{constructor(){this.channels=new Map}dispose(){this.channels.forEach((e=>{this.outputService.deleteChannel(e.name)})),this.channels.clear()}$replace(e,t){const n=this.getChannel(e);return n&&(n.clear(),n.append(t)),Promise.resolve()}$append(e,t){const n=this.getChannel(e);return n&&n.append(t),Promise.resolve()}$clear(e){const t=this.getChannel(e);return t&&t.clear(),Promise.resolve()}$dispose(e){return this.outputService.deleteChannel(e),this.channels.has(e)&&this.channels.delete(e),Promise.resolve()}async $reveal(e,t){const n=this.getChannel(e);n&&(n.setVisibility(!0),this.outputService.updateSelectedChannel(n))}$close(e){const t=this.getChannel(e);return t&&t.setVisibility(!1),Promise.resolve()}getChannel(e){let t;return this.channels.has(e)?t=this.channels.get(e):(t=this.outputService.getChannel(e),this.channels.set(e,t)),t}};i.__decorate([(0,r.Autowired)(a.OutputService),i.__metadata("design:type",a.OutputService)],s.prototype,"outputService",void 0),i.__decorate([(0,r.Autowired)(o.IMainLayoutService),i.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),s=i.__decorate([(0,r.Injectable)({multiple:!0})],s),t.MainThreadOutput=s},10537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadPreference=t.getPreferences=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(14238),s=n(24453),c=n(24453);function l(e,t){const n=t.map((e=>e.uri.toString()));return o.PreferenceScope.getScopes().reduce(((t,i)=>{t[i]={};const r=e(i);if(i===o.PreferenceScope.Folder)for(const e of n){const n=r.getPreferences(e);t[i][e]=n}else{t[i]=r.getPreferences();const e=r.getLanguagePreferences();e&&Object.keys(e).forEach((n=>{t[i][`[${n}]`]=e[n]}))}return t}),{})}t.getPreferences=l;let d=class{constructor(e){this.rpcProtocol=e,this.toDispose=new o.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostPreference),this.toDispose.push(this.preferenceService.onPreferencesChanged((e=>{const t=this.workspaceService.tryGetRoots(),n=l(this.preferenceProviderProvider,t),i=[];for(const t of Object.keys(e)){const{newValue:n}=e[t];i.push({preferenceName:t,newValue:n})}this.proxy.$acceptConfigurationChanged(n,i)}))),this.initializeConfiguration(),this.toDispose.push(this.preferenceSchemaProvider.onDidPreferenceSchemaChanged((()=>{this.initializeConfiguration()})))}dispose(){this.toDispose.dispose()}async initializeConfiguration(){const e=this.workspaceService.tryGetRoots(),t=l(this.preferenceProviderProvider,e);this.proxy.$initializeConfiguration(t)}async $updateConfigurationOption(e,t,n,i){const r=this.parseConfigurationTarget(e);await this.preferenceService.set(t,n,r,i)}async $removeConfigurationOption(e,t,n){const i=this.parseConfigurationTarget(e);await this.preferenceService.set(t,void 0,i,n)}parseConfigurationTarget(e){if("boolean"==typeof e)return e?o.PreferenceScope.User:o.PreferenceScope.Workspace;switch(e){case c.ConfigurationTarget.Global:return o.PreferenceScope.User;case c.ConfigurationTarget.Workspace:return o.PreferenceScope.Workspace;case c.ConfigurationTarget.WorkspaceFolder:return o.PreferenceScope.Folder;default:return}}};i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],d.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceProviderProvider),i.__metadata("design:type",Function)],d.prototype,"preferenceProviderProvider",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),i.__metadata("design:type",o.PreferenceSchemaProvider)],d.prototype,"preferenceSchemaProvider",void 0),i.__decorate([(0,r.Autowired)(a.IWorkspaceService),i.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],d),t.MainThreadPreference=d},55851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadQuickOpen=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(43780),c=n(48770),l=n(74026),d=n(57872),u=n(11098),p=n(24453);let h=class extends a.Disposable{constructor(e){super(),this.rpcProtocol=e,this.createdInputBox=new Map,this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostQuickOpen),this.addDispose([this.quickTitleBarService.onDidTriggerButton((e=>{this.proxy.$onDidTriggerButton(e.handler)})),this.quickOpenItemService.onDidTriggerItemButton((({item:e,button:t})=>{void 0!==t.handle&&this.proxy.$onDidTriggerItemButton(e.handle,t.handle)}))])}$showQuickPick(e,t,n){return this.quickPickService.show(t,Object.assign(Object.assign({},n),{onSelect:(e,n)=>{this.proxy.$onItemSelected(t[n].value)},onChangeValue:t=>{this.proxy.$onDidChangeValue(e,t)}}))}$hideQuickPick(){this.quickPickService.hide()}$showQuickInput(e,t){return t&&(e.validateInput=e=>this.proxy.$validateInput(e)),this.quickInputService.open(e)}$createOrUpdateInputBox(e,t){if(this.createdInputBox.has(e)){const n=this.createdInputBox.get(e);null==n||n.updateOptions(t)}else{const n=this.injector.get(u.InputBoxImpl,[t]);n.open(),n.onDidChangeValue((t=>{this.proxy.$onCreatedInputBoxDidChangeValue(e,t)})),n.onDidAccept((()=>{this.proxy.$onCreatedInputBoxDidAccept(e)})),n.onDidHide((()=>{this.proxy.$onCreatedInputBoxDidHide(e)})),n.onDidTriggerButton((t=>{this.proxy.$onCreatedInputBoxDidTriggerButton(e,t)})),this.createdInputBox.set(e,n)}}$hideInputBox(e){if(this.createdInputBox.has(e)){const t=this.createdInputBox.get(e);null==t||t.hide()}}$disposeInputBox(e){if(this.createdInputBox.has(e)){const t=this.createdInputBox.get(e);null==t||t.dispose(),this.createdInputBox.delete(e)}}$hideQuickInput(){this.quickInputService.hide()}};i.__decorate([(0,r.Autowired)(c.QuickPickService),i.__metadata("design:type",Object)],h.prototype,"quickPickService",void 0),i.__decorate([(0,r.Autowired)(s.IQuickInputService),i.__metadata("design:type",Object)],h.prototype,"quickInputService",void 0),i.__decorate([(0,r.Autowired)(d.QuickTitleBar),i.__metadata("design:type",d.QuickTitleBar)],h.prototype,"quickTitleBarService",void 0),i.__decorate([(0,r.Autowired)(l.QuickOpenItemService),i.__metadata("design:type",l.QuickOpenItemService)],h.prototype,"quickOpenItemService",void 0),i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],h.prototype,"injector",void 0),h=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],h),t.MainThreadQuickOpen=h},23344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadSCM=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(90642),c=n(18769),l=n(24453);class d{constructor(e,t,n,i,r,o){this.sourceControlHandle=e,this.handle=t,this.provider=n,this.features=i,this.label=r,this.id=o,this.elements=[],this._onDidSplice=new s.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event}get hideWhenEmpty(){return!!this.features.hideWhenEmpty}toJSON(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}}splice(e,t,n){this.elements.splice(e,t,...n),this._onDidSplice.fire({start:e,deleteCount:t,toInsert:n})}$updateGroup(e){this.features=Object.assign(this.features,e),this._onDidChange.fire()}$updateGroupLabel(e){this.label=e,this._onDidChange.fire()}}class u{constructor(e,t,n,i,r,o,a,s,c){this.proxy=e,this.sourceControlHandle=t,this.groupHandle=n,this.handle=i,this.sourceUri=r,this.resourceGroup=o,this.decorations=a,this.contextValue=s,this.command=c}open(e){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle,e)}toJSON(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}}}class p{constructor(e,t,n,i,r){this.proxy=e,this._handle=t,this._contextValue=n,this._label=i,this._rootUri=r,this._id="scm"+p.ID_HANDLE++,this.groups=new s.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new s.Emitter,this.onDidChangeResources=this._onDidChangeResources.event,this.features={},this._onDidChangeCommitTemplate=new s.Emitter,this.onDidChangeCommitTemplate=this._onDidChangeCommitTemplate.event,this._onDidChangeStatusBarCommands=new s.Emitter,this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event}get id(){return this._id}get handle(){return this._handle}get label(){return this._label}get rootUri(){return this._rootUri}get contextValue(){return this._contextValue}get commitTemplate(){return this.features.commitTemplate}get acceptInputCommand(){return this.features.acceptInputCommand}get statusBarCommands(){return this.features.statusBarCommands}get count(){return this.features.count}get onDidChangeStatusBarCommands(){return this._onDidChangeStatusBarCommands.event}$updateSourceControl(e){this.features=Object.assign(this.features,e),this._onDidChange.fire(),void 0!==e.commitTemplate&&this._onDidChangeCommitTemplate.fire(this.commitTemplate),void 0!==e.statusBarCommands&&this._onDidChangeStatusBarCommands.fire(this.statusBarCommands)}$registerGroup(e,t,n){const i=new d(this.handle,e,this,{},n,t);this._groupsByHandle[e]=i,this.groups.splice(this.groups.elements.length,0,[i])}$updateGroup(e,t){const n=this._groupsByHandle[e];n&&n.$updateGroup(t)}$updateGroupLabel(e,t){const n=this._groupsByHandle[e];n&&n.$updateGroupLabel(t)}$spliceGroupResourceStates(e){for(const[t,n]of e){const e=this._groupsByHandle[t];if(e){n.reverse();for(const[i,r,o]of n){const n=o.map((n=>{const[i,r,o,a,c,l,d,p,h,m,g]=n,f=o[0],_=o[1]||f,b={icon:f?s.Uri.parse(f):void 0,iconDark:_?s.Uri.parse(_):void 0,tooltip:a,strikeThrough:c,faded:l,source:h,letter:m,color:g?g.id:void 0};return new u(this.proxy,this.handle,t,i,s.Uri.revive(r),e,b,d||void 0,p)}));e.splice(i,r,n)}}else this.logger.warn(`SCM group ${t} not found in provider ${this.label}`)}this._onDidChangeResources.fire()}$unregisterGroup(e){const t=this._groupsByHandle[e];t&&(delete this._groupsByHandle[e],this.groups.splice(this.groups.elements.indexOf(t),1),this._onDidChangeResources.fire())}async getOriginalResource(e){if(!this.features.hasQuickDiffProvider)return null;const t=await this.proxy.$provideOriginalResource(this.handle,e,s.CancellationToken.None);return t&&s.Uri.revive(t)}toJSON(){return{$mid:5,handle:this.handle}}dispose(){}}p.ID_HANDLE=0,i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],p.prototype,"logger",void 0);let h=class extends s.Disposable{constructor(e){super(),this.rpcProtocol=e,this._repositories=new Map,this._inputDisposables=new Map,this._proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostSCM),s.Event.debounce(this.scmService.onDidChangeSelectedRepositories,((e,t)=>t),100)(this.onDidChangeSelectedRepositories,this,this.disposables)}dispose(){this._repositories.forEach((e=>e.dispose())),this._repositories.clear(),this._inputDisposables.forEach((e=>e.dispose())),this._inputDisposables.clear(),super.dispose()}$registerSourceControl(e,t,n,i){const r=new p(this._proxy,e,t,n,i&&s.Uri.revive(i)),o=this.scmService.registerSCMProvider(r);this._repositories.set(e,o);const a=o.input.onDidChange((t=>this._proxy.$onInputBoxValueChange(e,t)));this._inputDisposables.set(e,a),this.addDispose(s.Disposable.create((()=>{this.$unregisterSourceControl(e)})))}$updateSourceControl(e,t){const n=this._repositories.get(e);if(!n)return;n.provider.$updateSourceControl(t)}$unregisterSourceControl(e){const t=this._repositories.get(e);t&&(this._inputDisposables.get(e).dispose(),this._inputDisposables.delete(e),t.dispose(),this._repositories.delete(e))}$registerGroup(e,t,n,i){const r=this._repositories.get(e);if(!r)return;const o=r.provider;o.$registerGroup(t,n,i),this.addDispose(s.Disposable.create((()=>{o.$unregisterGroup(t)})))}$updateGroup(e,t,n){const i=this._repositories.get(e);if(!i)return;i.provider.$updateGroup(t,n)}$updateGroupLabel(e,t,n){const i=this._repositories.get(e);if(!i)return;i.provider.$updateGroupLabel(t,n)}$spliceResourceStates(e,t){const n=this._repositories.get(e);if(!n)return;n.provider.$spliceGroupResourceStates(t)}$unregisterGroup(e,t){const n=this._repositories.get(e);if(!n)return;n.provider.$unregisterGroup(t)}$setInputBoxValue(e,t){const n=this._repositories.get(e);n&&(n.input.value=t)}$setInputBoxPlaceholder(e,t){const n=this._repositories.get(e);n&&(n.input.placeholder=t)}$setInputBoxVisibility(e,t){const n=this._repositories.get(e);n&&(n.input.visible=t)}$setValidationProviderIsEnabled(e,t){const n=this._repositories.get(e);n&&(n.input.validateInput=t?async(t,n)=>{const i=await this._proxy.$validateInput(e,t,n);return i&&{message:i[0],type:i[1]}}:async()=>{})}onDidChangeSelectedRepositories(e){const t=e.filter((e=>e.provider instanceof p)).map((e=>e.provider.handle));this._proxy.$setSelectedSourceControls(t)}};i.__decorate([(0,r.Autowired)(c.SCMService),i.__metadata("design:type",c.SCMService)],h.prototype,"scmService",void 0),h=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],h),t.MainThreadSCM=h},83266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadSecret=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(11792),s=n(24453);let c=class extends o.Disposable{constructor(e){super(),this._proxy=e.getProxy(s.ExtHostAPIIdentifier.ExtHostSecret),this.addDispose(this.credentialsService.onDidChangePassword((e=>{const t=e.service.substring(this.appConfig.uriScheme.length);this._proxy.$onDidChangePassword({extensionId:t,key:e.account})})))}getFullKey(e){return`${this.appConfig.uriScheme}${e}`}async $getPassword(e,t){const n=this.getFullKey(e),i=await this.credentialsService.getPassword(n,t),r=i&&await this.cryptoService.decrypt(i);if(r)try{const t=JSON.parse(r);if(t.extensionId===e)return t.content}catch(e){throw new Error("Cannot get password")}}async $setPassword(e,t,n){const i=this.getFullKey(e),r=JSON.stringify({extensionId:e,content:n}),o=await this.cryptoService.encrypt(r);return this.credentialsService.setPassword(i,t,o)}async $deletePassword(e,t){try{const n=this.getFullKey(e);await this.credentialsService.deletePassword(n,t)}catch(e){throw new Error("Cannot delete password")}}};i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],c.prototype,"appConfig",void 0),i.__decorate([(0,r.Autowired)(o.ICredentialsService),i.__metadata("design:type",Object)],c.prototype,"credentialsService",void 0),i.__decorate([(0,r.Autowired)(a.ICryptoService),i.__metadata("design:type",Object)],c.prototype,"cryptoService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadSecret=c},33280:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadStatusBar=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(11792),s=n(15255),c=n(24453),l=i.__importStar(n(99727));let d=class{constructor(e){this.rpcProtocol=e,this.disposable=new o.Disposable,this.proxy=this.rpcProtocol.getProxy(c.ExtHostAPIIdentifier.ExtHostStatusBar)}dispose(){this.disposable.dispose()}$setStatusBarMessage(e){this.disposable.addDispose(this.statusBar.addElement("ext_default_statusbar_text",{text:e,alignment:a.StatusBarAlignment.LEFT}))}$dispose(e){e?this.statusBar.removeElement(e):this.statusBar.removeElement("ext_default_statusbar_text")}$createStatusBarItem(e,t,n,i){this.disposable.addDispose(this.statusBar.addElement(e,{id:t,alignment:n,priority:i}))}async $setMessage(e,t,n,i,r,o,c,d,u,p,h,m){const g=(null==p?void 0:p.label)||(0,s.getCodiconAriaLabel)(i),f={id:t,name:n,text:i||"",priority:r,alignment:o===l.StatusBarAlignment.Left?a.StatusBarAlignment.LEFT:a.StatusBarAlignment.RIGHT,color:c,backgroundColor:d,tooltip:u,command:h,arguments:m,role:null==p?void 0:p.role,ariaLabel:g};this.disposable.addDispose(this.statusBar.addElement(e,f))}};i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],d.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(a.IStatusBarService),i.__metadata("design:type",Object)],d.prototype,"statusBar",void 0),d=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],d),t.MainThreadStatusBar=d},48469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadStorage=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(38097),s=n(24453);let c=class{constructor(e){this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostStorage),this.init()}dispose(){}async init(){await this.extensionStorageService.whenReady,this.proxy.$acceptStoragePath(this.extensionStorageService.extensionStoragePath)}$setValue(e,t,n){try{this.extensionStorageService.set(t,n,e)}catch(e){return Promise.reject(e)}return Promise.resolve(void 0)}$getValue(e,t){try{return Promise.resolve(this.extensionStorageService.get(t,e))}catch(e){return Promise.reject(e)}}};i.__decorate([(0,r.Autowired)(a.IExtensionStorageService),i.__metadata("design:type",Object)],c.prototype,"extensionStorageService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadStorage=c},66562:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainthreadTasks=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(90642)),a=n(60437),s=n(20924),c=n(14238),l=n(24453),d=n(25921);var u,p,h,m,g,f,_,b,y,v,C,S,w,E,k;!function(e){e.is=function(e){const t=e;return t&&(0,o.isString)(t.id)&&!!t.workspaceFolder}}(u||(u={})),function(e){e.from=function(e){return{id:e.id,task:k.from(e.task)}}}(p||(p={})),function(e){e.from=function(e,t){return{id:e.id,processId:t}}}(h||(h={})),function(e){e.from=function(e,t){return{id:e.id,exitCode:t}}}(m||(m={})),function(e){e.from=function(e){const t=Object.assign(Object.create(null),e);return delete t._key,t},e.to=function(e,t,n){let i=n.createTaskIdentifier(e,console);return void 0===i&&t&&(i={_key:(0,o.uuid)(),type:"$executeOnly"}),i}}(g||(g={})),function(e){e.from=function(e){if(null!=e)return Object.assign(Object.create(null),e)},e.to=function(e){return null==e?s.PresentationOptions.defaults:Object.assign(Object.create(null),s.PresentationOptions.defaults,e)}}(f||(f={})),function(e){e.from=function(e){if(null!=e)return Object.assign(Object.create(null),e)},e.to=function(e){return null==e?s.RunOptions.defaults:Object.assign(Object.create(null),s.RunOptions.defaults,e)}}(_||(_={})),function(e){e.from=function(e){if(null!=e)return{cwd:e.cwd,env:e.env}},e.to=function(e){return null==e?s.CommandOptions.defaults:{cwd:e.cwd||s.CommandOptions.defaults.cwd,env:e.env}}}(b||(b={})),function(e){e.is=function(e){return e&&!!e.process},e.from=function(e){const t={process:(0,o.isString)(e.name)?e.name:e.name.value,args:e.args?e.args.map((e=>(0,o.isString)(e)?e:e.value)):[]};return e.options&&(t.options=b.from(e.options)),t},e.to=function(e){const t={runtime:s.RuntimeType.Process,name:e.process,args:e.args,presentation:void 0};return t.options=b.to(e.options),t}}(y||(y={})),function(e){e.from=function(e){if(null==e)return;const t={cwd:e.cwd||s.CommandOptions.defaults.cwd,env:e.env};return e.shell&&(t.executable=e.shell.executable,t.shellArgs=e.shell.args,t.shellQuoting=e.shell.quoting),t},e.to=function(e){if(null==e)return;const t={cwd:e.cwd,env:e.env};return e.executable&&(t.shell={executable:e.executable},e.shellArgs&&(t.shell.args=e.shellArgs),e.shellQuoting&&(t.shell.quoting=e.shellQuoting)),t}}(v||(v={})),function(e){e.is=function(e){const t=e;return t&&(!!t.commandLine||!!t.command)},e.from=function(e){const t={};return e.name&&(0,o.isString)(e.name)&&(void 0===e.args||null===e.args||0===e.args.length)?t.commandLine=e.name:(t.command=e.name,t.args=e.args),e.options&&(t.options=v.from(e.options)),t},e.to=function(e){const t={runtime:s.RuntimeType.Shell,name:e.commandLine?e.commandLine:e.command,args:e.args,presentation:void 0};return e.options&&(t.options=v.to(e.options)),t}}(C||(C={})),function(e){e.is=function(e){return e&&"customExecution"===e.customExecution},e.from=function(){return{customExecution:"customExecution"}},e.to=function(){return{runtime:s.RuntimeType.CustomExecution,presentation:void 0}}}(S||(S={})),function(e){e.is=function(e){return e&&"customExecution2"===e.customExecution},e.from=function(){return{customExecution:"customExecution2"}},e.to=function(){return{runtime:s.RuntimeType.CustomExecution2,presentation:void 0}}}(w||(w={})),function(e){e.from=function(e){const t={label:e.label};return e.kind===s.TaskSourceKind.Extension?(t.extensionId=e.extension,e.workspaceFolder?t.scope=e.workspaceFolder.uri:t.scope=e.scope):e.kind===s.TaskSourceKind.Workspace&&(t.extensionId="$core",t.scope=e.config.workspaceFolder.uri),t},e.to=function(e,t){let n,i;const r=t.tryGetRoots().map((e=>o.Uri.parse(e.uri)));return void 0===e.scope||"number"==typeof e.scope&&1!==e.scope?0===t.tryGetRoots().map((e=>o.Uri.file(e.uri))).length?(n=1,i=void 0):(n=3,i={name:"workspace",uri:r[0],index:0}):"number"==typeof e.scope?n=e.scope:(n=3,i=(0,o.withNullAsUndefined)({uri:t.tryGetRoots().map((e=>o.Uri.parse(e.uri)))[0],name:t.getWorkspaceName(t.tryGetRoots().map((e=>o.URI.file(e.uri)))[0]),index:0})),{kind:s.TaskSourceKind.Extension,label:e.label,extension:e.extensionId,scope:n,workspaceFolder:i}}}(E||(E={})),function(e){e.from=function(e){if(null==e||!s.CustomTask.is(e)&&!s.ContributedTask.is(e)&&!s.ConfiguringTask.is(e))return;const t={_id:e._id,name:e.configurationProperties.name,definition:g.from(e.getDefinition()),source:E.from(e._source),execution:void 0,presentationOptions:!s.ConfiguringTask.is(e)&&e.command?f.from(e.command.presentation):void 0,isBackground:e.configurationProperties.isBackground,problemMatchers:[],hasDefinedMatchers:!!s.ContributedTask.is(e)&&e.hasDefinedMatchers,runOptions:_.from(e.runOptions)};if(e.configurationProperties.group&&(t.group=e.configurationProperties.group),!s.ConfiguringTask.is(e)&&e.command&&(e.command.runtime===s.RuntimeType.Process?t.execution=y.from(e.command):e.command.runtime===s.RuntimeType.Shell&&(t.execution=C.from(e.command))),e.configurationProperties.problemMatchers)for(const n of e.configurationProperties.problemMatchers)(0,o.isString)(n)&&t.problemMatchers.push(n);return t},e.to=function(e,t,n,i){if(!e||"string"!=typeof e.name)return;let r;if(e.execution&&(C.is(e.execution)?r=C.to(e.execution):y.is(e.execution)?r=y.to(e.execution):S.is(e.execution)&&(r=S.to())),!r)return;r.presentation=f.to(e.presentationOptions);const a=E.to(e.source,t),c=(0,o.formatLocalize)("task.label",a.label,e.name),l=g.to(e.definition,n,i),d=`${e.source.extensionId}.${l._key}`;return new s.ContributedTask(d,a,c,l.type,l,r,e.hasDefinedMatchers,_.to(e.runOptions),{name:e.name,identifier:c,group:e.group,isBackground:!!e.isBackground,problemMatchers:e.problemMatchers.slice()})}}(k||(k={}));let x=class extends o.Disposable{constructor(e){super(),this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostTasks),this.providers=new Map,this.context={createTaskIdentifier:(e,t)=>this.taskDefinitionRegistry.createTaskIdentifier(e,t)},this.addDispose(this.taskService.onDidStateChange((e=>{const t=e.__task;"start"===e.kind?(this.logger.verbose(`task ${t._label||t._id} start`,e.terminalId),this.proxy.$onDidStartTask(p.from(t.getTaskExecution()),e.terminalId)):"processStarted"===e.kind?(this.logger.verbose(`task ${t._label||t._id} process start`,e.processId),this.proxy.$onDidStartTaskProcess(h.from(t.getTaskExecution(),e.processId))):"processEnded"===e.kind?(this.logger.verbose(`task ${t._label||t._id} process end`,e.exitCode),this.proxy.$onDidEndTaskProcess(m.from(t.getTaskExecution(),e.exitCode))):"end"===e.kind&&(this.logger.verbose(`task ${t._label||t._id} end`),this.proxy.$onDidEndTask(p.from(t.getTaskExecution())))})))}dispose(){super.dispose(),this.providers.forEach((e=>e.disposable.dispose())),this.providers.clear()}$registerTaskProvider(e,t){this.logger.verbose(`register task provider ${t}, handler ${e}`);const n={provideTasks:n=>(this.logger.verbose(`${t} provideTask`),Promise.resolve(this.proxy.$provideTask(e,n)).then((e=>{const n=[];for(const t of e.tasks){const e=k.to(t,this.workspaceService,!0,this.context);e?n.push(e):this.logger.error(`Task System: can not convert task: ${JSON.stringify(t.definition,void 0,0)}. Task will be dropped`)}return{tasks:n,extension:e.extension,type:t}}))),resolveTask:n=>(this.logger.verbose(`${t} resolveTask`),Promise.resolve(this.proxy.$resolveTask(e,n)).then((e=>{if(e)return k.to(e,this.workspaceService,!0,this.context)})))},i=this.taskService.registerTaskProvider(n,t);return this.providers.set(e,{disposable:i,provider:n}),Promise.resolve()}$unregisterTaskProvider(e){throw new Error("Method not implemented.")}$fetchTasks(e){return this.taskService.tasks(d.TaskFilterDTO.to(e)).then((e=>{const t=[];for(const n of e){const e=k.from(n);e&&t.push(e)}return t}))}$executeTask(e){return new Promise(((t,n)=>{if(u.is(e)){const i=this.workspaceService.getWorkspaceRootUri(o.URI.from(e.workspaceFolder));i?this.taskService.getTask(i.codeUri,e.id,!0).then((n=>{this.taskService.run(n).then((()=>{}));const i={id:e.id,task:k.from(n)};t(i)}),(e=>{n(new Error("Task not found"))})):n(new Error("No workspace folder"))}else{const n=k.to(e,this.workspaceService,!0,this.context);this.taskService.run(n).then((()=>{}));const i={id:n._id,task:k.from(n)};t(i)}}))}$createTaskId(e){return new Promise(((t,n)=>{const i=k.to(e,this.workspaceService,!0,this.context);i?t(i._id):n(new Error("Task could not be created from DTO"))}))}async $terminateTask(e){await this.taskService.terminateTask(e)}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],x.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.ITaskService),i.__metadata("design:type",Object)],x.prototype,"taskService",void 0),i.__decorate([(0,r.Autowired)(c.IWorkspaceService),i.__metadata("design:type",Object)],x.prototype,"workspaceService",void 0),i.__decorate([(0,r.Autowired)(o.ITaskDefinitionRegistry),i.__metadata("design:type",Object)],x.prototype,"taskDefinitionRegistry",void 0),x=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__metadata("design:paramtypes",[Object])],x),t.MainthreadTasks=x},52013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTerminal=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(22566),c=n(27857),l=n(27857),d=n(27272),u=n(24453),p=n(73939);let h=class{constructor(e){this.rpcProtocol=e,this.shortId2LongIdMap=new Map,this._terminalProcessProxies=new Map,this._profileProviders=new Map,this.disposable=new a.Disposable,this.proxy=this.rpcProtocol.getProxy(u.ExtHostAPIIdentifier.ExtHostTerminal),this.initData(),this.bindEvent()}dispose(){this.disposable.dispose()}bindEvent(){this.disposable.addDispose(this.terminalApi.onDidChangeActiveTerminal((e=>{this.proxy.$onDidChangeActiveTerminal(e)}))),this.disposable.addDispose(this.terminalApi.onDidCloseTerminal((e=>{this.proxy.$onDidCloseTerminal(e)}))),this.disposable.addDispose(this.terminalApi.onDidTerminalTitleChange((e=>{this.proxy.$onDidTerminalTitleChange(e.id,e.name)}))),this.disposable.addDispose(this.terminalApi.onDidOpenTerminal((e=>{const t=this.controller.clients.get(e.id);t&&t.addDispose(t.xterm.raw.onData((()=>{this.proxy.$acceptTerminalInteraction(e.id)}))),this.proxy.$onDidOpenTerminal(e)}))),this.disposable.addDispose(this.controller.onInstanceRequestStartExtensionTerminal((e=>this._onRequestStartExtensionTerminal(e)))),this.disposable.addDispose(this.profileService.onDidChangeAvailableProfiles((()=>{this._updateDefaultProfile()}))),this.disposable.addDispose(this.profileService.onTerminalProfileResolved((async e=>{await this.activationEventService.fireEvent(`onTerminalProfile:${e}`)})))}initData(){const e=this.terminalApi.terminals,t=[];e.forEach((e=>{t.push({id:e.id,name:e.name,isActive:e.isActive})})),this.proxy.$setTerminals(t),this._updateDefaultProfile()}transform(e,t){return t(this.shortId2LongIdMap.get(e)||e)}$sendText(e,t,n){return this.transform(e,(e=>(this.proxy.$acceptTerminalInteraction(e),this.terminalApi.sendText(e,t,n))))}$show(e,t){return this.transform(e,(e=>this.terminalApi.showTerm(e,t)))}$hide(e){return this.transform(e,(e=>this.terminalApi.hideTerm(e)))}$dispose(e){return this.transform(e,(e=>this.terminalApi.removeTerm(e)))}$getProcessId(e){return this.transform(e,(e=>this.terminalApi.getProcessId(e)))}async $createTerminal(e,t){await this.controller.ready.promise;const n=await this.terminalApi.createTerminal(e,t);n?this.shortId2LongIdMap.set(t,n.id):this.logger.error(`Create Terminal ${t} fail.`)}_onRequestStartExtensionTerminal(e){const t=e.proxy;this._terminalProcessProxies.set(t.terminalId,t);const n=e.cols&&e.rows?{columns:e.cols,rows:e.rows}:void 0;this.proxy.$startExtensionTerminal(t.terminalId,n).then(e.callback),t.onInput((e=>this.proxy.$acceptProcessInput(t.terminalId,e))),t.onShutdown((e=>this.proxy.$acceptProcessShutdown(t.terminalId,e))),t.onRequestCwd((()=>this.proxy.$acceptProcessRequestCwd(t.terminalId))),t.onRequestInitialCwd((()=>this.proxy.$acceptProcessRequestInitialCwd(t.terminalId)))}_getTerminalProcess(e){return this.transform(e,(e=>{const t=this._terminalProcessProxies.get(e);if(!t)throw new Error(`Unknown terminal: ${e}`);return t}))}$sendProcessTitle(e,t){return this.transform(e,(e=>{const n=this.terminalGroupViewService.getWidget(e);n&&(n.rename(t),this.proxy.$acceptTerminalTitleChange(e,t))}))}$sendProcessData(e,t){this._getTerminalProcess(e).emitData(t)}$sendProcessReady(e,t,n){this._getTerminalProcess(e).emitReady(t,n)}$sendProcessExit(e,t){this._getTerminalProcess(e).emitExit(t),this._terminalProcessProxies.delete(e)}$sendOverrideDimensions(e,t){this._getTerminalProcess(e).emitOverrideDimensions(t)}$sendProcessInitialCwd(e,t){this._getTerminalProcess(e).emitInitialCwd(t)}$sendProcessCwd(e,t){this._getTerminalProcess(e).emitCwd(t)}$startLinkProvider(){var e;null===(e=this._linkProvider)||void 0===e||e.dispose(),this._linkProvider=this.controller.registerLinkProvider(new m(this.proxy))}$stopLinkProvider(){var e;null===(e=this._linkProvider)||void 0===e||e.dispose(),this._linkProvider=void 0}$registerProfileProvider(e,t){this._profileProviders.set(e,this.profileService.registerTerminalProfileProvider(t,e,{createContributedTerminalProfile:async t=>{this.proxy.$createContributedProfileTerminal(e,t)}}))}$unregisterProfileProvider(e){var t;null===(t=this._profileProviders.get(e))||void 0===t||t.dispose(),this._profileProviders.delete(e)}async _updateDefaultProfile(){const e=await this.profileInternalSerivce.resolveDefaultProfile();e&&this.proxy.$acceptDefaultProfile(e)}$setEnvironmentVariableCollection(e,t,n){if(n){const i={persistent:t,map:(0,l.deserializeEnvironmentVariableCollection)(n)};this.environmentVariableService.set(e,i)}else this.environmentVariableService.delete(e)}};i.__decorate([(0,r.Autowired)(c.EnvironmentVariableServiceToken),i.__metadata("design:type",Object)],h.prototype,"environmentVariableService",void 0),i.__decorate([(0,r.Autowired)(s.ITerminalApiService),i.__metadata("design:type",Object)],h.prototype,"terminalApi",void 0),i.__decorate([(0,r.Autowired)(s.ITerminalController),i.__metadata("design:type",Object)],h.prototype,"controller",void 0),i.__decorate([(0,r.Autowired)(d.ITerminalProfileService),i.__metadata("design:type",Object)],h.prototype,"profileService",void 0),i.__decorate([(0,r.Autowired)(s.ITerminalProfileInternalService),i.__metadata("design:type",Object)],h.prototype,"profileInternalSerivce",void 0),i.__decorate([(0,r.Autowired)(s.ITerminalGroupViewService),i.__metadata("design:type",Object)],h.prototype,"terminalGroupViewService",void 0),i.__decorate([(0,r.Autowired)(a.PreferenceService),i.__metadata("design:type",Object)],h.prototype,"preference",void 0),i.__decorate([(0,r.Autowired)(p.IActivationEventService),i.__metadata("design:type",p.IActivationEventService)],h.prototype,"activationEventService",void 0),i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],h.prototype,"logger",void 0),h=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],h),t.MainThreadTerminal=h;class m{constructor(e){this._proxy=e}async provideLinks(e,t){const n=this._proxy;return(await n.$provideLinks(e.id,t)).map((t=>({id:t.id,startIndex:t.startIndex,length:t.length,label:t.label,activate:()=>n.$activateLink(e.id,t.id)})))}}},5282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTestsImpl=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(90642),s=n(7595),c=n(19901),l=n(56471),d=n(15353),u=n(24453);let p=class extends a.Disposable{constructor(e){super(),this.testProviderRegistrations=new Map,this.proxy=e.getProxy(u.ExtHostAPIIdentifier.ExtHostTests)}$registerTestController(e,t){const n=new a.DisposableStore,i={id:e,label:t,configureRunProfile:t=>this.proxy.$configureRunProfile(e,t),runTests:(e,t)=>this.proxy.$runControllerTests(e,t),expandTest:(e,t)=>this.proxy.$expandTest(e,isFinite(t)?t:-1)};n.add(a.Disposable.create((()=>this.testProfiles.removeProfile(e)))),n.add(this.testService.registerTestController(e,i)),this.testProviderRegistrations.set(e,{instance:i,label:t,disposable:n})}$updateControllerLabel(e,t){this.logger.warn("test: updateControllerLabel>>",e,t)}$unregisterTestController(e){this.logger.warn("test: unregisterTestController>>",e)}$subscribeToDiffs(){this.logger.warn("test: subscribeToDiffs>>")}$unsubscribeFromDiffs(){this.logger.warn("test: unsubscribeFromDiffs>>")}$publishDiff(e,t){(e=>{var t,n;for(const i of e)if(0===i[0]||1===i[0]){const e=i[1];(null===(t=e.item)||void 0===t?void 0:t.uri)&&(e.item.uri=a.URI.revive(e.item.uri)),(null===(n=e.item)||void 0===n?void 0:n.range)&&(e.item.range=d.Range.lift(e.item.range))}})(t),this.testService.publishDiff(e,t)}$publishTestRunProfile(e){const t=this.testProviderRegistrations.get(e.controllerId);t&&this.testProfiles.addProfile(t.instance,e)}$updateTestRunConfig(e,t,n){this.logger.warn("Method not implemented.")}$removeTestProfile(e,t){this.testProfiles.removeProfile(e,t)}async $runTests(e,t){return(await this.testService.runResolvedTests(e,t)).id}$addTestsToRun(e,t,n){for(const e of n)e.uri=a.URI.revive(e.uri),e.range&&(e.range=d.Range.lift(e.range));this.withTestResult(t,(t=>t.addTestChainToRun(e,n)))}$updateTestStateInRun(e,t,n,i,r){this.withTestResult(e,(e=>e.updateState(n,t,i,r)))}$appendTestMessagesInRun(e,t,n,i){const r=this.resultService.getResult(e);if(r&&r instanceof l.TestResultImpl)for(const e of i)e.location&&(e.location.uri=a.URI.revive(e.location.uri),e.location.range=d.Range.lift(e.location.range)),r.appendMessage(n,t,e)}$appendOutputToRun(e,t,n,i,r){const o=i&&{uri:a.URI.revive(i.uri),range:d.Range.lift(i.range)};this.withTestResult(e,(e=>e.appendOutput(n,t,o,r)))}$signalCoverageAvailable(e,t){this.logger.warn("$signalCoverageAvailable",e,t)}$startedTestRunTask(e,t){this.withTestResult(e,(e=>e.addTask(t)))}$finishedTestRunTask(e,t){this.withTestResult(e,(e=>e.markTaskComplete(t)))}$startedExtensionTestRun(e){this.resultService.createTestResult(e)}$finishedExtensionTestRun(e){this.withTestResult(e,(e=>e.markComplete()))}withTestResult(e,t){const n=this.resultService.getResult(e);return n&&n instanceof l.TestResultImpl?t(n):void 0}};i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",o.Logger)],p.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(s.TestServiceToken),i.__metadata("design:type",Object)],p.prototype,"testService",void 0),i.__decorate([(0,r.Autowired)(c.TestProfileServiceToken),i.__metadata("design:type",Object)],p.prototype,"testProfiles",void 0),i.__decorate([(0,r.Autowired)(l.TestResultServiceToken),i.__metadata("design:type",Object)],p.prototype,"resultService",void 0),p=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],p),t.MainThreadTestsImpl=p},90289:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTheming=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(52292),s=n(24453);let c=class{constructor(e){this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostTheming),this._themeChangeListener=this._themeService.onThemeChange((e=>{this.proxy.$onColorThemeChange(e.type)})),this.proxy.$onColorThemeChange(this._themeService.getCurrentThemeSync().type)}dispose(){this._themeChangeListener.dispose()}};i.__decorate([(0,r.Autowired)(a.IThemeService),i.__metadata("design:type",Object)],c.prototype,"_themeService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadTheming=c},75859:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.TreeViewDataProvider=t.MainThreadTreeView=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(41037),c=n(894),l=n(57061),d=n(45467),u=n(33361),p=n(92674),h=n(52292),m=n(24453),g=n(99727),f=n(23591),_=n(12760),b=n(84619);let y=i=class extends c.WithEventBus{constructor(e){super(),this.rpcProtocol=e,this.treeModels=new Map,this.disposableCollection=new Map,this.disposable=new c.DisposableStore,this.proxy=this.rpcProtocol.getProxy(m.ExtHostAPIIdentifier.ExtHostTreeView),this.disposable.add((0,c.toDisposable)((()=>this.treeModels.clear()))),this._registerInternalCommands(),this.fileServiceClient.getCurrentUserHome().then((e=>{e&&(this.userhome=new c.URI(e.uri))})),this.addDispose(this.eventBus.on(p.ViewCollapseChangedEvent,(e=>{if(e.payload.viewId&&this.treeModels.has(e.payload.viewId)&&!e.payload.collapsed){const t=this.treeModels.get(e.payload.viewId);t&&this.progressService.withProgress({location:e.payload.viewId},(()=>t.refresh()))}})))}dispose(){this.disposable.dispose(),this.disposableCollection.forEach((e=>{e.dispose()})),this.disposableCollection.clear()}createTreeModel(e,t,n){return _.ExtensionTreeViewModel.createModel(this.injector,t,e,n||{})}async $registerTreeDataProvider(e,t){if(this.treeModels.has(e))return;const n=new c.DisposableStore,r=new v(e,this.proxy,this.iconService,this.themeService,this.labelService,this.contextKeyService,this.menuService,this.userhome),o=this.createTreeModel(e,r,t);this.treeModels.set(e,o),n.add((0,c.toDisposable)((()=>this.treeModels.delete(e)))),this.mainLayoutService.replaceViewComponent({id:e,component:f.ExtensionTabBarTreeView},{model:o,dataProvider:r,treeViewId:e}),(null==t?void 0:t.showCollapseAll)&&n.add(this.menuRegistry.registerMenuItem(l.MenuId.ViewTitle,{command:{id:i.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID,label:(0,c.localize)("treeview.command.action.collapse")},extraTailArgs:[e],iconClass:(0,c.getIcon)("collapse-all"),when:`view == ${e}`,group:"navigation",order:1e4})),n.add(o.onDidSelectedNodeChange((t=>{r.setSelection(e,t)}))),n.add(o.onDidChangeExpansionState((t=>{const{treeItemId:n,expanded:i}=t;r.setExpanded(e,n,i)})));const a=this.mainLayoutService.getTabbarHandler(e);a&&(n.add(a.onActivate((()=>{r.setVisible(e,!0)}))),n.add(a.onInActivate((()=>{r.setVisible(e,!1)}))),n.add(n.add((0,c.toDisposable)((()=>a.disposeView(e)))))),this.disposableCollection.set(e,n)}async $unregisterTreeDataProvider(e){const t=this.disposableCollection.get(e);t&&t.dispose()}async $refresh(e,t){const n=this.treeModels.get(e);n&&await n.refresh(t)}async $setTitle(e,t){const n=this.mainLayoutService.getTabbarHandler(e);n&&n.updateViewTitle(e,t)}async $setDescription(e,t){}async $setMessage(e,t){}async $reveal(e,t,n){this.mainLayoutService.revealView(e);const i=this.treeModels.get(e);i&&i.reveal(t,n)}_registerInternalCommands(){this.disposable.add(this.commandRegistry.registerCommand({id:i.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID},{execute:e=>{const t=this.treeModels.get(e);t&&t.collapseAll()}}))}};y.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID="TREE_VIEW_COLLAPSE_ALL",r.__decorate([(0,o.Autowired)(p.IMainLayoutService),r.__metadata("design:type",Object)],y.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(h.IIconService),r.__metadata("design:type",Object)],y.prototype,"iconService",void 0),r.__decorate([(0,o.Autowired)(l.IMenuRegistry),r.__metadata("design:type",l.IMenuRegistry)],y.prototype,"menuRegistry",void 0),r.__decorate([(0,o.Autowired)(c.CommandRegistry),r.__metadata("design:type",Object)],y.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(h.IThemeService),r.__metadata("design:type",Object)],y.prototype,"themeService",void 0),r.__decorate([(0,o.Autowired)(d.IProgressService),r.__metadata("design:type",Object)],y.prototype,"progressService",void 0),r.__decorate([(0,o.Autowired)(c.LabelService),r.__metadata("design:type",c.LabelService)],y.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(c.IContextKeyService),r.__metadata("design:type",Object)],y.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(l.AbstractMenuService),r.__metadata("design:type",l.AbstractMenuService)],y.prototype,"menuService",void 0),r.__decorate([(0,o.Autowired)(u.IFileServiceClient),r.__metadata("design:type",Object)],y.prototype,"fileServiceClient",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),y=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)(s.IRPCProtocol)),r.__metadata("design:paramtypes",[Object])],y),t.MainThreadTreeView=y;class v extends a.Tree{constructor(e,t,n,i,r,o,a,s){super(),this.treeViewId=e,this.proxy=t,this.iconService=n,this.themeService=i,this.labelService=r,this.contextKeyService=o,this.menuService=a,this.userhome=s,this.cachedMenu=new Map,this.onTreeDataChangedEmitter=new c.Emitter,this.onRevealChangedEmitter=new c.Emitter,this.isEmpty=!0,this._onDidChangeEmpty=new c.Emitter,this.onDidChangeEmpty=this._onDidChangeEmpty.event,this.treeItemId2TreeNode=new Map}get isTreeEmpty(){return this.isEmpty}get onTreeDataChanged(){return this.onTreeDataChangedEmitter.event}get onRevealChanged(){return this.onRevealChangedEmitter.event}get root(){return this._root}getTreeNodeIdByTreeItemId(e){var t;return null===(t=this.treeItemId2TreeNode.get(e))||void 0===t?void 0:t.id}getReadableDescription(e){if(e.resourceUri){if(this.userhome){const t=c.URI.from(e.resourceUri);if(this.userhome.isEqualOrParent(t))return decodeURIComponent(e.resourceUri.path.toString().replace(this.userhome.codeUri.fsPath,"~"))}return e.resourceUri.path.toString()}return e.description}getLabelAndDescription(e){if(e.label)return{label:e.label,description:e.description};if(e.resourceUri){let t=e.resourceUri.path.toString();t=decodeURIComponent(t),t.indexOf("/")>=0&&(t=t.substring(t.lastIndexOf("/")+1));return{label:t,description:this.getReadableDescription(e)}}return{label:e.label,description:e.description}}async createFoldNode(e,t){const n=g.TreeItemCollapsibleState.Expanded===e.collapsibleState,i=await this.toIconClass(e),r=this.getInlineMenuNodes(e.contextValue||""),{label:o,description:a}=this.getLabelAndDescription(e);return new b.ExtensionCompositeTreeNode(this,t,o,a,i,e.tooltip,e.command,e.contextValue||"",e.id,r,e.accessibilityInformation,n)}async createNormalNode(e,t){const n=await this.toIconClass(e),i=this.getInlineMenuNodes(e.contextValue||""),{label:r,description:o}=this.getLabelAndDescription(e);return new b.ExtensionTreeNode(this,t,r,o,n,e.tooltip,e.command,e.contextValue||"",e.id,i,e.accessibilityInformation)}async toIconClass(e){if(e.iconUrl||e.icon)return this.iconService.fromIcon("",e.iconUrl||e.icon,h.IconType.Background,void 0,!0);if(e.themeIcon){let t=(0,c.getExternalIcon)(e.themeIcon.id);e.resourceUri&&("file"===e.themeIcon.id?t=this.labelService.getIcon(c.URI.from(e.resourceUri)):"folder"===e.themeIcon.id&&(t=this.labelService.getIcon(c.URI.from(e.resourceUri),{isDirectory:!0})));const n=this.themeService.getColorClassNameByColorToken(e.themeIcon.color);return`${t} ${null!=n?n:""}`}return""}getInlineMenuNodes(e){if(this.cachedMenu.has(e))return this.cachedMenu.get(e);const t=this.contextKeyService.createScoped();t.createKey("view",this.treeViewId),t.createKey("viewItem",e);const n=this.menuService.createMenu(l.MenuId.ViewItemContext,t),i=(0,l.generateCtxMenu)({menus:n,separator:"inline"});return n.dispose(),t.dispose(),this.cachedMenu.set(e,i[0]),i[0]}async createTreeNode(e,t){return(0,c.isUndefined)(e.collapsibleState)||e.collapsibleState===g.TreeItemCollapsibleState.None?await this.createNormalNode(e,t):await this.createFoldNode(e,t)}async resolveChildren(e){let t=[];if(e){let n;if(n=b.ExtensionTreeRoot.is(e)?await this.proxy.$getChildren(this.treeViewId):await this.proxy.$getChildren(this.treeViewId,e.treeItemId),n&&Array.isArray(n))for(const i of n){const n=await this.createTreeNode(i,e);this.treeItemId2TreeNode.set(i.id,n),t.push(n)}if(b.ExtensionTreeRoot.is(e)){const e=this.isEmpty;this.isEmpty=!n||0===n.length,e!==this.isEmpty&&this._onDidChangeEmpty.fire()}}else t=[new b.ExtensionTreeRoot(this,this.treeViewId)];return t}async resolveTreeItem(e,t){const n=(new c.CancellationTokenSource).token;return this.proxy.$resolveTreeItem(e,t,n)}sortComparator(e,t){return e?t?0:-1:1}async refresh(e){await this.onTreeDataChangedEmitter.fire(e)}async reveal(e){await this.onRevealChangedEmitter.fire(e)}async setSelection(e,t){this.proxy.$setSelection(e,t)}async setExpanded(e,t,n){this.proxy.$setExpanded(e,t,n)}async setVisible(e,t){this.proxy.$setVisible(e,t)}dispose(){super.dispose(),this.treeItemId2TreeNode.clear()}}t.TreeViewDataProvider=v},22184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadUrls=void 0;const i=n(70655),r=n(39993),o=n(41037),a=n(894),s=n(24453),c=n(73939);class l{constructor(e,t,n){this.proxy=e,this.handle=t,this.extensionId=n}async handleURL(e){return this.extensionId===e.authority&&(await this.proxy.$handleExternalUri(this.handle,e.codeUri),!0)}}let d=class{constructor(){this.extensionUrlHandlers=new Map}async open(e){let t=!1;const n=e.authority,i=this.extensionUrlHandlers.get(n);if(i)try{t=await i.handleURL(e)}catch(e){this.logger.error(e)}return await this.activationEventService.fireEvent("onUri",n),t}handleScheme(e){return e===this.config.uriScheme}registerExtensionHandler(e,t,n){const i=new l(n,e,t);return this.extensionUrlHandlers.set(t,i),{dispose:()=>{this.extensionUrlHandlers.delete(t)}}}dispose(){this.extensionUrlHandlers.clear()}};i.__decorate([(0,r.Autowired)(a.ILogger),i.__metadata("design:type",Object)],d.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.AppConfig),i.__metadata("design:type",Object)],d.prototype,"config",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",c.IActivationEventService)],d.prototype,"activationEventService",void 0),d=i.__decorate([(0,r.Injectable)()],d);let u=class{constructor(e){this.handlers=new Map,this.proxy=e.getProxy(s.ExtHostAPIIdentifier.ExtHostUrls),this.openerService.registerOpener(this.extensionOpener)}async $registerUriHandler(e,t){this.handlers.set(e,this.extensionOpener.registerExtensionHandler(e,t,this.proxy))}async $unregisterUriHandler(e){const t=this.handlers.get(e);t&&(t.dispose(),this.handlers.delete(e))}dispose(){this.handlers.clear(),this.extensionOpener.dispose()}};i.__decorate([(0,r.Autowired)(a.IOpenerService),i.__metadata("design:type",Object)],u.prototype,"openerService",void 0),i.__decorate([(0,r.Autowired)(d),i.__metadata("design:type",d)],u.prototype,"extensionOpener",void 0),u=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(o.IRPCProtocol)),i.__metadata("design:paramtypes",[Object])],u),t.MainThreadUrls=u},28502:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWindowState=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(24453));let a=class{constructor(e){this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(o.ExtHostAPIIdentifier.ExtHostWindowState),this.blurHandler=()=>{this.proxy.$setWindowState(!1)},this.focusHandler=()=>{this.proxy.$setWindowState(!0)},window.addEventListener("blur",this.blurHandler),window.addEventListener("focus",this.focusHandler)}dispose(){window.removeEventListener("blur",this.blurHandler),window.removeEventListener("focus",this.focusHandler)}};a=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],a),t.MainThreadWindowState=a},6874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWindow=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(1500),s=n(24453);let c=class{constructor(e){this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostWindow)}getDefaultDialogOptions(e){return Object.assign(Object.assign({},e),{defaultUri:e.defaultUri?o.URI.from(e.defaultUri):void 0})}async $showOpenDialog(e,t={}){const n=this.getDefaultDialogOptions(t),i=await this.windowDialogService.showOpenDialog(n);this.proxy.$onOpenDialogResult(e,i?i.map((e=>e.codeUri)):i)}async $showSaveDialog(e,t={}){const n=this.getDefaultDialogOptions(t),i=await this.windowDialogService.showSaveDialog(n);this.proxy.$onSaveDialogResult(e,i?i.codeUri:i)}dispose(){}};i.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),i.__metadata("design:type",r.Injector)],c.prototype,"injector",void 0),i.__decorate([(0,r.Autowired)(a.IDialogService),i.__metadata("design:type",Object)],c.prototype,"dialogService",void 0),i.__decorate([(0,r.Autowired)(a.IWindowDialogService),i.__metadata("design:type",Object)],c.prototype,"windowDialogService",void 0),c=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],c),t.MainThreadWindow=c},91795:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWorkspace=void 0;const i=n(70655),r=n(39993),o=(n(41037),n(894)),a=n(92345),s=n(38097),c=n(9550),l=n(14238),d=n(53743),u=n(24453);let p=class extends o.WithEventBus{constructor(e){super(),this.rpcProtocol=e,this.proxy=this.rpcProtocol.getProxy(u.ExtHostAPIIdentifier.ExtHostWorkspace),this.processWorkspaceFoldersChanged(this.workspaceService.tryGetRoots()),this.addDispose(this.workspaceChangeEvent=this.workspaceService.onWorkspaceChanged((e=>{this.processWorkspaceFoldersChanged(e)}))),this.storageProxy=e.getProxy(u.ExtHostAPIIdentifier.ExtHostStorage)}async $startFileSearch(e,t,n,i,r){const o={rootUris:t.cwd?[t.cwd]:this.workspaceService.tryGetRoots().map((e=>e.uri)),excludePatterns:n?[n]:void 0,limit:i,includePatterns:[e]};return await this.fileSearchService.find("",o)}isAnyRootChanged(e){return!this.roots||this.roots.length!==e.length||this.roots.some(((t,n)=>t.uri!==e[n].uri))}processWorkspaceFoldersChanged(e){!1!==this.isAnyRootChanged(e)&&(this.roots=e,this.proxy.$onWorkspaceFoldersChanged({roots:e}),this.extensionStorageService.getAll(!1).then((e=>{this.storageProxy.$updateWorkspaceStorageData(e)})))}dispose(){super.dispose(),this.workspaceChangeEvent.dispose()}async $updateWorkspaceFolders(e,t,n,...i){await this.workspaceService.spliceRoots(e,t,n,...i.map((e=>new o.URI(e))))}async $tryApplyWorkspaceEdit(e){const t=(0,u.reviveWorkspaceEditDto)(e);try{return await this.workspaceEditService.apply(t),!0}catch(e){return this.logger.error(e),!1}}async $saveAll(){try{return await this.editorService.saveAll(),!0}catch(e){return this.logger.error(e),!1}}onRenameFile(e){this.proxy.$didRenameFile(e.payload.oldUri.codeUri,e.payload.newUri.codeUri)}};i.__decorate([(0,r.Autowired)(l.IWorkspaceService),i.__metadata("design:type",Object)],p.prototype,"workspaceService",void 0),i.__decorate([(0,r.Autowired)(a.WorkbenchEditorService),i.__metadata("design:type",a.WorkbenchEditorService)],p.prototype,"editorService",void 0),i.__decorate([(0,r.Autowired)(c.FileSearchServicePath),i.__metadata("design:type",Object)],p.prototype,"fileSearchService",void 0),i.__decorate([(0,r.Autowired)(s.IExtensionStorageService),i.__metadata("design:type",Object)],p.prototype,"extensionStorageService",void 0),i.__decorate([(0,r.Autowired)(d.IWorkspaceEditService),i.__metadata("design:type",Object)],p.prototype,"workspaceEditService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],p.prototype,"logger",void 0),i.__decorate([(0,o.OnEvent)(d.WorkspaceEditDidRenameFileEvent),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[d.WorkspaceEditDidRenameFileEvent]),i.__metadata("design:returntype",void 0)],p.prototype,"onRenameFile",null),p=i.__decorate([(0,r.Injectable)({multiple:!0}),i.__param(0,(0,r.Optional)(Symbol())),i.__metadata("design:paramtypes",[Object])],p),t.MainThreadWorkspace=p},21635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentRangeSemanticTokensProviderImpl=t.DocumentSemanticTokensProvider=void 0;const i=n(37430);function r(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return Uint8Array.from(e);const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(Number(e[n]));return Uint8Array.from(t)}t.DocumentSemanticTokensProvider=class{constructor(e,t,n){this.proxy=e,this.handleId=t,this.legend=n}getLegend(){return this.legend}async provideDocumentSemanticTokens(e,t,n){const o=t?parseInt(t,10):0,a=await this.proxy.$provideDocumentSemanticTokens(this.handleId,e.uri,o,n);if(!a)return null;if(n.isCancellationRequested)return null;const s=(0,i.decodeSemanticTokensDto)(r(a));return"full"===s.type?{resultId:String(s.id),data:s.data}:{resultId:String(s.id),edits:s.deltas}}releaseDocumentSemanticTokens(e){e&&this.proxy.$releaseDocumentSemanticTokens(this.handleId,parseInt(e,10))}};t.DocumentRangeSemanticTokensProviderImpl=class{constructor(e,t,n){this.proxy=e,this.handleId=t,this.legend=n}getLegend(){return this.legend}async provideDocumentRangeSemanticTokens(e,t,n){const o=await this.proxy.$provideDocumentRangeSemanticTokens(this.handleId,e.uri,t,n);if(!o)return null;if(n.isCancellationRequested)return null;const a=(0,i.decodeSemanticTokensDto)(r(o));if("full"===a.type)return{resultId:String(a.id),data:a.data};throw new Error("Unexpected")}}},79352:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(84619);let l=i=class extends a.TreeModel{constructor(e){super(),this.flushDispatchChangeDelayer=new s.ThrottledDelayer(i.DEFAULT_FLUSH_DELAY),this.onWillUpdateEmitter=new s.Emitter,this.init(e)}get onWillUpdate(){return this.onWillUpdateEmitter.event}init(e){this.root=e,this.root.watcher.on(a.TreeNodeEvent.BranchDidUpdate,(()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger((async()=>{await this.onWillUpdateEmitter.fireAndAwait(),this.dispatchChange()}))}))}};l.DEFAULT_FLUSH_DELAY=100,l=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[c.ExtensionTreeRoot])],l),t.ExtensionTreeModel=l},12760:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeViewModel=t.ITreeViewBaseOptions=t.ITreeViewId=t.IExtensionTreeViewModel=void 0;const r=n(70655),o=n(39993),a=n(25880),s=n(894),c=n(57061),l=n(90642),d=n(75859),u=r.__importDefault(n(37438)),p=n(79352),h=n(84619);t.IExtensionTreeViewModel=Symbol("IExtensionTreeViewModel"),t.ITreeViewId=Symbol("ITreeViewId"),t.ITreeViewBaseOptions=Symbol("TreeViewBaseOptions");const m=Symbol("ITreeViewDataProvider");let g=i=class{constructor(){this.selectedDecoration=new a.Decoration(u.default.mod_selected),this.focusedDecoration=new a.Decoration(u.default.mod_focused),this.contextMenuDecoration=new a.Decoration(u.default.mod_actived),this.loadingDecoration=new a.Decoration(u.default.mod_loading),this._selectedNodes=[],this.disposableCollection=new s.DisposableCollection,this.onDidFocusedNodeChangeEmitter=new s.Emitter,this.onDidSelectedNodeChangeEmitter=new s.Emitter,this.onDidChangeExpansionStateEmitter=new s.Emitter,this._isMultiSelected=!1,this.revealDelayer=new s.ThrottledDelayer(i.DEFAULT_REVEAL_DELAY),this.clearNodeSelectedDecoration=()=>{this._selectedNodes.forEach((e=>{this.selectedDecoration.removeTarget(e)})),this._selectedNodes=[],this.onDidSelectedNodeChangeEmitter.fire([])},this.activeNodeDecoration=e=>{if(e!==this.treeModel.root&&(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),e)){if(this.selectedNodes.length>0)for(const e of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(e);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this.focusedDecoration.addTarget(e),this._focusedNode=e,this._selectedNodes=[e],this.onDidFocusedNodeChangeEmitter.fire(e.treeItemId),this.onDidSelectedNodeChangeEmitter.fire([e.treeItemId]),this.treeModel.dispatchChange()}},this.activeNodeFocusedDecoration=(e,t=!1,n=!1)=>{if(e!==this.treeModel.root){if(this.focusedNode!==e&&(t?(this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this._contextMenuNode=e):this.focusedNode&&(this._contextMenuNode=void 0,this.focusedDecoration.removeTarget(this.focusedNode)),e)){if(n){for(const e of this._selectedNodes)this.selectedDecoration.removeTarget(e);this._selectedNodes=[]}this._selectedNodes.indexOf(e)<0&&(this.selectedDecoration.addTarget(e),this._selectedNodes.push(e),this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map((e=>e.treeItemId)))),this.focusedDecoration.addTarget(e),this._focusedNode=e,this.onDidFocusedNodeChangeEmitter.fire(e.treeItemId)}this.treeModel.dispatchChange()}},this.activeNodeActivedDecoration=e=>{this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(e),this._contextMenuNode=e,this.treeModel.dispatchChange()},this.selectNodeDecoration=(e,t=!0)=>{e!==this.treeModel.root&&(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),e&&(this.selectedNodes.length>0&&this.selectedNodes.forEach((e=>{this.selectedDecoration.removeTarget(e)})),this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(e),this._selectedNodes=[e],this.onDidSelectedNodeChangeEmitter.fire([e.treeItemId]),t&&this.treeModel.dispatchChange()))},this.activeNodeSelectedDecoration=e=>{this._selectedNodes.indexOf(e)>-1||(this._selectedNodes.push(e),this.selectedDecoration.addTarget(e),this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map((e=>e.treeItemId))),this.treeModel.dispatchChange())},this.activeNodeDecorationByRange=(e,t)=>{for(this.clearNodeSelectedDecoration(),this._contextMenuNode=void 0;e<=t;e++){const t=this.treeModel.root.getTreeNodeAtIndex(e);t&&(this._selectedNodes.push(t),this.selectedDecoration.addTarget(t))}this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map((e=>e.treeItemId))),this.treeModel.dispatchChange()},this.enactiveNodeDecoration=()=>{var e;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this.onDidFocusedNodeChangeEmitter.fire(),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),null===(e=this.treeModel)||void 0===e||e.dispatchChange()},this.toggleDirectory=async e=>{e.expanded?this.extensionTreeHandle.collapseNode(e):this.extensionTreeHandle.expandNode(e)},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(e,t)=>{if(this.focusedNode){if(this.focusedNode&&this.focusedNode!==e){this._isMultiSelected=!0;const t=this.treeModel.root.getIndexAtTreeNode(e),n=this.treeModel.root.getIndexAtTreeNode(this.focusedNode);n>t?this.activeNodeDecorationByRange(t,n):n{this._isMultiSelected=!0,t!==a.TreeNodeType.CompositeTreeNode&&t!==a.TreeNodeType.TreeNode||(this.selectedNodes.indexOf(e)>-1?this.focusedNode===e?this.enactiveNodeDecoration():this.activeNodeFocusedDecoration(e):this.activeNodeSelectedDecoration(e))},this.handleItemClick=async(e,t)=>{this._isMultiSelected=!1,t!==a.TreeNodeType.CompositeTreeNode&&t!==a.TreeNodeType.TreeNode||this.activeNodeDecoration(e),e.resolved||await e.resolveTreeItem(),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]):(this.clickTimes++,t===a.TreeNodeType.CompositeTreeNode&&"singleClick"===this.preferenceService.get("workbench.list.openMode")&&this.toggleDirectory(e),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout((()=>{this.clickTimes>1&&t!==a.TreeNodeType.TreeNode&&"doubleClick"===this.preferenceService.get("workbench.list.openMode")&&this.toggleDirectory(e),this.clickTimes=0}),200))},this.handleContextMenu=(e,t)=>{e.stopPropagation(),e.preventDefault();const{x:n,y:i}=e.nativeEvent;let r,o;t?this.activeNodeActivedDecoration(t):this.enactiveNodeDecoration(),t?(o=t,r=this._isMultiSelected?this.selectedNodes.indexOf(o)>=0?this._isMultiSelected?this.selectedNodes:[o]:this._isMultiSelected?this.selectedNodes.concat([o]):[o]:[o]):(r=[this.treeModel.root],o=this.treeModel.root);const a=this.getCtxMenuNodes(o.contextValue);this.injector.get(c.ICtxMenuRenderer).show({anchor:{x:n,y:i},menuNodes:a,args:[{treeViewId:this.treeViewId,treeItemId:o.treeItemId},r.map((e=>({treeViewId:this.treeViewId,treeItemId:e.treeItemId})))]})},this._whenReady=this.initTreeModel()}static createContainer(e,n,r,o){return e.createChild([{token:m,useValue:n},{token:t.IExtensionTreeViewModel,useClass:i},{token:t.ITreeViewId,useValue:r},{token:t.ITreeViewBaseOptions,useValue:o}])}static createModel(e,n,r,o){return i.createContainer(e,n,r,o).get(t.IExtensionTreeViewModel)}get onDidFocusedNodeChange(){return this.onDidFocusedNodeChangeEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidSelectedNodeChange(){return this.onDidSelectedNodeChangeEmitter.event}get extensionTreeHandle(){return this._extensionTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}async initTreeModel(){const e=(await this.treeViewDataProvider.resolveChildren())[0];this._treeModel=this.injector.get(p.ExtensionTreeModel,[e]),this.initDecorations(e),this.disposableCollection.push(this.treeViewDataProvider),this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.WillResolveChildren,(e=>{this.loadingDecoration.addTarget(e)}))),this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.DidResolveChildren,(e=>{this.loadingDecoration.removeTarget(e)}))),this.disposableCollection.push(this.treeModel.root.watcher.on(a.TreeNodeEvent.DidChangeExpansionState,((e,t)=>{this.onDidChangeExpansionStateEmitter.fire({treeItemId:e.treeItemId,expanded:t})}))),this.disposableCollection.push(this.treeViewDataProvider.onTreeDataChanged((e=>{this.refresh(e)}))),this.disposableCollection.push(this.treeViewDataProvider.onRevealChanged((e=>{this.reveal(e)}))),this.disposableCollection.push(this.treeViewDataProvider.onRevealChanged((e=>{this.reveal(e)}))),this.disposableCollection.push(this.treeModel.onWillUpdate((()=>{var e;if(0!==this.selectedNodes.length){const t=null===(e=this.treeModel)||void 0===e?void 0:e.root.getTreeNodeByPath(this.selectedNodes[0].path);this.selectedDecoration.addTarget(t)}})))}async updateTreeModel(){const e=await this.treeViewDataProvider.resolveChildren()[0];this._treeModel=this.injector.get(p.ExtensionTreeModel,[e])}initDecorations(e){this._decorations=new a.DecorationsManager(e),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(e){this._extensionTreeHandle=e}getCtxMenuNodes(e){return this.getMenuNodes(e)[1]}getMenuNodes(e){const t=this.contextKeyService.createScoped();t.createKey("view",this.treeViewId),t.createKey("viewItem",e);const n=this.menuService.createMenu(c.MenuId.ViewItemContext,t),i=(0,c.generateCtxMenu)({menus:n,separator:"inline"});return n.dispose(),t.dispose(),i}getInlineMenuNodes(e){return this.getMenuNodes(e)[0]}collapseAll(){this.treeModel.root.collapsedAll()}async refresh(e){var t;if(await this.whenReady,e){const t=this.treeViewDataProvider.getTreeNodeIdByTreeItemId(e.id);if(!t)return;const n=this.treeModel.root.getTreeNodeById(t);if(!n)return;h.ExtensionCompositeTreeNode.is(n)?await n.refresh():n.parent&&await n.parent.refresh()}else await(null===(t=this.treeModel.root)||void 0===t?void 0:t.refresh())}async reveal(e,t={}){return await this.whenReady,this.revealDelayer.isTriggered()?this.revealDeferred&&await this.revealDeferred.promise:this.revealDelayer.cancel(),this.revealDelayer.trigger((async()=>{this.revealDeferred=new s.Deferred,0===this.treeModel.root.branchSize&&await this.refresh();const n=this.treeViewDataProvider.getTreeNodeIdByTreeItemId(e);if(!n)return;const i=this.treeModel.root.getTreeNodeById(n);if(!i)return;const r=!(0,l.isUndefinedOrNull)(t.select)&&t.select,o=!(0,l.isUndefinedOrNull)(t.focus)&&t.focus;let a=Math.min((0,l.isNumber)(t.expand)?t.expand:!0===t.expand?1:0,3),c=await this.extensionTreeHandle.ensureVisible(i.path);for(c&&(r&&this.selectNodeDecoration(c),o&&this.activeNodeFocusedDecoration(c,!1,!0));h.ExtensionCompositeTreeNode.is(c)&&c.branchSize>0&&a>0;a--)await this.extensionTreeHandle.expandNode(c),c=(null==c?void 0:c.children)?null==c?void 0:c.children[0]:void 0;this.revealDeferred.resolve(),this.revealDeferred=null}))}};g.DEFAULT_REVEAL_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],g.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m),r.__metadata("design:type",d.TreeViewDataProvider)],g.prototype,"treeViewDataProvider",void 0),r.__decorate([(0,o.Autowired)(s.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewId),r.__metadata("design:type",String)],g.prototype,"treeViewId",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewBaseOptions),r.__metadata("design:type",Object)],g.prototype,"treeViewOptions",void 0),r.__decorate([(0,o.Autowired)(c.AbstractMenuService),r.__metadata("design:type",c.AbstractMenuService)],g.prototype,"menuService",void 0),r.__decorate([(0,o.Autowired)(s.IContextKeyService),r.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(s.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),g=i=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],g),t.ExtensionTreeViewModel=g},84619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeNode=t.ExtensionCompositeTreeNode=t.ExtensionTreeRoot=void 0;const i=n(25880),r=n(90642);class o extends i.CompositeTreeNode{constructor(e,t=""){super(e,void 0),this.treeViewId=t}static is(e){return!!e&&"children"in e&&!e.parent}get treeItemId(){return`TreeViewRoot_${this.treeViewId}`}get name(){return`TreeViewRoot_${this.id}`}get expanded(){return!0}get displayName(){return this._displayName}dispose(){super.dispose()}}t.ExtensionTreeRoot=o;class a extends i.CompositeTreeNode{constructor(e,t,n,i="",o="",a="",s,c="",l="",d,u,p){super(e,t,void 0,{name:l}),this.description=i,this.icon=o,this.contextValue=c,this.treeItemId=l,this.actions=d,this._accessibilityInformation=u,this._resolved=!1,this.isExpanded=p||!1,this._command=s,this._tooltip=a,(0,r.isString)(n)?this._displayName=n:(0,r.isObject)(n)&&(this._displayName=n.label,this._hightlights=n.highlights,this._strikethrough=n.strikethrough)}get resolved(){return this._resolved}get command(){return this._command}get tooltip(){return this._tooltip}get displayName(){return this._displayName}get accessibilityInformation(){var e,t;return{role:(null===(e=this._accessibilityInformation)||void 0===e?void 0:e.role)||"treeitem",label:(null===(t=this._accessibilityInformation)||void 0===t?void 0:t.label)||this.displayName}}get strikethrough(){return this._strikethrough}get highlights(){return this._hightlights}async resolveTreeItem(){const e=await this._tree.resolveTreeItem(this._tree.treeViewId,this.treeItemId);e&&(this._tooltip=e.tooltip,this._command=e.command),this._resolved=!0}dispose(){super.dispose()}}t.ExtensionCompositeTreeNode=a;class s extends i.TreeNode{constructor(e,t,n,i="",o="",a,s,c="",l="",d,u){super(e,t,void 0,{name:l}),this.description=i,this.icon=o,this._tooltip=a,this._command=s,this.contextValue=c,this.treeItemId=l,this.actions=d,this._accessibilityInformation=u,this._resolved=!1,(0,r.isString)(n)?this._displayName=n:(0,r.isObject)(n)&&(this._displayName=n.label,this._hightlights=n.highlights,this._strikethrough=n.strikethrough)}get resolved(){return this._resolved}get command(){return this._command}get tooltip(){return this._tooltip}get displayName(){return this._displayName}get accessibilityInformation(){var e,t;return{role:(null===(e=this._accessibilityInformation)||void 0===e?void 0:e.role)||"treeitem",label:(null===(t=this._accessibilityInformation)||void 0===t?void 0:t.label)||this.displayName}}get strikethrough(){return this._strikethrough}get highlights(){return this._hightlights}async resolveTreeItem(){const e=await this._tree.resolveTreeItem(this._tree.treeViewId,this.treeItemId);e&&(this._tooltip=e.tooltip,this._command=e.command),this._resolved=!0}}t.ExtensionTreeNode=s},42854:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_COMMAND_STEP_INTO=t.EDITOR_SAVE_ALL=t.EDITOR_NAVIGATE_FORWARD=t.EDITOR_NAVIGATE_BACK=t.SETTINGS_COMMAND_OPEN_SETTINGS_JSON=t.SETTINGS_COMMAND_OPEN_SETTINGS=t.COPY_RELATIVE_FILE_PATH=t.COPY_FILE_PATH=t.CLEAR_TERMINAL=t.STOP_EXTENSION_HOST_PROFILER=t.START_EXTENSION_HOST_PROFILER=t.SHOW_RUN_TIME_EXTENSION=t.RELOAD_WINDOW=t.RELOAD_WINDOW_COMMAND=t.API_OPEN_WITH_EDITOR_COMMAND_ID=t.API_OPEN_DIFF_EDITOR_COMMAND_ID=t.OPEN_WITH=t.DIFF=t.OPEN_FOLDER=t.API_OPEN_EDITOR_COMMAND_ID=t.OPEN=t.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP=t.WORKBENCH_FOCUS_FILES_EXPLORER=t.NEW_WORKBENCH_VIEW_TERMINAL=t.TOGGLE_WORKBENCH_VIEW_TERMINAL=t.REVERT_FILES=t.OPEN_EDITOR_AT_INDEX=t.CLOSE_OTHER_GROUPS=t.EVEN_EDITOR_WIDTH=t.LAST_EDITOR_IN_GROUP=t.NEXT_EDITOR_IN_GROUP=t.PREVIOUS_EDITOR_IN_GROUP=t.PREVIOUS_EDITOR=t.NEXT_EDITOR=t.NAVIGATE_NEXT=t.NAVIGATE_DOWN=t.NAVIGATE_RIGHT=t.NAVIGATE_UP=t.NAVIGATE_LEFT=t.SPLIT_EDITOR_ORTHOGONAL=t.SPLIT_EDITOR=t.FILE_SAVE=t.CLOSE_OTHER_EDITORS=t.CLOSE_ALL_EDITORS=t.NEW_UNTITLED_FILE=t.SPLIT_EDITOR_DOWN=t.SPLIT_EDITOR_RIGHT=t.REVERT_AND_CLOSE_ACTIVE_EDITOR=t.WORKBENCH_CLOSE_ACTIVE_EDITOR=t.SET_CONTEXT=void 0,t.GET_EXTENSION=t.REVEAL_IN_EXPLORER=t.EDITOR_SHOW_ALL_SYMBOLS=t.DEBUG_COMMAND_STOP=t.DEBUG_COMMAND_RESTART=t.DEBUG_COMMAND_PAUSE=t.DEBUG_COMMAND_START=t.DEBUG_COMMAND_RUN=t.DEBUG_COMMAND_CONTINUE=t.DEBUG_COMMAND_STEP_OUT=t.DEBUG_COMMAND_STEP_OVER=void 0;const i=n(894),r=n(92871),o=n(22566);t.SET_CONTEXT={id:"setContext"},t.WORKBENCH_CLOSE_ACTIVE_EDITOR={id:"workbench.action.closeActiveEditor",delegate:i.EDITOR_COMMANDS.CLOSE.id},t.REVERT_AND_CLOSE_ACTIVE_EDITOR={id:"workbench.action.revertAndCloseActiveEditor",delegate:i.EDITOR_COMMANDS.REVERT_AND_CLOSE.id},t.SPLIT_EDITOR_RIGHT={id:"workbench.action.splitEditorRight",delegate:i.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id},t.SPLIT_EDITOR_DOWN={id:"workbench.action.splitEditorDown",delegate:i.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id},t.NEW_UNTITLED_FILE={id:"workbench.action.files.newUntitledFile",delegate:i.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id},t.CLOSE_ALL_EDITORS={id:"workbench.action.closeAllEditors",delegate:i.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id},t.CLOSE_OTHER_EDITORS={id:"workbench.action.closeOtherEditors",delegate:i.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP.id},t.FILE_SAVE={id:"workbench.action.files.save",delegate:i.EDITOR_COMMANDS.SAVE_CURRENT.id},t.SPLIT_EDITOR={id:"workbench.action.splitEditor",delegate:i.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id},t.SPLIT_EDITOR_ORTHOGONAL={id:"workbench.action.splitEditorOrthogonal",delegate:i.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id},t.NAVIGATE_LEFT={id:"workbench.action.navigateLeft",delegate:i.EDITOR_COMMANDS.NAVIGATE_LEFT.id},t.NAVIGATE_UP={id:"workbench.action.navigateUp",delegate:i.EDITOR_COMMANDS.NAVIGATE_UP.id},t.NAVIGATE_RIGHT={id:"workbench.action.navigateRight",delegate:i.EDITOR_COMMANDS.NAVIGATE_RIGHT.id},t.NAVIGATE_DOWN={id:"workbench.action.navigateDown",delegate:i.EDITOR_COMMANDS.NAVIGATE_DOWN.id},t.NAVIGATE_NEXT={id:"workbench.action.navigateEditorGroups",delegate:i.EDITOR_COMMANDS.NAVIGATE_NEXT.id},t.NEXT_EDITOR={id:"workbench.action.nextEditor",delegate:i.EDITOR_COMMANDS.NEXT.id},t.PREVIOUS_EDITOR={id:"workbench.action.previousEditor",delegate:i.EDITOR_COMMANDS.PREVIOUS.id},t.PREVIOUS_EDITOR_IN_GROUP={id:"workbench.action.previousEditorInGroup",delegate:i.EDITOR_COMMANDS.PREVIOUS_IN_GROUP.id},t.NEXT_EDITOR_IN_GROUP={id:"workbench.action.nextEditorInGroup",delegate:i.EDITOR_COMMANDS.NEXT_IN_GROUP.id},t.LAST_EDITOR_IN_GROUP={id:"workbench.action.lastEditorInGroup",delegate:i.EDITOR_COMMANDS.LAST_IN_GROUP.id},t.EVEN_EDITOR_WIDTH={id:"workbench.action.eventEditorWidths",delegate:i.EDITOR_COMMANDS.EVEN_EDITOR_GROUPS.id},t.CLOSE_OTHER_GROUPS={id:"workbench.action.closeEditorsInOtherGroups",delegate:i.EDITOR_COMMANDS.EVEN_EDITOR_GROUPS.id},t.OPEN_EDITOR_AT_INDEX={id:"workbench.action.openEditorAtIndex",delegate:i.EDITOR_COMMANDS.OPEN_EDITOR_AT_INDEX.id},t.REVERT_FILES={id:"workbench.action.files.revert",delegate:i.EDITOR_COMMANDS.REVERT_DOCUMENT.id},t.TOGGLE_WORKBENCH_VIEW_TERMINAL={id:"workbench.action.terminal.toggleTerminal",delegate:"workbench.view.terminal"},t.NEW_WORKBENCH_VIEW_TERMINAL={id:"workbench.action.terminal.new",delegate:o.TERMINAL_COMMANDS.ADD.id},t.WORKBENCH_FOCUS_FILES_EXPLORER={id:"workbench.files.action.focusFilesExplorer",delegate:i.FILE_COMMANDS.FOCUS_FILES.id},t.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP={id:"workbench.action.focusActiveEditorGroup",delegate:i.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP.id},t.OPEN={id:"vscode.open"},t.API_OPEN_EDITOR_COMMAND_ID={id:i.EDITOR_COMMANDS.API_OPEN_EDITOR_COMMAND_ID,delegate:t.OPEN.id},t.OPEN_FOLDER={id:"vscode.openFolder",delegate:i.FILE_COMMANDS.VSCODE_OPEN_FOLDER.id},t.DIFF={id:"vscode.diff"},t.OPEN_WITH={id:"vscode.openWith"},t.API_OPEN_DIFF_EDITOR_COMMAND_ID={id:i.EDITOR_COMMANDS.API_OPEN_DIFF_EDITOR_COMMAND_ID,delegate:t.DIFF.id},t.API_OPEN_WITH_EDITOR_COMMAND_ID={id:i.EDITOR_COMMANDS.API_OPEN_WITH_EDITOR_COMMAND_ID,delegate:t.OPEN_WITH.id},t.RELOAD_WINDOW_COMMAND={id:"reload_window"},t.RELOAD_WINDOW={id:"workbench.action.reloadWindow",delegate:t.RELOAD_WINDOW_COMMAND.id},t.SHOW_RUN_TIME_EXTENSION={id:"workbench.action.showRuntimeExtensions",label:"Show Running Extensions"},t.START_EXTENSION_HOST_PROFILER={id:"workbench.action.extensionHostProfiler.start",label:"Start Extension Host Profile"},t.STOP_EXTENSION_HOST_PROFILER={id:"workbench.action.extensionHostProfiler.stop",label:"Stop Extension Host Profile"},t.CLEAR_TERMINAL={id:"workbench.action.terminal.clear",delegate:o.TERMINAL_COMMANDS.CLEAR_CONTENT.id},t.COPY_FILE_PATH={id:"copyFilePath",label:i.FILE_COMMANDS.COPY_PATH.label},t.COPY_RELATIVE_FILE_PATH={id:"copyRelativeFilePath",label:i.FILE_COMMANDS.COPY_RELATIVE_PATH.label},t.SETTINGS_COMMAND_OPEN_SETTINGS={id:"workbench.action.openSettings",delegate:"core.openpreference"},t.SETTINGS_COMMAND_OPEN_SETTINGS_JSON={id:"workbench.action.openSettingsJson",delegate:"preference.open.source"},t.EDITOR_NAVIGATE_BACK={id:"workbench.action.navigateBack",delegate:i.EDITOR_COMMANDS.GO_BACK.id},t.EDITOR_NAVIGATE_FORWARD={id:"workbench.action.navigateForward",delegate:i.EDITOR_COMMANDS.GO_FORWARD.id},t.EDITOR_SAVE_ALL={id:"workbench.action.files.saveAll",delegate:i.EDITOR_COMMANDS.SAVE_ALL.id},t.DEBUG_COMMAND_STEP_INTO={id:"workbench.action.debug.stepInto",delegate:r.DEBUG_COMMANDS.NEXT.id},t.DEBUG_COMMAND_STEP_OVER={id:"workbench.action.debug.stepOver",delegate:r.DEBUG_COMMANDS.OVER.id},t.DEBUG_COMMAND_STEP_OUT={id:"workbench.action.debug.stepOut",delegate:r.DEBUG_COMMANDS.PREV.id},t.DEBUG_COMMAND_CONTINUE={id:"workbench.action.debug.continue",delegate:r.DEBUG_COMMANDS.CONTINUE.id},t.DEBUG_COMMAND_RUN={id:"workbench.action.debug.run",delegate:r.DEBUG_COMMANDS.START.id},t.DEBUG_COMMAND_START={id:"workbench.action.debug.start",delegate:r.DEBUG_COMMANDS.START.id},t.DEBUG_COMMAND_PAUSE={id:"workbench.action.debug.pause",delegate:r.DEBUG_COMMANDS.PAUSE.id},t.DEBUG_COMMAND_RESTART={id:"workbench.action.debug.restart",delegate:r.DEBUG_COMMANDS.RESTART.id},t.DEBUG_COMMAND_STOP={id:"workbench.action.debug.stop",delegate:r.DEBUG_COMMANDS.STOP.id},t.EDITOR_SHOW_ALL_SYMBOLS={id:"workbench.action.showAllSymbols",delegate:i.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id},t.REVEAL_IN_EXPLORER={id:"revealInExplorer",delegate:i.FILE_COMMANDS.REVEAL_IN_EXPLORER.id},t.GET_EXTENSION={id:"extension.getDescription"}},25612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(75267),s=n(34734),c=n(57280);let l=class extends c.VSCodeContributePoint{contribute(){this.register(this.json)}register(e){const t=this,n=[];for(const i of e){const{title:e,description:r}=i;switch(i.type){case"action":n.push({title:e,description:r,iconClass:(0,o.getIcon)(i.icon),click:()=>{i.command&&t.commandService.executeCommand(i.command)},type:i.type});break;case"enum":n.push({type:i.type,title:e,description:r,select:e=>{i.command&&t.commandService.executeCommand(i.command,e)},enum:i.enum,defaultValue:i.defaultValue})}}this.addDispose(this.toolbarActionService.registryActionGroup(this.extension.id,n))}unregister(){this.toolbarActionService.unRegistryActionGroup(this.extension.id)}dispose(){super.dispose(),this.unregister()}};i.__decorate([(0,r.Autowired)(s.IToolBarViewService),i.__metadata("design:type",s.IToolBarViewService)],l.prototype,"toolbarViewService",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],l.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(a.IToolbarActionService),i.__metadata("design:type",Object)],l.prototype,"toolbarActionService",void 0),l=i.__decorate([(0,r.Injectable)(),(0,c.Contributes)("actions")],l),t.ActionsContributionPoint=l},32855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(63249),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){this.register(this.json)}register(e){e.forEach((e=>{this.debugConfigurationManager.addSupportBreakpoints(e.language)}))}unregister(e){e.forEach((e=>{this.debugConfigurationManager.removeSupportBreakpoints(e.language)}))}dispose(){this.unregister(this.json)}};i.__decorate([(0,r.Autowired)(o.DebugConfigurationManager),i.__metadata("design:type",o.DebugConfigurationManager)],s.prototype,"debugConfigurationManager",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("breakpoints")],s),t.BreakpointsContributionPoint=s},23907:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(52292),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){const e=this.json;for(const t of e)t&&t.description&&(t.description=(0,o.replaceLocalizePlaceholder)(t.description)),this.themeService.registerColor(t)}};c.schema={description:(0,o.localize)("contributes.color","Contributes extension defined themable colors"),type:"array",items:{type:"object",properties:{id:{type:"string",description:(0,o.localize)("contributes.color.id","The identifier of the themable color"),pattern:"^\\w+[.\\w+]*$",patternErrorMessage:(0,o.localize)("contributes.color.id.format","Identifiers should be in the form aa[.bb]*")},description:{type:"string",description:(0,o.localize)("contributes.color.description","The description of the themable color")},defaults:{type:"object",properties:{light:{description:(0,o.localize)("contributes.defaults.light","The default color for light themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default."),type:"string",anyOf:[{type:"string",format:"color-hex"}]},dark:{description:(0,o.localize)("contributes.defaults.dark","The default color for dark themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default."),type:"string",anyOf:[{type:"string",format:"color-hex"}]},highContrast:{description:(0,o.localize)("contributes.defaults.highContrast","The default color for high contrast themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default."),type:"string",anyOf:[{type:"string",format:"color-hex"}]}}}}}},i.__decorate([(0,r.Autowired)(a.IThemeService),i.__metadata("design:type",Object)],c.prototype,"themeService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("colors")],c),t.ColorsContributionPoint=c},71963:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(52292),s=n(57280);let c=class extends s.VSCodeContributePoint{async contribute(){this.json.forEach((e=>{this.addDispose(this.commandRegistry.registerCommand({category:this.getLocalizeFromNlsJSON(e.category),label:this.getLocalizeFromNlsJSON(e.title),shortLabel:e.shortTitle?this.getLocalizeFromNlsJSON(e.shortTitle):void 0,id:e.command,iconClass:"string"==typeof e.icon&&this.iconService.fromString(e.icon)||this.iconService.fromIcon(this.extension.path,e.icon,a.IconType.Background),enablement:e.enablement,alias:this.getLocalizeFromNlsJSON(e.title,this.extension.id,"default"),aliasCategory:this.getLocalizeFromNlsJSON(e.category,this.extension.id,"default")},{execute:(...t)=>this.extensionService.executeExtensionCommand(e.command,t)})),this.config.noExtHost?this.addDispose(this.extensionCommandManager.registerExtensionCommandEnv(e.command,"worker")):this.addDispose(this.extensionCommandManager.registerExtensionCommandEnv(e.command,"node"))}))}};i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],c.prototype,"commandRegistry",void 0),i.__decorate([(0,r.Autowired)(s.ExtensionService),i.__metadata("design:type",s.ExtensionService)],c.prototype,"extensionService",void 0),i.__decorate([(0,r.Autowired)(s.IExtCommandManagement),i.__metadata("design:type",s.IExtCommandManagement)],c.prototype,"extensionCommandManager",void 0),i.__decorate([(0,r.Autowired)(a.IIconService),i.__metadata("design:type",Object)],c.prototype,"iconService",void 0),i.__decorate([(0,r.Autowired)(o.AppConfig),i.__metadata("design:type",Object)],c.prototype,"config",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("commands")],c),t.CommandsContributionPoint=c},91021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contributes=t.VscodeContributionPoint=t.CONTRIBUTE_NAME_KEY=void 0;const i=n(90642);t.CONTRIBUTE_NAME_KEY="contribute_name";class r extends i.Disposable{constructor(e,t,n){super(),this.json=e,this.contributes=t,this.extension=n}}t.VscodeContributionPoint=r,t.Contributes=function(e){return n=>{Reflect.defineMetadata(t.CONTRIBUTE_NAME_KEY,e,n)}}},35449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){let e=this.json,t={};Array.isArray(e)||(e=[e]);for(const n of e)if(n&&n.properties){for(const e of Object.keys(n.properties))t[e]=n.properties[e],n.properties[e].description&&(t[e].description=(0,o.replaceLocalizePlaceholder)(n.properties[e].description,this.extension.id));n.properties=t,n.title=(0,o.replaceLocalizePlaceholder)(n.title,this.extension.id)||this.extension.packageJSON.name,this.updateConfigurationSchema(n),this.addDispose(this.preferenceSettingsService.registerSettingSection("extension",{title:n.title,preferences:Object.keys(n.properties)})),t={}}}updateConfigurationSchema(e){this.validateConfigurationSchema(e),this.addDispose(this.preferenceSchemaProvider.setSchema(e))}validateConfigurationSchema(e){for(const t in e.properties){const n=e.properties[t];if("string[]"===n.type&&(n.type="array"),"object"!==n.type)continue;void 0===n.default&&this.validateDefaultValue(n);const i=n.properties;if(i)for(const e in i)"object"!=typeof i[e]&&delete i[e]}}validateDefaultValue(e){e.default={};const t=e.properties;if(t)for(const n in t)t[n].default&&(e.default[n]=t[n].default,delete t[n].default)}};i.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),i.__metadata("design:type",o.PreferenceSchemaProvider)],s.prototype,"preferenceSchemaProvider",void 0),i.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),i.__metadata("design:type",Object)],s.prototype,"preferenceSettingsService",void 0),i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],s.prototype,"preferenceService",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("configuration")],s),t.ConfigurationContributionPoint=s},99294:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationDefaultsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){const e=this.json;e&&this.updateDefaultOverridesSchema(e)}updateDefaultOverridesSchema(e){for(const t in e){const n=e[t];if(o.OVERRIDE_PROPERTY_PATTERN.test(t)){const e=t.match(o.OVERRIDE_PROPERTY_PATTERN)[1];Object.keys(n).forEach((t=>{this.defaultPreferenceProvider.setPreference(t,n[t],void 0,e)}))}}}};i.__decorate([(0,r.Autowired)(o.PreferenceProvider,{tag:o.PreferenceScope.Default}),i.__metadata("design:type",o.PreferenceProvider)],s.prototype,"defaultPreferenceProvider",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("configurationDefaults")],s),t.ConfigurationDefaultsContributionPoint=s},67814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCustomEditorComponent=t.CustomEditorContributionPoint=void 0;const i=n(70655),r=n(616),o=n(39993),a=n(894),s=n(90642),c=n(70888),l=n(67851),d=n(42626),u=n(57280),p=n(80691),h=n(73939);let m=class extends u.VSCodeContributePoint{constructor(){super(...arguments),this.options=new Map}contribute(){(this.json||[]).forEach((e=>{this.registerSingleCustomEditor(e)})),this.addDispose(this.eventBus.on(p.CustomEditorOptionChangeEvent,(e=>{this.options.has(e.payload.viewType)&&this.options.set(e.payload.viewType,e.payload.options)})))}getOptions(e){return this.options.get(e)||{}}registerSingleCustomEditor(e){try{const t=e.viewType;this.options.set(e.viewType,{});const n=`${s.CUSTOM_EDITOR_SCHEME}-${e.viewType}`,i=g(e.viewType,n,(()=>this.getOptions(e.viewType)));this.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:n,component:i}));const r=e.selector.map((e=>e.filenamePattern)).filter((e=>"string"==typeof e));if(0===r.length)return;const o=e.priority||c.IEditorPriority.default;this.addDispose(this.editorComponentRegistry.registerEditorComponentResolver((()=>10),((i,a)=>{for(const l of r)((0,s.match)(l,i.uri.path.toString().toLowerCase())||(0,s.match)(l,i.uri.path.base.toLowerCase()))&&a.push({componentId:n,type:"component",title:e.displayName?this.getLocalizeFromNlsJSON(e.displayName):e.viewType,weight:o===c.IEditorPriority.default?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,priority:o,saveResource:e=>this.eventBus.fireAndAwait(new p.CustomEditorShouldSaveEvent({uri:e.uri,viewType:t,cancellationToken:(new s.CancellationTokenSource).token})),revertResource:e=>this.eventBus.fireAndAwait(new p.CustomEditorShouldRevertEvent({uri:e.uri,viewType:t,cancellationToken:(new s.CancellationTokenSource).token})),undo:e=>this.eventBus.fireAndAwait(new p.CustomEditorShouldEditEvent({uri:e.uri,viewType:t,type:"undo"})),redo:e=>this.eventBus.fireAndAwait(new p.CustomEditorShouldEditEvent({uri:e.uri,viewType:t,type:"redo"}))})})))}catch(e){this.logger.error(e)}}};function g(e,t,n){return({resource:i})=>{const o=(0,a.useInjectable)(h.IActivationEventService),c=(0,a.useInjectable)(l.IWebviewService),m=(0,a.useInjectable)(a.IEventBus),g=(0,a.useInjectable)(u.ExtensionService);let f=null;return r.useEffect((()=>{const r=new s.CancellationTokenSource,a=new s.Disposable;return Promise.all([o.fireEvent("onCustomEditor",e),g.eagerExtensionsActivated.promise]).then((()=>{if(r.token.isCancellationRequested)return;const o=c.createWebview(n().webviewOptions);if(o&&f){const n=new d.WebviewMounter(o,f,document.getElementById("workbench-editor"),document.getElementById("workbench-editor"));o.onRemove((()=>{n.dispose()})),a.addDispose({dispose:()=>{o.remove(),o.dispose(),m.fire(new p.CustomEditorShouldHideEvent({uri:i.uri,viewType:e}))}}),m.fire(new p.CustomEditorShouldDisplayEvent({uri:i.uri,viewType:e,webviewPanelId:o.id,cancellationToken:r.token,openTypeId:t}))}})),()=>{a.dispose(),r.cancel()}}),[]),r.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"editor-webview-webview-component",ref:e=>f=e})}}i.__decorate([(0,o.Autowired)(c.EditorComponentRegistry),i.__metadata("design:type",c.EditorComponentRegistry)],m.prototype,"editorComponentRegistry",void 0),i.__decorate([(0,o.Autowired)(s.ILogger),i.__metadata("design:type",Object)],m.prototype,"logger",void 0),i.__decorate([(0,o.Autowired)(a.IEventBus),i.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),m=i.__decorate([(0,o.Injectable)(),(0,u.Contributes)("customEditors")],m),t.CustomEditorContributionPoint=m,t.createCustomEditorComponent=g},36650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggersContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(35392),c=n(63249),l=n(57280),{deepClone:d}=a.objects,u={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:(0,a.localize)("preference.debug.internalConsoleOptions")};let p=class extends l.VSCodeContributePoint{contribute(){this.debugService.registerDebugContributionPoints(this.extension.path,this.resolveDebuggers(this.json)),this.debugSchemaUpdater.update()}resolveDebuggers(e){return e.map((e=>{const t=this.doResolveDebuggers(e);return this.debugConfigurationManager.registerDebugger(t),t}))}doResolveDebuggers(e){const t={type:e.type,label:e.label?(0,o.replaceLocalizePlaceholder)(e.label,this.extension.id):"",languages:e.languages,enableBreakpointsFor:e.enableBreakpointsFor,variables:e.variables,adapterExecutableCommand:e.adapterExecutableCommand,configurationSnippets:(e.configurationSnippets||[]).map((e=>(e.label&&(e.label=(0,o.replaceLocalizePlaceholder)(e.label,this.extension.id)),e.description&&(e.description=(0,o.replaceLocalizePlaceholder)(e.description,this.extension.id)),e))),win:e.win,winx86:e.winx86,windows:e.windows,osx:e.osx,linux:e.linux,program:e.program,args:e.args,runtime:e.runtime,runtimeArgs:e.runtimeArgs};return t.configurationAttributes=e.configurationAttributes&&this.resolveSchemaAttributes(e.type,e.configurationAttributes),t}resolveSchemaAttributes(e,t){const n={},i=e=>{Object.keys(e).forEach((t=>{e[t].properties&&i(e[t].properties),e[t].description=(0,o.replaceLocalizePlaceholder)(e[t].description,this.extension.id)}))};return Object.keys(t).map((r=>{const o=d(t[r]),s=["name","type","request"];o.required=o.required&&o.required.length?s.concat(o.required):s,o.additionalProperties=!1,o.type="object",o.properties||(o.properties={});const c=o.properties;c.type={enum:[e],description:(0,a.localize)("debug.launch.configurations.debugType"),pattern:"^(?!node2)",errorMessage:(0,a.localize)("debug.launch.configurations.debugTypeNotRecognised"),patternErrorMessage:(0,a.localize)("debug.launch.configurations.node2NotSupported")},c.name={type:"string",description:(0,a.localize)("debug.launch.configurations.debugName"),default:"Launch"},c.request={enum:[r],description:(0,a.localize)("debug.launch.configurations.debugRequest")},c.debugServer={type:"number",description:(0,a.localize)("debug.launch.configurations.debugServer"),default:4711},c.preLaunchTask={anyOf:[n,{type:["string","null"]}],default:"",description:(0,a.localize)("debug.launch.configurations.debugPrelaunchTask")},c.postDebugTask={anyOf:[n,{type:["string","null"]}],default:"",description:(0,a.localize)("debug.launch.configurations.debugPostDebugTask")},c.internalConsoleOptions=u;const l=Object.assign({},c);return c.windows={type:"object",description:(0,a.localize)("debug.launch.configurations.debugWindowsConfiguration"),properties:l},c.osx={type:"object",description:(0,a.localize)("debug.launch.configurations.debugOSXConfiguration"),properties:l},c.linux={type:"object",description:(0,a.localize)("debug.launch.configurations.debugLinuxConfiguration"),properties:l},Object.keys(o.properties).forEach((e=>{o.properties[e].pattern=o.properties[e].pattern||"^(?!.*\\$\\{(env|config|command)\\.)",o.properties[e].patternErrorMessage=o.properties[e].patternErrorMessage||(0,a.localize)("deprecatedVariables","'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead.")})),i(o.properties),o}))}dispose(){this.debugService.unregisterDebugContributionPoints(this.extension.path)}};p.schema={description:(0,a.localize)("vscode.extension.contributes.debuggers","Contributes debug adapters."),type:"array",defaultSnippets:[{body:[{type:""}]}],items:{additionalProperties:!1,type:"object",defaultSnippets:[{body:{type:"",program:"",runtime:""}}],properties:{type:{description:(0,a.localize)("vscode.extension.contributes.debuggers.type","Unique identifier for this debug adapter."),type:"string"},label:{description:(0,a.localize)("vscode.extension.contributes.debuggers.label","Display name for this debug adapter."),type:"string"},program:{description:(0,a.localize)("vscode.extension.contributes.debuggers.program","Path to the debug adapter program. Path is either absolute or relative to the extension folder."),type:"string"},args:{description:(0,a.localize)("vscode.extension.contributes.debuggers.args","Optional arguments to pass to the adapter."),type:"array"},runtime:{description:(0,a.localize)("vscode.extension.contributes.debuggers.runtime","Optional runtime in case the program attribute is not an executable but requires a runtime."),type:"string"},runtimeArgs:{description:(0,a.localize)("vscode.extension.contributes.debuggers.runtimeArgs","Optional runtime arguments."),type:"array"},variables:{description:(0,a.localize)("vscode.extension.contributes.debuggers.variables","Mapping from interactive variables (e.g. ${action.pickProcess}) in `launch.json` to a command."),type:"object"},initialConfigurations:{description:(0,a.localize)("vscode.extension.contributes.debuggers.initialConfigurations","Configurations for generating the initial 'launch.json'."),type:["array","string"]},languages:{description:(0,a.localize)("vscode.extension.contributes.debuggers.languages",'List of languages for which the debug extension could be considered the "default debugger".'),type:"array"},configurationSnippets:{description:(0,a.localize)("vscode.extension.contributes.debuggers.configurationSnippets","Snippets for adding new configurations in 'launch.json'."),type:"array"},configurationAttributes:{description:(0,a.localize)("vscode.extension.contributes.debuggers.configurationAttributes","JSON schema configurations for validating 'launch.json'."),type:"object"},when:{description:(0,a.localize)("vscode.extension.contributes.debuggers.when","Condition which must be true to enable this type of debugger. Consider using 'shellExecutionSupported', 'virtualWorkspace', 'resourceScheme' or an extension-defined context key as appropriate for this."),type:"string",default:""},windows:{description:(0,a.localize)("vscode.extension.contributes.debuggers.windows","Windows specific settings."),type:"object",properties:{runtime:{description:(0,a.localize)("vscode.extension.contributes.debuggers.windows.runtime","Runtime used for Windows."),type:"string"}}},osx:{description:(0,a.localize)("vscode.extension.contributes.debuggers.osx","macOS specific settings."),type:"object",properties:{runtime:{description:(0,a.localize)("vscode.extension.contributes.debuggers.osx.runtime","Runtime used for macOS."),type:"string"}}},linux:{description:(0,a.localize)("vscode.extension.contributes.debuggers.linux","Linux specific settings."),type:"object",properties:{runtime:{description:(0,a.localize)("vscode.extension.contributes.debuggers.linux.runtime","Runtime used for Linux."),type:"string"}}}}}},i.__decorate([(0,r.Autowired)(s.IDebugService),i.__metadata("design:type",Object)],p.prototype,"debugService",void 0),i.__decorate([(0,r.Autowired)(c.DebugConfigurationManager),i.__metadata("design:type",c.DebugConfigurationManager)],p.prototype,"debugConfigurationManager",void 0),i.__decorate([(0,r.Autowired)(c.DebugSchemaUpdater),i.__metadata("design:type",c.DebugSchemaUpdater)],p.prototype,"debugSchemaUpdater",void 0),p=i.__decorate([(0,r.Injectable)(),(0,l.Contributes)("debuggers")],p),t.DebuggersContributionPoint=p},59380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrammarsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(69387),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){for(const e of this.json)this.textMateService.registerGrammar(e,o.URI.from(this.extension.uri)),this.addDispose(o.Disposable.create((()=>{this.textMateService.unregisterGrammar(e)})))}};c.schema={description:(0,o.localize)("vscode.extension.contributes.grammars","Contributes textmate tokenizers."),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:(0,o.localize)("vscode.extension.contributes.grammars.language","Language identifier for which this syntax is contributed to."),type:"string"},scopeName:{description:(0,o.localize)("vscode.extension.contributes.grammars.scopeName","Textmate scope name used by the tmLanguage file."),type:"string"},path:{description:(0,o.localize)("vscode.extension.contributes.grammars.path","Path of the tmLanguage file. The path is relative to the extension folder and typically starts with './syntaxes/'."),type:"string"},embeddedLanguages:{description:(0,o.localize)("vscode.extension.contributes.grammars.embeddedLanguages","A map of scope name to language id if this grammar contains embedded languages."),type:"object"},tokenTypes:{description:(0,o.localize)("vscode.extension.contributes.grammars.tokenTypes","A map of scope name to token types."),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:(0,o.localize)("vscode.extension.contributes.grammars.injectTo","List of language scope names to which this grammar is injected to."),type:"array",items:{type:"string"}}},required:["scopeName","path"]}},i.__decorate([(0,r.Autowired)(a.ITextmateTokenizer),i.__metadata("design:type",Object)],c.prototype,"textMateService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("grammars")],c),t.GrammarsContributionPoint=c},91986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconThemesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(52292),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){const e=this.json.map((e=>Object.assign(Object.assign({},e),{label:this.getLocalizeFromNlsJSON(e.label)})));this.iconService.registerIconThemes(e,o.URI.from(this.extension.uri))}};i.__decorate([(0,r.Autowired)(a.IIconService),i.__metadata("design:type",Object)],c.prototype,"iconService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("iconThemes")],c),t.IconThemesContributionPoint=c},95308:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeContributeRunner=void 0;const r=n(70655),o=n(39993),a=n(894),s=n(57280),c=n(73939),l=n(25612),d=n(32855),u=n(23907),p=n(71963),h=n(35449),m=n(99294),g=n(67814),f=n(36650),_=n(59380),b=n(91986),y=n(67966),v=n(30505),C=n(82988),S=n(22456),w=n(10989),E=n(93602),k=n(39100),x=n(24199),T=n(90237),D=n(15355),A=n(3306),I=n(6632),M=n(92852),R=n(17865),P=n(96376),O=n(40478),N=Symbol();let L=i=class extends a.WithEventBus{constructor(e){super(),this.extension=e}async run(){const e=this.extension.packageJSON.contributes;if(!e)return;const t=await this.eventBus.fireAndAwait(new c.ExtensionWillContributeEvent(this.extension));if(!(t.length>0&&t[0].result)){for(const t of i.ContributePoints){const n=Reflect.getMetadata(s.CONTRIBUTE_NAME_KEY,t);if(void 0!==e[n])try{const i=this.injector.get(t,[e[n],e,this.extension,this.extension.packageNlsJSON,this.extension.defaultPkgNlsJSON]);t.schema&&(a.VSCodeExtensionPackageSchema.properties.contributes.properties[n]=t.schema),this.addDispose(i),await i.contribute()}catch(e){this.logger.error(e)}}this.schemaRegistry.registerSchema(a.EXTENSION_JSON_URI,a.VSCodeExtensionPackageSchema,["package.json"])}}};L.ContributePoints=[C.LocalizationsContributionPoint,p.CommandsContributionPoint,M.ThemesContributionPoint,b.IconThemesContributionPoint,_.GrammarsContributionPoint,v.LanguagesContributionPoint,h.ConfigurationContributionPoint,m.ConfigurationDefaultsContributionPoint,u.ColorsContributionPoint,y.KeybindingContributionPoint,S.SubmenusContributionPoint,S.MenusContributionPoint,D.SnippetsContributionPoint,R.ViewContainersContributionPoint,P.ViewsContributionPoint,O.ViewsWelcomeContributionPoint,d.BreakpointsContributionPoint,f.DebuggersContributionPoint,l.ActionsContributionPoint,A.TaskDefinitionContributionPoint,E.ProblemPatternsContributionPoint,w.ProblemMatchersContributionPoint,g.CustomEditorContributionPoint,T.SemanticTokenTypesContributionPoint,k.SemanticTokenModifiersContributionPoint,x.SemanticTokenScopesContributionPoint,I.TerminalContributionPoint],r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],L.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(a.IJSONSchemaRegistry),r.__metadata("design:type",Object)],L.prototype,"schemaRegistry",void 0),r.__decorate([(0,o.Autowired)(a.IEventBus),r.__metadata("design:type",Object)],L.prototype,"eventBus",void 0),r.__decorate([(0,o.Autowired)(a.ILogger),r.__metadata("design:type",Object)],L.prototype,"logger",void 0),L=i=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)(N)),r.__metadata("design:paramtypes",[Object])],L),t.VSCodeContributeRunner=L},67966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeybindingContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){const e=this.json.map((e=>this.toKeybinding(e,this.extension.isBuiltin)));this.addDispose(this.keybindingRegistry.registerKeybindings(e))}toKeybinding(e,t){const n=this.toOSKeybinding(e),{command:i,when:r}=e;return{keybinding:n,command:i,when:r,priority:t?100*o.KeybindingWeight.BuiltinExtension:100*o.KeybindingWeight.ExternalExtension}}toOSKeybinding(e){let t;const n=o.OS.type();return n===o.OperatingSystem.Windows&&e.win?t=e.win:n===o.OperatingSystem.Macintosh&&e.mac?t=e.mac:e.linux&&(t=e.linux),t||e.key}};i.__decorate([(0,r.Autowired)(o.KeybindingRegistry),i.__metadata("design:type",Object)],s.prototype,"keybindingRegistry",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("keybindings")],s),t.KeybindingContributionPoint=s},30505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(69387),s=n(57280);let c=class extends s.VSCodeContributePoint{async contribute(){await this.textMateService.registerLanguages(this.json,o.URI.from(this.extension.uri))}};c.schema={allowComments:!0,allowTrailingCommas:!0,default:{comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[["(",")"],["[","]"],["{","}"]]},definitions:{openBracket:{type:"string",description:(0,o.localize)("schema.openBracket","The opening bracket character or string sequence.")},closeBracket:{type:"string",description:(0,o.localize)("schema.closeBracket","The closing bracket character or string sequence.")},bracketPair:{type:"array",items:[{},{}]}},properties:{comments:{default:{blockComment:["/*","*/"],lineComment:"//"},description:(0,o.localize)("schema.comments","Defines the comment symbols"),type:"object",properties:{blockComment:{type:"array",description:(0,o.localize)("schema.blockComments","Defines how block comments are marked."),items:[{type:"string",description:(0,o.localize)("schema.blockComment.begin","The character sequence that starts a block comment.")},{type:"string",description:(0,o.localize)("schema.blockComment.end","The character sequence that ends a block comment.")}]},lineComment:{type:"string",description:(0,o.localize)("schema.lineComment","The character sequence that starts a line comment.")}}},brackets:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),type:"array",items:{}},autoClosingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.autoClosingPairs","Defines the bracket pairs. When a opening bracket is entered, the closing bracket is inserted automatically."),type:"array",items:{oneOf:[{},{type:"object",properties:{open:{},close:{},notIn:{type:"array",description:(0,o.localize)("schema.autoClosingPairs.notIn","Defines a list of scopes where the auto pairs are disabled."),items:{enum:["string","comment"]}}}}]}},autoCloseBefore:{default:";:.,=}])> \n\t",description:(0,o.localize)("schema.autoCloseBefore","Defines what characters must be after the cursor in order for bracket or quote autoclosing to occur when using the 'languageDefined' autoclosing setting. This is typically the set of characters which can not start an expression."),type:"string"},surroundingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.surroundingPairs","Defines the bracket pairs that can be used to surround a selected string."),type:"array",items:{oneOf:[{},{type:"object",properties:{open:{},close:{}}}]}},wordPattern:{default:"",description:(0,o.localize)("schema.wordPattern","Defines what is considered to be a word in the programming language."),type:["string","object"],properties:{pattern:{type:"string",description:(0,o.localize)("schema.wordPattern.pattern","The RegExp pattern used to match words."),default:""},flags:{type:"string",description:(0,o.localize)("schema.wordPattern.flags","The RegExp flags used to match words."),default:"g",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.wordPattern.flags.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},indentationRules:{default:{increaseIndentPattern:"",decreaseIndentPattern:""},description:(0,o.localize)("schema.indentationRules","The language's indentation settings."),type:"object",properties:{increaseIndentPattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.increaseIndentPattern","If a line matches this pattern, then all the lines after it should be indented once (until another rule matches)."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.increaseIndentPattern.pattern","The RegExp pattern for increaseIndentPattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.increaseIndentPattern.flags","The RegExp flags for increaseIndentPattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.increaseIndentPattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},decreaseIndentPattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern","If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches)."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.pattern","The RegExp pattern for decreaseIndentPattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.flags","The RegExp flags for decreaseIndentPattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},indentNextLinePattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.indentNextLinePattern","If a line matches this pattern, then **only the next line** after it should be indented once."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.indentNextLinePattern.pattern","The RegExp pattern for indentNextLinePattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.indentNextLinePattern.flags","The RegExp flags for indentNextLinePattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.indentNextLinePattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},unIndentedLinePattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern","If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.pattern","The RegExp pattern for unIndentedLinePattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.flags","The RegExp flags for unIndentedLinePattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}}}},folding:{type:"object",description:(0,o.localize)("schema.folding","The language's folding settings."),properties:{offSide:{type:"boolean",description:(0,o.localize)("schema.folding.offSide","A language adheres to the off-side rule if blocks in that language are expressed by their indentation. If set, empty lines belong to the subsequent block.")},markers:{type:"object",description:(0,o.localize)("schema.folding.markers","Language specific folding markers such as '#region' and '#endregion'. The start and end regexes will be tested against the contents of all lines and must be designed efficiently"),properties:{start:{type:"string",description:(0,o.localize)("schema.folding.markers.start","The RegExp pattern for the start marker. The regexp must start with '^'.")},end:{type:"string",description:(0,o.localize)("schema.folding.markers.end","The RegExp pattern for the end marker. The regexp must start with '^'.")}}}}}}},i.__decorate([(0,r.Autowired)(a.ITextmateTokenizer),i.__metadata("design:type",Object)],c.prototype,"textMateService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("languages")],c),t.LanguagesContributionPoint=c},82988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizationsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(38097),s=n(17735),c=n(57280),l=n(73939),{Path:d}=o.path;let u=class extends c.VSCodeContributePoint{safeParseJSON(e){let t;try{return t=(0,o.parseWithComments)(e),t}catch(t){return this.logger.error("璇█閰嶇疆鏂囦欢瑙f瀽鍑洪敊锛�",e)}}async contribute(){const e=this.extensionInstanceManageService.getExtensionInstances(),t=[];this.json.forEach((n=>{if(n.translations){const i=function(e){const t=e.split("-");t[1]&&(t[1]=t[1].toUpperCase());return t.join("-")}(n.languageId);if(i!==(0,o.getLanguageId)())return;n.translations.map((r=>{-1!==e.findIndex((e=>e.id===r.id))&&t.push((async()=>{const e=await this.registerLanguage(r);(0,o.registerLocalizationBundle)({languageId:i,languageName:n.languageName,localizedLanguageName:n.localizedLanguageName,contents:e},r.id)})())}))}}));const n=this.preferenceService.get("general.language")||(0,o.getLanguageId)(),i=await this.extensionStoragePathServer.getLastStoragePath()||"";t.push(this.extensionNodeService.updateLanguagePack(n,this.extension.path,i)),await Promise.all(t)}async registerLanguage(e){const t=new d(this.extension.path).join(e.path.replace(/^\.\//,"")).toString(),{content:n}=await this.fileServiceClient.resolveContent(o.URI.file(t).toString()),i=this.safeParseJSON(n),r={};if(i.contents)for(const e of Object.keys(i.contents))if(i.contents[e])for(const t of Object.keys(i.contents[e]))r[t]=i.contents[e][t];return r}};i.__decorate([(0,r.Autowired)(o.PreferenceService),i.__metadata("design:type",Object)],u.prototype,"preferenceService",void 0),i.__decorate([(0,r.Autowired)(a.IExtensionStoragePathServer),i.__metadata("design:type",Object)],u.prototype,"extensionStoragePathServer",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],u.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(s.IFileServiceClient),i.__metadata("design:type",Object)],u.prototype,"fileServiceClient",void 0),i.__decorate([(0,r.Autowired)(c.ExtensionNodeServiceServerPath),i.__metadata("design:type",Object)],u.prototype,"extensionNodeService",void 0),i.__decorate([(0,r.Autowired)(l.AbstractExtInstanceManagementService),i.__metadata("design:type",l.AbstractExtInstanceManagementService)],u.prototype,"extensionInstanceManageService",void 0),u=i.__decorate([(0,r.Injectable)(),(0,c.Contributes)("localizations")],u),t.LocalizationsContributionPoint=u},22456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenusContributionPoint=t.SubmenusContributionPoint=t.isValidMenuItem=t.parseMenuGroup=t.parseMenuId=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(75059),s=n(26149),c=n(57061),l=n(70888),d=n(52292),u=n(68998),p=n(57280);function h(e){return"string"==typeof e.command}function m(e){switch(e){case"touchBar":return c.MenuId.TouchBarContext;case"debug/toolBar":return c.MenuId.DebugToolBar;case"statusBar/windowIndicator":return c.MenuId.StatusBarWindowIndicatorMenu;case"menuBar/file":return c.MenuId.MenubarFileMenu;default:return e}}function g(e){let t,n;if(e){const i=e.lastIndexOf("@");i>0?(t=e.substr(0,i),n=Number(e.substr(i+1))||void 0):t=e}return[t,n]}function f(e,t){return"string"!=typeof e.command?(t.error((0,o.formatLocalize)("requirestring","command")),!1):e.alt&&"string"!=typeof e.alt?(t.error((0,o.formatLocalize)("optstring","alt")),!1):e.when&&"string"!=typeof e.when?(t.error((0,o.formatLocalize)("optstring","when")),!1):!e.group||"string"==typeof e.group||(t.error((0,o.formatLocalize)("optstring","group")),!1)}function _(e,t){return"string"!=typeof e.submenu?(t.error((0,o.formatLocalize)("requirestring","property `{0}` is mandatory and must be of type `string`","submenu")),!1):e.when&&"string"!=typeof e.when?(t.error((0,o.formatLocalize)("optstring","property `{0}` can be omitted or must be of type `string`","when")),!1):!e.group||"string"==typeof e.group||(t.error((0,o.formatLocalize)("optstring","property `{0}` can be omitted or must be of type `string`","group")),!1)}function b(e,t){if(!Array.isArray(e))return t.error((0,o.formatLocalize)("requirearray","submenu items must be an array")),!1;for(const n of e)if(h(n)){if(!f(n,t))return!1}else if(!_(n,t))return!1;return!0}t.parseMenuId=m,t.parseMenuGroup=g,t.isValidMenuItem=f;const y=new Map;let v=class extends p.VSCodeContributePoint{contribute(){y.set(this.extension.id,this.json)}};v.schema={},v=i.__decorate([(0,r.Injectable)(),(0,p.Contributes)("submenus")],v),t.SubmenusContributionPoint=v;let C=class extends p.VSCodeContributePoint{createSyntheticCommandId(e,t){const n=e.command;let i=t+n,r=0;for(;this.commandRegistry.getCommand(i);)i=t+n+":"+r,r++;return i}contribute(){const e=console;for(const t of Object.keys(this.json)){const n=this.json[t];if(!b(n,console))return;const i=m(t);if((0,o.isUndefined)(i))return void e.warn((0,o.formatLocalize)("menuId.invalid","`{0}` is not a valid menu identifier",t));for(const t of n)if(h(t)){const n=this.commandRegistry.getRawCommand(t.command),r=t.alt&&this.commandRegistry.getRawCommand(t.alt);if(!n){e.error((0,o.formatLocalize)("menu.missing.command",i,t.command));continue}t.alt&&!r&&e.warn((0,o.formatLocalize)("menu.missing.altCommand",i,t.alt)),t.command===t.alt&&e.info((0,o.formatLocalize)("menu.dupe.command",i,t.command,t.alt));const[a,s]=g(t.group);let l;i===c.MenuId.EditorTitleContext?l=({uri:e,group:t})=>[e.codeUri]:i===c.MenuId.EditorTitle&&(l=(e,t,n)=>[(null==n?void 0:n.codeUri)||e.codeUri]),this.addDispose(this.menuRegistry.registerMenuItem(i,{command:t.command,alt:r,group:a,order:s,when:t.when,argsTransformer:l,type:t.type,toggledWhen:t.toggledWhen,enabledWhen:t.enabledWhen}))}else{const n=y.get(this.extension.id);if(!n){e.error((0,o.localize)("missing.submenu.section","Need a submenu contributes firstly",t.submenu));continue}const r=n.find((e=>e.id===t.submenu));if(!r){e.error((0,o.localize)("missing.submenu","Menu item references a submenu `{0}` which is not defined in the 'submenus' section.",t.submenu));continue}const[a,s]=g(t.group);this.addDispose(this.menuRegistry.registerMenuItem(i,{submenu:t.submenu,label:this.getLocalizeFromNlsJSON(r.label),when:t.when,group:a,order:s,iconClass:r.icon&&this.toIconClass(r.icon,d.IconType.Background)}))}}}};C.schema=a.menus.schema,i.__decorate([(0,r.Autowired)(o.CommandRegistry),i.__metadata("design:type",Object)],C.prototype,"commandRegistry",void 0),i.__decorate([(0,r.Autowired)(o.CommandService),i.__metadata("design:type",Object)],C.prototype,"commandService",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],C.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(c.IMenuRegistry),i.__metadata("design:type",c.IMenuRegistry)],C.prototype,"menuRegistry",void 0),i.__decorate([(0,r.Autowired)(),i.__metadata("design:type",s.ToolbarRegistry)],C.prototype,"toolBarRegistry",void 0),i.__decorate([(0,r.Autowired)(l.IEditorActionRegistry),i.__metadata("design:type",Object)],C.prototype,"editorActionRegistry",void 0),i.__decorate([(0,r.Autowired)(o.IContextKeyService),i.__metadata("design:type",Object)],C.prototype,"contextKeyService",void 0),i.__decorate([(0,r.Autowired)(u.IIconService),i.__metadata("design:type",Object)],C.prototype,"iconService",void 0),C=i.__decorate([(0,r.Injectable)(),(0,p.Contributes)("menus")],C),t.MenusContributionPoint=C},10989:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemMatchersContributionPoint=t.problemMatchersSchema=t.Schemas=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280),s=n(91021),c=n(93602),{deepClone:l}=o.objects;var d;!function(e){e.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,o.localize)("WatchingPatternSchema.regexp","The regular expression to detect the begin or end of a background task.")},file:{type:"integer",description:(0,o.localize)("WatchingPatternSchema.file","The match group index of the filename. Can be omitted.")}}},e.PatternType={anyOf:[{type:"string",description:(0,o.localize)("PatternTypeSchema.name","The name of a contributed or predefined pattern")},c.PatternSchemas.ProblemPattern,c.PatternSchemas.MultiLineProblemPattern],description:(0,o.localize)("PatternTypeSchema.description","A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.")},e.ProblemMatcher={type:"object",additionalProperties:!1,properties:{base:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.base","The name of a base problem matcher to use.")},owner:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.owner","The owner of the problem inside Code. Can be omitted if base is specified. Defaults to 'external' if omitted and base is not specified.")},source:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.source","A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.")},severity:{type:"string",enum:["error","warning","info"],description:(0,o.localize)("ProblemMatcherSchema.severity","The default severity for captures problems. Is used if the pattern doesn't define a match group for severity.")},applyTo:{type:"string",enum:["allDocuments","openDocuments","closedDocuments"],description:(0,o.localize)("ProblemMatcherSchema.applyTo","Controls if a problem reported on a text document is applied only to open, closed or all documents.")},pattern:e.PatternType,fileLocation:{oneOf:[{type:"string",enum:["absolute","relative","autoDetect"]},{type:"array",items:{type:"string"}}],description:(0,o.localize)("ProblemMatcherSchema.fileLocation","Defines how file names reported in a problem pattern should be interpreted.")},background:{type:"object",additionalProperties:!1,description:(0,o.localize)("ProblemMatcherSchema.background","Patterns to track the begin and end of a matcher active on a background task."),properties:{activeOnStart:{type:"boolean",description:(0,o.localize)("ProblemMatcherSchema.background.activeOnStart","If set to true the background monitor is in active mode when the task starts. This is equals of issuing a line that matches the beginsPattern")},beginsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.background.beginsPattern","If matched in the output the start of a background task is signaled.")},endsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.background.endsPattern","If matched in the output the end of a background task is signaled.")}}},watching:{type:"object",additionalProperties:!1,deprecationMessage:(0,o.localize)("ProblemMatcherSchema.watching.deprecated","The watching property is deprecated. Use background instead."),description:(0,o.localize)("ProblemMatcherSchema.watching","Patterns to track the begin and end of a watching matcher."),properties:{activeOnStart:{type:"boolean",description:(0,o.localize)("ProblemMatcherSchema.watching.activeOnStart","If set to true the watcher is in active mode when the task starts. This is equals of issuing a line that matches the beginPattern")},beginsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.watching.beginsPattern","If matched in the output the start of a watching task is signaled.")},endsPattern:{oneOf:[{type:"string"},e.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.watching.endsPattern","If matched in the output the end of a watching task is signaled.")}}}}},e.LegacyProblemMatcher=l(e.ProblemMatcher),e.LegacyProblemMatcher.properties=l(e.LegacyProblemMatcher.properties)||{},e.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",deprecationMessage:(0,o.localize)("LegacyProblemMatcherSchema.watchedBegin.deprecated","This property is deprecated. Use the watching property instead."),description:(0,o.localize)("LegacyProblemMatcherSchema.watchedBegin","A regular expression signaling that a watched tasks begins executing triggered through file watching.")},e.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:(0,o.localize)("LegacyProblemMatcherSchema.watchedEnd.deprecated","This property is deprecated. Use the watching property instead."),description:(0,o.localize)("LegacyProblemMatcherSchema.watchedEnd","A regular expression signaling that a watched tasks ends executing.")},e.NamedProblemMatcher=l(e.ProblemMatcher),e.NamedProblemMatcher.properties=l(e.NamedProblemMatcher.properties)||{},e.NamedProblemMatcher.properties.name={type:"string",description:(0,o.localize)("NamedProblemMatcherSchema.name","The name of the problem matcher used to refer to it.")},e.NamedProblemMatcher.properties.label={type:"string",description:(0,o.localize)("NamedProblemMatcherSchema.label","A human readable label of the problem matcher.")}}(d=t.Schemas||(t.Schemas={})),t.problemMatchersSchema={description:(0,o.localize)("ProblemMatcherExtPoint","Contributes problem matchers"),type:"array",items:d.NamedProblemMatcher};let u=class extends a.VSCodeContributePoint{contribute(){for(const e of this.json)this.addDispose(this.problemMatcher.register(e))}};i.__decorate([(0,r.Autowired)(o.IProblemMatcherRegistry),i.__metadata("design:type",Object)],u.prototype,"problemMatcher",void 0),u=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("problemMatchers")],u),t.ProblemMatchersContributionPoint=u},93602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemPatternsContributionPoint=t.problemPatternsSchema=t.PatternSchemas=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(57280),{deepClone:s}=o.objects;var c;!function(e){e.ProblemPattern={default:{regexp:"^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",file:1,location:2,message:3},type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,o.localize)("ProblemPatternSchema.regexp","The regular expression to find an error, warning or info in the output.")},kind:{type:"string",description:(0,o.localize)("ProblemPatternSchema.kind","whether the pattern matches a location (file and line) or only a file.")},file:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.file","The match group index of the filename. If omitted 1 is used.")},location:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.location","The match group index of the problem's location. Valid location patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). If omitted (line,column) is assumed.")},line:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.line","The match group index of the problem's line. Defaults to 2")},column:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.column","The match group index of the problem's line character. Defaults to 3")},endLine:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.endLine","The match group index of the problem's end line. Defaults to undefined")},endColumn:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.endColumn","The match group index of the problem's end line character. Defaults to undefined")},severity:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.severity","The match group index of the problem's severity. Defaults to undefined")},code:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.code","The match group index of the problem's code. Defaults to undefined")},message:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.message","The match group index of the message. If omitted it defaults to 4 if location is specified. Otherwise it defaults to 5.")},loop:{type:"boolean",description:(0,o.localize)("ProblemPatternSchema.loop","In a multi line matcher loop indicated whether this pattern is executed in a loop as long as it matches. Can only specified on a last pattern in a multi line pattern.")}}},e.NamedProblemPattern=s(e.ProblemPattern),e.NamedProblemPattern.properties=s(e.NamedProblemPattern.properties)||{},e.NamedProblemPattern.properties.name={type:"string",description:(0,o.localize)("NamedProblemPatternSchema.name","The name of the problem pattern.")},e.MultiLineProblemPattern={type:"array",items:e.ProblemPattern},e.NamedMultiLineProblemPattern={type:"object",additionalProperties:!1,properties:{name:{type:"string",description:(0,o.localize)("NamedMultiLineProblemPatternSchema.name","The name of the problem multi line problem pattern.")},patterns:{type:"array",description:(0,o.localize)("NamedMultiLineProblemPatternSchema.patterns","The actual patterns."),items:e.ProblemPattern}}}}(c=t.PatternSchemas||(t.PatternSchemas={})),t.problemPatternsSchema={description:(0,o.localize)("ProblemPatternExtPoint","Contributes problem patterns"),type:"array",items:{anyOf:[c.NamedProblemPattern,c.NamedMultiLineProblemPattern]}};let l=class extends a.VSCodeContributePoint{contribute(){for(const e of this.json)this.addDispose(this.problemPattern.register(e))}};i.__decorate([(0,r.Autowired)(o.IProblemPatternRegistry),i.__metadata("design:type",Object)],l.prototype,"problemPattern",void 0),l=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("problemPatterns")],l),t.ProblemPatternsContributionPoint=l},39100:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenModifiersContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(9102),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){if(Array.isArray(this.json))for(const e of this.json)(0,s.validateTypeOrModifier)(e,"semanticTokenModifier",this.logger)&&this.semanticTokenRegistry.registerTokenModifier(e.id,e.description);else this.logger.warn("'configuration.semanticTokenTypes' must be an array")}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.ISemanticTokenRegistry),i.__metadata("design:type",Object)],c.prototype,"semanticTokenRegistry",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("semanticTokenModifiers")],c),t.SemanticTokenModifiersContributionPoint=c},24199:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenScopesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(83972),a=n(9102),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){if(Array.isArray(this.json))for(const e of this.json)if(e.scopes&&"object"==typeof e.scopes)if(e.language&&"string"!=typeof e.language)this.logger.warn("'configuration.semanticTokenScopes.language' must be as a string");else for(const t in e.scopes){const n=e.scopes[t];if(Array.isArray(n)&&!n.some((e=>"string"!=typeof e)))try{const i=this.semanticTokenRegistry.parseTokenSelector(t,e.language);this.semanticTokenRegistry.registerTokenStyleDefault(i,{scopesToProbe:n.map((e=>e.split(" ")))})}catch(e){this.logger.error(`configuration.semanticTokenScopes.scopes': Problems parsing selector ${t}.`)}else this.logger.error("'configuration.semanticTokenScopes.scopes' values must be an array of strings")}else this.logger.warn("'configuration.semanticTokenScopes.scopes' must be defined as an object");else this.logger.warn("'configuration.semanticTokenScopes' must be an array")}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.ISemanticTokenRegistry),i.__metadata("design:type",Object)],c.prototype,"semanticTokenRegistry",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("semanticTokenScopes")],c),t.SemanticTokenScopesContributionPoint=c},90237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenTypesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(45060),a=n(9102),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){if(Array.isArray(this.json))for(const e of this.json)(0,s.validateTypeOrModifier)(e,"semanticTokenType",this.logger)&&this.semanticTokenRegistry.registerTokenType(e.id,e.description,e.superType);else this.logger.warn("'configuration.semanticTokenTypes' must be an array")}};i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),i.__decorate([(0,r.Autowired)(a.ISemanticTokenRegistry),i.__metadata("design:type",Object)],c.prototype,"semanticTokenRegistry",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("semanticTokenTypes")],c),t.SemanticTokenTypesContributionPoint=c},15355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(8385),a=n(57280);let s=class extends a.VSCodeContributePoint{contribute(){for(const e of this.json)this.addDispose(this.snippetSuggestProvider.fromPath(e.path,{extPath:this.extension.path,language:e.language,source:this.extension.packageJSON.name}))}};i.__decorate([(0,r.Autowired)(o.MonacoSnippetSuggestProvider),i.__metadata("design:type",o.MonacoSnippetSuggestProvider)],s.prototype,"snippetSuggestProvider",void 0),s=i.__decorate([(0,r.Injectable)(),(0,a.Contributes)("snippets")],s),t.SnippetsContributionPoint=s},3306:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDefinitionContributionPoint=t.taskDefinitionSchema=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(90642),s=n(57280);t.taskDefinitionSchema={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:(0,o.localize)("TaskDefinition.description","The actual task type. Please note that types starting with a '$' are reserved for internal usage.")},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:(0,o.localize)("TaskDefinition.properties","Additional properties of the task type"),additionalProperties:{$ref:"http://json-schema.org/draft-04/schema#"}}}};let c=class extends s.VSCodeContributePoint{contribute(){for(const e of this.json)this.logger.verbose(`${this.extension.id} register taskDefinition ${JSON.stringify(e)}`),this.addDispose(this.taskDefinitionRegistry.register(e.type,Object.assign(Object.assign({},e),{taskType:e.type,extensionId:this.extension.id})))}};i.__decorate([(0,r.Autowired)(a.ITaskDefinitionRegistry),i.__metadata("design:type",Object)],c.prototype,"taskDefinitionRegistry",void 0),i.__decorate([(0,r.Autowired)(o.ILogger),i.__metadata("design:type",Object)],c.prototype,"logger",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("taskDefinitions")],c),t.TaskDefinitionContributionPoint=c},6632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(16037),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){this.profileService.addContributedProfile(this.extension.id,this.json)}dispose(){this.profileService.removeContributedProfile(this.extension.id)}};c.schema={description:(0,o.localize)("vscode.extension.contributes.terminal","Contributes terminal functionality."),type:"object",properties:{types:{type:"array",description:(0,o.localize)("vscode.extension.contributes.terminal.types","Defines additional terminal types that the user can create."),items:{type:"object",required:["command","title"],properties:{command:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.command","Command to execute when the user creates this type of terminal."),type:"string"},title:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.title","Title for this type of terminal."),type:"string"},icon:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon","A codicon, URI, or light and dark URIs to associate with this terminal type."),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.light","Icon path when a light theme is used"),type:"string"},dark:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.dark","Icon path when a dark theme is used"),type:"string"}}}]}}}},profiles:{type:"array",description:(0,o.localize)("vscode.extension.contributes.terminal.profiles","Defines additional terminal profiles that the user can create."),items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"$1",title:"$2"}}],properties:{id:{description:(0,o.localize)("vscode.extension.contributes.terminal.profiles.id","The ID of the terminal profile provider."),type:"string"},title:{description:(0,o.localize)("vscode.extension.contributes.terminal.profiles.title","Title for this terminal profile."),type:"string"},icon:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon","A codicon, URI, or light and dark URIs to associate with this terminal type."),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.light","Icon path when a light theme is used"),type:"string"},dark:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.dark","Icon path when a dark theme is used"),type:"string"}}}]}}}}}},i.__decorate([(0,r.Autowired)(a.ITerminalProfileService),i.__metadata("design:type",Object)],c.prototype,"profileService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("terminal")],c),t.TerminalContributionPoint=c},92852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemesContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(52292),s=n(57280);let c=class extends s.VSCodeContributePoint{contribute(){const e=this.json.map((e=>Object.assign(Object.assign({},e),{label:this.getLocalizeFromNlsJSON(e.label)})));this.addDispose(this.themeService.registerThemes(e,o.URI.from(this.extension.uri)))}};i.__decorate([(0,r.Autowired)(a.IThemeService),i.__metadata("design:type",Object)],c.prototype,"themeService",void 0),c=i.__decorate([(0,r.Injectable)(),(0,s.Contributes)("themes")],c),t.ThemesContributionPoint=c},17865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewContainersContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(90642),a=n(92674),s=n(52292),c=n(57280);let l=class extends c.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new o.DisposableCollection}contribute(){for(const e of Object.keys(this.json))if("activitybar"===e)for(const t of this.json[e]){const e=this.mainlayoutService.collectTabbarComponent([],{iconClass:this.toIconClass(t.icon),title:this.getLocalizeFromNlsJSON(t.title),containerId:t.id,priority:0,fromExtension:!0,hideIfEmpty:!0},"left");this.disposableCollection.push({dispose:()=>{const t=this.mainlayoutService.getTabbarHandler(e);null==t||t.dispose()}})}}dispose(){this.disposableCollection.dispose()}getViewsMap(e){const t=e.views,n={};if(t)for(const e of Object.keys(t))t[e]&&Array.isArray(t[e])&&(n[e]=t[e].map((e=>e.id)));return n}};i.__decorate([(0,r.Autowired)(a.IMainLayoutService),i.__metadata("design:type",Object)],l.prototype,"mainlayoutService",void 0),i.__decorate([(0,r.Autowired)(s.IIconService),i.__metadata("design:type",Object)],l.prototype,"iconService",void 0),l=i.__decorate([(0,r.Injectable)(),(0,c.Contributes)("viewsContainers")],l),t.ViewContainersContributionPoint=l},40478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsWelcomeContributionPoint=t.ViewIdentifierMap=t.ViewsWelcomeExtensionPointFields=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(35392),s=n(7847),c=n(92674),l=n(77025),d=n(57280);var u;!function(e){e.view="view",e.contents="contents",e.when="when",e.group="group",e.enablement="enablement"}(u=t.ViewsWelcomeExtensionPointFields||(t.ViewsWelcomeExtensionPointFields={})),t.ViewIdentifierMap={explorer:s.FILE_EXPLORER_WELCOME_ID,debug:a.DEBUG_WELCOME_ID,scm:"scm_view"};let p=class extends d.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new o.DisposableCollection}contribute(){var e;const n=new Map;for(const i of this.json){const{group:r,order:o}=h(i),a=l.ContextKeyExpr.deserialize(i.enablement),s=null!==(e=t.ViewIdentifierMap[i.view])&&void 0!==e?e:i.view;let c=n.get(s);c||(c=new Map,n.set(s,c)),c.set(i,{content:this.getLocalizeFromNlsJSON(i.contents),when:l.ContextKeyExpr.deserialize(i.when),precondition:a,group:r,order:o})}for(const[e,t]of n){const n=this.viewsRegistry.registerViewWelcomeContent2(e,t);for(const[,e]of n)this.disposableCollection.push(e)}}dispose(){this.disposableCollection.dispose()}};function h(e){let t,n;if(e.group){const i=e.group.lastIndexOf("@");i>0?(t=e.group.substr(0,i),n=Number(e.group.substr(i+1))||void 0):t=e.group}return{group:t,order:n}}p.schema={type:"array",description:(0,o.localize)("contributes.viewsWelcome","Contributed views welcome content. Welcome content will be rendered in tree based views whenever they have no meaningful content to display, ie. the File Explorer when no folder is open. Such content is useful as in-product documentation to drive users to use certain features before they are available. A good example would be a `Clone Repository` button in the File Explorer welcome view."),items:{type:"object",description:(0,o.localize)("contributes.viewsWelcome.view","Contributed welcome content for a specific view."),required:[u.view,u.contents],properties:{[u.view]:{anyOf:[{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.view","Target view identifier for this welcome content. Only tree based views are supported.")},{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.view","Target view identifier for this welcome content. Only tree based views are supported."),enum:Object.keys(t.ViewIdentifierMap)}]},[u.contents]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.contents","Welcome content to be displayed. The format of the contents is a subset of Markdown, with support for links only.")},[u.when]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.when","Condition when the welcome content should be displayed.")},[u.group]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.group","Group to which this welcome content belongs.")},[u.enablement]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.enablement","Condition when the welcome content buttons and command links should be enabled.")}}}},i.__decorate([(0,r.Autowired)(c.IMainLayoutService),i.__metadata("design:type",Object)],p.prototype,"mainlayoutService",void 0),i.__decorate([(0,r.Autowired)(c.IViewsRegistry),i.__metadata("design:type",Object)],p.prototype,"viewsRegistry",void 0),p=i.__decorate([(0,r.Injectable)(),(0,d.Contributes)("viewsWelcome")],p),t.ViewsWelcomeContributionPoint=p},96376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsContributionPoint=void 0;const i=n(70655),r=n(39993),o=n(894),a=n(92674),s=n(76326),c=n(57280),l=n(55948);let d=class extends c.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new o.DisposableCollection}contribute(){for(const e of Object.keys(this.json)){const t=this.json[e].map((e=>Object.assign(Object.assign({},e),{name:this.getLocalizeFromNlsJSON(e.name),component:"webview"===e.type?l.ExtensionWebviewView:s.WelcomeView})));for(const n of t){const t=this.mainLayoutService.collectViewComponent(n,e,{viewId:n.id},{fromExtension:!0});this.disposableCollection.push({dispose:()=>{const e=this.mainLayoutService.getTabbarHandler(t);null==e||e.disposeView(n.id)}})}}}dispose(){this.disposableCollection.dispose()}};i.__decorate([(0,r.Autowired)(a.IMainLayoutService),i.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),d=i.__decorate([(0,r.Injectable)(),(0,c.Contributes)("views")],d),t.ViewsContributionPoint=d},91064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startInsideIframe=t.WORKER_HOST_HARD_CODE=void 0;const i=n(55877);t.WORKER_HOST_HARD_CODE="\n(function() {\n const workerSrc = document.getElementById('kaitian-worker-src').getAttribute('data-value');\n\tconst worker = new Worker(workerSrc, { name: 'KaitianWorkerExtensionHost' });\n\tconst kaitianWebWorkerExtHostId = document.getElementById('kaitian-web-worker-ext-host-id').getAttribute('data-value');\n\n\tworker.onmessage = (event) => {\n const { data } = event;\n if (data instanceof MessagePort) {\n window.parent.postMessage({\n kaitianWebWorkerExtHostId,\n data: data\n }, '*', [data]);\n return;\n }\n\n window.parent.postMessage({\n kaitianWebWorkerExtHostId,\n data: data\n }, '*');\n\t};\n\n\tworker.onerror = (event) => {\n\t\tconsole.error(event.message, event.error);\n\t\twindow.parent.postMessage({\n\t\t\tkaitianWebWorkerExtHostId,\n\t\t\terror: {\n\t\t\t\tname: event.error ? event.error.name : '',\n\t\t\t\tmessage: event.error ? event.error.message : '',\n\t\t\t\tstack: event.error ? event.error.stack : []\n\t\t\t}\n\t\t}, '*');\n\t};\n\n\twindow.addEventListener('message', function(event) {\n\t\tif (event.source !== window.parent) {\n\t\t\treturn;\n\t\t}\n\t\tif (event.data.kaitianWebWorkerExtHostId !== kaitianWebWorkerExtHostId) {\n\t\t\treturn;\n }\n\n\t\tworker.postMessage(event.data.data);\n\t}, false);\n})();\n",t.startInsideIframe=function(e){const n=document.createElement("iframe");n.setAttribute("class","web-worker-ext-host-iframe"),n.setAttribute("sandbox","allow-scripts allow-same-origin"),n.style.display="none";const r=e=>e.replace(/"/g,"""),o=(0,i.v4)(),a=`\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t